A Method and System for Power Equipment Fault Diagnosis Based on Dynamic Knowledge Graph and Large Model Collaborative Reasoning
Patent Information
- Application Number
- CN202511181070.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2045-08-22
AI Technical Summary
[0004]针对现有技术的不足,本发明提供了一种基于动态知识图谱与大模型协同推理的电力设备故障诊断方法及系统,至少部分地解决传统方法的问题
[0042](1)通过弱监督学习与时序关系建模相结合,实现电力领域知识的自动化抽取和动态更新。使用增量学习机制更新图谱,仅对新窗口数据影响的子图进行更新,保留稳定的历史结构,显著降低图谱维护成本,适应电力设备的实时变化。
Smart Images

Figure CN120996202B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of artificial intelligence and power equipment fault diagnosis. Specifically, it relates to a collaborative reasoning method that integrates dynamic knowledge graphs and large-scale language models to improve the accuracy, temporal reasoning ability, and interpretability of power equipment fault diagnosis. Background Technology
[0002] In the power industry, equipment fault diagnosis is a core component in ensuring the safe and stable operation of the power grid. With the expansion of the power grid and the improvement of its intelligence level, equipment fault diagnosis faces unprecedented challenges. Traditional fault diagnosis methods, such as rule-based expert systems, while achieving fault location to some extent, heavily rely on manually written rules, making it difficult to cover all fault modes, especially newly emerging or complex fault types. Furthermore, traditional methods lack in-depth mining and time-series correlation analysis of equipment operating data, resulting in diagnostic results often lagging behind fault development and difficulty in predicting fault propagation paths.
[0003] In recent years, Large Language Models (LLMs) have made significant progress in the field of natural language processing, and their powerful semantic understanding and generation capabilities have provided new insights for fault diagnosis. However, directly applying LLMs to power equipment fault diagnosis has several limitations. First, the knowledge in the power field is highly specialized, and LLMs struggle to directly acquire and understand this knowledge, leading to inaccurate diagnostic results. Second, LLMs are insufficient in processing time-series data and capturing fault propagation chains, making it difficult to meet the real-time and dynamic requirements of power equipment fault diagnosis. Finally, the "black box" nature of LLMs makes the diagnostic results lack interpretability, making them difficult for maintenance personnel to trust and accept. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a method and system for diagnosing power equipment faults based on dynamic knowledge graphs and large-scale model collaborative reasoning, which at least partially solves the problems of traditional methods.
[0005] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0006] Firstly, a fault diagnosis method for power equipment based on dynamic knowledge graphs and large-scale model collaborative reasoning includes the following steps:
[0007] A domain dictionary is constructed based on standard documents in the power industry, covering entities of equipment, faults, and measures. Entity pairs in the domain dictionary are matched with power equipment fault diagnosis record text to generate pseudo-labeled data. A sequence labeling model is used to refine the pseudo-labeled data to obtain accurate label sequences.
[0008] The device operation log is divided into continuous log segments according to a set time window. Based on the precise label sequence, entities and relationships are accurately extracted from each log segment to form a timestamped device status snapshot. The continuous status snapshot sequence is encoded using a time graph convolutional network, and a time-series knowledge graph is dynamically constructed through an incremental learning mechanism.
[0009] The entities and relations in the time-series knowledge graph are mapped into low-dimensional vectors to achieve graph embedding representation. The text of power equipment fault diagnosis records is vectorized. A knowledge fusion module is added to the front end of the large model input, and the contribution of the knowledge graph and the original text is dynamically adjusted through attention weights.
[0010] Based on user queries, relevant subgraphs are retrieved from the knowledge graph. Then, a graph attention network is used to encode the retrieved subgraphs to generate context vectors containing information on device connections and historical fault chains. Subsequently, the subgraph encoding results are converted into natural language descriptions and used as prompt words to input into the large model. Fine-tuning techniques are then used to enable the large model to generate diagnostic conclusions containing structured evidence from the knowledge graph.
[0011] Furthermore, the sequence labeling model adopts a combined model based on BERT-BiLSTM-CRF, including a BERT module, a BiLSTM module, and a CRF module, to perform fine-grained correction on pseudo-labeled data, as follows:
[0012] The BERT module processes the input text sequence, capturing the contextual semantic relationships in the text through a multi-layer Transformer structure to generate dynamic word vectors containing rich contextual information. The BiLSTM module receives the dynamic word vectors output by BERT and uses a bidirectional long short-term memory network to encode the dynamic word vector sequence bidirectionally, capturing long-distance dependencies in the sequence and obtaining the hidden state vector at each position. The CRF module processes the output of BiLSTM, considering the label prediction probability at the current position and the transition probability between labels to globally optimize the labels of the entire sequence, making the output label sequence conform to grammatical and semantic rules. The model finally outputs an accurate label sequence corresponding to the input text sequence.
[0013] Furthermore, a temporal graph convolutional network is used to encode a continuous sequence of state snapshots, including:
[0014] A graph convolutional network is used to encode the graph structure of each state snapshot separately. The encoding process is as follows: the device entity is used as the node, the connection relationship between the devices is used as the edge, and the node features correspond to the state parameters and fault states of the device to construct a single-window graph structure; by aggregating the feature information of each node and its neighboring nodes, the spatial relationship between the devices is captured to obtain the spatial feature representation corresponding to each time window.
[0015] A recurrent neural network is used to perform temporal encoding on the spatial feature vector sequence. The encoding process is as follows: the spatial feature vectors of each window are processed sequentially in time order, the dependencies between features of different time windows are learned, and the temporal pattern of fault propagation is captured.
[0016] The final output is a sequence of encoded vectors with the same length as the input state snapshot sequence. Each vector corresponds to a time window and contains the spatial association features of the device within that time window and the temporal dependency features with the preceding and following time windows.
[0017] Furthermore, the construction method of the temporal knowledge graph is as follows:
[0018] The spatiotemporal features of the encoded vector sequence are analyzed to extract key information within each time window: device entity, device state, correlation strength between devices, and state transition relationship between adjacent time windows;
[0019] The basic structure and time tags of the knowledge graph are constructed. Device entities are used as the core nodes of the knowledge graph. Attributes are added to the nodes based on the parsed device status. The association strength between devices is transformed into edges between nodes, and weights are assigned to the edges based on spatial features. At the same time, timestamps are added to each node attribute and edge. The timestamps correspond to the time window of the encoded vector sequence, giving the knowledge graph a time dimension.
[0020] By integrating temporal dependencies to form dynamic relationship chains, and based on the state transition relationships extracted from the encoded vector sequence, temporal edges across time windows are constructed in the knowledge graph, ultimately forming a complete temporal knowledge graph containing device entities, state attributes, spatial associations, and temporal dependencies.
[0021] The aforementioned dynamic construction of time-series knowledge graphs through incremental learning mechanisms refers to updating only the affected subgraphs rather than reconstructing the entire graph when new data arrives.
[0022] Furthermore, the incremental learning mechanism dynamically constructs a temporal knowledge graph, as detailed below:
[0023] When a new time window log segment arrives, a device status snapshot of that time window is extracted based on the precise label sequence, and the extended sequence of "historical snapshot sequence + new snapshot" is encoded through a time graph convolutional network, focusing on obtaining the temporal dependency features between the new snapshot and the most recent historical time window;
[0024] Based on the entities in the new snapshot and the temporal dependencies encoded by the temporal graph convolutional network, the boundaries of the subgraph that need to be updated are determined: core entities, which are device entities whose state has changed in the new snapshot; associated entities, which are devices directly associated with the static edges and temporal edges of the core entities in the historical graph; and the time range, which is from the specified number of time windows to the current time window.
[0025] The localized subgraph is updated in a targeted manner, and new time window state attributes are added to the core entities. If the state returns to normal, the state termination time is marked. The temporal edge weights between the core entities and related entities are updated according to the new temporal dependencies encoded by the temporal graph convolutional network. If unrecorded entity relationships appear in the new snapshot, the corresponding static edges and temporal edges are added to the subgraph.
[0026] After the subgraph update is completed, only the affected subgraphs are indexed and reconstructed, while the remaining unaffected parts of the knowledge graph remain unchanged.
[0027] Furthermore, a knowledge fusion module is added to the front end of the large model input, dynamically adjusting the contribution of the knowledge graph and the original text through attention weights, specifically including:
[0028] Constructing the interaction matrix: Calculate the similarity between each vector in the knowledge graph vector set and the text vector sequence to form the interaction matrix. The matrix elements represent the association strength between the knowledge graph vectors and the text vectors.
[0029] Attention weights are generated: Based on the interaction matrix, weights are calculated through a two-layer fully connected network and a softmax function. For knowledge graph vectors, the importance weight of each knowledge graph vector relative to the overall text semantics is calculated; for text vectors, the supplementary weight of each text segment relative to the knowledge graph is calculated.
[0030] Dynamic information fusion: The knowledge graph vector set is weighted and summed according to its attention weight to obtain the knowledge graph fusion vector; the text vector sequence is weighted and summed according to its attention weight to obtain the text fusion vector; the knowledge graph fusion vector and the text fusion vector are concatenated into a unified input vector, which contains both the structured entity relationship knowledge in the knowledge graph and retains the scene details of the original text, and the contribution of both is dynamically adjusted by the attention weight.
[0031] Furthermore, the method also includes:
[0032] Meteorological data is continuously acquired, meteorological entities are extracted, and the meteorological entities are converted into fault-related feature vectors. Based on the mapping relationship between "equipment installation location and meteorological area", the association edges between meteorological entities and equipment entities are established. Based on historical data, association rules between meteorological entities and fault entities are constructed and the initial weights of the association edges are set. Combining real-time data and fault records, the weights of the association edges are dynamically adjusted through a time-graph convolutional network. The equipment vulnerability index is used as an entity attribute, and the resulting graph structure is embedded as a subgraph into a time-series knowledge graph constructed based on equipment operation logs.
[0033] Secondly, a power equipment fault diagnosis system based on dynamic knowledge graphs and large-scale model collaborative reasoning includes:
[0034] The weakly supervised entity relationship extraction module is used to build a domain dictionary based on standard documents in the power industry, covering equipment, fault, and measure entities; it matches entity pairs in the domain dictionary with power equipment fault diagnosis record text to generate pseudo-labeled data; and it uses a sequence labeling model to perform fine-grained correction on the pseudo-labeled data to obtain accurate label sequences.
[0035] The temporal knowledge graph construction module is used to divide the device operation log into continuous log segments according to a set time window. Based on the precise label sequence, it accurately extracts entities, entity relationships and states from each log segment to form a timestamped device state snapshot. The continuous state snapshot sequence is encoded using a temporal graph convolutional network, and the temporal knowledge graph is dynamically constructed through an incremental learning mechanism.
[0036] The knowledge injection layer design module is used to map entities and relations in the time-series knowledge graph into low-dimensional vectors to realize graph embedding representation, and to vectorize the text of power equipment fault diagnosis records. A knowledge fusion module is added to the front end of the large model input to dynamically adjust the contribution of the knowledge graph and the original text through attention weights.
[0037] The two-stage joint reasoning module is used to retrieve relevant subgraphs from the knowledge graph based on user queries, and then encode the retrieved subgraphs using a graph attention network to generate context vectors containing device connection and historical fault chain information. Subsequently, the subgraph encoding results are converted into natural language descriptions as prompt words and input into the large model. Fine-tuning techniques enable the large model to generate diagnostic conclusions containing structured evidence from the knowledge graph.
[0038] Thirdly, the present invention also provides an electronic device, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the power equipment fault diagnosis method based on dynamic knowledge graph and large model collaborative reasoning as described in the first aspect.
[0039] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the power equipment fault diagnosis method based on dynamic knowledge graph and large model collaborative reasoning as described in the first aspect.
[0040] Fourthly, the present invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the power equipment fault diagnosis method based on dynamic knowledge graph and large model collaborative reasoning as described in the first aspect.
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] (1) By combining weakly supervised learning with temporal relationship modeling, the automated extraction and dynamic updating of knowledge in the power field are realized. The incremental learning mechanism is used to update the graph, and only the subgraph affected by the new window data is updated, thus preserving a stable historical structure, significantly reducing the graph maintenance cost, and adapting to the real-time changes of power equipment.
[0043] (2) The knowledge injection layer is designed to seamlessly integrate structured knowledge into the large model, improving the accuracy and domain adaptability of diagnosis. By utilizing a two-stage joint reasoning process, combining the structured reasoning of the graph with the semantic generation capability of the large model, diagnostic conclusions containing evidence chains are generated, significantly enhancing interpretability.
[0044] (3) By using time window partitioning and temporal graph convolutional network encoding, the temporal dependencies in the state snapshot sequence are captured, and the timestamped fault propagation edges are stored in the dynamic knowledge graph. Combined with graph attention network to enhance the temporal features of the retrieval subgraph, the temporal dimension modeling of the fault propagation path is realized. This enables rapid response to new fault types and prediction of propagation paths. Attached Figure Description
[0045] Figure 1 This is a flowchart illustrating the overall process of the method of the present invention.
[0046] Figure 2 Flowchart for extracting entity relationships under weak supervision;
[0047] Figure 3 Flowcharts for constructing time-series knowledge graphs;
[0048] Figure 4 A schematic diagram of the knowledge injection layer design;
[0049] Figure 5 This is a flowchart of the joint reasoning process for the connecting segments. Detailed Implementation
[0050] The technical solutions in the embodiments of the present invention will now be clearly and completely described in conjunction with the accompanying drawings.
[0051] Knowledge graphs, as a structured knowledge representation method, can integrate multi-source heterogeneous data and provide rich entity relationships and attribute information. In the power sector, knowledge graphs have been used in scenarios such as equipment management and fault analysis, achieving good results. However, existing knowledge graph construction methods often rely on manual annotation and static updates, making it difficult to adapt to the dynamic changes in power equipment and the temporal characteristics of fault propagation. Furthermore, the integrated application of knowledge graphs and LLM is still in its early stages; how to fully leverage the advantages of both to achieve efficient and interpretable fault diagnosis remains an urgent problem to be solved.
[0052] This invention proposes a power equipment fault diagnosis method based on dynamic knowledge graph and large-scale model collaborative reasoning. First, a dynamic knowledge graph is constructed. Through a weakly supervised entity relationship extraction mechanism, combined with a power industry dictionary and remote monitoring technology, automated extraction of entity relationships is achieved. A temporal knowledge graph is then constructed to capture the dynamic evolution of the fault propagation chain. Second, a graph-large-scale model collaborative reasoning framework is designed. A knowledge injection layer integrates the structured knowledge graph embedding representation with the large-scale model input layer. A two-stage reasoning process of "graph retrieval + large-scale model generation" is adopted, ultimately generating a diagnostic conclusion containing a structured evidence chain. (Refer to...) Figure 1 The method specifically includes the following steps:
[0053] Step S1: Use weakly supervised learning to automatically extract entity relationships from power equipment fault diagnosis record text.
[0054] Reference Figure 2 The method for weakly supervised entity relation extraction according to the present invention includes the following steps:
[0055] S1-1, Domain Dictionary Construction: Based on standard documents in the power industry, a domain dictionary is constructed, covering entities of equipment, faults, and measures.
[0056] According to an embodiment of the present invention, based on the power industry standard document "Classification and Code of Power System Equipment", core entities such as equipment names (e.g., transformers, circuit breakers), fault types (e.g., overheating, failure to operate), and operation terms (e.g., replacing parts, adjusting settings) are extracted to form a domain dictionary containing more than 5,000 entries.
[0057] S1-2, Remote Supervision Annotation: Match entity pairs in the dictionary with texts such as fault reports and maintenance records to generate pseudo-annotation data.
[0058] Remote supervised annotation is a weakly supervised learning method that automatically generates labels for training data using existing knowledge bases or domain rules. Its core logic is "inferring labels for unknown data using known knowledge." In the power equipment fault diagnosis scenario of this invention, labels are inferred for unknown data such as fault reports and maintenance records through remote supervised annotation. In this paper, fault reports, maintenance records, and other texts are collectively referred to as power equipment fault diagnosis record text, or simply fault record text. The specific application method is as follows:
[0059] Entity pairs (such as <equipment entity: transformer No. 3, fault entity: winding short circuit>, <fault entity: overload, consequence entity: temperature surge>) are extracted from a domain dictionary built from standard documents in the power industry. These known entity pairs are used as "monitoring signals" and matched against a massive amount of unlabeled power equipment fault diagnosis record text. If two entities from a certain entity pair appear in the fault record text, and the contextual semantics match the association relationship of the entity pair (such as "caused" or "triggered"), the corresponding entity and relationship tags are automatically labeled for the text fragment (e.g., labeling "transformer No. 3 caused a temperature surge due to winding short circuit" as <transformer No. 3, caused by..., temperature surge>), thereby generating pseudo-labeled data in batches.
[0060] This method eliminates the need for manual, sentence-by-sentence annotation, achieving low-cost, large-scale data annotation through knowledge base-guided annotation. Manual sampling verification with a sample size of 500 records showed an accuracy rate of 78.4%, indicating that the pseudo-annotated data is relatively reliable.
[0061] S1-3, Noise Filtering: A BERT-BiLSTM-CRF-based sequence labeling model is used for fine-grained correction to improve the accuracy of entity relation extraction.
[0062] The BERT-BiLSTM-CRF model employs a three-stage processing flow of "semantic encoding - temporal modeling - sequence constraints" to perform fine-grained correction on pseudo-labeled data generated by remote supervision. The BERT module processes the input text sequence, capturing contextual semantic relationships through a multi-layer Transformer structure to generate dynamic word vectors rich in contextual information. The BiLSTM module receives the dynamic word vectors output by BERT and uses a bidirectional long short-term memory network to bidirectionally encode the dynamic word vector sequence, capturing long-distance dependencies in the sequence and obtaining the hidden state vector at each position. The CRF module processes the output of BiLSTM, considering not only the label prediction probability at the current position but also the transition probabilities between labels to globally optimize the labels of the entire sequence, ensuring that the output label sequence conforms to grammatical and semantic rules. The model ultimately outputs an accurate label sequence corresponding to the input text sequence.
[0063] The specific work process is as follows:
[0064] (1) Format the pseudo-labeled data in the input layer.
[0065] Convert noisy, pseudo-labeled data (such as “[10kV][Transformer]” with incorrect entity boundaries, and “Winding short circuit-initiated-temperature surge” incorrectly labeled as “Winding short circuit-accompanying-temperature surge”) into the model input format.
[0066] The fault diagnosis record text is split into character / word units, such as "Transformer No. 3 caused a sudden temperature rise due to a short circuit in the winding" is split into "No. 3 / transformer / due to / winding / short circuit / caused / temperature / sudden rise"; pseudo-entity labels are marked using the BIO format (B-entity start, I-entity interior, O-non-entity), and pseudo-relationship labels are recorded at the same time, such as "caused" and "triggered".
[0067] (2) The BERT module uses contextual semantic encoding to correct the ambiguity of entity boundaries.
[0068] The parameters of the BERT model are fine-tuned in advance based on the corpus of the power industry, so that it can master the semantic features of professional terms such as "10kV transformer" and "winding short circuit".
[0069] The input text sequence is deeply encoded, generating a vector containing contextual information for each character / word. For example, the vectors of "10kV" and "transformer" are closer due to their strong semantic association. This addresses the problem of overly detailed splitting or merging errors in pseudo-annotation, providing a semantic basis for entity boundary correction.
[0070] (3) The BiLSTM module optimizes the coherence of entities and relationships through bidirectional temporal modeling.
[0071] The semantic vector output by BERT is input into BiLSTM. The forward LSTM captures the temporal dependencies from left to right, such as the sequential relationship of "winding" → "short circuit", and the backward LSTM captures the dependencies from right to left, such as "sudden temperature rise" ← "cause" ← "short circuit".
[0072] By learning bidirectional temporal features, easily confused relation types are distinguished, such as "leads to" and "accompanying": "leads to" has a clear causal temporal order, while "accompanying" has no strict order, correcting errors in relation types in pseudo-labeling. This improves the internal coherence of entity sequences and makes the temporal logic of relation extraction more accurate.
[0073] (4) The CRF module corrects the logical contradiction of the label by performing sequence constraint correction.
[0074] By training, we can learn the reasonable transfer rules for entity / relationship labels in the power industry. For example, "B-equipment" should be followed by "I-equipment" or "O" instead of "B-fault" directly; the "cause" relationship should be preceded by the fault entity and followed by the consequence entity.
[0075] Sequence constraints are applied to the label probability distribution output by BiLSTM (e.g., the probability of a certain position belonging to "B-fault" is 0.8) to correct logical errors caused by local optima, such as "O-non-entity" directly followed by "I-fault", striving for globally optimal decoding. The output label sequence is ensured to conform to power industry labeling standards to reduce jump errors in entity recognition and relation extraction.
[0076] (5) The output layer generates accurate label sequences.
[0077] The model ultimately outputs a label sequence that has undergone three levels of correction. At the entity level, it accurately identifies complete entities such as "10kV transformer" and "winding short circuit"; at the relation level, it correctly labels causal relationships such as "winding short circuit - leading to - temperature surge".
[0078] After fine-grained correction, high-quality structured data is provided for the subsequent construction of time-series knowledge graphs.
[0079] Step S2: Encode the device operation log using a time-series relationship modeling algorithm to capture the time-series dependencies of fault propagation and construct a time-series knowledge graph.
[0080] Reference Figure 3 The method for constructing a time-series knowledge graph according to the present invention specifically includes the following steps:
[0081] S2-1, Time Window Segmentation: Divide the device operation log into specified time windows and extract a status snapshot within each window.
[0082] The equipment operation log is divided into segments according to a specified time granularity (e.g., 1 hour) to obtain continuous log segments. Appropriate preprocessing is then performed, including removing invalid information from each log segment (e.g., repeated normal status messages "equipment is operating normally"), retaining key operation records (e.g., "09:05:303 transformer starts cooling system"), parameter changes (e.g., "temperature rises from 65℃ to 72℃"), and abnormal alarms (e.g., "09:08:15 overcurrent protection activates").
[0083] Import the accurate label sequence corrected by the BERT-BiLSTM-CRF model, parse the entity types, relation types, and state labels, and construct a label-text mapping table: establishing a correspondence between entity names and relation keywords in the label sequence and text descriptions in the log fragments. Then, extract entities and attributes from the log fragments, traverse the log fragment text, and locate entities by combining entity labels in the label sequence and determining the contextual semantics. For example, extract equipment names with numbers such as "Transformer No. 3" and "Circuit Breaker No. 4" as equipment entities; extract parameters containing numerical values such as "Temperature 72℃" and "Voltage 10kV", record the parameter type and specific value, and use them as parameter entities; extract abnormal events such as "Winding Short Circuit" and "Overcurrent Protection Action", label the fault type and occurrence time, and use them as fault entities, adding attribute information to each entity.
[0084] Extract entity relationships and state associations. Based on the relationship tags in the tag sequence, identify the associations between entities in the log fragment, including: causal relationships, such as extracting <winding short circuit, causing, overcurrent protection action> from "overcurrent protection action caused by winding short circuit"; dependent relationships, such as extracting <transformer No. 3, including, cooling system> from "cooling system of transformer No. 3 starts"; parameter associations, such as extracting <transformer No. 3, parameter is, temperature 72℃> from "temperature of transformer No. 3 rises to 72℃"; state associations: bind the state changes of entities to time nodes, such as associating "temperature of transformer No. 3 at 09:08:15 72℃" with "transformer No. 3 is in a high temperature state within window t1", and recording whether this state is triggered by other entities.
[0085] Finally, the information is integrated to generate a timestamped state snapshot. The snapshot structure is defined as follows: as an example, each snapshot contains the following core fields: timestamp, entity set, relationship set, and core state summary.
[0086] Timestamp: Window start-end time;
[0087] Entity set: {Device entity: {Type, attribute}, Parameter entity: {Value, trend}, Fault entity: {Type, occurrence time}};
[0088] Relation set: {<entity1, relation type, entity2>};
[0089] Core status summary: such as "Transformer No. 3 in window t1 has a short circuit in its windings, causing the temperature to rise to 72°C, triggering the cooling system to start."
[0090] Through the above processing, information can be accurately extracted from log fragments of each time window to form a structured, timestamped snapshot of device status. This snapshot can be converted into a structured format, providing standardized input for subsequent time-graph convolutional network encoding and temporal knowledge graph construction.
[0091] S2-2, Temporal Relationship Modeling: Using a Temporal Graph Convolutional Network (T-GCN) to encode the device state sequence and capture the temporal dependency of fault propagation.
[0092] T-GCN combines the ability of Graph Convolutional Networks (GCNs) to process graph-structured data with the advantages of Recurrent Neural Networks (RNNs) in processing temporal data, enabling the analysis of device state sequences across multiple time windows. This encoding method captures the temporal dependencies of fault propagation, such as the pattern where a fault occurs in one device within a certain time window, leading to a fault in another related device after a certain period. This integrates the temporal relationships between devices into the knowledge graph.
[0093] First, GCN is used to encode each state snapshot separately into a graph structure. The encoding process is as follows: the device entity is used as a node, the connection relationship between devices is used as an edge, and the node features correspond to the device's state parameters and fault state to construct a single-window graph structure; by aggregating the feature information of each node and its adjacent nodes, the spatial association between devices is captured to obtain the spatial feature representation corresponding to each time window.
[0094] Next, RNN is used to perform temporal encoding on the spatial feature vector sequence. The encoding process is as follows: the spatial feature vectors of each window are processed sequentially in time order to learn the dependency relationship between features of different time windows and capture the temporal pattern of fault propagation.
[0095] The final output is a sequence of encoded vectors with the same length as the input state snapshot sequence. Each vector corresponds to a time window and contains the spatial association features of the devices within that window and the temporal dependency features with the windows before and after it.
[0096] According to an embodiment of the present invention, the T-GCN encoding process includes the following steps:
[0097] (a) Perform graph structure transformation on the device state sequence at the input layer
[0098] The input is a sequence of device status snapshots (t1, t2, ..., tn) divided by time windows. Each snapshot is first converted into graph structure data.
[0099] Node: Each node corresponds to a power equipment entity (such as "Transformer No. 3" and "Circuit Breaker No. 4"). The node feature vector contains the equipment's operating parameters in the current window (temperature 85℃, voltage 10kV, etc.) and fault status identifiers (such as unique thermal codes for "normal", "overload", and "short circuit").
[0100] Edges: Edges are constructed based on the topological connections between devices (such as physical wiring connections and control logic associations). The weight of an edge is determined by the strength of the influence between devices (e.g., the weight of a directly connected device is 0.8, and the weight of an indirectly connected device is 0.3).
[0101] Temporal correlation: All snapshots are arranged in timestamp order to form sequence data G1, G2, ..., Gn containing spatial structure and temporal order, where Gt represents the graph structure of window t.
[0102] For example, in graph G1 of window t1, the feature of node "Transformer No. 3" is <Temperature 70℃, Status = Normal>, and it is connected to node "Bus A" through an edge (weight 0.8); in graph G2 of window t2, the feature of "Transformer No. 3" is updated to <Temperature 85℃, Status = Overload>, and the edge relationship remains unchanged.
[0103] (b) Graph Convolutional Network (GCN) layer for spatial feature extraction
[0104] The GCN layer encodes the spatial features of the graph structure (Gt) for each time window separately, capturing the real-time correlation between devices.
[0105] Neighbor feature aggregation: For each node in graph Gt (e.g., “Transformer No. 3”), the features of all its neighboring nodes (e.g., the voltage of “Bus A”, the operating status of “Cooling System”) are aggregated by weighted summation. The weights are determined by the influence strength of the edges and the similarity of the node features (e.g., the weight increases when the neighbor’s state is abnormal).
[0106] Feature nonlinear transformation: The aggregated features are nonlinearly mapped by an activation function (such as ReLU) to enhance the feature expressive power and generate a spatial feature vector for each node;
[0107] Graph-level feature output: Concatenate the spatial feature vectors of all nodes to form the spatial feature representation (St) of the entire graph Gt, which includes the state association of the devices within the window (such as "the voltage impact of overload on bus A of transformer No. 3").
[0108] After GCN processing, the graph structure of each time window is transformed into a fixed-dimensional spatial feature vector (S1, S2, ..., Sn).
[0109] (c) Recurrent neural network layer processing for time-dependent modeling
[0110] The recurrent neural network uses LSTM, which receives the spatial feature sequence (S1→S2→...→Sn) output by GCN, learns the temporal dependence across windows, and captures the fault propagation pattern.
[0111] Temporal Feature Transmission: Spatial feature vectors are input into the LSTM in chronological order, and feature transmission is dynamically adjusted through forget gates, input gates, and output gates. Forget gates filter irrelevant historical information (e.g., the impact of the normal state of the device in window t1 on the fault analysis in window t3 can be weakened); input gates strengthen the key features of the current window (e.g., the feature of "Transformer No. 3 overload" in window t2 is retained); output gates generate the temporal features of the current window that include historical accumulated information (e.g., the features of window t3 are fused with the state changes from t1 to t3).
[0112] Fault propagation capture: The causal relationship of state changes is identified through a gating mechanism. For example, the feature difference between “S2 (overload of transformer No. 3)” in window t2 and “S3 (short circuit of circuit breaker No. 4)” in window t3 is marked as potential fault propagation. The propagation time interval (t3-t2=1 window) and the influence intensity (such as the similarity between the feature of “circuit breaker No. 4” in S3 and the feature of “transformer No. 3” in S2) are calculated.
[0113] After processing, the LSTM outputs the temporal augmentation features (Ht) of each window, which includes both the spatial correlation of the current window and the temporal dependency with the preceding and following windows, such as H3 = f(S3, H2), where H2 is the temporal feature of window t2.
[0114] (d) Output a sequence of encoded vectors containing spatiotemporal features.
[0115] The final output of T-GCN is a sequence of encoded vectors (H1, H2, ..., Hn) with the same length as the input sequence. Each vector Ht contains:
[0116] Spatial dimension: Topological relationships and state effects of devices within the t-window;
[0117] Time dimension: The relationship between the state evolution of window t and windows t-1 and t+1, such as the propagation path and duration of the fault from "Transformer No. 3" to "Circuit Breaker No. 4".
[0118] For example, the H3 vector not only reflects the spatial relationship between "circuit breaker 4 short circuit" and "bus A" in window t3, but also contains the temporal dependency of "t2 overload → t3 short circuit" (propagation delay 1 window, influence intensity 0.7).
[0119] Through the above process, T-GCN achieves joint modeling of spatial association and temporal evolution. For sudden failures, it can capture the rapid propagation of "equipment malfunction → adjacent equipment affected"; for progressive failures, it can identify the cumulative process of "slow parameter changes → eventual failure". The output encoded vector sequence provides quantitative evidence of failure propagation (such as propagation path, time interval, and impact intensity) for subsequent construction of temporal knowledge graphs, supporting the temporal relationship updates of dynamic knowledge graphs.
[0120] S2-3, Dynamic Graph Update: Design an incremental learning mechanism to dynamically construct a temporal knowledge graph. When new data arrives, only the affected subgraphs are updated instead of the entire graph is reconstructed.
[0121] The process of dynamically constructing a temporal knowledge graph using an incremental learning mechanism is as follows:
[0122] When a new time window log segment arrives, the device status snapshot of that window is extracted based on the precise label sequence, and the extended sequence of "historical snapshot sequence + new snapshot" is encoded by T-GCN, focusing on obtaining the temporal dependency features between the new snapshot and the most recent historical window;
[0123] Based on the entities in the new snapshot and the temporal dependencies encoded by T-GCN, determine the subgraph boundaries that need to be updated: core entities, which are device entities whose state has changed in the new snapshot; associated entities, which are devices directly associated with the static edges and temporal edges of the core entities in the historical graph; and the time range, which is from the specified number of time windows to the current time window.
[0124] The subgraphs to be located are updated in a targeted manner. New time window state attributes are added to the core entities. If the state returns to normal, the state termination time is marked. The weights of the temporal edges between the core entities and related entities are updated according to the new temporal dependencies encoded by T-GCN. If unrecorded entity relationships appear in the new snapshot, the corresponding static edges and temporal edges are added to the subgraph. After the subgraph update is completed, only the subgraphs affected by the subgraph are indexed and reconstructed.
[0125] Specifically, new data is received and converted into a triple structure containing entities, relations, and timestamps according to a preset format. Core entities are extracted from the new data triples, their node positions are located in the existing graph, and the entity's attributes and direct related edges are recorded. Based on the entity's association strength threshold (e.g., edge weight > 0.5), affected related entities are located through 1-2 hop diffusion. 1-hop association: the core entity's direct neighbors, such as "Cooling System" and "Protection Device" connected to "Transformer No. 3". 2-hop association: the direct neighbors of 1-hop entities, such as "Water Pump" associated with "Cooling System". Entities unrelated to the new data are filtered during the diffusion process, such as "Line L2" having no topological association with "Transformer No. 3".
[0126] For time series graphs, only the entity relationships of the most recent m windows related to the new data timestamp are retained to avoid historical subgraphs with excessive spans being mistakenly included in the update scope.
[0127] Perform partial updates to the dynamic attributes of core entities and related entities. For numeric attributes: directly replace them with the latest values in the new data and record the update timestamp; for status attributes: if the new status conflicts with the old status, mark the status change time and retain the historical status trajectory.
[0128] Based on the temporal characteristics of new data and historical association rules, the weights of relation edges within the subgraph are dynamically adjusted. This includes: adding new relations: if the new data contains unrecorded relations, a new edge is added between the core entity and the related entity, with the initial weight set based on historical rules; and weight adjustment: for existing relations, the weights are adjusted based on the temporal dependency strength of T-GCN encoding.
[0129] When new data conflicts with existing relationships in a subgraph, the following rules apply: new data is given priority, with real-time monitoring data considered more reliable than historical prediction data; for conflicts that cannot be determined, such as two reports describing the same fault differently, they are marked as "pending verification" and linked to the original data source for manual review.
[0130] Perform partial index reconstruction: only update the time-series index (such as a list of entity states sorted by timestamp) and relation index (such as the weight sorting of edges of the "fault propagation" type) of the affected subgraph, while the index of the remaining unupdated parts remains unchanged, reducing index maintenance costs.
[0131] Optionally, incremental verification can be performed. For example, randomly select 10%-20% of the entities and relationships in the subgraph and compare them with the original data to verify the accuracy of the update. If the accuracy is lower than a given threshold, expand the subgraph range and re-detect the update logic.
[0132] The above describes a method for extracting snapshot sequences from equipment operation logs and constructing a temporal knowledge graph through incremental learning. As a further preferred implementation, this method can be further enhanced by incorporating extreme weather conditions to update the knowledge graph, enabling the prediction of fault chain propagation under extreme weather conditions. This is because power equipment, especially outdoor equipment, is susceptible to failure due to extreme weather, and accurate understanding of weather forecasts and real-time meteorological conditions, based on current technology, provides reliable data for predicting equipment risks.
[0133] In this extended scenario, step S2 also includes: cross-source data fusion, acquiring meteorological data from the meteorological system as supplementary data to the equipment operation logs, extracting meteorological entities from the data, and forming a collaborative update driven by rules and data through data standardization and entity association. Data standardization involves converting meteorological indicators such as precipitation and wind speed into feature vectors related to equipment faults, such as mapping "precipitation 100mm" to <high risk, water accumulation sensitivity 0.8>. Entity association rules mainly establish association edges between meteorological entities and equipment entities through "equipment installation location - meteorological area" mapping (e.g., "line L1 is located in rainstorm warning area A"). This is the same as the association construction logic of "equipment-parameter-fault" mentioned above, and the entity relationship extraction capability of the BERT-BiLSTM-CRF model can be reused.
[0134] A collaborative update mechanism combining rule-driven and data-driven approaches: Meteorological-fault association rules are established based on historical fault data, and these rules are transformed into initial edge weights for the graph (e.g., the initial weight for "heavy rain - substation water accumulation" is set to 0.3). Combining real-time meteorological data and equipment fault records, the weights are dynamically adjusted using the temporal characteristics encoded by T-GCN (e.g., when actual observed precipitation reaches 120mm, the weight increases from 0.3 to 0.6). The equipment vulnerability index is mapped to entity attributes for incremental updates, similar to the "temperature" and "status" attributes mentioned earlier. The equipment vulnerability index is a quantitative indicator measuring the risk of equipment failure under specific environmental or operational conditions, such as extreme weather. An attribute update formula can be established based on regression analysis of meteorological data and historical faults (e.g., for every 10m / s increase in wind speed, the line breakage risk index increases by 0.2). The existing incremental learning subgraph update process is embedded to achieve real-time calculation and storage of the equipment vulnerability index.
[0135] In this way, when extreme weather conditions occur, local updates to the time-series map based on new weather information can be used to predict the chain propagation of faults. For example, based on the updated time-series map, an initial fault can be simulated to predict the fault propagation path. Based on the fault propagation prediction results, emergency resource scheduling strategies can be optimized, repair time can be shortened, and material allocation efficiency can be improved.
[0136] Step S3: Design a knowledge injection layer to integrate the structured information from the knowledge graph into the large model, thereby improving the accuracy and domain adaptability of the diagnosis.
[0137] Reference Figure 4 The design of the knowledge injection layer includes the following steps:
[0138] S3-1, Graph Embedding Representation: The TransE algorithm is used to map entities and relations into low-dimensional vectors, preserving the semantic associations of the graph. The TransE algorithm is a classic algorithm in the field of knowledge graphs. The specific process will not be elaborated here.
[0139] S3-2, Attention Fusion Mechanism: A knowledge fusion module is added before the input layer of the large model to dynamically adjust the contribution of the knowledge graph information and the original text through attention weights. The specific implementation method is as follows:
[0140] Constructing the interaction matrix: Calculate the similarity (such as cosine similarity) between the set of graph vectors and each vector in the text vector sequence to form the interaction matrix. The matrix elements represent the correlation strength between a certain graph vector and a certain text vector.
[0141] Attention weights are generated: Based on the interaction matrix, weights are calculated through a two-layer fully connected network and a softmax function. For graph vectors, the importance weight of each graph vector relative to the overall text semantics is calculated; for text vectors, the supplementary weight of each text segment relative to the graph knowledge is calculated.
[0142] Dynamic information fusion: The graph vector set is summed by weight according to its attention weight to obtain the graph fusion vector; the text vector sequence is summed by weight according to its attention weight to obtain the text fusion vector; the graph fusion vector and the text fusion vector are concatenated into a unified input vector, which contains both the structured entity relationship knowledge in the graph and retains the scene details of the original text, and the contribution of the two is dynamically adjusted by the attention weight.
[0143] Step S4: A two-stage joint reasoning process is adopted, combining the structured reasoning of the graph with the semantic generation capability of the large model to generate a diagnostic conclusion containing a chain of evidence.
[0144] Reference Figure 5 The two-stage joint reasoning process includes:
[0145] S4-1, Map Retrieval Stage
[0146] First, based on user queries, relevant subgraphs are retrieved from the knowledge graph using multi-path recall techniques, including semantic matching and graph structure diffusion. Then, a graph attention network (GAT) is used to encode the retrieved subgraphs, generating context vectors containing information such as device connectivity and historical failure chains.
[0147] Specifically, the user query is first parsed to extract core elements, such as "Transformer No. 3" and "fault cause" in "Cause of transformer No. 3 failure". The first approach uses the BM25 algorithm for semantic matching. Text similarity is calculated between the query keywords and entity tags and relationship descriptions in the knowledge graph to filter out entities and relationships with high semantic relevance, forming a preliminary candidate set.
[0148] The second path implements the graph structure diffusion. Starting from the parsed target device, a two-level traversal is performed along the topological relationships in the graph. The first-level traversal extracts directly related entities (such as "Bus A" which is physically connected to "Transformer No. 3", and "Cooling System" which has a fault propagation relationship) and their corresponding relationships; the second-level traversal starts from the first-level entity and continues to expand to its directly related objects (such as "Circuit Breaker No. 4" connected to "Bus A"), while recording the relationship types and timestamps in the traversal path.
[0149] The two recall results are merged. The entity relationships obtained from semantic matching and the topological association subgraph obtained from structural diffusion are combined, duplicate information is removed, and core associations are filtered based on query intent, such as focusing on entities and relationships related to "fault cause", and finally forming a complete subgraph containing semantic relevance and topological association.
[0150] The retrieved subgraphs are then converted into GAT input format: entities in the subgraph are treated as nodes, and each node's feature vector contains entity attributes and temporal information; relationships between entities are treated as edges, and edge weights are initialized to the association strength recorded in the subgraph (e.g., fault propagation probability). GAT aggregates node features through a multi-layer attention mechanism. In each layer, each node calculates its attention score with its neighboring nodes: for example, "Transformer No. 3" is assigned a higher attention weight to "Bus A" based on its fault history correlation (e.g., frequency of co-occurrence of faults) and the tightness of its connection (e.g., topological distance), while a lower weight is assigned to "Circuit Breaker No. 4," which has a weaker association. Weight calculation is implemented through linear transformations and activation functions (e.g., LeakyReLU) to highlight key associations.
[0151] Subsequently, each node performs a weighted summation of its neighbor features based on attention weights, generating a new feature vector that includes local correlation information. After multiple iterations, the node features not only contain direct connection information but also integrate historical fault propagation paths across multiple hops. Finally, pooling is performed on the final feature vectors of all nodes to generate a context vector for the entire subgraph. This vector preserves the topological connection structure between devices while encoding the temporal logic of historical fault chains.
[0152] S4-2, Large Model Generation Stage
[0153] The subgraph encoding results are converted into natural language descriptions and used as prompts input into the large model. First, the subgraph structure corresponding to the context vectors is parsed: core entities, topological relationships between entities, and the historical fault chain sequence are extracted from the vectors. Next, the language is organized according to logical hierarchy: first, the equipment connection relationships are described; then, the fault chains are sorted out in chronological order; finally, key state information is added. The final result is a structured prompt, for example: "It is known that transformer No. 3 is connected to bus A, and bus A is associated with circuit breaker No. 4. The historical fault chain is: t2 bus A short circuit → t3 transformer No. 3 overload, and currently the temperature of transformer No. 3 is rising. Please analyze the cause of the fault and the corresponding countermeasures." This prompt retains the core information of the subgraph and conforms to natural language expression habits, and can be directly input into the large model to guide its reasoning.
[0154] By using LoRA fine-tuning technology, large models can prioritize the use of structured evidence from the atlas when generating diagnostic conclusions.
[0155] The LoRA fine-tuning method is as follows: Structured evidence from the knowledge graph is paired with corresponding natural language diagnostic conclusions to form "evidence-conclusion" sample pairs, ensuring that the conclusions explicitly include graph entities, relationships, and time-series information. Then, LoRA fine-tuning parameters are configured. During training, the model output is constrained through a loss function. When the generated diagnostic conclusion does not contain graph evidence, a penalty term is added; conclusions that prioritize citing evidence and are logically consistent receive a reward, guiding the model to learn the output pattern of "first calling graph evidence, then deriving the conclusion."
[0156] After fine-tuning, when the large model receives a Prompt containing graph information (such as the natural language of subgraph transformation mentioned above), it will prioritize retrieving matching structured evidence from memory and integrate it into the diagnostic conclusion as the basis for reasoning. For example, it will explicitly output "Based on the connection relationship between transformer No. 3 and bus A and the t2-t3 fault chain, the diagnosis is...", thus achieving a strong correlation between evidence and conclusion.
[0157] A typical application scenario of the method of this invention is as follows: When the equipment log of a substation shows "abnormal oil temperature of the main transformer", the system first identifies the related entities (main transformer, oil temperature, cooling system) through entity relationship extraction. Then, the knowledge graph infers the propagation path of "cooling system failure → oil temperature rise → main transformer overload" based on the time sequence relationship. Finally, the large model generates a structured diagnostic report containing timestamps and equipment IDs.
[0158] To verify the performance of the proposed method, in one example, equipment operation and maintenance data from a provincial power grid company from 2019 to 2022 were collected, including: structured data: equipment ledgers (30,000+ records) and protection action records (500,000+ records), with data format conforming to the "Power System Equipment Data Acquisition Standard"; and unstructured text: fault reports (12,000+, including manually annotated root cause labels) and maintenance records (8,000+), in PDF / Word format. Data preprocessing was performed, including structured data cleaning: removing duplicate records (approximately 3.2%) and correcting outliers (such as temperature exceeding limits, approximately 1.5%); and unstructured text parsing: extracting text content using the PyPDF2 library and matching fault description paragraphs using regular expressions.
[0159] The method described above in this invention is used for weakly supervised entity relation extraction, temporal knowledge graph construction, and deployment of a collaborative reasoning framework. In terms of hardware configuration, an NVIDIA A100 GPU server (8 cards) is deployed in the cloud to deploy the Qwen-7B-LoRA large model; NVIDIA Jetson AGX Orin compute boxes are deployed at the edge to run the lightweight graph retrieval module. In terms of software configuration, PyTorch 1.12.0 + Transformers 4.24.0 is used in the cloud to support large model inference; PyTorch 2.0.1 + DGL 0.9.1 is used at the edge to accelerate graph retrieval.
[0160] Reasoning process: User query (e.g., "reason for L1 line tripping") → Edge graph retrieval (multi-path recall + subgraph encoding) → Cloud-based large model generation (Prompt project + LoRA fine-tuning) → Return of diagnostic conclusion + chain of evidence.
[0161] Test set: Contains 500 real-world fault cases, covering primary equipment faults (such as transformer insulation damage), secondary circuit defects (such as abnormal sampling of protection devices), and external interference events (such as line tripping caused by lightning strikes).
[0162] The following evaluation indicators will be used:
[0163] Accuracy: The correctness of root cause diagnosis, calculated as (number of correctly diagnosed cases / total number of cases) × 100%;
[0164] Response time: The average delay from query to answer generation, statistically recorded through logs;
[0165] Interpretability score: The completeness of the evidence chain for the diagnostic conclusion is scored by 5 senior operations engineers (1-5 points).
[0166] The collaborative reasoning framework of this invention was compared with other models / methods. The experimental results are detailed in Tables 1 and 2. It can be seen that the accuracy of the collaborative reasoning framework reached 89.3%, which is 16.8-20.8 percentage points higher than that of the pure large model; the response time was 5.6 seconds, which meets the real-time requirements; and the interpretability score was 4.6 / 5, which is significantly higher than the generalization response of the pure large model.
[0167] Table 1. Performance comparison of different methods in power equipment fault diagnosis tasks.
[0168] GPT-3.5-turbo 68.2 3.2 2.1 Qwen-7B 72.5 4.1 2.4 Traditional expert systems 75.8 8.7 3.8 Collaborative Reasoning Framework 89.3 5.6 4.6
[0169] Table 2. Adaptability of the Collaborative Reasoning Framework to New Fault Types
[0170]
[0171] In another verification instance, fault chain propagation prediction under extreme weather conditions was conducted. By accessing the meteorological bureau's API, rainstorm disaster warning information (such as precipitation and wind speed) was obtained; based on historical fault data, a "meteorological condition-equipment fault" association rule was established (e.g., when precipitation > 100mm, the risk of substation water accumulation increases by 3 times); the equipment vulnerability index in the map was updated in real time to trigger high-risk equipment warnings.
[0172] Fault propagation prediction was performed. An initial fault simulation was performed where line L1 tripped due to a lightning strike. Based on the updated time series diagram, the fault propagation path was predicted (e.g., L1 tripping → backup power supply B overload → substation C undervoltage). Verification showed that the predicted path matched the actual propagation chain with 82.6% accuracy compared to the actual fault record.
[0173] Based on the same technical concept as the method embodiment, another embodiment of the present invention provides a power equipment fault diagnosis system based on dynamic knowledge graph and large model collaborative reasoning, including:
[0174] The weakly supervised entity relationship extraction module is used to build a domain dictionary based on standard documents in the power industry, covering equipment, fault, and measure entities; it matches entity pairs in the domain dictionary with power equipment fault diagnosis record text to generate pseudo-labeled data; and it uses a sequence labeling model to perform fine-grained correction on the pseudo-labeled data to obtain accurate label sequences.
[0175] The temporal knowledge graph construction module is used to divide the device operation log into continuous log segments according to a set time window. Based on the precise label sequence, it accurately extracts entities, entity relationships and states from each log segment to form a timestamped device state snapshot. The continuous state snapshot sequence is encoded using a temporal graph convolutional network, and the temporal knowledge graph is dynamically constructed through an incremental learning mechanism.
[0176] The knowledge injection layer design module is used to map entities and relations in the time-series knowledge graph into low-dimensional vectors to realize graph embedding representation, and to vectorize the text of power equipment fault diagnosis records. A knowledge fusion module is added to the front end of the large model input to dynamically adjust the contribution of the knowledge graph and the original text through attention weights.
[0177] The two-stage joint reasoning module is used to retrieve relevant subgraphs from the knowledge graph based on user queries, and then encode the retrieved subgraphs using a graph attention network to generate context vectors containing device connection and historical fault chain information. Subsequently, the subgraph encoding results are converted into natural language descriptions as prompt words and input into the large model. Fine-tuning techniques enable the large model to generate diagnostic conclusions containing structured evidence from the knowledge graph.
[0178] Furthermore, the system also includes:
[0179] The cross-source data fusion module is used to continuously acquire meteorological data, extract meteorological entities, and convert meteorological entities into fault-related feature vectors. Based on the mapping relationship of "equipment installation location - meteorological area", it establishes the association edges between meteorological entities and equipment entities. Based on historical data, it constructs association rules between meteorological entities and fault entities and sets the initial weights of the association edges. Combining real-time data and fault records, it dynamically adjusts the weights of the association edges through a time-graph convolutional network, uses the equipment vulnerability index as an entity attribute, and embeds the resulting graph structure as a subgraph into a time-series knowledge graph constructed based on equipment operation logs.
[0180] It should be understood that the power equipment fault diagnosis system based on dynamic knowledge graph and large model collaborative reasoning in this embodiment can realize all the technical solutions in the above method embodiments. The functions of each functional module can be specifically implemented according to the methods in the above method embodiments. The implementation process can be referred to the relevant descriptions in the above embodiments, which will not be repeated here.
[0181] Another embodiment of the present invention provides an electronic device, including: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the programs, when executed by the processors, implement the power equipment fault diagnosis method based on dynamic knowledge graph and large model collaborative reasoning as described above.
[0182] Another embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the power equipment fault diagnosis method based on dynamic knowledge graph and large model collaborative reasoning as described above.
[0183] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus (systems), computer devices, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0184] This invention is described with reference to a flowchart of a method according to embodiments of the invention. It should be understood that each step in the flowchart and combinations thereof can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1 A device for a function specified in one or more processes.
[0185] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 The function specified in one or more processes.
[0186] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 Steps of a specified function in one or more processes.
Claims
1. A method for fault diagnosis of power equipment based on dynamic knowledge graph and large model collaborative reasoning, characterized in that, The method includes: A domain dictionary is constructed based on standard documents in the power industry, covering entities of equipment, faults, and measures. Entity pairs in the domain dictionary are matched with power equipment fault diagnosis record text to generate pseudo-labeled data. A sequence labeling model is used to refine the pseudo-labeled data to obtain accurate label sequences. The device operation log is divided into continuous log segments according to a set time window. Based on the precise label sequence, entities and relationships are accurately extracted from each log segment to form a timestamped device status snapshot. The continuous status snapshot sequence is encoded using a time graph convolutional network, and a time-series knowledge graph is dynamically constructed through an incremental learning mechanism. The entities and relations in the time-series knowledge graph are mapped into low-dimensional vectors to achieve graph embedding representation. The text of power equipment fault diagnosis records is vectorized. A knowledge fusion module is added to the front end of the large model input, and the contribution of the knowledge graph and the original text is dynamically adjusted through attention weights. Based on user queries, relevant subgraphs are retrieved from the knowledge graph. Then, a graph attention network is used to encode the retrieved subgraphs to generate context vectors containing information on device connections and historical fault chains. Subsequently, the subgraph encoding results are converted into natural language descriptions and used as prompt words to input into the large model. Fine-tuning techniques are then used to enable the large model to generate diagnostic conclusions containing structured evidence from the knowledge graph.
2. The method according to claim 1, characterized in that, The sequence labeling model adopts a combined model based on BERT-BiLSTM-CRF, including a BERT module, a BiLSTM module, and a CRF module, to perform fine-grained correction on pseudo-labeled data, as follows: The BERT module processes the input text sequence and captures the contextual semantic relationships in the text through a multi-layer Transformer structure to generate dynamic word vectors containing rich contextual information. The BiLSTM module receives the dynamic word vectors output by BERT and uses a bidirectional long short-term memory network to encode the dynamic word vector sequence bidirectionally, capturing long-distance dependencies in the sequence and obtaining the hidden state vector at each position. The CRF module processes the output of BiLSTM, combining the label prediction probability at the current position with the transition probability between labels to globally optimize the labels of the entire sequence, ensuring that the output label sequence conforms to grammatical and semantic rules; the model finally outputs an accurate label sequence corresponding to the input text sequence.
3. The method according to claim 1, characterized in that, Encoding a continuous sequence of state snapshots using a time-graph convolutional network includes: A graph convolutional network is used to encode the graph structure of each state snapshot separately. The encoding process is as follows: the device entity is used as the node, the connection relationship between the devices is used as the edge, and the node features correspond to the state parameters and fault states of the device to construct a single-window graph structure; by aggregating the feature information of each node and its neighboring nodes, the spatial relationship between the devices is captured to obtain the spatial feature representation corresponding to each time window. A recurrent neural network is used to perform temporal encoding on the spatial feature vector sequence. The encoding process is as follows: the spatial feature vectors of each window are processed sequentially in time order, the dependencies between features of different time windows are learned, and the temporal pattern of fault propagation is captured. The final output is a sequence of encoded vectors with the same length as the input state snapshot sequence. Each vector corresponds to a time window and contains the spatial association features of the device within that time window and the temporal dependency features with the preceding and following time windows.
4. The method according to claim 1, characterized in that, The construction method of time-series knowledge graph is as follows: The spatiotemporal features of the encoded vector sequence are analyzed to extract key information within each time window: device entity, device state, correlation strength between devices, and state transition relationship between adjacent time windows; Construct the basic structure and time tags of the knowledge graph, with device entities as the core nodes of the knowledge graph, and add attributes to the nodes based on the parsed device status; The strength of the association between devices is transformed into edges between nodes, and weights are assigned to the edges based on spatial features. At the same time, timestamps are added to each node attribute and edge, and the timestamps correspond to the time window of the encoded vector sequence, so that the knowledge graph has a time dimension. By integrating temporal dependencies to form dynamic relationship chains, and based on the state transition relationships extracted from the encoded vector sequence, temporal edges across time windows are constructed in the knowledge graph, ultimately forming a complete temporal knowledge graph containing device entities, state attributes, spatial associations, and temporal dependencies. The aforementioned dynamic construction of time-series knowledge graphs through incremental learning mechanisms refers to updating only the affected subgraphs rather than reconstructing the entire graph when new data arrives.
5. The method according to claim 4, characterized in that, The incremental learning mechanism dynamically constructs a temporal knowledge graph, as detailed below: When a new time window log segment arrives, a device status snapshot of that time window is extracted based on the precise label sequence, and the extended sequence of "historical snapshot sequence + new snapshot" is encoded through a time graph convolutional network, focusing on obtaining the temporal dependency features between the new snapshot and the most recent historical time window; Based on the entities in the new snapshot and the temporal dependencies encoded by the temporal graph convolutional network, the boundaries of the subgraph that need to be updated are determined: core entities, which are device entities whose state has changed in the new snapshot; associated entities, which are devices directly associated with the static edges and temporal edges of the core entities in the historical graph; and the time range, which is from the specified number of time windows to the current time window. The localized subgraph is updated in a targeted manner, and new time window state attributes are added to the core entities. If the state returns to normal, the state termination time is marked. The temporal edge weights between the core entities and related entities are updated according to the new temporal dependencies encoded by the temporal graph convolutional network. If unrecorded entity relationships appear in the new snapshot, the corresponding static edges and temporal edges are added to the subgraph. After the subgraph update is completed, only the affected subgraphs are indexed and reconstructed, while the remaining unaffected parts of the knowledge graph remain unchanged.
6. The method according to claim 1, characterized in that, A knowledge fusion module is added to the front end of the large model input, dynamically adjusting the contribution of the knowledge graph and the original text through attention weights. Specifically, this includes: Constructing the interaction matrix: Calculate the similarity between each vector in the knowledge graph vector set and the text vector sequence to form the interaction matrix. The matrix elements represent the association strength between the knowledge graph vectors and the text vectors. Attention weights are generated: Based on the interaction matrix, weights are calculated through a two-layer fully connected network and a softmax function. For knowledge graph vectors, the importance weight of each knowledge graph vector relative to the overall text semantics is calculated; for text vectors, the supplementary weight of each text segment relative to the knowledge graph is calculated. Dynamic information fusion: The knowledge graph vector set is weighted and summed according to its attention weight to obtain the knowledge graph fusion vector; the text vector sequence is weighted and summed according to its attention weight to obtain the text fusion vector; the knowledge graph fusion vector and the text fusion vector are concatenated into a unified input vector, which contains both the structured entity relationship knowledge in the knowledge graph and retains the scene details of the original text, and the contribution of both is dynamically adjusted by the attention weight.
7. The method according to claim 1, characterized in that, Also includes: Continuously acquire meteorological data, extract meteorological entities, and convert meteorological entities into fault-related feature vectors; Based on the mapping relationship between "equipment installation location and meteorological area", the association edges between meteorological entities and equipment entities are established; based on historical data, association rules between meteorological entities and fault entities are constructed and the initial weights of the association edges are set. Combining real-time data and fault records, the weights of the association edges are dynamically adjusted through a time-graph convolutional network. The equipment vulnerability index is used as an entity attribute, and the resulting graph structure is embedded as a subgraph into a time-series knowledge graph constructed based on equipment operation logs.
8. A power equipment fault diagnosis system based on dynamic knowledge graph and large model collaborative reasoning, characterized in that, include: The weakly supervised entity relationship extraction module is used to build a domain dictionary based on standard documents in the power industry, covering entities of equipment, fault, and measures; and to match entity pairs in the domain dictionary with the text of power equipment fault diagnosis records to generate pseudo-annotated data. A sequence labeling model is used to perform fine-grained correction on pseudo-labeled data to obtain accurate label sequences; The temporal knowledge graph construction module is used to divide the device operation log into continuous log segments according to a set time window. Based on the precise label sequence, it accurately extracts entities, entity relationships and states from each log segment to form a timestamped device state snapshot. The continuous state snapshot sequence is encoded using a temporal graph convolutional network, and the temporal knowledge graph is dynamically constructed through an incremental learning mechanism. The knowledge injection layer design module is used to map entities and relations in the time-series knowledge graph into low-dimensional vectors to realize graph embedding representation, and to vectorize the text of power equipment fault diagnosis records. A knowledge fusion module is added to the front end of the large model input to dynamically adjust the contribution of the knowledge graph and the original text through attention weights. The two-stage joint reasoning module is used to retrieve relevant subgraphs from the knowledge graph based on user queries, and then encode the retrieved subgraphs using a graph attention network to generate context vectors containing device connection and historical fault chain information. Subsequently, the subgraph encoding results are converted into natural language descriptions as prompt words and input into the large model. Fine-tuning techniques enable the large model to generate diagnostic conclusions containing structured evidence from the knowledge graph.
9. An electronic device, comprising: One or more processors; Memory; And one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the power equipment fault diagnosis method based on dynamic knowledge graph and large model collaborative reasoning as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the power equipment fault diagnosis method based on dynamic knowledge graph and large model collaborative reasoning as described in any one of claims 1-7.
11. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the power equipment fault diagnosis method based on dynamic knowledge graph and large model collaborative reasoning as described in any one of claims 1-7.
Citation Information
Patent Citations
Intelligent maintenance reasoning method based on knowledge graph and large language model
CN119886334A
Power equipment health state monitoring method based on multiple modes
CN120277594A