Novel power distribution network real-time topology tracing method and system

By combining multi-source data aggregation and deep learning models with graph theory methods, the challenges of topology identification and fault location in new distribution networks have been solved, achieving high-precision topology identification and rapid fault tracing, thereby improving the operational reliability and fault handling efficiency of the distribution network.

CN121710230APending Publication Date: 2026-03-20STATE GRID JIANGSU ELECTRIC POWER CO LTD NANJING POWER SUPPLY COMPANY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511732085.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-24
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing technologies have limitations in real-time topology tracing under various operating conditions of new power distribution networks, including incomplete collection of measurement data, limited topology identification algorithm capabilities, and insufficient local topology tracing mechanisms. These limitations make it difficult to adapt to highly dynamic changes and quickly locate fault areas.

Method used

By combining multi-source data aggregation, deep learning models (Transformer models), and graph theory depth-first search, we can achieve high-precision identification and rapid local tracing of distribution network topology. This includes constructing a historical measurement dataset with topology labels, designing a Transformer deep learning model, optimizing the feature space, and adopting an improved depth-first search algorithm.

Benefits of technology

It improves the accuracy and robustness of distribution network topology identification, enhances the efficiency and accuracy of fault location, constructs a multi-scenario adaptive collaborative decision-making system, and improves fault handling efficiency and system reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121710230A_ABST
    Figure CN121710230A_ABST
Patent Text Reader

Abstract

The invention discloses a novel power distribution network real-time topology tracing method and system, and the method comprises the steps: carrying out the comprehensive collection of the voltage, current and power of a key node based on a power distribution network SCADA system, and constructing a historical measurement data set containing a topological structure label; designing and training a Transform deep learning model suitable for the characteristics of the power distribution network; the feature space of the Transform model is optimized on the basis of the maximum margin principle; constructing a topological graph model of the power distribution network, carrying out weight assignment, and rapidly tracing and positioning a problem region when a fault or an abnormal condition occurs by using an improved depth-first search algorithm; and constructing a multi-scene topology traceability collaborative decision-making system, and generating a visual traceability report including a fault area topology structure, an influence range and a key equipment state. According to the method, the problems of incomplete data collection, limited learning ability of an identification algorithm, lack of an efficient local tracing mechanism and the like in novel power distribution network topology tracing are solved, and the fault processing efficiency and the operation reliability of the power distribution network are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power systems, and in particular to a novel method and system for real-time topology tracing of distribution networks, used to achieve intelligent identification and local tracing of distribution network topology. Background Technology

[0002] The power distribution network is a critical infrastructure connecting the power transmission system and end users. Real-time monitoring of its operating status and accurate tracking of its topology are essential for the safe and stable operation of the power grid. With the large-scale integration of new loads such as distributed energy resources and electric vehicle charging stations, the topology of modern distribution networks is becoming increasingly complex and dynamically changing, posing significant challenges to traditional distribution network monitoring and fault diagnosis.

[0003] Traditional power distribution network topology identification techniques mainly rely on static network models and limited measurement point data, such as state estimation-based topology identification methods and rule-based expert systems. These methods typically infer network topology by analyzing the state signals of devices such as circuit breakers and disconnectors, but they often fail to accurately reflect the actual operating state of the network when there are insufficient measurement points or communication interruptions.

[0004] In recent years, with the advancement of smart grid construction, distribution network topology identification methods based on big data analysis have gradually emerged. These methods collect a large amount of historical operational data and use machine learning algorithms to establish a mapping relationship between power grid topology and operational characteristics, which can improve the accuracy of topology identification to a certain extent. However, when dealing with complex situations such as the high proportion of distributed energy access and dynamic switching in new distribution networks, these methods still have considerable room for improvement in identification accuracy and response speed due to a lack of in-depth mining of global power grid information and precise location of local anomalies.

[0005] Existing technologies have significant shortcomings in real-time topology tracing under various operating conditions of new distribution networks: First, the collection of measurement data is incomplete, making it difficult to adapt to the multi-section monitoring needs under different topologies; second, the topology identification algorithm has limited ability to extract and learn complex network features, making it difficult to adapt to the highly dynamic changes of new distribution networks; and third, there is a lack of efficient local topology tracing mechanisms, which makes it impossible to quickly locate the problem area when a fault or abnormal situation occurs, affecting the efficiency of fault handling. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a novel real-time topology tracing method and system for distribution networks. Through multi-source data aggregation, deep learning model identification, feature space optimization, and graph theory depth-first search, this invention achieves high-precision identification and rapid local tracing of novel distribution network topologies, thereby improving the efficiency of distribution network fault handling and operational reliability.

[0007] To achieve the above objectives, this invention provides a novel real-time topology tracing method for distribution networks, comprising the following steps: Based on a distribution network SCADA system, comprehensively collect voltage, current, and power data of key nodes in the distribution network under different topologies, constructing a historical measurement dataset containing topology labels; preprocess the historical measurement dataset, design and train a Transformer deep learning model suitable for the characteristics of the distribution network, establish a mapping relationship between measurement data and topology, and achieve intelligent identification of the topology of real-time input measurement data; based on the feature space distribution analysis of the Transformer model, construct a composite loss function that fuses the margin maximization objective function with the original classification loss function, retrain the Transformer model, and obtain optimized topology identification results through the retrained Transformer model; based on the optimized topology identification results, construct a distribution network topology graph model and assign weights, using an improved depth-first search algorithm to quickly traverse and trace the local area where the problem occurs when a fault or abnormal situation occurs; perform multi-scenario adaptive analysis on the local area tracing results, construct a collaborative decision-making system, and generate a visualized tracing report containing the topology of the fault area, the scope of influence, and the status of key equipment.

[0008] Furthermore, based on the distribution network SCADA system, comprehensive data collection of voltage, current, and power at key nodes of the distribution network under different topologies is conducted to construct a historical measurement dataset containing topology tags. This includes: analyzing the characteristics and topology change patterns of the new distribution network; deploying intelligent terminal devices at feeder terminals, distribution transformers, and distributed energy access points to establish a data acquisition network covering the entire network; designing a hierarchical data acquisition strategy based on the data acquisition network to collect voltage, current, active power, reactive power, and power factor, and setting sampling frequencies and accuracy requirements for different parameters; classifying various possible operating modes and topologies of the distribution network, establishing a standardized topology tagging system, assigning a unique identifier to each topology, and establishing a mapping relationship with switch status information; and synchronously associating the various types of measurement data with the topology tags in time to form a historical dataset containing the correspondence between "measurement data - topology tags," which is then stored in time series to obtain the historical measurement dataset containing topology tags.

[0009] Furthermore, the historical measurement dataset is preprocessed, and a Transformer deep learning model suitable for the characteristics of the distribution network is designed and trained to establish a mapping relationship between the measurement data and the topology, thereby achieving intelligent identification of the topology of the real-time input measurement data. This includes: performing feature analysis on the historical measurement dataset to identify the distribution characteristics and variation patterns of the measurement data under different topologies, and determining the input feature set of the deep learning model; designing a Transformer model architecture suitable for distribution network measurement data based on the input feature set, wherein the Transformer model architecture includes a multi-head self-attention mechanism, an encoder-decoder structure, and position encoding; dividing the historical measurement dataset into a training set, a validation set, and a test set according to a preset ratio, and expanding the training samples through data augmentation techniques to improve the model's generalization ability; training the Transformer model, and determining the optimal model parameters through cross-validation and parameter grid search to improve the model's recognition accuracy, thus obtaining the intelligent topology identification model.

[0010] Furthermore, based on the feature space distribution analysis of the Transformer model, a composite loss function is constructed that fuses the margin maximization objective function with the original classification loss function. The Transformer model is then retrained, and the optimized topology identification result is obtained through the retrained Transformer model. This includes: visualizing and analyzing the feature space extracted by the Transformer model, using t-SNE or PCA dimensionality reduction techniques to project high-dimensional feature vectors into a two-dimensional or three-dimensional space, and evaluating the distribution and clustering effect of different topologies in the feature space; based on the feature space distribution analysis results, a margin maximization objective function is constructed to maximize the distance between target and non-target topologies in the feature space, improving the clarity of the classification boundary; the margin maximization objective function is fused with the original classification loss function to form a new composite loss function, so as to guide the model optimization process to pay more attention to the inter-class margin; the Transformer model is retrained to adjust the feature space distribution, so that the feature clustering of the same topology category is higher and the feature separation of different categories is higher, and the optimized topology identification result is obtained through the retrained Transformer model.

[0011] Furthermore, based on the optimized topology identification results, a distribution network topology graph model is constructed and weighted. An improved depth-first search algorithm is used to quickly traverse and locate the local area where the problem occurs when a fault or abnormal condition occurs. This includes: establishing a graph structure model of the distribution network based on the optimized topology identification results, where nodes represent buses, distribution transformers, branch points, and load points in the distribution network, and edges represent line connections; analyzing the electrical parameter values ​​in real-time measurement data, assigning weights to the nodes and edges in the graph structure model, and adjusting the weight values ​​in real time as the measurement data is updated; designing an improved depth-first search algorithm for the characteristics of the distribution network, adding pruning strategies and heuristic search mechanisms to improve search efficiency and accuracy; when a fault or abnormal condition is detected, starting from the abnormal point, the improved depth-first search algorithm is used to traverse and search the weighted graph model to locate the local area where the problem occurs.

[0012] Furthermore, after obtaining the historical measurement dataset containing topological structure labels, the process further includes: cleaning the measurement data in the historical dataset, detecting and processing outliers, duplicates, and obviously erroneous data points to ensure data accuracy; detecting missing values ​​in the cleaned measurement data, and processing missing data using interpolation, average imputation, or time-series-based prediction methods; normalizing the processed measurement data to unify electrical parameters with different dimensions and numerical ranges into the same numerical interval; conducting a quality assessment on the normalized measurement data, calculating data integrity, accuracy, and consistency indicators, and establishing a data quality evaluation system; and finally organizing and storing the measurement data that passes the quality assessment to ensure that the data quality meets the requirements for subsequent deep learning model training.

[0013] Furthermore, a Transformer model architecture suitable for distribution network measurement data is designed, including: designing a multi-head self-attention mechanism to capture multi-dimensional correlation features in the measurement data by computing attention weights in different subspaces in parallel through multiple attention heads; constructing an encoder structure to encode features of the input measurement data and establish long-distance dependencies within the sequence using the self-attention mechanism; constructing a decoder structure to generate topology category predictions based on the feature representations output by the encoder and fusing encoder and decoder information through a cross-attention mechanism; designing a position encoding mechanism to add position information to each position in the input sequence, enabling the model to understand the temporal characteristics and spatial distribution of the measurement data; and constructing a complete Transformer network architecture that integrates multi-head self-attention, feedforward neural networks, and residual connection components to obtain the intelligent topology identification model.

[0014] Furthermore, a composite loss function is constructed that fuses the margin maximization objective function with the original classification loss function. This includes: constructing a margin optimization loss function based on the distance metric between sample points in the feature space, minimizing the distance between samples of the same class and maximizing the distance between samples of different classes; designing a dynamic weight adjustment strategy, emphasizing classification accuracy in the early stages of training and gradually increasing the influence of margin maximization as training progresses; introducing an L2 regularization term to prevent model overfitting and improving generalization ability by controlling the complexity of model parameters; weighted fusion of the original cross-entropy loss function and the margin maximization objective function to balance the dual objectives of classification accuracy and feature space margin optimization; and optimizing the model based on the composite loss function by updating the model parameters using a gradient descent algorithm to obtain the optimized topology recognition result.

[0015] Furthermore, a distribution network topology graph model is constructed and weights are assigned, including: extracting the basic topology structure based on the optimized topology identification results, including equipment connection relationships and default parameters, and establishing the basic graph structure of nodes and edges; updating the switch status and connection relationships in the graph according to the optimized topology identification results, and mapping the current measurement data to the corresponding nodes and edges as attribute values; initially assigning values ​​to node weights, with factors including node type importance, electrical parameter anomaly degree, connection centrality, and historical fault frequency; initially assigning values ​​to edge weights, with factors including line type and capacity, load rate, impedance value, and status indicators; and establishing a dynamic weight update mechanism to dynamically adjust the weight values ​​of nodes and edges as real-time measurement data is updated, ensuring that the graph model accurately reflects the current distribution network status.

