Power distribution network fault attribution analysis method based on graph node sampling and large language model

By constructing a multi-dimensional fault ontology and knowledge graph, and combining reinforcement learning to select key information nodes, the fault analysis capability of the large language model is enhanced. This solves the problems of insufficient accuracy and response speed in the fault attribution analysis of the distribution network, and achieves more efficient fault handling and improved power system security.

CN118503452BActive Publication Date: 2025-12-05STATE GRID FUJIAN ELECTRIC POWER RES INST +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410775789.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2025-12-05
Estimated Expiration
2044-06-17

AI Technical Summary

Technical Problem

Existing technologies lack the accuracy and response speed of fault attribution analysis in distribution networks, making it difficult to effectively handle complex and sudden faults.

Method used

We employ a graph node sampling and large language model approach to enhance the fault analysis capabilities of the large language model by constructing a multi-dimensional fault ontology and knowledge graph, and combining reinforcement learning to dynamically select key information nodes.

Benefits of technology

It significantly improves the accuracy and response speed of fault attribution, thereby enhancing the operating efficiency and safety of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118503452B_ABST
    Figure CN118503452B_ABST
Patent Text Reader

Abstract

The application provides a power distribution network fault attribution analysis method based on graph node sampling and a large language model, including the following steps: step one, designing a multi-dimensional fault ontology for guiding the structuring of fault data; step two, constructing a knowledge graph for storing and representing fault information in the power distribution network; step three, integrating a large language model LLM for processing and analyzing fault information; step four, using a node selection algorithm based on reinforcement learning to select the nodes most relevant to the current analysis task from the knowledge graph, and providing the node information to the large language model to enhance its diagnostic prediction ability; step five, through the sampling of selected nodes, the integration of the knowledge graph and the large language model is used to optimize the accuracy and efficiency of fault analysis. The application uses reinforcement learning to dynamically select key information nodes to enhance the fault analysis capability of the large language model. The accuracy and efficiency of fault diagnosis are improved, and the adaptability and flexibility of the system are optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the key technology of intelligent distribution network power, and in particular to a method for attribution analysis of distribution network faults based on graph node sampling and large language model. Background Technology

[0002] With the transformation of the global energy structure and the rapid development of smart grid technology, the intelligence level of distribution networks is constantly improving, which poses new requirements for improving the operational efficiency and reliability of the power grid. As a crucial component of the power system that directly faces end users, the operating status of the distribution network directly affects the electricity safety and quality of life of a large number of users. Therefore, improving the efficiency and accuracy of distribution network fault diagnosis has become a top priority in power system management.

[0003] Traditional distribution network fault diagnosis relies on the experience of on-site maintenance personnel and regular physical inspections, which is not only time-consuming and labor-intensive but also inadequate for handling sudden and complex faults. Driven by big data and artificial intelligence technologies, fault diagnosis and handling in distribution networks are undergoing a transformation from traditional manual experience to intelligent and automated processes. Especially in the collection and processing of fault data, the use of large amounts of real-time data collected by smart sensors enables real-time monitoring of the distribution network status and fault early warning.

[0004] However, due to the complexity of power distribution network systems and the diversity of data types, traditional data processing methods alone are insufficient to meet the needs of rapid and accurate fault diagnosis. Large amounts of structured data (such as alarm information from power distribution management systems) and unstructured data (such as reports from emergency maintenance personnel) need to be effectively integrated and analyzed, posing a greater challenge to data processing technologies. Furthermore, the high dimensionality and redundancy inherent in fault data itself also bring considerable difficulties to data processing and analysis.

[0005] In recent years, the combination of large language models and knowledge graphs has provided a new approach to solving the aforementioned problems. By constructing domain-specific knowledge graphs and leveraging the powerful natural language processing capabilities of large language models, it is possible to delve deeper into the implicit information within fault data, enabling rapid and accurate attribution of fault causes. In particular, the introduction of graph node sampling and reinforcement learning algorithms allows for the dynamic selection of nodes most relevant to the current fault analysis task from the knowledge graph, further improving the efficiency and accuracy of fault diagnosis.

[0006] Therefore, researching and developing a novel attribution analysis method for distribution network faults based on knowledge graphs and large language models has become an important research direction in the current intelligent management of power systems. This will not only help improve fault handling speed but also significantly enhance the security and reliability of distribution networks, providing users with higher-quality power services. Summary of the Invention

[0007] This invention proposes a distribution network fault attribution analysis method based on graph node sampling and large language model, which can solve the problems of insufficient accuracy and response speed in the existing technology of distribution network fault attribution analysis. It combines the deep learning capabilities of large language model and the structured knowledge of distribution network fault knowledge graph, and can improve the efficiency and reliability of fault attribution analysis through accurate node sampling and information enhancement.

[0008] The present invention adopts the following technical solution.

[0009] A fault attribution analysis method for distribution networks based on graph node sampling and large language model. The method enhances the fault analysis capability of the large language model by constructing a multi-dimensional fault ontology and knowledge graph and using reinforcement learning to dynamically select key information nodes. The method includes the following steps.

[0010] Step 1: Design a multi-dimensional fault ontology to guide the structuring of fault data. When constructing the multi-dimensional fault ontology model, firstly, through in-depth analysis of distribution network fault data, construct a multi-dimensional fault ontology model containing entities, attributes, events and their interrelationships as the basis for the knowledge graph.

[0011] Step 2: Based on the multi-dimensional fault ontology in Step 1, construct a knowledge graph for storing and representing fault information in the distribution network; that is, generate a distribution network fault knowledge graph: under the guidance of the multi-dimensional fault ontology model, transform actual fault data into nodes and relationships in the knowledge graph to form a detailed distribution network fault graph.

[0012] Step 3: Integrate the Large Language Model (LLM) for processing and analyzing fault information; Graph-based node sampling: Select the most valuable nodes for fault attribution from the fault knowledge graph through a node selector trained by reinforcement learning, so as to enhance the input information of the large language model.

