A power distribution network weak link deduction method fusing meta-learning and spatiotemporal graph attention network

By integrating meta-learning with spatiotemporal graph attention networks, the challenges of power distribution network simulation under changing operating conditions and data scarcity were addressed. This enabled rapid adaptation and high-precision identification of weak links, improving the accuracy and physical consistency of power distribution network state simulation.

CN122178443APending Publication Date: 2026-06-09HOHAI UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HOHAI UNIV
Filing Date
2026-03-11
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing methods for predicting the state of distribution networks are unable to quickly adapt to changes in operating conditions, lack effective processing capabilities for sparse measurement scenarios, and the physical consistency of the prediction results is difficult to guarantee.

Method used

We adopt a method that integrates meta-learning and spatiotemporal graph attention network. By constructing a spatial graph attention module, a temporal evolution module, and a temporal attention module, and combining the adjacency matrix and historical running data, we generate spatial and temporal masks to handle the data missing problem. We then use the two-layer optimization strategy of meta-learning to train the network and establish the MSE loss function and the physical consistency constraint loss function to achieve cross-scene generalization capability.

Benefits of technology

It improves the accuracy and rapid adaptability of the simulation of weak links in the distribution network, and enhances the applicability in sparse measurement scenarios and the physical consistency of the simulation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122178443A_ABST
    Figure CN122178443A_ABST
Patent Text Reader

Abstract

The application discloses a kind of weak link deduction methods of distribution network fusing meta-learning and space-time graph attention network, comprising: constructing adjacency matrix;Obtain historical operation data and divide into input-output sample pair;Sample pair is divided into support set and query set;Generation space mask and time mask;Build space-time graph attention network;Establish total loss function;Train space-time graph attention network;The state deduction sequence is obtained by inputting historical observation sequence into the space-time graph attention network after training;Calculate the deduction result of active and reactive power, determine weak state;Evaluation on the deduction result and weak state determination result;Determine weight;Calculate the comprehensive weak score of distribution network node and line and sort, identify weak link in distribution network.The application improves the rapid adaptive capacity under the condition of insufficient data, enhances the deep interaction modeling capability of spatial topology and time evolution, solves the problem that existing methods are difficult to guarantee the physical feasibility of deduction result under the condition of data deficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power system automation technology, specifically relating to a method for inferring weak links in distribution networks by integrating meta-learning and spatiotemporal graph attention networks. Background Technology

[0002] With the accelerated global transition to low-carbon energy and the construction of new power systems, renewable energy sources such as distributed photovoltaics and energy storage are being rapidly integrated into distribution networks. Compared to the well-established measurement system of transmission networks, distribution networks are constrained by investment costs, resulting in a lower density of measurement terminals and a lack of direct measurement methods for many intermediate nodes, making it difficult to comprehensively perceive their operational status.

[0003] Traditional power distribution networks exhibit unidirectional power flow and relatively stable load characteristics. However, with the increasing penetration of distributed energy resources, the strong randomness and intermittency of source-side output, coupled with the time-varying characteristics of user-side loads, result in complex bidirectional power flow characteristics in distribution networks, leading to significant differences in operating conditions under different weather conditions and time periods. Traditional methods based on fixed models or empirical rules are ill-suited to this dynamic operating environment, resulting in decreased accuracy in state estimation and increased risk of misjudging weak points.

[0004] In recent years, deep learning methods have been widely used in the field of distribution network state prediction due to their powerful nonlinear fitting capabilities, enabling the prediction of future states by mining implicit patterns in historical data. However, deep learning models typically require a large amount of labeled data to support the training process, and the trained models are strongly correlated with specific operating conditions. When operating conditions change significantly, such as seasonal changes leading to changes in photovoltaic power output patterns or extreme weather causing sudden changes in load characteristics, the prediction performance of the trained models often declines significantly, requiring the accumulation of a large amount of new operating condition data and retraining the model. This high dependence on data volume and sensitivity to changes in operating conditions pose challenges to the accurate prediction of distribution network states and the effective identification of weak links.

[0005] Existing research primarily employs deep learning models such as Long Short-Term Memory (LSTM) networks and Convolutional Neural Networks (CNNs) for state inference, or uses Graph Convolutional Networks (GCNs) and Graph Attention Networks (GANs) to model the spatial topology of power distribution networks. Some studies also use Physical Information Neural Networks (PINs) to embed power flow equations into the training process to enhance physical interpretability. Regarding model training, current methods are mainly based on large-sample supervised learning paradigms, requiring the collection of extensive historical operational data for model parameter optimization.

[0006] The existing technology has the following drawbacks:

[0007] 1. The operating conditions of power distribution networks vary significantly with seasonal changes and extreme weather, while the historical data accumulation period under new operating conditions is relatively long. Existing deep learning methods are difficult to adapt to new operating conditions quickly, which poses a challenge to the accurate prediction of power distribution networks.

[0008] 2. Existing physical information neural network methods introduce the power flow equation as a regularization term of the loss function into the training process. However, this single-layer optimization method is difficult to give full play to the guiding role of physical priors under the condition of scarce data, and the physical consistency of the inference results is difficult to guarantee.

[0009] 3. Due to economic constraints in measurement configuration, the measurement coverage of distribution networks is generally insufficient, resulting in spatial missing node measurements and temporal data interruptions. Existing methods have high requirements for data integrity and lack effective processing capabilities for heterogeneous missing data, thus limiting the inference accuracy in sparse measurement scenarios. Summary of the Invention

[0010] Purpose of the invention: The purpose of this invention is to provide a method for inferring weak links in power distribution networks that integrates meta-learning and spatiotemporal graph attention networks. This method can improve the ability to adapt quickly in scenarios with insufficient data, enhance the deep interactive modeling capability of spatial topology and temporal evolution, and solve the problem that existing methods cannot guarantee the physical feasibility of inference results under conditions of scarce data.

[0011] Technical solution: The present invention provides a method for inferring weak links in power distribution networks by integrating meta-learning and spatiotemporal graph attention networks, comprising:

[0012] In a distribution network, nodes are interconnected through branches to form a distribution network topology. Distribution network topology data is obtained through a distribution network dispatch automation system, and an adjacency matrix is ​​constructed using this data. Branch connection relationships are then extracted from the adjacency matrix to form an edge list.

[0013] Historical operating data of the distribution network is collected from the distribution network energy management system, and the historical operating data is divided into multiple input-output sample pairs; the multiple input-output sample pairs are further divided into support sets and query sets;

[0014] For missing data in historical operation data, a spatial mask and a temporal mask are generated. The spatial mask is used to mask the loss measurement nodes, and the temporal mask is used to mark the missing time periods.

[0015] Based on the distribution network topology and multiple input-output sample pairs, a spatiotemporal graph attention network is constructed using an adjacency matrix. The spatiotemporal graph attention network includes a spatial graph attention module, a temporal evolution module, and a temporal attention module. The spatial graph attention module is used to capture the spatial topological relationships between distribution network nodes and to handle the problem of missing node measurements using spatial masks. The temporal attention module is used to adaptively aggregate historical temporal features and to handle the problem of data interruption using temporal masks.

[0016] By combining the edge list, we establish the MSE loss function, the active physical consistency constraint loss function, the reactive physical consistency loss function, and the gradient matching loss function, thus forming the total loss function.

