China's July consumer inflation rose 1.8 percent from a year ago, while the slide in producer prices abated somewhat.