The Chinese leader Xi Jinping opening the World A.I. Conference in Shanghai, China, in July. Even as China supports openness in A.I., it needs to “constantly refine measures to forestall loss of control,” he said.