What is the relationship between Cao Xueqin's life experience and his creation of A Dream of Red Mansions?

Cao Xueqin, a great litterateur in China in Qing Dynasty, was named Zhan (with the same pronunciation as Zhan), whose Chinese name was Xue Qin, and his ancestral home was in Hebei (Tieling, Liaoning, Liaoyang, Liaoning). He was born around 17 1763. Cao Xueqin grew up in splendor. Its predecessor was the Han nationality, and later it was the Manchu Zhengbaiqi (domestic slave). Cao Xueqin's great-grandfather won an official position because of his meritorious service in entering the customs with the Qing army. Cao Xueqin's great-grandfather Cao Xi, his grandfather Cao Yin, and his parents Cao Qing and Cao Fu worked as Jiangning weavers for more than 60 years, which was highly prized by Emperor Kangxi. So the Cao family became a "century-old family" at that time. Kangxi made six expeditions to the south, four of which were led by Cao Yin, and Vega was his palace. The Zhen Shi family in the south of the Yangtze River mentioned in A Dream of Red Mansions "riding alone for four times" is this favor. In the early years of Yongzheng, due to the internal struggle of the feudal ruling class, the Cao family suffered many blows, was dismissed from office and imprisoned, and their family property was confiscated and returned to Beijing. Since then, his family has been going downhill. This turning point made Cao Xueqin deeply feel the coldness of the world and more clearly understand the essence of the feudal social system. From then on, he lived in poverty, but he was good at writing and devoted himself to the writing and revision of the novel A Dream of Red Mansions. He read it for ten years, added and deleted it five times, and wrote this literary masterpiece that pushed China's classical novel creation to the peak. A Dream of Red Mansions, with its rich content, tortuous plot, profound ideological understanding and exquisite artistic techniques, has become a great realistic work in China's classical novels. In the twenty-seventh year of Qianlong (1762), his youngest son died prematurely, and Cao Xueqin fell into excessive grief. On New Year's Eve of this year (1764 February 1), he died of poverty (about the year of Cao Xueqin's death, there were twenty-eight years of Qianlong (1763). On New Year's Eve, before the book was finished, Qin died in tears. I cried tears, and the funeral expenses were funded by my friends. Because it is still unclear, Cao Xueqin's Dream of Red Mansions only stays for the first eighty times. Some people say that Cao Xueqin also wrote the last twenty-eight, and the high temple (Qianlong) refused to give birth, so he ruined the last twenty-eight written by Cao Xueqin and asked Gao E to write it, locating the whole book one hundred and twenty times. The earliest extant manuscript is the reign of Qianlong Xu Jia (1754), but there are only 16 discontinuous manuscripts. Later, a number of manuscripts were discovered, the most important of which was the manuscript of Gan Long Chen Geng Year (1760), which is now 78 times. These manuscripts are all titled "The Story of the Stone", and there are many comments signed by people such as "Zhi Yanzhai", so they are also called "Zhi Pi Shu". Why fat books appear and spread is still controversial.