Well, it's hard to say for sure. The serpent might be based on some ancient folklore or a modern author's imagination. Maybe it combines elements from different sources to create a unique story.
I'm not sure exactly. It could be inspired by various myths or legends.