The Western Liang (Xiliang) Kingdom is fictional, but their clothes and hairstyle look like a mix of nomadic and Central Asian cultures. And King Tömür's name is Mongol too.

In Chinese forums, there is a theory that the Danchi represent the Gokturks, and another theory that Western Liang is based off of Southern Liang (ruled by the Xianbei). Upon research, I found out that in the original novel, Xiaofeng is half Turkic and half Western Liang. Mystery solved.

I believe Qu Xiaofeng's story is inspired by Queen Tufa, whose personal name is unknown. She is ethnically Xianbei. She is a princess from the Southern Liang state, during the Sixteen Kingdoms period. She married Qifu Chipan (Prince Wenzhao) of the Western Qin state, and later promoted to Queen. Unlike Li Chengyin, he was not ethnically Han, but Xianbei.

Southern Liang bullied Western Qin, just like the Danchi did to Li Dynasty. Qifu Chipan did kill the Tufa family, but the ending is different. Eight years later, Queen Tufa and her brother Tufa Hutai plotted revenge. However, their younger sister (also married to Qifu Chipan) ratted them out, and they were executed in the end.