In the Tang Dynasty, the royal family came from Li, a famous family in Longxi, and [35] the founding monarch of the sixteen countries in Xiliang was its distant ancestor. At that time, the Li family was also an important member of the Guanlong military aristocratic group in the Northern Wei Dynasty. [27] Longxi Li is a famous family of military commanders in the Qin Dynasty, and famous generals such as Li Guang, a flying general in the Western Han Dynasty, and Li Xin, a famous Qin national, emerged. According to Old Tang Book and New Tang Book, Li, the royal family of the Tang Dynasty, is a descendant of the second child (also known as Li Yong). In the Northern Zhou Dynasty, following the standard policy of Guanlong Group, Li was given the Hu surname "Xiao Ye". On the northern weekend, Emperor Wendi of Sui Dynasty reinstated him as Li [36] [37]. In the great cause of the Sui Dynasty, due to Yang Di's abuse of state power and the failure of Koguryo's Three Signs, the people revolted at the end of the Sui Dynasty. [33] Li Yuan saw that the world was in chaos and the demise of the Sui Dynasty was irreversible, so he came up with the idea of replacing it [38].
In May of the 13th year of Daye (6 17), Taiyuan stayed behind and Tang Guogong Li Yuan set out in Jinyang in the name of obeying Sui Dynasty. Along the way, in November, he occupied Chang 'an, made the king emperor, and changed to Yining, that is, Emperor Sui Gong. Tang Gaozu was appointed Prime Minister and became the king of the Tang Dynasty. In the second year of Yining (6 18), in March, Emperor Yang Di died. In May, You Yangchan was located in the Tang and Yuan Dynasties. Tang and Yuan Dynasties proclaimed themselves emperor, and the title of Tang Dynasty was changed to Wude, and Chang 'an was still its capital. The Tang Dynasty was established and the Sui Dynasty perished. You Yang was demoted to the Greek lord protector and settled in Chang 'an. He died in May of the following year. Then, Li Jian, the eldest son of Tang gaozu, became a prince, Li Shimin, the second son, became the king of Qin, and Li Yuanji, the fourth son, became the king of Qi. [37] [