A knowledge graph-based distribution box fault diagnosis method and system, and a medium

By using a knowledge graph-based approach, and leveraging topology node numbers and device hierarchies for terminology anchor indexing and entity recognition, a fault knowledge graph is constructed. This solves the problem of information extraction from non-standard fault logs, improves fault location accuracy and operational safety, and optimizes diagnostic capabilities.

CN123050622APending Publication Date: 2026-11-06HENAN RUNDA ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611193838.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-07
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately extract key information from non-standardized distribution box fault logs, making it impossible to build a highly reliable fault knowledge graph, accurately identify the electrical entities involved in the fault, and generate handling solutions that lack safety blocking mechanisms, thus increasing the operational risks for maintenance personnel.

Method used

By acquiring the fault logs and equipment ledgers of the distribution box, using the topology node number and device level as boundary constraints to perform term anchor indexing, constructing an event evidence tensor and performing entity recognition, generating a fault knowledge graph, recalling candidate root cause paths based on electrical topology adjacency relationships, and performing safety precondition verification to generate a handling plan.

Benefits of technology

It achieves multi-dimensional standardized mapping of fault logs, improves the accuracy and interpretability of fault location, reduces the risk of operation and maintenance, and optimizes diagnostic capabilities through incremental updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123050622A_ABST
    Figure CN123050622A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of power distribution operation intelligentization, and discloses a power distribution box fault diagnosis method and system based on a knowledge graph and a medium. The method comprises the following steps: acquiring fault logs and equipment account books, mapping non-standard expressions with topological nodes and device levels as constraints to obtain a term anchor point index; constructing an event evidence tensor, identifying an electrical entity set through a sequence labeling model, extracting a relationship edge in combination with a maintenance manual and a preposed constraint rule, and constructing a fault knowledge graph; extracting a device number, an action type and a timestamp of a real-time alarm event, positioning a target matching node in the graph, traversing a topological adjacency relationship to extract a candidate root cause subgraph and a root cause path set; generating a troubleshooting operation sequence according to the above, outputting a treatment scheme set after safety preconditions are verified; and updating graph relationship edge weights, path priorities and term anchor point reliabilities according to treatment feedback data increments. The application effectively improves the accuracy of power distribution box fault root cause diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent power distribution operation and maintenance technology, and in particular to a method, system and medium for fault diagnosis of distribution boxes based on knowledge graph. Background Technology

[0002] As a critical terminal node in power transmission, the accuracy of fault diagnosis for distribution boxes directly impacts power supply reliability. However, distribution box fault logs are typically described using natural language, leading to significant variations in how different maintenance personnel describe the same fault. This non-standardized recording method makes it difficult to accurately extract key information such as switch numbers, branch names, device aliases, and action words when constructing a mapping relationship between equipment ledgers and fault records. Consequently, it fails to provide highly reliable terminology anchor indexes for subsequent entity recognition and knowledge graph construction.

[0003] When a fault alarm occurs at a point in a distribution box, the fault is often not an isolated event but propagates along the electrical topology's adjacency relationships. Existing technologies, when processing fault logs, struggle to transform discrete fault descriptions into event evidence tensors that include multi-dimensional electrical business attributes such as event time, loop nodes, protection devices, and action types. This makes it difficult to accurately identify the device entities, fault phenomenon entities, and causative entities involved in the fault. Consequently, it becomes difficult to recall candidate root factor graphs based on electrical topology relationships in the fault knowledge graph, and it's impossible to clarify the relationships between the current loop, upstream switches, and downstream loads at the graph level. This often leads to diagnostic results pointing to faulty devices that are not topologically adjacent.

[0004] Even after locating potential faulty devices and candidate root cause paths in the fault knowledge graph, generating appropriate handling procedures remains a significant challenge. Different distribution boxes require vastly different safety pre-verification steps due to variations in circuit hierarchy, protection priorities, and power restoration conditions. Existing methods cannot automatically generate troubleshooting operation sequences based on candidate root factor graphs and sequentially verify and gate the power-off, voltage testing, tagging, isolation, reset, and trial power restoration conditions within the sequence. This results in generated handling plans lacking necessary safety blocking mechanisms, making it easy for maintenance personnel to overlook critical safety steps in emergency situations, increasing operational risks.

[0005] Therefore, a knowledge graph-based method for fault diagnosis of distribution boxes is needed. This method extracts terminology anchors from non-standard fault descriptions and constructs equipment ledger mappings. It transforms fault logs into event evidence tensors with electrical business attributes to accurately identify electrical entity sets. Then, it constructs a fault knowledge graph and recalls candidate root cause paths based on electrical topology adjacency relationships. Finally, it generates a handling plan through safety precondition verification and incrementally updates the knowledge graph based on handling feedback. Summary of the Invention

[0006] This application provides a knowledge graph-based method, system, and medium for fault diagnosis of distribution boxes, which can improve the accuracy of root cause diagnosis of distribution box faults.

[0007] Firstly, this application provides a knowledge graph-based method for fault diagnosis of distribution boxes, including: S1. Obtain the fault log of the distribution box and the equipment ledger containing operation and maintenance records and maintenance manuals. Using the topology node number and device level of the distribution box as boundary constraints, map the non-standard fault descriptions in the fault log to obtain the term anchor index. S2. Construct an event evidence tensor based on fault logs, equipment ledgers, and terminology anchor indexes. Use a pre-defined sequence labeling model to identify entities in the event evidence tensor to obtain a set of electrical entities. S3. Based on the maintenance manual and combined with the preset pre-processing constraint rules, the electrical entity set is subjected to relation extraction to obtain candidate fault relation edges. A fault knowledge graph is constructed based on the electrical entity set and the candidate fault relation edges. S4. Obtain real-time alarm events generated by the distribution box, extract the alarm device number, action type and timestamp from the real-time alarm events, and determine the target matching node in the fault knowledge graph; S5. Using the electrical topology adjacency relationship in the fault knowledge graph as the main index, traverse the target matching node in the fault knowledge graph, extract the candidate root factor graph, and determine the candidate root cause path set. S6. Generate a troubleshooting operation sequence based on the candidate root cause path set, perform safety precondition verification on the troubleshooting operation sequence in conjunction with the candidate root factor graph, and generate a set of disposal plans based on the verification results. S7. Obtain the handling feedback data corresponding to the set of handling solutions, and update the relation edge weights, handling path priorities, and term anchor credibility of the fault knowledge graph based on the handling feedback data to obtain an incrementally updated fault knowledge graph.

[0008] Secondly, this application provides a knowledge graph-based fault diagnosis system for distribution boxes, including: The anchor point index module is used to obtain the fault logs of the distribution box and the equipment ledger containing operation and maintenance records and maintenance manuals. Using the topology node number and device level of the distribution box as boundary constraints, it maps the non-standard fault descriptions in the fault logs to obtain the term anchor point index. The entity recognition module is used to construct an event evidence tensor based on fault logs, equipment ledgers, and terminology anchor indexes. It then uses a preset sequence labeling model to perform entity recognition on the event evidence tensor to obtain a set of electrical entities. The graph construction module is used to extract relationships from the electrical entity set based on the maintenance manual and in combination with preset pre-handling constraint rules to obtain candidate fault relationship edges, and to construct a fault knowledge graph based on the electrical entity set and the candidate fault relationship edges. The event location module is used to acquire real-time alarm events generated by the distribution box, extract the alarm device number, action type and timestamp from the real-time alarm events, and determine the target matching node in the fault knowledge graph. The root cause tracing module is used to traverse target matching nodes in the fault knowledge graph with electrical topology adjacency relationships as the main index, extract candidate root factor graphs, and determine the set of candidate root cause paths. The solution generation module is used to generate a troubleshooting operation sequence based on the candidate root cause path set, perform safety precondition verification on the troubleshooting operation sequence in combination with the candidate root factor graph, and generate a set of disposal solutions based on the verification results. The incremental update module is used to obtain the handling feedback data corresponding to the set of handling solutions, and update the relation edge weights, handling path priorities and term anchor credibility of the fault knowledge graph based on the handling feedback data, so as to obtain the incrementally updated fault knowledge graph.

[0009] Thirdly, this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the aforementioned knowledge graph-based distribution box fault diagnosis method.

[0010] Compared with the prior art, the beneficial effects of this application are at least as follows: 1. By using topology node numbers and device levels as boundary constraints, non-standard fault descriptions are standardized and mapped in multiple dimensions, and a term anchor index with credibility identifiers is established to solve the problem that the strong heterogeneity of fault log descriptions makes it difficult to reuse historical data in a structured manner.

