Substation configuration file analysis method and device, storage medium and computer equipment

By combining a hybrid parsing strategy with a dynamic semantic rule base, the problems of insufficient efficiency and accuracy in substation configuration file parsing are solved, efficient configuration updates and resource conservation are achieved, and accurate mapping with the IEC 61850 standard is ensured.

CN120688481APending Publication Date: 2025-09-23ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510922537.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

The existing substation configuration file parsing technology has the problems of low parsing efficiency and insufficient parsing accuracy. Especially when facing large-scale and complex SCD files, it cannot effectively support the IEC 61850 standard semantic rules, resulting in a semantic gap between the parsing results and the standard model.

Method used

A hybrid parsing strategy is adopted, combining key node identification with a DOM parser, selectively constructing a parsing subtree, generating semantic labels for logical nodes through a dynamic semantic rule base, and using semantic labels to compare change information, minimizing the changes sent to substation smart devices and avoiding the issuance of the entire configuration file.

Benefits of technology

It improves the parsing efficiency and accuracy of configuration files, reduces memory overhead, saves network transmission resources, and achieves accurate mapping with the IEC 61850 standard model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120688481A_ABST
    Figure CN120688481A_ABST
Patent Text Reader

Abstract

According to the substation configuration file analysis method and device, the storage medium and the computer equipment provided by the invention, each node in the configuration file is scanned, and the analysis sub-tree is selectively constructed through a hybrid analysis strategy combining key node identification and DOM sub-tree analysis, so that the memory overhead is reduced, and the analysis time is shortened. When the configuration file is scanned, logic nodes are extracted from all the analysis sub-trees according to the node information of all the analysis sub-trees, standardized semantic tags are automatically generated for the logic nodes through the dynamic semantic rule base, and therefore accurate mapping of the configuration data and the IEC 61850 standard model is achieved. And then comparing each logic node with the currently applied configuration file by using the semantic tag of each logic node, and accurately pushing the change information to the intelligent equipment of the transformer substation by adopting a minimum change issuing strategy, thereby improving the configuration updating efficiency. And the analysis efficiency of the configuration file is improved while the semantic accuracy is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electric power technology, and in particular to a method, device, storage medium, and computer equipment for parsing a substation configuration file. Background Art

[0002] With the rapid development of smart substations and the continuous improvement of their intelligence levels, the size and complexity of Station Configuration Description (SCD) files, the core carrier of substation configuration, have grown exponentially. Modern smart substation SCD files typically contain tens of thousands of lines of XML code, fully describing key configuration information such as all station IED devices, communication networks, logical nodes, and signal associations. However, current mainstream SCD file parsing technologies still rely on traditional XML processing methods, which expose significant performance bottlenecks and functional limitations when dealing with large and complex SCD files.

[0003] Currently, general-purpose XML parsers are primarily used to traverse SCD files layer by layer and extract nodes. While this can perform basic configuration information reading, the large size and complex structure of SCD files make parsing inefficient in practical applications. Furthermore, existing parsing technologies lack deep support for the semantic rules of the IEC 61850 standard, resulting in a semantic gap between the parsed results and the standard model. In summary, existing substation configuration file parsing technologies have significant limitations in terms of parsing efficiency and accuracy. Summary of the Invention

[0004] The purpose of this application is to solve at least one of the above technical deficiencies, especially the technical deficiencies in the prior art of substation configuration file parsing technology that have obvious limitations in parsing efficiency and accuracy.

[0005] In a first aspect, the present application provides a substation configuration file parsing method, the method comprising:

[0006] Obtain the configuration file to be sent to the substation smart devices;

[0007] Scan each node in the configuration file, identify key nodes in the configuration file, and parse the parsing subtree formed by each key node and its child nodes based on a tree structure parser to obtain node information corresponding to each parsing subtree;

[0008] After scanning the configuration file, extracting logical nodes from each parsing subtree according to the node information of each parsing subtree, and generating semantic labels corresponding to each logical node based on a preset dynamic semantic rule base;

[0009] Each logical node is compared with the logical node in the configuration file of the current application using the semantic tag of each logical node, the change information is determined, and the change information is sent to the substation intelligent device.

[0010] In one embodiment, identifying key nodes in the configuration file and parsing the parsing subtrees formed by each key node and its child nodes based on a tree structure parser to obtain node information corresponding to each parsing subtree includes:

[0011] For each node in the configuration file, query whether there is a rule containing the label corresponding to the node in the preset rule base. If so, calculate the weight score of the parsing subtree formed by the node and its child nodes;

[0012] If the weight score of the parse subtree formed by the node and its child nodes is greater than a preset threshold, the node is determined to be a key node;

[0013] After all key nodes in the configuration file are identified, a tree structure parser is loaded, and the tree structure parser is used to load the parsing subtree formed by each key node and its child nodes into the memory and store them in the form of a tree structure to obtain the node information corresponding to each parsing subtree.

[0014] In one embodiment, calculating the weight score of the parse subtree formed by the node and its child nodes includes:

[0015] Get the level of the node in the configuration file and the number of child nodes of the node;

[0016] Calculate the subnode score of the node according to the global maximum number of subnodes of the configuration file and the number of subnodes of the node;

[0017] Calculate a depth score of the node according to the maximum tree depth of the configuration file and the level of the node in the configuration file;

[0018] Based on the child node scores and the depth scores, a weight score of a parse subtree formed by the node and its child nodes is determined.