[0017] By combining the support set, query set, and total loss function, a meta-learning two-layer optimization strategy is adopted to train the spatiotemporal graph attention network. The trained spatiotemporal graph attention network can adapt to different power distribution network scenarios and has cross-scenario generalization ability. The historical observation sequence of the new scenario is input into the trained spatiotemporal graph attention network to obtain the state inference sequence for future time periods.

[0018] Based on the state projection sequence for future time periods, the projection results of active power and reactive power are obtained, and the weak state is determined based on the projection results; the projection results and the weak state determination results are evaluated and processed according to the multi-index evaluation method; the entropy weight method is used to determine the weight of the processing result based on the information content of each index data itself.

[0019] The comprehensive weakness score of distribution network nodes and lines is calculated based on the assessment results and weights. The scores of distribution network nodes and lines are sorted separately, and the weak links in the distribution network are identified based on the sorting results.

[0020] Furthermore, the construction process of the spatial graph attention module is as follows:

[0021] Extracting the input sequence Each node At any time The electrical quantity characteristics are mapped to a high-dimensional hidden space through linear transformation to obtain the initial hidden feature vector.

[0022] By combining the initial hidden feature vector and the spatial mask, the correlation strength between neighboring nodes is adaptively learned through an attention mechanism to obtain the original attention coefficients;

[0023] The original attention coefficients were normalized.

[0024] Nodes are evaluated based on their normalized attention coefficients. The set of neighboring nodes Weighted summation is performed to achieve adaptive feature fusion of spatial information, thereby constructing a spatial graph attention module.

[0025] Furthermore, the extraction of the input sequence Each node At any time The electrical quantity characteristics are mapped to a high-dimensional hidden space through a linear transformation to obtain an initial hidden feature vector, including:

[0026] Extracting the input sequence Each node At any time The electrical quantity characteristics are mapped to a high-dimensional hidden space through linear transformation. The mathematical expression for the node feature transformation is as follows:

[0027] ;

[0028] in, For nodes At any moment The initial hidden feature vector after linear transformation; The input feature transformation matrix; For nodes in the input sequence X The feature vector, containing nodes Voltage amplitude, voltage phase angle, active power, reactive power; This is the bias vector.

[0029] Furthermore, the expression for the original attention coefficient is as follows:

[0030] ;

[0031] in, For a moment Next Layer nodes With nodes The original attention coefficients between them; It is a linear rectified activation function with leakage; For the first Layer-learnable attention vectors; For the first Layer feature transformation matrix; and They are time points Next Layer nodes and nodes eigenvectors; This is a vector concatenation operation; This is for transposition; during this calculation process, when in the first level of calculation, i.e. When the value equals 1, the initial hidden feature vector is used as the input data in the above formula;

[0032] The normalization process for the original attention coefficients includes:

[0033] The softmax function is used to convert the original attention coefficients into a probability distribution form, ensuring that the sum of the attention weights of all adjacent nodes is 1, which facilitates subsequent weighted aggregation. The mathematical expression for the normalized weights is as follows:

[0034]

[0035] in, It is a natural exponential function; These are the normalized attention weights; For a moment Next Layer nodes With nodes The original attention coefficients between them; For nodes The set of neighboring nodes, and the node The adjacency matrix of neighboring nodes with physical connections is determined.

[0036] Furthermore, the node is evaluated based on the normalized attention coefficient. The set of neighboring nodes Weighted summation is performed to achieve adaptive feature fusion of spatial information, thereby constructing a spatial graph attention module, including:

[0037] Nodes are assigned attention weights based on the normalized values. The set of neighboring nodes We perform weighted summation to achieve adaptive feature fusion of spatial information and update the feature representation of the current node. The mathematical expression for adaptive feature fusion is as follows:

[0038] ;

[0039] in, For nodes In the The d-dimensional feature vector is updated after aggregating neighbor information at each layer. For ELU activation function; For the first Layer feature transformation matrix; These are the normalized attention weights; For a moment Next Layer nodes The feature vectors; after processing by the spatial graph attention module, the output of the last layer is... Define as a node At any moment Spatial feature vectors ; the current moment The spatial feature vectors of all nodes are combined to form the global spatial feature vector. This serves as the input data for the timing evolution module.

[0040] Furthermore, the construction process of the time-series evolution module is as follows:

[0041] The time-series evolution module uses gated loop units to capture the dynamic evolution of the distribution network state over time; the time-series evolution module receives global spatial feature vectors in time step order. By controlling the degree of forgetting of historical information through the reset gate and controlling the proportion of new information incorporated through the update gate, effective modeling of the temporal dependencies of distribution network states can be achieved. The mathematical expressions for the reset gate, update gate, candidate hidden state, and update state are as follows:

[0042] ;

[0043] ;

[0044] ;

[0045] ;

[0046] in, Reset the gate vector in d dimensions; Update the gate vector for d dimensions; Let d be a candidate state vector, and the candidate hidden states are obtained through... To indicate; for A d-dimensional state vector that integrates historical and current information is used to update the state. To indicate; Let be the d-dimensional state vector of the previous time step; These are global spatial feature vectors; , , These are the d×2d weight matrices for the reset gate, update gate, and candidate states, respectively. , , The d-dimensional bias vectors corresponding to the reset gate, update gate, and candidate state; sigmoid is the activation function; tanh is the hyperbolic tangent activation function; This is element-wise multiplication.

[0047] Furthermore, the construction process of the time attention module is as follows:

[0048] The temporal attention module takes the state vector output by the temporal evolution module as input and dynamically evaluates the importance of historical moments to the current inference result through a temporal attention mechanism. By learning the state weights of different historical moments, the temporal attention module can adaptively aggregate historical temporal features and utilize temporal masks. To address data interruption issues and shield the impact of missing moments on feature aggregation, a context vector containing key historical information is generated.

[0049] The mathematical expressions for the original attention coefficients, normalized attention weights, and context vectors are as follows:

[0050] ;

[0051] ;

[0052] ;

[0053] in, For a moment The original attention coefficient; For a moment The original attention coefficient; This is the transpose of the learnable d-dimensional attention parameter vector; It is a d×d projection matrix, used to perform linear transformations on the states at historical moments, enabling the time attention module to extract temporal features from different perspectives; is a d×d projection matrix used for linear transformation of the final state; for The d-dimensional state vector at time t; For the final time step The d-dimensional state vector; T is the total length of the time series; This is the bias vector for the temporal attention layer; After normalization Temporal attention weight at any given moment; For time mask; It is a d-dimensional context vector, obtained by weighting and summing the attention weights at each historical moment.

[0054] d-dimensional context vector The state deduction result is obtained by outputting the projection layer, and its mathematical expression is as follows:

[0055] ;

[0056] in, For the deduced state sequence; The projection matrix that maps d-dimensional features back to the 4-dimensional output space; The bias vector is used; the state deduction result includes the voltage amplitude. Voltage phase angle Active power and reactive power .

[0057] Furthermore, the establishment of the MSE loss function, the active physical consistency constraint loss function, the reactive physical consistency loss function, and the gradient matching loss function to form the total loss function includes:

[0058] Physical constraints are constructed based on the AC power flow equation. The mathematical expression of the AC power flow equation is as follows:

[0059] ;

