Fault analysis method, device and system based on interpretability of large electric power model
By performing knowledge graph fusion and causal graph query on the large power model, the problems of insufficient interpretability and lagging knowledge updates in fault diagnosis of the large power model are solved, and high-precision and highly interpretable fault analysis is achieved.
Patent Information
- Application Number
- CN202511015415.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2025-11-11
AI Technical Summary
Existing large-scale power models suffer from insufficient interpretability and lagging knowledge updates in fault diagnosis, failing to dynamically adapt to real-time scenario requirements, resulting in low diagnostic accuracy.
By acquiring and standardizing multi-source historical data, a power knowledge graph file is constructed and input into a graph convolutional network. A large power model with a LoRA adapter is added for fine-tuning. Causal graph queries are performed in conjunction with the power knowledge graph file to achieve dynamic integration of knowledge and model.
It improves the diagnostic accuracy and interpretability of large-scale power models, enabling the tracing of fault causes, dynamic knowledge updates, and meeting the needs of real-time fault diagnosis.
Smart Images

Figure CN120930007A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence and energy and power technologies, and in particular to a fault analysis method, apparatus, system, network equipment, computer-readable storage medium and computer program product based on the interpretability of a large power model. Background Technology
[0002] The stable operation of power systems plays a fundamental supporting role in economic and social development. The stable operation of power systems relies on equipment fault diagnosis and policy compliance analysis. Among these, equipment fault diagnosis depends on the support of large-scale power system models. Large-scale power systems typically refer to intelligent models constructed using massive amounts of data, advanced algorithms, and powerful computing capabilities for the analysis, prediction, optimization, and management of power systems.
[0003] In recent years, with the continuous development of power systems, the demand for high-precision diagnostic support for large-scale power systems has become increasingly urgent. However, existing large-scale power models still have the following problems in generating diagnostic results: 1) Insufficient interpretability: Traditional large-scale power model fine-tuning methods lack the ability to interpret diagnostic logic in fault diagnosis. For example, the model may predict "line tripping" but cannot trace the specific cause (such as "insulator breakdown → partial discharge"), leading to maintenance personnel being unable to trust or correct the model's conclusions. 2) Static application of knowledge graphs: Existing technologies rely on static knowledge base queries and cannot dynamically combine with the large-scale model's reasoning process. For example, the equipment topology relationships in the knowledge graph are only used for queries and do not participate in model parameter optimization, resulting in knowledge updates lagging behind real-time scenario requirements (such as new equipment access or changes in fault modes).
[0004] In summary, current diagnostic methods generated using large-scale power models are not very accurate and lack interpretability. Summary of the Invention
[0005] Therefore, it is necessary to provide a fault analysis method, device, system, network equipment, computer-readable storage medium, and computer program product based on the interpretability of a large power model, which can improve diagnostic accuracy and interpretability, in response to the above-mentioned technical problems.
[0006] Firstly, this application provides a fault analysis method based on the interpretability of a large power model, applied to the cloud layer in a smart grid cloud-edge-device collaborative architecture, the method comprising:
[0007] Acquire multi-source historical data, and perform standardization processing on the multi-source historical data to obtain standardized multi-source historical data. The multi-source historical data includes historical power grid operating parameters, historical meteorological data, and historical fault records. The historical power grid operating parameters include voltage, current, power, and load.
[0008] Entity recognition and inter-entity relationship extraction are performed on the standardized multi-source historical data to obtain a power knowledge graph file; the power knowledge graph file is then input into a graph convolutional network to obtain knowledge embedding vectors.
[0009] A large-scale power model using the transformer mechanism is obtained. A LoRA adapter is added after the attention layer in the large-scale power model to obtain an improved large-scale power model. The input of the improved large-scale power model includes power grid operating parameters and meteorological data, and the output of the improved large-scale power model is the fault type. The LoRA adapter is initialized using the knowledge embedding vector, and the improved large-scale power model is fine-tuned using the standardized multi-source historical data.
[0010] The standardized real-time power grid operating parameters and real-time meteorological data are input into the improved power large model to obtain the fault type prediction results.
[0011] The cause-effect graph is obtained by querying the power knowledge graph file; a path search is performed on the cause-effect graph to obtain the fault cause of the fault type prediction result.
[0012] In one embodiment, the step of performing entity recognition and entity relationship extraction on the standardized multi-source historical data to obtain a power knowledge graph file includes: using a recognition model to perform entity recognition on the standardized multi-source historical data to obtain multiple entities, wherein the recognition model adopts a self-attention mechanism and a hidden Markov model; using a relationship extraction model to extract entity relationships from all entities, wherein the relationship extraction model adopts a bidirectional long short-term memory network and a conditional random field; and all entities and the extracted entity relationships constitute the power knowledge graph file.
[0013] In one embodiment, initializing the LoRA adapter using the knowledge embedding vector means using the knowledge embedding vector as the initial value of the low-rank matrix in the LoRA adapter.
[0014] In one embodiment, fine-tuning the improved power grid model using the standardized multi-source historical data includes: using historical power grid operating parameters and historical meteorological data from the standardized multi-source historical data as model inputs, and using fault types from the historical fault records as labels; the model inputs and the labels constitute a training set; defining a total loss function, which includes a task loss function and a knowledge constraint loss function; calculating the knowledge constraint loss function using the knowledge embedding vector; and fine-tuning the improved power grid model using the training set until the total loss function meets the requirements, at which point the fine-tuning is complete.
[0015] In one embodiment, the step of querying the power knowledge graph file to obtain a causal graph and performing path search on the causal graph to obtain the fault cause of the fault type prediction result includes: constructing a SPARQL query statement based on the fault type prediction result, using the SPARQL query statement to query the power knowledge graph file to obtain the causal graph; performing path search on the causal graph to obtain all causal paths; calculating the weight of each causal path, and filtering out a set number of causal paths with the highest weight to obtain the fault cause.
[0016] Secondly, this application also provides a fault analysis device based on the interpretability of a large power model, deployed in the cloud layer of a smart grid cloud-edge-device collaborative architecture, the device comprising:
[0017] The input data module is used to acquire multi-source historical data, and to perform standardization processing on the multi-source historical data to obtain standardized multi-source historical data. The multi-source historical data includes historical power grid operating parameters, historical meteorological data, and historical fault records. The historical power grid operating parameters include voltage, current, power, and load.
[0018] The knowledge graph construction module is used to perform entity recognition and entity relationship extraction on the standardized multi-source historical data to obtain a power knowledge graph file.
[0019] The graph embedding generation module is used to input the power knowledge graph file into a graph convolutional network to obtain knowledge embedding vectors.
[0020] The large-scale model fine-tuning module is used to acquire a large-scale power model using the transformer mechanism, add a LoRA adapter after the attention layer of the large-scale power model to obtain an improved large-scale power model. The input of the improved large-scale power model includes power grid operating parameters and meteorological data, and the output of the improved large-scale power model is the fault type. The LoRA adapter is initialized using the knowledge embedding vector, and the improved large-scale power model is fine-tuned using the standardized multi-source historical data. The acquired standardized real-time power grid operating parameters and real-time meteorological data are input into the improved large-scale power model to obtain the fault type prediction result.
[0021] The causal reasoning and explanation module is used to query the power knowledge graph file to obtain a causal graph; perform path search on the causal graph to obtain the fault cause of the fault type prediction result.
[0022] Thirdly, this application also provides a fault analysis system based on the interpretability of a large power model, applied to a smart grid cloud-edge-device collaborative architecture, the system including an edge layer device, a cloud layer device, and a user layer device;
[0023] The edge layer device is used to collect multi-source historical data, obtain real-time power grid operation parameters and real-time meteorological data, and send them to the cloud layer device;
[0024] The cloud layer device is used to execute the method of the first aspect, obtain the fault type prediction result and the fault cause, and send them to the user layer device;
[0025] The user layer device is used to display the fault type prediction result and the fault cause.
[0026] Fourthly, this application also provides a network device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method of the first aspect.
[0027] Fifthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method of the first aspect.
[0028] Sixthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the method of the first aspect.
[0029] The aforementioned fault analysis methods, devices, systems, network equipment, computer-readable storage media, and computer program products based on the interpretability of large-scale power models involve standardizing acquired multi-source historical data to obtain standardized multi-source historical data, and then using this standardized multi-source historical data to generate a power knowledge graph file. The power knowledge graph file is then input into a graph convolutional network to obtain knowledge embedding vectors. A large-scale power model employing a transformer mechanism is obtained, and a LoRA adapter is added after the attention layer in the large-scale power model to obtain an improved large-scale power model. The inputs of the improved large-scale power model include power grid operating parameters and meteorological data, and the output of the improved large-scale power model is the fault type. The LoRA adapter is initialized using the knowledge embedding vectors, and the improved large-scale power model is fine-tuned using the standardized multi-source historical data. In this case, the knowledge embedding vectors obtained from the power knowledge graph file are integrated into the fine-tuning process of the improved large-scale power model, participating in the optimization of model parameters. This achieves a dynamic combination of knowledge and model prediction, avoids knowledge updates lagging behind the requirements of real-time fault diagnosis scenarios, and improves the diagnostic accuracy of the improved large-scale power model. Furthermore, by inputting the standardized real-time power grid operating parameters and real-time meteorological data into the improved power system model, fault type prediction results are obtained. A causal graph is then obtained by querying a power knowledge graph file. Path search is performed on the causal graph to obtain the fault causes from the fault type prediction results. In this case, by utilizing the power knowledge graph file to obtain the fault causes from the fault type prediction results, this invention not only obtains fault type prediction results but also traces the specific fault causes. Therefore, compared to related fault diagnosis technologies, this invention improves the interpretability of the diagnostic results. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This is a flowchart illustrating a fault analysis method based on the interpretability of a large power model in one embodiment;
[0032] Figure 2 This is a flowchart illustrating a fault analysis method based on the interpretability of a large power model, as described in another embodiment.
[0033] Figure 3 This is a flowchart illustrating the knowledge graph embedding and model fine-tuning process in one embodiment;
[0034] Figure 4This is a flowchart illustrating the causal reasoning and explanation output in one embodiment;
[0035] Figure 5 Here is a system deployment architecture diagram for one embodiment;
[0036] Figure 6 for Figure 5 A schematic diagram of key interaction processes in the system deployment architecture;
[0037] Figure 7 This is a structural block diagram of a fault analysis device based on the interpretability of a large power model in one embodiment. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0039] In recent years, the demand for high-precision decision support (such as high-precision fault diagnosis results and compliance analysis results) from large-scale power models has become increasingly urgent in scenarios such as power system equipment fault diagnosis and policy compliance analysis. However, existing technologies have the following technical problems:
[0040] 1) Insufficient interpretability: Traditional power model fine-tuning methods lack the ability to explain decision-making logic in fault diagnosis or policy analysis. For example, the model may predict "line tripping" but cannot trace the specific cause (e.g., "insulator breakdown → partial discharge"), leading to maintenance personnel's inability to trust or revise the model's conclusions. 2) Static application of knowledge graphs: Related technologies rely on static knowledge base queries and cannot dynamically integrate with the large model's reasoning process. For example, the device topology relationships in the knowledge graph are only used for queries and do not participate in model parameter optimization, resulting in knowledge updates lagging behind real-time scenario requirements (e.g., new equipment access or changes in fault modes). 3) Low fine-tuning efficiency: Traditional full-parameter fine-tuning methods consume significant computational resources (e.g., GPU time, storage space), while efficient parameter fine-tuning may sacrifice model performance, making it difficult to balance resources and effectiveness. 4) Difficulty in knowledge updates: The fine-tuned model knowledge is static and cannot absorb new data in real time (e.g., policy changes or equipment status updates), leading to delays in power policy analysis or fault diagnosis.
[0041] To address the aforementioned problems, this invention provides a fault analysis method for improving the interpretability of large-scale power models. This invention utilizes a causal reasoning module and dynamic embedding of a knowledge graph to force the generation of traceable causal paths (e.g., "insulator contamination → partial discharge → line insulation failure"), thus resolving the insufficient interpretability issue. Furthermore, this invention encodes the knowledge graph using a Graph Convolutional Network (GCN), dynamically integrating node embedding into the model fine-tuning process, and generates causal graphs in real-time using SPARQL, achieving linkage between knowledge and reasoning. This invention employs low-rank adaptation (LoRA) technology to fine-tune only the low-rank parameters associated with the knowledge graph, preserving the underlying parameters of the large model, significantly reducing computational costs while maintaining performance. Finally, this invention achieves continuous knowledge updates through the fusion of dynamic causal graphs and real-time data.
[0042] The fault analysis method based on the interpretability of a large power model provided in this application will be described in detail below with reference to specific embodiments.
[0043] In one exemplary embodiment, such as Figure 1 As shown, a fault analysis method based on the interpretability of a large power model is provided. This method is applied to the cloud layer in the cloud-edge-device collaborative architecture of a smart grid. The smart grid cloud-edge-device collaborative architecture includes an edge layer, a cloud layer, and a user layer. The edge layer is used to acquire relevant data from the power grid, including but not limited to power grid operating parameters and meteorological data. The cloud layer deploys a large power model, which is used for fault analysis to obtain analytical decisions (i.e., fault analysis results). The user layer is used to display the analytical decisions from the cloud layer. The fault analysis method in this embodiment includes the following steps:
[0044] Step 102: Obtain multi-source historical data and standardize the multi-source historical data to obtain standardized multi-source historical data. The multi-source historical data includes historical power grid operating parameters, historical meteorological data, and historical fault records. The historical power grid operating parameters include voltage, current, power, and load.
[0045] Multi-source historical data refers to data from multiple sources during the historical operation of the power grid system. This multi-source data includes power grid operating parameters, meteorological data, and fault records. Standardization processing refers to the unified and standardized processing of data from different sources, formats, or systems. Historical power grid operating parameters refer to the operating parameters during the historical operation of the power grid system, including voltage, current, power, load, equipment vibration, and equipment temperature. Historical fault records include fault types.
[0046] For example, historical operating parameters, historical meteorological data, and historical fault records of the power grid are obtained, and the historical operating parameters, historical meteorological data, and historical fault records of the power grid are standardized respectively to obtain corresponding standardized data. All the obtained standardized data are used to form standardized multi-source historical data.
[0047] Step 104: Perform entity recognition and entity relationship extraction on standardized multi-source historical data to obtain a power knowledge graph file; input the power knowledge graph file into a graph convolutional network to obtain knowledge embedding vectors.
[0048] Entity recognition and relation extraction are two core steps in constructing a knowledge graph. These steps involve storing the extracted entities and relations in a graph structure. The power knowledge graph file is graph-structured data that includes the extracted entities and relations. A Graph Convolutional Network (GCN) is a type of neural network specifically designed for processing graph-structured data.
[0049] For example, entity recognition is performed on standardized multi-source historical data, and the relationships between the identified entities are extracted to obtain a power knowledge graph file; the power knowledge graph file is then input into a graph convolutional network to output knowledge embedding vectors.
[0050] Step 106: Obtain a large-scale power model using the transformer mechanism. Add a LoRA adapter after the attention layer in the large-scale power model to obtain an improved large-scale power model. The input of the improved large-scale power model includes power grid operating parameters and meteorological data. The output of the improved large-scale power model is the fault type. Initialize the LoRA adapter using knowledge embedding vectors and fine-tune the improved large-scale power model using standardized multi-source historical data.
[0051] The transformer mechanism is based on a self-attention deep learning architecture. The LoRA adapter is added between the attention layer and the layer after the attention layer in the large power model. After adding the LoRA adapter, a low-rank matrix is injected into the large model. During fine-tuning, the original parameters of the large model remain unchanged, and only the low-rank matrix is adjusted.
[0052] Step 108: Input the standardized real-time power grid operating parameters and real-time meteorological data into the improved power large model to obtain the fault type prediction results.
[0053] Among them, real-time power grid operating parameters refer to the operating parameters of the power grid system during real-time operation. Real-time meteorological data refers to the meteorological data of the power grid system during real-time operation.
[0054] For example, standardized real-time power grid operating parameters and real-time meteorological data are obtained, and then the standardized real-time power grid operating parameters and real-time meteorological data are input into the improved power grid model after fine-tuning to perform fault prediction, and the fault type prediction results are obtained.
[0055] Step 110: Query the power knowledge graph file to obtain the cause-effect graph; perform path search on the cause-effect graph to obtain the fault cause of the fault type prediction result.
[0056] Among them, the cause-effect graph refers to a network structure that represents the causal relationship between fault types and different devices.
[0057] For example, the query language is determined, and the power knowledge graph file is queried to obtain the cause-effect graph; a path search is performed on the cause-effect graph to obtain the fault causes of the fault type prediction results.
[0058] In the aforementioned fault analysis method based on the interpretability of a large-scale power model, standardized multi-source historical data is obtained through standardization. A power knowledge graph file is then generated from this standardized historical data. This knowledge graph file is input into a graph convolutional network to obtain knowledge embedding vectors. A large-scale power model using a transformer mechanism is then obtained. A LoRA adapter is added after the attention layer of the large-scale power model to generate an improved model. The inputs of the improved model include power grid operating parameters and meteorological data, and the output is the fault type. The LoRA adapter is initialized using the knowledge embedding vectors, and the improved model is fine-tuned using the standardized multi-source historical data. In this approach, the knowledge embedding vectors obtained from the power knowledge graph file are integrated into the fine-tuning process of the improved model, participating in the optimization of model parameters. This achieves a dynamic combination of knowledge and model prediction, avoids knowledge updates lagging behind the requirements of real-time fault diagnosis scenarios, and improves the diagnostic accuracy of the improved large-scale power model. Furthermore, by inputting the standardized real-time power grid operating parameters and real-time meteorological data into the improved power system model, fault type prediction results are obtained. A causal graph is then obtained by querying a power knowledge graph file. Path search is performed on the causal graph to obtain the fault causes from the fault type prediction results. In this case, by utilizing the power knowledge graph file to obtain the fault causes from the fault type prediction results, this invention not only obtains fault type prediction results but also traces the specific fault causes. Therefore, compared to related fault diagnosis technologies, this invention improves the interpretability of the diagnostic results.
[0059] In an exemplary embodiment, entity recognition and inter-entity relationship extraction are performed on standardized multi-source historical data to obtain a power knowledge graph file. This includes: using a recognition model to perform entity recognition on the standardized multi-source historical data to obtain multiple entities, wherein the recognition model adopts a self-attention mechanism and a hidden Markov model; using a relationship extraction model to extract inter-entity relationships from all entities, wherein the relationship extraction model adopts a bidirectional long short-term memory network and a conditional random field; and all entities and the extracted inter-entity relationships constitute the power knowledge graph file.
[0060] Among these, self-attention is a mechanism capable of calculating the relationships between elements within a sequence. Hidden Markov Models (HMMs) are a sequence modeling method. Bidirectional Long Short-Term Memory (LSTM) networks are neural networks that simultaneously capture forward (left-to-right) and backward (right-to-left) information of a sequence through a bidirectional propagation mechanism. Conditional Random Fields (CRFs) are probabilistic graphical models.
[0061] In this embodiment, entity recognition using a self-attention mechanism and a Hidden Markov Model (HMM) can capture the relationships between entities that are far apart in the text, which is more conducive to understanding entity relationships in complex contexts. Furthermore, the parameters of the HMM have clear probabilistic interpretations, making the model's decision-making process more transparent. Relationship extraction using a bidirectional long short-term memory network (LSTM) and a conditional random field (CRF) can handle both local and contextual information while also addressing global label dependencies, forming a hierarchical information processing flow and improving the accuracy and robustness of relation extraction.
[0062] In an exemplary embodiment, initializing the LoRA adapter using a knowledge embedding vector means using the knowledge embedding vector as the initial value of the low-rank matrix in the LoRA adapter.
[0063] In this context, a low-rank matrix is a matrix whose rank is much smaller than its number of rows and columns. The LoRA adapter uses low-rank matrices to approximate the amount of model parameter updates.
[0064] In this embodiment, by using the knowledge embedding vector as the initial value of the low-rank matrix in the LoRA adapter, the knowledge graph can be fused with the large model, constraining the parameter space of the large model and solving the problem of insufficient interpretability caused by knowledge loss in traditional fine-tuning.
[0065] In an exemplary embodiment, fine-tuning an improved power grid model using standardized multi-source historical data includes: using historical power grid operating parameters and historical meteorological data from the standardized multi-source historical data as model inputs, and using fault types from historical fault records as labels; the model inputs and labels constitute a training set; defining a total loss function, which includes a task loss function and a knowledge constraint loss function; the knowledge constraint loss function is calculated using knowledge embedding vectors; and fine-tuning the improved power grid model using the training set until the total loss function meets the requirements, at which point the fine-tuning is complete.
[0066] The task loss function refers to the error function between the predicted value and the actual value.
[0067] In this embodiment, a total loss function is defined, which includes a task loss function and a knowledge constraint loss function. The knowledge constraint loss function is calculated using knowledge embedding vectors, which can guide knowledge, prevent "catastrophic forgetting" caused by fine-tuning, and improve the model's adaptability to new types of faults.
[0068] In an exemplary embodiment, querying a power knowledge graph file yields a causal graph; performing path search on the causal graph to obtain the fault cause based on the fault type prediction results includes: constructing a SPARQL query statement based on the fault type prediction results, using the SPARQL query statement to query the power knowledge graph file to obtain the causal graph; performing path search on the causal graph to obtain all causal paths; calculating the weight of each causal path, and selecting a set number of causal paths with the highest weights to obtain the fault cause.
[0069] SPARQL query statements are W3C-standardized RDF (Resource Description Framework) data query language used to retrieve and manipulate information from semantic web data.
[0070] In this embodiment, a causal graph is obtained by querying the power knowledge graph file using SPARQL query statements. Path search is then performed on the causal graph to obtain a set number of causal paths with the highest weight. In this case, SPARQL query and search can simultaneously match complex relationship networks between multiple entities, discover implicit indirect association paths between entities, improve the accuracy of the searched causal paths, and thus make the cause of the fault more accurate.
[0071] For example, a fault analysis method based on the interpretability of a large power model specifically includes:
[0072] Step 202: Obtain multi-source historical data and standardize the multi-source historical data to obtain standardized multi-source historical data. The multi-source historical data includes historical power grid operating parameters, historical meteorological data, and historical fault records. The historical power grid operating parameters include voltage, current, power, and load.
[0073] Specifically, such as Figure 2 As shown, the input data module receives multi-source historical data. This multi-source historical data includes historical power grid operating parameters, historical meteorological data, and historical fault records. Historical power grid operating parameters include voltage, current, power, load, and power equipment sensor data (such as temperature and vibration). The input data module can also acquire real-time power grid operating parameters and real-time meteorological data. It can also receive policy texts, equipment manuals, etc. Among these, historical or real-time power grid operating parameters and meteorological data belong to the SCADA (Supervisory Control And Data Acquisition) system data.
[0074] The data received by the input data module can be categorized into structured data (such as SCADA system data), unstructured text (such as equipment manuals), and time-series data (such as load curves in power grid operating parameters). The input data module standardizes the received data, unifying and standardizing data from different sources, formats, or systems, and then selectively sends different standardized data to the corresponding modules for further processing.
[0075] Step 204: Perform entity recognition and entity relationship extraction on the standardized multi-source historical data to obtain the power knowledge graph file; input the power knowledge graph file into the graph convolutional network to obtain the knowledge embedding vector.
[0076] Specifically, such as Figure 2 As shown, the input data module sends standardized multi-source historical data to the knowledge graph construction module to build a power equipment knowledge graph. This knowledge graph includes equipment topology relationships, fault mechanisms, and component associations. The constructed power equipment knowledge graph is stored in the form of a power knowledge graph file. The process of obtaining the power knowledge graph file in the knowledge graph construction module includes:
[0077] 1) Entity Recognition: Using a Transformer (self-attention mechanism) + HMM (Hidden Markov Model), entities such as device names and fault types are identified from standardized multi-source historical data. The Transformer is used to extract candidate entities (e.g., "insulator") from the text (i.e., standardized multi-source historical data). The HMM is used to verify entity boundaries and types through the Hidden Markov Model to obtain the final entities. Entity boundaries are a set of numbers in a high-dimensional space used to distinguish different types of entities.
[0078] 2) Relationship extraction: Relationships between entities are extracted using a BiLSTM (Bidirectional Long Short-Term Memory)-CRF (Bidirectional Long Short-Term Memory) model or a rule engine (such as "insulator connecting wire"). All entities and their relationships constitute the power knowledge graph file.
[0079] The knowledge graph construction module outputs a power knowledge graph file (e.g., RDF format), which contains nodes (equipment, components) and edges (relationships). It should be noted that the input to the knowledge graph construction module is updated periodically to avoid knowledge updates lagging behind real-time fault diagnosis requirements.
[0080] like Figure 2As shown, the knowledge graph construction module sends the power knowledge graph file to the graph embedding generation module to generate knowledge embedding vectors (i.e., low-dimensional embedding vectors). Specifically, the graph embedding generation module includes a graph convolutional network (GCN). The graph embedding generation module encodes the power knowledge graph file (e.g., equipment topology relationships) through the graph convolutional network (GCN) to obtain low-dimensional embedding vectors (also called node embedding vectors). These low-dimensional embedding vectors refer to the vector representations of equipment nodes (e.g., the vector features of insulators), which are used to constrain the parameters of subsequent large-scale models to achieve knowledge graph fusion.
[0081] Graph Convolutional Networks (GCNs) consist of multiple layers of GCN units, and the formula for each GCN unit is:
[0082] ;
[0083] In the formula, It is the node feature matrix output by the (k+1)th layer GCN unit. It is an activation function. yes The degree matrix, It is the contiguous matrix plus the self-join (i.e., the sum of the contiguous matrix and the identity matrix). It is the node feature matrix input to the (k+1)th layer GCN unit (i.e., the node feature matrix output by the kth layer GCN unit). This is the weight matrix of the k-th layer. It should be noted that the node feature matrix output by the last GCN unit is the required knowledge embedding vector.
[0084] Step 206: Obtain a large-scale power model using the transformer mechanism. Add a LoRA adapter after the attention layer in the large-scale power model to obtain an improved large-scale power model. The input of the improved large-scale power model includes power grid operating parameters and meteorological data. The output of the improved large-scale power model is the fault type. Initialize the LoRA adapter using knowledge embedding vectors and fine-tune the improved large-scale power model using standardized multi-source historical data.
[0085] like Figure 2 As shown, the input data module sends standardized multi-source historical data to the large model fine-tuning module, and the graph embedding generation module sends the generated knowledge embedding vector to the large model fine-tuning module. The large model fine-tuning module performs parameter fine-tuning on the improved power large model (hereinafter referred to as the large model) based on the knowledge embedding vector and the standardized multi-source historical data.
[0086] Specifically, the LoRA adapter (also known as the LoRA parameter adaptation layer) is added to the attention layer of the large-scale power model, and only the low-rank matrices A and B are trained. The training weights of the LoRA adapter are the parameter increments ΔW, which satisfy:
[0087] ;
[0088] ;
[0089] In the formula, both A and B are low-rank matrices. The number of rows of the low-rank matrix A is d, and the number of columns is r. The number of rows of the low-rank matrix B is r, and the number of columns is d. r << d. W0 is the original parameter matrix of the power large model, and W new is the parameter matrix of the improved large model. Among them, the power large model is a pre-trained model. The power large model can adopt open-source models such as LLaMA and VisionTransformer. During fine-tuning, only the low-rank matrices A and B are trained. The fine-tuned large model is a model that integrates knowledge graph constraints and is used for subsequent fault type prediction tasks.
[0090] During fine-tuning, the total loss function satisfies:
[0091] ;
[0092] In the formula, is the total loss function; is the task loss function (for example, cross-entropy is adopted); is the knowledge constraint loss function, and using this loss function can ensure that the model parameters conform to the relationships in the power knowledge graph file; is the set of triples in the power knowledge graph file. e h is the knowledge embedding vector of the head entity h, and e t is the knowledge embedding vector of the tail entity t, and r r is the knowledge embedding vector of the relationship r. When the total loss function meets the requirements (for example, the total loss value is less than the set total loss threshold), the fine-tuning is completed. The parameters of the fine-tuned large model contain feature expressions with knowledge constraints.
[0093] Step 208: Input the obtained normalized real-time grid operation parameters and real-time meteorological data into the improved power large model to obtain a fault type prediction result.
[0094] Specifically, in the real-time fault diagnosis scenario, the input data module also sends the normalized real-time grid operation parameters and real-time meteorological data to the fine-tuned improved power large model to obtain a fault type prediction result. The fault type prediction result includes the type of fault that occurs. The types of faults that occur include but are not limited to line tripping, etc.
[0095] In this embodiment, steps 204 to 208 mainly complete the knowledge graph fusion at the cloud layer. The knowledge graph fusion includes a knowledge constraint process, a fine-tuning and an inference process, such as Figure 3 As shown, the knowledge constraint process includes knowledge graph (i.e., power knowledge graph file) generation, GCN encoding, embedding vector (i.e., low-dimensional embedding vector) generation, and LoRA parameter adaptation layer settings. The fine-tuning and inference process includes obtaining a pre-trained large model (i.e., obtaining a pre-trained power large model), obtaining a fine-tuned large model, and using the fine-tuned large model to obtain the inference output (i.e., fault type prediction result). Knowledge graph fusion is achieved through a knowledge graph construction module, a graph embedding generation module, and a large model fine-tuning module. The knowledge graph construction module, graph embedding generation module, and large model fine-tuning module constitute a large model fine-tuning cluster deployed in the cloud layer (see...). Figure 5 ).
[0096] Step 210: Query the power knowledge graph file to obtain the cause-effect graph; perform path search on the cause-effect graph to obtain the fault cause of the fault type prediction result.
[0097] To improve interpretability, such as Figure 2 As shown, the large model fine-tuning module sends the output fault type prediction results to the causal reasoning module and the output explanation model for causal reasoning and explanation, thereby obtaining the cause of the fault.
[0098] Specifically, the causal reasoning module is used to generate interpretable causal paths, such as "insulator breakdown → partial discharge → line tripping". The process of generating causal paths includes:
[0099] 1) Cause-effect graph construction: Query the power knowledge graph file using SPARQL queries to extract the causal relationships between equipment failures and the environment and operations, generating a cause-effect graph. 2) Path search: Use BFS (Breadth-First Search) or DFS (Depth-First Search) algorithms to find the root cause paths of failures in the cause-effect graph, outputting a list of causal paths and their weights (e.g., the confidence level of "insulator contamination" leading to "partial discharge" is 0.85).
[0100] In this embodiment, the SPARQL query statement is constructed based on the fault type prediction result. Specifically, the subject or object in the triple form of the SPARQL query statement is set to the fault type prediction result to obtain the required SPARQL query statement.
[0101] In this embodiment, the required SPARQL query statement is used to query the power knowledge graph file to generate a cause-effect graph. SPARQL path search is performed in the cause-effect graph to find all root cause paths of the fault in reverse (e.g., a path is insulator → conductor → circuit breaker). The weight of each root cause path (referring to the complete cause-effect path) is calculated.
[0102] In this embodiment, the weights are represented by confidence scores, which can be calculated using the number of failures or Bayesian probability. For example, the confidence score formula calculated using the number of failures satisfies:
[0103] ;
[0104] In the formula, the historical occurrence count refers to the number of times the fault type predicted in the fault type prediction results has occurred in the historical operation of the power grid. If Bayesian probability is used to calculate the confidence level, the probability of the fault type predicted in the fault type prediction results occurring under the condition of a fault is calculated, and the product of this probability and the expert score is calculated to obtain the confidence level. After calculating the weights of all fault root cause paths, all weights are sorted in descending order, and the paths corresponding to the top N weights are selected (i.e., the top N paths with the highest weights), where N is a set number.
[0105] The output explanation module is used to convert the fault type prediction results and the output causal path into natural language explanations. The specific implementation process includes: 1) Path mapping: Associating the causal path with the fault type prediction results of the large model (e.g., "line tripping") to generate explanation text. This explanation text includes the fault type prediction result and the fault cause. This explanation text is in natural language; for example, the fault type prediction result is line tripping, and the fault cause is insulator contamination leading to partial discharge, ultimately causing the line tripping.
[0106] 2) Visualization: Use tree diagrams or flowcharts to display causal chains (such as "insulator → conductor → circuit breaker") and label the confidence level of each path.
[0107] In this embodiment, step 210 mainly completes the causal reasoning and explanation at the cloud layer. Causal reasoning and explanation include the causal reasoning process and the explanation output process. For example... Figure 4 As shown, the causal reasoning process includes obtaining model prediction results (i.e., obtaining fault type prediction results), causal graph query, SPARQL path search, path weight calculation, and path filtering; the explanation output process includes explanation generation and visualization output. Causal reasoning and explanation are implemented through a causal reasoning module and an output explanation module. The causal reasoning module and the output explanation module constitute the causal reasoning engine deployed in the cloud layer (see...). Figure 5 ).
[0108] In this embodiment, after the cloud layer obtains the interpreted text and causal chain, it can also send it to the application layer (i.e., the user layer) for display (participation). Figure 2 or Figure 5The application layer includes application scenario interfaces and user terminals. Application scenario interfaces can be used to interface with scenarios such as equipment fault diagnosis and policy compliance analysis. For example, in this embodiment, the application scenario interface is used to interface with the equipment fault diagnosis scenario. Specifically, after receiving a fault query command, the user terminal displays and outputs the received explanation text and causal chain from the cloud layer. The explanation text and causal chain can be structured results (such as a fault diagnosis report in JSON format).
[0109] like Figure 2 As shown, the application scenario interface of the application layer can also receive real-time data (real-time data refers to real-time power grid operating parameters) output by the input data module of the cloud layer, determine whether the real-time power grid operating parameters are incorrect, provide targeted prompts, and send the judgment results to the input data module in the form of feedback data so that the input data module can obtain new real-time data from the edge layer when the real-time power grid operating parameters are incorrect.
[0110] In this embodiment, the multi-source data acquired by the input data module comes from the edge layer. For example... Figure 5 As shown, the edge layer includes edge computing devices and a data acquisition module. Edge computing devices deploy lightweight models (such as LoRA adapters) and can also process real-time data (such as sensor signals). The data acquisition module collects data from multiple sources and transmits it to the cloud layer. Data acquired by the input data module is also sent to the knowledge graph database in the cloud layer, where the knowledge graph is updated regularly. The knowledge graph database is used to store knowledge such as device topology and fault mechanisms.
[0111] In this embodiment, within the overall smart grid cloud-edge-device collaborative architecture, such as Figure 6 As shown, the key interaction flow includes: Input data: Multi-source data is cleaned and formatted. Knowledge graph construction: A knowledge graph is generated and embedding vectors are extracted. LoRA adaptation layer: Knowledge embeddings are combined with the training set to fine-tune the parameters of the large model. Large model inference: Predictive results (such as fault types) are generated. Causal path query: Causal paths are extracted from the knowledge graph based on the prediction results. Output explanation: The paths are converted into user-understandable explanatory text. User interface: The final results (such as a fault diagnosis report) are displayed.
[0112] This embodiment employs a dynamic fusion framework of knowledge graphs and large-scale models. It primarily utilizes a power large-scale model fine-tuning method based on multimodal data fusion strategies and graph embedding constraints. Node embeddings are generated through GCN encoding of the knowledge graph, constraining the parameter space of the large-scale model and addressing the insufficient interpretability caused by knowledge gaps in traditional fine-tuning. This enhances the model's understanding of power sector terminology and equipment relationships, significantly improving the accuracy of tasks such as fault diagnosis and policy compliance analysis. This embodiment also uses a multi-model weight averaging method to enhance generalization ability. Multiple power large-scale models are configured with different hyperparameters for fine-tuning training, and a comprehensive model is generated by calculating the weight average. Performance is validated on test sets and distribution offset datasets; if performance is unsatisfactory, iterative optimization is performed. This maximizes model accuracy and improves generalization ability to new scenarios without increasing inference costs. Furthermore, this embodiment employs a causal reasoning-driven interpretable output mechanism. It combines SPARQL path search of the knowledge graph with Bayesian network probability calculation to generate causal path explanations, which are then output through natural language mapping. It provides traceable diagnostic evidence, meets the power industry's requirements for decision-making transparency, and reduces the cost of manual review.
[0113] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0114] Based on the same inventive concept, this application also provides a fault analysis device based on the interpretability of a large power model for implementing the fault analysis method based on the interpretability of a large power model described above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the fault analysis device based on the interpretability of a large power model provided below can be found in the limitations of the fault analysis method based on the interpretability of a large power model above, and will not be repeated here.
[0115] In one exemplary embodiment, such as Figure 7As shown, a fault analysis device based on the interpretability of a large power model is provided, including: an input data module 702, a knowledge graph construction module 704, a graph embedding generation module 706, a large model fine-tuning module 708, and a causal reasoning and explanation module 710, wherein:
[0116] The input data module 702 is used to acquire multi-source historical data, perform standardization processing on the multi-source historical data to obtain standardized multi-source historical data, which includes historical power grid operating parameters, historical meteorological data and historical fault records. The historical power grid operating parameters include voltage, current, power and load.
[0117] The knowledge graph construction module 704 is used to perform entity recognition and entity relationship extraction on standardized multi-source historical data to obtain a power knowledge graph file.
[0118] Graph embedding generation module 706 is used to input the power knowledge graph file into the graph convolutional network to obtain knowledge embedding vectors;
[0119] The large-scale model fine-tuning module 708 is used to acquire a large-scale power model using the transformer mechanism. A LoRA adapter is added after the attention layer in the large-scale power model to obtain an improved large-scale power model. The input of the improved large-scale power model includes power grid operating parameters and meteorological data, and the output of the improved large-scale power model is the fault type. The LoRA adapter is initialized using knowledge embedding vectors, and the improved large-scale power model is fine-tuned using standardized multi-source historical data. The acquired standardized real-time power grid operating parameters and real-time meteorological data are input into the improved large-scale power model to obtain the fault type prediction results.
[0120] The causal reasoning and explanation module 710 is used to query the power knowledge graph file to obtain the causal graph; and to perform path search on the causal graph to obtain the fault cause of the fault type prediction result.
[0121] In one embodiment, the knowledge graph construction module 704 performs entity recognition and entity relationship extraction on standardized multi-source historical data to obtain a power knowledge graph file. This includes: using a recognition model to perform entity recognition on the standardized multi-source historical data to obtain multiple entities, wherein the recognition model adopts a self-attention mechanism and a hidden Markov model; using a relationship extraction model to extract relationships between all entities, wherein the relationship extraction model adopts a bidirectional long short-term memory network and a conditional random field; and all entities and the extracted relationships between entities constitute the power knowledge graph file.
[0122] In one embodiment, in the large model fine-tuning module 708, initializing the LoRA adapter using the knowledge embedding vector means using the knowledge embedding vector as the initial value of the low-rank matrix in the LoRA adapter.
[0123] In one embodiment, the large model fine-tuning module 708 uses standardized multi-source historical data to fine-tune the improved power large model, including: using historical power grid operating parameters and historical meteorological data from the standardized multi-source historical data as model inputs, and using fault types from historical fault records as labels, with the model inputs and labels constituting a training set; defining a total loss function, which includes a task loss function and a knowledge constraint loss function; calculating the knowledge constraint loss function using knowledge embedding vectors; and fine-tuning the improved power large model using the training set until the total loss function meets the requirements, at which point the fine-tuning is complete.
[0124] In one embodiment, the causal reasoning and explanation module 710 queries a power knowledge graph file to obtain a causal graph; performs path search on the causal graph to obtain the fault cause of the fault type prediction result, including: constructing a SPARQL query statement based on the fault type prediction result, using the SPARQL query statement to query the power knowledge graph file to obtain the causal graph; performing path search on the causal graph to obtain all causal paths; calculating the weight of each causal path, filtering out a set number of causal paths with the largest weights to obtain the fault cause.
[0125] In one embodiment, the causal reasoning and explanation module 710 includes a causal reasoning module and an output explanation module. The causal reasoning module is used for querying, path searching, and weight calculation, and outputs causal paths. The output explanation module converts the causal paths into explanations of the text (i.e., natural language descriptions of the causes of failures).
[0126] The modules in the aforementioned fault analysis device based on the interpretability of a large power model can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independent of the processor in the network device, or stored in software in the memory of the network device, so that the processor can call and execute the corresponding operations of each module.
[0127] The device in this embodiment encodes the knowledge graph of power equipment using a Graph Convolutional Network (GCN) to generate node embedding vectors. These node embedding vectors are then used as constraints to fine-tune the parameters of a pre-trained large model through a Low-Rank Adaptive (LoRA) layer. A causal explanation path is generated by combining a Bayesian network with SPARQL path search. Multimodal data (text, images, and sensor data) is also uniformly encoded, and implicit relationships are mined using a rule engine and a deep learning model. Multiple models with different hyperparameter configurations are trained, weights are averaged, and generalization performance is verified; if performance is unsatisfactory, iterative optimization is performed. Furthermore, the weight calculation for the causal explanation path incorporates historical fault data statistics and expert scoring.
[0128] This invention employs a large-model fine-tuning framework driven by knowledge graph embedding and causal reasoning. Compared to existing technologies (such as traditional one-way combinations of knowledge graphs and large models or static reasoning schemes), it offers significant advantages in dynamic knowledge fusion capabilities, interpretability, and parameter efficiency. Firstly, existing technologies often combine knowledge graphs and large models through one-way information transmission (e.g., acquiring knowledge solely through external queries), leading to model reasoning reliant on static knowledge and lacking interpretability. This invention embeds the knowledge graph using GCN encoding to directly constrain large-model parameters (e.g., a LoRA adaptation layer), enabling the model to dynamically fuse topological relationships and domain rules during reasoning. For example, in fault diagnosis, it can automatically link the causal path of "insulator contamination → partial discharge → line tripping," while traditional methods can only output isolated conclusions (e.g., "high probability of line tripping"). Furthermore, a bidirectional knowledge loop mechanism (large model reasoning results feeding back into the knowledge graph update) solves the problem of knowledge obsolescence. For instance, during typhoons, it dynamically supplements knowledge about "transmission line wind deflection fault risk," whereas existing systems require manual intervention for updates. Secondly, existing large-scale models require full-parameter training for fine-tuning, which is resource-intensive and difficult to adapt to long-tail scenarios (such as rare faults) in power equipment. This invention, through LoRA low-rank decomposition, fine-tunes only key parameter branches, reducing computational costs by over 70% while maintaining the model's power domain specificity (e.g., training only the A and B low-rank matrices instead of all parameters). Furthermore, it generates interpretable reasoning processes through causal paths, solving the "black box decision-making" problem. For example, when predicting "transformer overheating," the system not only outputs the conclusion but also explains the causal chain of "cooling system failure → winding overload → temperature rise," whereas traditional models only provide probability values. In summary, this invention, through innovative designs of knowledge-model bidirectional optimization, efficient parameter fine-tuning, and interpretable causal paths, significantly improves the accuracy, dynamic adaptability, and decision transparency in power scenarios, directly addressing the core pain points of existing technologies in terms of knowledge timeliness, resource efficiency, and interpretability. This leads to the construction of a large-scale model that can efficiently, interpretably, and logically answer a series of high-precision question-answering scenarios such as policies and faults.
[0129] The beneficial effects of this invention are as follows: 1) Improved model interpretability: By dynamically embedding the causal reasoning module with the knowledge graph, the model is forced to output decision paths that conform to causal logic (such as fault root cause chains or policy impact chains), solving the "black box" problem of traditional models. 2) Dynamic fusion of knowledge graph and reasoning: Breaking through the limitations of static knowledge bases, the model can combine new knowledge in the power field in real time (such as equipment topology changes and fault mechanism updates). For example, knowledge graph node embeddings are dynamically updated through GCN encoding, and causal graphs are generated in real time through SPARQL queries. 3) Reduced fine-tuning costs and improved efficiency: LoRA technology is used to fine-tune only the key parameters associated with the knowledge graph, avoiding the high computational cost of full parameter fine-tuning while maintaining model performance. 4) Enhanced model generalization ability: Guided by causal prior knowledge, "catastrophic forgetting" caused by fine-tuning is prevented, improving the model's adaptability to new faults or policy changes. 5) Supports real-time knowledge updates: By fusing dynamic cause-effect graphs with real-time data and combining them with a progressive fine-tuning framework, the model can quickly absorb new data (such as the case of insulator flashover caused by typhoons), avoiding knowledge cutoff issues.
[0130] In one exemplary embodiment, this application also provides a fault analysis system based on the interpretability of a large power model. This system is applied to a smart grid cloud-edge-device collaborative architecture. The system includes an edge layer device deployed at the edge layer, a cloud layer device deployed at the cloud layer, and a user layer device deployed at the user layer. The edge layer device collects multi-source historical data, acquires real-time power grid operating parameters and real-time meteorological data, and sends them to the cloud layer device. The cloud layer device executes the implementation scheme described in the above method to obtain fault type prediction results and fault causes, and sends them to the user layer device. The user layer device displays the fault type prediction results and fault causes.
[0131] In an exemplary embodiment, a network device is provided, which may be a cloud-layer server. The network device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is connected to the system bus via the I / O interfaces. The processor of the network device provides computing and control capabilities. The memory of the network device includes non-volatile storage media and internal memory. The non-volatile storage media stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the network device stores XX data. The I / O interfaces of the network device are used for exchanging information between the processor and external devices. The communication interface of the network device is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a fault analysis method based on the interpretability of a large power model.
[0132] In one exemplary embodiment, a network device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0133] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0134] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0135] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0136] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0137] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A fault analysis method based on the interpretability of a large power model, characterized in that, The method, applied to the cloud layer in a smart grid cloud-edge-device collaborative architecture, includes: Acquire multi-source historical data, and perform standardization processing on the multi-source historical data to obtain standardized multi-source historical data. The multi-source historical data includes historical power grid operating parameters, historical meteorological data, and historical fault records. The historical power grid operating parameters include voltage, current, power, and load. Entity recognition and inter-entity relationship extraction are performed on the standardized multi-source historical data to obtain a power knowledge graph file; the power knowledge graph file is then input into a graph convolutional network to obtain knowledge embedding vectors. A large-scale power model using the transformer mechanism is obtained. A LoRA adapter is added after the attention layer in the large-scale power model to obtain an improved large-scale power model. The input of the improved large-scale power model includes power grid operating parameters and meteorological data, and the output of the improved large-scale power model is the fault type. The LoRA adapter is initialized using the knowledge embedding vector, and the improved large-scale power model is fine-tuned using the standardized multi-source historical data. The standardized real-time power grid operating parameters and real-time meteorological data are input into the improved power large model to obtain the fault type prediction results. The cause-effect graph is obtained by querying the power knowledge graph file; a path search is performed on the cause-effect graph to obtain the fault cause of the fault type prediction result.
2. The method according to claim 1, characterized in that, The process of performing entity recognition and inter-entity relationship extraction on the standardized multi-source historical data yields a power knowledge graph file, including: The standardized multi-source historical data is used to identify entities using a recognition model, which employs a self-attention mechanism and a hidden Markov model. A relation extraction model is used to extract relationships between all entities. The relation extraction model employs a bidirectional long short-term memory network and a conditional random field. All entities and their relationships are extracted to form the power knowledge graph file.
3. The method according to claim 1, characterized in that, Initializing the LoRA adapter using the knowledge embedding vector means using the knowledge embedding vector as the initial value of the low-rank matrix in the LoRA adapter.
4. The method according to claim 1, characterized in that, The fine-tuning of the improved power model using the standardized multi-source historical data includes: The standardized multi-source historical data includes power grid historical operating parameters and historical meteorological data as model inputs, and the fault types in the historical fault records are used as labels. The model inputs and the labels constitute the training set. Define a total loss function, which includes a task loss function and a knowledge constraint loss function; the knowledge constraint loss function is calculated using the knowledge embedding vector. The improved power model is fine-tuned using the training set until the total loss function meets the requirements, at which point the fine-tuning is complete.
5. The method according to claim 1, characterized in that, The process involves querying the power knowledge graph file to obtain a causal graph; performing a path search on the causal graph to obtain the fault causes of the fault type prediction results, including: Based on the fault type prediction results, a SPARQL query statement is constructed, and the SPARQL query statement is used to query the power knowledge graph file to obtain a causal graph. Perform a path search on the causal graph to obtain all causal paths; Calculate the weight of each causal path, filter out the set number of causal paths with the highest weights, and obtain the cause of the failure.
6. A fault analysis device based on the interpretability of a large power model, characterized in that, The device, deployed in the cloud layer of a smart grid cloud-edge-device collaborative architecture, includes: The input data module is used to acquire multi-source historical data, and to perform standardization processing on the multi-source historical data to obtain standardized multi-source historical data. The multi-source historical data includes historical power grid operating parameters, historical meteorological data, and historical fault records. The historical power grid operating parameters include voltage, current, power, and load. The knowledge graph construction module is used to perform entity recognition and entity relationship extraction on the standardized multi-source historical data to obtain a power knowledge graph file. The graph embedding generation module is used to input the power knowledge graph file into a graph convolutional network to obtain knowledge embedding vectors. The large-scale model fine-tuning module is used to acquire a large-scale power model using the transformer mechanism, add a LoRA adapter after the attention layer of the large-scale power model to obtain an improved large-scale power model. The input of the improved large-scale power model includes power grid operating parameters and meteorological data, and the output of the improved large-scale power model is the fault type. The LoRA adapter is initialized using the knowledge embedding vector, and the improved large-scale power model is fine-tuned using the standardized multi-source historical data. The acquired standardized real-time power grid operating parameters and real-time meteorological data are input into the improved large-scale power model to obtain the fault type prediction result. The causal reasoning and explanation module is used to query the power knowledge graph file to obtain a causal graph; perform path search on the causal graph to obtain the fault cause of the fault type prediction result.
7. A fault analysis system based on the interpretability of a large power model, characterized in that, The system, which is applied to the cloud-edge-device collaborative architecture of smart grids, includes edge layer devices, cloud layer devices, and user layer devices. The edge layer device is used to collect multi-source historical data, obtain real-time power grid operation parameters and real-time meteorological data, and send them to the cloud layer device; The cloud layer device is used to execute the fault analysis method according to any one of claims 1 to 5, obtain the fault type prediction result and the fault cause, and send them to the user layer device; The user layer device is used to display the fault type prediction result and the fault cause.
8. A network device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Cited By
Insulator pollution risk assessment and prediction method, system, equipment and medium
CN121503931A