A method for topology identification of distribution networks based on single-time steady-state measurements
By using a Transformer model based on a self-attention mechanism and utilizing single-time voltage and power measurements, a fast and robust identification of the distribution network topology is achieved, solving the problems of inconsistent node size and noise impact, and making it suitable for various distribution network scenarios.
Patent Information
- Application Number
- CN202610421098.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-01
- Publication Date
- 2026-06-26
AI Technical Summary
Existing technologies struggle to accurately identify distribution network topology under single-moment steady-state measurement conditions, especially when node sizes are inconsistent and the network is affected by noise and load fluctuations, resulting in poor identification performance.
A Transformer model based on a self-attention mechanism is adopted. By constructing node sequence feature vectors and combining a masking mechanism and a topology classification network, the candidate topology set can be automatically identified. Topology identification is performed using single-time voltage and power measurements.
It achieves fast and robust topology identification under single-moment steady-state measurement, adapts to distribution networks of different sizes, suppresses the influence of measurement noise and load fluctuations, and improves the generalization ability of the model.
Smart Images

Figure CN122292355A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of distribution automation and power system operation analysis technology, and in particular to a distribution network topology identification method based on single-moment steady-state measurements. Background Technology
[0002] The distribution network is a crucial infrastructure in the power system, responsible for power distribution and supply security. Its structure consists of feeders, branch lines, sectionalizing switches, and tie switches. The topology of the distribution network is determined by the switch states, and changes in the topology lead to significant changes in node voltage, current, and power flow distribution. Accurately understanding the distribution network topology is essential for voltage control, state estimation, fault diagnosis, and operational optimization.
[0003] In steady-state power system theory, node voltages and injected power satisfy the power flow balance equations, exhibiting a nonlinear coupling relationship. Distribution networks typically have a radial structure, with node voltages affected by load changes and gradually decreasing along feeders. When switching operations alter the power supply path, voltage distribution and power flow direction change, reflecting the characteristics of the topology.
[0004] With the widespread adoption of smart meters and distribution terminals, steady-state measurements of distribution networks at a single moment (such as node voltage and power) have become a common data source. Differences in distribution network scale and measurement points complicate structural analysis, and noise and disturbances exist in the measurements. Node measurements can be viewed as one-dimensional sequential data, containing electrical coupling information.
[0005] Data-driven approaches, especially sequence modeling techniques, can extract global or local correlations from measurement data and reveal coupling patterns between nodes, providing a new theoretical basis for distribution network topology identification based on steady-state measurements. Summary of the Invention
[0006] Purpose of the invention: To address the characteristics of distribution network operation topology, such as dependence on switch states, inconsistent node size, and the influence of noise and load fluctuations on single-moment steady-state measurements, a distribution network topology identification method based on single-moment steady-state measurements is proposed. By constructing a Transformer model suitable for distribution network node sequences, the method can automatically identify candidate topology sets, thereby obtaining the current operation mode of the distribution network.
[0007] To achieve the above objectives, this invention proposes a distribution network topology identification method based on single-moment steady-state measurements, which is implemented through the following process:
[0008] S1. Obtain steady-state operation measurement data of the distribution network at a single moment, extract the voltage amplitude and active power of each node to construct node feature vectors, arrange all the node feature vectors in a preset node order to form an input sequence; S2. Construct a candidate topology set for the distribution network, and associate a unique topology label with each input sequence in the training samples; S3. Unify the length of the input sequence and construct a mask vector for identifying the real node positions and padding positions; S4. Superimpose the position encoding vector onto the input sequence of uniform length to obtain the position-sensitive input sequence; S5. The position-sensitive input sequence is feature extracted using a Transformer encoding structure based on a self-attention mechanism. The attention is scored by combining the mask vector, and the node hidden representation is updated. S6. Based on the node hiding representation and the mask vector, perform a weighted average of the node hiding representations of the real node positions to construct a global representation vector. S7. Input the global representation vector into the topology classification network, and obtain the predicted probability of each category in the preset candidate topology set through linear mapping; S8. Combine label smoothing cross-entropy loss with attention mask regularization term to construct total loss function. Train the Transformer encoding structure and the topology classification network with training samples until the loss converges or the stopping condition is met to obtain the trained topology recognition model. S9. After processing the voltage amplitude and active power of the distribution network nodes at the time to be identified according to the rules of steps S1 to S5, input them into the trained topology identification model, obtain the topology probability distribution through the topology classification network, and output the predicted topology according to the maximum probability principle.
[0009] As a preferred embodiment, step S1 specifically includes: At steady-state measurement time Obtain steady-state measurement data at each node of the distribution network at a single moment, and extract the voltage amplitude of each node i from it. and active power Construct node feature vectors ; Arrange all node feature vectors into an input sequence according to a preset order. N is the number of nodes in the current topology.
[0010] As a preferred embodiment, step S2 specifically includes: Based on the structural characteristics of the distribution network and different combinations of tie switches, a candidate topology set is constructed. K is the number of candidate topologies; Each candidate topology Each training sample corresponds to a set of node connection relationships and handover switch configurations. With the only topology among them Correspondingly, X is the input sequence and y is the topology category index.
[0011] As a preferred embodiment, step S3 specifically includes: By setting a uniform length L, and padding the input sequence X with zeros, we obtain the input sequence of uniform length. :
[0012]
[0013] Construct the mask vector:
[0014] In the formula, To define the features of the i-th node in a sequence of uniform length; This is the mask flag for position i.
[0015] As a preferred embodiment, step S4 specifically includes: By superimposing position-encoded vectors onto the input sequences of uniform length, a position-sensitive input sequence is obtained, as shown in the following expression:
[0016] in, This is the position encoding vector corresponding to the i-th sequence position; This is the input vector after overlaying position encoding; all The position-sensitive input sequence Z is formed.
[0017] As a preferred embodiment, the weighted average in step S6 is calculated as follows: Using the mask vector as weights, the hidden representations of nodes at all positions are summed, and then divided by the number of real nodes to obtain the global representation vector.
[0018] As a preferred embodiment, step S7 specifically includes: Input the global representation vector h into the topology classification network and calculate the predicted probability for each candidate topology:
[0019] Output the predicted topology using the maximum probability criterion. ; in, , The classification layer weights and biases corresponding to topology k; Let be the probability of predicting the k-th topology; This represents the final topological result obtained through identification.
[0020] As a preferred embodiment, the construction process of the label smoothing cross-entropy loss in step S8 is as follows: Smooth the labels on the actual category labels to obtain smoothed labels:
[0021] Based on the smoothing label and the predicted probability The label smooth cross-entropy loss was calculated. :
[0022] in, is the smooth label value of the k-th class topology; K is the total number of candidate topologies; y is the label smoothing factor; y is the topology category index.
[0023] As a preferred embodiment, the construction process of the attention mask regularization term in step S8 is as follows: select attention pairs containing at least one padding position, and weight them by the sum of the squares of their attention weights to obtain the attention mask regularization term. :
[0024] in, , These are the mask flags at positions i and j, respectively; is the normalized weight; L is the total length of the sequence.
[0025] As a preferred embodiment, the training samples are composed of steady-state electrical quantities obtained through power flow calculations, satisfying the following power flow equations:
[0026]
[0027] in, Let i be the set of adjacent nodes connected to node i. , These are the real and imaginary parts of the line admittance between node i and node j, respectively. The phase angle difference between the two nodes; , These are the active power and reactive power of node i, respectively; , These are the voltage amplitudes at nodes i and j, respectively.
[0028] Compared with the prior art, the present invention has the following beneficial effects: (1) It can complete topology identification under steady-state measurement conditions at a single moment. It does not rely on time-series measurement, dynamic measurement or multi-time differential information. It can perform topology judgment using only the voltage and power at a single time point, which is suitable for scenarios with limited measurement conditions or long data acquisition cycles.
[0029] (2) It has a unified input structure that can adapt to different scales of distribution networks. Through unified length processing and mask control, it can achieve consistent modeling of topology structures with different numbers of nodes, so that the model can handle various distribution network operation modes with different node sizes.
[0030] (3) It can automatically learn the electrical coupling relationship between nodes. The Transformer model based on the self-attention mechanism does not require explicit construction of impedance matrix or electrical distance features. It can capture the potential structural features between nodes from voltage and power measurements, providing high-quality feature representation for topology identification.
[0031] (4) It has a good suppression effect on the interference of filling nodes. Through the masking mechanism and attention masking regularization, it effectively restricts the propagation of attention in non-existent node positions, thereby maintaining the modeling stability of real nodes and improving the generalization ability in scenarios with changing topology scale.
[0032] (5) It has strong robustness to measurement noise and load fluctuations. The label smoothing strategy reduces the model's overfitting to a single class, enhances the smoothness of the output probability, and enables the model to maintain stable performance even in the presence of random disturbances, instrument errors or load fluctuations. Attached Figure Description
[0033] Figure 1 This is an overall flowchart of the distribution network topology identification method based on single-time steady-state measurement of the present invention.
[0034] Figure 2 This is a flowchart of the mask self-attention calculation process of the present invention. Detailed Implementation
[0035] In the following description, numerous specific details are set forth in order to provide a more thorough understanding of the invention. However, it will be apparent to those skilled in the art that the invention can be practiced without one or more of these details. In other instances, certain technical features well-known in the art have not been described in order to avoid obscuring the invention.
[0036] This invention addresses the characteristics of distribution network operation topology, such as dependence on switch states, inconsistent node sizes, and the influence of noise and load fluctuations on single-moment steady-state measurements. It proposes a distribution network topology identification method based on single-moment steady-state measurements. By constructing a Transformer model suitable for distribution network node sequences, the method achieves automatic identification of candidate topology sets.
[0037] First, regarding candidate topology construction, this invention generates multiple possible topologies based on standard distribution network and engineering models, using different tie switch opening and closing methods. It also constructs a training sample library covering multiple operating conditions and structures using power flow calculations. For single-moment measurement feature extraction, this invention uses only node voltage amplitude and active power to form the input sequence. Through unified lengthening and masking mechanisms, topologies of different node sizes are normalized into a consistent structure, ensuring that the model propagates effective information only between real nodes. Second, regarding sequence representation learning, this invention employs a Transformer encoding network with positional encoding. Through a multi-head self-attention mechanism, it automatically learns electrical coupling relationships from node voltage and power distributions, extracting global structural features that distinguish different topologies without explicitly constructing impedance or electrical distance matrices. Simultaneously, the masked attention mechanism suppresses interference from filling nodes, enabling the model to maintain stable modeling capabilities under conditions of node size changes, load disturbances, and measurement noise. Finally, regarding topology discrimination, this invention inputs the global representation output by the Transformer into a topology classification network, performs probabilistic inference on the candidate topology set, and outputs the most likely actual operating topology or the corresponding switch state. This method enables rapid and robust identification of distribution network topologies of different scales under single-moment steady-state measurement conditions, and can be widely applied to scenarios such as distribution network operation mode judgment, state estimation and operation optimization.
[0038] The embodiments are described in detail below with reference to the accompanying drawings.
[0039] I. Overall Approach See Figure 1 and Figure 2 As shown in the flowchart, this invention uses the steady-state measurement of the distribution network at a single moment as the basic input, extracts only the voltage amplitude and active power of each node as features, and normalizes the topology of different node sizes to a unified input structure through a unified lengthening and masking mechanism. It adopts a Transformer encoding structure based on a self-attention mechanism to learn the electrical coupling relationship between nodes, and then outputs the most likely operating topology through a topology classification network. During the training process, the cross-entropy loss with label smoothing and the attention masking regularization term are combined to improve the robustness of the model to measurement noise, load disturbance and topology size changes.
[0040] II. Specific Components of the Technical Solution 1. Construction of single-time measurement data This invention first obtains the distribution network at a single moment Steady-state operation measurement data. For a distribution network with any topology, let its node set be... , where N is the number of nodes corresponding to this topology. For each node This invention extracts its steady-state voltage amplitude. With active power Construct its node feature vectors, as shown in equation (1).
[0041]
[0042] in This represents the voltage magnitude (per unit) at node i. This represents the active power of the load at node i.
[0043] According to the preset node order (e.g., bus numbering order, power flow calculation result output order, etc.), all node feature vectors are arranged in order to form the input sequence shown in equation (2):
[0044] 2. Candidate Topology Set and Topology Labels The present invention pre-constructs a set of possible operating topologies for the distribution network, as shown in equation (3).
[0045]
[0046] in Let K represent the k-th candidate topology, where K is the total number of candidate topologies. Each topology... This corresponds to a set of nodes, line connections, and interconnection switch states. Each input sequence X in the training samples is associated with a unique topological label y, i.e. .
[0047] In this embodiment, the construction of the candidate topology set T includes the following two types of topology generation modes: (1) Based on the standard distribution network model, the topology generation mode forms a variety of candidate topologies that include both radial structures and loop structures by different combinations of closing and opening of tie switches. (2) The topology generation mode based on the real engineering distribution network model. In this mode, the operation of the tie switch only generates a radial topology and does not generate a ring topology. The above topology is used only as a category label during the training and inference process, and is not used as input features of the neural network.
[0048] 3. Unified length and masking mechanism Considering that the number of nodes may vary in different topologies, in order to enable the model to handle distribution networks of different scales with a fixed input dimension, this invention sets a uniform sequence length L and performs uniform length processing on the input sequence with N nodes.
[0049] when Then, zero-vector padding is performed on sequence X according to equation (4) to obtain a sequence of length L:
[0050] At the same time, a mask vector is constructed according to equation (5) to identify the real node position and the filling position.
[0051]
[0052] 4. Position Encoding and Input Embedding To preserve the positional information of nodes in the sequence, this invention adds positional encoding to sequences of uniform length. Let... Given the position encoding vector corresponding to the i-th position, the input of the superimposed position encoding is obtained as shown in equation (6):
[0053] all The position-sensitive input sequence is formed as shown in equation (7):
[0054] 5. Transformer-based sequence encoding This invention employs a Transformer encoding structure based on a self-attention mechanism to extract features from sequence Z. For any encoding layer, its input is a node representation of sequence Z, and a query matrix is obtained through a linear transformation. Key matrix Value matrix : in , , This is the linear mapping weight matrix corresponding to the query, key, and value.
[0055] The attention score for any two positions i and j is defined by equation (8):
[0056] in Score the attention of position i to position j. For the i-th row of the query vector, For the j-th row of the key vector, The dimension of the key vector is used for scaling and normalization.
[0057] To avoid the filling position affecting the information propagation of real nodes, this invention combines a mask vector in the attention scoring stage. When the corresponding score is set to a minimum value, the weights of these positions will approach 0 after softmax normalization, as shown in equation (9).
[0058]
[0059] The attention weights are obtained by softmax normalization as shown in equation (10):
[0060] The corresponding hidden node representation is updated to equation (11):
[0061] in Let i be the hidden feature vector at position i. Let j be the key-value vector at position j.
[0062] In this embodiment, the Transformer coding network adopts a multi-head self-attention structure to perform parallel modeling of different "electrically coupled subspaces". For the h-th attention head, we have: The outputs of all attention heads are concatenated and then linearly transformed to obtain: .
[0063] Let h be the node representation matrix for the h-th attention output; This represents a concatenation operation along the feature dimension; The matrix is a linear mapping of multiple outputs. The multi-head structure can simultaneously characterize the potential electrical coupling relationship between bus voltage and active power from multiple perspectives.
[0064] In this embodiment, the Transformer coding network consists of several stacked layers. Each layer includes a multi-head attention sublayer and a feedforward network sublayer. All layers employ residual connections and layer normalization mechanisms. The computation process is as follows: (1) For the output sequence of the previous layer Perform multi-head attention calculation: ; (2) Add the residuals of the multi-head attention output and the input sequence and perform layer normalization: ; (3) To Input feedforward fully connected network: ; (4) Connect the feedforward output with Perform residual summation and layer normalization: .
[0065] Where Z represents the input sequence entering this layer; M represents the multi-head attention output; The first-stage residual and normalized output; F is the output of the feedforward network; This is the final output of this layer and serves as the input for the next layer. , Here is the weight matrix of the feedforward network; , It is the bias vector; It is a non-linear activation function; This is a layer normalization operation used to stabilize the training process.
[0066] 6. Global Topological Representation Extraction This invention is based on node hidden representation and mask Construct a topological global representation vector h. As shown in equation (12), it is obtained by weighting the hidden representations of the real node positions:
[0067] The numerator is the weighted sum of the hidden representations of all real nodes, and the denominator is the number of real nodes, to ensure the comparability of global representations under different topological scales.
[0068] 7. Topology Classification Network This invention inputs the global representation vector h into a topological classification network, and obtains the predicted probabilities of each category in a preset topological set through linear mapping and a softmax function. Let the classification layer parameters be... , Then the prediction probability of the kth topology is shown in equation (13):
[0069] in This indicates that the model predicts the topology corresponding to the current sample as follows: The probability of.
[0070] 8. Label-smoothed cross-entropy loss In one implementation, the present invention employs a label smoothing strategy for the real topology labels. Let the real category index be y, and the label smoothing coefficient be... The smoothed target distribution is as shown in equation (14):
[0071] in Let be the target probability of the k-th topological category.
[0072] Based on the above smoothed labels, the classification loss is defined as shown in equation (15):
[0073] in The label smoothing cross-entropy loss is used.
[0074] 9. Attention mask regularization In one implementation, this invention introduces an attention mask regularization term to suppress attention allocation on filled nodes. Let it be denoted as... The attention weight of the i-th position to the j-th position is then defined by the regularization term in equation (16):
[0075] in These are the regularization weight coefficients. This is used to select attention pairs that contain at least one padding position, so that the model automatically compresses the magnitude of such attention weights during training.
[0076] 10. Total Loss and Training Process In one implementation, the present invention performs a weighted summation of the classification loss and the attention regularization term to form the total loss used for model training. .
[0077] During the model training phase, training samples are read in batches, and forward propagation computation is performed on each batch of samples. , , Total loss Then, the gradients of the model parameters are obtained through backpropagation, and an optimization algorithm is used to update all parameters of the Transformer and the classification network. The training is iterated until the loss converges or the stopping condition is met, resulting in a well-trained model that can be used for distribution network topology identification.
[0078] In one implementation, the training samples are composed of steady-state electrical quantities obtained from power flow calculations, and the model inputs only include node voltages and active power. The training samples satisfy the power flow equation shown in equation (17):
[0079] When generating samples, use , , , As a power flow constraint to ensure physical feasibility, but when fed into the Transformer model for training, only... and Constituting input features , not and Input model.
[0080] in, Let i be the set of adjacent nodes connected to node i. , These are the real and imaginary parts of the line admittance between node i and node j, respectively. The phase angle difference between the two nodes. The active power injected into the node. Reactive power injected into the node.
[0081] 11. Topology identification output During the inference phase, the present invention inputs the node voltage amplitude collected at a certain moment. With active power The input sequence X and the uniform-length sequence are constructed according to the same rules as in the training phase. and mask vector The topological probability distribution is obtained by Transformer encoding and topological classification network calculation. }, and output the predicted topology according to the principle of maximum probability, as shown in equation (17):
[0082] This embodiment is based on a training dataset composed of various distribution network models, including typical standard models (such as the IEEE 33-node distribution network) and distribution network structures derived from actual engineering applications. These multi-source models together constitute a topology sample library, used to demonstrate the applicability and generalization ability of the method of this invention in multi-structure distribution network scenarios.
[0083] In this embodiment, steady-state operation measurements of different distribution network structures under various operating modes are first collected. These measurements are derived from power flow calculations or field monitoring data, covering parameters such as bus voltage amplitude, node active load, and node reactive load. Different distribution network models differ in the number of nodes, connection methods, and tie switch arrangements. Therefore, during the sample preparation stage, all samples are generated into feature sequences according to a unified bus sorting rule. During input construction, samples with insufficient node numbers are expanded using zero-padding, and a mask vector is constructed to identify the effective node locations, thus achieving a unified input format despite differences in topology scale.
[0084] During the model training phase, this embodiment employs a Transformer-based sequence representation structure to jointly learn the aforementioned mixed samples. Steady-state measurements of each bus are used as input sequences in a fixed order, and after position encoding, they enter a multi-layer self-attention network. The model learns the potential electrical relationships between different buses through a self-attention mechanism, including voltage distribution characteristics, load coupling patterns, and global structural differences caused by changes in power supply paths. Since the training samples come from different distribution network structures, the encoding network can simultaneously model the electrical coupling characteristics of multiple structures in a unified feature space, forming a global feature representation applicable to various topologies.
[0085] In the topology determination phase, the model infers the candidate topology set through a topology classification network. Based on the global representation vector output by the Transformer, the classification network calculates the matching probability of each topology and ultimately outputs the most likely running topology number, which can be further mapped to the corresponding on / off state of a handover switch. This identification process is indiscriminate regarding the source of the samples; regardless of whether the input measurements come from a standard model or an engineering model, the classification network can directly complete the topology determination.
[0086] In practical applications, when a steady-state measurement of the distribution network at a certain moment is obtained (e.g., from a monitoring or simulation system), it can be converted into a feature sequence and input into the model, which will then automatically output the current operating topology. Since the training samples cover both typical and engineering structures, the method of this invention exhibits good adaptability and robustness under various distribution network architectures, effectively addressing differences in node size, load fluctuations, and the structural complexity of actual distribution networks.
[0087] This embodiment illustrates that the present invention can be used not only for standardized distribution networks, but also for engineering distribution network environments with multiple structural features. Through a unified sequence modeling and classification mechanism, it can achieve cross-structure and multi-condition distribution network topology identification.
[0088] The operating mechanisms of the above-disclosed embodiments can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.
[0089] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a Digital Signal Processor (DSP), a microcontroller, an Application Specific Integrated Circuit (ASIC), or a microprocessor.
[0090] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.
[0091] As described above, although the invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the invention itself. Various changes in form and detail may be made without departing from the spirit and scope of the invention as defined in the appended claims.
Claims
1. A method for topology identification of distribution networks based on single-time steady-state measurements, characterized in that, Includes the following steps: S1. Obtain steady-state operation measurement data of the distribution network at a single moment, extract the voltage amplitude and active power of each node to construct node feature vectors, arrange all the node feature vectors in a preset node order to form an input sequence; S2. Construct a candidate topology set for the distribution network, and associate a unique topology label with each input sequence in the training samples; S3. Unify the length of the input sequence and construct a mask vector for identifying the real node positions and padding positions; S4. Superimpose the position encoding vector onto the input sequence of uniform length to obtain the position-sensitive input sequence; S5. The position-sensitive input sequence is feature extracted using a Transformer encoding structure based on a self-attention mechanism. The attention is scored by combining the mask vector, and the node hidden representation is updated. S6. Based on the node hiding representation and the mask vector, perform a weighted average of the node hiding representations of the real node positions to construct a global representation vector. S7. Input the global representation vector into the topology classification network, and obtain the predicted probability of each category in the preset candidate topology set through linear mapping; S8. Combine label smoothing cross-entropy loss with attention mask regularization term to construct total loss function. Train the Transformer encoding structure and the topology classification network with training samples until the loss converges or the stopping condition is met to obtain the trained topology recognition model. S9. After processing the voltage amplitude and active power of the distribution network nodes at the time to be identified according to the rules of steps S1 to S5, input them into the trained topology identification model, obtain the topology probability distribution through the topology classification network, and output the predicted topology according to the maximum probability principle.
2. The distribution network topology identification method based on single-time steady-state measurement according to claim 1, characterized in that, Step S1 specifically includes: At steady-state measurement time Obtain steady-state measurement data at each node of the distribution network at a single moment, and extract the voltage amplitude of each node i from it. and active power Construct node feature vectors ; Arrange all node feature vectors into an input sequence according to a preset order. N is the number of nodes in the current topology.
3. The distribution network topology identification method based on single-time steady-state measurement according to claim 2, characterized in that, Step S2 specifically includes: Based on the structural characteristics of the distribution network and different combinations of tie switches, a candidate topology set is constructed. K is the number of candidate topologies; Each candidate topology Each training sample corresponds to a set of node connection relationships and handover switch configurations. With the only topology among them Correspondingly, X is the input sequence and y is the topology category index.
4. The distribution network topology identification method based on single-moment steady-state measurement according to claim 3, characterized in that, Step S3 specifically includes: By setting a uniform length L, and padding the input sequence X with zeros, we obtain the input sequence of uniform length. : Construct the mask vector: In the formula, To define the features of the i-th node in a sequence of uniform length; This is the mask flag for position i.
5. The distribution network topology identification method based on single-moment steady-state measurement according to claim 4, characterized in that, Step S4 specifically includes: By superimposing position-encoded vectors onto the input sequences of uniform length, a position-sensitive input sequence is obtained, as shown in the following expression: in, This is the position encoding vector corresponding to the i-th sequence position; This is the input vector after overlaying position encoding; all The position-sensitive input sequence Z is formed.
6. The distribution network topology identification method based on single-moment steady-state measurement according to claim 1, characterized in that, The weighted average calculation method described in step S6 is as follows: Using the mask vector as weights, the hidden representations of nodes at all positions are summed, and then divided by the number of real nodes to obtain the global representation vector.
7. The distribution network topology identification method based on single-time steady-state measurement according to claim 1, characterized in that, Step S7 specifically includes: Input the global representation vector h into the topology classification network and calculate the predicted probability for each candidate topology: Output the predicted topology using the maximum probability criterion. ; in, , The classification layer weights and biases corresponding to topology k; Let be the probability of predicting the k-th topology; This represents the final topological result obtained through identification.
8. The distribution network topology identification method based on single-time steady-state measurement according to claim 7, characterized in that, The construction process of the label smoothing cross-entropy loss in step S8 is as follows: Smooth the labels on the actual category labels to obtain smoothed labels: Based on the smoothing label and the predicted probability The label smooth cross-entropy loss was calculated. : in, is the smooth label value of the k-th class topology; K is the total number of candidate topologies; y is the label smoothing factor; y is the topology category index.
9. The distribution network topology identification method based on single-time steady-state measurement according to claim 7, characterized in that, The construction process of the attention mask regularization term in step S8 is as follows: select attention pairs containing at least one padding position, and weight them by the sum of the squares of their attention weights to obtain the attention mask regularization term. : in, , These are the mask flags at positions i and j, respectively; is the normalized weight; L is the total length of the sequence.
10. The distribution network topology identification method based on single-time steady-state measurement according to claim 1, characterized in that, The training samples consist of steady-state electrical quantities obtained through power flow calculations, and satisfy the following power flow equations: in, Let i be the set of adjacent nodes connected to node i. , These are the real and imaginary parts of the line admittance between node i and node j, respectively. The phase angle difference between the two nodes; , These are the active power and reactive power of node i, respectively; , These are the voltage amplitudes at nodes i and j, respectively.