Substation SPD file compliance detection method and system based on semantic verification
By converting SPD files into semantic knowledge graphs and performing entity linking and attribute fusion, a semantic digital twin of substation configuration is generated. Combined with SWRL rules and the SPARQL query engine, the problem of in-depth semantic verification in existing technologies is solved, and efficient and in-depth compliance detection of substation SPD files is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CONSTR BRANCH OF STATE GRID JIANGSU ELECTRIC POWER CO LTD
- Filing Date
- 2025-12-31
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, the detection methods for substation SPD files only stay at the surface structural level of lexical and syntactic verification, and cannot delve into the semantic connotation of the files. They cannot effectively verify complex business logic or semantic dependencies across files, resulting in insufficient effectiveness of compliance detection.
By transforming the SPD file dataset into an SPD semantic knowledge graph, and utilizing entity linking, attribute fusion, and context injection, a semantic digital twin of substation configuration is constructed. A semantic inference engine is launched to generate direct electrical connections and communication subscription relationships between conductive devices. SWRL rules are used to infer protection logic chains and signal flow. An enhanced SPARQL query engine is constructed to perform multi-dimensional constraint verification, detect semantic defects, and generate reports.
It enables in-depth semantic verification of substation SPD files, effectively detecting defects such as subscription relationship conflicts, electrical connection breaks, protection logic chain loops, and reverse signal flow, significantly improving the depth and effectiveness of compliance testing.
Smart Images