[0011] 2. By constructing an event evidence tensor that integrates multi-dimensional electrical business attributes such as event time, loop node, protection device, and action type, and using a sequence labeling model with topological boundary penalty terms for entity recognition, the continuity of the extracted electrical entity set in the topological structure is ensured, and erroneous association of non-adjacent devices is suppressed.

[0012] 3. By constructing a fault knowledge graph carrying topological hierarchy and safety risk weights, and traversing the current loop and its superior and subordinate nodes based on electrical topological adjacency relationships to recall candidate root factor graphs, the root cause reasoning process embeds real electrical connection constraints, thereby improving the interpretability and accuracy of fault location.

[0013] 4. By performing safety pre-verification gating on the troubleshooting operation sequence of power outage, voltage testing, tagging, isolation, reset and trial power restoration conditions, a target disposal strategy or safety blocking instruction is generated. Safety procedures are integrated into the reasoning generation process to reduce the operational risks in the disposal stage. Furthermore, the relationship edge weights and terminology credibility of the knowledge graph are incrementally updated with the disposal feedback data to achieve adaptive optimization of diagnostic capabilities. Attached Figure Description

[0014] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 This is a flowchart of a knowledge graph-based fault diagnosis method for distribution boxes according to this application; Figure 2 A comparison chart of the accuracy of terminology standardization mapping in this application; Figure 3 The training loss convergence curve of the sequence labeling model in this application is shown. Figure 4 This is a visualization diagram of the fault knowledge graph in this application; Figure 5 This is a schematic diagram of the structure of a knowledge graph-based power distribution box fault diagnosis system according to this application. Detailed Implementation

[0016] This application provides a knowledge graph-based method, system, and medium for fault diagnosis of distribution boxes. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0017] For ease of understanding, the specific process of the embodiments of this application is described below. Please refer to [link / reference]. Figure 1 One embodiment of a knowledge graph-based method for diagnosing distribution box faults in this application includes: Step S1: Obtain the fault log of the distribution box and the equipment ledger containing operation and maintenance records and maintenance manuals. Using the topology node number and device level of the distribution box as boundary constraints, map the non-standard fault descriptions in the fault log to obtain the term anchor index.

[0018] In one specific embodiment, the process of performing step S1 may specifically include the following steps: Read the fault log and equipment ledger of the distribution box, and extract the switch number, branch name, device alias, load type, action word and disposal word from the fault log and equipment ledger; Perform multi-dimensional standardized mapping of switch number, branch name, device alias, load type, action word and disposal word to generate a terminology anchor table containing device dimension, loop dimension, action dimension and disposal dimension; Using the topology node number and device level of the distribution box as the boundary constraints for word segmentation, the term anchor table is used to match and verify non-standard expressions in the fault log to determine the term anchor index with credibility identifier.

[0019] Specifically, the fault logs of the distribution box originate from manual records by on-site maintenance personnel, alarm records from the automated monitoring system, work order systems of maintenance teams, or telephone repair reports. These logs are stored in text format, including structured database records, semi-structured work order records, and unstructured free text. The equipment ledger records static information for all equipment within the distribution box, including topology node numbers, device levels, switch numbers, branch names, device aliases, load types, action words, and disposal words. Switch numbers, branch names, device aliases, load types, action words, and disposal words are extracted from the fault logs and equipment ledger using regular expression matching, keyword recognition, and contextual analysis techniques. Switch numbers are presented as purely numeric numbers, alphanumeric numbers, or numbers containing special characters. All possible switch identifiers are extracted using regular expression pattern matching and verified and standardized according to the equipment ledger. Branch names are defined by maintenance personnel based on load usage or location, including location and load type information. Terms indicating location and load type are identified, and these terms are combined into a complete branch name. This name is then matched against loop nodes in the equipment ledger to obtain the standard loop number. Device aliases are simplified or colloquial names of standard devices used by maintenance personnel. A device alias dictionary is established, mapping aliases to standard device types. Load types include lighting loads, socket loads, air conditioning loads, power loads, elevator loads, and charging pile loads, identified through keyword matching. Action words describe equipment status changes, including tripping, opening, closing, disconnecting, shutting down, acting, and resetting, identified through a verb dictionary and semantic analysis. Disposal words describe maintenance personnel's actions, including replacing, repairing, tightening, cleaning, resetting, closing, and powering on, identified through a verb dictionary. The extracted six types of data constitute the original corpus set for subsequent standardized mapping.

[0020] The extracted switch numbers, branch names, device aliases, load types, action terms, and disposal terms are standardized and mapped in multiple dimensions to generate a terminology anchor table containing device, circuit, action, and disposal dimensions. The mapping process uses standard terminology from the maintenance manual as authoritative reference and topology node numbers from the equipment ledger as verification criteria. At the device dimension, circuit breakers, residual current devices (RCDs), and small switches are mapped to circuit breakers; AC contactors and magnetic switches are mapped to contactors, with the rated current range and breaking capacity range recorded as additional attributes. At the circuit dimension, the east side line, lighting circuit, and office power supply are mapped to standard circuit numbers. During mapping, location information and load type information are decomposed, and circuit nodes that simultaneously meet the location and load type conditions are searched in the equipment ledger. At the action dimension, tripped, disconnected, and not powered are mapped to tripped circuit breakers; closed and pushed-up are mapped to closed circuit breakers. At the disposal dimension, replaced and repaired are mapped to replaced devices and repaired. A combination of semantic similarity calculation and topological constraint verification is used to complete the mapping. Semantic similarity is achieved using a cosine similarity algorithm with a threshold of 0.85. This threshold is statistically derived from manually annotated correct mapping samples in historical fault logs, ensuring a mapping accuracy higher than a preset standard. When multiple candidate standard terms exist for the same non-standard expression, disambiguation is performed through topological constraint verification, checking whether the topological node number corresponding to the candidate standard term exists in the power distribution area indicated by the fault log context. For example, if switch number 1 appears in the fault log, the candidate mappings are SW-001 and SW-011. Disambiguation is performed by identifying the circuit to which SW-001 belongs in the East Lighting and Equipment Ledger as the East Lighting circuit, which appear simultaneously in the branch name East Lighting. The term anchor table's data structure includes original expression fields, standard term fields, mapping rule fields, and additional attribute fields. These four sub-tables are linked through the original expression fields, forming a multi-dimensional mapping network.

[0021] Using the topology node numbers and device levels of the distribution box as boundary constraints for word segmentation, a terminology anchor table is used to match and verify non-standard expressions in the fault log, determining terminology anchor indexes with credibility indicators. The topology node numbers follow a hierarchical naming rule, including distribution room numbers, feeder numbers, and branch numbers. All topology node numbers are extracted from the equipment ledger as the word segmentation dictionary. The device level represents the positional relationship of equipment in the distribution box, from the power supply side to the load side: main incoming line, busbar, feeder, branch circuit, and terminal load. The word segmentation process employs a combination of forward longest matching and backward longest matching based on the topology node number dictionary, prioritizing strings that conform to the numbering rules as wholes. For strings that do not conform to the standard numbering rules, bidirectional maximum matching is performed according to the terminology anchor table, and illegal segments are filtered out by combining device level constraints. The role of device-level constraints is reflected in the fact that when a term is identified as a circuit breaker, it is inferred that there should be a bus or upstream circuit breaker upstream of the device, and a branch circuit or load downstream. If the contextual inference result does not match the topological connection relationship in the equipment ledger, the segmentation result is judged as illegal. For example, if the fault log shows a sudden power outage of the lighting on the west side of the second floor of an office building, the corresponding power distribution area number of the office building, the corresponding floor and orientation information of the west side of the second floor, the load type corresponding to the lighting, and the power outage corresponding to the power failure state are identified. Through the topological node number constraint, it is confirmed that there is a circuit number B2W1L in this area, and the power outage is mapped to the power failure state. After the matching verification is passed, a credibility identifier is calculated for each mapping relationship. The credibility identifier is obtained by weighted summation of the mapping uniqueness score, the topological constraint satisfaction score, the historical verification frequency score, and the information source reliability score, with weight coefficients set to 0.25, 0.30, 0.25, and 0.20, respectively. The weights are determined by the analytic hierarchy process based on the degree of influence of each factor on the mapping accuracy. The credibility identifier ranges from 0 to 1, with values ​​closer to 1 indicating a more reliable mapping. The terminology anchor index is stored in a hash table, where the key is a non-standard expression and the value is a combination of standard terms and the credibility identifier, providing a structured data foundation for subsequent event evidence tensor construction.