[0016] This invention also provides a novel real-time topology tracing system for distribution networks, comprising: a data acquisition module for comprehensively collecting voltage, current, and power data of key nodes in the distribution network under different topologies based on the distribution network SCADA system, and constructing a historical measurement dataset containing topology labels; an intelligent identification module for preprocessing the historical measurement dataset, designing and training a Transformer deep learning model suitable for the characteristics of the distribution network, establishing a mapping relationship between measurement data and topology, and realizing intelligent identification of the topology of real-time input measurement data; and a feature optimization module for optimizing the feature space of the Transformer model. The system employs a topology analysis approach, constructing a composite loss function that merges the margin maximization objective function with the original classification loss function. This function is then used to retrain the Transformer model, yielding optimized topology identification results. A local tracing module is used to construct a distribution network topology model based on the optimized topology identification results and assign weights. An improved depth-first search algorithm is then used to quickly traverse and locate the local area where the problem occurs when a fault or abnormal situation occurs. A collaborative decision-making module performs multi-scenario adaptive analysis on the local area tracing results, constructs a collaborative decision-making system, and generates a visualized tracing report containing the fault area's topology, impact range, and key equipment status.

[0017] The beneficial effects of this invention are: By applying the maximum margin principle to the feature space optimization of distribution network topology identification, the margin between the topology elements to be identified and the non-target elements is increased, thereby improving the identification accuracy and robustness of the model in complex scenarios. A topology intelligent identification method based on the Transformer deep learning model was designed, which can effectively handle the sequence features and long-distance dependencies in the distribution network and improve the accuracy of topology identification. An improved depth-first search algorithm is proposed for local topology tracing. By adding pruning strategies and heuristic search mechanisms, the efficiency and accuracy of fault region localization are improved. A multi-scenario topology traceability collaborative decision-making system was constructed, which realizes adaptive traceability strategy selection and optimization for different operating scenarios, thereby improving the practicality of the system. A complete multi-source aggregation technology for measurement data was designed, which solved the data foundation problem required for topology tracing in new distribution networks and provided reliable data support for topology identification and tracing. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A flowchart of a novel real-time topology tracing method for power distribution networks provided in this embodiment of the invention; Figure 2 A flowchart of multi-source aggregation of measurement data based on a SCADA system provided in this embodiment of the invention; Figure 3 A flowchart of intelligent topology recognition based on Transformer deep learning provided for embodiments of the present invention; Figure 4 A flowchart of feature space optimization based on the maximum margin principle provided in this embodiment of the invention; Figure 5 A flowchart of local topology tracing based on graph theory depth-first search provided in an embodiment of the present invention; Figure 6 This is an architecture diagram of a multi-scenario topology tracing and collaborative decision-making system provided in an embodiment of the present invention. Detailed Implementation

[0020] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0021] In some of the processes described in the specification, claims, and accompanying drawings of this application, multiple operations appearing in a specific order are included. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or may be executed in parallel. The operation numbers, such as S1, S2, etc., are merely used to distinguish different operations and do not themselves represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first," "second," etc., in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.

[0022] It will be understood by those skilled in the art that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application’s specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein may include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0023] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by those skilled in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have a meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Throughout the description, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application. Example

[0025] like Figure 1 As shown, the novel real-time topology tracing method for power distribution networks provided in this embodiment of the invention includes: Step S1: Based on the distribution network SCADA system, comprehensively collect the voltage, current, and power of key nodes in the distribution network under different topologies, and construct a historical measurement dataset containing topology labels.

[0026] This step forms the foundation of the entire topology tracing method, utilizing a SCADA system to collect multi-type measurement data from key nodes in the distribution network. First, the characteristics and topology change patterns of the new distribution network need to be analyzed to determine the locations of key monitoring points. Intelligent terminal devices are then deployed at feeder terminals, distribution transformers, and distributed energy access points to establish a data acquisition network covering the entire network. Based on this acquisition network, a hierarchical data acquisition strategy is designed to collect various electrical parameters, including voltage, current, active power, reactive power, and power factor. Reasonable sampling frequencies and accuracy requirements are set for different parameters to ensure the comprehensiveness and accuracy of the data.

[0027] Simultaneously, a standardized topology labeling system was established to address various operating modes and topologies that may exist in the distribution network. Each topology was assigned a unique identifier and mapped to switch status information, achieving a standardized description of the topology. Subsequently, the collected multi-type measurement data were time-synchronized and associated with the constructed topology labels to form a historical dataset containing the correspondence between "measurement data" and "topology labels," which was then stored in time series. Finally, the stored historical dataset underwent preprocessing operations such as data cleaning, outlier detection, missing value handling, and normalization to ensure that the data quality met the requirements for subsequent deep learning model training. Through this series of works, a high-quality historical measurement dataset containing topology labels was established, providing a data foundation for subsequent intelligent topology identification.

[0028] Step S2: Preprocess the historical measurement dataset, design and train a Transformer deep learning model suitable for the characteristics of the power distribution network, establish the mapping relationship between the measurement data and the topology, and realize intelligent identification of the topology of the real-time input measurement data.

[0029] In this step, a thorough feature analysis is first conducted on the historical measurement dataset to identify the distribution characteristics and variation patterns of the measurement data under different topologies, thus determining the input feature set for the deep learning model. Based on these feature analysis results, a Transformer model architecture suitable for distribution network measurement data is designed. This architecture includes core components such as a multi-head self-attention mechanism, an encoder-decoder structure, and position encoding, which can effectively handle sequential features and long-distance dependencies in the distribution network.

[0030] The design of the Transformer model involves several key steps: designing a multi-head self-attention mechanism to capture multi-dimensional correlation features in the measurement data by computing attention weights in different subspaces in parallel using multiple attention heads; constructing an encoder structure to encode features of the input measurement data and establish long-distance dependencies within the sequence using the self-attention mechanism; constructing a decoder structure to generate topological category predictions based on the feature representations output by the encoder and fusing encoder and decoder information through a cross-attention mechanism; designing a positional encoding mechanism to add positional information to each position in the input sequence, enabling the model to understand the temporal characteristics and spatial distribution of the measurement data; and finally, constructing a complete Transformer network architecture that integrates multi-head self-attention, feedforward neural networks, and residual connection components.

[0031] After the model design is completed, the historical measurement dataset is divided into training, validation, and test sets according to a preset ratio. Data augmentation techniques are used to expand the training samples and improve the model's generalization ability. Subsequently, the Transformer model is trained using the divided training set. Optimal model parameters are determined through methods such as cross-validation and parameter grid search to improve the model's recognition accuracy. Finally, real-time collected measurement data is input into the trained Transformer model, and forward inference is used to calculate the current distribution network topology type, forming preliminary topology identification results.

[0032] Step S3: Based on the feature space distribution analysis of the Transformer model, construct a composite loss function that combines the margin maximization objective function with the original classification loss function, retrain the Transformer model, and obtain the optimized topology recognition result through the retrained Transformer model.

[0033] This step aims to improve the model's recognition accuracy and robustness in complex scenarios through feature space optimization. First, the feature space extracted by the Transformer model is visualized and analyzed. Dimensionality reduction techniques such as t-SNE or PCA are used to project high-dimensional feature vectors into two-dimensional or three-dimensional space to evaluate the distribution and clustering effect of different topologies in the feature space and identify potential recognition difficulties.

[0034] Based on the feature space analysis results, a margin maximization objective function is constructed. The core idea is to increase the distance between the target and non-target topologies in the feature space, thereby improving the clarity of the classification boundary. Specifically, a distance metric between sample points in the feature space is defined, and a margin optimization loss function is constructed that minimizes the distance between samples of the same class and maximizes the distance between samples of different classes. Subsequently, this margin maximization objective function is fused with the original classification loss function to form a new composite loss function, guiding the model optimization process to focus more on inter-class margins. During the fusion process, a dynamic weight adjustment strategy is designed, emphasizing classification accuracy in the early stages of training and gradually increasing the influence of margin maximization as training progresses. Simultaneously, an L2 regularization term is introduced to prevent overfitting, and the generalization ability is improved by controlling the complexity of the model parameters.

[0035] The Transformer model was retrained using an improved composite loss function to adjust the feature space distribution, resulting in higher feature clustering for the same topological category and higher feature separation for different categories. During retraining, a smaller learning rate was used to avoid destroying learned useful features, and a learning rate decay strategy and early stopping mechanism were introduced to prevent overfitting. Finally, real-time measurement data was input into the optimized model to obtain topological identification results with maximized margins, significantly improving the model's identification accuracy and robustness in complex scenes, particularly its ability to distinguish similar topological structures and its resistance to noisy data.

[0036] Step S4: Based on the optimized topology identification results, construct a distribution network topology model and assign weights. Use the improved depth-first search algorithm to quickly traverse and locate the local area where the problem is located when a fault or abnormal situation occurs.

[0037] This step introduces graph theory methods into the topology tracing process to achieve precise location of the fault area. First, based on the optimized topology identification results, a graph structure model of the distribution network is established, where nodes represent physical equipment or electrical connection points such as buses, distribution transformers, branch points, and load points in the distribution network, and edges represent the line connection relationships between these equipment.

[0038] After the graph model is established, the electrical parameter values ​​in the real-time measurement data are analyzed to assign weights to the nodes and edges in the graph structure model. These weights are adjusted in real-time as the measurement data is updated. Node weights consider factors such as node type importance, the degree of electrical parameter anomalies, connection centrality, and historical fault frequency; edge weights consider factors such as line type and capacity, load factor, impedance value, and status indicators. By establishing a dynamic weight update mechanism, the graph model accurately reflects the current distribution network status, providing important heuristic information for subsequent search algorithms.

[0039] To address the characteristics of distribution networks, an improved Depth-First Search (DFS) algorithm is designed, incorporating pruning strategies and a heuristic search mechanism to enhance search efficiency and accuracy. Pruning strategies include node weight-based pruning, path length-based pruning, and electrical characteristic-based pruning. The heuristic search mechanism prioritizes high-weight nodes and edges, utilizing the radial characteristics of the distribution network and historical fault data to guide the search direction. When a fault or anomaly is detected, the improved DFS algorithm traverses the weighted graph model starting from the anomaly point. A multi-source information fusion strategy comprehensively evaluates potential fault points, ultimately tracing and locating the local area where the problem lies, and generating a local topology tracing report containing the fault area's topology, impact range, and the status of key equipment.

[0040] Step S5: Perform multi-scenario adaptive analysis on the local area tracing results, construct a collaborative decision-making system, and generate a visualized tracing report that includes the topology of the fault area, the scope of impact, and the status of key equipment.

[0041] This step integrates the aforementioned technological achievements to construct a collaborative decision-making system oriented towards practical applications. First, various operating scenarios of the new power distribution network are classified, such as normal operation, overload operation, and fault recovery. Feature indicators for each scenario are extracted from the processing results of the previous steps to establish a scenario recognition model. For the different classified operating scenarios, a strategy library containing multiple tracing strategies is constructed. Each strategy is optimized for the topology tracing needs of a specific scenario, improving tracing efficiency and accuracy.

[0042] During system operation, a rule-based and priority-based collaborative decision-making mechanism is designed to automatically select an appropriate tracing strategy based on the currently identified operating scenario and coordinate the operating parameters and processing flows of each functional module to achieve adaptive adjustment of the system. To improve system availability, an intuitive visualization interface is developed to graphically display the local topology tracing results, including the fault area topology structure, impact range analysis, key equipment status summary, preliminary fault type judgment, and time-series evolution analysis. Interactive operation functions are provided to support maintenance personnel in conducting in-depth analysis and decision-making.

[0043] Finally, based on historical tracing cases and an expert knowledge base, the current tracing results are intelligently analyzed to generate targeted handling suggestions and operational guidance, such as isolation solutions, recovery steps, and risk warnings, assisting maintenance personnel in quickly responding to and handling problems. This multi-scenario topology tracing collaborative decision-making system not only improves the efficiency and accuracy of fault handling but also continuously optimizes tracing algorithms and decision-making strategies through the continuous accumulation and analysis of historical cases, enhancing the system's intelligence level and adaptability, and providing strong support for the safe and stable operation of the distribution network.

