Five years after the Anshi Rebellion was put down (about 766 AD), the national power of the Tang Dynasty was in decline: the separatist rule of vassal towns had become an unstoppable trend, and the Jiedu envoys supported their own troops and collected taxes; Tubo took advantage of the situation and invaded Hexi and Longyou, and Chang'an faced threats several times; the land was evenly distributed. The political system collapsed, land annexation was serious, and refugees were everywhere; in the court, the power of eunuchs was emerging, and undercurrents of party fighting were surging, making it difficult for poor people to get ahead; people's livelihood was in decline, food prices soared, handicrafts and commerce were in ruins, and only the ruins of the glory of the past were left.