[0022] refer to Figure 2 This figure is a comparison of the accuracy of terminology standardization mapping, showing the changes in terminology mapping accuracy of the multi-dimensional mapping method of this application, single-rule mapping, and traditional dictionary mapping under different signal-to-noise ratio conditions. The horizontal axis represents the signal-to-noise ratio, the vertical axis represents the mapping accuracy, and the three curves correspond to the method of this application, the traditional dictionary method, and the rule matching method, respectively.

[0023] Step S2: Construct an event evidence tensor based on fault logs, equipment ledgers, and terminology anchor indexes. Use a preset sequence labeling model to identify entities in the event evidence tensor to obtain a set of electrical entities.

[0024] In one specific embodiment, the process of performing step S2 may specifically include the following steps: The fault event information in the fault log is analyzed, and the standardization mapping of non-standard expressions is completed by combining the terminology anchor index. Based on the device attributes, circuit attribution and load information in the equipment ledger, electrical business attributes are supplemented, and an event evidence tensor is constructed. The event evidence tensor includes event time, circuit node, protection device, action type, reset status, environmental cause and record source credibility. By using a pre-defined sequence labeling model to label the sequence data of the event evidence tensor, a set of electrical entities including device entities, fault phenomenon entities, cause entities, and handling action entities is identified.

[0025] Specifically, the fault event information in the fault log is parsed, and the fault log is preprocessed to remove irrelevant characters and standardize the text format. Using a terminology anchor index, non-standard expressions in the fault log are mapped to standard terms. The terminology anchor index stores the correspondence between non-standard expressions and standard terms, along with their reliability indicators, in the form of a hash table. Mapping is performed in descending order of reliability indicators, prioritizing mappings with reliability indicators higher than 0.8. For fault event information that has undergone standardized mapping, electrical business attributes are supplemented based on device attributes, circuit affiliation, and load information in the equipment ledger. Device attributes include rated current, breaking capacity, and protection curve type; circuit affiliation includes the substation number, feeder number, and branch number; load information includes load type, power rating, and operating period. Based on this information, an event evidence tensor is constructed. This tensor is a multi-dimensional vector structure, with dimensions including at least event time, circuit node, protection device, action type, reset status, environmental trigger, and record source reliability. The event time dimension is extracted using time expression recognition technology, converting relative and fuzzy time expressions into standard timestamps, and further extracting hours, days of the week, and seasons as sub-dimensions. The circuit node dimension uses a vocabulary index to convert standard circuit numbers into integer codes. The protection device dimension includes device type and rated parameters. The action type dimension uses multi-label coding to distinguish between protection trip, erroneous trip, failure to operate, and manual tripping. The reset status dimension includes successful automatic reset, successful manual reset, failed reset, and no reset attempt. The environmental trigger dimension is obtained through keyword matching and association with meteorological data. The record source credibility dimension is assigned a value based on the information source channel: 0.9 for alarm records from automated monitoring systems, 0.7 for on-site records from maintenance personnel, and 0.5 for telephone repair reports. Missing dimensions are filled with a negative 1, and a masking mechanism is used to reduce the impact of missing dimensions on subsequent processing.

[0026] The sequence data of event evidence tensors are labeled using a pre-defined sequence labeling model. This model employs a bidirectional long short-term memory (LSTM) network combined with a conditional random field (CRF) architecture. The input layer receives the sequence of event evidence tensors, with one event evidence tensor corresponding to each time step. The embedding layer maps the high-dimensional sparse vectors of the input layer to low-dimensional dense vectors. The embedding dimension is set to 128, a value determined based on the size of the terminology and the number of entity types in the power distribution field, balancing representational capability and computational efficiency. The bidirectional LSM network includes forward LSM and backward LSM layers, with 128 hidden units in each layer. A gating mechanism is used to capture the forward and backward contextual dependencies of the sequence. The CRF layer, located in the output layer, applies label transfer constraints to the feature vectors output by the bidirectional LSM network. The Viterbi algorithm is used to decode the globally optimal label sequence, outputting the entity type label corresponding to each position. The labeling system adopts the BIO annotation method, including 9 labels: B-device entity, I-device entity, B-fault phenomenon entity, I-fault phenomenon entity, B-cause entity, I-cause entity, B-action entity, I-action entity, and O. The label transition matrix of the conditional random field layer has a dimension of 9×9. During model training, the total loss function is composed of a weighted sum of the basic cross-entropy labeling loss, the device number continuity penalty term calculated based on the shortest path of the equipment ledger topology map, and the protection action entity integrity penalty term for checking the integrity of the fault phenomenon-device-cause triplet. The Adam optimizer is used for parameter optimization, with an initial learning rate of 0.001, a batch size of 32, a maximum of 50 training epochs, and an early stopping strategy.

[0027] The sequence labeling model is trained using labeled historical fault logs as training samples. Each training sample contains the fault log text, the corresponding event evidence tensor sequence, and a manually labeled entity label sequence. The training objective is to optimize the parameters by minimizing the total loss function. The total loss function is a weighted average of the basic labeling loss, the device number continuity penalty, and the protection action entity integrity penalty. The basic labeling loss uses the cross-entropy loss function to measure the difference between the predicted label sequence and the true label sequence. The device number continuity penalty calculates the shortest path length between two device entities by directly parsing the static hierarchical relationship between the switch numbers and topology node numbers pre-stored in the equipment ledger. If the two device entities are directly connected, the penalty is 0; if there is one intermediate node between them, it is 0.5; if there are two or more intermediate nodes between them or they are not connected, it is 1.0. The protection action entity integrity penalty is implemented by checking whether there are device entities and causative entities near the fault phenomenon entity. If all three elements are present, the penalty is 0; if the device entity is missing, it is 0.4; if the inducing entity is missing, it is 0.6; if both are missing, it is 1.0. The total loss function is calculated as follows: ,in Based on annotation loss, This is a penalty for continuity of device numbering. Penalty item to protect the integrity of action entities. Weighting coefficient. The weights were set to 1.0, 0.3, and 0.2 respectively. This set of weights was determined by grid search on the validation set, with a search range of 0.1 to 0.5 and a step size of 0.1. The weight combination that maximized the F1 score was selected. The optimizer used was Adam, with an initial learning rate of 0.001, a batch size of 32, a maximum training epoch of 50, and an early stopping strategy with a patience threshold of 5 epochs, meaning training would terminate if the validation set loss did not decrease for 5 consecutive epochs.

[0028] The trained sequence labeling model performs forward inference on the input event evidence tensor sequence. A bidirectional long short-term memory network extracts contextual feature vectors step by step, and a conditional random field layer outputs the globally optimal labeled sequence based on label transition probabilities. Through BIO label decoding, the labeled sequence is converted into a set of electrical entities. The electrical entity set includes four categories: device entities, fault phenomenon entities, cause entities, and action entities. Each entity includes entity text, entity type, entity position in the original text, and entity confidence. Device entities refer to circuit breakers, contactors, cables, and load equipment involved in the distribution box; fault phenomenon entities describe tripping, power loss, overheating, and abnormal noise; cause entities describe overload, short circuit, leakage, and device aging; and action entities describe closing, device replacement, and maintenance. For example, for the segment in the event evidence tensor sequence corresponding to the tripping of the East District feeder circuit breaker due to overload, the sequence labeling model outputs a labeling sequence of B-device, I-device, I-device, B-cause, I-cause, B-phenomenon, I-phenomenon. After decoding, the device entity East District feeder circuit breaker, the cause entity overload, and the fault phenomenon entity tripping are obtained.

[0029] refer to Figure 3 This figure shows the convergence curve of the training loss of the sequence labeling model, illustrating the changing trends of the training set loss and validation set loss with each iteration during model training. The horizontal axis represents the training iteration, and the vertical axis represents the loss value. The solid line represents the training loss, the dashed line represents the validation loss, and the black vertical dashed line marks the early stopping position.

[0030] Step S3: Based on the maintenance manual and the preset pre-processing constraint rules, extract the relationships from the electrical entity set to obtain candidate fault relationship edges, and construct a fault knowledge graph based on the electrical entity set and the candidate fault relationship edges.