[0060] ;

[0061] in, and Branch roads Calculated values ​​of active and reactive power; and They are nodes and nodes The estimated voltage amplitude; and They are nodes and nodes The derived value of the voltage phase angle; and They are nodes With nodes The conductance and susceptance parameters of the branches between them;

[0062] The mean squared error (MSE) is used to measure the deviation between the inferred values ​​and the true values ​​of the spatiotemporal graph attention network, and serves as the basic optimization objective for training the spatiotemporal graph attention network. The mathematical expression for the basic MSE loss is as follows:

[0063] ;

[0064] in, For MSE loss; The number of nodes; To deduce the step size; For nodes At any moment The projected value; For nodes At any moment The true value; The second norm of a vector;

[0065] For each branch contained in the edge list Combined with the corresponding line conductance and susceptance The parameters require that the power calculated from the derived voltage value using the power flow equation for each branch route be consistent with the actual measured value; the mathematical expression for the active physical consistency loss is as follows:

[0066] ;

[0067] in, Loss due to active physical consistency constraints; For the target sequence Middle Branch Road The true value of active power;

[0068] The mathematical expression for reactive physical consistency loss is as follows:

[0069] ;

[0070] in, This is the loss due to reactive physical consistency constraints; For the target sequence Middle Branch Road The true value of reactive power;

[0071] The mathematical expression for gradient matching loss is as follows:

[0072] ;

[0073] in, For gradient matching loss; and They are nodes At any moment The projected value and the actual value, and For nodes At any moment The projected value and the actual value;

[0074] By weighting and combining the above losses, a balance is achieved between inference accuracy and physical consistency. The mathematical expression of the total loss function is as follows:

[0075]

[0076] in, Total loss; Loss due to active physical consistency constraints Weighting coefficients; Loss due to reactive physical consistency constraints Weighting coefficients; Gradient matching loss The weighting coefficients.

[0077] Furthermore, by combining the support set, query set, and total loss function, a meta-learning two-layer optimization strategy is used to train the spatiotemporal graph attention network. The trained spatiotemporal graph attention network can adapt to different power distribution network scenarios and has cross-scenario generalization ability. The historical observation sequence of the new scenario is input into the trained spatiotemporal graph attention network to obtain the state projection sequence for future time periods, including:

[0078] Based on a preset probability distribution, the global parameter set Initial values ​​are assigned as the starting point for meta-learning training;

[0079] Using a support set and a query set, iterative training is conducted in two phases: an inner loop and an outer loop. The inner loop uses a small number of gradient update steps on the support set to adapt the spatiotemporal graph attention network to the data distribution characteristics of a specific power distribution network scenario. The outer loop optimizes the global initial parameters on the query set by evaluating the performance of the adapted spatiotemporal graph attention network on multiple tasks, enabling the network to generalize across scenarios. The mathematical expressions for the inner and outer loop parameter updates are as follows:

[0080] ;

[0081] ;

[0082] in, This is the global parameter set, including all parameters to be optimized in the spatiotemporal graph attention network. , ; For the first Individual learning tasks; In the mission Support set adapted update parameters; The learning rate for the inner loop; The learning rate for the outer loop; For the parameters of the spatiotemporal graph attention network The gradient operator; for Spatiotemporal graph attention network with parameters; For the task Loss on the support set; For the task The loss on the query set; M is the number of query tasks; after training, the historical observation sequence of the new scene will be used. Inputting the trained spatiotemporal graph attention network yields a sequence of state projections for future time periods. .

[0083] Furthermore, the comprehensive weakness score of distribution network nodes and lines is calculated based on the evaluation processing results and weights. The score results of distribution network nodes and lines are sorted respectively, and the weak links in the distribution network are identified based on the sorting results, including:

[0084] Based on the evaluation results and weights, the comprehensive weakness scores of distribution network nodes and lines are calculated, and the weak links are ranked according to the scores. The three indicators—over-limit frequency, normalized power amplitude, and power fluctuation rate—are weighted and aggregated to calculate the comprehensive weakness scores of branches and nodes. The mathematical expression for the comprehensive weakness score of branches is as follows:

[0085] ;

[0086] in, branch road The overall weakness score indicates that the branch is more severely weak; , , The weights for the three categories of indicators—over-limit frequency, normalized power amplitude, and power volatility—are determined by the entropy weight method.

[0087] The mathematical expression for the comprehensive weakness score of a node is as follows:

[0088] ;

[0089] in, For nodes Overall weakness score; , , The weights for the three categories of indicators—over-limit frequency, normalized power amplitude, and power volatility—are determined by the entropy weight method.

[0090] Branches and nodes are sorted in descending order based on comprehensive weakness scores to identify the weakest links in the distribution network.

[0091] Beneficial effects: Compared with the prior art, the significant technical effects of the present invention are as follows:

[0092] (1) The two-layer optimization strategy of meta-learning can quickly adapt to new operating conditions with a small number of samples. By capturing the spatial correlation and temporal evolution characteristics between nodes through the spatial graph attention mechanism and gated loop unit, the accuracy of weak link inference is improved.

[0093] (2) The present invention designs a total loss function containing the AC power flow equation. In the total loss function, the AC power flow equation is integrated into the meta-learning two-layer optimization process, which overcomes the limitation of insufficient physical constraint guidance in the traditional single-layer optimization method, thereby ensuring the physical consistency of the derivation results.

[0094] (3) A masked attention mechanism for heterogeneous missing data was designed. By using spatial mask to shield missing measurement nodes and temporal mask to mark missing time periods, the limitations of traditional methods in requiring high data integrity are overcome, thereby improving the applicability of spatiotemporal graph attention network in sparse measurement scenarios. Attached Figure Description

[0095] Figure 1 This is a schematic diagram of the process of the present invention. Detailed Implementation

[0096] The technical solution of the present invention will now be described in detail with reference to specific embodiments and accompanying drawings.

[0097] like Figure 1 As shown, the present invention provides a method for inferring weak links in power distribution networks by integrating meta-learning and spatiotemporal graph attention networks, comprising the following steps:

[0098] S1. In a distribution network, nodes are interconnected via branches to form a distribution network topology. Distribution network topology data is acquired through a distribution network dispatch automation system, and an adjacency matrix is ​​constructed using this data. Branch connection relationships are then extracted from the adjacency matrix to form an edge list. Details are as follows:

[0099] In a distribution network, nodes are interconnected via branches to form the distribution network topology. The spatial relationships between nodes form the basis for subsequent graph attention network modeling. Distribution network topology data is acquired through a distribution network dispatch automation system, and this data is used to construct an adjacency matrix. From the adjacency matrix Extract the branch connection relationships to form an edge list. Line conductance in distribution network topology data and susceptance These parameters provide the foundation for subsequent spatial feature modeling and physical constraint calculations. Represents the set of real numbers. For the number of nodes, express OK The space of real matrices in the column; For distribution network branch collection; Represents a node With nodes Branch connections between nodes, the adjacency matrix A describes the connection relationship between nodes, if node With nodes If there are branch connections, then =1, otherwise =0.

[0100] S2. Collect historical operating data of the distribution network from the distribution network energy management system, and divide the historical operating data into multiple input-output sample pairs; divide the multiple input-output sample pairs into support sets and query sets. Specifically:

[0101] Historical operating data of the distribution network, including node voltage amplitude, are collected from the distribution network energy management system. Voltage phase angle Branch active power and reactive power These electrical quantities are represented using per-unit (pu) values, which are dimensionless values ​​obtained by dividing the electrical quantity by the corresponding base value, facilitating unified calculations across distribution networks of different voltage levels. These data are arranged chronologically, forming a complete historical operational record. For time-series analysis, the continuous historical data needs to be divided into input-output pairs. Assume the current time is... The task of a spatiotemporal graph attention network is to infer the state of the future based on historical data from the past. Historical data is divided into input sequences according to time windows. and deduced target sequence .in, The historical window length indicates how many historical time steps the input sequence contains; The step size indicates how many future time steps need to be calculated. X is the feature dimension; X is the input sequence, a three-dimensional tensor containing the sequence from time (…). ) at the time common The historical state data of each time step; Y is the target sequence to be inferred, which is also a three-dimensional tensor containing the future state of ΔT time steps from time (t+1) to time (t+ΔT), and is the output that the spatiotemporal graph attention network needs to infer; Let be the state vector of all N nodes at time t, and each node contains D features (voltage amplitude V, voltage phase angle). (Active power P, reactive power Q, i.e., D=4); After constructing the basic input-output sample pairs, to adapt to the subsequent two-layer optimization mechanism of meta-learning, these sample pairs need to be further divided into support sets and query sets. The division of support sets and query sets is a standard data organization form in meta-learning frameworks. The support set is used for inner loop parameter updates, helping the network quickly adapt to the current operating conditions; the query set is used for outer loop parameter optimization, evaluating the network's generalization performance. The specific division method is as follows: the dataset is divided into support sets... and query set ,in To support a set of samples, i.e., to support a set containing K input-output pairs ( , ); The number of samples in the query set, i.e., the number of items contained in the query set. Input-output pairs ( , ).

[0102] S3. For missing data in historical operational data, generate spatial and temporal masks. The spatial mask is used to mask loss measurement nodes, and the temporal mask is used to mark missing time periods; as detailed below:

[0103] Due to economic constraints in measurement configuration, some nodes in the distribution network lack measurements or experience data interruptions, necessitating the generation of masks to identify missing locations for subsequent processing. Based on the completeness of the data collected in step S2, spatial masks are generated for scenarios with missing data. Mark missing nodes and generate time masks. Mark missing time steps. 1 indicates valid data, 0 indicates missing data. Spatial mask. Data missing for identifying spatial dimensions, i.e., some nodes did not install measurement devices due to economic reasons, and these nodes have no data at all time steps. If node j has valid measurement data, then... =1, otherwise =0; time mask This is used to identify missing data in the time dimension, i.e., data interruption during certain time periods due to communication failures, equipment maintenance, or other reasons. If the time step... Normal data collection =1, otherwise =0. These masks will be used in the attention mechanism of subsequent steps to mask the impact of missing data on feature aggregation.

[0104] Step S3 is one of the innovations of this invention. Existing methods have high requirements for data integrity. This invention innovatively designs spatial masks and temporal masks to identify data missing in the node dimension and time dimension, respectively, providing a foundation for the subsequent mask attention mechanism.

[0105] S4. Based on the distribution network topology in step S1 and the multiple input-output sample pairs in step S2, and combined with the adjacency matrix in step S1, a spatiotemporal graph attention network is constructed. The spatiotemporal graph attention network includes a spatial graph attention module, a temporal evolution module, and a time attention module. The spatial graph attention module is used to capture the spatial topological associations between distribution network nodes and to use spatial masks to handle the problem of missing node measurements. The time attention module is used to adaptively aggregate historical temporal features and to use time masks to handle the problem of data interruption.

[0106] S4.1 Construct the spatial graph attention module. The specific construction process is as follows:

[0107] S4.1.1 Extracting the Input Sequence Each node At any time The electrical quantity characteristics are mapped to a high-dimensional hidden space through a linear transformation to obtain the initial hidden feature vector; specifically as follows:

[0108] The spatial graph attention module is used to capture the spatial topological relationships between distribution network nodes and to handle the problem of missing node measurements using spatial masks. First, the input sequence is extracted. Each node At any time The electrical quantity characteristics (including voltage amplitude, phase angle, active power, and reactive power) are mapped to a high-dimensional hidden space through linear transformation, enabling the spatial graph attention module to learn richer node representations. The mathematical expression for the node feature transformation is as follows:

[0109]

[0110] in, For nodes At any moment The initial hidden feature vector after linear transformation is a d-dimensional column vector, where d is the dimension of the hidden layer, and it serves as the input to each subsequent layer of the neural network. The input feature transformation matrix is ​​a d-row, 4-column matrix used to map the 4-dimensional original features to the d-dimensional hidden space. For nodes in the input sequence X The feature vector is a 4-dimensional column vector containing nodes. The four values ​​are voltage amplitude, voltage phase angle, active power, and reactive power; The bias vector is a d-dimensional column vector used to adjust the mapped feature values. The initial hidden feature vector (i.e., ...) is obtained through formula (1). This serves as the input data for subsequent spatial feature extraction. To delve deeper into spatial correlation features, the spatial graph attention module employs a multi-layer stacked structure.

[0111] S4.1.2. Combining the initial hidden feature vector and spatial mask, the correlation strength between adjacent nodes is adaptively learned through an attention mechanism to obtain the original attention coefficients; specifically as follows:

[0112] By adaptively learning the correlation strength between neighboring nodes through an attention mechanism, the spatial graph attention module can focus on the neighbor information that is most important for inferring the current node's state. The expression for the original attention coefficients is as follows:

[0113]

[0114] in, For a moment Next Layer nodes With nodes The original attention coefficients between nodes represent the nodes. For nodes The degree of importance; The activation function for a linear rectifier with leakage is expressed mathematically as follows: That is, when the input is positive, the output is directly output, and when the input is negative, the output is multiplied by a small coefficient of 0.01, thereby preserving negative value information and avoiding neuron deactivation; For the first The learnable attention vector of a layer is a 2D column vector, which is a parameter automatically learned by the spatial graph attention module through training and is used to calculate the association strength between nodes. For the first The layer feature transformation matrix is ​​a d-dimensional learnable parameter matrix used to perform linear transformations on the hidden features of nodes. and They are time points Next Layer nodes and nodes eigenvectors; This is a vector concatenation operation; For transpose; This is the spatial mask. During this calculation process, when in the first layer of calculation, i.e. When the value is equal to 1, the initial hidden feature vector (i.e. ) is used as the input data in the above formula.

[0115] S4.1.3. Normalize the original attention coefficients; the details are as follows:

[0116] The softmax function (its mathematical form is shown in formula (3)) is used to convert the original attention coefficients into a probability distribution form, ensuring that the sum of the attention weights of all adjacent nodes is 1, which facilitates subsequent weighted aggregation. The mathematical expression of the normalized weights is as follows:

[0117]

[0118] in, It is a natural exponential function; The attention weights are normalized and range from 0 to 1, representing time intervals. Next node From neighboring nodes The proportion of information obtained; For a moment Next Layer nodes With nodes The original attention coefficients between them; For nodes The set of neighboring nodes, and the node Neighboring nodes with physical connections are determined by the adjacency matrix in step S1.

