In an ancient book, it is mentioned that she has been to "a virtuous woman in Kansai, a lady who protects the country." This lady Ma is called "Zhang" and her nickname. Judging from the fact that she is called "Zhen Lienv", Hu Sanniang is a similar figure, so she will be nicknamed by everyone.
In addition, Zhang Yiqing is also related to a woman's article, that is, the hair clasp. In Cao Xueqin's novel, it is mentioned that someone made a hair clasp called "Zhang", named after its head shaped like a snake spear. It can also be seen from here that Yizhangqing is indeed related to snakes.
But Hu Sanniang is a person with high martial arts. Although she looks good, she doesn't necessarily have the habit of dressing up. She usually wears a uniform, so her nickname should have nothing to do with the hair clasp. Moreover, it is obviously unnatural to give a woman a nickname with a hair clasp.
To sum up, I think Hu Sanniang's nickname should be taken by others because of her personality. Zhang refers to the kind of snake that is ten feet long in folklore. This kind of snake is very fierce, which is the characteristic of Hu Sanniang's martial arts and strong personality.