[0031] In one specific embodiment, the process of performing step S3 may specifically include the following steps: Extract fault phenomenon nodes, troubleshooting item nodes, handling operation nodes and power restoration condition nodes from the maintenance manual, determine the associated constraints between each node, and generate a relational legality matrix representing the legal connection relationships between nodes. Based on the relationship legality matrix and the preset pre-processing constraint rules, the causal relationships, processing relationships and mutual exclusion relationships between entities in the electrical entity set are extracted to obtain candidate fault relationship edges; Based on the relationship edges between the electrical entity set and the candidate faults, a heterogeneous knowledge graph is constructed, which includes loop nodes, device nodes, phenomenon nodes, root cause nodes and standard operating procedure nodes. Configure loop hierarchy attributes, protection priority attributes, reset condition attributes, and security risk weight attributes for each node in the heterogeneous knowledge graph to obtain a fault knowledge graph carrying topology hierarchy and security risk weight.

[0032] Specifically, the maintenance manual, provided by the equipment manufacturer, records the equipment's technical parameters, fault symptoms, troubleshooting methods, handling procedures, and power restoration conditions. Fault symptom nodes, troubleshooting item nodes, handling operation nodes, and power restoration condition nodes are extracted from the maintenance manual. Fault symptom nodes represent situations where the equipment deviates from normal operating conditions, including tripping, power loss, overheating, and abnormal noise; troubleshooting item nodes represent inspection items, including checking wiring terminals, measuring insulation resistance, and verifying protection settings; handling operation nodes represent handling measures, including replacing circuit breakers, tightening connections, and adjusting settings; power restoration condition nodes represent the prerequisites for power restoration, including insulation resistance greater than 0.5MΩ, normal load current, and no abnormal odors or noises. Four types of nodes are extracted from the maintenance manual text through keyword matching and template extraction, with each node assigned a node identifier and type label. The following constraints are established for the relationships between nodes: A pre-defined association exists between fault phenomenon nodes and troubleshooting item nodes; overload tripping is associated with checking load current troubleshooting items. A constraint association exists between troubleshooting item nodes and handling operation nodes; tightening joints is performed after confirming poor contact. A temporal association exists between handling operation nodes and power restoration condition nodes; power can only be restored after the insulation test is passed following device replacement. Based on these constraints, a relationship validity matrix is ​​generated. This matrix is ​​a 4×4 square matrix, with rows and columns corresponding to the four types of nodes: fault phenomenon nodes, troubleshooting item nodes, handling operation nodes, and power restoration condition nodes. Matrix elements are either 0 or 1; 1 indicates that a relationship edge is allowed between the corresponding node type in the row and the corresponding node type in the column, and 0 indicates that it is not allowed. Specifically, the values ​​are: 1 for connections from fault phenomenon nodes to troubleshooting item nodes, 1 for connections from troubleshooting item nodes to handling operation nodes, 1 for connections from handling operation nodes to power restoration condition nodes, and 0 for connections from fault phenomenon nodes to handling operation nodes; all other prohibited connections are represented by 0. This matrix serves as a rigid constraint for relationship extraction, ensuring that the subsequently constructed knowledge graph conforms to the order specified in the maintenance manual.

[0033] Based on the relationship validity matrix and preset pre-condition constraints, causal relationships, handling relationships, and mutual exclusion relationships among entities in the electrical entity set are extracted to obtain candidate fault relationship edges. The pre-condition constraints are derived from electrical safety operating procedures, specifying the prerequisites that must be met before an operation can be performed, including disconnecting the power supply switch and verifying voltage before replacing components, confirming fault resolution before closing the circuit breaker, and hanging warning signs before maintenance. Causal relationship extraction analyzes the co-occurrence patterns and temporal relationships between the causal entity and the fault phenomenon entity. If there are causal correlation words in the text and both co-occur more than a threshold of 5 times in the fault log, a causal relationship edge is established from the causal entity to the fault phenomenon entity. This threshold is set based on the total number of fault log entries and the statistical significance level, taking the lowest frequency corresponding to a confidence level of 0.95. Handling relationship extraction, based on the pre-condition constraints, checks whether the handling action entity and the fault phenomenon entity meet the pre-conditions. If they do, a handling relationship edge is established from the fault phenomenon entity to the handling action entity. Mutually exclusive relationships are extracted to identify entity pairs that cannot be simultaneously established. If two root cause entities are mutually exclusive at the physical level or two action actions conflict at the logical level, a mutually exclusive relationship edge is established. Causal relationship edges are directly constructed based on the co-occurrence frequency and temporal sequence relationship between the inducing entity and the fault phenomenon entity, and are not constrained by the relationship validity matrix. The relationship validity matrix is ​​only used to filter connections between four types of nodes: fault phenomenon, investigation item, action action, and power restoration condition. For example, a causal relationship is allowed between the fault phenomenon node and the investigation item node, but a direct connection is not allowed between the power restoration condition node and the fault phenomenon node. Each candidate fault relationship edge records the relationship type, starting node identifier, target node identifier, and initial weight. The initial weight is obtained by normalizing the co-occurrence frequency and ranges from 0 to 1.

[0034] Based on the electrical entity set and candidate fault relationship edges, a heterogeneous knowledge graph is constructed, comprising loop nodes, device nodes, phenomenon nodes, root cause nodes, and standard operating procedure (SOP) nodes. Loop nodes correspond to power supply loops within a distribution box, recording the loop number, distribution room number, and voltage level, extracted from the topology node numbers in the equipment ledger. Device nodes correspond to circuit breakers, contactors, cables, and load equipment, recording the device number, type, and rated parameters. Phenomenon nodes correspond to fault phenomenon entities, recording the phenomenon description and frequency of occurrence. Root cause nodes correspond to cause entities, recording the root cause type and number of verifications. Standard operating procedure (SOP) nodes are formed by integrating handling operation nodes and power restoration condition nodes, recording operation steps, required tools, and safety requirements. Nodes are connected through candidate fault relationship edges, forming a heterogeneous network. Topology connection relationship edges are imported from the equipment ledger, representing the electrical connection relationship between device nodes and loop nodes; causal relationship edges connect phenomenon nodes and root cause nodes; handling relationship edges connect phenomenon nodes and SOP nodes; and mutually exclusive relationship edges connect mutually exclusive node pairs. The data structure of the heterogeneous knowledge graph adopts an attribute graph model, where each node contains a list of attributes and each edge contains the relation type and weight.

[0035] Each node in the heterogeneous knowledge graph is configured with a loop hierarchy attribute, protection priority attribute, reset condition attribute, and security risk weight attribute to obtain a fault knowledge graph carrying topology hierarchy and security risk weight. The loop hierarchy attribute represents the depth of the node in the distribution topology: 1 for main incoming line, 2 for busbar, 3 for feeder, 4 for branch circuit, and 5 for terminal load. This attribute is parsed from the topology node number in the equipment ledger. The protection priority attribute represents the order of action of protective devices: 1 for terminal circuit breakers, 2 for upstream feeder circuit breakers, and 3 for incoming circuit breakers. This is determined based on the coordination relationship between protection settings and time delays; the smaller the value, the earlier the action should be. The reset condition attribute represents the conditions required for a node to recover from a fault state, including manual reset, automatic reset, reset after device replacement, and reset after maintenance. This is determined based on the device type and fault mode in the maintenance manual. The safety risk weight attribute represents the level of safety risk associated with the operation of that node, with a value ranging from 0 to 1. High-voltage equipment has a value of 0.8, low-voltage equipment has a value of 0.3, and live-line operations have an additional 0.2 on top of the base value. This attribute is calculated based on a weighted average of voltage level, operation type, and accident data, with the weighting coefficient set according to industry standards. Through the above attribute configuration, each node in the fault knowledge graph possesses both semantic information and electrical safety attributes.

[0036] refer to Figure 4 This diagram is a visualization of a fault knowledge graph, showing a heterogeneous network structure of five types of nodes: loop nodes, device nodes, phenomenon nodes, root cause nodes, and standard operating procedure nodes, as well as the topological connection edges, causal relationship edges, and handling relationship edges between them.

[0037] Step S4: Obtain the real-time alarm events generated by the distribution box, extract the alarm device number, action type and timestamp from the real-time alarm events, and determine the target matching node in the fault knowledge graph.

[0038] In one specific embodiment, the process of performing step S4 may specifically include the following steps: The system performs structured analysis on real-time alarm events, extracting alarm device number, action type, and timestamp. Based on the alarm device number, the corresponding device node is retrieved in the fault knowledge graph to obtain the initial matching node; Based on the pre-stored correspondence between device type and action type in the fault knowledge graph, determine the compatibility score between the device type attribute and action type of the initial matching node, and select the initial matching node with a compatibility score greater than the preset compatibility threshold as the valid matching node. Based on the timestamp, retrieve the historical alarm records and node attribute information corresponding to the valid matching node, perform matching verification, and determine the final target matching node.

