Prices for goods at the factory gate in China missed expectations in May, the government said today, in a possible sign of weakening demand for the world's second-largest economy.

China's producer price index (PPI) rose 5.5% year-on-year, according to the National Bureau of Statistics (NBS), slightly lower than economists' expectation of a 5.6% increase and down from a 6.4% gain in April. 

For years the world economy has been mired in tepid inflation or deflation.

If persistent, this tends to be bad for industrial prospects and economic growth because customers delay purchases in hopes of getting cheaper deals in the future, starving companies of business and funds.

China's consumer price index (CPI), a main gauge of retail inflation, rose 1.5% year-on-year in the month, up from a 1.2% increase in April, according to the NBS.

Analysts said the the pick-up was entirely driven by an increase in food price inflation.

Beijing has said it wants to reorient the economy away from relying on debt-fuelled investment and towards a consumer-driven model, but the transition has proven challenging, leading to the slower growth readings in recent years. 

China's economy, a vital engine of global growth, expanded 6.7% for all of last year, the slowest rate in a quarter of a century.

But a slight uptick in the last three months of 2016 provided signs of stabilisation. 

China posted a strong reading in foreign trade in May, but data has also showed a contraction in manufacturing, hinting at deteriorating conditions for producers in the country.