[0013] Step 4: Fault attribution analysis of the large language model: Using the enhanced input, the large language model performs reasoning analysis on the causes of the fault, outputs possible fault causes, and uses a node selection algorithm based on reinforcement learning to select the nodes most relevant to the current analysis task from the knowledge graph, and provides the information of these nodes to the large language model to enhance its diagnostic and predictive capabilities.

[0014] Step 5: Empirical Analysis and Model Optimization: Conduct empirical analysis on a real power distribution network fault dataset to verify the effectiveness of the method, and optimize the model parameters and structure based on the analysis results. Specifically, select nodes by sampling nodes and optimize the accuracy and efficiency of fault analysis by integrating knowledge graphs and large-scale language models.

[0015] The multi-dimensional fault ontology model includes entity nodes, abstract entity nodes, and event nodes, as well as the attributes corresponding to each of these three types of nodes. Each type of entity and event has multiple attributes used to describe the fault situation.

[0016] The attributes of an entity node include: its region, its tower, the name of the operating unit, the name of the actual operating feeder, the feeder, the power outage line, the name of the distribution transformer, the transformer type, whether it is a low-voltage device, the user classification, the scope of impact, the reclosing status, the protection action status, the grounding status, the weather, the temperature, the fault overview, the fault type, the fault description, the start time of the power outage, the time of the fault occurrence, the maintenance team, the reason for responsibility, the detailed category of technical reasons, the detailed category of technical reasons, the cause analysis, the detailed category of the reason for responsibility, the overview of the fault cause, the fault cause, and the major category of technical reasons.

[0017] The attributes of abstract entity nodes include: abstract feeder, abstract distribution transformer, and abstract weather conditions;

[0018] The attributes of an event node include: repair reporting event, power outage event, fault handling event, and system protection event.

[0019] Step two involves constructing a distribution network fault knowledge graph based on the defined fault ontology model. This construction includes converting each fault record in the distribution network into an independent fault subgraph. These subgraphs are then integrated and ambiguity-resolved according to the fault ontology to form a complete fault knowledge graph. This is achieved by adding them to the overall fault graph. Ensuring that newly added fault data can be correctly integrated with existing graph data avoids duplication and redundancy, while maintaining graph integrity and query efficiency includes the following steps:

[0020] Step 4.1 Initialize Fault Map: Before any data processing, it is necessary to first initialize an empty map G, which will be used as a container to store all subsequent fault submaps;

[0021] Step 4.2, Traverse the fault record set: Iterate through each item in the fault record set F. For each fault record f... i Create a corresponding fault subgraph G i This subgraph is based on fault log f i The detailed information is constructed from;

[0022] Step 4.3: Merging Fault Subgraphs into the Overall Graph: If the subgraph is generated by the first fault record, directly set this subgraph as the main fault graph G. For subsequent fault subgraphs, check whether each entity e in the subgraph already exists in the main graph G; if the entity already exists, associate the new fault information with the existing entity information. If entity e does not exist in graph G, add this new entity and its related fault information to graph G.

[0023] Step 4.4: Return the final overall fault map: After processing all fault records, return the completed fault map G; this map now contains the data of all fault records, as well as the relationships and links between these data.

[0024] The Large Language Model (LLM) in step three has the function of processing natural language. It generates predictive conclusions about the causes of failures by parsing and reasoning about failure descriptions and failure information.

[0025] When integrating a large language model, sampled node information is used as input to enhance the fault analysis process of the large language model. This involves concatenating the node information into a prompt message and then inputting it into the large language model. Specifically, the required node information is concatenated into structured text and appended as a prompt message to the fault description.

[0026] When running the large language model, enhanced input is used to perform reasoning analysis on the causes of failures and generate a list of possible causes. The input of the large language model is a comprehensive text containing a description of the failure problem and node information. After receiving the input, the model analyzes the failure, predicts possible causes, and generates a list of possible causes through its trained language understanding and reasoning abilities. In this way, the sampled node information is integrated with the input format of the large language model, enabling the model to use more contextual information for more accurate failure diagnosis.

[0027] The prompt message will take the following form:

[0028] Fault Description: <Fault Description>; Refer to the following node information for analysis: Node Name 1: Node Value 1; Node Name 2: Node Value 2; Node Name 3: Node Value 3;

[0029] In step four, the reinforcement learning-based node selection algorithm adopts an Actor-Critic architecture, where the node selector, acting as an actor, is responsible for generating sampled behaviors based on the policy network, while the critic adjusts the actor's behavior based on the output of a large language model as an evaluation signal. This allows the node selector to optimize its policy through a trial-and-error process to more accurately predict the nodes most useful for fault attribution analysis.

[0030] In reinforcement learning-based node selection algorithms, the node selector employs an attention mechanism. Its policy network includes a two-layer attention mechanism and a ReLU activation layer to select the node most valuable for fault cause inference. This allows the model to handle inputs of varying lengths and integrate information from different nodes. This enables the model to evaluate and output the sampling probabilities of nodes other than the first fixed node, thereby guiding decision-making during fault analysis.

[0031] In step five, the node embedding learning module is used to compute the embedding representation of each node in the knowledge graph. The embedding representation includes semantic embedding, neighborhood embedding and location embedding.

[0032] In step five, the nodes are first represented using a multi-dimensional embedding method, which includes semantic embedding, neighbor embedding, and location embedding, to create an information-rich feature vector for each node.

[0033] Semantic embedding is obtained by encoding the text description of the node through a pre-trained language model. The BGE model is used as the encoder to encode the text of the node into vector form.

[0034] Neighbor embedding is used to emphasize the contextual information of a node. It uses the average of the semantic embeddings of all first-order neighbors of the node and reduces its dimensionality using the PCA dimensionality reduction method.

[0035] Location embeddings are used to represent the positional information of a node in the graph structure. This is achieved by using the shortest hop count from the node to a node with a clearly defined fault, and transforming it into a vector form using trigonometric functions. Finally, the semantic embedding, neighbor embedding, and location embedding are concatenated to obtain the final embedding representation.