[0039] Specifically, real-time alarm events are generated by the power distribution automation system or terminal equipment and transmitted via the IEC 60870-5-104 remote control communication protocol or the IEC 61850 communication network protocol. The real-time alarm events are structured and parsed to extract the alarm device number, action type, and timestamp from the protocol data unit. The alarm device number is unique within the distribution box, and the naming rules include the device type code, distribution room number, feeder number, and branch number. The action type describes the device status change, including tripping, closing, opening, refusal to close, refusal to trip, leakage tripping, and thermal overload protection actions. The timestamp records the alarm generation time with an accuracy of 0.001 seconds. The structured parsing process converts the binary message into text fields according to the protocol specifications, establishing a mapping relationship between field names and field values. After extraction, the alarm device number is validated, and the validation rules include field non-empty checks, character format checks, and encoding rule checks. If the alarm device number contains a character field that does not match the device log, the alarm event will be marked as an event with a confidence level of less than 0.3 and its subsequent processing priority will be reduced.

[0040] The system retrieves the corresponding device node from the fault knowledge graph based on the alarm device number. The device nodes in the fault knowledge graph are indexed using a hash table, with the device number as the index key and the node identifier and node attributes as the index values. A key-value search is performed in the hash table using the alarm device number. If an index key that exactly matches the alarm device number exists, the corresponding node identifier is returned as the initial matching node. The initial matching node carries attributes such as device type, circuit level, protection setting, historical fault frequency, and installation location. If no matching index key is found, substring-based matching is performed according to the naming rules of the topology node numbers. The distribution room number and feeder number from the alarm device number are extracted to narrow the search scope before matching again. For example, if the alarm device number is QF-A2-F3-B5, a completely matching device node is found in the hash table. The node attributes show that the device type is a circuit breaker, the circuit is feeder 3 branch 5 in distribution room A2, and the rated current is 63A.

[0041] Based on the pre-stored correspondence between device types and action types in the fault knowledge graph, the compatibility score between the device type attribute and action type of the initial matching node is determined. The correspondence between device types and action types is stored in matrix form, with rows representing device types and columns representing action types. The matrix has a dimension of 5×7, and the matrix element values ​​range from 0 to 1. The compatibility score is 1.0 for circuit breakers and tripping, 0.0 for circuit breakers and residual current circuit breakers (RCCBs), 0.0 for disconnectors and tripping, 0.8 for disconnectors and opening circuit breakers, 1.0 for RCCBs and RCCBs, 1.0 for thermal relays and thermal overload protection actions, and 0.9 for contactors and failure to close. The compatibility score is obtained by querying this matrix. The preset compatibility threshold is set to 0.6. This value is determined based on the statistical accuracy of device type and action type matching in historical alarm data over the past 12 months, with a statistical sample size of no less than 500 records, ensuring that this threshold can filter out 90% of false alarms. Initial matching nodes with a compatibility score greater than 0.6 are selected as valid matching nodes. If the compatibility score is less than or equal to 0.6, the node is marked as incompatible and removed.

[0042] Based on the timestamp, retrieve the historical alarm records and node attribute information corresponding to the valid matching node and perform matching verification. The historical alarm records contain the alarm time, action type, and power restoration result of the node in the past 30 days. Compare the current timestamp with the time in the historical alarm records to calculate the time interval. If the time interval is less than 24 hours and the action type is the same, increase the aging weight coefficient of the node. The initial value of the aging weight coefficient is 0, and it increases by 0.1 each time the same action type alarm recurs within 24 hours, with an upper limit of 0.5. If there are other alarms within a 10-second time window before and after the node, collect the associated alarm group. The determination of associated alarms is based on topological adjacency and time proximity. The time window is set to 10 seconds because the protection action level difference time in the distribution box is usually greater than 0.5 seconds and less than 5 seconds. After considering communication delay, 10 seconds is taken. Verify whether the current alarm is related to equipment aging by checking the installation time, the last maintenance time, and the number of years of operation in the node attribute information. For example, if the timestamp shows that the alarm occurred in August, and historical alarm records show that the node experienced three overload trips in the past seven days, then it is determined that the node has a tendency for protection setting drift due to aging. After matching and verification, the final target matching node is determined from the valid matching nodes. The target matching node is the entry node in the fault knowledge graph used for subsequent root cause tracing.

[0043] Step S5: Using the electrical topology adjacency relationship in the fault knowledge graph as the main index, traverse the target matching node in the fault knowledge graph, extract the candidate root factor graph, and determine the candidate root cause path set.

[0044] In one specific embodiment, the process of performing step S5 may specifically include the following steps: Using the electrical topology adjacency relationship in the fault knowledge graph as the main index, starting from the target matching node, we traverse the upper-level switches and power supply nodes upwards along the power supply relationship edge, and traverse the lower-level loads and branch devices downwards, while locating the current complete power supply circuit to which the target matching node belongs. Collect the device nodes in the current complete power supply circuit, as well as the fault phenomenon nodes, root cause nodes and handling operation nodes associated with each device node, extract all the association edges between the nodes, and generate a candidate root factor graph. Based on the preset pruning rules, the candidate root factor graph is pruned and optimized to obtain the pruned candidate root factor graph. In the pruned candidate root factor graph, heuristic path search is performed from the fault phenomenon node associated with the target matching node to the root cause node and the handling operation node to generate the initial root cause path. Based on the relation edge weights, historical verification information, and alarm scenario matching information corresponding to the initial root cause path, the initial root cause path is comprehensively scored, and the initial root cause paths with comprehensive scores greater than the preset score threshold are selected to form a candidate root cause path set.

[0045] Specifically, using the electrical topology adjacency relationships in the fault knowledge graph as the main index, starting from the target matching node, the system traverses upwards along the power supply relationship edges to connect upstream switches and power supply nodes, and downwards to connect downstream loads and branch devices, while simultaneously locating the current complete power supply circuit to which the target matching node belongs. The electrical topology adjacency relationships are stored in the fault knowledge graph as directed edges, with relationship types including power supply relationships, protection relationships, and parallel relationships. Each edge carries relationship direction and weight attributes. Starting from the target matching node, a depth-first traversal is performed upstream along the power supply relationship edges, with a maximum traversal depth of 3 levels. This maximum depth is determined based on engineering experience that the protection levels within a distribution box typically do not exceed 3 levels. The upward traversal collects information on the direct upstream switches, the upstream-highest incoming switches, and busbar nodes. A breadth-first traversal is performed downstream along the power supply relationship edges, with a maximum traversal depth of 3 levels. The downward traversal collects information on downstream branch devices, end-load equipment, and the power level and operating status of each load node. During the traversal, the complete power supply path from the power node to the target matching node and then to the end load is traced synchronously. All nodes on this path constitute the current complete power supply loop. The current complete power supply loop includes loop nodes, device nodes, and load nodes. Loop nodes record the loop number and voltage level, device nodes record the device number and protection settings, and load nodes record the load type and power parameters. For example, the target matching node is circuit breaker QF-A2-F3-B5. Traversing upwards, the upstream feeder circuit breaker QF-A2-F3 and the incoming circuit breaker QF-A2-M are collected. Traversing downwards, the air conditioning load AC-B5-01 and the socket load SO-B5-02 are collected. The current complete power supply loop is the power supply path from bus A2-M through QF-A2-F3 and QF-A2-F3-B5 to the end load.

[0046] Collect the device nodes within the current complete power supply circuit, as well as the fault phenomenon nodes, root cause nodes, and handling operation nodes associated with each device node. Extract all the relationship edges between nodes to generate a candidate root factor graph. Traverse each device node within the current complete power supply circuit, and search the fault knowledge graph for fault phenomenon nodes, root cause nodes, and handling operation nodes associated with the device node. Fault phenomenon nodes are connected to device nodes through causal relationship edges, recording descriptions of tripping, power loss, and overheating phenomena. Root cause nodes are connected to fault phenomenon nodes through causal relationship edges, recording root cause types such as overload, short circuit, leakage, and device aging. Handling operation nodes are connected to fault phenomenon nodes or root cause nodes through handling relationship edges, recording operations such as equipment inspection, device replacement, and connector tightening. Extract all relationship edges between nodes, including topological connection edges, causal relationship edges, handling relationship edges, and mutually exclusive relationship edges. The candidate root factor graph is organized in the form of an attribute graph. The node set includes circuit nodes, device nodes, phenomenon nodes, root cause nodes, and handling operation nodes, and the edge set includes the above four types of relationship edges. The data size of the candidate root factor graph is determined by the number of nodes in the current complete power supply circuit and the amount of historical associated data. For example, the candidate root factor graph containing circuit breaker QF-A2-F3-B5 contains 5 device nodes, 8 fault phenomenon nodes, 12 root cause nodes and 6 handling operation nodes, as well as 34 relation edges connecting these nodes.