[0019] In one embodiment, extracting logical nodes from each parsing subtree according to the node information of each parsing subtree and generating a semantic label corresponding to each logical node based on a preset dynamic semantic rule base includes:

[0020] Determine the function module nodes in each parsing subtree according to the node information of each parsing subtree, and extract the function module nodes in each parsing subtree as logic nodes;

[0021] Determine a preset dynamic semantic rule base, and for each logical node, query the dynamic semantic rule base to see whether there is a label corresponding to the name of the logical node; if so, determine the queried label as the semantic label of the logical node;

[0022] If not, query the dynamic semantic rule library based on the preset version mapping relationship to see whether there is a synonymous label corresponding to the name of the logical node; if so, determine the queried synonymous label as the semantic label of the logical node;

[0023] If it does not exist, the name of the logical node is respectively subjected to comprehensive similarity calculation with each label in the dynamic semantic rule base, and the label with the highest comprehensive similarity is selected as the semantic label of the logical node.

[0024] In one embodiment, comparing each logical node with a logical node in a configuration file of a current application using a semantic tag of each logical node to determine the change information includes:

[0025] For each logical node, query the logical node corresponding to the logical node in the current application configuration file based on the semantic tag of the logical node. If the logical node exists, compare the logical node with the query logical node. If they are inconsistent, generate node change information;

[0026] If it does not exist, generate node change information based on the logical node and its semantic label;

[0027] After the query and comparison of each logical node is completed, the change information of the configuration file is generated according to the obtained node change information.

[0028] In one embodiment, sending the change information to the substation smart device includes:

[0029] Determining the urgency of the change information according to the devices affected by the change information, and assigning the change information to a queue of corresponding priority based on the urgency;

[0030] The optimized MMS protocol is used to read information from queues of various priorities and transmit it to the substation smart device.

[0031] In one embodiment, the method further comprises:

[0032] When the change information is sent to the substation smart device, a target configuration file is generated according to the change information and the currently applied configuration file;

[0033] The target configuration file is subjected to syntax compliance check, signal mapping integrity verification and communication parameter conflict detection. When the target configuration file passes the syntax compliance check, signal mapping integrity verification and communication parameter conflict detection, the target configuration file is applied to the substation smart device.

[0034] In a second aspect, the present application provides a substation configuration file parsing device, the device comprising:

[0035] The file acquisition module is used to obtain the configuration files to be sent to the substation smart devices;

[0036] A node parsing module is used to scan each node in the configuration file, identify key nodes in the configuration file, and parse the parsing subtree formed by each key node and its child nodes based on the tree structure parser to obtain node information corresponding to each parsing subtree;

[0037] A node extraction module is used to extract logical nodes from each parsing subtree according to the node information of each parsing subtree after scanning the configuration file, and generate a semantic label corresponding to each logical node based on a preset dynamic semantic rule library;

[0038] The change determination module is used to compare each logical node with the logical node in the current application configuration file using the semantic label of each logical node, determine the change information, and send the change information to the substation intelligent device.

[0039] In a third aspect, the present application provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the substation configuration file parsing method described in any of the above embodiments.

[0040] In a fourth aspect, the present application provides a computer device, comprising: one or more processors, and a memory;

[0041] The memory stores computer-readable instructions, and when the one or more processors execute the computer-readable instructions, the steps of the substation configuration file parsing method described in any one of the above embodiments are performed.

[0042] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0043] The substation configuration file parsing method, device, storage medium and computer equipment provided in the present application obtain the configuration file to be sent to the substation intelligent device, then scan each node in the configuration file, and after identifying the key nodes in the configuration file, parse the parsing subtree formed by each key node and its child nodes based on the DOM parser to obtain the node information corresponding to each parsing subtree. Through a hybrid parsing strategy that combines key node identification with DOM subtree parsing, a parsing subtree is selectively constructed to reduce memory overhead, shorten parsing time, and improve configuration file processing efficiency. When the configuration file is scanned, logical nodes are extracted from each parsing subtree according to the node information of each parsing subtree, and semantic labels corresponding to each logical node are generated based on a preset dynamic semantic rule library. The dynamic semantic rule library introduced in this process automatically generates standardized semantic labels for logical nodes, thereby achieving accurate mapping of configuration data with the IEC 61850 standard model. Each logical node is then compared with the logical nodes in the currently applied configuration file using its semantic tag. The modified information is then sent to the substation's intelligent devices, rather than sending the entire configuration file to them. This strategy of minimizing changes not only improves configuration update efficiency but also effectively conserves network transmission resources. Based on this technical solution, this application improves the efficiency of configuration file parsing while ensuring semantic accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0045] Figure 1 A flowchart of a substation configuration file parsing method provided in an embodiment of the present application;

[0046] Figure 2 A schematic diagram of a process for identifying key nodes in a configuration file and parsing a parsing subtree formed by each key node and its child nodes based on a tree structure parser provided in an embodiment of the present application;

[0047] Figure 3 A flowchart illustrating the process of extracting logical nodes from each parsing subtree according to the node information of each parsing subtree and generating a semantic label corresponding to each logical node based on a preset dynamic semantic rule base provided in an embodiment of the present application;

[0048] Figure 4A schematic diagram of the structure of a substation configuration file parsing device provided in an embodiment of the present application;

[0049] Figure 5 This is a diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0051] like Figure 1 As shown, the present application provides a substation configuration file parsing method, the method comprising:

[0052] S101: Obtain a configuration file to be sent to a substation smart device.

