There was a diplomatic whirl in Beijing over the past two weeks, as a steady stream of high-level visitors traveled to China — an unusually intensive diplomatic scheduling at a time when the conflicts in the Middle East have hit energy security and the sluggish world economy.