[0036] In step five, when selecting nodes, the selected knowledge graph node information is integrated into the input of a large language model to improve the accuracy and efficiency of fault diagnosis, while reducing noise introduced by irrelevant or low-quality nodes.

[0037] In step five, reinforcement learning is used to adjust the node selection strategy to dynamically respond to different fault conditions and data changes, thereby improving the system's adaptability and flexibility while maintaining high accuracy. Specifically, the trained node selector is used as a node sampler to select the fault subgraph most relevant to the current fault overview from the fault graph and to sample the node with the highest information value from it.

[0038] The operation method includes the following: First, the fault summary text is encoded using a BGE pre-trained model to generate a high-dimensional feature vector; then, the nodes in the graph that clearly summarize the fault are encoded in the same way, and the similarity between these nodes and the fault summary is calculated. The node with the highest similarity is selected, and then the fault subgraph corresponding to the node is selected one by one. Then, the set of nodes with the highest information value is sampled from the fault subgraph to ensure that the most critical information is extracted from the fault graph to support accurate fault attribution analysis.

[0039] The advantages of this invention are:

[0040] 1. Construction of multi-dimensional fault ontology and knowledge graph: Through in-depth analysis of fault data, a multi-dimensional fault ontology model containing entities, attributes and events was constructed, and a detailed fault knowledge graph was built based on this ontology.

[0041] 2. Node selection algorithm based on reinforcement learning: The reinforcement learning method based on the Actor-Critic architecture is adopted to dynamically select the most critical information nodes from the knowledge graph, thereby improving the accuracy and efficiency of fault diagnosis.

[0042] 3. Application of the Node Embedding Learning Module: A node embedding learning module is introduced to calculate the multi-dimensional embedding representation of each node, providing comprehensive feature vectors for reinforcement learning algorithms and optimizing node selection strategies.

[0043] The method of this invention can effectively combine graph-structured knowledge and the reasoning ability of large language models to improve the accuracy and response speed of fault attribution, which is of great significance for fault handling and decision support in the power industry.

[0044] In this invention, the construction of a multi-dimensional fault ontology model includes data analysis and model definition, as well as the mapping of entities and relationships. Data analysis and model definition, through comprehensive analysis of distribution network fault data, determine the core categories that must be included in the ontology model, namely entities, abstract entities, attributes, and events. The mapping of entities and relationships uses structured data mapping technology to map information in the fault data, such as fault time, type, and impact range, to corresponding ontology entities and relationships, ensuring the accuracy and completeness of the data.

[0045] In this invention, the generation of a distribution network fault knowledge graph includes a graph construction algorithm and data fusion and optimization. The graph construction algorithm is implemented as an automated algorithm that can automatically identify and link entities and relationships in the data based on the fault ontology model, gradually constructing a complete fault knowledge graph. Data fusion and optimization aim to intelligently identify and merge newly added fault records, avoid the generation of duplicate nodes, and optimize the graph structure to improve query efficiency and accuracy.

[0046] In this invention, graph-based node sampling includes the design and training of a node selector, node embedding, and sampling strategies. First, a reinforcement learning-based node selector is designed, which is optimized through interactive feedback with a large language model, learning how to select the most informational nodes. Second, an efficient node embedding system is implemented, which integrates the textual information, structural location, and proximity relationships of nodes to provide a comprehensive feature vector for the reinforcement learning selector.

[0047] In this invention, the fault attribution analysis of the large language model is implemented by integrating the selected node text information to form an enhanced model input, which is then provided to the large language model to enhance its contextual understanding ability in fault analysis. Furthermore, the large language model can perform deep reasoning based on the enhanced input and output a list of possible causes of the fault, providing a scientific basis for decision-making.

[0048] In this invention, empirical analysis and model optimization are implemented by testing on actual fault datasets of distribution networks to verify the model's effectiveness and collect analysis results. Finally, based on the empirical test results, the model parameters and structure are optimized to ensure that the model remains efficient and accurate under different scenarios.

[0049] This invention can be effectively applied to practical power distribution network fault analysis and handling, improving the response speed and accuracy of fault handling, and contributing to the overall operational efficiency and safety of the power system. The implementation of this method demonstrates the practical application value of large language models and knowledge graph technologies in the power industry, providing new ideas and frameworks for future technological development.

[0050] The implementation of this invention not only significantly improves the accuracy of fault attribution, but also greatly improves the response speed, specifically in the following aspects: By combining structured knowledge graphs and the deep learning capabilities of large language models, this invention effectively improves the accuracy of fault attribution and effectively avoids the "illusion" problem that may occur when large language models deal with professional domain problems.

[0051] This invention uses a precise spectral node sampling method to select the most critical information for processing, which greatly reduces unnecessary data processing and thus significantly speeds up fault analysis.

[0052] This invention helps improve the safe and stable operation of power systems and enhance users' electricity experience. Through these technical solutions, this invention not only improves the technical level of distribution network fault handling but also provides new research directions and practical application possibilities for related fields. This large language model-based fault attribution enhancement method, based on graph node sampling, demonstrates its application potential and broad practical value in the power industry. Attached Figure Description

[0053] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:

[0054] Appendix Figure 1 This is a schematic diagram of the technical framework of the method of the present invention;

[0055] Appendix Figure 2 This is a schematic diagram of the method for mapping tabular data elements to a fault ontology model according to the present invention;

[0056] Appendix Figure 3 This is a schematic diagram of the multi-dimensional ontological structure of the present invention;

[0057] Appendix Figure 4 This is a schematic diagram of the fault map node sampling module architecture based on reinforcement learning of the present invention;

[0058] Appendix Figure 5 This is a schematic diagram of the fault subgraph node embedding construction method of the present invention;

[0059] Appendix Figure 6 This is a schematic diagram of the fault subgraph search algorithm of the present invention;

