He, a graduate student in the Department of History in the 21st century, woke up as a beggar in a ruined temple in East City, Chang'an during the Zhenguan Period. He was penniless and was being chased by bullies. Fortunately, I have a "knowledge encyclopedia system" in my mind, and my mind is full of "Sikuquanshu" and modern science. While other beggars only know how to beg and sell miserably, he can crush local literati with the words "Moonlight before bed", use fingerprints and distillation methods to solve strange cases and get promoted, and use economic principles to destroy the monopoly of aristocratic families. Just as he walked from the street to the court, he attracted the secret attention of the arrogant eldest princess Gu Qingli. The two people's identities were very different, but they were secretly pulling each other. But a bigger crisis awaits him, and the powerful families join forces to shake the country. He needs to use modern wisdom to break the situation, so that he can gain power and finally marry the empress.