Hundreds of Chinese government analysts worked nonstop for months studying every detail on President Trump in preparation for his state visit to China this week.

The information gathered includes hundreds of details about the president to be fed to reports for Chinese supreme leader Xi Jinping who will hold talks with Trump for his first visit to China as president.

A special government unit linked to the Chinese military is code-named Skyheart and made up some 350 officials who work around the clock at a secret facility in western Beijing called Western Hills, site of the People's Liberation Army (PLA) general staff headquarters where China's underground nuclear command and control complex is based, according to a person familiar with the operation.

Skyheart was first set up around 2012 and focuses exclusively on providing intelligence and information on foreign leaders to senior Communist Party and military leaders.

The analysts have been closely studying everything about Trump in preparation for the summit. No information is too trivial for the group, including Trump's habits, his likes and dislikes, the books he reads, television programs he watches, food preferences, favorite clothes, and brand names of products he prefers.

The group also studies videos and photographs for clues to Trump's personality.

In recent years, the Chinese analysts gained a relatively new window into Trump that has been closely scrutinized: his postings on social media.

Trump regularly signals his policies and preferences unofficially through the social media outlet Twitter. "No detail is too small to be gathered," said the person familiar with Skyheart.

The open-source intelligence program, along with traditional human, electronic, and cyber spying, is a major focus of Chinese civilian and military leaders who regard the United States as China's main enemy and most important intelligence target. Beijing's other priority targets are Taiwan, Russia, and Japan.

It could not be learned if Skyheart operates as part of the civilian Ministry of State Security or the PLA intelligence service, recently renamed the Joint Staff Department Intelligence Bureau.

The president is scheduled to arrive in Beijing Nov. 8, and aides say he plans to press the Chinese leader on two issues: North Korea's nuclear missile threat and bilateral trade and finance issues.

"The president's trip will focus on three goals: first, strengthening international resolve to denuclearize North Korea; second, promote a free and open Indo-Pacific region; third, advance American prosperity through fair and reciprocal trade and economic practices," White House national security adviser H.R. McMaster said last week.

Based on Skyheart, the Chinese leader and his advisers will be ready for Trump, and like past presidential visits will host a series of highly scripted meetings and activities designed to influence the American leader in favor of Chinese policy goals and objectives.

Xi, the Chinese president, also is expected to exploit the Trump visit to boost his legitimacy and raise his international standing following last month's Communist Party congress, which saw his reappointment and strengthened his powers as supreme leader.

In addition to the microscopic examination of Trump, his family, and close advisers, Chinese security services also will be engaged in massive electronic surveillance during the visit by the president and First Lady Melania Trump, along with the group of White House and administration officials and corporate business leaders.

Special security procedures will be used by all members of the traveling presidential party in a bid to reduce or eliminate Chinese eavesdropping. For example, many officials were directed not to use personal cell phones or computers in China that can be subjected to sophisticated electronic surveillance. Temporary-use phones and computers will be used by some Americans. Others will go without routine access to handheld devices.

It could not be learned if Trump will maintain the ability to use Twitter while in China. The president most recently tweeted from both Japan and South Korea.

Experts on Chinese security affairs say the intelligence services in China are known for comprehensive and pervasive spying before and during such high-level visits.

"There will be physical, electronic, and video surveillance," said Larry Wortzel, a retired military intelligence officer who took part in several U.S. presidential and vice presidential visits in China in the past.

"There will be a very good liaison between the Ministry of State Security and other PLA protective services people and the Secret Service," Wortzel said. "So at the same time there is an intrusive surveillance system, which will now include cyber, there is excellent cooperation between the embassy, the regional security officer, the Secret Service, and the Chinese protective services including the MSS, Public Security Bureau, and the CMC guards unit."

Ken deGraffenreid, former deputy national counterintelligence executive, a senior counterspy policymaker, said programs like Skyheart are useful to Chinese leaders in manipulating and coercing visiting U.S. officials during meetings or negotiations.

"Today, with everybody's presence on social media and the availability of information online, it's a lot easier to do that," deGraffenreid said. "The Chinese try to get everything they can, where someone lives, who [are] their friends. They're trying to find personal strengths and weaknesses."