[0060] Appendix Figure 7 This is a schematic diagram of the comparative experimental results of the present invention;

[0061] Appendix Figure 8 This is a schematic diagram showing the performance comparison results of the model under different n values ​​for fault subgraph sampling in this invention;

[0062] Appendix Figure 9 This is a schematic diagram of the fault subgraph sampling scatter points under different n values ​​according to the present invention;

[0063] Appendix Figure 10 This is a schematic diagram of the fault spectrum sampling and ablation experiment results of the present invention. Detailed Implementation

[0064] As shown in the figure, a fault attribution analysis method for distribution networks based on graph node sampling and large language model is proposed. The method enhances the fault analysis capability of the large language model by constructing a multi-dimensional fault ontology and knowledge graph and using reinforcement learning to dynamically select key information nodes. The method includes the following steps.

[0065] Step 1: Design a multi-dimensional fault ontology to guide the structuring of fault data. When constructing the multi-dimensional fault ontology model, firstly, through in-depth analysis of distribution network fault data, construct a multi-dimensional fault ontology model containing entities, attributes, events and their interrelationships as the basis for the knowledge graph.

[0066] Step 2: Based on the multi-dimensional fault ontology in Step 1, construct a knowledge graph for storing and representing fault information in the distribution network; that is, generate a distribution network fault knowledge graph: under the guidance of the multi-dimensional fault ontology model, transform actual fault data into nodes and relationships in the knowledge graph to form a detailed distribution network fault graph.

[0067] Step 3: Integrate the Large Language Model (LLM) for processing and analyzing fault information; Graph-based node sampling: Select the most valuable nodes for fault attribution from the fault knowledge graph through a node selector trained by reinforcement learning, so as to enhance the input information of the large language model.

[0068] Step 4: Fault attribution analysis of the large language model: Using the enhanced input, the large language model performs reasoning analysis on the causes of the fault, outputs possible fault causes, and uses a node selection algorithm based on reinforcement learning to select the nodes most relevant to the current analysis task from the knowledge graph, and provides the information of these nodes to the large language model to enhance its diagnostic and predictive capabilities.

[0069] Step 5: Empirical Analysis and Model Optimization: Conduct empirical analysis on a real power distribution network fault dataset to verify the effectiveness of the method, and optimize the model parameters and structure based on the analysis results. Specifically, select nodes by sampling nodes and optimize the accuracy and efficiency of fault analysis by integrating knowledge graphs and large-scale language models.

[0070] The multi-dimensional fault ontology model includes entity nodes, abstract entity nodes, and event nodes, as well as the attributes corresponding to each of these three types of nodes. Each type of entity and event has multiple attributes used to describe the fault situation.

[0071] The attributes of an entity node include: its region, its tower, the name of the operating unit, the name of the actual operating feeder, the feeder, the power outage line, the name of the distribution transformer, the transformer type, whether it is a low-voltage device, the user classification, the scope of impact, the reclosing status, the protection action status, the grounding status, the weather, the temperature, the fault overview, the fault type, the fault description, the start time of the power outage, the time of the fault occurrence, the maintenance team, the reason for responsibility, the detailed category of technical reasons, the detailed category of technical reasons, the cause analysis, the detailed category of the reason for responsibility, the overview of the fault cause, the fault cause, and the major category of technical reasons.

[0072] The attributes of abstract entity nodes include: abstract feeder, abstract distribution transformer, and abstract weather conditions;

[0073] The attributes of an event node include: repair reporting event, power outage event, fault handling event, and system protection event.

[0074] Step two involves constructing a distribution network fault knowledge graph based on the defined fault ontology model. This construction includes converting each fault record in the distribution network into an independent fault subgraph. These subgraphs are then integrated and ambiguity-resolved according to the fault ontology to form a complete fault knowledge graph. This is achieved by adding them to the overall fault graph. Ensuring that newly added fault data can be correctly integrated with existing graph data avoids duplication and redundancy, while maintaining graph integrity and query efficiency includes the following steps:

[0075] Step 4.1 Initialize Fault Map: Before any data processing, it is necessary to first initialize an empty map G, which will be used as a container to store all subsequent fault submaps;

[0076] Step 4.2, Traverse the fault record set: Iterate through each item in the fault record set F. For each fault record f... i Create a corresponding fault subgraph G i This subgraph is based on fault log f i The detailed information is constructed from;

[0077] Step 4.3: Merging Fault Subgraphs into the Overall Graph: If the subgraph is generated by the first fault record, directly set this subgraph as the main fault graph G. For subsequent fault subgraphs, check whether each entity e in the subgraph already exists in the main graph G; if the entity already exists, associate the new fault information with the existing entity information. If entity e does not exist in graph G, add this new entity and its related fault information to graph G.

[0078] Step 4.4: Return the final overall fault map: After processing all fault records, return the completed fault map G; this map now contains the data of all fault records, as well as the relationships and links between these data.

[0079] The Large Language Model (LLM) in step three has the function of processing natural language. It generates predictive conclusions about the causes of failures by parsing and reasoning about failure descriptions and failure information.

[0080] When integrating a large language model, sampled node information is used as input to enhance the fault analysis process of the large language model. This involves concatenating the node information into a prompt message and then inputting it into the large language model. Specifically, the required node information is concatenated into structured text and appended as a prompt message to the fault description.

[0081] When running the large language model, enhanced input is used to perform reasoning analysis on the causes of failures and generate a list of possible causes. The input of the large language model is a comprehensive text containing a description of the failure problem and node information. After receiving the input, the model analyzes the failure, predicts possible causes, and generates a list of possible causes through its trained language understanding and reasoning abilities. In this way, the sampled node information is integrated with the input format of the large language model, enabling the model to use more contextual information for more accurate failure diagnosis.

[0082] The prompt message will take the following form:

[0083] Fault Description: <Fault Description>; Refer to the following node information for analysis: Node Name 1: Node Value 1; Node Name 2: Node Value 2; Node Name 3: Node Value 3;

