Distribution network fault diagnosis method, device, terminal and medium based on large model

By constructing a dynamic graph attention network model and a cross-modal attention mechanism to fuse multimodal data, the problems of misjudgment and missed diagnosis in distribution network fault diagnosis are solved, and high-accuracy fault identification is achieved in complex scenarios.

CN120337157BActive Publication Date: 2025-09-30GUANGZHOU SHUIMU QINGHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510764101.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2025-09-30
Estimated Expiration
2045-06-10

AI Technical Summary

Technical Problem

Existing distribution network fault diagnosis technology based on large models has fault location deviations when facing the frequent access of distributed renewable energy and dynamic reconstruction of network topology, resulting in missed judgments and misjudgments and low accuracy.

Method used

A dynamic graph attention network model is constructed, which integrates topological, electrical quantity and environmental data through a cross-modal attention mechanism, uses a multimodal large model for fault diagnosis, reflects the dynamic changes in the topology of the distribution network in real time, and enhances feature extraction and fault identification through LSTM network and QKV mapping calculation.

Benefits of technology

It improves the accuracy of distribution network fault diagnosis, reduces the risk of misjudgment due to topology mismatch, and enhances the robustness and accuracy of diagnosis in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120337157B_ABST
    Figure CN120337157B_ABST
Patent Text Reader

Abstract

The present application discloses a distribution network fault diagnosis method, device, terminal and medium based on a large model, which relates to the field of distribution network technology. The solution provided by the present application is based on the acquired operating data such as the topology, electrical quantities and operating environment of the distribution network. By constructing a dynamic graph attention network model, the real-time dynamic changes of the distribution network topology are reflected, and the cross-modal attention mechanism is used to fuse multimodal data features, eliminate the interference of multimodal data distribution differences on feature extraction, and enhance the robustness of the model for fault diagnosis operations under complex fault modes, thereby solving the problems of fault misjudgment and missed judgment caused by insufficient fusion of static models and multimodal data in traditional methods, and improving the accuracy of distribution network fault diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of distribution network, and in particular to a distribution network fault diagnosis method, device, terminal and medium based on a large model. Background Art

[0002] With the large-scale access of a high proportion of renewable energy and new power loads, the operation of modern distribution networks presents strong uncertainty and multi-temporal and spatial coupling characteristics, which puts higher requirements on the real-time and accuracy of fault diagnosis.

[0003] Current distribution network fault diagnosis technologies based on large models are mostly based on fixed topology and manual rule reasoning. Although this method is effective in simple scenarios, it relies on static models and preset thresholds. It is difficult to adapt to complex changes such as frequent access to distributed renewable energy and dynamic reconstruction of network topology. It is easy to cause fault location deviation due to topology mismatch, which leads to missed and misjudgment in fault diagnosis and location, and there is a technical problem of low accuracy. Summary of the Invention

[0004] The present application provides a distribution network fault diagnosis method, device, terminal and medium based on a large model, which are used to solve the technical problem of low accuracy of existing distribution network fault diagnosis technology.

[0005] To solve the above technical problems, the first aspect of the present application provides a distribution network fault diagnosis method based on a large model, comprising:

[0006] Acquiring distribution network operation data, wherein the distribution network operation data includes: topology data, electrical quantity data, and environmental data;

[0007] Constructing a dynamic graph attention network model based on the topological data and electrical quantity data in the distribution network operation data, wherein the dynamic graph attention network model is used to reflect the real-time dynamic change relationship of the topology of the distribution network;

[0008] Based on the preset multimodal large model, the distribution network operation data of different modalities are subjected to feature fusion processing through the cross-modal attention mechanism to obtain modal fusion features, and the fault diagnosis results of the distribution network are obtained based on the modal fusion features.

[0009] Preferably, constructing a dynamic graph attention network model according to the distribution network operation data includes:

[0010] Constructing a node characteristic matrix based on the distribution network operation data, wherein the node characteristic matrix is ​​used to reflect the node characteristics of each distribution network node at different time steps;

[0011] Constructing the dynamic adjacency matrix according to the node characteristic matrix, wherein the dynamic adjacency matrix is ​​used to reflect the electrical coupling strength between different distribution network nodes at different times;

[0012] According to the dynamic adjacency matrix, a dynamic graph attention network model is constructed.

[0013] Preferably, it also includes:

[0014] Based on the selected target node, the attention coefficient between the target node and the neighboring nodes at the current time step is calculated using a preset spatial attention coefficient calculation formula;

[0015] Through the activation function, the node features of each neighbor node and the attention coefficient are aggregated to obtain the updated node features of the target node in the next time step;

[0016] Summarize the node features of the target node up to the current time step, perform time-dependent feature extraction through the LSTM network, and obtain the time feature sequence of the target node;

