Intelligent substation secondary device connection diagram encoding algorithm based on binary tree

The invention relates to a diagram encoding algorithm, in particular to an intelligent substation secondary device connection diagram encoding algorithm based on a binary tree. By the adoption of the intelligent substation secondary device connection diagram encoding algorithm based on the binary tree, the storage space can be small, the query efficiency is high, the query efficiency can be improved, and the query demand for the connection diagram of multiple intelligent substation secondary devices is met. According to the technical scheme, the intelligent substation secondary device connection diagram encoding algorithm based on the binary tree comprises the following steps that firstly, according to the XML file structure of the intelligent substation secondary device connection diagram of the Visio format, hierarchical secondary device node information is extracted and is converted into an XML file tree; secondly, binary processing is conducted on the XML file tree; thirdly, the XML file tree obtained after binary processing is stored through a mixed list structure, and each node in the file tree is stored through a mixed structure of the binary tree or a ternary tree; finally, a mixed index model composed of a file type definition structure index and an XML file content index is established.