The ancestors of the Hui people come from the tribes Wei He and Wuhu. Moreover, the ancestors of the Hui people are the Huihe people, a branch of the Tiele tribe. Weihe lives in Tula and Hebei, and Wuhu lives in the Tianshan area. Afterwards, all Tiele tribes were unified, and Uighur gradually became the collective name for all Tiele tribes.
After the Uighurs helped the Tang Dynasty destroy Xue Yantuo in Mobei in the 20th year of Tang Zhenguan, the Tang Dynasty established the Hanhai Dudufu in the residence of the Uighurs, and granted the Uighur leader Tumidu the title of governor of the Hanhai Dudufu. In the Huihe area, transportation highways were built, inns were set up, and taxes were collected. Not only that, the Hanhai Dudu Mansion has a prefecture under the prefecture, and the prefecture has a governor. There are also officials such as Chang Shi and Sima. They are also served by leaders of the Uighur people. "The governor and governor are given Xuanhuang Fish Talisman, and gold is used as a text." ".