After midnight on Tuesday morning, North and South Korea ended a military standoff that began last week, when the two countries traded rocket artillery fire for the first time in five years. But other, more important behind-the-scenes action has likely been taking place, involving North Korea and its main trading partner and sole ally — China.

The closed nature of both countries means that it's virtually impossible to know for sure. I base this theory on my experience working for the State Department in China for three years, living along the China-North Korea border, and monitoring food, grain and oil movement in and out of China.

Historically, when North Korea has poked South Korea, it has done so to either stoke national pride or get Beijing's attention. That looks likely to have been the case this time. Chinese and North Korean officials have likely been holding talks, primarily in the border region of Liaoning Province, as they did while I was in the region in the mid-2000s. Much of the discussion probably involved China urging restraint between North and South Korea. In the event of a war between the Koreas, millions of North Koreans will likely flee to China, so it is in China's best interest to help secure peace on the peninsula.