[0119] S4.1.4, Apply the normalized attention coefficients to the nodes. The set of neighboring nodes Weighted summation is performed to achieve adaptive feature fusion of spatial information, thereby constructing a spatial graph attention module. The details are as follows:

[0120] Nodes are assigned attention weights based on the normalized values. The set of neighboring nodes We perform weighted summation to achieve adaptive feature fusion of spatial information and update the feature representation of the current node. The mathematical expression for adaptive feature fusion is as follows:

[0121]

[0122] in, For nodes In the The d-dimensional feature vector is updated after aggregating neighbor information at each layer. For the ELU activation function, when hour, ;when hour, This function remains linear when the input is positive, and smoothly transitions to the negative region through an exponential function when the input is negative. It can introduce nonlinear transformation capability and avoid the problem that the neuron output is always zero. For the first Layer feature transformation matrix; These are the normalized attention weights; For a moment Next Layer nodes The feature vectors; after processing by the spatial graph attention module, the output of the last layer is... Define as a node At any moment Spatial feature vectors ; the current moment The spatial feature vectors of all nodes are combined to form the global spatial feature vector. This serves as the input data for the timing evolution module.

[0123] S4.2 Construct the time-series evolution module. The construction process is as follows:

[0124] The time-series evolution module uses gated loop units to capture the dynamic evolution of the distribution network state over time; the time-series evolution module receives global spatial feature vectors in time step order. By controlling the degree of forgetting of historical information through the reset gate and controlling the proportion of new information incorporated through the update gate, effective modeling of the temporal dependencies of distribution network states can be achieved. The mathematical expressions for the reset gate, update gate, candidate hidden state, and update state are as follows:

[0125]

[0126]

[0127]

[0128]

[0129] in, The d-dimensional reset gate vector takes values ​​from 0 to 1; Update the gate vector for d dimensions, with values ​​ranging from 0 to 1; Let be a d-dimensional candidate state vector, representing a potential new state calculated solely based on the current input and historical information filtered by the reset gate. Candidate hidden states are obtained through... To indicate; for A d-dimensional state vector that integrates historical and current information is used to update the state. To indicate; Let be the d-dimensional state vector of the previous time step; These are global spatial feature vectors; , , These are the d×2d weight matrices for the reset gate, update gate, and candidate states, respectively. , , The d-dimensional bias vectors corresponding to the reset gate, update gate, and candidate state; The sigmoid activation function has the following mathematical expression: It can compress any real number to between 0 and 1, making it suitable for representing probability or gated signals; tanh is the hyperbolic tangent activation function, whose mathematical expression is: It can compress any real number to between -1 and 1, with the output centered at 0, making it suitable for representing eigenvalues; This is element-wise multiplication.

[0130] S4.3 Build the time attention module. The construction process is as follows:

[0131] The temporal attention module takes the state vector output by the temporal evolution module as input and dynamically evaluates the importance of historical moments to the current inference result through the temporal attention mechanism. By learning the state weights of different historical moments, the temporal attention module can adaptively aggregate historical temporal features and utilize the temporal mask generated in step S3. To address data interruption issues, the impact of missing moments on feature aggregation is masked, thereby generating context vectors containing key historical information.

[0132] The mathematical expressions for the original attention coefficients, normalized attention weights, and context vectors are as follows:

[0133]

[0134]

[0135]

[0136] in, For a moment The original attention coefficient; For a moment The original attention coefficient; This is the transpose of the learnable d-dimensional attention parameter vector; It is a d×d projection matrix, used to perform linear transformations on the states at historical moments, enabling the time attention module to extract temporal features from different perspectives; is a d×d projection matrix used for linear transformation of the final state; for The d-dimensional state vector at time t; For the final time step The d-dimensional state vector serves as a reference for attention calculation; T is the total length of the time series. This is the bias vector for the temporal attention layer; After normalization The temporal attention weight at each moment ranges from 0 to 1, and the sum of the weights of all historical moments is 1. For time mask; It is a d-dimensional context vector, obtained by weighting and summing the attention weights at each historical moment.

[0137] d-dimensional context vector The state deduction result is obtained by outputting the projection layer, and its mathematical expression is as follows:

[0138]

[0139] in, The deduced state sequence is a three-dimensional tensor; The projection matrix that maps d-dimensional features back to the 4-dimensional output space; This is the bias vector. The state derivation result includes the voltage magnitude. Voltage phase angle Active power and reactive power .

[0140] It should be noted that the spatiotemporal graph attention network constructed in step S4 establishes the overall mathematical framework for the distribution network state projection. All learnable parameters (i.e., the matrices and vectors used by each module) contained in the spatiotemporal graph attention network will be used as optimization objects in the subsequent step S6, and will be iteratively updated through meta-learning. After training is completed, the optimized parameters are used to process the input distribution network operation data through the network to output the final state projection result.

[0141] The innovation of this invention lies in: integrating the spatial mask and temporal mask generated in step S3 into the attention coefficient calculation process (formula (2) and formula (10)) to achieve adaptive masking of missing data and constitute a mask attention mechanism for heterogeneous missing data.

[0142] S5. Combining the edge list, establish the MSE loss function, the active physical consistency constraint loss function, the reactive physical consistency loss function, and the gradient matching loss function, thereby forming the total loss function; as detailed below:

[0143] To ensure that the derivation results conform to the physical laws of power systems, the power flow equation needs to be incorporated as a constraint into the training process of the spatiotemporal graph attention network. Physical constraints are constructed based on the AC power flow equation. The active power flow equation describes the physical relationship between the node voltages at both ends of a branch and the active power transmission, while the reactive power flow equation describes the physical relationship between the node voltages at both ends of a branch and the reactive power transmission. The spatiotemporal graph attention network derivation results conform to the basic physical laws of power systems. The mathematical expression of the power flow equation is as follows:

[0144]

[0145]

[0146] in, and Branch roads Calculated values ​​of active and reactive power; and They are nodes and nodes The estimated voltage amplitude; and They are nodes and nodes The derived value of the voltage phase angle; and They are nodes With nodes The conductance and susceptance parameters of the branches between them.

[0147] The mean squared error (MSE) is used to measure the deviation between the inferred values ​​and the true values ​​of the spatiotemporal graph attention network, and serves as the basic optimization objective for training the spatiotemporal graph attention network. The mathematical expression for the basic MSE loss is as follows:

[0148]

[0149] in, The number of nodes; The step size indicates how many future time steps need to be calculated. For MSE loss; For nodes At any moment The projected value; For nodes At any moment The true value; The L2 norm of a vector.

[0150] To enhance the physical plausibility of the deduction results, for each branch contained in the edge list... Combined with the corresponding line conductance and susceptance The parameters require that the power calculated from the derived voltage value using the power flow equation for each branch must be consistent with the actual measured value. The mathematical expression for the active physical consistency loss is as follows:

[0151]

[0152] in, Loss due to active physical consistency constraints; For the target sequence Middle Branch Road The true value of active power.

[0153] Similarly, it is required that the reactive power calculated from the derived voltage value matches the measured value. The mathematical expression for reactive power physical consistency loss is as follows:

[0154]

[0155] in, This is the loss due to reactive physical consistency constraints; For the target sequence Middle Branch Road The true value of reactive power.