[0017] The latest node feature of the target node is obtained according to the weighted sum of the updated node feature and the time feature sequence.

[0018] Preferably, the feature fusion processing of the distribution network operation data of different modalities is performed through the cross-modal attention mechanism to obtain the modal fusion features including:

[0019] Based on the distribution network operation data, feature encoding processing is performed through multiple preset modal encoders to obtain the electrical quantity modal matrix, topological modal matrix and environmental modal matrix respectively;

[0020] According to the electrical quantity modal matrix, the topological modal matrix and the environmental modal matrix, the electrical quantity modal matrix is ​​used as a modal alignment reference, and a preset QKV mapping calculation formula is used to obtain a QKV feature;

[0021] According to the QKV feature, combined with the attention weight calculation formula, the attention weight is obtained, and then based on the sum of the attention weight and the electrical quantity modal matrix, the modal fusion feature is obtained.

[0022] Preferably, the QKV mapping calculation formula is specifically:

[0023]

[0024] Where, is the electrical quantity modal matrix, is the combined matrix of the topological modal matrix and the environmental modal matrix, 、 、 are the weight matrices of Q features, K features, and V features respectively.

[0025] Preferably, it also includes:

[0026] Based on the preset distribution network multimodal data samples and combined with the loss function based on structural causal constraints, the multimodal large model is trained to determine the convergence degree of the multimodal large model based on the output of the loss function. When the convergence degree reaches a preset convergence threshold or the number of training iterations reaches a preset threshold, the multimodal large model is output.

[0027] Preferably, after obtaining the distribution network operation data, the method further includes:

[0028] The distribution network operation data is preprocessed, wherein the preprocessing includes: data cleaning, normalization and denoising.

[0029] At the same time, the second aspect of the present application provides a distribution network fault diagnosis device based on a large model, comprising:

[0030] An operation data acquisition unit, configured to acquire distribution network operation data, wherein the distribution network operation data includes topology data, electrical quantity data, and environmental data;

[0031] A dynamic graph network construction unit, configured to construct a dynamic graph attention network model based on topological data and electrical quantity data in the distribution network operation data, wherein the dynamic graph attention network model is configured to reflect the real-time dynamic topological change relationship of the distribution network;

[0032] The distribution network fault diagnosis unit is used to perform feature fusion processing on distribution network operation data of different modalities based on a preset multimodal large model through a cross-modal attention mechanism to obtain modal fusion features, so as to obtain distribution network fault diagnosis results based on the modal fusion features.

[0033] A third aspect of the present application provides a large-model-based distribution network fault diagnosis terminal, comprising: a memory and a processor;

[0034] The memory is used to store program code, and the program code is used to implement a distribution network fault diagnosis method based on a large model as provided in the first aspect of the present application;

[0035] The processor is configured to read and execute the program code.

[0036] The fourth aspect of the present application provides a computer-readable storage medium, in which program code is stored. The program code is used to be read and executed by a processor to implement a distribution network fault diagnosis method based on a large model as provided in the first aspect of the present application.

[0037] It can be seen from the above technical solutions that this application has the following advantages:

[0038] The solution provided in this application is based on the acquired operating data such as the topology, electrical quantities and operating environment of the distribution network. It reflects the real-time dynamic changes in the topology of the distribution network by constructing a dynamic graph attention network model, and uses a cross-modal attention mechanism to fuse multimodal data features, eliminate the interference of multimodal data distribution differences on feature extraction, and enhance the robustness of the model for fault diagnosis operations under complex fault modes, thereby solving the problems of misjudgment and missed judgment of faults caused by insufficient fusion of static models and multimodal data in traditional methods, and improving the accuracy of distribution network fault diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0040] Figure 1 A schematic flow chart of an embodiment of a distribution network fault diagnosis method based on a large model provided in this application.

[0041] Figure 2 A schematic structural diagram of an embodiment of a large-scale model-based distribution network fault diagnosis device provided in this application.

[0042] Figure 3 A schematic structural diagram of an embodiment of a distribution network fault diagnosis terminal based on a large model provided in this application. DETAILED DESCRIPTION

[0043] The embodiments of the present application provide a distribution network fault diagnosis method, device, terminal and medium based on a large model, which are used to solve the technical problem of low accuracy of existing distribution network fault diagnosis technology.

[0044] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0045] First, a detailed description of an embodiment of a distribution network fault diagnosis method based on a large model provided by this application is as follows:

[0046] See also Figure 1 This embodiment provides a distribution network fault diagnosis method based on a large model, including:

[0047] Step 101: Obtain distribution network operation data;

[0048] Among them, the distribution network operation data includes: topology data, electrical quantity data and environmental data;

