In Chinese, Mr. Trump’s name is rendered as Te-lang-pu, and on China’s internet he has gained a similar-sounding nickname, Te-mei-pu, a slang phrase meaning “totally unpredictable.” China has experienced Mr. Trump’s changeable ways more than most countries.

Sign up for On Politics to get the latest election and politics news and insights. Sign up for our politics newsletter

As president-elect, Mr. Trump affronted Beijing by holding a telephone call with Tsai Ing-wen, the president of Taiwan, the island-democracy that China claims as its own territory. After he took office, the Chinese government worked energetically to smooth relations. When Mr. Trump visited Beijing in 2017, Mr. Xi courted him in the imperial Forbidden City.

Since then their relations have soured. From last year, the two governments have been locked in disagreement over the Trump administration’s demands that China buy more American goods and pull down protective barriers that foreign businesses say put them at a heavy disadvantage in China. The two sides have been trying to contain the trade tensions, but Mr. Trump has also said that he is in no rush to reach an agreement.

Ties with the United States have also been strained over human rights disputes, including China’s mass detentions of Muslim minorities; accusations of Chinese intelligence operations in the United States; American restrictions on visas for Chinese academics and other visitors, and limits on Chinese companies, especially Huawei; and Chinese anger over the United States’ criticisms of policy in Hong Kong, the semiautonomous city where protesters have raged for months against the city’s Beijing-backed leadership.

China’s calculus in dealing with Mr. Trump has become even more fraught after he demanded that Mr. Xi’s government investigate Mr. Biden, an aspiring Democratic challenger to Mr. Trump in the 2020 presidential election. Mr. Trump already faces a congressional inquiry over his efforts to press Ukraine to investigate the Bidens.

“China should start an investigation into the Bidens, because what happened in China is just about as bad as what happened with Ukraine,” Mr. Trump told reporters. Moments earlier he had commented on the upcoming trade talks with China, and said, “If they don’t do what we want, we have tremendous power.”