[0084] In step four, the reinforcement learning-based node selection algorithm adopts an Actor-Critic architecture, where the node selector, acting as an actor, is responsible for generating sampled behaviors based on the policy network, while the critic adjusts the actor's behavior based on the output of a large language model as an evaluation signal. This allows the node selector to optimize its policy through a trial-and-error process to more accurately predict the nodes most useful for fault attribution analysis.

[0085] In reinforcement learning-based node selection algorithms, the node selector employs an attention mechanism. Its policy network includes a two-layer attention mechanism and a ReLU activation layer to select the node most valuable for fault cause inference. This allows the model to handle inputs of varying lengths and integrate information from different nodes. This enables the model to evaluate and output the sampling probabilities of nodes other than the first fixed node, thereby guiding decision-making during fault analysis.

[0086] In step five, the node embedding learning module is used to compute the embedding representation of each node in the knowledge graph. The embedding representation includes semantic embedding, neighborhood embedding and location embedding.

[0087] In step five, the nodes are first represented using a multi-dimensional embedding method, which includes semantic embedding, neighbor embedding, and location embedding, to create an information-rich feature vector for each node.

[0088] Semantic embedding is obtained by encoding the text description of the node through a pre-trained language model. The BGE model is used as the encoder to encode the text of the node into vector form.

[0089] Neighbor embedding is used to emphasize the contextual information of a node. It uses the average of the semantic embeddings of all first-order neighbors of the node and reduces its dimensionality using the PCA dimensionality reduction method.

[0090] Location embeddings are used to represent the positional information of a node in the graph structure. This is achieved by using the shortest hop count from the node to a node with a clearly defined fault, and transforming it into a vector form using trigonometric functions. Finally, the semantic embedding, neighbor embedding, and location embedding are concatenated to obtain the final embedding representation.

[0091] In step five, when selecting nodes, the selected knowledge graph node information is integrated into the input of a large language model to improve the accuracy and efficiency of fault diagnosis, while reducing noise introduced by irrelevant or low-quality nodes.

[0092] In step five, reinforcement learning is used to adjust the node selection strategy to dynamically respond to different fault conditions and data changes, thereby improving the system's adaptability and flexibility while maintaining high accuracy. Specifically, the trained node selector is used as a node sampler to select the fault subgraph most relevant to the current fault overview from the fault graph and to sample the node with the highest information value from it.

[0093] The operation method includes the following: First, the fault summary text is encoded using a BGE pre-trained model to generate a high-dimensional feature vector; then, the nodes in the graph that clearly summarize the fault are encoded in the same way, and the similarity between these nodes and the fault summary is calculated. The node with the highest similarity is selected, and then the fault subgraph corresponding to the node is selected one by one. Then, the set of nodes with the highest information value is sampled from the fault subgraph to ensure that the most critical information is extracted from the fault graph to support accurate fault attribution analysis.

[0094] Example 1:

[0095] In step one, distribution network fault data is collected. This includes data automatically obtained from the Distribution Management System (DMS) and fault summary information manually entered by maintenance personnel. The experiment of this invention used fault reports from a power company for the distribution network from 2021 to 2022. The dataset, named "Distribution Transformer Perspective Fault Reports," contains 229,146 distribution network fault records, each with 46 fields. These records detail the fault events that occurred in the distribution network of a certain province between 2021 and 2022.

[0096] Its field list is as follows:

[0097] Region, Operating Unit Name, Transformer Name, Transformer Type, Feeder, Equipment Maintenance Team, Reason for Fault, Detailed Reason for Fault, Start Time of Power Outage, Time of Power Restoration, Scope of Affected Areas, Fault Type, Fault Overview, Simple Handling Process, Cause Analysis, Corrective Measures, Affected Line, Affected Tower, Whether it is Low-Voltage Equipment, Fault Occurrence Time, Fault Termination Time, Source of Repair Report, Estimated Time of Power Restoration, Fault Handling Status, Fault Nature, Weather, Temperature, Protection Action Status, Reclosing Status, Ground Failure Status, Emergency Repair Team, Emergency Repair Completion Time, Emergency Repair Status, Whether Emergency Repair is Required, Whether there is any abnormality, Whether there is any defect, Fault Level, Major Category of Technical Reason, Detailed Category of Technical Reason, Fault Cause, Actual Operating Feeder Name, Whether it is a Large or Medium-Sized Residential Area, Whether it is an Important User, Whether it is a Lifeline User, Number of Low-Voltage Users Affected, Nature of Users Affected.

[0098] The collected data underwent preprocessing, including data cleaning (removing invalid and erroneous data points), data formatting (converting data formats to suit subsequent processing), and preliminary data classification. The processed data was analyzed to determine the structure of the multi-dimensional fault ontology model to be constructed. This included defining the entity types (e.g., transformers, cables), attributes (e.g., equipment status, maintenance history), and events (e.g., fault occurrence, recovery). Entity types were hierarchically represented as entity nodes, and abstract entity nodes were also defined. The total number of cleaned records was 5597, which were divided into a training set (4507 records) and a test set (1090 records) at an 8:2 ratio.

[0099] Using structured methods and regular expression techniques, the complex information in fault data is broken down into more granular elements, which are then mapped to corresponding dimensions of the fault ontology model. A schematic diagram of the mapping method is shown below. Figure 2 As shown in the diagram. The ontology model includes three types of nodes: entity nodes, abstract entity nodes, and event nodes. A multi-dimensional fault ontology structure diagram is shown below. Figure 3 As shown. The list is as follows:

[0100] Entity Nodes: Region, Tower, Operating Unit Name, Actual Operating Feeder Name, Feeder, Affected Line, Transformer Name, Transformer Type, Whether it is Low-Voltage Equipment, User Classification, Affected Area, Reclosing Status, Protection Action Status, Ground Failure Status, Weather, Temperature, Fault Overview, Fault Type, Clear Fault Overview, Start Time of Power Outage, Fault Occurrence Time, Maintenance Team, Responsible Reason, Detailed Classification of Technical Reasons, Detailed Classification of Responsible Reasons and Technical Reasons, Cause Analysis, Detailed Classification of Responsible Reasons, Fault Cause Overview, Fault Cause, Major Classification of Technical Reasons.

