First, in order to consolidate centralized rule, Emperor Wendi of Sui Dynasty chose Confucianism as the guiding ideology and formulated the line of rule by virtue. After the establishment of the Tang Dynasty, the ruling group summed up the experience and lessons of the rise and fall of the Sui Dynasty, politically chose Confucianism as the leading ideology, held high the banner of respecting Confucianism, and determined the cultural and educational policy of worshipping Confucianism and promoting learning.
Second, both Buddhism and Taoism are used. The rulers of Sui and Tang Dynasties did not only respect Confucianism. In order to make use of Buddhism and Taoism at the same time, Tang Gaozu adopted a policy of integrating Taoism, Confucianism and Buddhism. Social unrest provides opportunities for the activities of Buddhism and Taoism, and the two religions compete to exert influence on the rulers.
Thirdly, Emperor Wendi of Sui Dynasty developed the imperial examination and delegated the power of appointing officials to the central government to strengthen centralization. First, he resumed the use of the Chaju system to solve the problem of recruiting officials, and then he reformed the Chaju system, combining the establishment, recommendation and examination of Chaju with the local regular and fixed selection and delivery of talents according to administrative regions, and gradually formed the imperial examination system with cultural talents as the selection criteria. In the seventh year of the emperor's reign, the imperial examination system began to change. During Yang Di's reign, the establishment of Jinshi Branch marked the formation of the imperial examination system. The Tang Dynasty inherited the imperial examination system of the Sui Dynasty.
Fourth, establish private schools. During the Sui and Tang Dynasties, attaching importance to private schools and encouraging their development became one of the government's policies. The government advocates private schools and allows them to be set up freely without restrictions. The Tang Dynasty continued to advocate private schools, and villages below the line county level were organized and managed by the people themselves. The government encourages private schools and requires them to play a role in implementing moral norms and changing customs.
The above is Bian Xiao's answer to the question. Please forgive me if there is any mistake!