Method and system for verifying digital transfer data of secondary system of transformer substation

By combining Neo4j and Prolog engines with the automated verification method of the SHACL constraint language, the challenges of model integrity, compliance, and consistency verification in the digital handover of substation secondary systems were resolved, achieving efficient and reliable data quality assurance, and improving operation and maintenance efficiency and substation operational reliability.

CN120671838APending Publication Date: 2025-09-19GUIZHOU ELECTRIC POWER DESIGN INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510798959.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

During the digital handover of substation secondary systems, existing technologies make it difficult to fully verify the integrity of the relationships between intelligent electronic device nodes, ports, and virtual terminals. Compliance checks are inefficient, and virtual circuit consistency verification is difficult, resulting in data quality affecting the operational reliability of smart substations.

Method used

We use the Neo4j graph database and SHACL constraint language to define detailed verification rules, combined with the Prolog reasoning engine to achieve automated data verification and ensure model integrity, compliance, and consistency. Through data preparation, SHACL constraint definition, loading, Neo4j verification, Prolog rule definition, and result processing, we achieve comprehensive automated data verification.

Benefits of technology

It improves data quality, reduces manual verification costs and error rates, supports multi-model fusion verification, ensures the correct relationship between different models, and improves operation and maintenance efficiency and the safe and stable operation of substations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120671838A_ABST
    Figure CN120671838A_ABST
Patent Text Reader

Abstract

The invention discloses a transformer substation secondary system digital transfer data verification rule and method, and belongs to the technical field of electric power system digital transfer. The method comprises the following steps: S01, preparing data, collecting SCD, SDD and GIM files, converting the SCD, SDD and GIM files into an RDF format, and loading the RDF format into a Neo4j graph database; s02, defining an SHACL constraint, and compiling according to a model integrity, compliance and multi-model consistency rule; s03, the SHACL constraint is loaded to the Neo4j; s04, performing Neo4j data verification, and using an SHACL verification function; s05, defining a Prolog rule, and converting the SHACL or directly defining a complex logic rule; s06, performing Prolog data verification, and using a Prolog inference engine; and S07, processing a verification result. By combining the SHACL and the Prolog, automatic and comprehensive verification of the digital transfer data is realized, the data quality, the verification efficiency and the operation and maintenance efficiency are improved, and multi-model fusion is supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of digital handover of power systems, and in particular relates to a method and system for verifying digital handover data of a secondary system of a transformer substation. Background Art

[0002] During the digital handover of the substation secondary system, data quality directly affects the operational reliability of the smart substation. Traditional data verification methods mainly rely on manual inspection or rule verification based on relational databases, which have the following problems: (1) Model integrity is difficult to ensure: The relationship between intelligent electronic device (IED) nodes, ports and virtual terminals is complex, and traditional methods are difficult to fully verify their integrity. (2) Compliance checking is inefficient: For example, the verification of device parameters (such as 'Length>0') requires manual SQL queries or scripts, which is difficult to adapt to dynamically changing specifications. (3) Virtual circuit consistency verification is difficult: The logical connection relationship of virtual terminals in the substation configuration description (SCD) file is complex, and traditional methods are difficult to achieve automated verification. Summary of the Invention

[0003] The purpose of the present invention is to provide a data verification method for the digital handover of the substation secondary system, which ensures the integrity, compliance and consistency of the data by defining detailed verification rules and automatic verification technology, and improves the reliability and efficiency of the digital handover of the substation secondary system.

[0004] To achieve the above object, the present invention provides the following technical solution: a method for verifying digital handover data of a substation secondary system, comprising the following steps: S01. Data preparation: Collect the Substation Configuration Description (SCD) file, System Design Description (SDD) file, and Grid Information Model (GIM) file of the substation secondary system, convert the SCD file, SDD file, and GIM file into the Resource Description Framework (RDF) data format, and load the converted RDF data into the Neo4j graph database; S02. Define SHACL constraints: Write shape constraint language (SHACL) constraints according to the preset model integrity rules, model compliance rules, and multi-model consistency rules; S03. Loading SHACL constraints into Neo4j: loading the SHACL constraints into the Neo4j graph database; S04. Neo4j data verification: calling Neo4j's SHACL verification function to verify the RDF data in the Neo4j graph database, checking whether the data complies with the SHACL constraints, and generating a verification report; S05. Prolog rule definition: converting the SHACL constraints into Prolog logic rules, or directly defining Prolog logic rules for complex logical relationships; S06. Prolog data verification: using the Prolog reasoning engine to query and reason on the RDF data in the Neo4j graph database based on the Prolog logic rules to verify the integrity and consistency of the data; S07. Verification result processing: According to the verification reports of the Neo4j data verification and the Prolog data verification, the data that does not comply with the rules is repaired, warned, or recorded.