By contrast, the CIA's operations directorate produces classified foreign leadership profiles that don't compare to the level of detail provided by the Chinese, he said.

Most of the best U.S. intelligence on Chinese leaders comes from National Security Agency electronic intercepts. Renegade NSA contractor Edward Snowden revealed extensive NSA surveillance of China in 2014.

For Trump, the Chinese will seek to play to his ego, looking into past business dealings in a bid to exploit any family ties to businesses in China that could be used as leverage in discussions.

The Chinese are known to be skillful and subtle using hints and suggestions rather than direct appeals.

"They use implication. The technique is that ‘We know more about you than you realize.' It can be used as an intimidation tactic," deGraffenreid said.

It is likely the Chinese also might press Trump to return dissident billionaire Guo Wengui, who has spoken out about high-level Chinese leadership corruption and as a result has become a major target of Beijing's global influence campaign, deGraffenreid said.

"They are going to put the arm on Trump for the U.S. to return that guy."

Prior to the summit, Xi passed word to Trump through emissaries that it would be a personal favor for him if Trump returned the dissident.

An administration official said Trump initially was fooled by Chinese propaganda into believing Guo was a criminal fugitive that should be repatriated. But the president was later informed by aides and lawyers that the case against Guo is political, and he does not have the legal authority to return Guo, who applied for political asylum in September, a process expected to take years.

Other topics the Chinese are expected to raised with Trump include opposition to American arms sales to Taiwan and China's sweeping and illegal sovereignty claims to large areas of international waters in the South China and East China Seas—areas that are being covertly militarized by Chinese forces.

Mark Stokes, a former Air Force intelligence officer who also worked inside China, said Chinese intelligence work is closely linked to the government's political influence operations that are similar in scale to the Soviet Union's Cold War "active measures"—covert operations to advance policies.

"Are the Chinese any more or any less intent on being able to shape public perceptions in a covert or clandestine way than the Soviets were? I would say they probably are more ambitious than the Soviets were," Stokes told a congressional China commission hearing last year.

Former U.S. government official Peter Mattis, an expert in Chinese intelligence affairs, says China is very adept at using its information power in meetings with U.S. officials.

"Every single study that's been done … has talked about how prepared the Chinese interlocutors are to come and deal with the U.S. perspective," he said in congressional testimony. "It's information that resolves specific decision-making problems, not just sort of information that supports national security interests but that is tailored to decisions in a much stronger way than we tailor it."

The Trump visit to China will include government meetings, commercial meetings with corporate CEOs led by Commerce Secretary Wilbur Ross, and cultural events.

James Mann, a China affairs expert with the Johns Hopkins School of Advanced International Studies, says Trump's personality is well-suited to Chinese influence operations.

"There has never been an American president whose style, personality, and mindset were so perfectly suited to China’s preferred way of doing business," Mann wrote in a recent essay in the Daily Beast. "Trump has a huge ego. The Chinese love big egos. Flattery is a skill Chinese officials have perfected over the millennia. They know how to entertain and to impress visiting leaders. They have done so to their considerable benefit with officials starting with Henry Kissinger."

Kissinger, a former secretary of state who opened U.S. relations with communist China, once remarked: "After a dinner of Peking duck, I'll agree to anything."

Chinese state-run Global Times reported, "China is pulling out all the stops in its preparations for the leader who has fascinated many with his outspoken remarks and strong personality."

The party-affiliated newspaper said China will seek to woo Trump with both official and informal meetings.

"Apart from the red-carpet ceremony, formal talks and a banquet, President Xi and his U.S. counterpart will have some informal get-togethers," Vice Foreign Minister Zheng Zeguang told Xinhua.

China is calling the Trump tour "state visit-plus" in a bid to show off the personal relationship between Xi and Trump during a meeting expected to be held at the Forbidden City, the imperial palace of the Ming to Qing dynasties from 1420 to 1912.

Trump may visit the Great Wall, and reports say he may open an account on the heavily censored microblog Sina Weibo that boasts 340 million users.