[0044] like Figure 2As shown, in step S1, based on the distribution network SCADA system, the voltage, current, and power of key nodes in the distribution network under different topologies are comprehensively collected to construct a historical measurement dataset containing topology labels, including the following sub-steps: Step S1.1: Analyze the characteristics and topology change patterns of the new distribution network, deploy intelligent terminal equipment at feeder terminals, distribution transformers, and distributed energy access points, and establish a data acquisition network covering the entire network; Step S1.2: Based on the data acquisition network, design a hierarchical data acquisition strategy to collect voltage, current, active power, reactive power, and power factor, and set sampling frequency and accuracy requirements for different parameters; Step S1.3: Classify the various operating modes and topologies that may exist in the distribution network, establish a standardized topology labeling system, assign a unique identifier to each topology, and establish a mapping relationship with the switch status information; Step S1.4: Perform time synchronization association between the multi-type measurement data and the topology label to form a historical dataset containing the correspondence between "measurement data-topology label", and store it in time series to obtain the historical measurement dataset containing the topology label; Step S1.5: After obtaining the historical measurement dataset containing topological structure labels, the method further includes: cleaning the measurement data in the historical dataset, detecting and processing outliers, duplicates, and obviously erroneous data points to ensure data accuracy; detecting missing values ​​in the cleaned measurement data, and processing missing data using interpolation, average imputation, or time-series-based prediction methods; normalizing the processed measurement data to unify electrical parameters with different dimensions and numerical ranges into the same numerical interval; conducting a quality assessment on the normalized measurement data, calculating data integrity, accuracy, and consistency indicators, and establishing a data quality evaluation system; and finally organizing and storing the measurement data that passes the quality assessment to ensure that the data quality meets the requirements for subsequent deep learning model training.

[0045] like Figure 3 As shown, step S2 involves preprocessing the historical measurement dataset, designing and training a Transformer deep learning model suitable for the characteristics of the distribution network, establishing a mapping relationship between measurement data and topology, and realizing intelligent identification of the topology of real-time input measurement data. This includes the following sub-steps: Step S2.1: Perform feature analysis on the historical measurement dataset to identify the distribution characteristics and variation patterns of the measurement data under different topological structures, and determine the input feature set of the deep learning model; Step S2.2: Based on the input feature set, design a Transformer model architecture suitable for distribution network measurement data. The Transformer model architecture includes a multi-head self-attention mechanism, an encoder-decoder structure, and position encoding. Specifically, it includes: designing a multi-head self-attention mechanism to capture multi-dimensional correlation features in the measurement data by computing attention weights in different subspaces in parallel using multiple attention heads; constructing an encoder structure to encode features of the input measurement data and establish long-distance dependencies within the sequence using the self-attention mechanism; constructing a decoder structure to generate topology category predictions based on the feature representations output by the encoder and fusing encoder and decoder information through a cross-attention mechanism; designing a position encoding mechanism to add position information to each position in the input sequence, enabling the model to understand the temporal characteristics and spatial distribution of the measurement data; and constructing a complete Transformer network architecture, integrating multi-head self-attention, feedforward neural networks, and residual connection components to obtain the intelligent topology recognition model. Step S2.3: Divide the historical measurement dataset into a training set, a validation set, and a test set according to a preset ratio, and expand the training samples through data augmentation techniques to improve the generalization ability of the model; Step S2.4: Train the Transformer model, determine the optimal model parameters through cross-validation and parameter grid search, improve the model recognition accuracy, and obtain the intelligent topology recognition model; Step S2.5: Input the real-time collected measurement data into the trained Transformer model, calculate the current distribution network topology type through forward inference, and form the topology identification result.

[0046] The above process specifically includes: Step S2.1: Perform feature analysis on the historical measurement dataset to identify the distribution characteristics and variation patterns of the measurement data under different topologies, and determine the input feature set for the deep learning model. In this step, a comprehensive statistical analysis and feature mining of the historical measurement dataset is first required to gain a deeper understanding of the distribution patterns of electrical parameters under different distribution network topologies. Specifically, by calculating the mean, variance, kurtosis, skewness, and other statistical characteristics of various electrical parameters (such as voltage, current, and power) under different topologies, key features that can effectively distinguish different topologies are identified. Simultaneously, correlation analysis is used to evaluate the interrelationships between the parameters, and a feature subset with high discriminative power and strong independence is selected.

[0047] Furthermore, time-frequency domain analysis captures the changing characteristics of measurement data over time, such as parameter fluctuation frequency, abrupt changes, and periodic patterns. These dynamic features are particularly important for identifying distribution network topology switching processes. For cases with similar topologies but different operating states, features reflecting load distribution and power flow direction need to be extracted, such as the direction of power transmission between nodes and line load rate distribution. Through these in-depth analyses, a set of input features that comprehensively characterizes the distribution network topology is ultimately determined, laying the foundation for the subsequent design and training of the Transformer model. These features include not only the original electrical parameters but also derived features constructed based on professional knowledge, collectively constituting the model's input space.

[0048] Step S2.2: Based on the input feature set, design a Transformer model architecture suitable for distribution network measurement data. This Transformer model architecture includes a multi-head self-attention mechanism, an encoder-decoder structure, and positional encoding. The design of the Transformer model needs to fully consider the characteristics of distribution network measurement data, including multivariability, temporal sequence, and spatial correlation. First, a multi-head self-attention mechanism is designed, using multiple attention heads to compute attention weights in different subspaces in parallel, capturing multi-dimensional correlation features in the measurement data. Each attention head can focus on different types of relationship patterns; for example, some heads may focus on the relationship between voltage and current, while others may focus on the relationship between power and topology changes. Through parallel computation and information fusion, a comprehensive capture of complex relationships is achieved.

[0049] The encoder structure is the core of the model. It encodes features from the input measurement data and uses a self-attention mechanism to establish long-range dependencies within the sequence. In the power distribution network scenario, this mechanism can effectively capture correlation patterns between different time points and different nodes, especially the long-distance effects caused by topology changes. The encoder typically consists of multiple layers of self-attention blocks and a feedforward neural network. Each layer is equipped with residual connections and layer normalization to improve training stability and model expressive power. Subsequently, a decoder structure is constructed, which generates topology category predictions based on the feature representation output by the encoder. The encoder and decoder information are fused through a cross-attention mechanism. The decoder can map the features extracted by the encoder to the topology category space, realizing the transformation from feature representation to specific topology structures.

[0050] The design of the location encoding mechanism is particularly important for processing distribution network measurement data. It adds location information to each location in the input sequence, enabling the model to understand the temporal characteristics and spatial distribution of the measurement data. In a distribution network, data at different times and nodes at different locations have an inherent sequential relationship. Through location encoding, the model can distinguish this sequential information, improving its ability to perceive spatiotemporal patterns. Finally, the above components are integrated to construct a complete Transformer network architecture, including multi-head self-attention, feedforward neural networks, and residual connections, forming an end-to-end intelligent topology identification model capable of extracting key features from complex measurement data and accurately identifying the current topology type.

[0051] Step S2.3: Divide the historical measurement dataset into training, validation, and test sets according to a preset ratio. Expand the training samples using data augmentation techniques to improve the model's generalization ability. Scientific division of the dataset is crucial for ensuring effective model training. Typically, the historical measurement dataset is divided into training, validation, and test sets in a 7:2:1 or 8:1:1 ratio to ensure consistent distribution across the three datasets and prevent data leakage. It is particularly important to note that for distribution network data, temporal continuity should be considered. A sliding time window approach can be used for partitioning, rather than simple random sampling, to maintain the temporal characteristics of the data.

[0052] To improve the generalization ability of the model, data augmentation of the training set is necessary. Considering the characteristics of distribution network measurement data, various augmentation techniques can be employed: adding Gaussian noise to simulate measurement errors; randomly masking partial features to simulate sensor faults; using sliding time windows to generate more samples; fine-tuning parameters to simulate different load conditions; and synthesizing minority class samples to address class imbalance. Particularly for rare topologies, physical model simulation or generative adversarial networks (GANs) can be used to synthesize samples, increasing the amount of training data for these classes. Furthermore, domain-knowledge-guided data augmentation can be introduced, such as generating physically plausible sample variants based on power flow calculations, or simulating measurement data under various fault scenarios. These data augmentation techniques significantly expand the diversity of training samples, enabling the model to cope with various complex situations in actual operation and improving its generalization ability.

[0053] Step S2.4: Train the Transformer model, determine the optimal model parameters through cross-validation and parameter grid search to improve the model's recognition accuracy, and obtain the intelligent topology recognition model. Model training is an iterative optimization process that requires careful design of the training strategy to achieve the best performance. First, initialize the Transformer model parameters, which can be done using pre-trained model weights or the Xavier / He initialization method. The training process uses the mini-batch gradient descent algorithm in conjunction with the Adam optimizer to effectively handle sparse gradients and adaptive learning rate adjustment. To prevent overfitting, an early stopping strategy is implemented; training stops when the validation set performance shows no improvement for several consecutive epochs.

[0054] To determine the optimal model parameters, a combination of k-fold cross-validation and parameter grid search was employed. Key hyperparameters included: number of attention heads, number of encoder / decoder layers, hidden layer dimension, learning rate, batch size, and dropout rate. The parameter space was systematically explored using grid search or Bayesian optimization to find the optimal parameter combination. When evaluating model performance, not only overall accuracy was considered, but also the recognition accuracy for various topological structures, particularly the ability to identify key or rare topological types. Furthermore, learning rate scheduling strategies, such as cosine annealing or step decay, were introduced to optimize the training process. Through these refined training and parameter optimization strategies, a high-performance intelligent topology recognition model was ultimately obtained, capable of accurately identifying various topological types, laying the foundation for subsequent feature space optimization.

[0055] Step S2.5: Input the real-time collected measurement data into the trained Transformer model, and calculate the current distribution network topology type through forward inference to form a topology identification result. In practical applications, the system needs to process the continuously flowing real-time measurement data and quickly provide accurate topology identification results. First, the real-time collected measurement data undergoes the same preprocessing operations as the training data, including normalization, missing value imputation, and feature extraction, to ensure that the data format is consistent with the model input requirements. Subsequently, the processed data is input into the trained Transformer model in batches, and the probability distribution of each topology is calculated through forward propagation.

[0056] During inference, the model utilizes a multi-head self-attention mechanism to capture key patterns in the measurement data, mapping these patterns to a topological category space through an encoder-decoder structure. The system selects the category with the highest probability as the identification result for the current topological structure, while outputting a confidence score to reflect the reliability of the identification result. To improve real-time performance, techniques such as model quantization and computational graph optimization can be used to accelerate the inference process. Furthermore, the system records historical identification results and improves identification stability through temporal smoothing or voting mechanisms, avoiding misjudgments caused by short-term fluctuations. For cases with a confidence score below a threshold, the system marks them as "uncertain," triggering a manual verification process to ensure the reliability of the identification result. This real-time topology identification capability provides an accurate topological foundation for subsequent local tracing and fault handling.

[0057] like Figure 4 As shown, step S3 involves analyzing the feature space distribution of the Transformer model, constructing a composite loss function that fuses the margin maximization objective function with the original classification loss function, and retraining the Transformer model to obtain optimized topology recognition results. This includes the following sub-steps: Step S3.1: Visualize and analyze the feature space extracted from the Transformer model. Use t-SNE or PCA dimensionality reduction techniques to project the high-dimensional feature vectors into a two-dimensional or three-dimensional space, and evaluate the distribution and clustering effect of different topologies in the feature space. This step aims to gain a deeper understanding of the model's internal representation capabilities and provide a basis for subsequent feature space optimization. First, extract the output of the feature layer from the trained Transformer model. These features are usually high-dimensional vectors (possibly hundreds or thousands of dimensions), representing the abstract representation of measurement data within the model. Since these high-dimensional features are difficult to visualize and analyze directly, dimensionality reduction techniques are needed to project them into a low-dimensional space.

[0058] t-SNE (t-distributed stochastic neighbor embedding) is a non-linear dimensionality reduction technique, particularly suitable for preserving the local structure of data, mapping similar high-dimensional data points to neighboring locations in a low-dimensional space. PCA (Principal Component Analysis), on the other hand, is a linear dimensionality reduction method that preserves the global structure and maximum variance direction of the data. These techniques visualize high-dimensional feature vectors as two-dimensional or three-dimensional scatter plots, where each point represents a sample, and different topological categories are color-coded. The visualization focuses on analyzing the following aspects: the degree of clustering of sample points within the same topological category to assess the model's consistency in representing that category; the clarity of boundaries between different topological categories to determine the model's classification ability; and the relative positions of easily confused topological structures in the feature space to identify potential recognition difficulties.

