Scientists have discovered an effective method for getting people to drink less alcohol, research shows.