[0005] Preferably, the model integrity rules include attribute integrity rules, relationship integrity rules, and attribute value integrity rules. For example, the attribute integrity rule requires that the attribute fields of the IED node, such as name, description, and type, must be complete; the relationship integrity rule requires that the hierarchical relationship between nodes in the SDD file (such as Region, Cubicle, Device, etc.) must comply with the specification; and the attribute value integrity rule requires that key attribute values ​​(such as the slot attribute of the Board node) cannot be empty.

[0006] Preferably, the model compliance rules include data type compliance rules, value range compliance rules, character compliance rules, and description form compliance rules. For example, the data type compliance rule requires that the data type of the name attribute of the IED node be a string; the value range compliance rule requires that the attribute value representing the length must be greater than 0; the character compliance rule requires that the "=" character cannot appear in English fields in the GIM file; and the description form compliance rule requires that certain attribute values ​​in the SCD file must conform to a specific format, such as P:B01.C1R2.AnalogRcv1.smp23.

[0007] Preferably, the multi-model consistency rules include graphic consistency rules, attribute consistency rules, and virtual circuit consistency rules between the SDD file and the GIM file. For example, graphic consistency requires that the size of the panel cabinet defined in the SDD file must be consistent with the size of the Box node in the GIM model; attribute consistency requires that the slot attribute value of the Board node in the SDD file must be the same as the Slot attribute value of the corresponding DEV model in the GIM file; and virtual circuit consistency requires that the virtual terminals of the IED device in the SCD file must be consistent with the virtual terminals under the Port node in the SDD file.

[0008] Preferably, in the step S03 of loading the SHACL constraints into Neo4j, the $n10s.validation.shacl.import$ process of Neo4j is used, and the SHACL constraints can be loaded into Neo4j by obtaining the RDF document or directly passing the SHACL fragment as a parameter.

[0009] Preferably, in the step S04 of verifying the Neo4j data, the $n10s.validation.shacl.validate$ process of Neo4j is called to verify the graph data in Neo4j, check whether the data complies with the SHACL constraints, and generate a verification report, which identifies the data nodes and relationships that do not comply with the constraints.

[0010] Preferably, in step S05 of the Prolog rule definition, SHACL constraints are converted into Prolog logic rules, specifically including: defining Prolog predicates to simulate SHACL shapes (Shape) to check whether nodes conform to specific types and attributes; simulating SHACL path expressions to navigate RDF graphs to verify relationships between nodes; converting data type constraints to check whether attribute values ​​conform to data type requirements; processing SHACL-specific constraints (such as minCount, maxCount, pattern, in, hasClass, etc.) and converting them into Prolog rules for verification.

[0011] To achieve the above-mentioned objectives, the present invention also provides a substation secondary system digital handover data verification system, which includes: a data preparation module, a SHACL constraint definition module, a SHACL loading module, a Neo4j verification module, a Prolog rule definition module, a Prolog verification module and a result processing module. Each module works together to implement the above-mentioned method.

[0012] Compared with the prior art, the present invention has the following beneficial effects: 1. Improve data quality: By defining detailed verification rules covering model integrity, compliance, and multi-model consistency, the accuracy and standardization of substation secondary system digital handover data are ensured, reducing data errors and anomalies.

[0013] 2. Automated verification: SHACL constraint language and Prolog inference engine are used to achieve automated data verification, significantly improving verification efficiency and reducing manual verification costs and the error rate introduced by manual operations.

[0014] 3. Support multi-model fusion verification: It can perform integrated verification on multi-source heterogeneous model data such as SCD, SDD and GIM to ensure the correct relationship between different models and provide reliable data support for the digital management and operation and maintenance of substation secondary systems.

[0015] 4. Improve operation and maintenance efficiency: High-quality digital handover data helps operation and maintenance personnel quickly and accurately understand the status and structure of the substation secondary system, improve the efficiency of operation and maintenance work, and ensure the safe and stable operation of the substation. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A verification flow chart of a method for verifying digital handover data of a substation secondary system according to the present invention; Figure 2 The present invention provides a system block diagram of a substation secondary system digital handover data verification system. DETAILED DESCRIPTION