[0059] In addition, a series of quantitative indicators need to be calculated, such as intra-class distance (the average distance between sample points of the same class), inter-class distance (the distance between centroids of different classes), and separation (the ratio of inter-class distance to intra-class distance), to comprehensively evaluate the quality of the feature space. Through these analyses, problems existing in the feature space can be identified, such as the feature distribution of some classes being too scattered, the boundaries between different classes being blurred, or sample points of some classes being too close together, providing a clear direction for subsequent margin maximization optimization.

[0060] Step S3.2: Based on the feature space distribution analysis results, construct an objective function that maximizes the margin, thereby maximizing the distance between the target topology and the non-target topology in the feature space and improving the clarity of the classification boundary.

[0061] Margin maximization is an effective feature space optimization strategy. Its core idea is to increase the spacing between samples of different classes in the feature space, making the classification boundary clearer. Based on the analysis results of step S3.1, we first define the representation of sample points in the feature space: for an input sample xi, its representation in the feature space is f(xi), which is usually the output vector of a certain layer of the Transformer model. Then, we define the distance metric between sample points, which can be Euclidean distance, cosine distance, or Mahalanobis distance, etc., and select the most suitable metric method according to the characteristics of the distribution network data.

[0062] Next, we construct the objective function for maximizing the margin, which is mathematically expressed as: L margin= ∑∑max(0, m -d(f(xi), f(xj)) + d(f(xi), f(xk))), where xi and xj belong to different topological categories, and xi and xk belong to the same topological category, m is a preset margin threshold, and d(·,·) represents the distance function. The meaning of this function is: for any sample xi, we want its distance to samples xj of different categories to be at least m units greater than its distance to samples xk of the same category; otherwise, a penalty term will be generated. This triplet-form objective function can effectively increase the distance between different categories while compressing the distribution of samples of the same category.

[0063] In practical implementation, variations of margin optimization loss functions such as Triplet Loss, Contrastive Loss, or Center Loss can be used and adjusted according to the characteristics of distribution network topology identification. In particular, for easily confused topology pairs identified in step S3.1, their weights in the objective function can be increased, making the model focus more on margin optimization in these challenging regions. This targeted margin maximization objective function can significantly improve the distribution structure of the feature space, laying the foundation for improving the model's identification accuracy and robustness.

[0064] Step S3.3: The margin maximization objective function is fused with the original classification loss function to form a new composite loss function, so as to guide the model optimization process to pay more attention to the inter-class margin.

[0065] In this step, the margin maximization objective function constructed in step S3.2 needs to be organically integrated with the original classification loss function of the Transformer model to form a composite loss function that can simultaneously optimize classification accuracy and feature space structure. The original Transformer model is typically trained using the cross-entropy loss function, whose mathematical expression is: L CE = -∑yi·log(pi), where yi is the one-hot encoding of the true label and pi is the model's predicted probability for category i.

[0066] The composite loss function is designed using a weighted fusion approach: L total = α·L CE + β·L margin Here, α and β are weighting coefficients used to balance the contributions of the two types of losses. To make the training process more flexible and efficient, a dynamic weight adjustment strategy is designed. In the early stages of training, α is larger and β is smaller, allowing the model to focus on basic classification accuracy first. As training progresses, the value of β is gradually increased to strengthen the influence of margin maximization. This progressive optimization strategy can prevent the model from over-focusing on margins at the beginning and neglecting the basic goal of the classification task.

[0067] In addition, to prevent overfitting, an L2 regularization term is introduced: L total = α·L CE + β·L margin + λ·||W||², where ||W||² represents the L2 norm of the model parameters, and λ is the regularization coefficient. L2 regularization controls the complexity of the model and improves generalization ability by limiting the size of the model parameters. In practical implementation, a margin optimization loss function is constructed based on the distance metric between sample points in the feature space, minimizing the distance between samples of the same class and maximizing the distance between samples of different classes; the model parameters are updated through the gradient descent algorithm to achieve model optimization. This composite loss function design allows the model training process to focus on two objectives simultaneously: correctly classifying the distribution network topology and forming clear class boundaries in the feature space, thereby improving the robustness of the model in complex environments.

[0068] Step S3.4: Retrain the Transformer model and adjust the feature space distribution to make the feature clustering of the same topology category higher and the feature separation of different categories higher. Obtain the optimized topology identification result through the retrained Transformer model.

[0069] Based on the composite loss function designed in step S3.3, the Transformer model is retrained to optimize the feature space distribution. The retraining process adopts the idea of ​​transfer learning, starting from the base model trained in step S2.4 and retaining its weights as initial parameters. This allows the learned feature representation capabilities to be utilized, accelerating the retraining process and avoiding the instability of starting from scratch.

[0070] Retraining employs a smaller learning rate, typically 1 / 10 of the initial training learning rate, to avoid destroying already learned useful features. Simultaneously, a learning rate decay strategy, such as cosine annealing, is used to gradually stabilize the optimization process. To prevent overfitting, an early stopping mechanism is introduced, determining the timing of training termination based on performance metrics on the validation set. During training, the feature space is periodically visualized and metrically analyzed (e.g., after each epoch) to track changes in intra-class and inter-class distances and monitor the optimization effect.

[0071] If the margin optimization for certain categories is found to be unsatisfactory, sample weights can be adjusted or hard negative mining can be performed to increase the influence of these samples during training. Hard samples refer to those that the model is prone to misclassifying or have insufficient margins. By increasing their weights during training, the model can be prompted to pay more attention to these difficult regions. Through this refined retraining process, the distribution of the feature space will be gradually optimized, causing features of the same topological category to form tighter clusters, and the boundaries between different categories to become clearer. In particular, the separation between categories that were originally easily confused is significantly improved, thus obtaining an optimized topology recognition model.

[0072] Step S3.5: Input the real-time measurement data into the optimized model to obtain the topology identification result after maximizing the margin, thereby improving the identification accuracy and robustness of the model in complex scenarios.

[0073] After model retraining and feature space adjustment in step S3.4, an improved model with optimized feature space is obtained. In practical applications, real-time measurement data is input into this model to obtain the topology identification result with maximized margins. The specific implementation process includes: First, acquiring real-time measurement data of the distribution network from the SCADA system, including various electrical parameters such as voltage, current, and power; then, performing the same preprocessing operations as the training data on these data, such as normalization and missing value imputation; next, inputting the processed data into the optimized Transformer model for forward inference calculation; finally, obtaining the topology type prediction result and corresponding confidence score output by the model.

[0074] Compared to the original model, the optimized model exhibits significant advantages in several aspects: it is more stable in handling boundary cases, especially when measurement data approaches the boundaries of multiple topological categories, enabling more reliable judgments; it is more resistant to minor perturbations and noise in the input data, maintaining high identification accuracy even with poor data quality; its ability to distinguish similar topological structures is significantly improved, reducing the misclassification rate between easily confused categories; and its identification reliability is higher when measurement data is incomplete, enabling reasonable inferences based on limited information. Furthermore, the system sets a threshold based on confidence scores. When the confidence score of the identification result falls below the threshold, an uncertainty warning is issued, indicating that more data or manual intervention may be needed to confirm the current topological state. This mechanism further enhances the system's adaptability and practicality in complex scenarios, providing a high-quality topological foundation for subsequent local topology tracing.

[0075] like Figure 5As shown, in step S4, based on the optimized topology identification results, a distribution network topology model is constructed and weights are assigned. An improved depth-first search algorithm is then used to quickly traverse and locate the local area where the problem occurs when a fault or abnormal condition occurs. This includes the following sub-steps: Step S4.1: Based on the optimized topology identification results, establish a graph structure model of the distribution network, where nodes represent buses, distribution transformers, branch points, and load points in the distribution network, and edges represent line connection relationships.

[0076] In this step, the topology identification results obtained in the previous steps need to be transformed into a standard graph theory model so that graph algorithms can be applied for subsequent tracing analysis. First, the basic elements of the graph model are defined: nodes and edges. In the distribution network topology, nodes represent physical equipment or electrical connection points, including busbars (such as 10kV distribution busbars, 400V low-voltage busbars), distribution transformers (such as 10kV / 400V transformers), branch points (such as T-junctions, ring main units), load points (such as residential distribution boxes, industrial user access points), and distributed energy access points (such as photovoltaic power stations, wind farm access points), etc.; edges represent the physical connections between these devices, such as overhead lines, cables, and switchgear.

[0077] The graph model is represented using an adjacency list or adjacency matrix. For large-scale distribution networks, adjacency lists are generally more efficient because the connections in the distribution network are relatively sparse. In the adjacency list, each node maintains a list of nodes directly connected to it, and also stores attribute information such as connection type and line parameters. The graph model construction process includes four main steps: First, extract the basic topology structure from the static topology library of the distribution network, including equipment connection relationships and default parameters; second, update the switch states and connection relationships in the graph based on the optimized topology identification results to ensure that the graph model reflects the current actual topology state; third, map the current measurement data to the corresponding nodes and edges as attribute values ​​for the nodes and edges; finally, check the connectivity of the graph to ensure that the model correctly reflects the current physical connection state of the distribution network and handle any possible isolated nodes or illegal connections. This graph structure model not only represents the static topology of the distribution network, but also reflects the real-time operating status through attribute values, providing a complete data foundation for subsequent depth-first search.

[0078] Step S4.2: Analyze the electrical parameter values ​​in the real-time measurement data, assign weights to the nodes and edges in the graph structure model, and adjust the weight values ​​in real time as the measurement data is updated.

[0079] Weight assignment is a crucial step in graph model construction, directly impacting the efficiency and accuracy of subsequent search algorithms. First, based on the optimized topology identification results, a basic topology structure is extracted, including device connection relationships and default parameters, establishing the basic graph structure of nodes and edges. This process requires obtaining basic equipment information from the power distribution network asset management system or GIS system, such as transformer capacity, line type, and rated parameters, as the fundamental attributes of the graph structure. Subsequently, the switch states and connection relationships in the graph are updated according to the optimized topology identification results, mapping the current measurement data to the corresponding nodes and edges as attribute values. These attributes include real-time electrical parameters such as voltage, current, power, and frequency, as well as equipment status information such as switch position and protection device status.

[0080] When initially assigning weights to nodes, multiple factors are considered: the importance of node type (e.g., the importance of the main bus is higher than that of the terminal load point), the degree of abnormality in electrical parameters (e.g., the degree to which voltage deviates from the rated value), connection centrality (the number of devices connected to the node, reflecting the node's central position in the network), and historical fault frequency (reflecting the node's reliability). These factors are combined and calculated using a weighted method to obtain the initial weight value of the node. Similarly, the initial assignment of edge weights considers multiple factors: line type and capacity (e.g., the weight of the main line is higher than that of the branch line), load factor (the ratio of current load to rated capacity), impedance value (affecting power transmission efficiency), and status indicators (e.g., temperature, insulation condition). The edge weights reflect the importance of the line and its current operating status, which is particularly important for fault tracing.

[0081] Establishing a dynamic weight update mechanism is crucial for ensuring the real-time performance of the graph model. As measurement data is updated, the system periodically (e.g., every few seconds or whenever new measurement data arrives) recalculates the weights of nodes and edges. Updates are performed incrementally, only updating nodes and edges that have changed, reducing computational burden. Furthermore, weight calculations consider time factors, such as assigning higher weights to recently changed parameters, reflecting the system's sensitivity to real-time changes. Through this dynamic weight mechanism, the graph model accurately reflects the current state of the distribution network, providing real-time and accurate weight information for subsequent depth-first searches, guiding the search direction and priority.

[0082] Step S4.3: Design an improved depth-first search algorithm based on the characteristics of the distribution network, adding pruning strategies and heuristic search mechanisms to improve search efficiency and accuracy.

[0083] Traditional depth-first search (DFS) algorithms can be inefficient when dealing with large-scale distribution networks and do not consider the weights of nodes and edges, thus requiring targeted improvements. The improved DFS algorithm is optimized in three main aspects: pruning strategies, heuristic search mechanisms, and parallel processing. First, various pruning strategies are introduced to reduce unnecessary search paths: node weight-based pruning, where the search stops when a node's weight falls below a preset threshold, helping to quickly eliminate areas unlikely to have problems; path length-based pruning, which limits the search depth and avoids getting stuck on excessively long paths, particularly suitable for radial distribution networks; and electrical characteristic-based pruning, such as terminating the search in a direction when power is interrupted or the current is zero, which utilizes the physical characteristics of the power system to guide the search.