[0156] Furthermore, the projected sequence is required to have the same temporal trend as the actual sequence, so that the spatiotemporal graph attention network can accurately capture the dynamic evolution of the distribution network state. The mathematical expression for the gradient matching loss is as follows:

[0157]

[0158] in, For gradient matching loss; and They are nodes At any moment The projected value and the actual value, and For nodes At any moment The projected value and the actual value.

[0159] By weighting and combining the above losses, a balance is achieved between inference accuracy and physical consistency. The mathematical expression of the total loss function is as follows:

[0160]

[0161] in, Total loss; Loss due to active physical consistency constraints Weighting coefficients; Loss due to reactive physical consistency constraints Weighting coefficients; Gradient matching loss The weighting coefficients are set to balance the contribution of different loss terms to the total loss.

[0162] It should be noted that the branch power flow equations of the distribution network constitute the core framework for the coupling of node voltage and power. Therefore, by constructing physical consistency constraints for active and reactive power at the branch level, it is possible to effectively ensure that the voltage and power states of all nodes in the network conform to physical laws. This avoids introducing node-level constraints and effectively reduces the optimization complexity of the spatiotemporal graph attention network.

[0163] In step S5, multiple physical constraint losses are combined and designed to lay the foundation for subsequent integration of meta-learning bilayer optimization.

[0164] S6. Combining the support set, query set, and total loss function, a meta-learning two-layer optimization strategy is used to train the spatiotemporal graph attention network. The trained spatiotemporal graph attention network can adapt to different power distribution network scenarios and has cross-scenario generalization ability. The historical observation sequence of the new scenario is input into the trained spatiotemporal graph attention network to obtain the state projection sequence for future time periods; as follows:

[0165] A meta-learning framework was used for training. To enable the spatiotemporal graph attention network to quickly adapt to new operating conditions using a small number of samples, a two-layer optimization strategy based on meta-learning was employed for training the network. The details are as follows:

[0166] First, the global parameter set is based on a preset probability distribution. Initial values ​​are assigned as the starting point for meta-learning training;

[0167] Subsequently, using the support set and query set constructed in step S2, iterative training is carried out through two stages: an inner loop and an outer loop. The inner loop uses a small number of gradient update steps on the support set to adapt the spatiotemporal graph attention network to the data distribution characteristics of a specific power distribution network scenario. The outer loop optimizes the global initial parameters on the query set by evaluating the performance of the adapted spatiotemporal graph attention network on multiple tasks, enabling the spatiotemporal graph attention network to have cross-scenario generalization capabilities. The mathematical expressions for the inner loop parameter update and the outer loop parameter update are as follows:

[0168]

[0169]

[0170] in, This is the global parameter set, including all parameters to be optimized in the spatiotemporal graph attention network. ; For the first Each learning task corresponds to a specific operating condition of the distribution network. In the mission Support set adapted update parameters; The learning rate for the inner loop; The learning rate for the outer loop; For the parameters of the spatiotemporal graph attention network The gradient operator; for Spatiotemporal graph attention network with parameters; For the task Loss on the support set; For the task The loss on the query set; M is the number of query tasks; the loss functions for both the support set and the query set are the total loss function that includes physical constraints in step S5. After training is complete, the historical observation sequence for the new scene will be used. Input the trained spatiotemporal graph attention network, and repeat step S4 to obtain the state projection sequence for future time periods. .

[0171] S7. Based on the state projection sequence for future time periods, the projection results of active power and reactive power are obtained, and the weak state is determined based on the projection results; the projection results and weak state determination results are evaluated and processed according to the multi-index evaluation method; the entropy weight method is used to determine the weight of the processing result based on the information content of each index data. Specifically:

[0172] The spatiotemporal graph attention network simulation results identify weak links in the distribution network, including two categories: weak branches and weak nodes. The simulation results include node information. At any moment The active and reactive power. The power limits for nodes and branches are determined based on the rated capacity of the distribution network lines and operating procedures. When the absolute value of the extrapolated active or reactive power exceeds the corresponding power limit, the branch or node is determined to be in a vulnerable state at that moment. The mathematical expressions for active and reactive power vulnerable states are:

[0173]

[0174]

[0175]

[0176]

[0177] in, For absolute value operations; and They are respectively The active and reactive weak states of the branch at any given moment; and They are respectively Time Branch The estimated values ​​of active and reactive power; and Branch roads The active power limit and reactive power limit; and They are respectively The active power weak state and reactive power weak state at each moment; and They are respectively Time Node The estimated values ​​of active and reactive power; and They are nodes The active power limit and reactive power limit.

[0178] To comprehensively characterize the features of weak links, an evaluation system is constructed that includes three types of indicators: over-limit frequency, normalized power amplitude, and power fluctuation rate. Over-limit frequency reflects the frequency of power over-limit occurrences within the simulation period. The mathematical expression for branch over-limit frequency is as follows:

[0179]

[0180]

[0181] in, branch road The active power over-limit frequency ranges from 0 to 1, with a larger value indicating more frequent over-limit occurrences. branch road Reactive power exceeding the limit frequency. Node exceeding the limit frequency. and The calculation method is similar (similar to formulas (22) and (23), just replace the branch parameters with node parameters).

[0182] The normalized power amplitude reflects the power level relative to the overall system load. The mathematical expression for the normalized active power amplitude of a branch is as follows:

[0183]

[0184] in, branch road The normalized active power amplitude, with a value ranging from 0 to 1; branch road exist The estimated value of active power at any given time; For branch set Any branch in; branch road exist The estimated active power value at any given time. The normalized reactive power amplitude. and node normalized power magnitude , The calculation method is the same.

[0185] Power volatility quantifies the degree of power change within a given period. Severe fluctuations indicate that the operating state of this component is unstable. The mathematical expression for the active power volatility of a branch is as follows:

[0186]

[0187] in, branch road The active power fluctuation rate; For the branch roads within the simulation period The maximum value of the active power amplitude; For the branch roads within the simulation period Minimum active power amplitude. Reactive power fluctuation rate. and node power volatility , The calculation method is the same.

[0188] To avoid interference from subjective factors, the entropy weight method is used to determine the weights based on the information content of each indicator's data. Let there be... One object to be evaluated and For each evaluation indicator, the indicator is first normalized to obtain the feature weight. The mathematical expression for the feature weight is as follows:

[0189]

[0190] in, For the first The first item under the indicator The feature weight of each object; For the first The first object The normalized value of the indicator.

[0191] Then, the information entropy of each indicator is calculated. The mathematical expression for information entropy is as follows:

[0192]

[0193] in, For the first The information entropy of the indicator ranges from 0 to 1. The natural logarithm operator is used to map entropy values ​​to... Interval.

[0194] Finally, the objective weights of each indicator are calculated based on information entropy. The mathematical expression for the weights is as follows:

[0195]

[0196] in, For the first The objective weight of each indicator. The lower the information entropy, the greater the indicator's discriminative power, and the higher the weight assigned to it.

[0197] S8. Calculate the comprehensive weakness score for distribution network nodes and lines based on the assessment results and weights. Sort the scores for distribution network nodes and lines separately, and identify weak links in the distribution network based on the sorting results. Details are as follows:

[0198] Based on the evaluation results and weights obtained in step S7, the comprehensive weakness scores of distribution network nodes and lines are calculated, and the weak links are ranked according to the scores to provide a decision-making basis for distribution network operation optimization. The three indicators—over-limit frequency, normalized power amplitude, and power fluctuation rate—are weighted and aggregated to calculate the comprehensive weakness scores of branches and nodes. The mathematical expression for the comprehensive weakness score of a branch is as follows:

[0199]

[0200] in, branch road The overall weakness score indicates that the branch is more severely weak; , , The weights for the three categories of indicators—over-limit frequency, normalized power amplitude, and power volatility—are determined by the entropy weight method.

[0201] The mathematical expression for the comprehensive weakness score of a node is as follows:

[0202]

[0203] in, For nodes Overall weakness score; , , The weights for the three categories of indicators—over-limit frequency, normalized power amplitude, and power volatility—are determined by the entropy weight method.

[0204] Based on the comprehensive weakness score, branches and nodes are sorted in descending order to identify the weakest links in the distribution network, providing a quantitative basis for dispatchers to formulate operation optimization strategies.

Claims

1. A method for inferring weak links in power distribution networks by integrating meta-learning and spatiotemporal graph attention networks, characterized in that, include: In a distribution network, nodes are interconnected through branches to form a distribution network topology. Distribution network topology data is obtained through a distribution network dispatch automation system, and an adjacency matrix is ​​constructed using the distribution network topology data. Extract the branch connection relationships from the adjacency matrix to form an edge list; Historical operating data of the distribution network is collected from the distribution network energy management system and divided into multiple input-output sample pairs; Multiple input-output sample pairs are divided into a support set and a query set; For missing data in historical operation data, a spatial mask and a temporal mask are generated. The spatial mask is used to mask the loss measurement nodes, and the temporal mask is used to mark the missing time periods. Based on the distribution network topology and multiple input-output sample pairs, a spatiotemporal graph attention network is constructed using an adjacency matrix. The spatiotemporal graph attention network includes a spatial graph attention module, a temporal evolution module, and a temporal attention module. The spatial graph attention module is used to capture the spatial topological relationships between distribution network nodes and to handle the problem of missing node measurements using spatial masks. The temporal attention module is used to adaptively aggregate historical temporal features and to handle the problem of data interruption using temporal masks. By combining the edge list, we establish the MSE loss function, the active physical consistency constraint loss function, the reactive physical consistency loss function, and the gradient matching loss function, thus forming the total loss function. By combining the support set, query set, and total loss function, a meta-learning two-layer optimization strategy is adopted to train the spatiotemporal graph attention network. The trained spatiotemporal graph attention network can adapt to different power distribution network scenarios and has cross-scenario generalization ability. The historical observation sequence of the new scenario is input into the trained spatiotemporal graph attention network to obtain the state inference sequence for future time periods. Based on the state projection sequence for future time periods, the projection results of active power and reactive power are obtained, and the weak state is determined based on the projection results; the projection results and the weak state determination results are evaluated and processed according to the multi-index evaluation method; the entropy weight method is used to determine the weight of the processing result based on the information content of each index data itself. The comprehensive weakness score of distribution network nodes and lines is calculated based on the assessment results and weights. The scores of distribution network nodes and lines are sorted separately, and the weak links in the distribution network are identified based on the sorting results.

2. The method for inferring weak links in power distribution networks by fusing meta-learning and spatiotemporal graph attention networks according to claim 1, characterized in that, The construction process of the spatial graph attention module is as follows: Extracting the input sequence Each node in the middle At any time The electrical quantity characteristics are mapped to a high-dimensional hidden space through linear transformation to obtain the initial hidden feature vector. By combining the initial hidden feature vector and the spatial mask, the correlation strength between neighboring nodes is adaptively learned through an attention mechanism to obtain the original attention coefficients; The original attention coefficients were normalized. Nodes are evaluated based on their normalized attention coefficients. The set of neighboring nodes Weighted summation is performed to achieve adaptive feature fusion of spatial information, thereby constructing a spatial graph attention module.

3. The method for inferring weak links in power distribution networks by fusing meta-learning and spatiotemporal graph attention networks according to claim 2, characterized in that, The extraction of input sequence Each node in the middle At any time The electrical quantity characteristics are mapped to a high-dimensional hidden space through a linear transformation to obtain an initial hidden feature vector, including: Extracting the input sequence Each node in the middle At any time The electrical quantity characteristics are mapped to a high-dimensional hidden space through linear transformation. The mathematical expression for the node feature transformation is as follows: ; in, For nodes At any moment The initial hidden feature vector after linear transformation; The input feature transformation matrix; For nodes in the input sequence X The feature vector, containing nodes Voltage amplitude, voltage phase angle, active power, reactive power; This is the bias vector.

4. The method for inferring weak links in power distribution networks by fusing meta-learning and spatiotemporal graph attention networks according to claim 2, characterized in that, The expression for the original attention coefficient is as follows: ; in, For a moment Next Layer nodes With nodes The original attention coefficients between them; It is a linear rectified activation function with leakage; For the first Layer-learnable attention vectors; For the first Layer feature transformation matrix; and They are time points Next Layer nodes and nodes eigenvectors; This is a vector concatenation operation; This is for transposition; during this calculation process, when in the first level of calculation, i.e. When the value equals 1, the initial hidden feature vector is used as the input data in the above formula; The normalization process for the original attention coefficients includes: The softmax function is used to convert the original attention coefficients into a probability distribution form, ensuring that the sum of the attention weights of all adjacent nodes is 1, which facilitates subsequent weighted aggregation. The mathematical expression for the normalized weights is as follows: ; in, It is a natural exponential function; These are the normalized attention weights; For a moment Next Layer nodes With nodes The original attention coefficients between For nodes The set of neighboring nodes, and the node Neighboring nodes with physical connections are determined by the adjacency matrix.

5. The method for inferring weak links in power distribution networks by fusing meta-learning and spatiotemporal graph attention networks according to claim 2, characterized in that, The nodes are analyzed based on the normalized attention coefficients. The set of neighboring nodes Weighted summation is performed to achieve adaptive feature fusion of spatial information, thereby constructing a spatial graph attention module, including: Nodes are assigned attention weights based on the normalized values. The set of neighboring nodes We perform weighted summation to achieve adaptive feature fusion of spatial information and update the feature representation of the current node. The mathematical expression for adaptive feature fusion is as follows: ; in, For nodes In the The d-dimensional feature vector is updated after aggregating neighbor information at each layer. For ELU activation function; For the first Layer feature transformation matrix; These are the normalized attention weights; For a moment Next Layer nodes The feature vectors; after processing by the spatial graph attention module, the output of the last layer is... Define as a node At any moment Spatial feature vectors ; the current moment The spatial feature vectors of all nodes are combined to form the global spatial feature vector. This serves as the input data for the timing evolution module.

