HANGZHOU, China — As China encourages people to return to work despite the coronavirus outbreak, it has begun a bold mass experiment in using data to regulate citizens’ lives — by requiring them to use software on their smartphones that dictates whether they should be quarantined or allowed into subways, malls and other public spaces.
But a New York Times analysis of the software’s code found that the system does more than decide in real time whether someone poses a contagion risk. It also appears to share information with the police, setting a template for new forms of automated social control that could persist long after the epidemic subsides.
People in China sign up through Ant’s popular wallet app, Alipay, and are assigned a color code — green, yellow or red — that indicates their health status. The system is already in use in 200 cities and is being rolled out nationwide, Ant says.
Neither the company nor Chinese officials have explained in detail how the system classifies people. That has caused fear and bewilderment among those who are ordered to isolate themselves and have no idea why.
The sharing of personal data with the authorities further erodes the thin line separating China’s tech titans from the Communist Party government.
The Times’s analysis found that as soon as a user grants the software access to personal data, a piece of the program labeled “reportInfoAndLocationToPolice” sends the person’s location, city name and an identifying code number to a server. The software does not make clear to users its connection to the police. But according to China’s state-run Xinhua news agency and an official police social media account, law enforcement authorities were a crucial partner in the system’s development.
While Chinese internet companies often share data with the government, the process is rarely so direct. In the United States, it would be akin to the Centers for Disease Control and Prevention using apps from Amazon and Facebook to track the coronavirus, then quietly sharing user information with the local sheriff’s office.
Zhou Jiangyong, Hangzhou’s Communist Party secretary, recently called the health code system “an important practice in Hangzhou’s digitally empowered city management” and said the city should look to expand the use of such tools, according to state news media.
Such surveillance creep would have historical precedent, said Maya Wang, a China researcher for Human Rights Watch. China has a record of using major events, including the 2008 Beijing Olympics and the 2010 World Expo in Shanghai, to introduce new monitoring tools that outlast their original purpose, Ms. Wang said.
“The coronavirus outbreak is proving to be one of those landmarks in the history of the spread of mass surveillance in China,” she said.
In a statement, Ant Financial’s general counsel, Leiming Chen, said that Ant required all third-party developers, including those offering health code services, to adhere to its data security and privacy requirements, which include obtaining user consent before providing services. “The collaboration between private and public sectors in epidemic control is a common global practice,” Mr. Chen said.
The early days of the epidemic seemed to expose the limits of Beijing’s expensive computerized snooping. Blacklists targeting criminals and dissidents floundered at the task of monitoring entire populations. Facial recognition proved easily flummoxed by face masks.
In response, China has stepped up its efforts to ensure, mostly with the help of old-fashioned human enforcement, that citizens leave digital footprints wherever they go.
Across the country, workers in train stations and outside residential buildings record people’s names, national ID numbers, contact information and details about recent travel. In some cities, residents now have to register their phone numbers with an app to take public transportation.
The Alipay Health Code’s creators say it uses big data to draw automated conclusions about whether someone is a contagion risk.
After users fill in a form on Alipay with personal details, the software generates a QR code in one of three colors. A green code enables its holder to move about unrestricted. Someone with a yellow code may be asked to stay home for seven days. Red means a two-week quarantine.
In Hangzhou, it has become nearly impossible to get around without showing your Alipay code. Propaganda-style banners remind everyone of the rules: “Green code, travel freely. Red or yellow, report immediately.”
At times during a recent visit, tensions over the code were evident. Two subway guards said older passengers, annoyed by the phone checks, had cursed and yelled at them. When one middle-age man barged through a line, a guard had to run him down. As she did, others slipped by, their phones unchecked.
In a Feb. 24 news briefing, officials said that more than 50 million people had signed up for health codes in Zhejiang Province, whose capital is Hangzhou. That is almost 90 percent of the province’s population. Of these codes, 98.2 percent were green, which means nearly a million people had yellow or red codes.
An official webpage with questions and answers about the service says a yellow or red code may be given to someone who has had contact with an infected person, visited a virus hot zone or reported having symptoms in the sign-up form. This suggests that the system draws on information about coronavirus cases and government-held data on plane, train and bus bookings.
Beyond that, however, The Times’s analysis also found that each time a person’s code is scanned — at a health checkpoint, for instance — his or her current location appears to be sent to the system’s servers. This could allow the authorities to track people’s movements over time.
Ant Financial declined to answer questions about how the system worked, saying that government departments set the rules and controlled the data. Alipay has 900 million users across China. Ant is part-owned by Alibaba, whose shares trade in New York and are owned by major international investors.
Tencent, the Chinese internet giant that runs the messaging app WeChat, which has over a billion monthly users, has also worked with the authorities to build its own health code system.
Leon Lei, 29, signed up for an Alipay code before leaving his hometown, Anqing, to return to work in Hangzhou. At first, his code was green. But a day before he departed, it turned red, and he didn’t know why. Anqing has not been especially hard hit by the virus, though it neighbors Hubei Province, the center of the outbreak.
On the road to Hangzhou, officers at two highway exits saw his digital scarlet letter and stopped him from taking the exit. Only at a third exit was he allowed to pass.
“The broad rules aren’t public,” Mr. Lei said. “How it assigns red or yellow codes isn’t public. And there’s no clear way to make your code turn green.”
Both Alibaba and Ant Financial have their headquarters in Hangzhou, and as the system expands nationwide, other places may not enforce it as stringently. According to the Xinhua news agency, 100 Chinese cities were using the system within a week of its introduction in Hangzhou on Feb. 11.
Complaints began flooding social media almost as quickly.
Vanessa Wong, 25, works in Hangzhou but has been stuck for weeks in her hometown in Hubei Province. She has no symptoms. But her health code is red, and both her employer and her housing complex in Hangzhou require people to have a green code to be allowed back.
So far, she has heard nothing from the authorities about when she might expect her code to change color. Her best guess is that it’s red simply because she is in Hubei.
Hangzhou officials have acknowledged the unease the system has caused. At a recent news conference, they urged citizens to report glitches and inaccuracies to the authorities.
“Even if a yellow code or a red code appears, don’t be nervous,” said Tu Dongshan, the deputy secretary-general of the city’s Communist Party committee.
Holed up at home and unable to concentrate on her work, Ms. Wong is feeling helpless. She cannot help noticing that the system encourages a kind of regional prejudice.
“It divides people up based on where they’re from,” she said. “Isn’t that discrimination?”
With fear of the virus still acute, many in China take comfort in high-tech precautions, even if they are at times impractical and dysfunctional. Doo Wang, 26, said her code was red for a day before it inexplicably changed to green. Calling a support hotline yielded no answers. Yet she still approves of the system.
“If we had to use it indefinitely, that would be crazy — just way too big a pain,” Ms. Wang said. “But for the epidemic, it makes sense.”
She shrugged off the privacy concerns. “Alipay already has all our data. So what are we afraid of? Seriously.”
Paul Mozur reported from Hangzhou, Raymond Zhong from Beijing and Aaron Krolik from New York. Research was contributed by Lin Qiqing from Hangzhou and Wang Yiwei from Beijing.