[0053] The configuration file refers to the Station Configuration Description (SCD) file, an XML-formatted file that contains the configuration of the primary system, secondary devices, and communication network. During commissioning, the SCD file is used to build a full station model and describe the relationships between all substation intelligent devices. Substation intelligent devices are the core secondary devices in the substation automation system and are also called intelligent electronic devices.

[0054] In this step, when the power station operator needs to update the substation's protection logic or adjust measurement parameters, they can first determine the adjusted or updated configuration file and upload it to the computer device. After the computer device obtains the configuration file, it executes the subsequent steps based on the configuration file.

[0055] S102: Scan each node in the configuration file, identify key nodes in the configuration file, and parse the parsing subtree formed by each key node and its child nodes based on a tree structure parser to obtain node information corresponding to each parsing subtree.

[0056] Among them, key nodes refer to configuration elements that have a significant impact on the operation of the substation system, including but not limited to the definition of IED (Intelligent Electronic Device, intelligent electronic device) ( <ied>)、Communication parameter configuration( <communication>), logical node instance ( <ln>) and signal correlation ( <inputs>) and other core configuration items. Node information refers to structured data extracted from key nodes and their child nodes, including key configuration parameters such as device identification, communication addresses, and signal mapping relationships. A tree structure parser is a parsing tool that parses documents in a tree-like format and stores them in memory. In one example, the tree structure parser can use a DOM parser, which is an XML processing tool based on the Document Object Model.