[0049] Step 102: construct a dynamic graph attention network model based on the topological data and electrical quantity data in the distribution network operation data;

[0050] Among them, the dynamic graph attention network model is used to reflect the real-time dynamic topological change relationship of the distribution network;

[0051] Step 103: Based on the preset multimodal large model, the distribution network operation data of different modalities are subjected to feature fusion processing through the cross-modal attention mechanism to obtain modal fusion features, and the fault diagnosis results of the distribution network are obtained based on the modal fusion features.

[0052] It should be noted that the solution of the present application proposes to obtain distribution network operation data including topological data, electrical quantity data and environmental data, construct a dynamic graph attention network model to reflect the real-time dynamic changes of topology, and use a multimodal large model to fuse different modal data through a cross-modal attention mechanism to obtain modal fusion features, and perform fault diagnosis based on this feature. Among them, the dynamic graph attention network model refers to a graph structure that describes the change of electrical coupling strength between nodes over time through a dynamic adjacency matrix. Specifically, it can be achieved by adjusting the connection weights between nodes using a real-time updated attention coefficient, which is used to capture the impact of dynamic topological reconstruction on the fault propagation path. The cross-modal attention mechanism refers to the calculation of query and key-value features of different modal data by mapping to determine the association weight. Specifically, a multi-head attention layer can be used to align the potential associations of electrical quantities, topology and environmental modes to eliminate the distribution differences of multi-source data. The modal fusion feature refers to the joint representation of multimodal after weighted aggregation. Specifically, a residual connection can be used to retain the original feature information to enhance the representation ability of fault features.

[0053] Specifically, distribution network operation data is preprocessed and then fed into a dynamic graph attention network. This network constructs a dynamic adjacency matrix based on node voltage and current characteristics, aggregates neighboring node information using spatial attention coefficients, and extracts node state evolution patterns through time series analysis. A large multimodal model extracts deep features from each modality using independent encoders. It generates cross-modal attention weights based on the electrical quantity modality and performs a weighted fusion of topological and environmental features. The fused features are then fed into a classifier to output fault type and location information.

[0054] Compared with the existing technology, this solution adjusts the node connection relationship in real time through the dynamic graph structure, adapts to the dynamic distribution network reconstruction scenario, can accurately capture the changes in node coupling relationships under dynamic topology, eliminate the interference of multimodal data distribution differences on feature extraction, enhance the diagnostic robustness under complex fault modes, and effectively reduce the risk of misjudgment caused by single data dimension and topology mismatch. At the same time, through the cross-modal attention mechanism, semantic associations between data are established to improve the effectiveness of feature fusion.

[0055] Based on the above basic embodiment, further, for the dynamic graph attention network model in step 102, its construction steps are specifically as follows:

[0056] Construct node feature matrix based on distribution network operation data;

[0057] Construct a dynamic adjacency matrix based on the node feature matrix;

[0058] According to the dynamic adjacency matrix, a dynamic graph attention network model is constructed.

[0059] It should be noted that this embodiment further proposes constructing a node feature matrix based on distribution network operation data, constructing a dynamic adjacency matrix based on the node feature matrix, and constructing a dynamic graph attention network model based on the dynamic adjacency matrix. The node feature matrix is ​​used to reflect the node feature data of each distribution network node at different time steps, and the dynamic adjacency matrix is ​​used to reflect the electrical coupling strength between different distribution network nodes at different times.

[0060] The node feature matrix refers to a multidimensional data set formed by electrical parameters such as voltage, current, and power, as well as time step information. Specifically, it can be achieved by periodically sampling and reorganizing the real-time collected electrical quantity data using a sliding time window. It is used to characterize the dynamic behavior pattern of distribution network nodes in a continuous time series. Its expression can be:

[0061]

[0062] in, is the number of distribution network nodes; It is a characteristic dimension, such as voltage, current, power, etc. is the time step.

[0063] The dynamic adjacency matrix refers to a time-varying weight matrix generated based on the rate of change of electrical quantities between nodes and the topological connectivity. Specifically, it can be implemented by using a dynamic time warping algorithm to calculate the difference in electrical coupling between adjacent nodes. It is used to capture the real-time fluctuations in the strength of associations between nodes during the dynamic reconstruction of the network topology. The matrix expression and the calculation formula for each element in the matrix are as follows:

[0064]

[0065] in, It can change with time and operating status, reflecting the real-time electrical coupling strength between nodes.

[0066] Dynamic adjacency matrix calculation formula:

[0067]

[0068] Where, Representation node , The active power between nodes is greater, and the node with greater power flow has a higher correlation.