[0101] Abstract entity nodes: abstract feeder, abstract distribution transformer, abstract weather conditions

[0102] Event nodes: Repair request event, power outage event, fault handling event, system protection event

[0103] Example 2:

[0104] Based on Example 1, in step two, a distribution network fault knowledge graph is constructed based on the defined fault ontology model. An independent fault subgraph is created for each fault event and added to the overall fault graph. It is ensured that newly added fault data can be correctly integrated with existing graph data to avoid duplication and redundancy, while maintaining the integrity of the graph and query efficiency. The algorithm implementation is as follows:

[0105] 4.1 Initialize the fault map: Before any data processing, an empty map G needs to be initialized first. This map will be used as a container to store all subsequent fault submaps.

[0106] 4.2 Traversing the Fault Record Set: Iterate through each item in the fault record set F. For each fault record fi, create a corresponding fault subgraph G. i This subgraph is constructed based on detailed information from the fault log fi.

[0107] 4.3 Fault Subgraph Integration into the Overall Graph: If the subgraph is generated by the first fault record, it is directly set as the main fault graph G. For subsequent fault subgraphs, it is checked whether each entity e in the subgraph already exists in the main graph G. If the entity already exists, the new fault information is associated with the existing entity information. If entity e does not exist in graph G, the new entity and its related fault information are added to graph G.

[0108] 4.4 Return the final fault map: After processing all fault records, return the completed fault map G. This map now contains data for all fault records, as well as the relationships and links between these data.

[0109] Example 3:

[0110] Based on Example 2, in step four, a fault information sensitive node sampler based on reinforcement learning is developed and trained to automatically identify and select the most critical information nodes in fault attribution analysis.

[0111] In this embodiment, a reinforcement learning-based node sampler was developed using an actor-critic architecture. In this architecture, the node selector acts as the actor, generating sampled actions based on a policy network, while a large language model acts as the critic, providing feedback. This setup allows the node selector to optimize its policy through a trial-and-error process to more accurately predict the nodes most useful for fault attribution analysis.

[0112] In step five, the node selector employs an attention mechanism, comprising two attention layers and one ReLU activation layer, allowing the model to handle inputs of varying lengths and integrate information between nodes. This enables the model to evaluate and output the sampling probabilities of nodes other than the first fixed node, thereby guiding decision-making during fault analysis. The model architecture for this step and step five is as follows: Figure 4 As shown.

[0113] In step five of this example, the first step is to implement a multi-dimensional embedding representation of the nodes, including semantic embedding, neighbor embedding, and location embedding, creating an information-rich feature vector for each node. Semantic embedding uses a BGE model as the encoder to encode the node's text into a vector form. Neighbor embedding uses the average of the semantic embeddings of all the node's first-order neighbors and reduces its dimensionality using PCA. Location embedding uses the shortest hop count from the node to the "Fault Specific Overview" node and transforms it into a vector form using trigonometric functions. Finally, the semantic embedding, neighbor embedding, and location embedding are concatenated to obtain the final embedding representation. The embedding algorithm flow is as follows: Figure 5 express.

[0114] This example utilizes the node sampler trained in step five to select the fault subgraph most relevant to the current fault overview from the fault graph, and samples the nodes with the highest information value from it. The operation involves encoding the fault overview text using a BGE pre-trained model to generate a high-dimensional feature vector. Then, the same encoding process is performed on the "clear fault overview" nodes in the graph, and the similarity between these nodes and the fault overview is calculated, selecting the node with the highest similarity. This method ensures that the most critical information is extracted from the fault graph to support accurate fault attribution analysis. The method flow is as follows: Figure 6 As shown.

[0115] This example uses sampled node information as input to enhance the fault analysis process of a large language model. This includes converting the node information into a format suitable for model processing and then inputting it into the large language model.

[0116] In this example, a large language model is run to perform reasoning analysis on the causes of failures using enhanced input, and a list of possible causes of failures is generated.

[0117] A Large Language Model (LLM) is an artificial intelligence model based on deep learning techniques. It typically consists of a large number of neural network layers and is capable of processing and generating natural language. By training on large-scale corpora, LLMs learn the syntax, semantics, and contextual relationships of a language, enabling them to perform various natural language processing tasks such as text generation, translation, and question answering.

[0118] ChatGLM3-6B is a concrete example of a large language model. Developed by Tsinghua University, ChatGLM3-6B is a version based on the GLM (General Language Model) architecture and boasts 6 billion parameters. It is pre-trained on rich text data and fine-tuned to adapt to specific tasks. ChatGLM3-6B excels in natural language generation and understanding, capable of various tasks such as dialogue generation, text summarization, and information retrieval, and is widely used in fields such as intelligent customer service and content creation.

[0119] When integrating a large language model, sampled node information is used as input to enhance the model's fault analysis process. This involves concatenating node information into a prompt and inputting it into the large language model. Specifically, this node information is concatenated into a structured text and appended as a prompt to the fault description. The prompt takes the following form:

[0120] Fault description: <Fault description>; Refer to the following node information for analysis: Node name 1: Node value 1; Node name 2: Node value 2; Node name 3: Node value 3.

[0121] In this example, when running a large language model, enhanced input is used to perform reasoning analysis on the causes of faults and generate a list of possible causes. Specifically, the input to the large language model is comprehensive text containing a description of the fault and node information. After receiving the input, the model analyzes the fault using its trained language understanding and reasoning abilities, predicts possible causes, and generates a list of possible causes. In this way, the sampled node information is integrated with the input format of the large language model, enabling the model to utilize more contextual information for more accurate fault diagnosis.