[0057] In this step, a general XML parser can be used to quickly scan the entire configuration file. When a predefined key node (such as <ied>When a start tag is encountered, the system immediately switches to tree parsing mode, loading the node and all its child nodes as independent DOM subtrees, known as parsing subtrees. XPath queries are then used to extract detailed configuration information from the parsing subtrees, obtaining the node information corresponding to each parsing subtree. This hybrid parsing strategy, which generates subtrees only for key nodes and their child nodes, avoids the memory pressure of fully loading large files during pure tree parsing while overcoming the inability to randomly access nodes during pure streaming parsing. This balance is achieved between parsing efficiency and functional flexibility.

[0058] In other words, non-critical nodes can be directly extracted through event processing, such as SAX parser, to avoid memory usage, while critical nodes can be extracted using tree structure parsers such as DOM parser to facilitate access and modification.

[0059] In one example, the XML parser may use a SAX parser, which is not specifically limited in this application.

[0060] S103: After scanning the configuration file, extract the logical nodes from each parsing subtree according to the node information of each parsing subtree, and generate a semantic label corresponding to each logical node based on a preset dynamic semantic rule library.

[0061] Logical nodes are used to describe the abstract concept of substation automation equipment functionality. They represent a specific function or data set of the equipment, such as measurement, control, or protection. The dynamic semantic rule base is a pre-defined set of rules that includes mappings between logical nodes and semantic labels, as well as rules for adapting and adjusting these mappings based on context or version changes. Semantic labels are standardized labels used to describe the functions and attributes of logical nodes.

[0062] In this step, after scanning the configuration file, the logical nodes in each parsing subtree can be identified from each parsing subtree. Then, based on the preset dynamic semantic rule base, a corresponding semantic label is generated for each identified logical node. This ensures the interoperability and data consistency between different devices or systems. The generated semantic labels are standardized semantic labels. By using standardized semantic labels, the communication and data exchange between different devices can be simplified, and the maintenance and upgrade of the system can also be facilitated. In addition, the dynamic semantic rule base can adapt to possible version differences and device diversity, ensuring that even when facing devices of different versions or different manufacturers, the computer equipment can correctly identify and process logical nodes.

[0063] Furthermore, in order to allow the dynamic semantic rule base to include more mapping relationships and adapt to more context changes, the dynamic semantic rule base can be regularly updated and maintained to adapt to new device types or new IEC61850 standard versions.

[0064] For example, consider two circuit breaker devices: one from manufacturer A, which complies with the IEC 61850 Ed.1 standard and uses the logical node XCBR; the other from manufacturer B, which complies with the IEC 61850 Ed.2 standard and uses the logical node CBR. Although these two logical nodes have different names, they both represent the function of controlling and monitoring the circuit breaker status. To achieve interoperability between devices from different manufacturers, the configuration files of the two devices are first parsed to identify their respective logical nodes. Next, a dynamic semantic rule base is used, which contains the mapping relationship between logical nodes and standardized semantic labels in different versions of the IEC 61850 standard. For manufacturer A's XCBR, the dynamic semantic rule base maps it to the standard semantic label CircuitBreaker. For manufacturer B's CBR, the dynamic semantic rule base maps it to the same semantic label CircuitBreaker. This achieves adaptability to different versions of the standard and compatibility with devices from different manufacturers.

[0065] S104: Using the semantic labels of the respective logical nodes, the respective logical nodes are compared with the logical nodes in the currently applied configuration file, change information is determined, and the change information is sent to the substation intelligent device.

[0066] The change information refers to the modification of the existing configuration in the configuration file of the substation automation system due to reasons such as system upgrade, maintenance or optimization.

[0067] In this step, the current application configuration file is read, and then the logical nodes and semantic tags in the two configuration files are compared to identify the new parts that need to be changed. This change information is then sent to the substation smart device.

[0068] For example, suppose a protection device in a substation needs to update its protection logic to adapt to changes in the grid structure. The new configuration file includes a new logical node, PDIF2, representing the updated protection distance function. The configuration management system compares the old and new configuration files, identifies the change in logical node PDIF2, and then sends this change information to the protection device in the substation, instructing it to update its internal logic.

[0069] In the above embodiment, a configuration file to be distributed to a substation smart device is obtained. Each node in the configuration file is then scanned. After identifying key nodes in the configuration file, the parse subtree formed by each key node and its child nodes is parsed using a DOM parser to obtain node information corresponding to each parse subtree. A hybrid parsing strategy combining key node identification with DOM subtree parsing selectively constructs parse subtrees to reduce memory overhead, shorten parsing time, and improve configuration file processing efficiency. After scanning the configuration file, logical nodes are extracted from each parse subtree based on the node information within each parse subtree, and semantic labels corresponding to each logical node are generated based on a preset dynamic semantic rule library. The dynamic semantic rule library introduced in this process automatically generates standardized semantic labels for the logical nodes, thereby achieving a precise mapping of the configuration data to the IEC 61850 standard model. The semantic labels of each logical node are then used to compare each logical node with the logical nodes in the currently applied configuration file. Change information is then distributed to the substation smart device, rather than distributing the entire configuration file to the device. This strategy of minimizing changes in distribution not only improves configuration update efficiency but also effectively conserves network transmission resources. Based on the above technical solution, this application improves the parsing efficiency of the configuration file while ensuring semantic accuracy.

[0070] like Figure 2 As shown, in one embodiment, key nodes in a configuration file are identified, and a parsing subtree formed by each key node and its child nodes is parsed based on a tree structure parser to obtain node information corresponding to each parsing subtree, including:

[0071] S201: For each node in the configuration file, query whether there is a rule containing a label corresponding to the node in a preset rule library.

[0072] S202: If it exists, calculate the weight score of the parsing subtree formed by the node and its child nodes.

[0073] S203: Determine whether the weight score of the parsing subtree formed by the node and its child nodes is greater than a preset threshold.

[0074] S204: If the weight score of the parsing subtree formed by the node and its child nodes is greater than a preset threshold, the node is determined as a key node.

[0075] S205: After all key nodes in the configuration file are identified, a tree structure parser is loaded, and the tree structure parser is used to load the parsing subtree formed by each key node and its child nodes into the memory and store them in the form of a tree structure to obtain the node information corresponding to each parsing subtree.

[0076] The rule base is used to record labels that are most likely to be key nodes. The preset threshold is an empirical value and can be set to 0.6 in this application. The weight score is used to measure the likelihood of including important device parameters.

[0077] In this embodiment, for each node in the configuration file, first determine whether the node is a node that is most likely to be a key node based on a preset rule base, that is, query whether there is a rule containing a label corresponding to the node in the rule base. If not, no processing is performed. If so, the weight score of the parsing subtree formed by the node and its child nodes is calculated, and the node is determined to be a key node when the weight score is greater than a preset threshold. When the above steps are performed for each node, all the identified key nodes are determined, and then connected to the DOM parser, and the DOM parser is used to load the parsing subtree formed by each key node and its child nodes into the memory in the form of a tree structure to facilitate random access reading, providing a basis for subsequent downstream tasks such as configuration analysis and change detection.

[0078] Furthermore, when using a DOM parser to load the parsed subtree formed by each key node and its child nodes into memory and store it in a tree structure, the starting position of the load can be determined based on the offset recorded when the key node is identified, thereby avoiding repeated traversal. The offset refers to the byte starting position of the key node in the configuration file.

[0079] Specifically, by loading the parsed subtree formed by each key node and its child nodes into memory and storing it in a tree structure, computer devices can process configuration data more intuitively and efficiently. This tree-structured storage method makes the relationship between nodes clear at a glance, facilitating operations such as traversal, search, and modification. For example, if the parameters of a certain logical node need to be updated, you can directly locate the node and modify its child nodes accordingly. In addition, this structured data storage method also facilitates the comparison and difference analysis of configuration files, allowing for quick identification of the parts that need to be changed.

[0080] It is understandable that tree-structured storage allows for faster access and modification of tree-structured results. Considering the memory overhead and the need to adjust the logical nodes and their sub-nodes, this solution only parses and loads the logical nodes and their sub-nodes in the form of a tree structure. This maintains parsing efficiency while avoiding a significant increase in memory overhead.

[0081] In one embodiment, calculating the weight score of the parse subtree formed by the node and its child nodes includes:

[0082] S1: Get the node's level in the configuration file and the number of its child nodes.

[0083] S2: Calculate the subnode score of the node based on the global maximum number of subnodes in the configuration file and the number of subnodes of the node.

[0084] S3: Calculate the depth score of the node based on the maximum tree depth of the configuration file and the level of the node in the configuration file.

[0085] S4: Based on the child node scores and the depth scores, determine the weight scores of the parse subtree formed by the node and its child nodes.

[0086] The global maximum number of child nodes refers to the number of child nodes corresponding to the node with the most child nodes in the configuration file.

[0087] In this embodiment, by obtaining the node's level, number of child nodes, and number of direct child nodes in the configuration file, and combining the node's maximum tree depth to calculate the node's child node score and depth score, a weight score is determined for the parsed subtree formed by each node and its child nodes. This evaluates the importance and complexity of the node. First, a node with more child nodes may assume more functions and responsibilities, so the child node score reflects the functional richness and potential influence of a node in the configuration file. Secondly, a node at a shallower level is usually a backbone device node, and the depth score reflects the node's position in the configuration file hierarchy. The weight score determined by combining these two scores can help computer equipment identify nodes that require more attention and resources during configuration management and changes. This ensures that key nodes are properly managed and maintained, improving the performance and reliability of the entire substation automation system.

[0088] In one example, the expression for calculating the weight score can be expressed as follows:

[0089]

[0090] Where, Indicates the weight score of the node node, 、 represents the weight coefficient, Indicates the number of direct child nodes, Indicates the number of child nodes, Indicates the node's level in the configuration file. Indicates the maximum tree depth of the configuration file. / represents the node score, / represents the depth score. In one embodiment, It can be set to 0.7. Can be set to 0.3.

[0091] like Figure 3 As shown, in one embodiment, logical nodes are extracted from each parsing subtree according to the node information of each parsing subtree, and semantic labels corresponding to each logical node are generated based on a preset dynamic semantic rule base, including:

[0092] S301: Determine the function module nodes in each parsing subtree according to the node information of each parsing subtree, and extract the function module nodes in each parsing subtree as logic nodes.

[0093] S302: Determine a preset dynamic semantic rule base.

[0094] S303: For each logical node, query whether there is a label corresponding to the name of the logical node in the dynamic semantic rule base.

[0095] S304: If it exists, the queried label is determined as the semantic label of the logical node.

[0096] S305: If not, query the dynamic semantic rule library based on the preset version mapping relationship to see whether there is a synonymous label corresponding to the name of the logical node.

[0097] S306: If so, the retrieved synonymous tag is determined as the semantic tag of the logical node.

[0098] S307: If it does not exist, then perform comprehensive similarity calculation on the name of the logic node and each label in the dynamic semantic rule library, and select the label with the highest comprehensive similarity as the semantic label of the logic node.

[0099] Among them, comprehensive similarity refers to a similarity index that combines name similarity, structural similarity, and context weight similarity.

[0100] In this embodiment, the node label can be determined through the node information, such as <ln>, in order to determine whether the node is a logical node. After extracting the logical nodes, for each logical node, it can be determined based on the dynamic semantic rule base whether there is a label corresponding to the name of the logical node. Here, the label refers to the standardized semantic label of the node. If it exists, it is used as the semantic label of the logical node. If not, it can be further determined based on the version mapping relationship and the dynamic semantic rule base whether there is a synonymous label. If so, the synonymous label is used as the semantic label of the logical node. If not, a comprehensive similarity calculation can be further performed to select the label with the highest comprehensive similarity as the semantic label of the logical node. This multi-level label determination method can ensure the accurate mapping between the logical node and the IEC 61850 standard model, thereby ensuring the accuracy of the configuration.

[0101] In an example, the expressions involved in the version mapping relationship can be expressed as follows:

[0102]

[0103] Where, represents the standard mapping conversion function, Represents a standard logical node that complies with IEC 61850 Ed.2.1, Represents the version difference compensation matrix.

[0104] In an example, the calculation process of the comprehensive similarity can be expressed as follows:

[0105] (1) Calculation expression of name similarity:

[0106]

[0107] Where, Indicates the name similarity between string A and string B, represents the Levenshtein edit distance.

[0108] (2) Calculation expression of structural similarity:

[0109]

[0110] Where, Indicates the structural similarity between parsing subtree A and parsing subtree B, Represents a parsed subtree A collection of data objects, Represents a parsed subtree A collection of data objects.

[0111] (3) Calculation expression of context weight similarity:

[0112]

[0113] Where, represents the context weight similarity, Represents a parsed subtree The i-th context feature of Represents a parsed subtree The i-th context feature of represents the weight of the i-th context feature, and k represents the total number of context features.

[0114] In some embodiments, improvements can be made to performance optimization, semantic accuracy, and dynamic updates to improve the efficiency and accuracy of semantic tag matching. For example, in terms of performance optimization, a matching efficiency model can be set to constrain the total time consumption. In terms of semantic accuracy, confusion matrix evaluation, accuracy formulas, and confidence threshold models can be used to ensure semantic accuracy. In terms of dynamic updates, the dynamic semantic rule base can be updated using incremental updates, and a similarity decay function can be set to address version drift.

[0115] In one embodiment, the semantic tags of each logical node are used to compare each logical node with the logical nodes in the configuration file of the current application to determine the change information, including:

[0116] S1: For each logical node, query the logical node corresponding to the logical node in the current application configuration file based on the semantic label of the logical node. If the logical node exists, compare the logical node with the queried logical node. If they are inconsistent, generate node change information.

[0117] S2: If it does not exist, generate node change information based on the logical node and its semantic label.

[0118] S3: After the query and comparison of each logical node is completed, the configuration file change information is generated according to the obtained node change information.

[0119] In this embodiment, each logical node is compared with the logical nodes in the currently applied configuration file to determine the newly added or modified logical nodes, so that the change information is subsequently generated and sent to the substation intelligent device.

[0120] In one embodiment, sending the change information to the substation smart device includes:

[0121] S1: Determine the urgency of the change information based on the devices affected by the change information, and assign the change information to a queue of corresponding priority based on the urgency.

[0122] S2: Use the optimized MMS protocol to read information from queues of each priority level and transmit it to the substation smart device.

[0123] In this embodiment, the urgency of a change is determined based on the devices it affects. This allows for flexible handling of individual change messages even when resources are limited. For example, protection-related intelligent electronic devices can be assigned a higher priority, while wave recording-related intelligent electronic devices can be assigned a lower priority. The change information is then transmitted using an optimized MMS protocol. This protocol uses CBOR instead of XML encoding and implements session multiplexing, thereby compressing MMS messages and reducing the number of TCP handshakes, improving transmission efficiency. Furthermore, a two-way verification mechanism can be employed when establishing a connection.

[0124] In one example, the expression for determining the priority of the queue to be assigned is as follows:

[0125]

[0126] Where, Indicates priority, 、 and represents the weight coefficient, It can be set to 0.6. It can be set to 0.3, Can be set to 0.1, Indicates the remaining time until the planned power outage window. Indicates the weight of the intelligent electronic device in the protection chain, Indicates the maximum possible impact weight of the intelligent electronic device in the system, Indicates the incremental data size (in bytes) of the configuration change of this intelligent electronic device. Indicates the maximum value of the incremental data among all changes to be delivered.

[0127] In one embodiment, the substation configuration file parsing method further includes:

[0128] S1: When the change information is sent to the substation smart device, the target configuration file is generated based on the change information and the currently applied configuration file.

[0129] S2: Perform syntax compliance check, signal mapping integrity verification, and communication parameter conflict detection on the target configuration file. If the target configuration file passes the syntax compliance check, signal mapping integrity verification, and communication parameter conflict detection, the target configuration file is applied to the substation smart device.

[0130] In this step, the target configuration file can be checked for syntax compliance using a syntax compliance metric. Regarding signal mapping integrity, a signal flow graph can be constructed and key nodes identified. Based on these key nodes, the shortest path from the signal source to the target is determined. The integrity metric model and path coverage formula are then used to determine whether the shortest path achieves full coverage. Regarding communication parameter conflicts, communication parameter conflict detection can be performed based on a preset conflict energy model. These multiple checks ensure the reliability and validity of the target configuration file.

[0131] In one example, the grammatical compliance metric formula can be expressed as follows:

[0132]

[0133] Where, Indicates the compliance rate of the profile, Indicates the total number of rules in the grammar rule base, Indicates the number of rule violations.

[0134] The integrity measurement model can be expressed as follows:

[0135]

[0136] Where, Indicates the degree of completeness, | | indicates the number of signal connections required by the design, | | indicates the actual number of signal connections. | | represents the number of fully connected nodes, express, 、 Represents the weight coefficient, which can be Set to 0.7, Set to 0.3.

[0137] The path coverage formula can be expressed as follows:

[0138]

[0139] Where, represents the critical path coverage, represents the total number of critical paths, Represents the i-th critical signal path, when When covered, =1, when When not covered, =0.

[0140] The conflict energy model can be expressed as follows:

[0141]

[0142] in:

[0143]

[0144]

[0145] Where, Represents conflict energy, Indicates the weight of the device's impact on the conflict. represents the communication parameters of device i, represents the communication parameters of device j, represents the MAC address of the i-th device, represents the MAC address of the jth device, Indicates the APPID of the i-th device. Indicates the APPID of the jth device. Indicates the VLAN ID of the i-th device, Indicates the VLAN ID of the jth device, Indicates the port identifier of the i-th device. Indicates the port identifier of the jth device. Indicates the topological distance from device i to j.

[0146] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0147] The substation configuration file parsing device provided in an embodiment of the present application is described below. The substation configuration file parsing device described below and the substation configuration file parsing method described above can refer to each other.