[0069] Specifically, after acquiring distribution network operation data, the electrical quantity parameters of each node, such as voltage, current, and power, are first sliced ​​according to a preset time step, forming a three-dimensional tensor structure containing the number of nodes, feature dimensions, and time step, which serves as the node feature matrix. Subsequently, based on the electrical quantity change trends of adjacent nodes in the node feature matrix, the electrical coupling strength of different time segments is calculated. Combined with the topological connection relationship, a dynamic adjacency matrix is ​​generated, in which the weights of the matrix elements are dynamically adjusted according to the electrical quantity correlation. Finally, the dynamic adjacency matrix and the node feature matrix are input into the graph attention network framework. The dynamic aggregation and update of node features are achieved through the graph convolution layer and the attention mechanism, constructing a dynamic graph attention network model that can adapt to real-time topological changes.

[0070] Compared with the existing technology, this solution updates the electrical coupling strength between nodes in real time through a dynamic adjacency matrix, enabling the model to adaptively capture the dynamic changing characteristics of the topology and avoid fault misjudgment caused by topology mismatch.

[0071] It is understandable that in order to further enhance the node feature characterization capability of this solution and reduce the risk of misjudgment due to changes in network structure, the update logic example of the node feature matrix provided in this embodiment is as follows:

[0072] Based on the selected target node, the attention coefficient between the target node and its neighboring nodes at the current time step is calculated using the preset spatial attention coefficient calculation formula;

[0073] Through the activation function, the node features of each neighbor node and the attention coefficient are aggregated to obtain the updated node features of the target node in the next time step;

[0074] Summarize the node features from the target node to the current time step, extract the time-dependent features through the LSTM network, and obtain the time feature sequence of the target node;

[0075] The latest node features of the target node are obtained based on the weighted sum of the updated node features and the time feature sequence.

[0076] It should be noted that, it is further proposed to calculate the attention coefficient between the target node and the neighboring nodes at the current time step based on the selected target node through the preset spatial attention coefficient calculation formula; through the activation function, the node features of each neighboring node and the attention coefficient are feature aggregated to obtain the updated node features of the target node at the next time step; the node features of the target node up to the current time step are summarized, and the time-dependent features are extracted through the LSTM network to obtain the time feature sequence of the target node; according to the weighted sum of the updated node features and the time feature sequence, the latest node features of the target node are obtained.

[0077] Among them, the spatial attention coefficient refers to the dynamic calculation of the degree of association between the target node and the neighboring nodes, specifically the attention coefficient of nodes i, j at time t, which can be achieved by calculating the cosine similarity or dot product similarity after linear transformation, and is used to capture the coupling strength between nodes under dynamic topological changes. Among them, this embodiment mentions the spatial attention coefficient The calculation formula is:

[0078]

[0079] Where, represents the hidden state of node i at time t, represents the hidden state of node j at time t, is the learnable parameter matrix, For vector concatenation operations, LeakyReLU (Leaky Rectified Linear Unit) is an improved activation function that is mainly used to solve the defect that the gradient of traditional ReLU (RectifiedLinear Unit) is zero in the negative range.

[0080] An activation function, such as the ReLU or Sigmoid function, introduces nonlinear transformations. These functions can be used to perform nonlinear mapping on aggregated features, enhancing the model's expressiveness. Feature aggregation involves weighted superposition of neighboring node features based on attention coefficients. This can be achieved through weighted summation or concatenation, fusing spatial correlation information across multiple nodes.

[0081] LSTM networks, long-short-term memory recurrent neural networks, are implemented through hidden state transfer and time gating mechanisms to extract temporal dependencies between node features. Temporal feature sequences refer to the changing trends in the characteristics of target nodes over historical time steps. These can be encoded by capturing time series segments using a sliding window to reflect the dynamic evolution of node states.

[0082] Specifically, for the selected target node, the spatial attention coefficient calculation formula is first used based on the node feature matrix of the current time step to quantify the electrical coupling strength between the node and its neighboring nodes. For example, a sudden change in current or voltage fluctuation at a neighboring node will dynamically affect the feature update of the target node through the attention coefficient. Subsequently, the features of the neighboring nodes are multiplied and accumulated with their corresponding attention coefficients, and a nonlinear transformation is performed through the activation function to generate the preliminary updated features of the target node at the next moment. The expression is as follows:

[0083]

[0084] represents the hidden state of node i at time t+1, is the neighbor set of node i, definition, is the learnable parameter matrix, is the activation function.

[0085] At the same time, the feature sequences of the target node at the current and historical time steps are input into the LSTM network, and its memory units are used to capture the fault propagation pattern in the time series. The expression is as follows:

[0086]

[0087] is the cell state sequence, is the hidden state sequence.

