Alibaba chairman Jack Ma said society should prepare for decades of pain as the internet disrupts the economy.

The world must change education systems and establish how to work with robots to help soften the blow caused by automation and the internet economy, Mr Ma said in a speech to an entrepreneurship conference in Zhengzhou, China.

“In the next 30 years, the world will see much more pain than happiness,” Mr Ma said of job disruptions caused by the internet. “Social conflicts in the next three decades will have an impact on all sorts of industries and walks of life.”

It was an unusual speech for the Alibaba co-founder, who tends to embrace his role as visionary and extol the promise of the future. He explained at the event that he had tried to warn people in the early days of e-commerce it would disrupt traditional retailers and the like, but few listened. This time, he wants to warn against the impact of new technologies so no one will be surprised.

“Fifteen years ago I gave speeches 200 or 300 times reminding everyone the internet will impact all industries, but people didn’t listen because I was a nobody," he said.

Mr Ma was at times brutal in his criticism of companies that won’t adapt. At one point, he said cloud computing and artificial intelligence are essential for business - and if leaders don’t get that, they should find young people in their companies to explain it to them. Another time, he called for traditional industries to stop complaining about the internet’s effects on the economy. He said Alibaba critics ignore that Taobao, its main online marketplace, has created millions of jobs.

Alibaba shares have outperformed this year on expectations it can withstand efforts by rivals such as Tencent Holdings to capture digital ad spending and muscle in on its turf. The company is moving into untapped rural markets and investing in new sources of income, such as online media and cloud computing - one of its fastest-growing businesses in 2016.

He also warned that longer life spans and better artificial intelligence were likely to lead to both ageing labour forces and fewer jobs. “Machines should only do what humans cannot,” he said. “Only in this way can we have the opportunities to keep machines as working partners with humans, rather than as replacements.”