[0148] like Figure 4 As shown, the present application provides a substation configuration file parsing device 400, the device comprising:

[0149] The file acquisition module 401 is used to acquire the configuration file to be sent to the substation smart device;

[0150] The node parsing module 402 is used to scan each node in the configuration file, identify key nodes in the configuration file, and parse the parsing subtree formed by each key node and its child nodes based on the tree structure parser to obtain node information corresponding to each parsing subtree;

[0151] The node extraction module 403 is used to extract logical nodes from each parsing subtree according to the node information of each parsing subtree after scanning the configuration file, and generate a semantic label corresponding to each logical node based on a preset dynamic semantic rule library;

[0152] The change determination module 404 is configured to compare each logical node with the logical nodes in the currently applied configuration file using the semantic tags of each logical node, determine change information, and send the change information to the substation smart device.

[0153] In the above embodiment, a configuration file to be distributed to a substation smart device is obtained. Each node in the configuration file is then scanned. After identifying key nodes in the configuration file, the parse subtree formed by each key node and its child nodes is parsed using a DOM parser to obtain node information corresponding to each parse subtree. A hybrid parsing strategy combining key node identification with DOM subtree parsing selectively constructs parse subtrees to reduce memory overhead, shorten parsing time, and improve configuration file processing efficiency. After scanning the configuration file, logical nodes are extracted from each parse subtree based on the node information within each parse subtree, and semantic labels corresponding to each logical node are generated based on a preset dynamic semantic rule library. The dynamic semantic rule library introduced in this process automatically generates standardized semantic labels for the logical nodes, thereby achieving a precise mapping of the configuration data to the IEC 61850 standard model. The semantic labels of each logical node are then used to compare each logical node with the logical nodes in the currently applied configuration file. Change information is then distributed to the substation smart device, rather than distributing the entire configuration file to the device. This strategy of minimizing changes in distribution not only improves configuration update efficiency but also effectively conserves network transmission resources. Based on the above technical solution, this application improves the parsing efficiency of the configuration file while ensuring semantic accuracy.