[0088] Finally, the updated features after spatial aggregation are weightedly fused with the time features extracted by LSTM. For example, a higher weight is given to the time features to reflect the causal temporal nature of fault propagation, thereby generating the latest multi-dimensional feature representation of the target node. The expression is as follows:

[0089]

[0090] is a learnable parameter used to balance the importance of spatiotemporal features.

[0091] This solution uses a dynamic spatial attention mechanism to adjust the association weights between nodes in real time. It also combines an LSTM network to mine deep temporal patterns, enabling node features to simultaneously integrate spatial dynamic associations with temporal causal evolution information. It dynamically adjusts model parameters based on fault severity, increasing focus on key areas.

[0092]

[0093] in, , represents the fault confidence of node i, is the adjustment coefficient, is the association weight before adjustment, is the adjusted association weight.

[0094] Through the above technical solution, the characterization capability of node features can be improved, so that the fault diagnosis model can more accurately capture abnormal propagation paths under dynamic topology, reduce the risk of misjudgment due to changes in network structure, and enhance the ability to extract multi-time scale fault features, thereby significantly improving the reliability of diagnosis results.

[0095] Furthermore, this embodiment also proposes to perform feature fusion processing on distribution network operation data of different modalities through a cross-modal attention mechanism to obtain modal fusion features, including: according to the distribution network operation data, feature encoding processing is performed through multiple preset modal encoders to obtain an electrical quantity modal matrix, a topological modal matrix and an environmental modal matrix respectively; according to the electrical quantity modal matrix, the topological modal matrix and the environmental modal matrix, the electrical quantity modal matrix is ​​used as the modal alignment reference, and the QKV feature is obtained through the preset QKV mapping calculation formula; according to the QKV feature, combined with the attention weight calculation formula, the attention weight is obtained, and then the modal fusion feature is obtained based on the sum of the attention weight and the electrical quantity modal matrix.

[0096] Among them, the modal encoder refers to a neural network module designed for different data modes, which can be implemented using a convolutional neural network or a fully connected layer to map heterogeneous data such as original electrical quantities, topological structures, and environmental parameters into a unified feature space. The modal encoder involved in this embodiment mainly has

[0097] Electrical encoder, input (time series electrical quantity), output electrical quantity modal matrix .

[0098]

[0099] Topological encoder, input DGAT (Dynamic Graph Attention Network, dynamic graph attention network) generated dynamic graph (adjacency matrix ), output topological mode matrix .

[0100]

[0101] in, It is the geographical data of each node in the distribution network.

[0102] Environment encoder, input environment image features , meteorological characteristics Output environmental modal matrix .

[0103]

[0104] The QKV (Query-Key-Value) mapping formula uses the electrical quantity modal matrix as a reference and generates mathematical expressions for query, key, and value feature vectors through linear transformation. Specifically, a trainable weight matrix can be used to project the input data to achieve cross-modal feature alignment. The attention weight formula calculates the similarity between query features and key features to generate the correlation strength coefficient between different modalities. Specifically, a dot-product attention mechanism can be used to dynamically allocate the contribution of each modality to fault diagnosis.

[0105] The QKV mapping calculation formula mentioned in this embodiment is specifically expressed as follows:

[0106]

[0107] Where, is the electrical quantity modal matrix, is the combined matrix of the topological mode matrix and the environmental mode matrix, 、 、 are the weight matrices of Q features, K features, and V features respectively.

[0108] Specifically, the electrical quantity modal matrix contains the time feature sequences of real-time measurement data such as voltage and current; the topological modal matrix reflects the dynamic connectivity between network nodes; and the environmental modal matrix integrates external influencing factors such as temperature and humidity. After performing QKV mapping based on the electrical quantity modalities, attention weights reflecting cross-modal correlation are generated by calculating the degree of match between the key features corresponding to the topological and environmental modalities and the benchmark query features. These weights are used to adjust the fusion ratio of different modal features. For example, in thunderstorms, the humidity feature of the environmental modal may be given a higher weight. Ultimately, the weighted multimodal features are superimposed with the benchmark electrical quantity features to form a fused feature vector containing cross-modal correlation information, providing more complete input information for the downstream fault classifier. This solution introduces a cross-modal attention mechanism to establish a dynamic correlation model between modalities within the feature space. This allows external interference such as changing weather conditions and topological reconfiguration events to be quantified and evaluated and incorporated into diagnostic decisions, effectively resolving the feature conflict problem caused by static fusion rules. Through this technical solution, this embodiment achieves efficient collaboration of multimodal data at the feature level, overcoming the fault misdiagnosis problem caused by the single data dimension of traditional methods. For example, in a scenario where distributed power sources are frequently switched on and off, by dynamically adjusting the correlation weights between the topology mode and the electrical quantity mode, it is possible to accurately distinguish between normal fluctuations caused by topology changes and real fault signals, reduce the probability of false alarms caused by network reconstruction, and improve diagnostic robustness under complex working conditions.