[0017] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings, but the present invention is not limited to the following embodiments.

[0018] Example 1: Reference Figure 1 The present invention provides a method for verifying digital handover data of a substation secondary system, which specifically includes the following steps: Step S01: Data Preparation. Collect relevant data files for the substation secondary system, primarily including the Substation Configuration Description (SCD) file, the System Design Description (SDD) file, and the Grid Information Model (GIM) file. Convert the data content of these files into Resource Description Framework (RDF) triples. Then, load the converted RDF data into a Neo4j graph database, leveraging the unique characteristics of graph databases to store and manage complex relationships between models.

[0019] Step S02: Define SHACL constraints. Based on the data quality requirements for the digital handover of the substation secondary system, define detailed verification rules. These rules are mainly divided into three categories: 1. Model integrity rules: Ensure that the basic structure of the model data is complete. For example, attribute integrity requires that the key attribute fields (such as name, desc, type, etc.) of the IED (intelligent electronic device) node in the SCD file must exist and not be empty. Relationship integrity requires that the hierarchical relationship between each node in the SDD file (such as Region, Cubicle, Device, etc.) must comply with predefined specifications. Attribute value integrity requires that certain key attribute values ​​cannot be empty, such as the slot attribute value of the Board node. A specific SHACL constraint example is as follows, which is used to check that the node of the IED type must have a Name attribute, and the data type of this attribute is a string: sh:targetClass neo4j:IED ; sh:property [ sh:path neo4j:Name ; sh:datatype xsd:string ; sh:minCount 1 ;# Ensure there is at least one Name attribute ] . 2. Model compliance rules: Ensure that model data conforms to specification standards. For example, data type compliance requires that specific attributes conform to their defined data types. Numeric range compliance requires that certain numeric parameters are within a preset range, such as the size parameters (such as Length) of the rectangle (Box) in the GIM file must be greater than 0. Character compliance requires that the content of certain text fields conform to specific specifications, such as the "=" symbol cannot appear in the English field in the GIM file. Description form compliance requires that certain attribute values ​​must conform to a specific format, such as certain attribute values ​​in the SCD file must conform to the naming specification such as P:B01.C1R2.AnalogRcv1.smp23. A specific SHACL constraint example is as follows, which is used to ensure that the Length attribute of the node named "Box" in Neo4j is greater than 0: First, define a SHACL shape that specifies that when the Name attribute is "Box", the attribute value of the Length attribute must be greater than 0.

[0020] neo4j:BoxShape a sh:NodeShape; sh:targetClass neo4j:Node ; sh:property [ sh:path neo4j:Name ; sh:hasValue "Box"^^xsd:string; sh:minCount 1 ; ] ; sh:property [ sh:path neo4j:Length ; sh:datatype xsd:float ; sh:gt 0 ; ] .3. Multi-model consistency rules: Ensure data consistency between models from different sources. For example, the graphic consistency between SDD and GIM requires that the size of the panel cabinet defined in the SDD file must be consistent with the size of the Box node in the GIM model. Attribute consistency requires that the slot attribute value of the Board node in the SDD file must be the same as the Slot attribute value of the corresponding DEV model in the GIM file. Virtual circuit consistency requires that the virtual terminal (VirtualTerminal) of the IED device in the SCD file must be consistent with the virtual terminal under the Port node in the SDD file. For example, you can define a SHACL constraint to check whether the virtual terminal under the Port node of the IED node in the SDD file conforms to the predefined list.

[0021] Step S03: Load the SHACL constraints into Neo4j. Serialize the SHACL constraints defined in step S02 into Turtle format (or other RDF serialization format). Then, use the 'n10s.validation.shacl.import' or 'n10s.validation.shacl.import.inline' procedures provided by Neo4j's Neosemantics (n10s) tool to load these SHACL constraints into the Neo4j graph database. For example, the Cypher query for using the 'n10s.validation.shacl.import.inline' procedure to load the SHACL constraint that ensures the Length property of the Box node is greater than 0 is as follows: CALL n10s.validation.shacl.import.inline(' neo4j:BoxShape a sh:NodeShape; sh:targetClass neo4j:Node ; sh:property [ sh:path neo4j:Name ; sh:hasValue "Box"^^xsd:string; sh:minCount 1 ; ] ; sh:property [ sh:path neo4j:Length ; sh:datatype xsd:float ; sh:gt 0 ; ] . ','Turtle') YIELD * Step S04: Neo4j Data Validation. Call the $n10s.validation.shacl.validate$ procedure provided by Neo4j's Neosemantics tool to validate the RDF data loaded into the Neo4j graph database. This procedure checks the data against the loaded SHACL constraints and generates a detailed validation report. The validation report identifies data nodes and relationships that do not conform to the constraints, along with the specific rules violated.

[0022] Step S05: Prolog rule definition. For some logical verification rules that are difficult to express or too complex to express in SHACL, especially virtual loop consistency involving complex reasoning, SHACL constraints (or directly based on business logic) can be converted into Prolog logical rules. The conversion process includes: (1) Defining Prolog predicates: For each shape in SHACL, a predicate can be defined in Prolog. The predicate accepts an RDF node as a parameter and contains a series of subgoals that correspond to the constraints defined in the SHACL shape. (2) Simulating SHACL path expressions: SHACL allows the definition of complex path expressions to specify the relationship between nodes. In Prolog, rules need to be defined to simulate these paths so that RDF graphs can be navigated and the connections between nodes can be verified. (3) Converting data type constraints: SHACL supports constraints on data types. In Prolog, rules need to be defined to check these data types. (4) Processing SHACL-specific constraints: SHACL provides a variety of constraints, such as minCount, maxCount, pattern, in, hasClass, etc. These SHACL-specific constraints need to be converted into Prolog rules. For example, define a SHACL-shaped Prolog predicate to check whether a node conforms to the IED type and has the SDD property: shape_IED(Node) :- rdf_has_type(Node, ied_type), rdf_has_property(Node, sdd_property). Among them, rdf_has_type(Node,Type) is used to check whether a node has a specific type. Its definition is as follows: rdf_has_type(Node, Type) :- rdf(Node, rdf:type, Type). rdf_has_property(Node,sdd_property) is used to check whether a node has a specific property. It is defined as follows: rdf_has_property(Node, Property) :- rdf(Node, Property, _). For pattern constraints that require regular expression matching, you can use Prolog's regular expression matching function, such as sub_string(Value,0,_,_,Pattern).

[0023] Step S06: Prolog Data Verification. Using the Prolog reasoning engine, based on the Prolog logic rules defined in Step S05, the RDF data in the Neo4j graph database (which can be exported or queried through the interface) is queried and reasoned. Prolog's reasoning capabilities can verify the deep logical consistency of the data. For example, the recursive rule 'Contains(X,Z):-Contains(X,Y),Contains(Y,Z)' can be used to check the containment relationships between nodes to ensure the logical correctness of the data.

[0024] Step S07: Verification result processing. Based on the SHACL verification report of step S04 and the Prolog verification result of step S06, the data that does not comply with the rules is processed accordingly. For integrity issues, such as missing attributes or relationships, they are supplemented. For compliance issues, such as incorrect data types or values ​​out of range, they are corrected. For consistency issues, such as incorrect associations between models, adjustments are made to ensure that the data meets the requirements for the digital handover of the substation secondary system. Processing methods can include automatic repair, generating warning notifications to relevant personnel, or rejecting unqualified data records during the handover process.

[0025] Through the above steps, the method of the present invention can automatically and comprehensively verify the digital handover data of the substation secondary system, effectively ensuring the data quality.

[0026] Example 2: The present invention also provides a substation secondary system digital handover data verification system, referring to Figure 2, the system is used to implement the aforementioned method. The system can be deployed on a server or computer cluster, and its main components are as follows: 1. Data preparation module: responsible for collecting raw data files such as SCD, SDD, GIM, performing RDF conversion, and loading the converted data into the Neo4j graph database. This module may include a file parser, an RDF converter, and a database loading interface. 2. SHACL constraint definition module: provides a user interface or configuration file interface, allowing users to define or import SHACL constraint rules according to business needs and data specifications. 3. SHACL loading module: responsible for loading the defined SHACL constraints into the Neo4j graph database, calling processes such as 'n10s.validation.shacl.import'. 4. Neo4j verification module: integrates the Neo4j database, and calls its 'n10s.validation.shacl.validate' function to perform SHACL-based verification and collect verification reports. 5. Prolog rule definition module: provides a converter that converts SHACL rules into Prolog rules, or allows users to directly write and manage Prolog verification rules. 6. Prolog Validation Module: Integrates a Prolog reasoning engine to perform logical reasoning and validation on RDF data based on defined Prolog rules. 7. Result Processing Module: Receives validation results from the Neo4j Validation Module and the Prolog Validation Module, performs data repair, warning, or rejection actions based on pre-set policies, and generates comprehensive data quality reports.

[0027] The various modules of the system work together, and the processor executes instructions stored in the memory to implement the above-mentioned verification process, thereby providing efficient and reliable data quality assurance for the digital handover of the substation secondary system.

[0028] It should be noted that the above embodiments are only used to illustrate the present invention, rather than to limit the present invention. Those skilled in the art may make various modifications or equivalent substitutions within the scope of the present invention, which shall be included in the scope of protection of the present invention.

Claims

1. A method for verifying digital handover data of a substation secondary system, characterized in that: The steps include: S01. Collect the SCD file, SDD file, and GIM file of the substation secondary system, convert the SCD file, SDD file, and GIM file into RDF data format, and load the converted RDF data into a Neo4j graph database; S02. Write SHACL constraints according to the preset model integrity rules, model compliance rules, and multi-model consistency rules; S03. Loading SHACL constraints into Neo4j: loading the SHACL constraints into the Neo4j graph database; S04. Calling the SHACL verification function of Neo4j to verify the RDF data in the Neo4j graph database, checking whether the data complies with the SHACL constraints, and generating a verification report; S05. Convert the SHACL constraints into Prolog logic rules, or directly define Prolog logic rules for complex logical relationships; S06. Using a Prolog reasoning engine, query and reason on the RDF data in the Neo4j graph database based on the Prolog logic rules to verify the integrity and consistency of the data; D07. According to the verification reports of the Neo4j data verification and the Prolog data verification, repair, issue a warning, or refuse to record the data that does not comply with the rules.

2. The method according to claim 1, characterized in that The model integrity rules include attribute integrity rules, relationship integrity rules and attribute value integrity rules; the model compliance rules include data type compliance rules, numerical range compliance rules, character compliance rules and description form compliance rules; the multi-model consistency rules include graphic consistency rules, attribute consistency rules and virtual circuit consistency rules between SDD files and GIM files.

3. The method according to claim 2, characterized in that The attribute integrity rule requires that the predetermined attribute fields of the IED node are complete; the relationship integrity rule requires that the hierarchical relationship between the nodes in the SDD file conforms to the specification; the attribute value integrity rule requires that the key attribute value cannot be empty.

4. The method according to claim 2, characterized in that The data type compliance rule requires that the name attribute of the IED node be of string type; the value range compliance rule requires that the attribute value representing the length be greater than 0; and the description form compliance rule requires that the specific attribute value conform to a preset format.

5. The method according to claim 2, characterized in that The virtual circuit consistency rule requires that the virtual terminals of the IED device in the SCD file be consistent with the virtual terminals under the port nodes in the SDD file.

6. The method according to claim 1, characterized in that The step S03 of loading the SHACL constraints into Neo4j includes: loading the SHACL constraint document or SHACL fragment into the Neo4j graph database by calling the 'n10s.validation.shacl.import' process of Neo4j.

7. The method according to claim 1, characterized in that The Neo4j data verification step S04 includes: verifying the graph data by calling the 'n10s.validation.shacl.validate' process of Neo4j, and generating a verification report that identifies data nodes and relationships that do not meet the constraints.

8. The method according to claim 1, characterized in that Step S05 of the Prolog rule definition includes: defining Prolog predicates to simulate SHACL shapes to check whether RDF nodes conform to specific types and attributes; simulating SHACL path expressions to navigate the RDF graph and verify the relationship between nodes; converting data type constraints to check whether attribute values ​​conform to data type requirements; processing SHACL-specific constraints, which include minCount, maxCount, pattern, in, and hasClass, and converting the specific constraints into Prolog rules.

9. A substation secondary system digital handover data verification system, characterized in that: include: The data preparation module is used to collect the SCD file, SDD file and GIM file of the substation secondary system, convert the files into RDF data format, and load them into the Neo4j graph database; SHACL constraint definition module, used to write SHACL constraints according to preset model integrity rules, model compliance rules and multi-model consistency rules; A SHACL loading module, configured to load the SHACL constraints into the Neo4j graph database; A Neo4j validation module, configured to invoke the SHACL validation function of Neo4j to validate the RDF data in the Neo4j graph database and generate a validation report; A Prolog rule definition module, used to convert the SHACL constraints into Prolog logic rules, or directly define Prolog logic rules for complex logical relationships; A Prolog verification module, configured to use a Prolog reasoning engine to query and reason on the RDF data in the Neo4j graph database based on the Prolog logic rules; The result processing module is used to process the data that does not conform to the rules according to the verification report.