[0047] The candidate root factor graph is pruned and optimized based on preset pruning rules to obtain the pruned candidate root factor graph. The pruning rules include historical relevance pruning, attribute matching degree pruning, and relationship strength pruning. Historical relevance pruning filters nodes based on their frequency of occurrence in historical alarm records, retaining nodes that have appeared more than twice in the past 90 days and removing isolated nodes with a frequency of 0 or 1. This time window and frequency threshold are set based on the fault cycle characteristics of the distribution box. Attribute matching degree pruning matches the current alarm action type with the node attributes. If the current alarm action type is overload tripping, it retains root cause nodes and fault phenomenon nodes related to overload and removes nodes related to short circuits and leakage. Relationship strength pruning filters based on the weight of relationship edges, retaining relationship edges with a weight greater than 0.3 and removing weakly related edges with a weight less than 0.3. This threshold is determined based on the statistical distribution of relationship edge weights to ensure that the retained relationship edges cover more than 80% of the historical effective associations. In the pruned candidate root factor graph, a heuristic path search is performed starting from the fault phenomenon node associated with the target matching node and proceeding towards the root cause node and the handling operation node. The heuristic path search uses the A* search algorithm, with the evaluation function being... ,in This represents the cumulative path weight from the starting point to the current node n. This represents the heuristic estimate from the current node n to the target node. The cumulative path cost is calculated by accumulating the weights of each relation edge along the path. Specifically, the weight value of each relation edge traversed from the starting node to the current node n is added together to obtain the cumulative path cost. The larger the weight value, the more reliable the relationship is in historical data. The heuristic cost is estimated by weighting and summing the historical verification frequency of a node with the matching degree of the alarm scenario. The historical verification frequency is the number of times the node has been identified as the true root cause in past fault handling, after normalization. The alarm scenario matching degree is calculated by comparing the current alarm occurrence time, ambient temperature, and load type with the historical occurrence patterns of the fault types associated with that node. The average score of the three dimensions is then weighted and summed with the normalized historical verification frequency value according to preset weighting coefficients to obtain the heuristic cost estimate. The alarm scenario matching degree is calculated based on the current time, ambient temperature, and load type. A matching degree of 0.8 is used for overload root causes during high-temperature summer periods, and 0.7 is used for condensation root causes during low-temperature winter periods. The path search direction extends from the fault phenomenon node to the root cause node, and then from the root cause node to the handling operation node, forming a phenomenon-root cause-handling reasoning chain. During the search process, each expansion selection... The node with the smallest value is used to traverse the pruned candidate root factor graph until all reachable nodes are traversed, generating an initial root cause path set. An initial root cause path is a directed path starting from the fault phenomenon node, passing through the root cause nodes, and reaching the handling operation node.

[0048] Based on the relation edge weights corresponding to the initial root cause path, historical verification information, and alarm scenario matching information, a comprehensive score is calculated for the initial root cause path. The comprehensive score formula is: ,in This indicates the overall score. This represents the weighted average of the edge weights along the path. The normalized value of the historical verification frequency of the path is represented by M, and M represents the alarm scenario matching score. , , These represent the weighting coefficients of the three indicators. Set to 0.4. Set to 0.35. The weight is set to 0.25. This group of weights is determined based on the cross-validation results of the root cause reasoning accuracy and the treatment success rate. It is optimized on the validation set by grid search with a search step size of 0.05 to maximize the accuracy of the path with the highest comprehensive score that is consistent with the actual root cause. The calculation formula is: ,in Indicates the first path The weight of each relation edge, This indicates the number of relation edges contained in the path. The calculation formula is: Where F represents the number of times the path has been verified as correct in historical fault handling. This represents the maximum historical verification frequency across all paths. The calculation formula is: Where T represents time matching degree, E represents environment matching degree, and L represents load matching degree, with each of the three matching degrees ranging from 0 to 1. The preset scoring threshold is set to 0.65. This threshold is determined based on the historical score distribution of candidate root cause paths and the acceptable number of candidates for operations personnel, ensuring that the number of selected candidate root cause paths is controlled between 3 and 5. Initial root cause paths with a comprehensive score greater than 0.65 are selected to form a candidate root cause path set. Each path in the candidate root cause path set includes the fault phenomenon node, the root cause node, the handling operation node, and the path's comprehensive score.

[0049] Step S6: Generate a troubleshooting operation sequence based on the candidate root cause path set, perform safety precondition verification on the troubleshooting operation sequence in conjunction with the candidate root factor graph, and generate a set of disposal plans based on the verification results.

[0050] In one specific embodiment, the process of performing step S6 may specifically include the following steps: Logically map the candidate root cause path set to generate the corresponding troubleshooting operation sequence, and combine the candidate root factor graph to perform dependency constraint processing on the troubleshooting operation sequence; According to the preset safety verification rules, the safety precondition verification is performed on the troubleshooting operation sequence after the dependency constraint processing. The safety preconditions include power off condition, voltage detection condition, tagging condition, isolation condition, reset condition and test power supply condition. The troubleshooting operation sequences that pass the verification are identified as the target handling strategies, while the troubleshooting operation sequences that fail the verification are used to generate safety blocking instructions, and these are integrated to form a set of handling solutions.

[0051] Specifically, a logical mapping is performed on the candidate root cause path set to generate corresponding troubleshooting operation sequences. Each path in the candidate root cause path set includes a root cause node, a fault phenomenon node, and a handling operation node. The logical mapping expands the general handling operation nodes in the path into specific, executable troubleshooting operation sequences. The mapping rules decompose the handling operation nodes into fine-grained operation items based on the operation steps, required tools, and safety requirements recorded in the standard operating procedure nodes. The troubleshooting operation sequence includes the operation content, operation object, operation tools, safety precautions, and expected results. For example, if the root cause path is a loose cable connector causing overheating and tripping, and the handling operation node is tightening the connector, the logical mapping generates the following steps: disconnect the upstream circuit breaker, verify that there is no voltage, hang a warning sign, check the wiring terminals, tighten the loose connector with a wrench, measure the contact resistance, remove the warning sign, and close the circuit breaker to restore power. Each troubleshooting operation sequence is assigned a sequence identifier to record the identifier of its respective candidate root cause path.

[0052] Dependency constraint processing is applied to the troubleshooting operation sequence using a candidate root factor graph. This process analyzes the logical dependencies between operations in the sequence and constructs a directed graph of operation dependencies. Nodes represent operation items, and directed edges represent the execution order constraints. The power-off operation is the predecessor node of all operations involving contact with live parts; the voltage testing operation is the successor node of the power-off operation and a predecessor node of any contact operation; the fault troubleshooting verification operation is the predecessor node of the reset operation; and the reset operation is the predecessor node of the power-on test operation. A topological sort is performed on the directed graph to generate a linear operation sequence that satisfies the dependency constraints. If parallel execution is possible, a parallelism marker is added to the sequence. The topological sort uses the Kahn algorithm, prioritizing nodes with an in-degree of 0, processing them sequentially, and reducing the in-degree of successor nodes until all nodes are output. For example, disconnecting the upstream circuit breaker and hanging the warning sign are independent and can be executed in parallel; the voltage testing operation must be performed after disconnecting the upstream circuit breaker.