Figure CN122021640A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of semantic analysis technology, specifically to a method and system for compliance detection of substation SPD documents based on semantic verification. Background Technology
[0002] Substation configuration, description, protection, and control logic increasingly rely on SPD (Specific Process Control) files. However, current methods for detecting SPD files often remain at the surface structural level of lexical and syntactic verification, failing to delve into the semantic meaning of the files. These methods lack the ability to perform context-aware semantic analysis of the file content, thus failing to effectively verify complex business logic or cross-file semantic dependencies, thereby hindering the effectiveness of SPD file compliance detection.
[0003] To address this, a method and system for compliance detection of substation SPD documents based on semantic verification are proposed. Summary of the Invention
[0004] The objective of this invention is to provide a method and system for compliance detection of substation SPD documents based on semantic verification. This involves transforming the SPD document dataset into an SPD semantic knowledge graph; constructing a semantic digital twin of substation configuration through entity linking, attribute fusion, and context injection; initiating a semantic inference engine to materialize the direct electrical connections and direct communication subscription relationships between conductive devices; using SWRL rules to infer and generate higher-order business semantics such as protection logic chains and signal flow directions, forming an enhanced semantic model; and constructing an enhanced SPARQL query engine to perform multi-dimensional constraint verification on the model based on a predefined SHACL shape graph, detecting semantic defects and generating reports. This invention overcomes the shortcomings of existing technologies that only perform surface-level syntactic verification, delving into the semantic connotation of documents, effectively verifying complex business logic and cross-document semantic dependencies, and improving the effectiveness of SPD document compliance detection.
[0005] The present invention adopts the following technical solution:
[0006] The substation SPD document compliance detection method based on semantic verification includes the following steps:
[0007] The structured configuration data of the SPD file dataset is transformed into an SPD semantic knowledge graph using an RDF triple generator.
[0008] The coupling entity linking and attribute fusion engine uses globally unique identifiers to disambiguate and merge cross-file entities in the SPD semantic knowledge graph, and fuses attributes from different SCL file types. By explicitly injecting the contextual relationships implicit in the hierarchical nesting form in the standard SCL into triples, the semantics of the SPD semantic knowledge graph are enhanced, generating a substation configuration semantic digital twin containing disambiguated entities and fused attributes.
[0009] The semantic inference engine performs the following operations in the semantic digital twin configuration of the substation: It activates the connection node topology analyzer to materialize the direct electrical connection relationships between conductive devices by traversing Terminal instances sharing the same connection node; it also activates the GOOSE subscription relationship explicitization engine to materialize the direct communication subscription relationship between the subscriber and publisher control blocks by parsing the string references of ExtRef elements; and it uses SWRL rules to infer and generate higher-order business semantics from the materialized relationships, including protection logic chains and signal flow, thereby generating an enhanced semantic model.
[0010] An enhanced SPARQL query engine is constructed. The query engine performs multi-dimensional constraint verification on the enhanced semantic model based on a predefined SHACL shape graph, thereby detecting semantic defects, including subscription relationship conflicts, electrical connection breaks, protection logic chain loops, and reverse signal flow; and a semantic defect location report is generated.
[0011] Preferably, the generation process of the SPD semantic knowledge graph includes: performing structured parsing on the SCL files in the SPD file dataset using an XML parser, extracting file header information to verify file type and version consistency, parsing IED elements, LD elements, and LN elements layer by layer, and recording the hierarchical structure and attributes; applying RDF mapping rules to map IED elements to subject identifiers, attributes to predicate relations, and values to objects; and using a predefined rule set and pattern matching mechanism to perform completion for non-standard tags and marking for missing attributes, generating an RDF triple set to form the SPD semantic knowledge graph, which serves as the input to the coupling entity linking and attribute fusion engine.
[0012] Preferably, the process of generating the semantic digital twin of the substation configuration includes:
[0013] The SPD semantic knowledge graph is input into the coupled entity linking and attribute fusion engine. Cross-file entity similarity is calculated based on globally unique identifiers and Levenshtein distance, disambiguation and merging operations are performed, and attribute values from SCD, CID, and IID files are fused. Based on the contextual relationships defined in the IEC 61850 standard, including the inclusion relationship between Bay and VoltageLevel and the association relationship between ConductingEquipment and Terminal, semantic enhancement is achieved by adding triples. Figure 1 The consistency verification algorithm checks for no conflicts in the injected relationships and generates a semantic digital twin of the substation configuration containing disambiguated entities and merged attributes, which serves as input to the semantic inference engine.
[0014] Preferably, the generation process of the enhanced semantic model includes: integrating the Apache Jena framework through a semantic inference engine to perform OWL ontology reasoning on the semantic digital twin configured for the substation; materializing the direct electrical connection relationships between conductive devices by traversing Terminal instances of shared connection nodes using a depth-first search algorithm through a connection node topology analyzer; materializing the communication subscription relationship between the subscriber and publisher control blocks by parsing the ExtRef element string reference through the GOOSE subscription relationship explicitization engine; and generating high-order business semantics, including protection logic chains and signal flow, based on SWRL rule groups through the Drools engine, by performing controlled recursive reasoning and injecting it to form an enhanced semantic model as input to the enhanced SPARQL query engine.
[0015] Preferably, the direct electrical connection relationship includes: generating connection edges between ConductingEquipment entities based on the traversal results of the shared connection node Terminal instance, and injecting the topological association between the circuit breaker and the isolating switch; the direct communication subscription relationship includes: directional edges between the subscriber IED and the publisher control block based on the parsed ExtRef element, and using unique identifiers to associate and process many-to-many subscription scenarios to generate a non-redundant subscription relationship.
[0016] Preferably, the construction process of the enhanced SPARQL query engine includes: extending the SPARQL syntax to support SHACL verification path queries; defining shape graph templates for CID and IID files, including node shapes for verifying IID entity attributes and attribute shapes for checking LN attribute ranges; integrating the SPARQL function extension module to support custom constraint logic; constructing a parallel query executor through a multi-threaded allocation algorithm to perform entity integrity verification, relation consistency verification, and attribute constraint verification on the enhanced semantic model, generating the query engine, and outputting the verification results as input to the semantic defect location report.
[0017] Preferably, the semantic defect detection process includes: inputting the enhanced semantic model into the enhanced SPARQL query engine, loading the SHACL shape graph to perform node and attribute verification, and detecting missing attributes; performing connectivity and directionality verification on the materialized high-order business semantics by embedding SPARQL path queries to detect subscription conflict and electrical connection break; applying custom constraint logic to identify protection logic chain loops and signal flow reversals; summarizing subscription conflict, electrical connection break, protection logic chain loop, and signal flow reversals to generate a report containing defect type, entity identifier, constraint violation description, and repair path, and mapping the topological location of the defect in the enhanced semantic model using a PlantUML diagram.
[0018] Preferably, the process of generating the SWRL rule set includes: defining a rule set based on the IEC 61850 standard and substation business logic, including protection logic chain generation rules and signal flow inference rules; adjusting rule priorities through historical verification data analysis; verifying the rule set to be conflict-free through the Drools engine, generating a recursively executable SWRL rule set, and injecting it into the enhanced semantic model as the reasoning basis for high-order business semantics.
[0019] Preferably, the process of generating the semantic defect location report includes: extracting the defect type, affected entity identifier, and violation constraint description based on the verification results of the enhanced SPARQL query engine; generating a repair path suggestion by tracing back the reasoning path and / or matching predefined defect patterns; mapping the defect location to a topology map using a PlantUML generation tool and embedding it into a JSON format report; and merging redundant defect entries using a report optimization algorithm to generate a final report containing defect location and repair suggestions.
[0020] Preferred, a substation SPD document compliance detection system based on semantic verification includes:
[0021] The graph construction module is used to transform the structured configuration data of the SPD file dataset into an SPD semantic knowledge graph through the RDF triple generator;
[0022] The semantic digital twin construction module is used to couple the entity linking and attribute fusion engine. It uses globally unique identifiers to disambiguate and merge cross-file entities in the SPD semantic knowledge graph, and fuses attributes from different SCL file types. By explicitly injecting the contextual relationships implicit in the hierarchical nesting form in the standard SCL into triples, the SPD semantic knowledge graph is semantically enhanced, generating a substation configuration semantic digital twin containing disambiguated entities and fused attributes.
[0023] The enhanced semantic model construction module initiates the semantic inference engine to perform the following operations in the semantic digital twin configuration of the substation: It links with the connection node topology analyzer to materialize the direct electrical connection relationships between conductive devices by traversing Terminal instances sharing the same connection node; it also links with the GOOSE subscription relationship explicitization engine to materialize the direct communication subscription relationship between the subscriber and publisher control blocks by parsing the string references of ExtRef elements; and it uses SWRL rules to infer and generate higher-order business semantics from the materialized relationships, including protection logic chains and signal flow, thereby generating an enhanced semantic model.
[0024] The semantic defect localization module constructs an enhanced SPARQL query engine. The query engine performs multi-dimensional constraint verification on the enhanced semantic model based on a predefined SHACL shape graph, thereby detecting semantic defects, including subscription relationship conflicts, electrical connection breaks, protection logic chain loops, and reverse signal flow; and generates a semantic defect localization report.
[0025] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0026] 1. This invention performs cross-file entity disambiguation, merging, and SCL context relationship injection on RDF-based knowledge graphs by coupling entity linking and attribute fusion engines. This overcomes the shortcomings of existing technologies in handling cross-file semantic dependencies, integrating isolated configuration data into a unified and enhanced substation configuration semantic digital twin, laying a solid data foundation for subsequent in-depth analysis and reasoning.
[0027] 2. This invention integrates a node topology analyzer (using depth-first search) and a GOOSE subscription relationship explicitization engine (parsing ExtRef) to explicitly materialize the implicit connections and subscription relationships in the SPD file (such as those referenced via shared Terminal or strings) into "direct electrical connection relationships" and "direct communication subscription relationships." This transformation from implicit knowledge to explicit graph relationships is a prerequisite for realizing higher-order logical reasoning.
[0028] 3. This invention utilizes SWRL rules to perform controlled recursive reasoning based on the materialized direct electrical and communication relationships (underlying topology), automatically inferring and generating higher-order business semantics such as "protection logic chains" and "signal flow directions." This achieves a semantic leap from physical configuration to functional logic, overcoming the limitation of existing technologies in verifying complex business logic.
[0029] 4. The enhanced SPARQL query engine constructed in this invention couples a SHACL shape graph (for attribute constraints) and custom constraint logic (as shown in the algorithm for loop detection), performing multi-dimensional verification on the enhanced semantic model containing high-order business semantics. This enables the invention to detect semantic defects that traditional syntactic verification cannot find, such as "protection logic chain loops" and "reverse signal flow," significantly improving the depth and effectiveness of detection.
[0030] 5. This invention integrates knowledge graph construction (semantic digital twin), low-level relation materialization (electrical connection / communication subscription), high-order semantic reasoning (protection logic chain / signal flow), and enhanced SPARQL / SHACL verification (including custom loop detection) into a complete data processing and analysis closed loop. Its core innovation lies in adopting a stacked semantic processing architecture of "materialization-reasoning-re-verification": it first uses SWRL rules to infer high-order business semantics (such as protection logic chains) representing the dynamic behavior of the system on top of the static topology. Then, it uses the SPARQL / SHACL engine, which integrates a custom graph algorithm (DFS), to verify the logical correctness of these inferred high-order semantics. This enables the system to detect "emergent" logical defects (such as "protection logic chain loops"). Such defects do not exist in any single SPD configuration file but are only exposed after all configuration data is fused, reasoned, and forms a complete system-level functional chain. By constructing and verifying this "high-order semantic model," this invention achieves a deep review of the system's functional logic, effectively solving the shortcomings of traditional static verification methods. Attached Figure Description
[0031] Figure 1 A flowchart illustrating the substation SPD document compliance detection method based on semantic verification provided by this invention;
[0032] Figure 2 This is a schematic diagram of the substation SPD document compliance detection system based on semantic verification provided by the present invention. Detailed Implementation
[0033] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0034] Example 1:
[0035] To ensure the effectiveness of substation SPD document compliance testing, a semantic verification-based substation SPD document compliance testing method was applied, such as... Figure 1 The flowchart of the substation SPD document compliance detection method based on semantic verification provided by the present invention specifically includes:
[0036] The structured configuration data of the SPD file dataset is transformed into an SPD semantic knowledge graph using an RDF triple generator.
[0037] The coupling entity linking and attribute fusion engine uses globally unique identifiers to disambiguate and merge cross-file entities in the SPD semantic knowledge graph, and fuses attributes from different SCL file types. By explicitly injecting the contextual relationships implicit in the hierarchical nesting form in the standard SCL into triples, the semantics of the SPD semantic knowledge graph are enhanced, generating a substation configuration semantic digital twin containing disambiguated entities and fused attributes.
[0038] This embodiment performs cross-file entity disambiguation, merging, and SCL context relationship injection on the RDF-based knowledge graph by coupling entity linking and attribute fusion engines. This overcomes the shortcomings of existing technologies in handling cross-file semantic dependencies, integrating isolated configuration data into a unified and enhanced substation configuration semantic digital twin, laying a solid data foundation for subsequent in-depth analysis and reasoning.
[0039] The semantic inference engine performs the following operations in the semantic digital twin configuration of the substation: It activates the connection node topology analyzer to materialize the direct electrical connection relationships between conductive devices by traversing Terminal instances sharing the same connection node; it also activates the GOOSE subscription relationship explicitization engine to materialize the direct communication subscription relationship between the subscriber and publisher control blocks by parsing the string references of ExtRef elements; and it uses SWRL rules to infer and generate higher-order business semantics from the materialized relationships, including protection logic chains and signal flow, thereby generating an enhanced semantic model.
[0040] An enhanced SPARQL query engine is constructed. The query engine performs multi-dimensional constraint verification on the enhanced semantic model based on a predefined SHACL shape graph, thereby detecting semantic defects, including subscription relationship conflicts, electrical connection breaks, protection logic chain loops, and reverse signal flow; and a semantic defect location report is generated.
[0041] Furthermore, the generation process of the SPD semantic knowledge graph includes: performing structured parsing on SCL files in the SPD file dataset using an XML parser, extracting file header information to verify file type and version consistency, parsing IED elements, LD elements, and LN elements layer by layer, and recording the hierarchical structure and attributes; applying RDF mapping rules, such as mapping IED elements to subject identifiers, attributes to predicate relations, and values to objects; and performing completion for non-standard tags and marking for missing attributes through a predefined rule set and pattern matching mechanism, for example, mapping IED elements (such as...) to subject identifiers, attributes to predicate relations, and values to objects. <ied name="IED_A">The text describes how tags are mapped to IRIs (e.g., ex: IED_A), and how attributes (e.g., desc="Device A") are mapped to predicates (e.g., rdfs:comment) and objects (e.g., "Device A"). Non-standard tags and missing attributes are handled using a predefined rule set and pattern matching mechanism. This rule set is defined, for example:
[0042] (Non-standard tag completion) If pattern matching is used in <ied>Non-standard was found <customconfiga>The tag is then mapped to a predefined predicate, e.g., hasCustomConfigA.
[0043] The predefined rule set is specifically implemented as a set of R2RML (RDB to RDF Mapping Language) or RML (RDF Mapping Language) mapping rules. For the standard SCL structure, the rules define a direct mapping from the XML path (via XPath or JSONPath) to the RDF subject-verb-object triple. For example, the Bay element specifies the XML source via rml:logicalSource, its name attribute generates the subject IRI via rr:subjectMap, and its ConductingEquipment sub-elements are mapped to the ex:containsEquipment predicate and associated object via rr:predicateObjectMap and rr:parentTriplesMap.
[0044] For non-standard tags, the pattern matching mechanism allows defining "fallback" or "conditional" mappings in RML rules. For example, the (non-standard tag completion) rule set first attempts to search along the standard path XPath: / IED / AccessPoint. If not found, an alternative mapping rule is triggered, which uses XPath: / IED / CustomConfigA (i.e., the non-standard tag) and maps it to the predicate ex:hasCustomConfigA. This configurable mapping file enables adaptation to different vendor SCL dialects.
[0045] (Missing attribute marker) If <ied name="IED_B">If an element lacks a mandatory type attribute, a triple ex:IED_B ex:hasAttributeIssue "Missing_Type_Attribute" is automatically added when generating the ex:IED_B instance; an RDF triple set is generated, forming an SPD semantic knowledge graph, which serves as the input for the coupled entity linking and attribute fusion engine.
[0046] Furthermore, the process of generating the substation configuration semantic digital twin includes: inputting the SPD semantic knowledge graph into the coupled entity linking and attribute fusion engine; calculating cross-file entity similarity based on globally unique identifiers and Levenshtein distance; and performing disambiguation and merging operations. The globally unique identifier is the unique path name of the key entity extracted according to the naming convention of SCL files in the IEC 61850 standard. Specifically, for IED (Intelligent Electronic Device) entities, their name attribute in the SCL file is used as the identifier; for Conducting Equipment, Logical Nodes (LNs), and other substation structures (such as Bay and VoltageLevel), their complete hierarchical path down to the entity at the Substation level (e.g., SubstationName / VoltageLevelName / BayName / EquipmentName) is used as their globally unique identifier. When performing entity linking, the engine first attempts to perform an exact match using the globally unique identifier. If an exact match fails, it then combines descriptive attributes such as the entity's `desc` or `type` and uses the Levenshtein distance algorithm to calculate string similarity. This identifies and merges potentially identical entities caused by naming convention issues. After entity merging, it integrates the attribute values from the SCD, CID, and IID files. Specifically, during attribute fusion, the SCD, CID, and IID file attribute values follow a preset priority strategy based on attribute domains to resolve attribute conflicts from different sources. This strategy is defined as follows:
[0047] For "instantiation parameters" (such as IP address, GOOSE configuration, and fixed values):
[0048] The attribute value in the IID file has the highest priority.
[0049] If an attribute is not defined in the IID, then the same attribute in the CID file takes precedence.
[0050] If it is not defined in the CID, then the default value or template value in the SCD file has the lowest priority.
[0051] For "IED logical function definition" (such as templates for LN and DO):
[0052] Definitions in the CID file take precedence.
[0053] If not defined in CID, then the definition in SCD will be used.
[0054] For "station-level topology" (such as the hierarchical relationship of Substation, Voltage Level, Bay):
[0055] Based on the definitions in the SCD file and with the highest priority, modifications to such station-level structures should not (or should not be prioritized) be included in the IID or CID.
[0056] Based on the contextual relationships defined in the IEC 61850 standard, including the inclusion relationship between Bay and VoltageLevel and the association relationship between ConductingEquipment and Terminal, semantic enhancement is achieved by adding triples; Figure 1 The consistency verification algorithm checks for conflicts in the injected relationships. Specifically, after performing semantically enhanced triple injection, a set of predefined SPARQL ASK queries or SHACL (Shape Constraint Language) node shape constraints are immediately executed to verify whether the graph violates the basic constraints of the IEC 61850 ontology. For example, it checks whether a Terminal instance is incorrectly associated with multiple ConductingEquipment entities (violating the N:1 cardinality constraint) or whether a Bay is incorrectly contained within another Bay (violating the hierarchy definition). If the query returns a conflict result, generation is aborted and the error is marked, ensuring that a substation configuration semantic digital twin containing disambiguated entities and merged attributes is generated as input to the semantic inference engine.
[0057] Furthermore, the generation process of the enhanced semantic model includes: integrating the Apache Jena framework through a semantic reasoning engine to perform OWL ontology reasoning on the semantic digital twin configured for the substation;
[0058] The ontology reasoning is based on a predefined ontology model conforming to the IEC 61850 standard. This model defines not only the "subclass" relationship between 'conductive devices' and 'protective devices', but also the "inverse relationship" of the "endpoint" relationship between 'connection endpoints' and 'conductive devices', and constrains this inverse relationship to be a "functional attribute". The purpose of performing this ontology reasoning is to use the Jena inference engine, based on the above axioms, to preprocess and verify the data before executing subsequent business rules (such as SWRL rules). For example, the inference engine can automatically classify an instantiated circuit breaker as a 'conductive device', and can automatically detect data layer defects such as "a connection endpoint instance being incorrectly associated with multiple conductive devices" through functional attribute constraints. This step ensures the data standardization and semantic completeness of the substation configuration semantic digital twin before performing high-order semantic inference.
[0059] By using a connection node topology analyzer, a depth-first search algorithm is employed to traverse Terminal instances of shared connection nodes, materializing the direct electrical connections between conductive devices. Through the GOOSE subscription relationship explicitation engine, ExtRef element string references are parsed to materialize the communication subscription relationship between the subscriber and publisher control blocks. Based on SWRL rule groups, controlled recursive reasoning is performed through the Drools engine to generate high-order business semantics, including protection logic chains and signal flow, which are injected to form an enhanced semantic model, serving as input to the enhanced SPARQL query engine.
[0060] Furthermore, the direct electrical connection relationship includes: generating connection edges between ConductingEquipment entities based on the traversal results of the shared connection node Terminal instance, and injecting the topological association between the circuit breaker and the isolating switch; the direct communication subscription relationship includes: directional edges between the subscriber IED and the publisher control block based on the parsed ExtRef element, and using unique identifiers to associate and process many-to-many subscription scenarios to generate a non-redundant subscription relationship.
[0061] Furthermore, the construction process of the enhanced SPARQL query engine includes: extending the SPARQL syntax to support SHACL verification path queries, defining shape graph templates for CID and IID files, and including node shapes for verifying IED entity attributes (e.g., a node shape for verifying an IED entity can be defined as:
[0062] IEDShape
[0063] a sh:NodeShape;
[0064] sh:targetClass:IED;
[0065] sh:property [
[0066] sh:path:name;
[0067] sh:minCount 1;
[0068] sh:maxCount 1;
[0069] sh:datatype xsd:string;
[0070] sh:description "Each IED must have one and only one name, and the name must be a string." ];
[0072] sh:property [
[0073] sh:path :hasLogicalNode;
[0074] sh:minCount 1;
[0075] sh:description "Each IED must contain at least one logical node (LN)"
[0076] ]) and check the attribute shape of the LN attribute range (e.g., constrain the value of the position attribute pos of a specific logical node (such as XCBR, circuit breaker) to be within a specific enumeration range (such as on, off, bad-state).
[0077] XCBR_PosShape
[0078] a sh:PropertyShape;
[0079] sh:targetNode:MySpecificXCBR_LN_Instance;
[0080] sh:path :posVal;
[0081] sh:in ( "on" "off" "bad-state" );
[0082] sh:description "Circuit breaker position attribute value must be among 'on', 'off', 'bad-state'".), By defining such specific shape diagrams, the query engine can perform precise constraint checks on the enhanced semantic model;
[0083] Integrates the SPARQL function extension module to support custom constraint logic;
[0084] The enhanced SPARQL query engine is built on the Apache Jena framework. It utilizes Jena ARQ's PropertyFunction and FilterFunction extension mechanisms to register custom SPARQL functions. The custom constraint logic is implemented through these custom functions (e.g., defining a custom:checkLogicCycle() function to detect cycles in the protection logic chain during SPARQL queries). This custom:checkLogicCycle() function is implemented in Java and registered as a Jena ARQ FilterFunction. When called in the SPARQL FILTER clause (e.g., FILTER custom:checkLogicCycle(?startNode)), this function receives a graph node (e.g., the starting node of the protection logic chain, ?startNode) as input. Internally, it implements a graph traversal algorithm based on depth-first search (DFS): during execution, it initializes a visited collection to record all visited nodes and a recursionStack collection to record nodes on the current traversal path. The function starts from the input's starting node and recursively traverses along a predefined "protection logic chain" relationship (e.g., `?node : hasProtectionLink ?nextNode`). During the traversal, if the next node to be visited already exists in the `recursionStack` set, it indicates that a cycle has been found, and the function returns `true` (causing `FILTER` to fail or triggering constraints); if no cycle is found after the traversal, it returns `false`.
[0085] This engine integrates Jena's SHACL verification module, allowing the SPARQL query process and the SHACL verification process to be invoked within the same executor. Specifically, the aforementioned custom function `custom:checkLogicCycle()` can be encapsulated within a `sh:sparql` (SPARQL constraint) and used as part of a predefined SHACL shape graph. When Jena's SHACL verification module performs verification on the augmented semantic model, it automatically executes this `sh:sparql` constraint. This constraint query calls the `custom:checkLogicCycle()` function, seamlessly integrating custom, DFS-based graph algorithm logic (such as cycle detection) into the standard SHACL verification process to detect semantic defects such as "protected logic chain cycles".
[0086] A parallel query executor is constructed using a multi-threaded allocation algorithm to perform entity integrity checks, relation consistency checks, and attribute constraint checks on the augmented semantic model. The multi-threaded allocation algorithm employs a hybrid partitioning strategy based on the type of verification task: First, all independent SHACL node shape verification tasks for different IED entities are allocated to independent threads for parallel execution. Second, for cross-entity SPARQL path queries (such as electrical connection break detection), a graph partitioning algorithm (e.g., METIS) is used at startup to perform a coarse-grained static pre-partition of the augmented semantic model, dividing the graph into several closely related subgraphs. The parallel query executor is implemented based on the Fork / Join framework, defining the internal path search task for each subgraph (and subsequent cross-subgraph boundary result merging tasks) as forkable task units and submitting them to the Fork / Join pool. The task-stealing mechanism of the Fork / Join framework dynamically balances the load of these subgraph search tasks, ensuring query efficiency, generating a query engine, and outputting verification results as input for the semantic defect localization report.
[0087] This embodiment uses a combined connection node topology analyzer (emphasizing depth-first search) and a GOOSE subscription relationship explicitization engine (parsing ExtRef) to explicitly materialize the implicit connections and subscription relationships in the SPD file (such as those referenced via shared Terminal or strings) into "direct electrical connection relationships" and "direct communication subscription relationships." This transformation from implicit knowledge to explicit graph relationships is a prerequisite for achieving higher-order logical reasoning.
[0088] This embodiment utilizes SWRL rules to perform controlled recursive reasoning based on the materialized direct electrical and communication relationships (underlying topology), automatically inferring and generating higher-order business semantics such as "protection logic chains" and "signal flow directions." This achieves a semantic leap from physical configuration to functional logic, overcoming the limitation of existing technologies in verifying complex business logic.
[0089] Furthermore, the semantic defect detection process includes: inputting the enhanced semantic model into the enhanced SPARQL query engine, loading the SHACL shape graph to perform node and attribute verification, and detecting missing attributes; performing connectivity and directionality checks on the materialized high-order business semantics by embedding SPARQL path queries to detect subscription conflict and electrical connection break; applying custom constraint logic to identify protection logic chain loops and signal flow reversals; summarizing subscription conflict, electrical connection break, protection logic chain loop, and signal flow reversals to generate a report containing defect type, entity identifier, constraint violation description, and repair path, and mapping the topological location of the defect in the enhanced semantic model using a PlantUML diagram; summarizing subscription conflict, electrical connection break, protection logic chain loop, and signal flow reversals to generate a report containing defect type, entity identifier, constraint violation description, and repair path.
[0090] Furthermore, the generation process of the SWRL rule group includes: defining a rule set based on the IEC 61850 standard and substation business logic, including protection logic chain generation rules and signal flow inference rules; the SWRL rule group is inferred based on the materialized electrical connection relationships, communication subscription relationships, and basic semantic predicates directly mapped from the SCL file during the graph construction phase. The basic semantic predicates include, for example:
[0091] inputSignal(?ied, ?equip): During the RDF triple generation phase, it parses the IED (Initial Execution Element). <inputs>The element that points to the state of a certain conductive device (equip). <extref>Elements (especially ExtRef with daName or lnClass matching protection) are mapped to inputSignal relationships.
[0092] Controls(?ied, ?equip): Maps the logical nodes (such as LN class CSWI or XCBR) and conductive devices (?equip) in the IED to Controls relationships by resolving the association between them (usually defined in the Substation section of the SCD file).
[0093] Based on the above predicates, the protection logic chain generation rule, for example, using materialized electrical connection relationships and GOOSE subscription relationships, defines the following SWRL rule: ConductingEquipment(?equip),Terminal(?t1),Terminal(?t2),connectedTo(?t1,?t2),hasTerminal(?equip,?t1),GOOSE_Subscription(?sub,?gcb),publishedBy(?gcb,?ied1),subscribedBy(?sub,?ied2),inputSignal(?ied2,?equip)->ProtectionLogicChain(?ied2, ?equip). This rule is used to infer that the IED (?ied2) monitors the status of a conductive device (?equip) through subscription (?sub).
[0094] The signal flow inference rule, for example, is implemented through combinational reasoning based on GOOSE subscription relationships and electrical connection topology, as well as the inferred protection logic chain. Its inference logic first requires defining the directionality in the electrical topology, for example, defining the auxiliary rule isUpstreamOf(?equip1, ?equip2) (device 1 is upstream of device 2).
[0095] To ensure the accuracy of directional judgment, this auxiliary rule is based on the actual power flow direction of the power system and is determined through topology traversal: 1. (Determining the power source side) First, in the SCL model, look for conductive equipment with the type attribute "GEN" (generator) or "TR" (transformer) and whose high-voltage side is not connected to other bays within the station, or look for equipment with the type "LIN" (line) and whose Bay's name or desc attribute is explicitly marked as "incoming line" or "Source", and mark it (or its connected Busbar) as the highest upstream of the system (isSource(?equip)). 2. (Handling multi-source / ring networks) If no clear single source is found or the topology is a ring network, the user is prompted to manually specify one or more power source side nodes as the starting point of the traversal. 3. (Defining upstream and downstream in topology traversal) Starting from the equipment marked as isSource(?equip), traverse the entire electrical topology along the materialized "direct electrical connections" (connectedTo) using a breadth-first search (BFS) algorithm. During the traversal, add an isUpstreamOf(?equip_current, ?equip_next) relationship triplet to all newly visited devices (?equip_next) and the current device (?equip_current). 4. (Handling Transformers) To correctly handle step-up and step-down voltages, supplement the transformer rules: by parsing the voltage level attributes of the terminals on both sides of the transformer, define isUpstreamOf its low-voltage side (in the step-down substation) for the high-voltage side (higher VoltageLevelValue), or isUpstreamOf its high-voltage side (in the step-up substation), to ensure that the traversal direction is consistent with the actual power flow. Through the above combination of rules based on power point topology traversal, it is ensured that the inference of upstream / downstream relationships (isUpstreamOf) conforms to the actual logic of power system operation.
[0096] Subsequently, signal flow inference rules are defined based on this directionality, for example: ProtectionLogicChain(?ied1,?equip1) (Rule 1: IED1 monitors upstream device 1) isUpstreamOf(?equip1,?equip2) (Rule 2: Device 1 is upstream of device 2) GOOSE_Subscription(?sub, ?gcb) publishedBy(?gcb, ?ied1) (Rule 3: IED1 published a certain GOOSE control block) subscribedBy(?sub, ?ied2) (Rule 4: IED2 subscribed to this control block) Controls(?ied2, ?equip2) (Rule 5: IED2 controls downstream device 2, for example, equip2 is a circuit breaker) ->SignalFlow(?equip1, ?ied1, ?ied2, ?equip2) The meaning of this combination rule is: to infer a complete signal flow relationship from upstream device ?equip1 (whose status is monitored by ?ied1), through ?ied1 publishing a GOOSE message, then ?ied2 subscribing to the message, and finally ?ied2 controlling the downstream device ?equip2.
[0097] Here, ?equip means "any qualified conductive device entity", ?ied1 means "any qualified IED entity", and ?t1 and ?t2 mean "any qualified Terminal entity".
[0098] By analyzing historical validation data, rule priorities are adjusted; the rule set is verified to be conflict-free using the Drools engine, generating a recursively executable SWRL rule group, which is then injected into the enhanced semantic model as the reasoning basis for higher-order business semantics.
[0099] The historical verification data analysis process specifically involves: collecting SPD files containing known semantic defects (e.g., confirmed protection logic chain loops) and their corresponding verification results to form a training dataset. Using this dataset, the contribution of different SWRL rules to false positives or false negatives is analyzed, and a heuristic rule-based tuning algorithm is used to iteratively adjust the priority parameter of the Drools rules.
[0100] The specific steps of the optimization algorithm based on heuristic rules are as follows:
[0101] (1) Initialization: Set all "Protection Logic Chain Generation Rules" to a higher base priority (e.g., salience = 100), and set all "Signal Flow Inference Rules" to a lower base priority (e.g., salience = 50) to ensure that reasoning of the basic topology takes precedence over reasoning of higher-order flows. Set the initial adjustment step size. =10 and performance threshold T (e.g., achieving an F1-score of 98% on the validation set).
[0102] (2) Iterative execution: Run the Drools engine on the training dataset and compare it with known defects.
[0103] (3) Handling False Negatives: If a known flaw is not discovered, analyze the reasoning path leading to the flaw. For all rules on this path that should have been triggered but were not, increase their salience value by one step. ); Indicates the adjusted step size; Indicates the adjusted step size;
[0104] (4) Handling False Positives: If the system reports a non-existent defect, backtrack the reasoning chain that led to the erroneous conclusion. For rules in the reasoning chain that are triggered incorrectly or prematurely, decrease their salience value by one step. );
[0105] (5) Step size adjustment and convergence judgment: After each iteration, if the F1-score on the validation set has not improved compared to the previous iteration, the step size will be halved. When the F1-score reaches the performance threshold T or If the value is less than 1, the iteration stops, and the final SWRL rule set is generated. For example, if it is found that the "signal flow inference rule" is triggered prematurely before the "protection logic chain generation rule" is completed, causing an error, its priority is set to be lowered using the above optimization algorithm to ensure the correct execution order of inference;
[0106] Furthermore, the generation process of the semantic defect location report includes: extracting the defect type, affected entity identifier, and constraint violation description based on the verification results of the enhanced SPARQL query engine; generating repair path suggestions by tracing back the reasoning path and / or matching predefined defect patterns (for example, for a "protection logic chain loop" defect, when the system detects a loop (i.e., accessing a node already in the recursive stack) using the depth-first search (DFS) algorithm, it not only returns the result "loop exists" but also records the complete node and relationship path that caused the loop). The repair path generator then analyzes the path, locates the weakest link in the path of type "GOOSE subscription relationship" or "electrical connection relationship" (e.g., based on typical error patterns defined in the rule base), and generates specific suggestions, such as: a protection logic chain loop was detected: [IED-A -> IED-B -> IED-C -> ... [IED-A]. It is recommended to check whether the GOOSE subscription (ExtRef) of IED-C to the IED-A control block is redundantly configured. Using the PlantUML generation tool, the defect location is mapped to a topology graph, and a JSON format report is embedded. A report optimization algorithm is used to merge redundant defect entries and generate a final report containing defect location and repair suggestions. The report optimization algorithm works based on a defect dependency graph: the system first constructs a temporary dependency graph based on the entity identifiers and constraint types involved in the defect. For example, if "signal flow reversed" (defect A) is detected, and the "electrical connection" (defect B) that the signal flow depends on is also detected as "broken link," then a dependency edge from B to A is established in the graph. When generating the report, the algorithm traverses this dependency graph, reporting only root cause defects without indegree (such as defect B), and folding the remaining derived defects (such as defect A) under the root cause entry, thereby merging redundant defect entries.
[0107] The enhanced SPARQL query engine constructed in this embodiment couples a SHACL shape graph (for attribute constraints) and custom constraint logic (as shown in the algorithm for loop detection), performing multi-dimensional verification on the enhanced semantic model containing high-order business semantics. This enables the invention to detect semantic defects that traditional syntactic verification cannot find, such as "protection logic chain loops" and "reverse signal flow," significantly improving the depth and effectiveness of detection.
[0108] This embodiment integrates knowledge graph construction (semantic digital twin), low-level relation materialization (electrical connection / communication subscription), high-order semantic reasoning (protection logic chain / signal flow), and enhanced SPARQL / SHACL verification (including custom loop detection) into a complete data processing and analysis closed loop. Its core innovation lies in adopting a stacked semantic processing architecture of "materialization-reasoning-re-verification": it first uses SWRL rules to infer high-order business semantics (such as protection logic chains) representing the dynamic behavior of the system on top of the static topology. Then, it uses the SPARQL / SHACL engine, which integrates a custom graph algorithm (DFS), to verify the logical correctness of these inferred high-order semantics. This enables the system to detect "emergent" logical defects (such as "protection logic chain loops"). Such defects do not exist in any single SPD configuration file but are only exposed after all configuration data is fused, reasoned, and forms a complete system-level functional chain. By constructing and verifying this "high-order semantic model," this invention achieves a deep review of the system's functional logic, effectively solving the shortcomings of traditional static verification methods.
[0109] Example 2:
[0110] To ensure the effectiveness of substation SPD document compliance testing, a semantic verification-based substation SPD document compliance testing system was applied, such as... Figure 2 A schematic diagram of the substation SPD document compliance detection system based on semantic verification provided by the present invention is shown, specifically including:
[0111] The graph construction module is used to transform the structured configuration data of the SPD file dataset into an SPD semantic knowledge graph through the RDF triple generator;
[0112] The semantic digital twin construction module is used to couple the entity linking and attribute fusion engine. It uses globally unique identifiers to disambiguate and merge cross-file entities in the SPD semantic knowledge graph, and fuses attributes from different SCL file types. By explicitly injecting the contextual relationships implicit in the hierarchical nesting form in the standard SCL into triples, the SPD semantic knowledge graph is semantically enhanced, generating a substation configuration semantic digital twin containing disambiguated entities and fused attributes.
[0113] The enhanced semantic model construction module initiates the semantic inference engine to perform the following operations in the semantic digital twin configuration of the substation: It links with the connection node topology analyzer to materialize the direct electrical connection relationships between conductive devices by traversing Terminal instances sharing the same connection node; it also links with the GOOSE subscription relationship explicitization engine to materialize the direct communication subscription relationship between the subscriber and publisher control blocks by parsing the string references of ExtRef elements; and it uses SWRL rules to infer and generate higher-order business semantics from the materialized relationships, including protection logic chains and signal flow, thereby generating an enhanced semantic model.
[0114] The semantic defect localization module constructs an enhanced SPARQL query engine. The query engine performs multi-dimensional constraint verification on the enhanced semantic model based on a predefined SHACL shape graph, thereby detecting semantic defects, including subscription relationship conflicts, electrical connection breaks, protection logic chain loops, and reverse signal flow; and generates a semantic defect localization report.
[0115] Preferably, the generation process of the SPD semantic knowledge graph includes: performing structured parsing on the SCL files in the SPD file dataset using an XML parser, extracting file header information to verify file type and version consistency, parsing IED elements, LD elements, and LN elements layer by layer, and recording the hierarchical structure and attributes; applying RDF mapping rules to map IED elements to subject identifiers, attributes to predicate relations, and values to objects; and using a predefined rule set and pattern matching mechanism to perform completion for non-standard tags and marking for missing attributes, generating an RDF triple set to form the SPD semantic knowledge graph, which serves as the input to the coupling entity linking and attribute fusion engine.
[0116] Furthermore, the process of generating the semantic digital twin of the substation configuration includes:
[0117] The SPD semantic knowledge graph is input into the coupled entity linking and attribute fusion engine. Cross-file entity similarity is calculated based on globally unique identifiers and Levenshtein distance, disambiguation and merging operations are performed, and attribute values from SCD, CID, and IID files are fused. Based on the contextual relationships defined in the IEC 61850 standard, including the inclusion relationship between Bay and VoltageLevel and the association relationship between ConductingEquipment and Terminal, semantic enhancement is achieved by adding triples. Figure 1 The consistency verification algorithm checks for no conflicts in the injected relationships and generates a semantic digital twin of the substation configuration containing disambiguated entities and merged attributes, which serves as input to the semantic inference engine.
[0118] Furthermore, the generation process of the enhanced semantic model includes: integrating the Apache Jena framework through a semantic inference engine to perform OWL ontology reasoning on the semantic digital twin configured for the substation; materializing the direct electrical connection relationships between conductive devices by traversing Terminal instances of shared connection nodes using a depth-first search algorithm through a connection node topology analyzer; materializing the communication subscription relationship between subscribers and publisher control blocks by parsing ExtRef element string references through a GOOSE subscription relationship explicitization engine; and generating high-order business semantics, including protection logic chains and signal flow, based on SWRL rule groups and executed through the Drools engine, using controlled recursive reasoning as input to the enhanced SPARQL query engine.
[0119] Furthermore, the direct electrical connection relationship includes: generating connection edges between ConductingEquipment entities based on the traversal results of the shared connection node Terminal instance, and injecting the topological association between the circuit breaker and the isolating switch; the direct communication subscription relationship includes: directional edges between the subscriber IED and the publisher control block based on the parsed ExtRef element, and using unique identifiers to associate and process many-to-many subscription scenarios to generate a non-redundant subscription relationship.
[0120] Furthermore, the construction process of the enhanced SPARQL query engine includes: extending the SPARQL syntax to support SHACL verification path queries; defining shape graph templates for CID and IID files, including node shapes for verifying IID entity attributes and attribute shapes for checking LN attribute ranges; integrating the SPARQL function extension module to support custom constraint logic; constructing a parallel query executor through a multi-threaded allocation algorithm to perform entity integrity verification, relation consistency verification, and attribute constraint verification on the enhanced semantic model, generating the query engine, and outputting the verification results as input for the semantic defect location report.
[0121] Furthermore, the semantic defect detection process includes: inputting the enhanced semantic model into the enhanced SPARQL query engine, loading the SHACL shape graph to perform node and attribute verification, and detecting missing attributes; performing connectivity and directionality checks on the materialized high-order business semantics by embedding SPARQL path queries to detect subscription conflict and electrical connection break; applying custom constraint logic to identify protection logic chain loops and signal flow reversals; summarizing subscription conflict, electrical connection break, protection logic chain loop, and signal flow reversals to generate a report containing defect type, entity identifier, constraint violation description, and repair path, and mapping the topological location of the defect in the enhanced semantic model using a PlantUML diagram.
[0122] (Subscription conflict) By executing a SPARQL ASK query, each materialized "direct communication subscription relationship" instance is verified to check whether its subscribed publisher control block (GSEControl) exists in the graph and whether the subscribed signal type (such as daName) is consistent with the publisher definition. If the control block does not exist or the type does not match, it is marked as "subscription conflict".
[0123] (Electrical Connection Disconnection) A SPARQL path query is used to perform connectivity checks on materialized "direct electrical connections." For example, it checks whether a complete topology path exists between a circuit breaker (LN class XCBR) and its connected disconnector (LN class XSWI) within the station, constructed through "direct electrical connections" (i.e., relationships materialized based on shared Terminal instances). If this path (in the graph) is not connected, it is marked as an "electrical connection disconnection."
[0124] Furthermore, the process of generating the SWRL rule set includes: defining a rule set based on the IEC 61850 standard and substation business logic, including protection logic chain generation rules and signal flow inference rules; adjusting rule priorities through historical verification data analysis; verifying the rule set to be conflict-free through the Drools engine, generating a recursively executable SWRL rule set, and injecting it into the enhanced semantic model as the reasoning basis for high-order business semantics.
[0125] Furthermore, the generation process of the semantic defect location report includes: extracting the defect type, affected entity identifier, and constraint violation description based on the verification results of the enhanced SPARQL query engine; generating repair path suggestions by tracing back the reasoning path and / or matching predefined defect patterns; mapping the defect location to a topology map using the PlantUML generation tool and embedding it into a JSON format report; and merging redundant defect entries using a report optimization algorithm to generate a final report containing defect location and repair suggestions.
[0126] This embodiment integrates knowledge graph construction (semantic digital twin), low-level relation materialization (electrical connection / communication subscription), high-order semantic reasoning (protection logic chain / signal flow), and enhanced SPARQL / SHACL verification (including custom loop detection) into a complete data processing and analysis closed loop. Its core innovation lies in adopting a stacked semantic processing architecture of "materialization-reasoning-re-verification": it first uses SWRL rules to infer high-order business semantics (such as protection logic chains) representing the dynamic behavior of the system on top of the static topology. Then, it uses the SPARQL / SHACL engine, which integrates a custom graph algorithm (DFS), to verify the logical correctness of these inferred high-order semantics. This enables the system to detect "emergent" logical defects (such as "protection logic chain loops"). Such defects do not exist in any single SPD configuration file but are only exposed after all configuration data is fused, reasoned, and forms a complete system-level functional chain. By constructing and verifying this "high-order semantic model," this invention achieves a deep review of the system's functional logic, effectively solving the shortcomings of traditional static verification methods.
[0127] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.< / extref> < / inputs> < / ied> < / customconfiga> < / ied> < / ied>
Claims
1. A method for compliance detection of substation SPD documents based on semantic verification, characterized in that, include: The structured configuration data of the SPD file dataset is transformed into an SPD semantic knowledge graph using an RDF triple generator. The coupling entity linking and attribute fusion engine uses globally unique identifiers to disambiguate and merge cross-file entities in the SPD semantic knowledge graph, and fuses attributes from different SCL file types. By explicitly injecting the contextual relationships implicit in the hierarchical nesting form in the standard SCL into triples, the semantics of the SPD semantic knowledge graph are enhanced, generating a substation configuration semantic digital twin containing disambiguated entities and fused attributes. The semantic inference engine performs the following operations in the semantic digital twin configuration of the substation: It activates the connection node topology analyzer to materialize the direct electrical connection relationships between conductive devices by traversing Terminal instances sharing the same connection node; it also activates the GOOSE subscription relationship explicitization engine to materialize the direct communication subscription relationship between the subscriber and publisher control blocks by parsing the string references of ExtRef elements; and it uses SWRL rules to infer and generate higher-order business semantics from the materialized relationships, including protection logic chains and signal flow, thereby generating an enhanced semantic model. An enhanced SPARQL query engine is constructed. The query engine performs multi-dimensional constraint verification on the enhanced semantic model based on a predefined SHACL shape graph, thereby detecting semantic defects, including subscription relationship conflicts, electrical connection breaks, protection logic chain loops, and reverse signal flow. It also generates a semantic defect location report.
2. The substation SPD document compliance detection method based on semantic verification according to claim 1, characterized in that: The generation process of the SPD semantic knowledge graph includes: performing structured parsing on SCL files in the SPD file dataset using an XML parser, extracting file header information to verify file type and version consistency, parsing IED elements, LD elements, and LN elements layer by layer to record the hierarchical structure and attributes; applying RDF mapping rules to map IED elements to subject identifiers, attributes to predicate relations, and values to objects; and using a predefined rule set and pattern matching mechanism to perform completion for non-standard tags and marking for missing attributes, generating a set of RDF triples to form the SPD semantic knowledge graph, which serves as the input to the coupling entity linking and attribute fusion engine.
3. The substation SPD document compliance detection method based on semantic verification according to claim 1, characterized in that: The process of generating the semantic digital twin of the substation configuration includes: The SPD semantic knowledge graph is input into the coupled entity linking and attribute fusion engine. Cross-file entity similarity is calculated based on globally unique identifiers and Levenshtein distance, disambiguation and merging operations are performed, and attribute values from SCD, CID, and IID files are fused. Based on the contextual relationships defined by the IEC 61850 standard, including the inclusion relationship between Bay and VoltageLevel and the association relationship between ConductingEquipment and Terminal, semantic enhancement is achieved by adding triples. The injected relationships are checked for conflict-free through a graph consistency verification algorithm, and a substation configuration semantic digital twin containing disambiguated entities and fused attributes is generated as input to the semantic inference engine.
4. The substation SPD document compliance detection method based on semantic verification according to claim 1, characterized in that: The generation process of the enhanced semantic model includes: integrating the Apache Jena framework through a semantic inference engine to perform OWL ontology reasoning on the semantic digital twin configured for the substation; materializing the direct electrical connection relationships between conductive devices by traversing Terminal instances of shared connection nodes using a depth-first search algorithm through a connection node topology analyzer; materializing the communication subscription relationship between subscribers and publisher control blocks by parsing ExtRef element string references through a GOOSE subscription relationship explicitization engine; and generating high-order business semantics, including protection logic chains and signal flow, based on SWRL rule groups and executed through the Drools engine, using controlled recursive reasoning as input to the enhanced SPARQL query engine.
5. The substation SPD document compliance detection method based on semantic verification according to claim 1, characterized in that: The direct electrical connection relationship includes: generating connection edges between ConductingEquipment entities based on the traversal results of the shared connection node Terminal instance, and injecting the topological association between the circuit breaker and the isolating switch; the direct communication subscription relationship includes: directional edges between the subscriber IED and the publisher control block based on the parsed ExtRef element, and using unique identifiers to associate and process many-to-many subscription scenarios to generate a non-redundant subscription relationship.
6. The substation SPD document compliance detection method based on semantic verification according to claim 1, characterized in that: The construction process of the enhanced SPARQL query engine includes: extending the SPARQL syntax to support SHACL verification path queries; defining shape graph templates for CID and IID files, including node shapes for verifying IID entity attributes and attribute shapes for checking LN attribute ranges; integrating the SPARQL function extension module to support custom constraint logic; constructing a parallel query executor through a multi-threaded allocation algorithm to perform entity integrity verification, relation consistency verification, and attribute constraint verification on the enhanced semantic model, generating the query engine, and outputting the verification results as input for the semantic defect location report.
7. The substation SPD document compliance detection method based on semantic verification according to claim 1, characterized in that: The semantic defect detection process includes: inputting the enhanced semantic model into the enhanced SPARQL query engine, loading the SHACL shape graph to perform node and attribute verification, and detecting missing attributes; performing connectivity and directionality checks on the materialized high-order business semantics by embedding SPARQL path queries to detect subscription conflict and electrical connection break; applying custom constraint logic to identify protection logic chain loops and signal flow reversals; summarizing subscription conflict, electrical connection break, protection logic chain loop, and signal flow reversals to generate a report containing defect type, entity identifier, constraint violation description, and repair path, and mapping the topological location of the defect in the enhanced semantic model using a PlantUML diagram.
8. The substation SPD document compliance detection method based on semantic verification according to claim 1, characterized in that: The process of generating the SWRL rule set includes: defining a rule set based on the IEC 61850 standard and substation business logic, including protection logic chain generation rules and signal flow inference rules; adjusting rule priorities through historical verification data analysis; verifying the rule set to be conflict-free through the Drools engine, generating a recursively executable SWRL rule set, and injecting it into the enhanced semantic model as the reasoning basis for high-order business semantics.
9. The substation SPD document compliance detection method based on semantic verification according to claim 1, characterized in that: The process of generating the semantic defect location report includes: extracting the defect type, affected entity identifier, and constraint violation description based on the verification results of the enhanced SPARQL query engine; generating repair path suggestions by backtracking the reasoning path and / or matching predefined defect patterns; mapping the defect location to a topology map using the PlantUML generation tool and embedding it into a JSON format report; and merging redundant defect entries using a report optimization algorithm to generate a final report containing defect location and repair suggestions.
10. A system applied to the substation SPD document compliance detection method based on semantic verification as described in claim 1, characterized in that, include: The graph construction module is used to transform the structured configuration data of the SPD file dataset into an SPD semantic knowledge graph through the RDF triple generator; The semantic digital twin construction module is used to couple the entity linking and attribute fusion engine. It uses globally unique identifiers to disambiguate and merge cross-file entities in the SPD semantic knowledge graph, and fuses attributes from different SCL file types. By explicitly injecting the contextual relationships implicit in the hierarchical nesting form in the standard SCL into triples, the SPD semantic knowledge graph is semantically enhanced, generating a substation configuration semantic digital twin containing disambiguated entities and fused attributes. The enhanced semantic model construction module initiates the semantic inference engine to perform the following operations in the semantic digital twin configuration of the substation: It links with the connection node topology analyzer to materialize the direct electrical connection relationships between conductive devices by traversing Terminal instances sharing the same connection node; it also links with the GOOSE subscription relationship explicitization engine to materialize the direct communication subscription relationship between the subscriber and publisher control blocks by parsing the string references of ExtRef elements; and it uses SWRL rules to infer and generate higher-order business semantics from the materialized relationships, including protection logic chains and signal flow, thereby generating an enhanced semantic model. The semantic defect localization module constructs an enhanced SPARQL query engine. The query engine performs multi-dimensional constraint verification on the enhanced semantic model based on a predefined SHACL shape graph, thereby detecting semantic defects, including subscription relationship conflicts, electrical connection breaks, protection logic chain loops, and reverse signal flow. It also generates a semantic defect location report.