[0109] Furthermore, the solution of this embodiment may also include the following steps:

[0110] Based on the preset distribution network multimodal data samples and combined with the loss function based on structural causal constraints, the multimodal large model is trained to determine the convergence degree of the multimodal large model based on the output of the loss function. When the convergence degree reaches the preset convergence threshold or the number of training iterations reaches the preset threshold, the multimodal large model is output.

[0111] Among them, the loss function of structural causal constraints refers to the introduction of prior knowledge of the propagation logic of power grid faults to constrain the causal rationality of the model output. Specifically, it can be achieved by combining causal inference theory with regularization loss terms. For example, a causal graph structural constraint term is added to the loss function to limit the update direction of model parameters. Multimodal data samples refer to distribution network operation data sets that contain multi-dimensional information such as electrical quantities, topology, and environment. Specifically, historical fault records, real-time monitoring data, and meteorological environment data can be combined to construct samples. For example, voltage, current, and power data are aligned with temperature, humidity, and wind speed data by timestamp. Among them, the convergence threshold refers to the error threshold for determining whether to terminate the iteration during model training. Specifically, the fault diagnosis accuracy or loss value change rate on the validation set can be used as the judgment basis. For example, when the accuracy of the validation set fluctuates by less than 1% for three consecutive iterations, it is considered to have converged.

[0112] Specifically, the training process first extracts batches of data from multimodal data samples and inputs them into the multimodal large model. After the model outputs the fault diagnosis results, it uses a loss function with structural causal constraints to calculate the difference between the predicted results and the true labels. The loss function consists of a data fitting term and a causal constraint term. The former measures the prediction error, while the latter constructs a causal graph based on the propagation path of the power grid fault to constrain the distribution of model feature weights. For example, the causal constraint term can use a graph regularization method based on the adjacency matrix to ensure that the strength of fault correlation between nodes conforms to actual physical laws. During the training process, the output of the loss function is used for backpropagation to update the model parameters. When the performance indicator of the model on the validation set reaches the preset threshold or the number of iterations reaches the upper limit, the training terminates and the optimized multimodal large model is output.

[0113] This solution introduces structural causal constraints and encodes prior knowledge such as grid topology connection relationships and fault propagation paths into the loss function. This allows the model training process to not only focus on prediction accuracy, but also force the learning of feature associations that conform to actual causal logic, thereby improving the rationality and robustness of the diagnostic results.

[0114] Furthermore, this embodiment may further include, after step 101 and before step 102:

[0115] Preprocess the data, including data cleaning, normalization and denoising.

[0116] Data cleaning refers to correcting or eliminating abnormal or missing values ​​in the distribution network operation data. Specifically, it can be achieved by using interpolation to fill missing data segments, or by identifying and filtering abnormal fluctuation data based on sliding window statistical thresholds. This step can eliminate the interference of sensor acquisition errors on subsequent model inputs.

[0117] Normalization refers to converting electrical measurement data of different dimensions into a unified numerical range. This can be achieved by using the Z-score normalization method to map voltage and current characteristics to a distribution space with a mean of 0 and a variance of 1. This step eliminates magnitude differences between multimodal data to improve model convergence efficiency. Denoising refers to suppressing high-frequency interference signals in distribution network operation data. This can be achieved by using a wavelet transform to perform multi-scale decomposition of the current waveform and then remove high-frequency noise components. This step helps preserve the effective frequency band information of the fault characteristics.

[0118] Specifically, distribution network operation data is susceptible to sensor drift, communication interference, and other factors during the data collection process, resulting in noise, dimensional discrepancies, and incompleteness. By cleaning the raw data, missing values ​​caused by communication interruptions can be repaired and abnormal mutation points caused by equipment failures can be eliminated. Normalization converts electrical measurement data of different dimensions, such as voltage and power, into standardized feature vectors, facilitating the subsequent collaborative training of dynamic graph attention networks and multimodal large models. Wavelet denoising is used to perform time-frequency decomposition of the current waveform, filtering out high-frequency noise interference while retaining the low-frequency components of fault characteristics, thereby improving the model's ability to identify weak fault signals.

[0119] Through the above technical solution, the present application can effectively suppress the model overfitting problem caused by noise or missing training data, enhance the generalization ability of large multimodal models in complex dynamic scenarios, make the fault diagnosis results conform to the statistical laws of the data, and meet the physical operation constraints of the power grid, and significantly reduce the probability of misjudgment and missed faults in an environment with high penetration of new energy.

[0120] Furthermore, knowledge distillation and lightweight deployment can be used for large multimodal models to accelerate fault diagnosis and improve the stability of distribution network operation. The loss function is set as:

[0121]

[0122] Where, are the hidden layer feature representations of the teacher model and the student model respectively, λ is the weight parameter, and KL divergence is used to measure the output probability distribution P of the teacher model and the student model.

[0123] Through the above distillation design, the student model can achieve orders of magnitude efficiency improvement with minimal loss of accuracy, providing key technical support for this method.

[0124] The above is an embodiment of a distribution network fault diagnosis method based on a large model provided by the present application. The following is a detailed description of an embodiment of a distribution network fault diagnosis device based on a large model provided by the present application.

[0125] See also Figure 2 This embodiment provides a large-scale model-based distribution network fault diagnosis device, including:

[0126] The operation data acquisition unit 201 is used to acquire the distribution network operation data, wherein the distribution network operation data includes: topology data, electrical quantity data and environmental data;

[0127] A dynamic graph network construction unit 202 is configured to construct a dynamic graph attention network model based on topological data and electrical quantity data in the distribution network operation data, wherein the dynamic graph attention network model is configured to reflect the real-time dynamic topological change relationship of the distribution network;

[0128] The distribution network fault diagnosis unit 203 is used to perform feature fusion processing on the distribution network operation data of different modes based on a preset multimodal large model through a cross-modal attention mechanism to obtain modal fusion features, so as to obtain the fault diagnosis results of the distribution network based on the modal fusion features.

[0129] like Figure 3 As shown, this embodiment also provides a distribution network fault diagnosis terminal based on a large model, comprising: a memory 33 and a processor 31, wherein the memory 33 and the processor 31 can be connected via a communication bus 34;

[0130] The memory 33 is used to store program codes, and the program codes are used to implement a distribution network fault diagnosis method based on a large model as provided in the above embodiment;

[0131] The processor 31 is used to read and execute program codes.

[0132] Memory refers to a hardware device with data storage capabilities, specifically implemented as a solid-state drive or flash memory chip, used to store program code containing dynamic graph attention network construction logic, multimodal feature fusion algorithms, and fault diagnosis rules. Processor refers to a computing unit with data processing capabilities, specifically implemented as a multi-core central processing chip or graphics processing chip, used to parse program code and perform real-time topology dynamic modeling, cross-modal data alignment, and fault reasoning operations. Program code refers to a software module containing a sequence of computer instructions, specifically implemented in Python or C++, used to convert distribution network operation data into dynamic graph structure features and achieve collaborative analysis of electrical quantity, topology, and environmental data through a cross-modal attention mechanism.

[0133] Specifically, when the terminal is running, after the program code pre-installed in the memory is loaded by the processor, it first obtains real-time topological data, electrical measurement information, and meteorological and environmental monitoring data from the external data acquisition system, and performs data cleaning and normalization operations. Subsequently, the processor constructs a dynamic graph attention network model based on the topological connection relationship and the time series characteristics of the electrical quantity. It captures the dynamic coupling relationship between nodes through the spatial attention mechanism and extracts the evolution law of the time dimension features in combination with the LSTM network. In the multimodal fusion stage, the processor inputs the encoded features of different modalities into the cross-modal attention layer, aligns the topological and environmental features based on the electrical quantity data, calculates the correlation weights between modalities through QKV mapping, and generates a fused global feature vector. Finally, the processor performs fault type classification and location calculation based on the fused features, and outputs the diagnostic results to the human-computer interaction interface or control execution system.

[0134] The present application also provides a computer-readable storage medium, in which program code is stored. The program code is used to be read and executed by a processor to implement a distribution network fault diagnosis method based on a large model as provided in the above embodiment.

[0135] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the terminals, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0136] In the several embodiments provided in this application, it should be understood that the disclosed terminals, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0137] The terms "first," "second," "third," "fourth," and the like (if any) in the specification of the present application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the present application described herein, for example, can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or apparatus.

[0138] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0139] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0140] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0141] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0142] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A distribution network fault diagnosis method based on a large model, characterized in that: include: Acquiring distribution network operation data, wherein the distribution network operation data includes: topology data, electrical quantity data, and environmental data; Constructing a dynamic graph attention network model based on the topological data and electrical quantity data in the distribution network operation data, wherein the dynamic graph attention network model is used to reflect the real-time dynamic change relationship of the topology of the distribution network; According to the distribution network operation data, feature encoding processing is performed through multiple preset modal encoders to obtain the electrical quantity modal matrix, topological modal matrix and environmental modal matrix respectively. The generation formula of the topological modal matrix is: ; Where, is the topological modal matrix, the DGAT is the dynamic graph attention network model, is the geographical data of each node in the distribution network, A dynamic adjacency matrix in the dynamic graph attention network model; According to the electrical quantity modal matrix, the topological modal matrix and the environmental modal matrix, the electrical quantity modal matrix is ​​used as a modal alignment reference, and a preset QKV mapping calculation formula is used to obtain a QKV feature; According to the QKV feature, combined with the attention weight calculation formula, the attention weight is obtained, and then based on the sum of the attention weight and the electrical quantity modal matrix, the modal fusion feature is obtained, so as to obtain the fault diagnosis result of the distribution network based on the modal fusion feature.