[0122] In this example, the node selection method is called node selection, which selects a few nodes from dozens of nodes.

[0123] Example 4:

[0124] This example is a comparative experiment based on Example 3, implemented on ChatGLM3-6B. The models in the comparative experiment are Qwen, Baichuan2, Aquila2, and Llama2-Chinese.

[0125] To ensure fair comparison, all models will have parameter sizes below 10B. To accurately evaluate the performance of large language models in power grid fault diagnosis tasks, multiple metrics will be used, including accuracy, hit rate @k, MR, and MRR. These metrics are standard methods for measuring model performance in classification tasks. In the experiments, the statistical population for MR and MRR values ​​is the entire test set. If a test data point does not match the correct answer, its rank in MR is set to twice the maximum rank to penalize the missing sample; in MRR, the rank of the missing sample is set to infinitesimal, with its reciprocal rank being 0, to penalize the missing sample.

[0126] During the evaluation process, to protect data security, the test data underwent both manual desensitization and multiple sensitive word regular expression matching desensitization processes. GPT-4 was used to determine whether the model output accurately matched the correct answer, thereby indirectly calculating the aforementioned performance evaluation metrics. Carefully designed prompts were used to guide GPT-4; for each of the five answers provided by the model and the standard answer, if a correct answer exists, the correct sequence number is returned; otherwise, -1 is returned.

[0127] The desensitized stop word list in this example is 10235 words in size, and the GPT version used is GPT-4-0125-preview.

[0128] The results of the comparative experiment are as follows Figure 7 As shown, the superiority of this method is demonstrated.

[0129] Example 5:

[0130] This example is a parameter experiment based on Example 3. In the Actor module of the fault map node extraction module based on reinforcement learning, there is a policy network that samples n nodes that are most helpful for fault attribution. Here, there is a hyperparameter n that has a decisive impact on model performance.

[0131] In the parametric experiments of this example, we focused on an in-depth study of n to determine its impact on model performance.

[0132] This example tested the effects of n=3, 6, 9, 12, and 15 on the experiment and recorded the distribution of sampling nodes. The results of the parameter experiment are as follows: Figure 8 As shown in the scatter plot Figure 9 As shown.

[0133] The method implemented in this example found that an excellent value for n is 9. Here, the sampling effect is just right because too few node samples will result in missing information, while too many node samples will introduce noise.

[0134] This example specifically explores the importance of the critical fault map sampling module to overall performance. The ablation experiment was divided into two phases: the first phase involved no sampling, i.e., inference was performed directly; the second phase involved full sampling, which provided the entire fault map as historical reference information to the model for inference.

[0135] This example demonstrates that full sampling significantly improves the model's reasoning performance compared to direct inference. This improvement is attributed to the model incorporating more reference information, enabling it to make more accurate decisions. However, the method of this invention is superior to full sampling because including the entire fault map in the sampling may introduce irrelevant noise that not only fails to aid the model's reasoning but also degrades performance to suboptimal levels. Figure 10 The results of the ablation experiment are presented.

[0136] The above are preferred embodiments of the present invention. Any changes made to the technical solution of the present invention that do not exceed the scope of the technical solution of the present invention shall fall within the protection scope of the present invention.

Claims

1. A power distribution network fault attribution analysis method based on graph node sampling and large language models, characterized by: The method enhances the fault analysis capability of the large language model by constructing a multi-dimensional fault ontology and knowledge graph, and dynamically selecting key information nodes by reinforcement learning, Comprise the following steps; Step one, design a multi-dimensional fault ontology, which is used to guide the structuring of fault data; When constructing the multi-dimensional fault ontology model, first, through in-depth analysis of the fault data of the distribution network, a multi-dimensional fault ontology model containing entities, attributes, events and their mutual relationships is constructed as the basis of the knowledge graph; Step two, according to the multi-dimensional fault ontology of step one, construct a knowledge graph for storing and representing fault information in the distribution network; That is, generate a distribution network fault knowledge graph: under the guidance of the multi-dimensional fault ontology model, the actual fault data is converted into nodes and relationships in the knowledge graph, forming a detailed distribution network fault graph; Step three, integrate a large language model LLM for processing and analyzing fault information; Node sampling based on graph: through the node selector trained by reinforcement learning, select the nodes that are most valuable for fault attribution from the fault knowledge graph to enhance the input information of the large language model; Step four, fault attribution analysis of the large language model: using the enhanced input, the large language model reasons and analyzes the cause of the fault, outputs the possible fault cause, uses the node selection algorithm based on reinforcement learning to select the nodes most related to the current analysis task from the knowledge graph, and provides the node information to the large language model to enhance its diagnostic prediction ability; Step five, empirical analysis and model optimization: empirical analysis is carried out on real distribution network fault data set to verify the effectiveness of the method, and model parameters and structure are optimized according to the analysis results, that is, through node sampling, the nodes are selected, and the integration of knowledge graph and large language model is used to optimize the accuracy and efficiency of fault analysis.

2. The power grid fault attribution analysis method based on graph node sampling and large language model according to claim 1, characterized in that: The multi-dimensional fault ontology model includes entity nodes, abstract entity nodes and event nodes, and also includes the attributes corresponding to each of the three nodes, and each type of entity and event includes a plurality of attributes for describing fault scenarios.

3. The power grid fault attribution analysis method based on graph node sampling and large language model of claim 2, characterized in that: The attributes of the entity node include: the region it belongs to, the tower it belongs to, the running unit name, the actual running feeder name, the feeder it belongs to, the outage line, the distribution transformer name, the transformer property, whether it is a low-voltage device, the user classification, the influence range, the reclosing condition, the protection action condition, the loss of land condition, the weather, the temperature, the fault overview, the fault type, the fault detailed overview, the start outage time, the fault occurrence time, the maintenance team, the responsibility reason, the technical reason category, the responsibility reason and the technical reason category, the cause analysis, the responsibility reason category, the fault cause overview, the fault cause, and the technical cause category; The attributes of the abstract entity node include: abstract feeder, abstract distribution transformer, and abstract meteorological condition; The attributes of the event node include: repair event, power failure event, fault handling event, and system protection event.