[0154] In one embodiment, the node parsing module includes:

[0155] The weight calculation submodule is used to query the preset rule base for each node in the configuration file to see if there is a rule containing the label corresponding to the node. If so, it calculates the weight score of the parsing subtree formed by the node and its child nodes;

[0156] A node determination submodule is used to determine a node as a key node if the weight score of the parse subtree formed by the node and its child nodes is greater than a preset threshold;

[0157] The node parsing submodule is used to load the tree structure parser after identifying all the key nodes in the configuration file, and use the tree structure parser to load the parsing subtree formed by each key node and its child nodes into the memory and store it in the form of a tree structure to obtain the node information corresponding to each parsing subtree.

[0158] In one embodiment, the weight calculation submodule includes:

[0159] An information acquisition unit, used to obtain the level of the node in the configuration file and the number of child nodes of the node;

[0160] A first calculation unit is configured to calculate a subnode score of the node according to a global maximum number of subnodes in the configuration file and the number of subnodes of the node;

[0161] a second calculation unit, configured to calculate a depth score of the node according to a maximum tree depth of the configuration file and a level of the node in the configuration file;

[0162] The weight determination unit is used to determine the weight score of the parsing subtree formed by the node and its child nodes based on the child node score and the depth score.

[0163] In one embodiment, the node extraction module includes:

[0164] A node extraction submodule is used to determine the function module nodes in each parsing subtree according to the node information of each parsing subtree, and extract the function module nodes in each parsing subtree as logic nodes;

[0165] A first query submodule is configured to determine a preset dynamic semantic rule base, and for each logical node, query the dynamic semantic rule base to determine whether there is a label corresponding to the name of the logical node; if so, determine the queried label as the semantic label of the logical node;

[0166] A second query submodule is configured to query the dynamic semantic rule library based on a preset version mapping relationship whether there is a synonymous label corresponding to the name of the logical node if no synonymous label exists; if so, determine the queried synonymous label as the semantic label of the logical node;

[0167] The calculation submodule is used to calculate the comprehensive similarity between the name of the logical node and each label in the dynamic semantic rule library if it does not exist, and select the label with the highest comprehensive similarity as the semantic label of the logical node.

[0168] In one embodiment, the change determination module includes:

[0169] A first generation submodule is configured to query, for each logical node, the corresponding logical node in the configuration file of the current application based on the semantic tag of the logical node, and if the logical node exists, compare the logical node with the query logical node, and if they are inconsistent, generate node change information;

[0170] The second generating submodule is used to generate node change information according to the logical node and its semantic label if it does not exist;

[0171] The information generation submodule is used to generate configuration file change information based on the obtained node change information after completing the query and comparison of each logical node.

[0172] In one embodiment, the change determination module includes:

[0173] A priority determination submodule is used to determine the urgency of the change information based on the devices affected by the change information, and to assign the change information to a queue of corresponding priority based on the urgency;

[0174] The information transmission submodule is used to read information from queues of various priorities and transmit it to the substation intelligent devices using the optimized MMS protocol.

[0175] In one embodiment, the substation configuration file parsing device further includes:

[0176] The file generation module is used to generate a target configuration file based on the change information and the currently applied configuration file when the change information is sent to the substation intelligent device;

[0177] The file checking module is used to perform syntax compliance check, signal mapping integrity verification and communication parameter conflict detection on the target configuration file. When the target configuration file passes the syntax compliance check, signal mapping integrity verification and communication parameter conflict detection, the target configuration file is applied to the substation intelligent device.

[0178] The division of the various modules in the above-described substation configuration file parsing device is for illustrative purposes only. In other embodiments, the substation configuration file parsing device can be divided into different modules as needed to perform all or part of the functions of the above-described substation configuration file parsing device. Each module in the above-described substation configuration file parsing device can be implemented in whole or in part through software, hardware, or a combination thereof. Each of the above-described modules can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.

[0179] In one embodiment, the present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the substation configuration file parsing method as described in any of the above embodiments.

[0180] In one embodiment, the present application also provides a computer device having computer-readable instructions stored therein. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the substation configuration file parsing method as described in any of the above embodiments.

[0181] Schematically, as Figure 5 As shown, Figure 5 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. The computer device 500 can be provided as a server. Figure 5 Computer device 500 includes a processing component 502, which further includes one or more processors, and memory resources represented by memory 501 for storing instructions executable by processing component 502, such as applications. The applications stored in memory 501 may include one or more modules, each corresponding to a set of instructions. Furthermore, processing component 502 is configured to execute the instructions to perform the substation configuration file parsing method according to any of the above-described embodiments.

[0182] The computer device 500 may further include a power supply component 503 configured to perform power management of the computer device 500, a wired or wireless network interface 504 configured to connect the computer device 500 to a network, and an input / output (I / O) interface 505. The computer device 500 may operate based on an operating system stored in the memory 501, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or the like.

[0183] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0184] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of further restrictions, the elements defined by the sentence "comprise a..." do not exclude the presence of other identical elements in the process, method, article or equipment comprising the elements. Herein, the singular forms "one", "an" and "said / the" may also include plural forms unless the context clearly indicates otherwise. It should also be understood that the terms "include / comprise" or "have" etc. specify the existence of stated features, wholes, steps, operations, components, parts or combinations thereof, but do not exclude the possibility of the existence or addition of one or more other features, wholes, steps, operations, components, parts or combinations thereof. At the same time, the term "and / or" used in this specification includes any and all combinations of the relevant listed items.

