In northwest China (Xinjiang province) ethnic violence has sharply declined since 2015. The government has always described the Xinjiang problems as due to Islamic terrorism but in fact it is all about the native ethnic Turk (Uighur) population resisting being overwhelmed by Han Chinese migration. China has not reduced the violence in Xinjiang just with counter-terrorism tactics but also by using classic political tools (jobs and access to desirable goods) as well as dozens of new security measures and technologies.
Because of the recent history of violence and half the population being ethnic Han Chinese (who are very pro-government) the government has turned parts of Xinjiang into test sites for new security and police methods for controlling restless populations. This pleases the Xinjiang Han and annoys the Uighurs. That is no problem for the government because the Han in Xinjiang now feel safer while their angry Uighur neighbors are less violent.
The Uighur complain of how much more difficult it is to get around, especially into areas they are not supposed to be, since China introduced the new electronic ID cards to most people in Xinjiang. These cards will eventually go nationwide but Xinjiang provides an opportunity to test the ID cards, and their accompanying technology under realistic conditions.
Since the 1990s unhappy Uighurs were increasingly aggressive in protesting, if not attacking, the growing Chinese presence among them in Xinjiang. The local Uighurs were not responding well to growing pressure from Han Chinese soldiers and intrusive Han government officials. Because of that many Uighurs continued to support anti-Han activity and this made it possible for some Islamic terrorists to survive and operate there for a while. By 2015 a lot of the Uighur support for open protest faded because the new ID cards made it more difficult to do so. The new ID cards could be swiped to get people through checkpoints or not. Many Uighurs had long ignored (as did many Han elsewhere in China) the laws preventing people from living in areas other than those their ID cards specified. With non-electronic IDs enforcing these rules strictly required a lot of security personnel and angered most of the civilians who being constantly checked. The non-electronic IDs were also easy to counterfeit. The electronic ID cards solved all those problems and also made it possible to implement better Internet security for the growing number of Chinese nationwide who like to shop and do other business online.
China has tested lots of other security hardware and software in Xinjiang, including new sensors and electronic fences around areas where entrance and exit is monitored. Sometimes this is just a Uighur neighborhood where the police have had problems or a Han neighborhood that feels safer with monitored access.
Most Chinese Uighurs are found in Xinjiang province. There the nine million Uighurs are now less than half the population and most of the rest are Han Chinese. The government has been publicly urging soldiers and police to be more aggressive against uncooperative Uighurs and in 2015 the security forces were told to do whatever they thought necessary to keep the peace. The government accuses Uighur activists of endangering state security and tries to keep the unrest out of the news. The same thing is happening in Tibet, where the government is using the same tools to keep everyone under control. Since 2011 several hundred have died in Xinjiang because of Uighur violence. Thousands of Uighurs have been arrested and hundreds sentenced to prison, or death. While Islamic terrorism is seen as a major threat in the West the Chinese regard that threat in China as largely confined to Xinjiang.