What is the relationship between Chiyou and Huangdi?

Chiyou has ethnic relations with Emperor Yan. "Biography of Chiyou" said: "Chiyou is surnamed Jiang and is also a descendant of Emperor Yan".

Yandi and Chiyou were both developed by Shennong, and both belonged to the Irrigation Union of the Ministry of Agriculture. The direct descendant of Shennong is called because of the great achievements of his ancestor Shennong in inventing thunder.

The ending of Chiyou:

We can roughly restore the history at that time. When Yan Di tribe was weak, Jiuli tribe flourished and expelled Yan Di. In desperation, Emperor Yan asked the Yellow Emperor for help, and then Emperor Yan and the Yellow Emperor formed an alliance to defeat Chiyou and kill him in the middle wing. After that, Emperor Yan established his son (or grandson) as the new Chiyou and ruled the original Jiuli tribe.