[0185] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referenced to each other.

[0186] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.< / ln> < / ied> < / inputs> < / ln> < / communication> < / ied>

Claims

1. A method for parsing a substation configuration file, characterized in that: The method comprises: Obtain the configuration file to be sent to the substation smart devices; Scan each node in the configuration file, identify key nodes in the configuration file, and parse the parsing subtree formed by each key node and its child nodes based on a tree structure parser to obtain node information corresponding to each parsing subtree; After scanning the configuration file, extracting logical nodes from each parsing subtree according to the node information of each parsing subtree, and generating semantic labels corresponding to each logical node based on a preset dynamic semantic rule base; Each logical node is compared with the logical node in the configuration file of the current application using the semantic tag of each logical node, the change information is determined, and the change information is sent to the substation intelligent device.

2. The substation configuration file parsing method according to claim 1, characterized in that: The identifying of key nodes in the configuration file and parsing the parsing subtree formed by each key node and its child nodes based on a tree structure parser to obtain node information corresponding to each parsing subtree includes: For each node in the configuration file, query whether there is a rule containing the label corresponding to the node in the preset rule base. If so, calculate the weight score of the parsing subtree formed by the node and its child nodes; If the weight score of the parse subtree formed by the node and its child nodes is greater than a preset threshold, the node is determined to be a key node; After all key nodes in the configuration file are identified, a tree structure parser is loaded, and the tree structure parser is used to load the parsing subtree formed by each key node and its child nodes into the memory and store them in the form of a tree structure to obtain the node information corresponding to each parsing subtree.

3. The substation configuration file parsing method according to claim 2, characterized in that: Calculating the weight score of the parse subtree formed by the node and its child nodes includes: Get the level of the node in the configuration file and the number of child nodes of the node; Calculate the subnode score of the node according to the global maximum number of subnodes of the configuration file and the number of subnodes of the node; Calculate a depth score of the node according to the maximum tree depth of the configuration file and the level of the node in the configuration file; Based on the child node scores and the depth scores, a weight score of a parse subtree formed by the node and its child nodes is determined.

4. The substation configuration file parsing method according to claim 1, characterized in that: The extracting of logical nodes from each parsing subtree according to the node information of each parsing subtree and generating a semantic label corresponding to each logical node based on a preset dynamic semantic rule base includes: Determine the function module nodes in each parsing subtree according to the node information of each parsing subtree, and extract the function module nodes in each parsing subtree as logic nodes; Determine a preset dynamic semantic rule base, and for each logical node, query the dynamic semantic rule base to see whether there is a label corresponding to the name of the logical node; if so, determine the queried label as the semantic label of the logical node; If not, query the dynamic semantic rule library based on the preset version mapping relationship to see whether there is a synonymous label corresponding to the name of the logical node; if so, determine the queried synonymous label as the semantic label of the logical node; If it does not exist, the name of the logical node is respectively subjected to comprehensive similarity calculation with each label in the dynamic semantic rule base, and the label with the highest comprehensive similarity is selected as the semantic label of the logical node.

5. The substation configuration file parsing method according to claim 1, characterized in that: The step of comparing each logical node with the logical nodes in the configuration file of the current application using the semantic tags of each logical node to determine the change information includes: For each logical node, query the logical node corresponding to the logical node in the current application configuration file based on the semantic tag of the logical node. If the logical node exists, compare the logical node with the query logical node. If they are inconsistent, generate node change information; If it does not exist, generate node change information based on the logical node and its semantic label; After the query and comparison of each logical node is completed, the change information of the configuration file is generated according to the obtained node change information.

6. The substation configuration file parsing method according to claim 1, characterized in that: The sending of the change information to the substation smart device includes: Determining the urgency of the change information according to the devices affected by the change information, and assigning the change information to a queue of corresponding priority based on the urgency; The optimized MMS protocol is used to read information from queues of various priorities and transmit it to the substation smart device.

7. The substation configuration file parsing method according to any one of claims 1 to 6, characterized in that: The method further comprises: When the change information is sent to the substation smart device, a target configuration file is generated according to the change information and the currently applied configuration file; The target configuration file is subjected to syntax compliance check, signal mapping integrity verification and communication parameter conflict detection. When the target configuration file passes the syntax compliance check, signal mapping integrity verification and communication parameter conflict detection, the target configuration file is applied to the substation smart device.

8. A substation configuration file parsing device, characterized in that: The device comprises: The file acquisition module is used to obtain the configuration files to be sent to the substation smart devices; A node parsing module is used to scan each node in the configuration file, identify key nodes in the configuration file, and parse the parsing subtree formed by each key node and its child nodes based on the tree structure parser to obtain node information corresponding to each parsing subtree; A node extraction module is used to extract logical nodes from each parsing subtree according to the node information of each parsing subtree after scanning the configuration file, and generate a semantic label corresponding to each logical node based on a preset dynamic semantic rule library; The change determination module is used to compare each logical node with the logical node in the current application configuration file using the semantic label of each logical node, determine the change information, and send the change information to the substation intelligent device.

9. A storage medium, characterized in that: The storage medium stores computer-readable instructions, which, when executed by one or more processors, enable the one or more processors to perform the steps of the substation configuration file parsing method according to any one of claims 1 to 7.

10. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, which, when executed by the one or more processors, execute the steps of the substation configuration file parsing method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Electric power material verification method and device based on dynamic rule tree

    CN121094760A