4. The power grid fault attribution analysis method based on graph node sampling and large language model of claim 2, characterized in that: In step two, based on the defined fault ontology model, a power distribution network fault knowledge graph is constructed. The construction of the knowledge graph includes converting each fault record in the power distribution network into an independent fault subgraph. These fault subgraphs are then integrated and disambiguated according to the fault ontology to form a complete fault knowledge graph. The method is to add it to the total fault graph. Ensure that the newly added fault data can be correctly integrated with the existing graph data, avoid duplication and redundancy, and at the same time maintain the integrity and query efficiency of the graph; The method comprises the following steps: Step 4.1, initialize the fault graph: before any data processing, first initialize an empty graph G, which will be used as a container to store all subsequent fault subgraphs; Step 4.2, iterate through the fault record set: iterate through each item in the fault record set F; For each fault record f i , a corresponding fault subgraph G i is created; This subgraph is constructed based on the details of the fault record f i ; Step 4.3, fault subgraph fusion to total graph: if it is the first fault record generated subgraph, directly set this subgraph as the main fault graph G; For subsequent fault subgraphs, check whether each entity e in the subgraph already exists in the main graph G; If the entity already exists, associate the new fault information with the existing entity information; If the entity e does not exist in the graph G, add this new entity and its related fault information to the graph G; Step 4.4, return the final total fault graph: after processing all fault records, return the constructed fault graph G; This graph now contains the data of all fault records, as well as the associations and links between these data.

5. The power grid fault attribution analysis method based on graph node sampling and large language model of claim 4, wherein: The large language model LLM in step three has the function of processing natural language, which generates the predicted conclusion of the fault reason by analyzing and reasoning the fault description and fault information; When integrating the large language model, the sampled node information is used as input to enhance the fault analysis process of the large language model. The method includes concatenating the node information into the prompt information prompt and inputting it into the large language model. The specific steps are: concatenate the required node information into structured text and attach it to the fault problem description as a prompt information; When running the large language model, use the enhanced input to perform reasoning analysis of the fault reason and generate a list of possible fault reasons; The input of the large language model is a comprehensive text containing fault problem description and node information; after receiving the input, the model analyzes the fault through its trained language understanding and reasoning ability, predicts the possible fault reason, and generates a list of possible fault reasons. In this way, the sampled node information is integrated with the input format of the large language model, so that the model can use more context information for more accurate fault diagnosis; In step four, the node selection algorithm based on reinforcement learning adopts the Actor-Critic architecture, in which the node selector acts as the actor Actor responsible for generating sampling behavior according to the policy network, and the critic Critic adjusts the behavior of the actor according to the output of the large language model as the evaluation signal; allow the node selector to optimize its strategy through the trial-and-error process to more accurately predict the nodes most useful for fault attribution analysis.

6. The power grid fault causation analysis method based on graph node sampling and large language model according to claim 5, characterized in that: In the node selection algorithm based on reinforcement learning, the node selector adopts an attention mechanism, and its policy network includes a double-layer attention mechanism and a ReLU activation layer, which is used to select the nodes most valuable for fault cause inference, allowing the model to process inputs of different lengths and integrate information between nodes. This enables the model to evaluate and output the sampling probability of other nodes in addition to the first fixed node, thereby guiding the decision-making process during fault analysis.

7. The power grid fault causation analysis method based on graph node sampling and large language model according to claim 6, characterized in that: In step five, a node embedding learning module is used to calculate the embedding representation of each node in the knowledge graph, which includes semantic embedding, neighborhood embedding, and position embedding.

8. The power grid fault causation analysis method based on graph node sampling and large language model of claim 6, characterized in that: In step five, the node is first represented in a multi-dimensional embedding manner, which includes semantic embedding, neighborhood embedding, and position embedding, creating an information-rich feature vector for each node. Semantic embedding is obtained by encoding the text description of the node using a pre-trained language model. The BGE model is used as an encoder to encode the text of the node into a vector form. Neighborhood embedding is used to emphasize the context information of the node. It uses the average of the semantic embeddings of all first-order neighbor nodes of the node and uses PCA dimension reduction method to reduce its dimension. Position embedding is used to represent the position information of the node in the graph structure. It uses the shortest hop number from the node to the fault explicit summary node and uses a trigonometric function to convert it into a vector form. Finally, the semantic embedding, neighborhood embedding, and position embedding are concatenated to obtain the final embedding representation.

9. The power grid fault causation analysis method based on graph node sampling and large language model of claim 6, characterized in that: In step five, the selected knowledge graph nodes are integrated into the input of a large language model to improve the accuracy and efficiency of fault diagnosis, while reducing the noise introduced by irrelevant or low-quality nodes.

10. The power grid fault causation analysis method based on graph node sampling and large language model of claim 6, wherein: In step five, a reinforcement learning method is used to adjust the node selection strategy to dynamically respond to different fault situations and data changes, thereby maintaining high accuracy while improving the adaptability and flexibility of the system. Specifically, the trained node selector is used as a node sampler to select the most relevant fault subgraph from the fault graph based on the current fault summary, and then sample the nodes with the highest information value from the fault subgraph. The operation method includes the following steps: first, use the BGE pre-training model to encode the fault summary text to generate a high-dimensional feature vector; then, encode the fault explicit summary nodes in the graph in the same way, calculate the similarity between these nodes and the fault summary, select the node with the highest similarity, and then select the fault subgraph corresponding to the node, and then sample the node set with the highest information value from the fault subgraph to ensure that the most critical information is extracted from the fault graph to support accurate fault attribution analysis.

Citation Information

Patent Citations

  • Knowledge graph enhanced power distribution network fault attribution analysis method based on large language model

    CN117312531A

  • Interactive screening method and device, equipment and storage medium

    CN117954074A