6. The method for inferring weak links in power distribution networks by fusing meta-learning and spatiotemporal graph attention networks according to claim 1, characterized in that, The construction process of the time-series evolution module is as follows: The time-series evolution module uses gated loop units to capture the dynamic evolution of the distribution network state over time; the time-series evolution module receives global spatial feature vectors in time step order. By controlling the degree of forgetting of historical information through the reset gate and controlling the proportion of new information incorporated through the update gate, effective modeling of the temporal dependencies of distribution network states can be achieved. The mathematical expressions for the reset gate, update gate, candidate hidden state, and update state are as follows: ; ; ; ; in, Reset the gate vector in d dimensions; Update the gate vector for d dimensions; Let d be a candidate state vector, and the candidate hidden states are obtained through... To indicate; for A d-dimensional state vector that integrates historical and current information is used to update the state. To indicate; Let be the d-dimensional state vector of the previous time step; These are global spatial feature vectors; , , These are the d×2d weight matrices for the reset gate, update gate, and candidate states, respectively. , , The d-dimensional bias vectors corresponding to the reset gate, update gate, and candidate state; is the sigmoid activation function; tanh is the hyperbolic tangent activation function; This is element-wise multiplication.

7. The method for inferring weak links in power distribution networks by fusing meta-learning and spatiotemporal graph attention networks according to claim 1, characterized in that, The construction process of the time attention module is as follows: The temporal attention module takes the state vector output by the temporal evolution module as input and dynamically evaluates the importance of historical moments to the current inference result through a temporal attention mechanism. By learning the state weights of different historical moments, the temporal attention module can adaptively aggregate historical temporal features and utilize temporal masks. To address data interruption issues and shield the impact of missing moments on feature aggregation, a context vector containing key historical information is generated. The mathematical expressions for the original attention coefficients, normalized attention weights, and context vectors are as follows: ; ; ; in, For a moment The original attention coefficient; For a moment The original attention coefficient; This is the transpose of the learnable d-dimensional attention parameter vector; dd projection matrix is ​​used to perform linear transformation on the state at historical moments, enabling the time attention module to extract temporal features from different perspectives; is a d×d projection matrix used for linear transformation of the final state; for The d-dimensional state vector at time t; For the final time step The d-dimensional state vector; T is the total length of the time series; This is the bias vector for the temporal attention layer; After normalization Temporal attention weight at any given moment; For time mask; The context vector is d-dimensional and is obtained by weighting and summing the attention weights of each historical moment. d-dimensional context vector The state deduction result is obtained by outputting the projection layer, and its mathematical expression is as follows: ; in, For the deduced state sequence; The projection matrix that maps d-dimensional features back to the 4-dimensional output space; The bias vector is used; the state deduction result includes the voltage amplitude. Voltage phase angle Active power and reactive power .

8. The method for inferring weak links in power distribution networks by fusing meta-learning and spatiotemporal graph attention networks according to claim 1, characterized in that, The combined edge list establishes the MSE loss function, the active physical consistency constraint loss function, the reactive physical consistency loss function, and the gradient matching loss function, thereby forming the total loss function, which includes: Physical constraints are constructed based on the AC power flow equation. The mathematical expression of the AC power flow equation is as follows: ; ; in, and Branch roads Calculated values ​​of active and reactive power; and They are nodes and nodes The estimated voltage amplitude; and They are nodes and nodes The derived value of the voltage phase angle; and They are nodes With nodes The conductance and susceptance parameters of the branches between them; The mean squared error (MSE) is used to measure the deviation between the inferred values ​​and the true values ​​of the spatiotemporal graph attention network, and serves as the basic optimization objective for training the spatiotemporal graph attention network. The mathematical expression for the basic MSE loss is as follows: ; in, For MSE loss; The number of nodes; To deduce the step size; For nodes At any moment The projected value; For nodes At any moment The true value; The second norm of a vector; For each branch contained in the edge list Combined with the corresponding line conductance and susceptance The parameters require that the power calculated from the derived voltage value using the power flow equation for each branch route be consistent with the actual measured value; the mathematical expression for the active physical consistency loss is as follows: ; in, Loss due to active physical consistency constraints; For the target sequence Middle Branch Road The true value of active power; The mathematical expression for reactive physical consistency loss is as follows: ; in, This is the loss due to reactive physical consistency constraints; For the target sequence Middle Branch Road The true value of reactive power; The mathematical expression for gradient matching loss is as follows: ; in, For gradient matching loss; and They are nodes At any moment The projected value and the actual value, and For nodes At any moment The projected value and the actual value; By weighting and combining the above losses, a balance is achieved between inference accuracy and physical consistency. The mathematical expression of the total loss function is as follows: ; in, Total loss; Loss due to active physical consistency constraints Weighting coefficients; Loss due to reactive physical consistency constraints Weighting coefficients; Gradient matching loss The weighting coefficients.

9. The method for inferring weak links in power distribution networks by fusing meta-learning and spatiotemporal graph attention networks according to claim 1, characterized in that, The spatiotemporal graph attention network is trained by combining the support set, query set, and total loss function and using a meta-learning two-layer optimization strategy. The trained spatiotemporal graph attention network can adapt to different power distribution network scenarios and has cross-scenario generalization ability. By inputting the historical observation sequence of the new scene into a trained spatiotemporal graph attention network, a state projection sequence for future time periods is obtained, including: Based on a preset probability distribution, the global parameter set Initial values ​​are assigned as the starting point for meta-learning training; Using a support set and a query set, iterative training is conducted in two phases: an inner loop and an outer loop. The inner loop uses a small number of gradient update steps on the support set to adapt the spatiotemporal graph attention network to the data distribution characteristics of a specific power distribution network scenario. The outer loop optimizes the global initial parameters on the query set by evaluating the performance of the adapted spatiotemporal graph attention network on multiple tasks, enabling the network to generalize across scenarios. The mathematical expressions for the inner and outer loop parameter updates are as follows: ; ; in, This is the global parameter set, including all parameters to be optimized in the spatiotemporal graph attention network. ; For the first Individual learning tasks; In the mission Update parameters adapted to the support set; The learning rate for the inner loop; The learning rate for the outer loop; For the parameters of the spatiotemporal graph attention network The gradient operator; for Spatiotemporal graph attention network with parameters; For the task Loss on the support set; For the task The loss on the query set; M is the number of query tasks; after training, the historical observation sequence of the new scene will be used. Inputting the trained spatiotemporal graph attention network yields a sequence of state projections for future time periods. .

10. The method for inferring weak links in power distribution networks by fusing meta-learning and spatiotemporal graph attention networks according to claim 1, characterized in that, The process involves calculating a comprehensive weakness score for distribution network nodes and lines based on the evaluation results and weights, ranking the scores for distribution network nodes and lines, and identifying weak links in the distribution network based on the ranking results, including: Based on the evaluation results and weights, the comprehensive weakness scores of distribution network nodes and lines are calculated, and the weak links are ranked according to the scores. The three indicators—over-limit frequency, normalized power amplitude, and power fluctuation rate—are weighted and aggregated to calculate the comprehensive weakness scores of branches and nodes. The mathematical expression for the comprehensive weakness score of branches is as follows: ; in, branch road The overall weakness score indicates that the branch is more severely weak; , , The weights for the three categories of indicators—over-limit frequency, normalized power amplitude, and power volatility—are determined by the entropy weight method. The mathematical expression for the comprehensive weakness score of a node is as follows: ; in, For nodes Overall weakness score; , , The weights for the three categories of indicators—over-limit frequency, normalized power amplitude, and power volatility—are determined by the entropy weight method. Branches and nodes are sorted in descending order based on comprehensive weakness scores to identify the weakest links in the distribution network.