LONDON—Daniel Frederick, a 34-year-old father of three, was returning to his home on a London public-housing estate shortly after New Year’s when a group of teenagers stabbed him in the back seven times, yards from his flat near a children’s playground.

Mr. Frederick, a security guard, was targeted in a case of mistaken identity, police believe, but the assault was part of a crime trend that London’s mayor said this week would take a generation to solve: a surge in knife attacks in a country with relatively low levels of violent...