If China militarily intervenes, it would be to help South Korea/US/whoever else topple the North as quickly and efficiently as possible.
A protracted conflict between the Koreas would mean a flood of North Korean refugees entering China. China does not want this at all. I remember there being rumors (from wikileaks maybe?) that China wouldn't mind a unified Korea under the control of the South, where they have some exclusive rights to natural resources in the North in exchange for no US bases north of the current DMZ. That throws a little bone to US while keeping us from building bases on their border, the South Koreans can pay to educate/modernize/feed the North, and they get access to cheap labor and natural resources.