[0084] Secondly, heuristic search mechanisms are incorporated to improve search efficiency: prioritizing high-weight nodes and edges allows the search to progress faster towards potential problem areas; leveraging the radial characteristics of the distribution network, searches are prioritized along current flow, aligning with the physical laws of power system fault propagation; and historical fault data is combined to give higher search priority to frequently problematic areas, using historical experience to guide the current search. These heuristic strategies make the search process more intelligent, enabling rapid location of potential problem areas. Furthermore, for large distribution networks, parallel search optimization can be implemented: the network can be divided into multiple sub-regions for simultaneous searching, followed by merging the results; or the search can begin simultaneously from multiple possible starting points, improving coverage and speed.

[0085] In terms of algorithm implementation, a recursive approach or an explicit stack structure is adopted, and access markers are added to avoid repeated visits. During the search process, the path weights are dynamically updated, and the weights of visited nodes and edges are comprehensively considered to form a cumulative score, which guides the subsequent search direction. This improved DFS algorithm can more efficiently locate problem areas in the distribution network topology map, especially showing significant advantages in complex topologies and large-scale networks, greatly improving the efficiency and accuracy of fault tracing.

[0086] Step S4.4: When a fault or abnormal condition is detected, starting from the abnormal point, the improved depth-first search algorithm is used to traverse and search the weighted graph model to locate the local area where the problem is located.

[0087] In actual operation, when the distribution network monitoring system detects a fault or abnormal condition, it needs to quickly locate the problem area. First, determine the starting point of the search. There are usually two situations: when a fault is clearly detected at a certain node (such as a circuit breaker tripping or a protection device operating), the node is directly used as the starting point; when the system detects an overall abnormality but the specific location cannot be determined (such as voltage fluctuations or power anomalies), the search can start simultaneously from multiple key nodes (such as the main transformer outgoing line or the feeder head), or the node with the most significant abnormal indicators can be selected as the starting point.

[0088] During the search process, the system uses specific anomaly identification rules to determine whether there are problems with nodes or areas: electrical parameter anomaly detection, such as voltage exceeding limits (above ±7% of rated value), sudden current changes (changes exceeding 50% in a short period), and reversed power flow (opposite to normal flow direction); equipment status anomaly detection, such as switch tripping, protection device activation, and equipment temperature exceeding limits; and topology consistency checks to determine whether the local topology is consistent with expectations, such as an unexpected opening or closing of a ring network. When nodes or areas that meet these anomaly conditions are found, they are marked as potential fault points.

[0089] To improve location accuracy, the system employs a multi-source information fusion strategy: DFS search results are cross-validated with other data sources (such as protection device reports, user complaints, SCADA alarms, etc.) to comprehensively assess the probability of each potential fault point. For each potential fault point, a confidence score is calculated, considering factors such as parameter anomaly degree, equipment status anomaly degree, topology consistency deviation, and external information support, and the potential fault points are ranked according to their confidence scores. If the confidence scores of multiple points are close, it may indicate a cascading or multi-point fault, and the system will output the area formed by these points as the fault area. This fault location method based on graph theory and multi-dimensional evaluation can effectively handle complex fault scenarios, improve the accuracy and reliability of tracing, and provide precise location information for subsequent fault handling.

[0090] Step S4.5: Based on the tracing and location results, generate a local topology tracing report that includes the topology of the fault area, the scope of impact, and the status of key equipment.

[0091] This step transforms the tracing and location results from step S4.4 into a comprehensive and intuitive technical report, providing decision support for operations and maintenance personnel. First, the system extracts a local topology sub-graph centered on the fault point, clearly displaying the network structure of the fault area, including device connections, line routing, and switch status. This part is typically presented graphically, marking the fault point and critical devices, using different colors and icons to represent device type and status, such as red for faulty devices, yellow for affected devices, and green for normal devices.

[0092] Secondly, the system performs an impact range analysis. Based on the local topology, it calculates the number of users potentially affected by the fault, critical loads (such as hospitals, schools, and industrial users), power loss, and other indicators to assess the severity and urgency of the fault. The impact range analysis also includes predicting the possibility of fault propagation and identifying potential secondary fault points, such as cascading trips caused by overload. Then, the system generates a summary of the status of key equipment, listing all critical equipment within the fault area and their current status, including switch positions, protection device operation status, equipment load rate, temperature, and other operating parameters, as well as the degree of deviation of abnormal parameters, helping maintenance personnel to fully understand the equipment status.

[0093] Based on local topology analysis and equipment status, the system makes a preliminary judgment on the fault type, such as short-circuit fault, grounding fault, and equipment overload, and provides the basis and confidence level for the judgment. In addition, the system traces the topology changes and parameter changes before and after the fault occurs, constructing a timeline of fault evolution to help understand the fault's development mechanism and root cause. Finally, the tracing report includes targeted handling suggestions, such as isolation schemes (suggested switching equipment to be operated), recovery steps (such as load transfer paths), and risk warnings (such as potential problems during operation). The report adopts a hierarchical structure, with a key information summary at the top for rapid decision-making; the lower layers contain detailed technical data for in-depth analysis. This comprehensive local topology tracing report not only helps to quickly locate and handle current faults, but can also be recorded and analyzed as a historical case for continuous improvement of the tracing algorithm and accumulation of fault handling experience.

[0094] Step S5 involves performing multi-scenario adaptive analysis on the local area tracing results, constructing a collaborative decision-making system, and generating a visualized tracing report containing the fault area topology, impact range, and key equipment status. This includes the following sub-steps: Step S5.1: Classify the various operating scenarios of the new power distribution network, such as normal operation, overload operation, fault recovery, etc., and extract the characteristic indicators of each scenario from the processing results.

[0095] Distribution networks face various scenarios in actual operation, each with different topology tracing requirements and strategies. First, the system needs to establish a comprehensive scenario classification system, including but not limited to: normal operation scenarios (stable network topology, electrical parameters within normal range); overload operation scenarios (some lines or equipment loads approach or exceed rated values, but protection has not yet been triggered); fault scenarios (short circuits, grounding faults, etc., causing protection actions); fault recovery scenarios (network reconstruction process after fault isolation); planned maintenance scenarios (planned power outages and topology adjustments); distributed energy fluctuation scenarios (network fluctuations caused by changes in output from photovoltaics, wind power, etc.); and sudden load change scenarios (sudden connection or disconnection of large loads), etc.

[0096] For each scenario, the system extracts feature indicators from historical processing results to construct a scenario identification model. These feature indicators include: electrical parameter characteristics (such as voltage stability indicators, load rate distribution, power factor changes, etc.); topological characteristics (such as network connectivity, number of loops, radial distribution, etc.); equipment status characteristics (such as switch operating frequency, protection device status, etc.); and time characteristics (such as weekdays / holidays, peak and valley periods, etc.). Through these feature indicators, the system can quickly identify the current operating scenario of the distribution network, providing a basis for subsequent topology tracing strategy selection.

[0097] Furthermore, the system establishes scenario transition models to analyze the transition patterns and triggering conditions between different scenarios, such as the transition conditions from normal operation to overload operation, and the process characteristics from fault to recovery. This scenario classification and feature extraction not only helps with topology tracing but also supports predictive analysis of the distribution network, such as anticipating potential operational risks and taking preventative measures in advance. Through continuous learning and updates, the scenario classification model can adapt to the evolution of the distribution network and the emergence of new operating modes, maintaining the system's advanced nature and adaptability.

[0098] Step S5.2: For different operational scenarios of the classification, build a strategy library containing multiple traceability strategies, with each strategy optimized for the topology traceability requirements of a specific scenario.

[0099] The focus, methods, and efficiency requirements of topology tracing vary across different operational scenarios. Therefore, a comprehensive tracing strategy library is needed to provide the most suitable tracing solutions for different scenarios. Firstly, for normal operation scenarios, the tracing strategy focuses on verifying the integrity of the topology and identifying potential risk points. It employs comprehensive but low-frequency network scanning, focusing on critical nodes and areas with historical problems, with preventative maintenance as the primary objective. For overload operation scenarios, the tracing strategy shifts to load distribution analysis and potential bottleneck identification. It uses a search algorithm weighted by load rate, prioritizing the examination of high-load areas and assessing the feasibility of load shifting to prevent overload from developing into failure.

[0100] In fault scenarios, tracing strategies require rapid response and precise location. They employ a combination of multi-starting-point parallel search and fault-characteristic-based directional search, prioritizing protection action areas and considering fault cascading effects to isolate the fault source in the shortest possible time. For fault recovery scenarios, tracing strategies focus on the rationality and security of network reconstruction, using constraint-based path search to ensure that the recovery plan does not lead to new overloads or violate safety constraints, while maximizing the restored power supply range. In planned maintenance scenarios, tracing strategies need to simulate the impact of maintenance in advance, using predictive analytics and virtual topology testing to assess the feasibility of maintenance plans and their impact on the system.

[0101] For distributed energy fluctuation scenarios, the tracing strategy focuses on changes in power flow and voltage fluctuations, employing dynamic tracing based on power flow analysis to identify fluctuation sources and assess their impact range. In load abrupt change scenarios, the tracing strategy needs to quickly identify abrupt change points and assess network capacity, using change point detection and impact propagation analysis based on time-series data. These strategies are not isolated but form an organic strategy library, with each strategy including specific algorithm parameter settings, search priority rules, anomaly judgment criteria, and output format definitions. Through this scenario-adaptive strategy library, the system can select the most suitable tracing method under different operating conditions, improving tracing efficiency and accuracy.

[0102] Step S5.3: Design a rule-based and priority-based collaborative decision-making mechanism to automatically select a suitable tracing strategy based on the current operating scenario and coordinate the operating parameters and processing flow of each module.

[0103] The collaborative decision-making mechanism is the core of the system's intelligence. It selects the most suitable tracing strategy from the strategy library based on the currently identified operating scenario and coordinates the collaborative work of various functional modules. First, the system establishes a rule-based decision framework, including scenario identification rules, strategy selection rules, and conflict resolution rules. The scenario identification rules, based on the feature indicators extracted in step S5.1, determine the current operating scenario of the distribution network using methods such as fuzzy logic or decision trees. The strategy selection rules, based on the identified scenario, select the most suitable tracing strategy from the strategy library constructed in step S5.2, considering the strategy's applicability, historical effects, and current resource status. The conflict resolution rules handle situations where multiple strategies may be applicable or the scenario judgment is uncertain, determining the final strategy through priority ranking or weighted fusion.

[0104] Secondly, the system coordinates parameters and synchronizes processes among its modules. Once a traceability strategy is selected, the system automatically adjusts the operating parameters of each functional module, such as the sampling frequency and accuracy of the data acquisition module, the inference threshold of the Transformer model, the weight calculation formula of the graph model, and the pruning conditions of the DFS algorithm, ensuring that the working modes of these modules match the selected traceability strategy. Simultaneously, the system coordinates the processing flow of each module to ensure smooth data flow. For example, in high-urgency scenarios, some preprocessing steps may be simplified, allowing direct entry into the core traceability process to accelerate response time.

[0105] Furthermore, the collaborative decision-making mechanism also includes adaptive learning capabilities. By recording the effects of different strategies in various scenarios, it continuously optimizes strategy selection rules and parameter adjustment strategies. For example, if a strategy succeeds multiple times in a specific scenario, the system will increase the selection priority of that strategy in similar scenarios; if a parameter setting improves traceability efficiency, the system will record it and reuse the setting in appropriate scenarios. This rule-based and priority-based collaborative decision-making mechanism enables the system to intelligently adapt to different operating scenarios, provide the most suitable traceability service, and continuously improve decision quality through continuous learning.

[0106] Step S5.4: Develop an intuitive visualization interface to display the local topology tracing results graphically and provide interactive operation functions to support operations and maintenance personnel in conducting in-depth analysis.

[0107] The visual interface is a crucial window for interaction between the system and maintenance personnel. A well-designed visual interface can significantly improve system availability and decision support capabilities. Firstly, the system develops a responsive visual interface based on web technology, supporting multi-terminal access (PC, tablet, mobile devices) to ensure maintenance personnel can easily access traceability results in different scenarios. The interface adopts a partitioned design, mainly including: a topology diagram display area, which graphically shows the distribution network structure, using different colors and icons to represent equipment types and statuses; a parameter monitoring area, which displays key electrical parameters and equipment status in real time, supporting parameter trend graphs and threshold alarms; a traceability results area, which displays fault location and impact analysis results; and an operation control area, providing interactive operation and decision support functions.

