Everything both North Korea and the US do with regards to the Korean peninsula is with an eye on China. From Federico Pieraccini at strategicculture.org with an unconventional but plausible analysis of North Korean strategic, diplomatic, and military thinking:
Looking at the recent North Korean testing of two intercontinental missiles, it may seem that Pyongyang wishes to increase tensions in the region. A more careful analysis, however, shows how the DPRK is implementing a strategy that will likely succeed in averting a disastrous war on the peninsula.
In the last four weeks, North Korea seems to have implemented the second phase of its strategy against South Korea, China and the United States. The North Korean nuclear program seems to have reached an important juncture, with two tests carried out at the beginning and end of July. Both missiles seem capable of hitting the American mainland, although doubts still remain over Pyongyang’s ability to miniaturize a nuclear warhead to mount it on an intercontinental ballistic missile (ICBM). However, the direction in which North Korea’s nuclear program is headed ensures an important regional deterrent against Japan and South Korea, and in some respects against the United States, which is the main reason for North Korea’s development of ICBMs. Recent history has repeatedly demonstrated the folly of trusting the West (the fate of Gaddafi remains fresh in our minds) and suggests instead the building up of an arsenal that poses a serious deterrence to US bellicosity.
It is not a mystery that from 2009 to date, North Korea’s nuclear capacity has increased in direct proportion to the level of distrust visited on Pyongyang by the West. Since 2009, the six-party talks concluded, Kim Jong-un has come to realize that the continuing threats, practices, and arms sales of the United States to Japan and South Korea needed to be thwarted in some way in the interests of defending the sovereignty of the DPRK. Faced with infinitely lower spending capacity than the three nations mentioned, Pyongyang chose a twofold strategy: to pursue nuclear weapons as an explicit deterrence measure; and to strengthen its conventional forces, keeping in mind that Seoul is only a stone’s throw away from North Korean artillery.
To continue reading: Avoiding Nuclear War: Why Kim Jong-Un’s Strategy Makes Sense