A method, device and medium for multimodal fault reasoning in power distribution networks
By using a multimodal fault reasoning method and dynamic updates of a spatiotemporal knowledge graph, combined with a pre-trained model and a graph attention layer, the problems of dynamic adaptability and deep analysis in traditional power system fault diagnosis are solved, achieving efficient and accurate diagnosis of power grid faults.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-04-03
AI Technical Summary
In existing technologies, traditional expert systems and single deep learning models are difficult to adapt to complex power grid environments in power system fault diagnosis. They lack dynamic knowledge updates and deep analysis capabilities, resulting in insufficient diagnostic accuracy and interpretability.
A multimodal fault reasoning method is adopted. By collecting multi-source data, a spatiotemporal knowledge graph is constructed and dynamically updated using a temporal graph convolutional network. Combined with a pre-trained model, fault reasoning is performed, and a graph attention layer is introduced to calculate the attention weights of neighboring entities for deep fault path parsing.
It enables real-time and dynamic diagnosis of power grid faults, improves the accuracy and interpretability of fault diagnosis, and can adapt to the complex and changing environment of the power grid.
Smart Images

Figure CN121302297B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power operation and maintenance technology, and in particular to a method, equipment and medium for multimodal fault reasoning in distribution networks. Background Technology
[0002] In existing technologies, traditional expert systems rely on manually created rule bases for fault diagnosis and handling. However, with the integration of distributed power sources, the power grid operating environment has become more complex, and traditional rule bases struggle to cover all possible new fault scenarios, resulting in the system's inability to flexibly respond to changing power grid conditions. Furthermore, while single deep learning models possess strong learning capabilities when applied to power systems, their lack of transparent interpretability makes the fault diagnosis process difficult to trace, reducing the model's reliability. Simultaneously, deep learning models often fail to adequately mine implicit correlations, making it difficult to discover potential correlation factors in power grid faults and impacting diagnostic accuracy. For the reasons mentioned above, constructing a knowledge graph that reflects power system faults or defects for fault reasoning enhances the mining of implicit knowledge correlations during fault diagnosis and improves the identification of potential correlation factors. For example, Chinese patent application CN117892814A provides a maintenance auxiliary decision-making method based on a relay protection device defect knowledge graph. By extracting and fusing knowledge from relay protection device defect text, a relay protection device defect knowledge graph is constructed, achieving full mining and utilization of defect data. The method utilizes this knowledge graph for auxiliary decision-making processes and updates the knowledge graph, enabling reasoning about defect levels, defect locations, defect causes, and defect elimination suggestions. While to a certain extent… While it achieves effective reasoning and diagnosis of power grid faults, it still has the following drawbacks: 1) Its knowledge graph is updated incrementally, relying on the addition of case databases. It cannot respond in real time to continuous changes in power grid topology, switch positions, or equipment status, and is out of sync with the actual power grid operation and dispatch situation. It lacks a dynamic knowledge accumulation and update mechanism and cannot effectively adapt to the ever-changing operating environment and fault modes of the power grid; 2) The method it provides is essentially based on the constructed knowledge graph for retrieval and matching. It finds matching items between the current fault phenomenon and historical cases through cosine similarity and then directly cites the conclusions from historical cases. This is a shallow, similarity-based reasoning that lacks the ability to deeply analyze fault propagation paths.
[0003] Therefore, the technical problem to be solved is to provide a method that enables deep reasoning about fault paths in a distribution network based on a knowledge graph that can be effectively and dynamically updated. Summary of the Invention
[0004] The purpose of this invention is to overcome the defects of the prior art and provide a method, device and medium for multimodal fault reasoning in power distribution networks.
[0005] The objective of this invention can be achieved through the following technical solutions:
[0006] According to a first aspect of the present invention, a method for multimodal fault reasoning in a distribution network is provided, the method comprising:
[0007] Raw data is collected, including power distribution network operation data, operation logs, and equipment images. Multimodal features are extracted based on the raw data and then aligned and fused to obtain fused features.
[0008] Based on the aforementioned fusion features and original data, and by introducing power grid physical rules constraints, a spatiotemporal knowledge graph is constructed. The spatiotemporal knowledge graph is dynamically updated and evolved through the fusion features corresponding to the target time and the spatiotemporal knowledge graph corresponding to the previous time.
[0009] To obtain a textual description of the fault phenomenon, the following steps are performed using a pre-trained model for fault reasoning: the fault phenomenon is segmented into words; for each token obtained from the segmentation, the target node is searched in the spatiotemporal knowledge graph, and the neighboring nodes of the target node are obtained; attention weights are calculated based on the target node and the neighboring nodes; a graph context vector is obtained based on the attention weights; and fault reasoning is performed based on the graph context vector.
[0010] As a preferred technical solution, the alignment method is as follows:
[0011] The raw data is classified according to event type. Raw data belonging to the same event are constructed into positive sample pairs, and raw data belonging to different events are constructed into negative sample pairs.
[0012] Calculate the positive sample similarity of the original data in each positive sample pair and the negative sample similarity of the original data in each negative sample pair. Select the maximum positive sample similarity value and the maximum negative sample similarity value, and calculate the sum of the two as the alignment loss function value.
[0013] The multimodal feature extraction process is inversely optimized by minimizing the alignment loss function value.
[0014] As a preferred technical solution, the entities in the spatiotemporal knowledge graph include equipment entities and circuit entities. The equipment entities include circuit breakers, protection devices, and core devices. The core devices include pole switches, fuses, pole-mounted switches, pole transformers, distribution transformers, poles, crossing cables, circuit breakers, and station switches. The circuit entities include electrical nodes, phases, topology branches, feeders, protected sections, and fault sections.
[0015] The relationships mentioned include membership, outgoing, location, connection, control, and protection.
[0016] As a preferred technical solution, the power grid physical rule constraints include:
[0017] Kirchhoff's Current Law constraint states that for each electrical node in the spatiotemporal knowledge graph, the sum of the currents flowing into that node is equal to the sum of the currents flowing out.
[0018] Kirchhoff's voltage law constraint states that for each closed topological branch in the knowledge graph, the sum of the voltage drops of all components in the branch is zero.
[0019] Power balance constraint: for a specific region of the spatiotemporal knowledge graph, including feeders and protected sections, the injected power equals the sum of the load power and the loss;
[0020] Topology consistency constraint: the state of the extracted device entities is consistent with the circuit connectivity of the distribution network.
[0021] As a preferred technical solution, for the spatiotemporal knowledge graph at time t, the dynamic update and evolution are performed using a temporal graph convolutional network as follows:
[0022] Obtain the spatiotemporal knowledge graph at time t-1. For each node in the spatiotemporal knowledge graph, perform neighborhood aggregation based on its adjacency matrix to obtain neighborhood aggregation features. ,Right now:
[0023] ,
[0024] in, The first element of the normalized adjacency matrix represents the... OK; This represents the feature matrix of all nodes in the l-th layer of a temporal graph convolutional network; Indicates trainable parameters;
[0025] Based on the aforementioned neighborhood aggregation features and the fusion features at time t, the nodes... Update the hidden state in the next moment, that is:
[0026] ,
[0027] in, The nodes obtained from the fusion features at time t Corresponding features; Represents the weight matrix; This represents the activation function.
[0028] As a preferred technical solution, the pre-trained model includes multiple cascaded Transformer layers, and the method for calculating the attention weights is as follows:
[0029] Using the text processor of the pre-trained model, the fault phenomenon is transformed into a token sequence, and an initial embedding vector is generated for each token in the token sequence. An initial hidden state matrix is constructed based on the initial embedding vector.
[0030] In the In the Transformer layer, perform the following steps:
[0031] Based on the initial hidden state matrix, the contextual dependencies between tokens are calculated using a self-attention mechanism to obtain the hidden state matrix. ;
[0032] For each token in the hidden state matrix, if With entities in the aforementioned spatiotemporal knowledge graph If so, then the element in its corresponding hidden state matrix is used as the query;
[0033] The entity Using the hidden states of neighboring nodes as keys and values, calculate the attention weights:
[0034] ,
[0035] in, Represents the weight matrix; express The hidden state; This indicates the hidden state of the adjacent node j; Represents the relationship vector between entity i and entity j; 'a' represents the set of adjacent nodes; 'a' represents the attention vector. This represents the hidden state of entity k; Indicates the activation function; This indicates normalization.
[0036] As a preferred technical solution, the method for calculating the graph context vector is as follows:
[0037] ,
[0038] in, This represents the graph context vector output by the i-th Transformer layer; Indicates the activation function; Represents entity nodes The set of adjacent nodes; Indicates attention weight; The value transformation weight matrix; Representing neighboring entities The hidden state.
[0039] As a preferred technical solution, the method further includes:
[0040] Collect feedback data, including fault data, output of pre-trained models, and human feedback data, and construct a training experience pool.
[0041] The spatiotemporal knowledge graph can be directly modified based on the aforementioned human feedback data;
[0042] A batch of training data is sampled from the training experience pool to train the pre-trained model. A training loss function is introduced to optimize the model parameters, the expression of which is:
[0043] ,
[0044] in, This represents the fault reasoning loss, calculated based on the fault reasoning results output by the model and the actual fault. Indicates the balance coefficient; This indicates that the KL divergence is calculated. This represents the distribution of model parameters after training; This represents the distribution of parameters in the original model.
[0045] According to a second aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described thereon.
[0046] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.
[0047] Compared with the prior art, the present invention has the following advantages:
[0048] 1) To address the issue that existing knowledge graphs are updated incrementally and lack dynamic knowledge accumulation and update mechanisms, this invention introduces a temporal graph convolutional network to dynamically update the constructed knowledge graph based on multimodal fusion features. Specifically, it aggregates neighbor node information to preserve the topological connection relationship of the power grid and introduces real-time fusion features of the current time t when updating nodes. This not only realizes the state update of the corresponding node, but also automatically and in real-time propagates the change of state to the connected line and equipment nodes through topological connections, thereby ensuring that the spatiotemporal knowledge graph can reflect the real state of the distribution network in real time.
[0049] 2) In order to solve the problems of the prior art, the present invention inserts a graph attention layer into each traditional Transformer layer of the pre-trained model, calculates the attention weight of each entity in the fault information with all neighbor entities in the knowledge graph, and dynamically quantifies the importance of each neighbor information when answering the current question. This process is carried out along the high-weight causal relationship chain in the knowledge graph, rather than simple case matching, which greatly improves the ability to handle new and complex faults. Attached Figure Description
[0050] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0052] Example 1
[0053] This invention proposes a multimodal fault reasoning method for distribution networks that integrates knowledge graphs and pre-trained models. This method combines knowledge graphs and pre-trained models used in power grid fault diagnosis to achieve efficient reasoning and fault diagnosis of multimodal data in distribution networks. The core of this invention lies in its collaborative reasoning mechanism, which enables power grid fault diagnosis to not only rely on real-time data but also incorporate multi-dimensional information such as historical fault cases and equipment status. This provides maintenance personnel with more comprehensive and accurate fault diagnosis and handling suggestions, overcoming the limitations of traditional fault diagnosis methods. It allows for efficient and intelligent fault reasoning in more complex power grid environments. The method flow is as follows: Figure 1 The following are included:
[0054] S1. Collect raw data, including power distribution network operation data, operation logs and equipment images. Extract multimodal features based on the raw data, and align and fuse them to obtain fused features.
[0055] S11, Data Acquisition.
[0056] Detailed power grid operation data includes line current, voltage, power, and switch status collected from the SCADA system, with a sampling frequency of 1Hz; operation logs include fault reports, operation tickets, and maintenance records; equipment images include infrared thermal images and visible light photographs of the equipment.
[0057] S12, Data Preprocessing.
[0058] Singular Spectrum Analysis (SSA) was used to reduce noise and fill missing values in the power grid operation data. A time window of L=60 (1 minute) was set, and the data within the window was subjected to trajectory matrix construction, SVD decomposition, grouping and reconstruction to effectively separate the signal from the noise.
[0059] For runtime logs, domain dictionaries and pre-trained BERT models are used for word segmentation and terminology standardization.
[0060] Rotate and crop the device image to generate an image of the same size.
[0061] For the aforementioned multi-source data, a unified spatiotemporal label (device ID, location, timestamp) is applied and written into the same data lake.
[0062] S13, Feature Extraction, Alignment and Fusion.
[0063] S131. Use a text encoder to extract the semantic vector of the fault report, use an image editor to extract image features, and use a one-dimensional convolutional neural network (1D-CNN) to extract the spatiotemporal features of the running data.
[0064] S132. Classify the raw data according to event type, construct positive sample pairs for raw data belonging to the same event, and construct negative sample pairs for raw data belonging to different events.
[0065] S133. Calculate the positive sample similarity of the original data in each positive sample pair and the negative sample similarity of the original data in each negative sample pair. Select the maximum positive sample similarity value and the maximum negative sample similarity value, and calculate the sum of the two as the alignment loss function value.
[0066] The detailed expression for the loss function is as follows:
[0067] ,
[0068] in, Represents the set of positive sample pairs; This represents the marginal parameter, set to 0.6, used to bring positive sample pairs closer together and push negative sample pairs apart. , , , as well as Indicates a data sample; This represents the negative sample set.
[0069] S134. The multimodal feature extraction process is optimized inversely by minimizing the alignment loss function value.
[0070] S135. The aligned feature vectors are concatenated and then subjected to dimensionality reduction and deep fusion through a fully connected layer to obtain a unified multimodal fusion feature vector.
[0071] S2. Based on the fusion features and raw data, and by introducing the physical rules of the power grid, a spatiotemporal knowledge graph is constructed.
[0072] S21. Based on the original data, entities and their extraction are performed. In detail, entities include equipment entities and circuit entities. Equipment entities include circuit breakers, protection devices, and core devices. Core devices include pole switches, fuses, pole-mounted switches, pole transformers, distribution transformers, poles, crossing cables, circuit breakers, and station switches. Circuit entities include electrical nodes, phases, topology branches, feeders, protected sections, and fault sections. Relationships include affiliation, outgoing lines, location, connection, control, and protection.
[0073] When extracting entities and their relationships, it is also necessary to introduce grid physical rules constraints, including Kirchhoff's current law constraints, Kirchhoff's voltage law constraints, power balance constraints, and topology consistency constraints.
[0074] Among them, Kirchhoff's Current Law constraint states that for each electrical node in the spacetime knowledge graph, the sum of the currents flowing into that node equals the sum of the currents flowing out, i.e.: , Represents the set of electrical nodes; Represents the input current embedding vector; This represents the output current embedding vector.
[0075] Kirchhoff's voltage law constraint states that for every closed topological branch in a knowledge graph, the sum of the voltage drops across all components in that branch is zero. , Indicates the number of branches in a closed topology; Indicates a loop; The embedding vector represents the branch voltage drop.
[0076] Power balance constraint means that for a specific region of the spatiotemporal knowledge graph, including feeders and protected areas, the injected power equals the sum of the load power and the losses, i.e. , Represents the set of all specific regions; A vector representation of the total injected power in the region; A vector representation of the sum of the load power of all load devices within the region; This represents the vector representation of the total loss calculated from the current and resistance of each branch.
[0077] Topology consistency constraint means that the state of the extracted device entities must be consistent with the circuit connectivity of the distribution network, i.e. ,in, Represents a set of devices; Indicates the state of the s-th device; This indicates the connectivity status of the topology branch corresponding to the device.
[0078] S22. Based on the entities and their corresponding relationships extracted above, construct triples and import the triples into the graph database Neo4j; treat each entity extracted above as a node in the spatiotemporal knowledge graph, including attributes such as ID, name, rated capacity, and real-time status; treat each relationship as an edge, including edge attributes such as type and discovery time.
[0079] Furthermore, the spatiotemporal knowledge graph provided by this invention achieves dynamic updating and evolution through the fusion features corresponding to the target time and the spatiotemporal knowledge graph corresponding to the previous time, as follows:
[0080] i) Obtain the spatiotemporal knowledge graph at time t-1. For each node in the spatiotemporal knowledge graph, perform neighborhood aggregation based on its adjacency matrix and obtain the neighborhood aggregation features. ,Right now:
[0081] ,
[0082] in, The first element of the normalized adjacency matrix represents the... OK; This represents the feature matrix of all nodes in the l-th layer of a temporal graph convolutional network; This represents the trainable parameters.
[0083] ii) Based on the neighborhood aggregation features and the fusion features at time t, the nodes are... Update the hidden state in the next moment, that is:
[0084] ,
[0085] in, The nodes obtained from the fusion features at time t Corresponding features; Represents the weight matrix; This represents the activation function.
[0086] S3. Obtain textual descriptions of fault phenomena and use pre-trained models for fault reasoning.
[0087] The pre-trained model provided by this invention includes multiple cascaded Transformer layers, and a graph attention layer is inserted between the self-attention mechanism and the feedforward network of each layer.
[0088] The pre-trained model performs the following steps:
[0089] S31. Segment the fault phenomenon into words. Based on each token obtained from the word segmentation, find the target node in the spatiotemporal knowledge graph and obtain the neighboring nodes of the target node. Calculate the attention weight based on the target node and the neighboring nodes. Obtain the graph context vector based on the attention weight. Perform fault reasoning based on the graph context vector.
[0090] S32. Using the text processor of the pre-trained model, the fault phenomenon is transformed into a token sequence, and an initial embedding vector is generated for each token in the token sequence. The initial hidden state matrix is constructed based on the initial embedding vector.
[0091] S33, in the In the Transformer layer, perform the following steps:
[0092] S331. Based on the initial hidden state matrix, use a self-attention mechanism to calculate the contextual dependencies between tokens to obtain the hidden state matrix. .
[0093] S332. For each token in the hidden state matrix, if Entities in spatiotemporal knowledge graphs If so, then the element in its corresponding hidden state matrix is used as the query.
[0094] S333, Entity Using the hidden states of neighboring nodes as keys and values, calculate the attention weights:
[0095] ,
[0096] in, Represents the weight matrix; express The hidden state; This indicates the hidden state of the adjacent node j; Represents the relationship vector between entity i and entity j; 'a' represents the set of adjacent nodes; 'a' represents the attention vector. This represents the hidden state of entity k; Indicates the activation function; This indicates normalization.
[0097] S334, Computational graph context vector:
[0098] ,
[0099] in, This represents the graph context vector output by the i-th Transformer layer; Indicates the activation function; Represents entity nodes The set of adjacent nodes; Indicates attention weight; The value transformation weight matrix; Representing neighboring entities The hidden state.
[0100] S335. Fuse the graph context vector with the hidden state after self-attention to generate the final output of this layer, the expression of which is:
[0101] ,
[0102] in, This represents the i-th element in the hidden state matrix.
[0103] S34. After all the graph-enhanced Transformer layers, the final hidden state, which deeply integrates textual semantics and graph knowledge, is obtained. The first position of the sequence is taken. The final hidden state of the token As a global representation of the entire query, it is passed through a fault classification header for fault type inference.
[0104] Example 2
[0105] In this embodiment, the selected pre-trained model can be a DeepSeek-R1 model, and based on hardware resource configuration, a 32-parameter version is preferred from the DeepSeek-R1 model series to ensure inference accuracy while meeting the practical constraints of memory and computing resources. During model deployment, the Ollam toolchain is used to complete model format conversion, runtime environment configuration, and service interface encapsulation, building a local inference engine with complete natural language understanding and generation capabilities.
[0106] To further enhance the model's professional diagnostic capabilities in the field of distribution network faults, a Python script for RAG knowledge retrieval was simultaneously built. A pre-constructed power grid knowledge graph and historical case database were used as external knowledge sources. An efficient retrieval index was established through semantic vectorization processing, enabling the dynamic injection of domain knowledge during the inference process. During system operation, a continuous learning mechanism was established to collect newly occurring fault data and handling feedback in real time. Incremental fine-tuning strategies were used to periodically optimize model parameters, forming a virtuous cycle of continuous evolution in diagnostic capabilities.
[0107] Fine-tuning training includes the following steps:
[0108] After completing the model configuration file and defining the model architecture, pre-trained weights are downloaded from a public model repository and loaded into the model architecture, mapping the trained weights to the various parameters of the model. A multi-input model is designed based on time-series and text data: time-series data input for grid load and equipment status; and text data input for fault reports and operation and maintenance manuals. The time-series data branch uses a one-dimensional convolutional neural network to extract the spatiotemporal features of continuous monitoring data such as grid load and equipment status; the text data branch utilizes the original Transformer architecture of DeepSeek-R1 to parse the semantic information of unstructured texts such as fault reports and scheduling procedures. The feature representations of the two branches are adaptively fused at a higher level through an attention mechanism to form a unified multimodal representation. During the fine-tuning training phase, a hierarchical learning rate strategy is adopted to enhance the model's understanding of distribution network terminology and fault logic while retaining its general language capabilities; the two branch models are merged in the final fully connected layer.
[0109] Furthermore, this embodiment also provides a closed-loop optimization method for spatiotemporal knowledge graphs and pre-trained models, including:
[0110] A1. Collect feedback data, including fault data, output of pre-trained models, and human feedback data, and build a training experience pool.
[0111] A2. Add, delete, and modify the spatiotemporal knowledge graph directly based on human feedback data.
[0112] A3. Sample a batch of training data from the training experience pool, train the pre-trained model, and introduce a training loss function to optimize the model parameters. Its expression is:
[0113] ,
[0114] in, This represents the fault reasoning loss, calculated based on the fault reasoning results output by the model and the actual fault. Indicates the balance coefficient; This indicates that the KL divergence is calculated. This represents the distribution of model parameters after training; This represents the distribution of parameters in the original model.
[0115] A4. Update the fine-tuned model to the online inference system to complete one learning cycle.
[0116] Example 3
[0117] The electronic device of this invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) or loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0118] Multiple components in the device are connected to the I / O interface, including: input units such as keyboards and mice; output units such as various types of displays and speakers; storage units such as disks and optical discs; and communication units such as network interface cards (NICs), modems, and wireless transceivers. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0119] The processing unit executes the various methods and processes described above, such as methods S1-S3 and methods A1-A4. For example, in some embodiments, methods S1-S3 and methods A1-A4 may be implemented as computer software programs tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of methods S1-S3 and methods A1-A4 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute methods S1-S3 and methods A1-A4 by any other suitable means (e.g., by means of firmware).
[0120] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0121] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0122] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0123] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for multimodal fault reasoning in a distribution network, characterized in that, The method includes: Raw data is collected, including power distribution network operation data, operation logs, and equipment images. Multimodal features are extracted based on the raw data and then aligned and fused to obtain fused features. Based on the aforementioned fusion features and original data, and by introducing power grid physical rules constraints, a spatiotemporal knowledge graph is constructed. The spatiotemporal knowledge graph is dynamically updated and evolved through the fusion features corresponding to the target time and the spatiotemporal knowledge graph corresponding to the previous time. To obtain a textual description of a fault phenomenon, the following steps are performed using a pre-trained model for fault reasoning: the fault phenomenon is segmented into words; for each token obtained from the segmentation, a target node is searched in the spatiotemporal knowledge graph, and neighboring nodes of the target node are obtained; attention weights are calculated based on the target node and neighboring nodes; a graph context vector is obtained based on the attention weights; and fault reasoning is performed based on the graph context vector. The pre-trained model includes multiple cascaded Transformer layers, and the method for calculating the attention weights is as follows: Using the text processor of the pre-trained model, the fault phenomenon is transformed into a token sequence, and an initial embedding vector is generated for each token in the token sequence. An initial hidden state matrix is constructed based on the initial embedding vector. In the In the Transformer layer, perform the following steps: Based on the initial hidden state matrix, the contextual dependencies between tokens are calculated using a self-attention mechanism to obtain the hidden state matrix. ; For each token in the hidden state matrix, if With entities in the aforementioned spatiotemporal knowledge graph If a match is found, the element in the corresponding hidden state matrix is used as the query. The entity Using the hidden states of neighboring nodes as keys and values, calculate the attention weights: , in, Represents the weight matrix; express The hidden state; This indicates the hidden state of the adjacent node j; Represents the relationship vector between entity i and entity j; 'a' represents the set of adjacent nodes; 'a' represents the attention vector. This represents the hidden state of entity k; Indicates the activation function; This indicates normalization.
2. The method for multi-mode fault reasoning in a distribution network according to claim 1, characterized in that, The alignment is as follows: The raw data is classified according to event type. Raw data belonging to the same event are constructed into positive sample pairs, and raw data belonging to different events are constructed into negative sample pairs. Calculate the positive sample similarity of the original data in each positive sample pair and the negative sample similarity of the original data in each negative sample pair. Select the maximum positive sample similarity value and the maximum negative sample similarity value, and calculate the sum of the two as the alignment loss function value. The multimodal feature extraction process is inversely optimized by minimizing the alignment loss function value.
3. The method for multi-mode fault reasoning in a distribution network according to claim 1, characterized in that, In the spatiotemporal knowledge graph, entities include equipment entities and circuit entities. The equipment entities include circuit breakers, protection devices, and core devices. The core devices include pole switches, fuses, pole-mounted switches, pole transformers, distribution transformers, poles, crossing cables, circuit breakers, and station switches. The circuit entities include electrical nodes, phases, topology branches, feeders, protected sections, and fault sections. In the spatiotemporal knowledge graph, relationships include membership, outgoing lines, location, connection, control, and protection.
4. The method for multi-mode fault reasoning in a distribution network according to claim 1, characterized in that, The aforementioned power grid physical rule constraints include: Kirchhoff's Current Law constraint states that for each electrical node in the spatiotemporal knowledge graph, the sum of the currents flowing into that node is equal to the sum of the currents flowing out. Kirchhoff's voltage law constraint states that for each closed topological branch in the knowledge graph, the sum of the voltage drops of all components in the branch is zero. Power balance constraint: for a specific region of the spatiotemporal knowledge graph, including feeders and protected sections, the injected power equals the sum of the load power and the loss; Topology consistency constraint: the state of the extracted device entities is consistent with the circuit connectivity of the distribution network.
5. The method for multi-mode fault reasoning in a distribution network according to claim 1, characterized in that, For the spatiotemporal knowledge graph at time t, the dynamic update and evolution are performed using a temporal graph convolutional network as follows: Obtain the spatiotemporal knowledge graph at time t-1. For each node in the spatiotemporal knowledge graph, perform neighborhood aggregation based on its adjacency matrix to obtain neighborhood aggregation features. ,Right now: , in, The first element of the normalized adjacency matrix represents the... OK; This represents the feature matrix of all nodes in the l-th layer of a temporal graph convolutional network; Indicates trainable parameters; Based on the aforementioned neighborhood aggregation features and the fusion features at time t, the nodes... Update the hidden state in the next moment, that is: , in, The nodes obtained from the fusion features at time t Corresponding features; Represents the weight matrix; This represents the activation function.
6. The method for multi-mode fault reasoning in a distribution network according to claim 1, characterized in that, The method for calculating the graph context vector is as follows: , in, Indicates the first The graph context vector output by the Transformer layer; Indicates the activation function; Represents entity nodes The set of adjacent nodes; Indicates attention weight; The value transformation weight matrix; Representing neighboring entities The hidden state.
7. The method for multi-mode fault reasoning in a distribution network according to claim 1, characterized in that, The method further includes: Collect feedback data, including fault data, output of pre-trained models, and human feedback data, and construct a training experience pool. The spatiotemporal knowledge graph can be directly modified based on the aforementioned human feedback data; A batch of training data is sampled from the training experience pool to train the pre-trained model. A training loss function is introduced to optimize the model parameters, the expression of which is: , in, This represents the fault reasoning loss, calculated based on the fault reasoning results output by the model and the actual fault. Indicates the balance coefficient; This indicates that the KL divergence is calculated. This represents the distribution of model parameters after training; This represents the distribution of parameters in the original model.
8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Operation and maintenance auxiliary decision-making method based on relay protection device defect knowledge graph
CN117892814A
Power grid fault prediction method based on multi-modal knowledge hybrid reasoning
CN116910633A
Construction method and device of intelligent question answering system based on lightweight large model
CN119721262A
Semantic analysis method and device based on power grid domain knowledge mining and electronic equipment
CN120633664A