[0108] The topology map employs a multi-layered design, supporting seamless scaling from a global view to local details, allowing maintenance personnel to quickly locate areas of interest and view detailed information. Graphical elements use standardized power system symbols, combined with color coding (e.g., red for faults, yellow for warnings, and green for normal operation) and dynamic effects (e.g., flashing for anomalies, flowing arrows for power flow), intuitively displaying network status. The system provides rich interactive functions, such as clicking on devices to view detailed parameters, dragging and dropping to adjust views, selecting areas for batch operations, and using a timeline to replay the fault evolution process, supporting in-depth analysis and hypothesis testing by maintenance personnel.

[0109] In addition, the visualization interface integrates various auxiliary analysis tools, such as comparison views (comparing topology status at different time points or with different solutions), heatmaps (intuitively displaying load distribution or anomaly levels), and correlation analysis diagrams (showing the influence relationships between devices), helping operations and maintenance personnel understand problems from multiple perspectives. The system also supports custom views and report export, allowing operations and maintenance personnel to customize the displayed content according to their focus and export analysis results as standard format reports. Through this intuitive and interactive visualization interface, operations and maintenance personnel can quickly understand tracing results, conduct in-depth analysis, and make informed decisions, significantly improving the efficiency and accuracy of fault handling.

[0110] Step S5.5: Based on historical traceability cases and expert knowledge base, perform intelligent analysis on the current traceability results to generate targeted processing suggestions and operation guidance to assist operation and maintenance personnel in responding to and handling problems quickly.

[0111] This step elevates the system from a simple tracing tool to an intelligent decision support system. First, the system constructs a comprehensive historical tracing case library and an expert knowledge base. The case library records the tracing results, handling methods, and effect evaluations of various historical faults, including fault characteristics, topological environment, handling steps, and final results. The expert knowledge base contains the experience rules, handling procedures, and best practices of power system experts, stored in a structured manner for easy system retrieval and reasoning. When the system generates new tracing results, it automatically matches them with historical cases in the case library, identifies similar cases, and references their handling methods and effects.

[0112] Based on case matching and knowledge reasoning, the system generates targeted handling suggestions, including: fault isolation solutions, which clearly specify the recommended switching equipment and sequence to isolate the fault with minimal impact; power restoration solutions, which provide load transfer paths and operating procedures to maximize the restoration of power supply areas; equipment maintenance suggestions, which indicate the equipment that needs to be inspected or repaired and the points of concern; and safety warnings, which alert users to potential risks and precautions during the operation. These suggestions are not simple, fixed procedures, but rather personalized solutions dynamically generated based on the current specific situation, taking into account factors such as network topology, load distribution, and equipment status.

[0113] The system also provides detailed operation guidance, translating handling suggestions into specific, actionable steps, including operating equipment, operation sequence, expected results, and verification methods, forming a complete operation manual. For complex situations, the system provides multiple alternative solutions, analyzing the advantages, disadvantages, and applicable conditions of each solution for maintenance personnel to choose from. Furthermore, the system has learning capabilities, continuously optimizing and updating its knowledge base by recording the actual operations and handling effects of maintenance personnel, improving the accuracy and practicality of its suggestions. This intelligent analysis and suggestion generation based on historical experience and expert knowledge significantly improves the efficiency and quality of fault handling, providing valuable decision support, reducing operational risks, and ensuring the safe and stable operation of the distribution network, especially for inexperienced maintenance personnel.

[0114] like Figure 6 As shown in the figure, this embodiment of the invention also provides a novel real-time topology tracing system for power distribution networks, comprising: The data acquisition module is used to comprehensively collect voltage, current, and power data of key nodes in the distribution network under different topologies based on the distribution network SCADA system, and to build a historical measurement dataset containing topology labels. The intelligent identification module is used to preprocess the historical measurement dataset, design and train a Transformer deep learning model suitable for the characteristics of the distribution network, establish a mapping relationship between measurement data and topology, and realize intelligent identification of topology of real-time input measurement data. The feature optimization module is used to construct a composite loss function that combines the margin maximization objective function with the original classification loss function based on the feature space distribution analysis of the Transformer model, and to retrain the Transformer model to obtain the optimized topology recognition result. The local tracing module is used to construct a distribution network topology model and assign weights based on the optimized topology identification results. It uses an improved depth-first search algorithm to quickly traverse and trace the local area where the problem is located when a fault or abnormal situation occurs. The collaborative decision-making module is used to perform multi-scenario adaptive analysis on the traceability results of the local area, build a collaborative decision-making system, and generate a visual traceability report that includes the topology of the fault area, the scope of impact, and the status of key equipment.

[0115] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention. Example

[0116] The novel real-time topology tracing method for power distribution networks provided in this invention includes the following steps: Step S1: Multi-source aggregation of measurement data based on the power distribution network SCADA system; Step S2: Intelligent topology recognition based on Transformer deep learning; Step S3: Feature space optimization based on the maximum margin principle; Step S4: Local topology tracing based on graph theory depth-first search; Step S5: Multi-scenario topology tracing collaborative decision-making system.

[0117] Step S1, which involves the multi-source aggregation of measurement data based on the distribution network SCADA system, includes the following sub-steps: Step S1.1: Design and deployment of SCADA system access points for the distribution network. By analyzing the characteristics and topology changes of the new distribution network, the locations of key monitoring points are determined. Smart terminal devices are deployed at feeder terminals, distribution transformers, distributed energy access points, and other locations to establish a data acquisition network covering the entire network.

[0118] Step S1.2: Development of Multi-Type Measurement Data Acquisition Strategy. Based on the acquisition network deployed in Step S1.1, a hierarchical data acquisition strategy is designed to acquire multiple types of electrical parameters such as voltage, current, active power, reactive power, and power factor, and the sampling frequency and accuracy requirements for different parameters are set.

[0119] Step S1.3: Construction of Topology Labeling System. Based on the various operating modes and topologies that may exist in the distribution network, a standardized topology labeling system is established, assigning a unique identifier to each topology and establishing a mapping relationship with switch status information.

[0120] Step S1.4: Historical measurement data and topology labels are associated and stored. The multi-type measurement data collected in step S1.2 are time-synchronized and associated with the topology labels constructed in step S1.3 to form a historical dataset containing the correspondence between "measurement data and topology labels", and stored in time series.

[0121] Step S1.5: Data Preprocessing and Quality Control. The historical dataset stored in Step S1.4 undergoes preprocessing operations such as data cleaning, outlier detection, missing value handling, and normalization to ensure data quality meets the requirements for subsequent deep learning model training. Specifically, this includes: cleaning the measurement data in the historical dataset, detecting and handling outliers, duplicates, and obviously erroneous data points to ensure data accuracy; performing missing value detection on the cleaned measurement data, using interpolation, mean imputation, or time-series-based prediction methods to handle missing data; normalizing the processed measurement data to unify electrical parameters with different dimensions and numerical ranges into the same numerical interval; conducting a quality assessment of the normalized measurement data, calculating data integrity, accuracy, and consistency indicators, and establishing a data quality evaluation system; and finally, organizing and storing the measurement data that passes the quality assessment to ensure data quality meets the requirements for subsequent deep learning model training.

[0122] Step S2, the intelligent topology recognition based on Transformer deep learning, includes the following sub-steps: Step S2.1: Feature Analysis of Distribution Network Measurement Data. Perform feature analysis on the historical measurement dataset output from Step S1 to identify the distribution characteristics and variation patterns of measurement data under different topologies, and determine the input feature set for the deep learning model.

[0123] Step S2.2: Transformer Model Architecture Design. Based on the feature analysis results of Step S2.1, a Transformer model architecture suitable for distribution network measurement data is designed, including core components such as a multi-head self-attention mechanism, an encoder-decoder structure, and position encoding. Specifically, this includes: designing a multi-head self-attention mechanism to capture multi-dimensional correlation features in the measurement data by computing attention weights in different subspaces in parallel through multiple attention heads; constructing an encoder structure to encode features of the input measurement data and establish long-distance dependencies within the sequence using the self-attention mechanism; constructing a decoder structure to generate topology category predictions based on the feature representations output by the encoder and fusing encoder and decoder information through a cross-attention mechanism; designing a position encoding mechanism to add position information to each position in the input sequence, enabling the model to understand the temporal characteristics and spatial distribution of the measurement data; and constructing a complete Transformer network architecture that integrates multi-head self-attention, feedforward neural networks, and residual connection components to obtain an intelligent topology recognition model.

[0124] Step S2.3: Model Training Dataset Partitioning and Augmentation. The historical measurement dataset output in Step S1 is divided into training, validation, and test sets according to a certain ratio. Data augmentation techniques are used to expand the training samples and improve the model's generalization ability.

[0125] Step S2.4: Transformer Model Training and Parameter Optimization. The Transformer model designed in Step S2.2 is trained using the training set partitioned in Step S2.3. Optimal model parameters are determined through methods such as cross-validation and parameter grid search to improve the model's recognition accuracy.

[0126] Step S2.5: Real-time Measurement Data Topology Identification. The real-time collected measurement data is input into the Transformer model trained in Step S2.4. The topology type of the current distribution network is calculated through forward inference, forming the topology identification result.

[0127] Step S3, feature space optimization based on the maximum margin principle, includes the following sub-steps: Step S3.1: Feature Space Distribution Analysis. The feature space extracted by the Transformer model in Step S2 is visualized and analyzed. t-SNE or PCA dimensionality reduction techniques are used to project the high-dimensional feature vectors onto a two-dimensional or three-dimensional space to evaluate the distribution of different topologies in the feature space and the clustering effect.

[0128] In this sub-step, the output of the feature layer is extracted from the trained Transformer model. These features are typically high-dimensional vectors representing the internal representation of the measurement data within the model. For ease of analysis, dimensionality reduction techniques such as t-SNE (t-distributed Stochastic Neighbor Embedding) or PCA (Principal Component Analysis) are used to project the high-dimensional feature vectors into two- or three-dimensional space for visualization.

[0129] The visualization focuses on the distribution of sample points across different topological categories, particularly: 1) the clustering of sample points within the same topological category, used to assess the model's consistency in representing that category; 2) the clarity of boundaries between different topological categories, used to determine the model's classification ability; and 3) the relative positions of easily confused topologies in the feature space, identifying potential recognition challenges. Furthermore, statistical metrics for intra-class and inter-class distances are calculated, such as average intra-class distance, minimum inter-class distance, and separation ability.

[0130] These analyses reveal problems in the feature space, such as overly dispersed feature distributions for certain topological categories, blurred boundaries between categories, or excessively close sample points for some categories. These findings will directly guide the design of the margin maximization objective function in step S3.2, making the optimization direction more precise.

[0131] Step S3.2: Constructing the Margin Maximization Objective Function. Based on the analysis results of Step S3.1, a margin maximization objective function is constructed to maximize the distance between the target topology and the non-target topology in the feature space, thereby improving the clarity of the classification boundary.

[0132] Based on the feature space analysis results of step S3.1, an objective function that maximizes the margin is constructed. The core idea of ​​this function is to increase the distance between the target topology and the non-target topology in the feature space, thereby improving the clarity of the classification boundary.

[0133] Specifically, we first define the representation of a sample point xi in the feature space as f(xi). For any two sample points xi and xj, the distance between them can be represented as d(f(xi), f(xj)), typically using Euclidean distance or cosine distance. Then, we construct an objective function of the following form: L margin = ∑∑max(0, m - d(f(xi), f(xj)) + d(f(xi), f(xk))) Here, xi and xj belong to different topological categories, while xi and xk belong to the same topological category, and m is a preset margin threshold. The meaning of this function is: for any sample xi, we want its distance to samples of different categories xj to be at least m units greater than its distance to samples of the same category xk; otherwise, a penalty term will be applied.

[0134] In practical implementation, variations of margin optimization loss functions such as Triplet Loss or Contrastive Loss can be used and adjusted to suit the characteristics of distribution network topology identification. For example, for frequently switching topology pairs, their weights in the objective function can be increased, making the model focus more on margin optimization for these easily confused categories.

[0135] Step S3.3: Improve the model loss function. The margin maximization objective function constructed in step S3.2 is merged with the original classification loss function to form a new composite loss function, guiding the model optimization process to pay more attention to the inter-class margin.

