Despite their high-tech tools, the authorities are mainly relying on a flood of workers to keep hundreds of millions of people from coming in contact with outsiders.
China has flooded cities and villages with battalions of neighbourhood busybodies, uniformed volunteers and Communist Party representatives to carry out one of thebiggest social control campaigns in history.
The goal: to keep hundreds of millions of people away from everyone but their closest kin.
The nation is battling the coronavirus outbreak with a grassroots mobilisation reminiscent of former Communist Chairman Mao Zedong's mass crusades, not seen in China in decades — essentially entrusting front-line epidemic prevention to a supercharged version of a neighbourhood watch.
Housing complexes in some cities have issued the equivalents of paper hall passes to regulate how often residents leave their homes. Apartment buildings have turned away their own tenants if they have come from out of town. Train stations block people from entering cities if they cannot prove they live or work there. In the countryside, villages have been gated off with vehicles, tents and other improvised barriers.
Despite China's arsenal of high-tech surveillance tools, the controls are mainly enforced by hundreds of thousands of workers and volunteers, who check residents' temperature, log their movements, oversee quarantines and — most important — keep away outsiders who might carry the virus.
Residential lockdowns of varying strictness — from checkpoints at building entrances to hard limits on going outdoors — now cover at least 760 million people in China, or more than half the country's population, according to a New York Times analysis of government announcements in provinces and major cities. Many of these people live far from the city of Wuhan, where the virus was first reported and which the government sealed off last month.
Throughout China, neighbourhoods and localities have issued their own rules about residents' comings and goings, which means the total number of affected people may be even higher. Policies vary widely, leaving some places in a virtual freeze and others with few strictures.
China's top leader, Xi Jinping, has called for an all-out "people's war" to tame the outbreak. But the restrictions have prevented workers from returning to factories and businesses, straining China's giant economy. And with local officials exercising such direct authority over people's movements, it is no surprise that some have taken enforcement to extremes.
Li Jing, 40, an associate professor of sociology at Zhejiang University in the eastern city of Hangzhou, was almost barred from taking her husband to a hospital recently after he choked on a fish bone during dinner. The reason? Her neighbourhood allows only one person per family to leave the house, every other day.
"Once the epidemic was disclosed, the central government put huge pressure on local officials," Li said. "That triggered competition between regions, and local governments turned from overly conservative to radical.
"Even when the situation is relieved or if the mortality rate turns out not to be high, the government machine is unable to change direction or tune down," she added.
China's prevention efforts are being led by its myriad neighbourhood committees, which typically serve as a go-between for residents and local authorities. Supporting them is the government's "grid management" system, which divides the country into tiny sections and assigns people to watch over each, ensuring a tight grip over a large population.
Zhejiang province, on China's southeastern seaboard, has a population of nearly 60 million and has enlisted 330,000 "grid workers." Hubei province, whose capital is Wuhan, has deployed 170,000. The southern province of Guangdong has called upon 177,000, landlocked Sichuan has 308,000, and the megacity of Chongqing has 118,000.
Authorities are also combining enormous manpower with mobile technology to track people who may have been exposed to the virus. China's state-run cellular providers allow subscribers to send text messages to a hotline that generates a list of provinces they have recently visited.
At a high-speed rail station in the eastern city of Yiwu this past week, workers in hazmat suits demanded that passengers send the text messages that show their location data before being allowed to leave.
An app developed by a state-run maker of military electronics lets Chinese citizens enter their name and national ID number and be told whether they may have come in contact, on a plane, train or bus, with a carrier of the virus.
It is too early to say whether China's strategy has contained the outbreak. With large numbers of new infections being reported every day, the government has clear reasons for minimising human contact and domestic travel. But experts said that in epidemics, overbearing measures can backfire, scaring infected people into hiding and making the outbreak harder to control.
"Public health relies on public trust," said Alexandra Phelan, a specialist in global health law at Georgetown University. "These community-level quarantines and the arbitrary nature in which they're being imposed and tied up with the police and other officials is essentially making them into punitive actions — a coercive action rather than a public health action."
In Zhejiang, one of China's most developed provinces and home to Alibaba and other technology companies, people have written on social media about being denied entry to their own apartments in Hangzhou, the provincial capital. Coming home from out of town, they said, they were asked to produce documents from landlords and employers or be left on the street.
For Nada Sun, who was visiting family in Wenzhou, a coastal city in Zhejiang, a health scare turned into a mandatory quarantine.
When Sun, 29, complained of tightness in her chest this month, her mother told her to go to the hospital. She did not have a high fever, yet the hospital gave her a battery of checks. All came back negative for the virus.
Even so, when she returned to her apartment, she was told that she would be quarantined for two weeks. She was also added to a group on the WeChat messaging app with a local Communist Party secretary and other volunteers in which she has to submit her temperature and location twice a day.
"I'm worried they have too much information," Sun said.
The lockdowns are not necessarily oppressive. Many people in China have been happy to wall themselves off, ordering groceries online and working from home if they can. Some neighbourhood officials act with a humane touch.
Bob Huang, a Chinese-born American living in northern Zhejiang, said the volunteers at his complex had helped chase down a man who stayed out overnight to drink, in violation of rules about how often people can step outside. Yet they also delivered food from McDonald's to a quarantined family.
Huang, 50, has been able to dodge the restrictions by using a special pass from the property manager, and he has been driving around delivering protective face masks to friends. Some building complexes don't let him in. Others take down his information.
A nearby village took a less orthodox approach.
"They always start asking questions in the local dialect, and if you can respond in the local dialect, you are allowed to go in," Huang said. Unable to speak the dialect, he had to wait, though the villagers were friendly. They gave him a folding chair, offered him a cigarette and didn't ask for an ID.
Some parts of China have imposed other, often severe policies for fending off the epidemic.
Hangzhou has barred pharmacies from selling analgesics to force people with symptoms to seek treatment at hospitals. The eastern city of Nanjing requires anybody who takes a cab to show ID and leave contact information. Yunnan province wants all public places to display QR codes that people must scan with their phones whenever they enter or exit.
Many places have banned large gatherings. Police in Hunan province this month destroyed a mahjong parlour where they found more than 20 people playing the tile game.
With local governments deciding such policies largely on their own, China has become a vast patchwork of fiefs.
"It can be quite haphazard," said Zhou Xun, a historian of modern China at the University of Essex in England. "A perfect plan on paper often turns into makeshift solutions locally."
Officials seem to recognize that some local authorities have gone too far. This month, Chen Guangsheng, the deputy secretary-general of Zhejiang's provincial government, called it "inappropriate" that some places had employed "simple and crude practices," like locking people into their homes, to enforce quarantines.
National officials on Saturday urged towns and villages to remove unnecessary roadblocks and ensure the smooth transport of food and supplies.
Zhang Yingzi's apartment complex in Hangzhou initially forbade anybody who had been out of town from entering. Later, the ban was adjusted to cover only people coming from Hubei province and the Zhejiang cities of Wenzhou and Taizhou, both of which have had many cases of the new virus.
"Banning everyone from out of town wasn't realistic," said Zhang, 29, an accountant. "There are so many of them, after all. Some needed to come back for work."
Still, many in China are uneasy about loosening up virus controls too quickly.
Zhang Shu, 27, worries that her parents and neighbours are becoming cavalier about the virus, even as workers drive around her village near Wenzhou with loudspeakers telling people to stay home.
"Ordinary people are slowly starting to feel that the situation isn't so horrible anymore," she said. "They are restless."