In the 23rd year of Kaiyuan, Zhang Wei, a scholar from a poor family, accidentally activated the "Qingjian History System", which can record Tang Dynasty regulations, characters, and events not recorded in history books, and predict the historical trend through systematic deduction. He entered the government from the imperial examination fraud case, rectified the grassroots officialdom as a county lieutenant, exposed military corruption in border towns after being transferred to the capital, and remained neutral in the confrontations between powerful ministers such as Li Linfu and Zhang Jiuling. With the help of systematic analysis of the hidden dangers of the "Anshi Rebellion", he gradually promoted the revision of the land equalization system and the reform of the government and military system. Eventually he became the prime minister, using history as a lesson to save the prosperous Tang Dynasty from the generals, and became a "virtuous prime minister in civilian clothes" independently passed down by the "New Book of Tang".