[0136] In this sub-step, the margin maximization objective function constructed in step S3.2 is fused with the original classification loss function to form a new composite loss function. The original Transformer model typically uses the cross-entropy loss function for training, whose mathematical expression is: L CE = -∑yi·log(pi) Where yi is the one-hot encoding of the true label, and pi is the model's predicted probability for class i.

[0137] To incorporate the objective of maximizing margins, a composite loss function is designed as follows: L total = α·L CE + β·L margin Here, α and β are weighting coefficients used to balance the contributions of the two losses. These coefficients can be fixed values ​​or parameters that are dynamically adjusted during training. For example, a dynamic weighting strategy can be designed: in the early stages of training, α is larger and β is smaller, causing the model to focus first on basic classification accuracy; as training progresses, the value of β is gradually increased to strengthen the influence of margin maximization.

[0138] In addition, regularization terms can be introduced to prevent overfitting, such as L2 regularization: L total = α·L CE + β·L margin + λ·||W||² Where ||W||² represents the L2 norm of the model parameters, and λ is the regularization coefficient.

[0139] This composite loss function design allows the model optimization process to focus on two objectives simultaneously: correctly classifying the distribution network topology and forming clear class boundaries in the feature space. This is crucial for improving the model's robustness in complex scenarios and noisy environments, especially for the dynamic changes in topology commonly found in new distribution networks.

[0140] Step S3.4: Model Retraining and Feature Space Adjustment. The Transformer model is retrained using the improved loss function from Step S3.3 to adjust the feature space distribution, making features of the same topological category more clustered and features of different categories more separated.

[0141] Based on the improved composite loss function in step S3.3, the Transformer model is retrained to adjust the feature space distribution. First, starting from the base model trained in step S2.4, its weights are retained as initial parameters. This allows the learned feature representation capabilities to be utilized, accelerating the retraining process.

[0142] The retraining process employs the following strategies: 1) Use a smaller learning rate, typically 1 / 10 of the initial training learning rate, to avoid destroying the learned useful features; 2) Use a learning rate decay strategy, such as cosine annealing, to gradually stabilize the optimization process; 3) Introduce an early stopping mechanism to determine the timing of training termination based on performance metrics on the validation set, preventing overfitting.

[0143] During training, the feature space is periodically visualized and metrically analyzed (e.g., after each epoch) to track changes in intra-class and inter-class distances. The expected trends are: sample points of the same topological class gradually cluster together, forming tight clusters; the boundaries between different classes become clearer, especially for classes that were previously easily confused; and the minimum inter-class distance gradually increases, meeting the preset margin threshold requirements.

[0144] If the margin optimization for certain categories is found to be unsatisfactory, the sample weights can be adjusted or hard negative mining can be performed to increase the influence of these samples during training. Through this iterative optimization process, the distribution of the feature space will be gradually adjusted, making features of the same topological category more clustered and features of different categories more separated.

[0145] Step S3.5: Output the optimized topology identification results. Input the real-time measurement data into the optimized model in step S3.4 to obtain the topology identification results with maximized margins, thereby improving the model's identification accuracy and robustness in complex scenarios.

[0146] After model retraining and feature space adjustment in step S3.4, an improved model with optimized feature space is obtained. In this sub-step, real-time measurement data is input into the model to obtain the topology identification result with maximized margins.

[0147] The specific implementation process is as follows: First, the measurement data of the distribution network, including various electrical parameters such as voltage, current, and power, are obtained in real time from the SCADA system. Then, the same preprocessing operations as the training data are performed on these data, such as normalization and missing value imputation. Next, the processed data is input into the optimized Transformer model for forward inference calculation. Finally, the topology type prediction result and the corresponding confidence score output by the model are obtained.

[0148] Compared with the original model, the optimized model has the following advantages: 1) It is more stable in handling boundary cases, especially when the measurement data is close to the boundary of multiple topological categories; 2) It has stronger resistance to small perturbations and noise in the input data; 3) It has a significantly improved ability to distinguish similar topological structures; 4) It has higher reliability in the case of incomplete measurement data.

[0149] Furthermore, a threshold can be set based on the confidence score. When the confidence score of the identification result falls below the threshold, the system will issue an uncertainty warning, indicating that more data or manual intervention may be needed to confirm the current topology status. This mechanism further enhances the system's adaptability and practicality in complex scenarios.

[0150] Step S4, the local topology tracing based on graph theory depth-first search, includes the following sub-steps: Step S4.1: Construction of Distribution Network Topology Graph Model. Based on the real-time topology identification results output in Step S3, a graph structure model of the distribution network is established, where nodes represent equipment such as buses and transformers in the distribution network, and edges represent line connection relationships.

[0151] In this sub-step, a graph structure model of the distribution network is established based on the real-time topology identification results output in step S3. First, the basic elements of the graph model are defined: nodes and edges. In the distribution network topology, nodes typically represent physical devices or electrical connection points, such as buses, distribution transformers, branch points, load points, distributed energy access points, etc.; edges represent the physical connections between these devices, such as transmission lines, cables, switches, etc.

[0152] This graph structure is represented using an adjacency list or an adjacency matrix. For large-scale distribution networks, adjacency lists are generally more efficient. Each node maintains a list of nodes directly connected to it, and also stores attribute information such as connection type and line parameters.

[0153] The graph model construction process includes: 1) extracting the basic topology from the static topology library of the distribution network, including equipment connection relationships and default parameters; 2) updating the switch status and connection relationships in the graph according to the real-time topology identification results output in step S3; 3) mapping the current measurement data to the corresponding nodes and edges as the attribute values ​​of the nodes and edges; 4) checking the connectivity of the graph to ensure that the model correctly reflects the physical connection status of the current distribution network.

[0154] In practical implementations, specialized graph databases or graph computing libraries, such as Neo4j, NetworkX, or JGraphT, can be used. These libraries provide efficient graph operation APIs and rich support for graph algorithms. This graph model not only represents the static topology of the distribution network but also reflects its real-time operating status through attribute values, providing a complete data foundation for subsequent depth-first search.

[0155] Step S4.2: Assigning and updating weights to the graph model. Based on the electrical parameter values ​​in the real-time measurement data, assign weights to the nodes and edges in the graph model constructed in step S4.1, and adjust the weight values ​​in real time as the measurement data is updated.

[0156] Based on the topology graph model constructed in step S4.1, appropriate weights are assigned to the nodes and edges in the graph to reflect their importance and current state in the distribution network. Weight assignment is a crucial step, directly affecting the efficiency and accuracy of subsequent search algorithms.

[0157] For node weights, consider the following factors: 1) the importance of the node type, for example, the main busbar is usually more important than the terminal load point; 2) the degree of abnormality in the node's electrical parameters, such as the degree to which the voltage deviates from the rated value; 3) the number of devices connected to the node, reflecting the node's centrality; and 4) the node's historical failure frequency, reflecting the node's reliability. Based on these factors, a formula for calculating node weights can be designed: W node =α·I type +β·D param +γ·C conn +δ·F fault Among them, I type It is the importance of node type, D param It is the parameter anomaly, C conn It is connectivity centrality, F fault α represents the fault frequency, and β, γ, and δ are the corresponding weighting coefficients.

[0158] For edge weights, the main considerations are: 1) line type and capacity; 2) line load factor, i.e., the ratio of current load to rated capacity; 3) line impedance and loss; and 4) line condition indicators, such as temperature and insulation condition. The edge weight calculation formula can be expressed as: W edge = a·T line + b·R load + c·Zimp + d·S cond Among them, T line It is the line type coefficient, R load It is the load factor, Zimp is the impedance value, and S cond These are status indicators, and a, b, c, and d are the corresponding weighting coefficients.

[0159] These weight values ​​are not static but dynamically adjusted as real-time measurement data is updated. A periodic update mechanism is established, such as updating every few seconds or whenever new measurement data arrives, to ensure that the graph model accurately reflects the current state of the distribution network. Weight updates use an incremental calculation method, updating only the nodes and edges that have changed, reducing the computational burden.

[0160] Through this dynamic weighting mechanism, the graph model can reflect the importance and anomaly degree of each part of the distribution network in real time, providing important heuristic information for subsequent depth-first search.

[0161] Step S4.3: Design of an improved depth-first search algorithm. An improved depth-first search (DFS) algorithm is designed to suit the characteristics of the distribution network, incorporating pruning strategies and heuristic search mechanisms to improve search efficiency and accuracy.

[0162] In view of the characteristics of the distribution network, an improved depth-first search (DFS) algorithm is designed to improve the search efficiency and accuracy. The traditional DFS algorithm may be inefficient on large-scale graphs and does not consider the weight information of nodes and edges, so a series of targeted improvements are needed.

[0163] First, a pruning strategy is introduced to reduce unnecessary search paths: 1) Pruning based on node weight, when the node weight is lower than the preset threshold, no longer continue to search this branch; 2) Pruning based on path length, restricting the search depth to avoid getting stuck in overly long paths; 3) Pruning based on electrical characteristics, such as terminating the search in this direction when there is a power outage or zero current in the path.

[0164] Secondly, a heuristic search mechanism is added: 1) Preferentially visit nodes and edges with high weights to make the search progress faster towards possible problem areas; 2) Utilize the radial characteristics of the distribution network to preferentially search along the current flow direction; 3) Combine historical fault data to give higher search priorities to areas where problems often occur.

[0165] The core pseudocode of the algorithm is as follows: Function ImprovedDFS(node, visited, pathWeight, maxDepth): If node is in visited or pathWeight < threshold or depth > maxDepth: Return an empty set Add node to visited result = {node} / / Contains the current node / / Sort neighbor nodes by weight neighbors = GetNeighborNodes(node) Sort(neighbors) in descending order of weight For each neighbor in neighbors: If MeetContinueSearchCondition(neighbor): / / Judge based on electrical characteristics nextWeight = CalculatePathWeight(pathWeight, GetEdgeWeight(node, neighbor)) subResult = ImprovedDFS(neighbor, visited, nextWeight, maxDepth + 1) Merge subResult into result Return result Furthermore, parallel search optimization can be implemented. For large distribution networks, the graph is divided into multiple sub-regions for simultaneous searching, and the results are then merged. This improved DFS algorithm can more efficiently locate problem areas in the distribution network topology graph, showing significant advantages, especially in complex topologies and large-scale networks.

[0166] Step S4.4: Fault or Abnormal Area Location and Tracing. When a fault or abnormal condition is detected, starting from the abnormal point, the improved DFS algorithm designed in step S4.3 is used to traverse and search on the weighted graph model in step S4.2 to trace and locate the local area where the problem is located.

[0167] When a fault or abnormal condition is detected in the distribution network, the improved DFS algorithm designed in step S4.3 is used to traverse and search the weighted graph model to locate the local area where the problem is located. This process first requires determining the starting point of the search. There are usually two situations: 1) When a fault is clearly detected at a certain node, the node is directly used as the starting point; 2) When the system detects an overall abnormality but the specific location cannot be determined, the search can start simultaneously from multiple key nodes (such as the outgoing lines of the main transformer).

[0168] During the search process, specific anomaly identification rules are used to determine whether there are problems in nodes or areas: 1) Electrical parameter anomaly detection, such as voltage exceeding limits, current sudden changes, power reversal, etc.; 2) Equipment status anomaly detection, such as switch tripping, protection action, etc.; 3) Topology consistency check, to determine whether the local topology is consistent with expectations. When a node or area that meets these anomaly conditions is found, it is marked as a potential fault point.

[0169] To improve location accuracy, a multi-source information fusion strategy is adopted: DFS search results are cross-validated with other data sources (such as protection device reports, user complaint information, etc.) to comprehensively assess the probability of each potential fault point. For each potential fault point, a confidence score is calculated. Confidence = w1·A param + w2·S device + w3·C topo + w4·E external Among them, A param It refers to the degree of parameter abnormality, S_device is the degree of device state abnormality, and C topo It is a topological consistency deviation, E external It represents the support level of external information, and w1-w4 are the corresponding weights.

[0170] Finally, potential fault points are ranked according to their confidence scores to determine the final fault area. If the confidence scores of multiple points are close, it may indicate a cascading or multi-point fault, and the area formed by these points should be output as the fault area. This multi-dimensional fault location method can effectively handle complex fault scenarios and improve the accuracy and reliability of tracing.

[0171] Step S4.5: Output of local topology tracing results. Based on the tracing and location results of step S4.4, a local topology tracing report is generated, which includes the topology structure of the fault area, the scope of impact, and the status of key equipment.

