A Chinese customer rests as he stands in a store in a shopping district on January 20, 2015 in central Beijing, China.

China's consumer inflation in May rose to the highest in 15 months, as food prices spiked due to persistently high pork prices, the National Bureau of Statistics data showed on Wednesday.

Consumer price index (CPI) in May rose 2.7% from a year ago, the highest since February last year and in line with expectations of economists' polled by Reuters.

Food prices rose 7.7% in May from a year ago, while non-food prices rose 1.7% on-year. Fresh fruit prices in particular soared 26.7% in May from a year ago due to weather-related factors. They were up 14.8% from April.

Pork prices in China have been persistently high this year as African swine fever hit hog herds in the country. Pork prices rose 18.2% from a year ago in May, the statistics bureau said.

While Chinese diners — who account for half of the world's pork consumption — may get upset about higher prices, the development is not an something that would cause wider market panic, said Bo Zhuang, chief China economist at TS Lombard.

"Chinese pork prices have been on a roller-coaster for the last decade," Zhuang told CNBC.

The Chinese government said earlier this year that Chinese pork prices are expected to jump more than 70% from a year ago.

However, that scenario is not unheard of as pork prices used to jump 50% to 60% a few years ago, so consumers will simply switch to other meat like chicken, beef or button, said Zhuang.

Meanwhile, producer price inflation (PPI) — a gauge of industrial profitability — rose 0.6% in May from a year ago, in line with expectations.

The latest set of economic data came amid a trade fight between the world's two largest economies.

So far, the U.S. has slapped duties on $250 billion in Chinese products, while Beijing has put tariffs on $110 billion in American goods. President Donald Trump has threatened to impose separate tariffs on more than $300 billion of Chinese goods that are currently not taxed.