The protagonist, a modern migrant worker with a background in history, is transformed into the late Jin Dynasty emperor Shi Chonggui. On the eve of the country's subjugation when General Du Chongwei rebels, the Khitans move south, and Tokyo is about to fall, he is forced to take on the responsibility of saving a dying city and a declining regime.
He used AI to continuously deduce the "optimal solution", and successively rectified the court situation, raised food and defended the city, calmed the people and pacified the epidemic, and implemented the "Five Equilibrium Strategies". He also revised his judgment time and time again when refugees entered the city, rumors were suppressed, the plague spread, generals were at odds with each other, and street battles broke out.
However, every effort encountered deviations in execution, resistance from the people, and the inertia of the current situation, and was pushed back to the anchor point of historical facts by reality: Bianliang eventually fell, the Lady of Chu was killed, the protagonist Rouqi surrendered, and moved to the north of the Liao Dynasty. After the violent death of Yelu Deguang and the founding of the Han Dynasty by Liu Zhiyuan, history threw him back to a world that had long since changed beyond recognition.
The novel uses the fictional historical material "Records of the Capture of Bianjing" as the main thread, supplementing the third narrative of troubled times outside the protagonist's field of vision. It also uses this failed struggle of "rewriting the process and approaching the end" to interrogate the ideal country, the historical responsibilities of ordinary people, and the boundaries of cooperation between AI and humans.