[0172] Based on the tracing and location results from step S4.4, a comprehensive local topology tracing report is generated to provide decision support for operations and maintenance personnel. This report includes the following core contents: 1) Fault Area Topology: Extract the local topology sub-graph centered on the fault point to clearly show the network structure of the fault area, including device connections, line routing, and switch status. This part is usually presented graphically, with the fault point and key equipment marked.

[0173] 2) Impact Scope Analysis: Based on the local topology, the analysis calculates the number of users potentially affected by the fault, critical loads, power loss, and other indicators to assess the severity and urgency of the fault. Impact scope analysis also includes predicting the likelihood of fault propagation and identifying potential secondary fault points.

[0174] 3) Summary of key equipment status: List all key equipment in the fault area and their current status, including switch position, protection device operation status, equipment load rate, temperature and other operating parameters, as well as the degree of deviation of abnormal parameters.

[0175] 4) Preliminary fault type judgment: Based on local topology analysis and equipment status, make a preliminary judgment on the fault type, such as short circuit fault, ground fault, equipment overload, etc., and provide the judgment basis and confidence level.

[0176] 5) Time-series evolution analysis: Tracing the topological and parameter changes before and after the fault occurs, constructing a timeline of fault evolution, and helping to understand the development mechanism and root cause of the fault.

[0177] In addition, the tracing report should include targeted handling recommendations, such as isolation plans, recovery procedures, and risk warnings. The report adopts a hierarchical structure, with a summary of key information at the top for rapid decision-making, and detailed technical data at the bottom for in-depth analysis.

[0178] This comprehensive local topology tracing result not only helps to quickly locate and handle current faults, but can also be recorded and analyzed as historical cases for continuous improvement of tracing algorithms and accumulation of fault handling experience. For complex new distribution networks, this accurate local tracing capability is a key support for ensuring the safe and stable operation of the power grid.

[0179] The multi-scenario topology traceability collaborative decision-making system in step S5 includes the following sub-steps: Step S5.1: Multi-scenario operation status classification and feature extraction. Various operation scenarios of the new power distribution network are classified, such as normal operation, overload operation, and fault recovery, and feature indicators for each scenario are extracted from the processing results of steps S1-4.

[0180] Step S5.2: Construction of a scenario-adaptive topology tracing strategy library. For the different operating scenarios categorized in Step S5.1, a strategy library containing multiple tracing strategies is constructed, with each strategy optimized for the topology tracing needs of a specific scenario.

[0181] Step S5.3: Design and Implementation of Collaborative Decision-Making Rules. Design a collaborative decision-making mechanism based on rules and priorities, automatically select a suitable tracing strategy according to the current operating scenario, and coordinate the operating parameters and processing flow of each module in steps S1-4.

[0182] Step S5.4: Visualization and Interactive Design of Traceability Results. Develop an intuitive visualization interface to graphically display the local topology tracing results output in Step S4.5, and provide interactive operation functions to support in-depth analysis by maintenance personnel.

[0183] Step S5.5: Generating Decision Support Suggestions. Based on historical traceability cases and an expert knowledge base, the current traceability results are intelligently analyzed to generate targeted processing suggestions and operational guidance, assisting maintenance personnel in quickly responding to and resolving issues.

[0184] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A novel real-time topology tracing method for power distribution networks, characterized in that, Includes the following steps: Based on the distribution network SCADA system, the voltage, current and power of key nodes in the distribution network under different topologies are comprehensively collected to construct a historical measurement dataset containing topology labels. The historical measurement dataset is preprocessed, and a Transformer deep learning model suitable for the characteristics of the distribution network is designed and trained to establish a mapping relationship between the measurement data and the topology, thereby realizing intelligent identification of the topology of the real-time input measurement data. Based on the feature space distribution analysis of the Transformer model, a composite loss function is constructed that combines the margin maximization objective function with the original classification loss function. The Transformer model is then retrained, and the optimized topology recognition result is obtained through the retrained Transformer model. Based on the optimized topology identification results, a distribution network topology model is constructed and weights are assigned. An improved depth-first search algorithm is used to quickly traverse and trace the local area where the problem is located when a fault or abnormal condition occurs. Multi-scenario adaptive analysis is performed on the traceability results of the local area to build a collaborative decision-making system and generate a visual traceability report that includes the topology of the fault area, the scope of impact, and the status of key equipment.

2. The method according to claim 1, characterized in that, Based on the distribution network SCADA system, comprehensive data collection of voltage, current, and power at key nodes of the distribution network under different topologies is performed to construct a historical measurement dataset containing topology labels, including: The characteristics and topology change patterns of the new distribution network are analyzed, and intelligent terminal equipment is deployed at feeder terminals, distribution transformers, and distributed energy access points to establish a data acquisition network covering the entire network. Based on the data acquisition network, a hierarchical data acquisition strategy is designed to collect voltage, current, active power, reactive power, and power factor, and to set sampling frequency and accuracy requirements for different parameters. Classify the various operating modes and topologies that may exist in the distribution network, establish a standardized topology labeling system, assign a unique identifier to each topology, and establish a mapping relationship with switch status information; The multi-type measurement data and the topology labels are time-synchronized and associated to form a historical dataset containing the correspondence between "measurement data and topology labels", and stored in time series to obtain the historical measurement dataset containing topology labels.

3. The method according to claim 1, characterized in that, The historical measurement dataset is preprocessed, and a Transformer deep learning model suitable for the characteristics of the distribution network is designed and trained. A mapping relationship between the measurement data and the topology is established to achieve intelligent identification of the topology from real-time input measurement data, including: Feature analysis is performed on the historical measurement dataset to identify the distribution characteristics and variation patterns of the measurement data under different topological structures, and to determine the input feature set of the deep learning model. Based on the input feature set, a Transformer model architecture suitable for distribution network measurement data is designed, wherein the Transformer model architecture includes a multi-head self-attention mechanism, an encoder-decoder structure, and position encoding; The historical measurement dataset is divided into training set, validation set and test set according to a preset ratio. Data augmentation techniques are used to expand the training samples and improve the generalization ability of the model. The Transformer model is trained, and the optimal model parameters are determined through cross-validation and parameter grid search to improve the model recognition accuracy, thereby obtaining the intelligent topology recognition model.

4. The method according to claim 1, characterized in that, Based on the feature space distribution analysis of the Transformer model, a composite loss function is constructed that fuses the margin maximization objective function with the original classification loss function. The Transformer model is then retrained, and optimized topology recognition results are obtained through the retrained Transformer model, including: The feature space extracted by the Transformer model is visualized and analyzed. The high-dimensional feature vectors are projected into two-dimensional or three-dimensional space using t-SNE or PCA dimensionality reduction techniques to evaluate the distribution of different topologies in the feature space and the clustering effect. Based on the feature space distribution analysis results, an objective function for maximizing the margin is constructed to maximize the distance between the target topology and the non-target topology in the feature space, thereby improving the clarity of the classification boundary. The margin maximization objective function is fused with the original classification loss function to form a new composite loss function, so as to guide the model optimization process to pay more attention to the inter-class margin. The Transformer model is retrained to adjust the feature space distribution so that the feature clustering of the same topology category is higher and the feature separation of different categories is higher. The optimized topology identification result is obtained by retraining the Transformer model.

5. The method according to claim 1, characterized in that, Based on the optimized topology identification results, a distribution network topology model is constructed and weights are assigned. An improved depth-first search algorithm is then used to quickly traverse and locate the local area where the problem occurs when a fault or abnormal condition occurs, including: Based on the optimized topology identification results, a graph structure model of the distribution network is established, where nodes represent buses, distribution transformers, branch points, and load points in the distribution network, and edges represent line connection relationships. The electrical parameter values ​​in the real-time measurement data are analyzed, weights are assigned to the nodes and edges in the graph structure model, and the weight values ​​are adjusted in real time as the measurement data is updated. To address the characteristics of distribution networks, an improved depth-first search algorithm is designed, incorporating pruning strategies and heuristic search mechanisms to enhance search efficiency and accuracy. When a fault or abnormal condition is detected, the improved depth-first search algorithm is used to traverse the weighted graph model starting from the abnormal point to locate the local area where the problem is located.

6. The method according to claim 2, characterized in that, After obtaining the historical measurement dataset containing topological structure labels, the following is also included: Data cleaning is performed on the measurement data in the historical dataset to detect and process outliers, duplicates, and obviously erroneous data points to ensure data accuracy. Missing values ​​are detected in the cleaned measurement data, and missing data are processed using interpolation, average value imputation, or time series-based prediction methods. The processed measurement data is normalized to unify electrical parameters with different dimensions and numerical ranges into the same numerical range. The normalized measurement data is subjected to quality assessment, and data integrity, accuracy and consistency indicators are calculated to establish a data quality evaluation system. The measurement data that has passed the quality assessment are then finalized and stored to ensure that the data quality meets the requirements for subsequent deep learning model training.

7. The method according to claim 3, characterized in that, Design a Transformer model architecture suitable for distribution network measurement data, including: A multi-head self-attention mechanism is designed to capture multi-dimensional correlation features in measurement data by computing attention weights in different subspaces in parallel with multiple attention heads. Construct an encoder structure to encode features of the input measurement data and use a self-attention mechanism to establish long-distance dependencies within the sequence; Construct a decoder structure, generate topological category predictions based on the feature representations output by the encoder, and fuse encoder and decoder information through a cross-attention mechanism; Design a location encoding mechanism to add location information to each position in the input sequence, enabling the model to understand the temporal characteristics and spatial distribution of the measurement data; A complete Transformer network architecture is constructed, integrating multi-head self-attention, feedforward neural network and residual connection components, to obtain the intelligent identification model of the topology.

8. The method according to claim 4, characterized in that, Construct a composite loss function that combines the margin maximization objective function with the original classification loss function, including: Based on the distance metric between sample points in the feature space, a margin optimization loss function is constructed to minimize the distance between samples of the same class and maximize the distance between samples of different classes. Design a dynamic weight adjustment strategy that focuses on classification accuracy in the early stages of training and gradually increases the influence of margin maximization as training progresses. L2 regularization is introduced to prevent overfitting of the model and improve generalization ability by controlling the complexity of model parameters. We weight and fuse the original cross-entropy loss function and the margin maximization objective function to balance the dual objectives of classification accuracy and feature space margin optimization. The model is optimized based on the composite loss function, and the model parameters are updated using the gradient descent algorithm to obtain the optimized topology identification result.

9. The method according to claim 5, characterized in that, Constructing a distribution network topology model and assigning weights includes: Based on the optimized topology identification results, the basic topology structure is extracted, including device connection relationships and default parameters, and a basic graph structure of nodes and edges is established. The switch states and connection relationships in the graph are updated based on the optimized topology identification results, and the current measurement data is mapped to the corresponding nodes and edges as attribute values. Initially assign values ​​to node weights, taking into account factors such as the importance of node type, the degree of electrical parameter anomaly, connection centrality, and historical fault frequency. Initial values ​​are assigned to the edge weights, and the factors for assignment include line type and capacity, load factor, impedance value and status indicators; Establish a dynamic weight update mechanism to dynamically adjust the weight values ​​of nodes and edges as real-time measurement data is updated, ensuring that the graph model accurately reflects the current state of the distribution network.

10. A novel real-time topology tracing system for power distribution networks, characterized in that, include: The data acquisition module is used to comprehensively collect voltage, current, and power data of key nodes in the distribution network under different topologies based on the distribution network SCADA system, and to build a historical measurement dataset containing topology labels. The intelligent identification module is used to preprocess the historical measurement dataset, design and train a Transformer deep learning model suitable for the characteristics of the distribution network, establish a mapping relationship between measurement data and topology, and realize intelligent identification of topology of real-time input measurement data. The feature optimization module is used to construct a composite loss function that combines the margin maximization objective function with the original classification loss function based on the feature space distribution analysis of the Transformer model, and to retrain the Transformer model to obtain the optimized topology recognition result. The local tracing module is used to construct a distribution network topology model and assign weights based on the optimized topology identification results. It uses an improved depth-first search algorithm to quickly traverse and trace the local area where the problem is located when a fault or abnormal situation occurs. The collaborative decision-making module is used to perform multi-scenario adaptive analysis on the traceability results of the local area, build a collaborative decision-making system, and generate a visual traceability report that includes the topology of the fault area, the scope of impact, and the status of key equipment.

Citation Information

Cited By

  • Measurement point data model construction method and device and measurement point data model application method and device

    CN121919564A