Media playback is unsupported on your device Media caption Riot police clashed with protesting workers in the city of Zengcheng, Guangzhou province, in June

There has been a wave of strikes and riots among migrant workers manning production lines in southern China, but can the government keep the "factory of the world" running smoothly?

Chinese officials are not renowned for giving straight answers. But in Guangzhou, China's manufacturing megacity, they are quite candid about the need to give equal rights to migrant workers.

Is this one of the biggest challenges China is facing, I ask Chen Hao Tian, an official representing the government of China's third city.

"Yes," he says simply.

Migration from the countryside has provided the cheap labour that has fuelled China's boom. Half of the 14 million residents here are migrant workers.

But in recent months, each week has brought news of strikes in factories in Guangzhou and other cities across Guangdong province.

There has been rioting, too. In Zengcheng, an outlying suburb, migrants from Sichuan fought against locals, overturned cars and torched buildings in a sudden outburst this summer.

Rural v city

Chinese factory workers want better pay - and in Guangzhou a number of strikes have achieved this objective.

Image caption Guangzhou is China's main manufacturing hub and is home to around seven million migrant workers

But another problem for the migrant workers is discrimination under the legal system, which denies them the same rights and access to public services as the city dwellers they live alongside.

The frustration of factory workers matters to Guangdong, which wants to keep migrants coming to the province to keep its factories growing.

But Mr Chen, a senior official at Guangzhou's reform and development commission, says the city is beginning to address the problem.

"Migrant workers live and work in this city and we must provide them with basic rights and benefits," he says.

Our country is developing so quickly, but we migrant workers seem not to be sharing in the fruits of that progress Yang, 22-year-old migrant worker

"If they can't educate their children or find decent housing, they'll be dissatisfied with the government."

I arranged a clandestine meeting with a group of migrant workers who were among hundreds who took part in a recent walkout from their factory.

It was a bold act in a country where the authorities traditionally maintain an iron grip on social order. But in Guangdong province, strikes over pay have been increasingly tolerated - perhaps as an outlet for migrant anger.

"Our country is developing so quickly, but we migrant workers seem not to be sharing in the fruits of that progress," says Yang, a 22-year-old worker from a village in Hunan province.

"The pressure is building up inside us."

Another worker, Deng from Shaanxi, has concerns about his two children, who he has sent away to live with relatives in the country.

"I hope that when my kids grow up, there will be no difference between urban and rural," he says.

Identity crisis

He is referring to China's hukou or household registration system, designed under Chairman Mao to manage population movements.

Worker protests in China Wukan, Guangdong, December 2011 Villagers riot and stage ongoing protests after their land is seized by local government

Villagers riot and stage ongoing protests after their land is seized by local government Hainan and Guangxi provinces, December 2011 Bus drivers strike over pay and licensing laws

Bus drivers strike over pay and licensing laws Dongguan, Guangdong province, November 2011 Thousands of workers at a shoe factory strike over pay

Thousands of workers at a shoe factory strike over pay Taicang, Jiangsu, November 2011 Hundreds of workers at an electronics factory walk out after a Japanese manager insulted Chinese staff

Hundreds of workers at an electronics factory walk out after a Japanese manager insulted Chinese staff Shanghai, November 2011 Over 1,000 workers strike over redundancies

Over 1,000 workers strike over redundancies Chaozu, Guangdong, June 2011 Migrant workers riot over pay

Migrant workers riot over pay Zengcheng, Guangdong, June 2011 Three days of rioting by Sichuanese migrants over alleged assault on fruit-seller by police

Under Chinese law, everyone is registered in their home town or village and must access education, housing and welfare there.

Migrant workers cannot change their hukou to an urban one.

For Deng, this has prevented him sending his two children to local schools. City schools that accept migrant children often make them pay extra, almost a year's salary, as a "voluntary" payment.

Most migrants can't afford it, so in many cases their children do not go to school at all.

People with rural registration also get charged more than locals for healthcare, housing and other basic welfare.

Factories are meant to support migrants without a local hukou registration, but many employers fail to purchase proper employee insurance.

And this social discrimination, mixed with the rising cost of living and frustration with employers, is a recipe for social conflict.

"There is a lot of conflict, and if it's not managed there will be a lot of unrest and disharmony," says Professor Peng Peng of the Guangzhou Academy of Social Sciences.

He is one of a chorus of academics and journalists who have been highlighting the issue.

Providing migrant workers with further rights, and higher incomes, should also be good for the global economy, because it means they can become more active consumers - buying goods produced in China by both local and Western companies.

Reform under way

Guangdong is generally known as progressive place that has led China's economic liberalisation. But the government's social reforms have begun slowly.

The migrants enjoy their life in the city, and they won't go back to the countryside Dee Lee, Migrant worker helpline

"We can't abolish hukou overnight," Mr Chen of the Guangzhou government tells me. "There is a huge cost associated with that."

Research has shown that each new hukou permit issued to a migrant worker will end up costing the city 1.2m yuan (£122,000; $188,000) in the long term, because of the extra resources used up by migrants and their children.

There are also the fears of other city residents to take into account - for example, that schools and hospitals will be stretched.

"That's why we're creating a points system - it's just like the system that countries such as the UK or USA use for migration," says Mr Chen.

"We want to attract immigrants here to Guangzhou based on their skills."

In practice, anyone who wants a new hukou must satisfy a long list of qualifications, including educational attainment, property ownership, and community service.

Only 3,000 new permits have been issued so far, out of a population of seven million migrant workers. Most poor migrants remain shut out.

Dee Lee, who runs a non-profit helpline for factory workers, takes hundreds of calls a day. Many young callers tell stories of an affront, big or small, to their sense of dignity.

"Workers in the past would say they didn't care about discrimination, they just want to earn enough money and go back [home]," he explains.

But most workers now were born after 1980. They have been brought up in a China of micro-blogs and web cafes. They would rather spend their time at pop concerts than digging fields.

They want to be consumers - and that is something China's leaders and the West now welcome.

So the "rural" status on their registration cards looks increasingly anachronistic.

"The migrants enjoy their life in the city, and they won't go back to the countryside," says Mr Lee.

"The pressure is going up day by day. Tension is rising, and the government has acknowledged that."

Listen to the full report on Crossing Continents on BBC Radio 4 on Thursday 15 December at 11:00 GMT or Monday, 19 December at 20:00 GMT. You can listen again via the BBC iPlayer by downloading the podcast.