[0053] According to the preset safety verification rules, the troubleshooting operation sequence after dependency constraint processing is subjected to safety precondition verification. Safety verification rules are stored in a rule base, with each rule containing trigger conditions, check items, and judgment criteria. The power-off condition verification traces all upstream power supply paths of the equipment to be operated, checking for any disconnected switch nodes along the paths. If any power supply path is not disconnected, an operation item to disconnect that path is inserted at the beginning of the troubleshooting operation sequence. The voltage testing condition verification checks whether the sequence contains voltage testing operation items, and whether the voltage testing location covers the incoming end, outgoing end, and equipment casing. If a voltage testing item is missing or the location is incomplete, the corresponding voltage testing operation is added. The tagging condition verification checks whether the sequence contains operations for hanging and removing warning tags, and whether the tagging location covers all disconnected switches. The isolation condition verification calculates the topological distance between the equipment and the nearest live part, requiring at least one disconnection point or isolation point. If the topological distance is 0, an operation item to establish an isolation point is added. The reset condition verification checks whether the sequence contains fault troubleshooting verification steps, including insulation testing, contact resistance testing, or equipment function testing. If verification steps are missing, test requirements are added according to the fault type. The test power-on condition verification check whether the power-on operation adopts a step-by-step approach, including no-load power-on, light-load power-on, and gradually increasing the load. If full-load power-on is performed directly, it should be broken down into multiple steps: no-load power-on, observation and waiting, and gradually adding loads one by one.

[0054] The verified troubleshooting operation sequences are identified as the target handling strategy. The target handling strategy includes formatted operation steps, supporting information, and an emergency plan. The formatted operation steps use a numbered list, with each step including the operation content, location, required tools, safety precautions, and expected results. Supporting information includes fault analysis and a list of key evidence. The emergency plan includes measures to handle abnormal situations during the handling process. For troubleshooting operation sequences that fail verification, safety blocking instructions are generated. Safety blocking instructions include explanations of non-compliance, location of violations, and correction suggestions. The explanations of non-compliance list the violated safety rules, the location of violations indicates the specific step number, and the correction suggestions provide solutions for adding, adjusting, or deleting operation items. The verified target handling strategies and the non-verified safety blocking instructions are integrated to form a set of handling plans. The set of handling plans is output in structured data format, including plan identifier, plan type, operation sequence content, safety verification results, and execution priority.

[0055] Step S7: Obtain the handling feedback data corresponding to the set of handling solutions, and update the relation edge weights, handling path priorities, and term anchor credibility of the fault knowledge graph based on the handling feedback data to obtain an incrementally updated fault knowledge graph.

[0056] In one specific embodiment, the process of performing step S7 may specifically include the following steps: The system receives the processing feedback data corresponding to the set of processing solutions uploaded by the terminal device. The processing feedback data includes the actual root cause, the executed operation, the power restoration result, and the failure node information. The fault knowledge graph is updated by updating the relation edge weights in the fault knowledge graph based on the actual root causes, updating the handling path priority based on the executed operations and power restoration results, and updating the credibility of each term anchor in the term anchor index based on the failure node information, thus obtaining the incrementally updated fault knowledge graph.

[0057] Specifically, the feedback data is uploaded by the terminal device and filled out by maintenance personnel after the fault handling is completed. The form includes a root cause field, an operation field, a result field, and a node information field. The root cause field records the actual fault cause confirmed by on-site investigation, selected from preset options or entered manually. The operation field records the actual handling steps performed, filled in as a checklist or free text. The result field records the operating status after power is restored, including success, failure, or partial success. The node information field records the description of any abnormal steps and phenomena that occurred during the handling process. After data submission, it enters the review process, filtering out erroneous or incomplete feedback through mandatory field completeness checks, logical consistency checks, and numerical reasonableness checks.

[0058] The weights of relational edges in the fault knowledge graph are updated based on the actual root cause. The actual root cause is compared with the inferred root cause in the candidate root cause path. If the actual root cause matches the inferred root cause, the weight of the corresponding causal relation edge is increased, with an increment step size set to 0.05. This step size is set to balance the weight convergence speed with the stability of historical data, ensuring the weight approaches the convergence value after 20 verifications. If the actual root cause does not match the inferred root cause, the weight of the corresponding causal relation edge is decreased, with a decrement step size set to 0.03, to avoid excessive weight decay due to a single misjudgment. The weights of the handling relation edges are updated based on the executed operation and the power restoration result. If power restoration is successful after executing the recommended operation, the weight of the corresponding handling relation edge increases by 0.05; if power restoration fails after executing the recommended operation but other operations succeed, the weight of the recommended handling relation edge decreases by 0.03. Simultaneously, new handling relation edges are established between the actual effective operation and the fault phenomenon, or the weight of existing edges is strengthened. The weights of mutually exclusive relation edges are updated based on the failure node information. If failure occurs during the handling process due to a violation of mutual exclusion constraints, the weight of the corresponding mutually exclusive edge increases by 0.04. The weights of the edges in the topological connection relationship are relatively stable and are adjusted synchronously when the device ledger is updated.

[0059] The credibility of each term anchor in the term anchor index is updated based on the information of failed nodes. The term anchor credibility is updated using a Bayesian method, with the prior probability being the current credibility identifier and the likelihood function determined by the verification result. When verification is successful, the credibility approaches 1 based on the success factor, which is set to 0.95; when verification fails, the credibility approaches 0 based on the failure factor, which is set to 0.85. This set of parameters is calibrated on the verification set based on the maximum a posteriori probability estimate, ensuring that the updated credibility reflects the true mapping quality. For term mappings with a credibility consistently below 0.4, a manual review process is triggered. The priority of the handling path is updated based on the execution operation and power restoration results. Paths that successfully restore power have their priority increased by 10% of their base priority, a percentage set based on the decision-making habits of maintenance personnel and the frequency of path recommendations; paths that fail to restore power have their priority decreased by 15% of their base priority. The updated relation edge weights, handling path priorities, and term anchor credibility are written into the fault knowledge graph, forming an incrementally updated fault knowledge graph.

[0060] The above describes a knowledge graph-based distribution box fault diagnosis method in the embodiments of this application. The following describes a knowledge graph-based distribution box fault diagnosis system in the embodiments of this application. Please refer to [link / reference]. Figure 5 One embodiment of a knowledge graph-based distribution box fault diagnosis system in this application includes: The anchor point index module is used to obtain the fault logs of the distribution box and the equipment ledger containing operation and maintenance records and maintenance manuals. Using the topology node number and device level of the distribution box as boundary constraints, it maps the non-standard fault descriptions in the fault logs to obtain the term anchor point index. The entity recognition module is used to construct an event evidence tensor based on fault logs, equipment ledgers, and terminology anchor indexes. It then uses a preset sequence labeling model to perform entity recognition on the event evidence tensor to obtain a set of electrical entities. The graph construction module is used to extract relationships from the electrical entity set based on the maintenance manual and in combination with preset pre-handling constraint rules to obtain candidate fault relationship edges, and to construct a fault knowledge graph based on the electrical entity set and the candidate fault relationship edges. The event location module is used to acquire real-time alarm events generated by the distribution box, extract the alarm device number, action type and timestamp from the real-time alarm events, and determine the target matching node in the fault knowledge graph. The root cause tracing module is used to traverse target matching nodes in the fault knowledge graph with electrical topology adjacency relationships as the main index, extract candidate root factor graphs, and determine the set of candidate root cause paths. The solution generation module is used to generate a troubleshooting operation sequence based on the candidate root cause path set, perform safety precondition verification on the troubleshooting operation sequence in combination with the candidate root factor graph, and generate a set of disposal solutions based on the verification results. The incremental update module is used to obtain the handling feedback data corresponding to the set of handling solutions, and update the relation edge weights, handling path priorities and term anchor credibility of the fault knowledge graph based on the handling feedback data, so as to obtain the incrementally updated fault knowledge graph.

[0061] Through the collaborative efforts of the aforementioned components, a complete processing chain is formed, from unstructured fault text to structured handling solutions. The anchor index module maps multi-source heterogeneous data into standardized terms, solving the problem of strong heterogeneity in fault descriptions and providing a consistent data foundation for subsequent stages. The entity recognition module constructs an event evidence tensor that integrates electrical business attributes, extracting electrical entities such as devices, phenomena, causes, and handling actions to complete the structured extraction of fault information. The graph construction module organizes discrete entities into a fault knowledge graph carrying topological hierarchy and safety risk weights, allowing electrical connection relationships and historical experience to be stored in a graph structure. The event localization and root cause tracing modules work together to traverse loop nodes along topological adjacency relationships and recall candidate root factor graphs, ensuring that root cause inference is always constrained by the real topological constraints. The solution generation module performs multi-condition safety pre-verification gating on the troubleshooting operation sequence, generating target handling strategies through verification, and triggering blocking for those that fail, embedding work safety procedures into the reasoning stage. The incremental update module performs closed-loop corrections on relation edge weights, path priorities, and terminology credibility based on feedback, ensuring continuous optimization of graph inference quality as data accumulates. These modules are interconnected and mutually supportive, achieving full automation from fault understanding to the generation of safe responses.

