China’s industry saw profit gains concentrated in a handful of sectors swept up in the global artificial intelligence boom or benefiting from higher oil prices, masking fragility in the economy as overall earnings soared at the fastest in more than two years.