2. A distribution network fault diagnosis method based on a large model according to claim 1, characterized in that: The constructing of a dynamic graph attention network model according to the distribution network operation data includes: Constructing a node characteristic matrix based on the distribution network operation data, wherein the node characteristic matrix is ​​used to reflect the node characteristics of each distribution network node at different time steps; Constructing a dynamic adjacency matrix based on the node characteristic matrix, wherein the dynamic adjacency matrix is ​​used to reflect the electrical coupling strength between different distribution network nodes at different times; According to the dynamic adjacency matrix, a dynamic graph attention network model is constructed.

3. A distribution network fault diagnosis method based on a large model according to claim 2, characterized in that: Also includes: Based on the selected target node, the attention coefficient between the target node and the neighboring nodes at the current time step is calculated using a preset spatial attention coefficient calculation formula; Through the activation function, the node features of each neighbor node and the attention coefficient are aggregated to obtain the updated node features of the target node in the next time step; Summarize the node features of the target node up to the current time step, perform time-dependent feature extraction through the LSTM network, and obtain the time feature sequence of the target node; The latest node feature of the target node is obtained according to the weighted sum of the updated node feature and the time feature sequence.

4. A distribution network fault diagnosis method based on a large model according to claim 1, characterized in that: The QKV mapping calculation formula is specifically: ; Where, is the electrical quantity modal matrix, is the combined matrix of the topological modal matrix and the environmental modal matrix, 、 、 are the weight matrices of Q features, K features, and V features respectively.

5. A distribution network fault diagnosis method based on a large model according to claim 1, characterized in that: Also includes: Based on the preset distribution network multimodal data samples and combined with the loss function based on structural causal constraints, the multimodal large model is trained to determine the convergence degree of the multimodal large model based on the output of the loss function. When the convergence degree reaches a preset convergence threshold or the number of training iterations reaches a preset threshold, the multimodal large model is output.

6. A distribution network fault diagnosis method based on a large model according to claim 1, characterized in that: After obtaining the distribution network operation data, the method further includes: The distribution network operation data is preprocessed, wherein the preprocessing includes: data cleaning, normalization and denoising.

7. A distribution network fault diagnosis device based on a large model, characterized in that: include: An operation data acquisition unit, configured to acquire distribution network operation data, wherein the distribution network operation data includes topology data, electrical quantity data, and environmental data; A dynamic graph network construction unit, configured to construct a dynamic graph attention network model based on topological data and electrical quantity data in the distribution network operation data, wherein the dynamic graph attention network model is configured to reflect the real-time dynamic topological change relationship of the distribution network; The distribution network fault diagnosis unit is used to perform feature fusion processing on distribution network operation data of different modalities based on a preset multimodal large model through a cross-modal attention mechanism to obtain modal fusion features, and obtain distribution network fault diagnosis results based on the modal fusion features; Among them, the preset multimodal large model is based on the cross-modal attention mechanism to perform feature fusion processing on the distribution network operation data of different modalities, and the modal fusion features obtained include: According to the distribution network operation data, feature encoding processing is performed through multiple preset modal encoders to obtain the electrical quantity modal matrix, topological modal matrix and environmental modal matrix respectively. The generation formula of the topological modal matrix is: ; Where, is the topological modal matrix, the DGAT is the dynamic graph attention network model, is the geographical data of each node in the distribution network, A dynamic adjacency matrix in the dynamic graph attention network model; According to the electrical quantity modal matrix, the topological modal matrix and the environmental modal matrix, the electrical quantity modal matrix is ​​used as a modal alignment reference, and a preset QKV mapping calculation formula is used to obtain a QKV feature; According to the QKV feature, combined with the attention weight calculation formula, the attention weight is obtained, and then based on the sum of the attention weight and the electrical quantity modal matrix, the modal fusion feature is obtained.

8. A distribution network fault diagnosis terminal based on a large model, characterized in that: include: memory and processor; The memory is used to store program code, and the program code is used to implement the distribution network fault diagnosis method based on a large model according to any one of claims 1 to 6; The processor is configured to read and execute the program code.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores program code, and the program code is used to be read and executed by a processor to implement a distribution network fault diagnosis method based on a large model as described in any one of claims 1 to 6.