[0062] This application also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the knowledge graph-based distribution box fault diagnosis method.

[0063] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for fault diagnosis of distribution boxes based on knowledge graphs, characterized in that, include: S1. Obtain the fault log of the distribution box and the equipment ledger containing operation and maintenance records and maintenance manuals. Using the topology node number and device level of the distribution box as boundary constraints, map the non-standard fault descriptions in the fault log to obtain the term anchor index. S2. Construct an event evidence tensor based on fault logs, equipment ledgers, and terminology anchor indexes. Use a pre-defined sequence labeling model to identify entities in the event evidence tensor to obtain a set of electrical entities. S3. Based on the maintenance manual and combined with the preset pre-processing constraint rules, the electrical entity set is subjected to relation extraction to obtain candidate fault relation edges. A fault knowledge graph is constructed based on the electrical entity set and the candidate fault relation edges. S4. Obtain real-time alarm events generated by the distribution box, extract the alarm device number, action type and timestamp from the real-time alarm events, and determine the target matching node in the fault knowledge graph; S5. Using the electrical topology adjacency relationship in the fault knowledge graph as the main index, traverse the target matching node in the fault knowledge graph, extract the candidate root factor graph, and determine the candidate root cause path set. S6. Generate a troubleshooting operation sequence based on the candidate root cause path set, perform safety precondition verification on the troubleshooting operation sequence in conjunction with the candidate root factor graph, and generate a set of disposal plans based on the verification results. S7. Obtain the handling feedback data corresponding to the set of handling solutions, and update the relation edge weights, handling path priorities, and term anchor credibility of the fault knowledge graph based on the handling feedback data to obtain an incrementally updated fault knowledge graph.

2. The method according to claim 1, characterized in that, S1 includes: Read the fault log and equipment ledger of the distribution box, and extract the switch number, branch name, device alias, load type, action word and disposal word from the fault log and equipment ledger; Perform multi-dimensional standardized mapping of switch number, branch name, device alias, load type, action word and disposal word to generate a terminology anchor table containing device dimension, loop dimension, action dimension and disposal dimension; Using the topology node number and device level of the distribution box as the boundary constraints for word segmentation, the term anchor table is used to match and verify non-standard expressions in the fault log to determine the term anchor index with credibility identifier.

3. The method according to claim 1, characterized in that, S2 includes: The fault event information in the fault log is analyzed, and the standardization mapping of non-standard expressions is completed by combining the terminology anchor index. Based on the device attributes, circuit attribution and load information in the equipment ledger, electrical business attributes are supplemented, and an event evidence tensor is constructed. The event evidence tensor includes event time, circuit node, protection device, action type, reset status, environmental cause and record source credibility. By using a pre-defined sequence labeling model to label the sequence data of the event evidence tensor, a set of electrical entities including device entities, fault phenomenon entities, cause entities, and handling action entities is identified.

4. The method according to claim 1, characterized in that, S3 includes: Extract fault phenomenon nodes, troubleshooting item nodes, handling operation nodes and power restoration condition nodes from the maintenance manual, determine the associated constraints between each node, and generate a relational legality matrix representing the legal connection relationships between nodes. Based on the relationship legality matrix and the preset pre-processing constraint rules, the causal relationships, processing relationships and mutual exclusion relationships between entities in the electrical entity set are extracted to obtain candidate fault relationship edges; Based on the relationship edges between the electrical entity set and the candidate faults, a heterogeneous knowledge graph is constructed, which includes loop nodes, device nodes, phenomenon nodes, root cause nodes and standard operating procedure nodes. Configure loop hierarchy attributes, protection priority attributes, reset condition attributes, and security risk weight attributes for each node in the heterogeneous knowledge graph to obtain a fault knowledge graph carrying topology hierarchy and security risk weight.

5. The method according to claim 1, characterized in that, S4 includes: The system performs structured analysis on real-time alarm events, extracting alarm device number, action type, and timestamp. Based on the alarm device number, the corresponding device node is retrieved in the fault knowledge graph to obtain the initial matching node; Based on the pre-stored correspondence between device type and action type in the fault knowledge graph, determine the compatibility score between the device type attribute and action type of the initial matching node, and select the initial matching node with a compatibility score greater than the preset compatibility threshold as the valid matching node. Based on the timestamp, retrieve the historical alarm records and node attribute information corresponding to the valid matching node, perform matching verification, and determine the final target matching node.

6. The method according to claim 1, characterized in that, S5 includes: Using the electrical topology adjacency relationship in the fault knowledge graph as the main index, starting from the target matching node, we traverse the upper-level switches and power supply nodes upwards along the power supply relationship edge, and traverse the lower-level loads and branch devices downwards, while locating the current complete power supply circuit to which the target matching node belongs. Collect the device nodes in the current complete power supply circuit, as well as the fault phenomenon nodes, root cause nodes and handling operation nodes associated with each device node, extract all the association edges between the nodes, and generate a candidate root factor graph. Based on the preset pruning rules, the candidate root factor graph is pruned and optimized to obtain the pruned candidate root factor graph. In the pruned candidate root factor graph, heuristic path search is performed from the fault phenomenon node associated with the target matching node to the root cause node and the handling operation node to generate the initial root cause path. Based on the relation edge weights, historical verification information, and alarm scenario matching information corresponding to the initial root cause path, the initial root cause path is comprehensively scored, and the initial root cause paths with comprehensive scores greater than the preset score threshold are selected to form a candidate root cause path set.

7. The method according to claim 1, characterized in that, S6 includes: Logically map the candidate root cause path set to generate the corresponding troubleshooting operation sequence, and combine the candidate root factor graph to perform dependency constraint processing on the troubleshooting operation sequence; According to the preset safety verification rules, the safety precondition verification is performed on the troubleshooting operation sequence after the dependency constraint processing. The safety preconditions include power off condition, voltage detection condition, tagging condition, isolation condition, reset condition and test power supply condition. The troubleshooting operation sequences that pass the verification are identified as the target handling strategies, while the troubleshooting operation sequences that fail the verification are used to generate safety blocking instructions, and these are integrated to form a set of handling solutions.

8. The method according to claim 1, characterized in that, S7 includes: The system receives the processing feedback data corresponding to the set of processing solutions uploaded by the terminal device. The processing feedback data includes the actual root cause, the executed operation, the power restoration result, and the failure node information. The fault knowledge graph is updated by updating the relation edge weights in the fault knowledge graph based on the actual root causes, updating the handling path priority based on the executed operations and power restoration results, and updating the credibility of each term anchor in the term anchor index based on the failure node information, thus obtaining the incrementally updated fault knowledge graph.

9. A knowledge graph-based distribution box fault diagnosis system, used to implement the method as described in any one of claims 1-8, characterized in that, include: The anchor point index module is used to obtain the fault logs of the distribution box and the equipment ledger containing operation and maintenance records and maintenance manuals. Using the topology node number and device level of the distribution box as boundary constraints, it maps the non-standard fault descriptions in the fault logs to obtain the term anchor point index. The entity recognition module is used to construct an event evidence tensor based on fault logs, equipment ledgers, and terminology anchor indexes. It then uses a preset sequence labeling model to perform entity recognition on the event evidence tensor to obtain a set of electrical entities. The graph construction module is used to extract relationships from the electrical entity set based on the maintenance manual and in combination with preset pre-handling constraint rules to obtain candidate fault relationship edges, and to construct a fault knowledge graph based on the electrical entity set and the candidate fault relationship edges. The event location module is used to acquire real-time alarm events generated by the distribution box, extract the alarm device number, action type and timestamp from the real-time alarm events, and determine the target matching node in the fault knowledge graph. The root cause tracing module is used to traverse target matching nodes in the fault knowledge graph with electrical topology adjacency relationships as the main index, extract candidate root factor graphs, and determine the set of candidate root cause paths. The solution generation module is used to generate a troubleshooting operation sequence based on the candidate root cause path set, perform safety precondition verification on the troubleshooting operation sequence in combination with the candidate root factor graph, and generate a set of disposal solutions based on the verification results. The incremental update module is used to obtain the handling feedback data corresponding to the set of handling solutions, and update the relation edge weights, handling path priorities and term anchor credibility of the fault knowledge graph based on the handling feedback data, so as to obtain the incrementally updated fault knowledge graph.

10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement a knowledge graph-based method for diagnosing distribution box faults as described in any one of claims 1-8.