Space-time fusion neural network line topology analysis method for power distribution network

By constructing a spatiotemporal fusion neural network and utilizing multi-source data and dynamic feature interaction mechanisms, the problems of insufficient feature dimensions and poor timeliness in distribution network topology identification are solved, realizing accurate and real-time monitoring and dynamic reconstruction of distribution network topology, and improving identification accuracy and timeliness.

CN120849882AActive Publication Date: 2025-10-28TONGHUA POWER SUPPLY COMPANY STATE GRID JILIN ELECTRIC POWER

Patent Information

Application Number
CN202511373624.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2025-10-28
Estimated Expiration
2045-09-25

AI Technical Summary

Technical Problem

Existing methods for topology identification of distribution networks rely on single electrical quantity data, resulting in insufficient feature dimensions, difficulty in capturing dynamic changes in the topology, and inability to effectively handle the temporal correlation and spatial topological features of electrical quantities, leading to low identification accuracy and poor timeliness.

Method used

A spatiotemporal fusion neural network approach is adopted to construct a spatiotemporal double graph structure by acquiring multi-source data. By combining a bidirectional dynamic feature interaction mechanism and a cross-modal gated loop and graph attention hybrid mechanism, the deep coupling and fusion of temporal and spatial features are achieved, generating a high-quality unified topological feature representation, and real-time reconstruction is performed through a dynamic topological state prediction model.

Benefits of technology

It improves the accuracy and timeliness of topology identification, enabling precise identification of potential branch disconnection and temporary tripping issues, thus meeting the needs of safe operation and dispatching of the distribution network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120849882A_ABST
    Figure CN120849882A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of model analysis, in particular to a time-space fusion neural network line topology analysis method for a power distribution network. The method comprises the following steps: obtaining original line topology data corresponding to a power distribution network, and carrying out structured disassembly and preprocessing to construct a space-time double graph structure; constructing a bidirectional dynamic feature interaction mechanism based on the space-time double graph structure, performing multi-scale topological feature extraction, and generating a space-time separated feature vector set; performing deep coupling fusion on the feature vector set subjected to time-space separation to generate corresponding unified topological feature representation containing abnormal topology; and constructing a dynamic topology state prediction model based on the unified topology feature representation to optimize a space-time joint loss function and output a corresponding real-time topology connection relationship and an equipment state change trend, and meanwhile, performing dynamic topology reconstruction to generate a current-moment reliable topological graph corresponding to potential branch disconnection and temporary tripping. The topology analysis accuracy of the power distribution network can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of model analysis technology, and in particular to a spatiotemporal fusion neural network method for line topology analysis of power distribution networks. Background Technology

[0002] With the development of modern power systems, the penetration rate of renewable energy in distribution networks is continuously increasing, which brings new challenges to the dispatching and operation, power quality, and system protection of distribution networks. On the one hand, the uncertainty in distribution systems has increased significantly, and the operating modes are becoming more complex and variable. To ensure the economy and reliability of the system, frequent network topology reconfiguration is required, resulting in a complex and dynamically changing distribution network topology. On the other hand, distribution network topology identification is closely related to power flow calculation, state estimation, and fault location. Accurate topology identification is crucial for the optimized operation of distribution networks with a high proportion of renewable energy.

[0003] Currently, distribution network topology identification methods mainly include traditional methods and artificial intelligence methods. Traditional methods, such as correlation judgment, signal injection, and linear programming, require complex calculations, affecting the timeliness of online topology identification. Although machine learning-based topology identification methods are gradually being applied, they also have some shortcomings. For example, common methods based on graph convolutional networks (GCNs) only accept node information as input, making it difficult to learn deep features of measurement data and distinguish the differences in importance between different measurement data, thus resulting in low topology identification accuracy. Summary of the Invention

[0004] Based on this, it is necessary for the present invention to provide a spatiotemporal fusion neural network line topology analysis method and system for power distribution networks, in order to solve at least one of the above-mentioned technical problems.

[0005] To achieve the above objectives, a spatiotemporal fusion neural network-based line topology analysis method for distribution networks includes the following steps: Step S1: Obtain the original line topology data corresponding to the distribution network, including the ledger information corresponding to the line operation, electrical quantity time series data and equipment spatial distribution data, and perform structured decomposition and preprocessing of the original line topology data through a spatiotemporal separation encoder to construct a spatiotemporal double graph structure containing time series tensors and spatial adjacency matrices. The time series tensors record the dynamic evolution characteristics of electrical quantities corresponding to voltage and current, and the spatial adjacency matrix represents the physical connection relationship of equipment and the initial topology association strength. Step S2: Construct a bidirectional dynamic feature interaction mechanism based on the spatiotemporal double graph structure. This mechanism uses bidirectional gating graph recursive units in the time dimension to model the long-term dependency of time series tensors, capturing the bidirectional evolution of electrical quantities at multiple time points. Simultaneously, it uses a hierarchical graph attention pooling module in the spatial dimension to extract multi-scale topological features from the spatial adjacency matrix, establishing dynamic association weights between nodes and generating a spatiotemporally separated feature vector set, including time dimension feature vectors and spatial dimension feature vectors. Step S3: A cross-modal gated loop and graph attention hybrid mechanism is used to deeply couple and fuse the spatiotemporally separated feature vector sets, and dynamic weighted interaction between the temporal dimension feature vectors and the spatial dimension feature vectors is realized through learnable gate weight parameters to generate a unified topological feature representation that includes the anomaly topology. Step S4: Construct a dynamic topology state prediction model based on unified topology feature representation, optimize the spatiotemporal joint loss function through end-to-end training, and output the real-time topology connection relationship and equipment state change trend of the distribution network. At the same time, perform dynamic topology reconstruction based on the real-time topology connection relationship and equipment state change trend of the distribution network to generate a reliable topology map of the current moment that includes potential branch disconnection and temporary tripping.

[0006] The beneficial effects of this invention are: The spatiotemporal fusion neural network line topology analysis method for distribution networks proposed in this invention, compared with existing technologies, has the advantage of solving the problem of "single data source and incomplete feature representation" in traditional methods from the data level by integrating multi-source data and constructing a spatiotemporal dual graph structure, thus providing a high-quality and structured input foundation for subsequent topology identification. Traditional topology identification methods often rely on single electrical quantity data (such as voltage data only), resulting in insufficient feature dimensions and difficulty in capturing dynamic changes in the topology. In contrast, this step first acquires multi-source raw data such as ledger information, electrical quantity time-series data, and equipment spatial distribution data, covering both the "static attributes (equipment connection relationships)" and "dynamic characteristics (electrical quantity evolution)" of the distribution network topology, avoiding identification bias caused by data partiality. By decomposing the raw data into a structured form using a spatiotemporal separation encoder, dynamic electrical quantity data is transformed into time series tensors (recording the temporal changes of voltage and current, such as the current trend under load fluctuations), and static equipment connection data is transformed into spatial adjacency matrices (characterizing the physical connection and correlation strength of equipment, such as the connection weight between transformers and lines). The constructed spatiotemporal dual graph structure not only preserves the dynamic evolution law of electrical quantities but also clarifies the spatial topological correlation of equipment. This breaks through the limitations of traditional GCN methods that "only use node voltage data and have limited feature dimensions," thus laying the foundation for separate modeling and deep fusion of spatiotemporal features. Secondly, through a bidirectional dynamic feature interaction mechanism, features are deeply mined from both temporal and spatial dimensions, solving the problems of "insufficient capture of long-term dependencies and coarse extraction of topological features" in traditional methods. This significantly improves the comprehensiveness and accuracy of feature learning. Traditional GCN methods cannot effectively handle the temporal correlation of electrical quantities and lack a sense of hierarchy in the extraction of spatial topological features, making it difficult to capture dynamic changes in the topology. In contrast, this step uses bidirectional gated graph recursive units in the temporal dimension, which can both model the evolution trend of electrical quantities forward and trace historical dependencies backward, effectively capturing the bidirectional evolution law of electrical quantities at multiple moments and avoiding the loss of long-term dependencies caused by single-direction modeling. In the spatial dimension, the hierarchical graph attention pooling module extracts topological features at multiple scales (such as first extracting the local connection features of a single line and then integrating the global topological features of the regional power grid) and assigns dynamic correlation weights to different equipment nodes (such as assigning high weights to key transformer nodes and low weights to secondary branch nodes). This solves the problem of "inability to distinguish the importance of measurement data" in traditional methods, allowing the model to focus more on key topological correlations and avoiding identification errors caused by incomplete feature extraction.Then, a cross-modal hybrid mechanism is used to achieve deep coupling and fusion of spatiotemporal features, which solves the problem of "fragmented spatiotemporal features and shallow fusion" in traditional methods. This generates a more distinctive unified topological feature representation and improves the ability to identify anomalous topologies. Traditional topology identification methods often process temporal and spatial features separately or simply splice them together, resulting in insufficient feature correlation and difficulty in capturing "spatiotemporally linked topological anomalies". In contrast, this step adopts a hybrid mechanism of cross-modal gated loop and graph attention. Through learnable gating weight parameters, the fusion ratio of temporal and spatial features is dynamically adjusted. This dynamic weighted interaction not only achieves deep coupling of spatiotemporal features, but also highlights the feature differences of anomalous topologies, thereby providing high-quality feature support for subsequent topological state prediction. Finally, by employing a dynamic topology state prediction model and real-time reconstruction, the problems of "poor timeliness of online identification and untimely capture of topology anomalies" in traditional methods are solved, enabling accurate and real-time monitoring of the distribution network topology. Traditional methods, such as linear programming, are computationally complex and cannot meet the timeliness requirements of online identification. This step, however, constructs an end-to-end prediction model based on a unified topology feature representation. By optimizing the spatiotemporal joint loss function, the efficiency of model training and inference is significantly improved, enabling rapid output of real-time topology connectivity and equipment status change trends, thus meeting the timeliness requirements of online identification. Simultaneously, dynamic topology reconstruction based on the prediction results can accurately identify potential branch disconnections, temporary tripping, and other issues, generating a reliable topology map for the current moment. Compared to traditional methods that only output static topology, dynamic reconstruction updates the topology state in real time, avoiding scheduling decision errors caused by lagging topology information and improving the accuracy of topology anomaly identification. This provides crucial support for the safe operation and accurate scheduling of the distribution network. Attached Figure Description

[0007] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a flowchart illustrating the steps of the spatiotemporal fusion neural network line topology analysis method for power distribution networks according to the present invention. Figure 2 for Figure 1 A detailed flowchart of step S1. Detailed Implementation

[0008] The technical method of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0009] Furthermore, the accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor methods and / or microcontroller methods.

[0010] It should be understood that although the terms "first," "second," etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are used merely to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0011] To achieve the above objectives, please refer to Figures 1 to 2 This invention provides a spatiotemporal fusion neural network-based line topology analysis method for power distribution networks, the method comprising the following steps: Step S1: Obtain the original line topology data corresponding to the distribution network, including the ledger information corresponding to the line operation, electrical quantity time series data and equipment spatial distribution data, and perform structured decomposition and preprocessing of the original line topology data through a spatiotemporal separation encoder to construct a spatiotemporal double graph structure containing time series tensors and spatial adjacency matrices. The time series tensors record the dynamic evolution characteristics of electrical quantities corresponding to voltage and current, and the spatial adjacency matrix represents the physical connection relationship of equipment and the initial topology association strength. Step S2: Construct a bidirectional dynamic feature interaction mechanism based on the spatiotemporal double graph structure. This mechanism uses bidirectional gating graph recursive units in the time dimension to model the long-term dependency of time series tensors, capturing the bidirectional evolution of electrical quantities at multiple time points. Simultaneously, it uses a hierarchical graph attention pooling module in the spatial dimension to extract multi-scale topological features from the spatial adjacency matrix, establishing dynamic association weights between nodes and generating a spatiotemporally separated feature vector set, including time dimension feature vectors and spatial dimension feature vectors. Step S3: A cross-modal gated loop and graph attention hybrid mechanism is used to deeply couple and fuse the spatiotemporally separated feature vector sets, and dynamic weighted interaction between the temporal dimension feature vectors and the spatial dimension feature vectors is realized through learnable gate weight parameters to generate a unified topological feature representation that includes the anomaly topology. Step S4: Construct a dynamic topology state prediction model based on unified topology feature representation, optimize the spatiotemporal joint loss function through end-to-end training, and output the real-time topology connection relationship and equipment state change trend of the distribution network. At the same time, perform dynamic topology reconstruction based on the real-time topology connection relationship and equipment state change trend of the distribution network to generate a reliable topology map of the current moment that includes potential branch disconnection and temporary tripping.

[0012] In the embodiments of this invention, please refer to Figure 1 The diagram shown is a flowchart illustrating the steps of the spatiotemporal fusion neural network line topology analysis method for distribution networks according to the present invention. In this example, the spatiotemporal fusion neural network line topology analysis method for distribution networks includes the following steps: Step S1: Obtain the original line topology data corresponding to the distribution network, including the ledger information corresponding to the line operation, electrical quantity time series data and equipment spatial distribution data, and perform structured decomposition and preprocessing of the original line topology data through a spatiotemporal separation encoder to construct a spatiotemporal double graph structure containing time series tensors and spatial adjacency matrices. The time series tensors record the dynamic evolution characteristics of electrical quantities corresponding to voltage and current, and the spatial adjacency matrix represents the physical connection relationship of equipment and the initial topology association strength. In this embodiment of the invention, the original line topology data of the IEEE 33-node distribution network is obtained, including line ledger information (32 line models such as JKLYJ-10-120, connection node numbers such as line 1 connecting node 1-2, laying method 20 overhead and 12 cable), electrical quantity time series data (1-minute sampling interval, 72 hours of 33-node three-phase voltage 0.9-1.1 pu, current 0-250A, active power 0-600kW, reactive power 0-300kVar, generating a 33×4×4320 dataset), and equipment spatial distribution data (substation node 1 latitude and longitude 30.1234°N / 120.5678°E, 32 towers latitude and longitude accuracy 0.0001°, elevation accuracy 0.1m). Preprocessing is performed using a spatiotemporal separation encoder: missing values ​​are filled with linear interpolation (e.g., the voltage at the 1000th timestamp of node 5 is linearly filled from 0.98 pu to 1.02 pu), misconnections in the ledger are corrected using the isolated forest algorithm (e.g., the misconnection of line 8 to node 7-9 is corrected to 7-8), and electrical quantities are normalized to the 0-1 range using range normalization. A time series tensor (33×4×432, taking one time step every 10 minutes to record the dynamic evolution of electrical quantities) and a spatial adjacency matrix (33×33, element value = 1 / (1+line impedance), impedance calculated as 0.08Ω / km for overhead lines and 0.05Ω / km for cables, e.g., the element corresponding to the 0.096Ω impedance of node 1-2 is 0.912) are constructed to build a spatiotemporal double graph structure, ensuring a one-to-one correspondence between the time tensor index and the matrix node.

[0013] Step S2: Construct a bidirectional dynamic feature interaction mechanism based on the spatiotemporal double graph structure. This mechanism uses bidirectional gating graph recursive units in the time dimension to model the long-term dependency of time series tensors, capturing the bidirectional evolution of electrical quantities at multiple time points. Simultaneously, it uses a hierarchical graph attention pooling module in the spatial dimension to extract multi-scale topological features from the spatial adjacency matrix, establishing dynamic association weights between nodes and generating a spatiotemporally separated feature vector set, including time dimension feature vectors and spatial dimension feature vectors. In this embodiment of the invention, a bidirectional dynamic feature interaction mechanism is constructed based on a spatiotemporal double graph structure. The time dimension employs a bidirectional gated graph recursive unit (Bi-GGRU) to model a 33×4×432 time series tensor: Forward propagation from time step 1 to 432 uses input gate weights [0.7, 0.65, 0.72, 0.68] to filter new voltage and power features, and a forget gate [0.2, 0.25, 0.18, 0.22] to discard redundant information, generating a forward state vector; backward propagation from time step 432 to 1 references features from the next 5 time steps, and a backward gate weight [0.72, 0.68, 0.74, 0.70] captures future trends, generating a backward state vector. These are then fused to obtain a 33×432 time-dimensional feature vector, with a long-term dependency information retention rate ≥83%. The spatial dimension employs Hierarchical Graph Attention Pooling (HGAP) to extract multi-scale features from the 33×33 adjacency matrix: the bottom-level attention head calculates the weights of directly adjacent nodes (similarity of nodes 5-4 = 0.98×0.6 + distance decay of 0.8km = 0.556×0.4 = 0.822), the middle-level 3-layer jump connection captures 2-3 order neighbors (weight of 5-3 in the 2nd order neighbor of the 1st level = 0.65), and the high-level global pooling assigns weights to regions (root region = 0.84, branch = 0.75, and terminal = 0.66), generating a 33×33 spatial dimension feature vector. The key node feature discrimination is higher than that of traditional GCN.

[0014] Step S3: A cross-modal gated loop and graph attention hybrid mechanism is used to deeply couple and fuse the spatiotemporally separated feature vector sets, and dynamic weighted interaction between the temporal dimension feature vectors and the spatial dimension feature vectors is realized through learnable gate weight parameters to generate a unified topological feature representation that includes the anomaly topology. In this embodiment of the invention, a hybrid mechanism of cross-modal gating loop and graph attention is used to fuse the feature vector set. The time dimension feature vector (33×432) is flattened to 33×14256, and the spatial dimension (33×33) is flattened to 33×1089. The dimension is unified to 33×1089 through a fully connected network, and L2 normalization eliminates the dimension. The cross-modal gating unit inputs the concatenated 33×2178 vector, and the two-layer fully connected network generates a 33×1089 dynamic fusion weight matrix through sigmoid (node ​​5 has a weight of 0.8 where voltage timing and spatial correlation are strong, and 0.3 where reactive power is weak). The gating loop transmits the time features: a voltage timing increase of 0.2 pu is converted into a spatial weight adjustment signal, and the weight of node 5-4 increases from 0.73 to 0.81; the graph attention coefficient feeds back the spatial features: the attention coefficient of node 5-4 is 0.82, which corrects the time dependency weight from 0.5 to 0.65, enhancing anomaly detection. The fusion generates a unified topological feature representation of 33×1089. The feature values ​​of abnormal topologies, such as the misconnected nodes 8-9, are 0.05-0.072, which are significantly higher than those of normal regions (0.002-0.03). The prediction accuracy on the IEEE 33-node test set is higher than that of simple splicing.

[0015] Step S4: Construct a dynamic topology state prediction model based on unified topology feature representation, optimize the spatiotemporal joint loss function through end-to-end training, and output the real-time topology connection relationship and equipment state change trend of the distribution network. At the same time, perform dynamic topology reconstruction based on the real-time topology connection relationship and equipment state change trend of the distribution network to generate a reliable topology map of the current moment that includes potential branch disconnection and temporary tripping.

[0016] In this embodiment of the invention, a dynamic topology state prediction model is constructed based on a unified topology feature representation. The model includes a 3-layer graph convolutional decoder (layer 1: 3×3 kernel, input 1089, output 512; layer 2: 3×3 kernel, output 256; layer 3: 1×1 kernel, output 33; Softmax generates a 33×33 connection probability matrix). The spatiotemporal joint loss function includes a temporally improved Huber loss (threshold 0.12 pu; small deviation squared loss, such as 0.08 pu corresponding to 0.0032; large deviation absolute value loss, such as 0.2 pu corresponding to 0.0168), a spatial cross-entropy loss (critical path weighting factor 0.8-0.9, non-critical 0.3), and a link prediction loss (Bayes ranking loss optimizing edge weight ranking). The dynamic weighting is 0.5:0.5 for the first 50 rounds and transitions to 0.4:0.6 for rounds 51-150. The AdamW optimizer (initial learning rate 0.005, cosine annealing cycle 50 epochs, early stop 15 epochs) was used for end-to-end training with a batch size of 32, L2=1e-4+Dropout=0.3. After 180 training epochs, the validation set loss stabilized at 0.017, and the test set topology accuracy was 96.2%. Inputting 33×1089 features generated from one hour of real-time data, the model outputs real-time topology connectivity (node ​​1-2 probability 0.99, 8-9 0.26), device health (node ​​8 score 772, 195), and trend (node ​​8-9 has a 78% chance of becoming disconnected in the next hour). Dynamic topology reconstruction marks potentially disconnected nodes (8-9) and normal branches, generating a reliable topology map for the current time, with maintenance priorities and backup paths. Connectivity is 100%, redundancy is 1.8, and load coverage is 100%, meeting safe operation requirements.

[0017] Furthermore, as an embodiment of the present invention, reference is made to... Figure 2 As shown, Figure 1 A detailed flowchart of step S1 is shown below. In this embodiment, step S1 includes the following steps: Step S11: Collect the original line topology data of the distribution network in collaboration with the distribution network monitoring system, equipment ledger management platform and geographic information system. The ledger information corresponding to the line operation includes the line model, connection node number and laying method information. The electrical quantity time series data includes the effective values ​​of three-phase voltage and current and active and reactive power data sampled at the minute level. The equipment spatial distribution data includes the latitude, longitude and elevation data of substations, switching stations and line towers. In this embodiment of the invention, the original line topology data of the IEEE 33-node distribution network is collected collaboratively by a distribution network monitoring system, an equipment ledger management platform, and a geographic information system. The distribution network monitoring system collects three-phase voltage (range 0.9-1.1 pu), RMS current (range 0-250A), active power (range 0-600kW), and reactive power (range 0-300kVar) data from 33 nodes at a 1-minute sampling interval. This data is collected continuously for 72 hours, generating a 33×4×4320 electrical quantity time-series dataset (33 nodes, 4 types of parameters, 4320 timestamps). The equipment ledger management platform exports line ledger information, including the model numbers of 32 lines (e.g., JKLYJ-10-120). The data includes the connection node numbers (e.g., line 1 connects node 1 and node 2) and the laying method (overhead / cable, with 20 overhead lines and 12 cable lines); the geographic information system acquires the latitude and longitude (accuracy 0.0001°) and elevation (accuracy 0.1m) data of substations (node ​​1), switching stations (nodes 10 and 20), and 32 line towers. For example, node 1 has latitude and longitude of 30.1234°N, 120.5678°E and an elevation of 50.2m, and tower 5 has latitude and longitude of 30.1245°N, 120.5689°E and an elevation of 52.5m. During the data acquisition process, the system time synchronization tool ensures that the timestamp deviation of the three systems is ≤1 second, and the ledger number corresponds one-to-one with the node number, generating complete original data covering equipment, electrical quantities, and spatial locations.

[0018] Step S12: Preprocess the original line topology data to fill in the missing values ​​in the electrical quantity time series data and equipment spatial distribution data using interpolation algorithms, and use the isolated forest algorithm to identify and correct abnormal records corresponding to line misconnection and missing connection in the ledger information. At the same time, the influence of electrical parameters with different dimensions is eliminated by the range normalization method to generate standardized line topology data. In this embodiment of the invention, the original line topology data is preprocessed. For five missing values ​​in the electrical quantity time-series data (e.g., missing voltage data at timestamp 1000 for node 5), a linear interpolation algorithm is used to fill them: based on five valid data points before and after the missing value (timestamps 995-999 and 1001-1005), the filling value is calculated proportionally according to the time interval (e.g., when the voltage linearly transitions from 0.98 pu to 1.02 pu, 1.00 pu is filled at the missing location). For two missing tower elevations in the equipment spatial distribution data, neighbor interpolation (taking the average elevation of the surrounding three towers) is used to fill them. An isolated forest algorithm (100 trees, anomaly threshold of 0.8) is used to identify abnormal records in the ledger: a misconnection record for line 8 (connecting node 7 and node 9) is detected (actually connecting node 7 and node 8), and a "missing connection" record for line 15 is detected. These are corrected to the correct ledger by combining the tower distribution data from the geographic information system (towers for line 8 are distributed along nodes 7-8) and the power flow data from the monitoring system (power transmission in line 15 proves the connection exists). Electrical parameters are normalized using range normalization: voltage is converted to (actual value - 0.9) / (1.1 - 0.9), and current is converted to (actual value - 0) / (250 - 0), so that all parameters are normalized to the 0-1 range, and finally the line topology standardized data is generated.

[0019] Step S13: Input the standardized line topology data into the spatiotemporal separation encoder, and perform structured decomposition according to the time and space dimensions to generate a time series tensor indexed by timestamps and a spatial adjacency matrix with node-edge relationships as the core. The dimension of the time series tensor is determined by the sampling time length and the number of electrical parameter types. The initial values ​​of the elements of the spatial adjacency matrix are calculated by the physical distance between devices and the line impedance. In this embodiment of the invention, the standardized data of the line topology is input into the spatiotemporal separation encoder for structured decomposition. In the time dimension, the normalized voltage, current, active power and reactive power parameters of each node are extracted using a 1-minute timestamp as an index. Considering the efficiency of subsequent processing, data every 10 minutes is selected as 1 time step, and there are 432 time steps in 72 hours. A 33×4×432 time series tensor (33 nodes, 4 types of parameters, 432 time steps) is constructed. The dimension is determined by the sampling time length (72 hours / 10 minutes = 432) and the number of parameter types (4). In the spatial dimension, focusing on node-edge relationships, the physical distance between nodes is calculated based on the latitude and longitude of the equipment (e.g., the distance between node 1 and node 2 is 1.2km). The line impedance is obtained using the impedance calculation formula (overhead line impedance 0.08Ω / km, cable 0.05Ω / km) (line 1 impedance 1.2×0.08=0.096Ω). A 33×33 spatial adjacency matrix is ​​constructed, with the initial value of each matrix element = 1 / (1+impedance) (the smaller the impedance, the larger the element value, reflecting connectivity strength). For example, the element value of node 1-2 is 1 / (1+0.096)=0.912, and the element value of non-connected nodes is 0. After decomposition, dimensional verification ensures that the tensor time step corresponds to the actual sampling, and that the adjacency matrix elements match the impedances one-to-one, generating structured data.

[0020] Step S14: Dynamically correct the spatial adjacency matrix by introducing real-time line operating parameters, including power flow distribution and voltage drop rate, to adjust the initial values ​​of the elements in the spatial adjacency matrix, so that the spatial adjacency matrix reflects both the physical connection relationship of the equipment and the coupling strength of electrical functions, and combines the time series tensor to construct a spatiotemporal double graph structure.

[0021] In this embodiment of the invention, the spatial adjacency matrix is ​​dynamically corrected. Real-time line operating parameters are introduced: power flow distribution (normalized power flow of each line obtained from the monitoring system, range 0-1) and voltage drop rate (calculated as voltage difference / distance between adjacent nodes, range 0-0.1). A weight adjustment formula is set: corrected element value = initial value × (0.6 × power flow + 0.4 × (1 - voltage drop rate)). For example, line 1 has an initial value of 0.912, power flow of 0.8, and voltage drop rate of 0.05; after correction, it = 0.912 × (0.6 × 0.8 + 0.4 × 0.95) = 0.912 × (0.48 + 0.38) = 0.912 × 0.86 = 0.784. Line 5 has an initial value of 0.85, power flow of 0.3, and voltage drop rate of 0.1; after correction, it = 0.85 × (0.18 + 0.36) = 0.85 × 0.54 = 0.459. The corrected matrix element values ​​reflect both physical connectivity (initial values) and electrical function (higher values ​​indicate higher power flow and smaller voltage drop). By combining the corrected spatial adjacency matrix with a 33×4×432 time-series tensor, a spatiotemporal dual graph structure is constructed: the graph nodes are distribution network nodes, the edge weights are the corrected adjacency matrix values, and the node attributes are the corresponding parameters of the time-series tensor. This achieves the fusion of physical connectivity and electrical time-series characteristics, providing complete graph structure data for subsequent neural network analysis.

[0022] Furthermore, the spatiotemporal separation encoder described in step S13 includes a feature mapping layer, a dimension alignment module, and a spatiotemporal consistency verification unit. The specific implementation process includes: Step S131: The feature mapping layer decomposes the standardized line topology data into a structured form according to the time and spatial dimensions through a multimodal embedding function, generating a time series tensor indexed by timestamps and a spatial adjacency matrix with node-edge relationships as the core. In this embodiment of the invention, the feature mapping layer uses a spatiotemporal separation encoder to structurally decompose the standardized data of the line topology of the IEEE 33-node distribution network (including electrical parameters such as voltage, current, and power of 33 nodes, with a sampling frequency of 5 minutes / time, a total of 72 hours of data collected, and known node spatial coordinates). The multimodal embedding function is decomposed into temporal and spatial dimensions: In the temporal dimension, using 5-minute timestamps as indices, the voltage (range 0.95-1.05 pu), current (range 0-200A), and power (range 0-500kW) parameters of each node are extracted to construct a 33×3×288 time series tensor (33 nodes, 3 types of electrical parameters, 288 timestamps); In the spatial dimension, with node-edge relationships as the core, the physical distance (unit km) is calculated based on the spatial coordinates of the nodes, and edges with a distance ≤1km are defined as connected edges, constructing a 33×33 spatial adjacency matrix, where a matrix element 1 indicates connectivity and 0 indicates disconnection. Simultaneously, the per-unit impedance value of the line (range 0.092-0.5) is added to the adjacency matrix as edge weights, ensuring that the matrix simultaneously reflects physical connectivity and impedance correlation. During the decomposition process, dimensional verification ensures a one-to-one correspondence between the time series tensor index and the timestamp, and that the node order of the spatial adjacency matrix matches the actual power grid node numbering. The generated tensors and matrices provide a structured data foundation for subsequent spatiotemporal processing.

[0023] Step S132: The dimension alignment module uses a dynamic time warping algorithm to synchronize the time axis of data with different sampling frequencies. For high-frequency sampled time series tensors, a sliding window mean frequency reduction process is used, and for low-frequency updated spatial adjacency matrices, a linear interpolation frequency increase process is used, so that the time series tensors and spatial adjacency matrices are consistent in time scale, avoiding feature misalignment caused by differences in data sampling frequency. In this embodiment of the invention, the dimension alignment module uses a dynamic time warping algorithm to synchronize the time axis, taking into account the difference in sampling frequency between the time series tensor (sampling frequency 5 minutes / time) and the spatial adjacency matrix (original update frequency 2 hours / time). For high-frequency time series tensors, a sliding window mean downsampling process is used: the window size is set to 24 (corresponding to 2 hours), and the mean of electrical parameters in each window is calculated (e.g., average voltage 1.02 pu, average current 150 A). The 288 timestamps are downsampled to 12, generating a 33×3×12 downsampled time series tensor. For low-frequency spatial adjacency matrices, a linear interpolation upsampling process is used: based on the original adjacency matrices (36 in total) with 2-hour intervals, 23 interpolation matrices are inserted between adjacent matrices. The edge weights at intermediate times are completed by linear calculation (e.g., impedance 0.2 at time t1, 0.25 at time t2, and the intermediate times are calculated as 0.2 + 0.05 × (t - t1) / (t2 - t1)). The 36 matrices are upsampled to 288, and then further downsampled to 12, consistent with the time scale of the time series tensor. After synchronization, a timestamp matching check is performed to ensure that both correspond to 12 identical time nodes (one every 2 hours) to avoid voltage fluctuations and topology changes that are out of sync due to frequency differences.

[0024] Step S133: The spatiotemporal consistency verification unit identifies the asynchronous deviation between time series data and spatial data by calculating the matching degree between the mutation time corresponding to the time series tensor and the timestamp of each topological change record in the spatial adjacency matrix. For samples with asynchronous deviation exceeding the set threshold, a secondary verification mechanism is initiated to correct the asynchronous deviation by combining the historical topological evolution law and the electrical quantity change association rule, and the processed time series tensor and spatial adjacency matrix are generated. In this embodiment of the invention, the spatiotemporal consistency verification unit calculates the matching degree between the mutation time of the time series tensor and the timestamp of the topology change record in the spatial adjacency matrix. First, the mutation time in the time series tensor is identified by a mutation detection tool (the threshold is set to the mean of electrical parameters ±15%): for example, the voltage of node 5 at the 6th timestamp (10 hours) drops from 1.03 pu to 0.96 pu, which is determined to be a mutation time; the topology change record in the spatial adjacency matrix is ​​extracted (for example, the edge weight between node 5 and node 6 at the 5th timestamp changes from 0.22 to 0.35), and the time difference between the mutation time and the change timestamp is calculated (here, it is 2 hours). The matching degree threshold is set to 1 hour (time difference ≤ 1 hour is a match). The time difference of 2 hours in this sample exceeds the threshold, and the secondary verification mechanism is initiated. Combining historical topological evolution patterns (more topological changes around node 5 in the past 3 months accompanied by voltage fluctuations) with the correlation rules of electrical quantity changes (a 15% increase in impedance corresponds to a 5%-8% decrease in voltage), the timestamp of the spatial adjacency matrix change was corrected to the 6th timestamp, synchronizing the change with voltage abrupt changes, generating a processed time series tensor and spatial adjacency matrix with a time difference of 0 hours. After verification, the matching rate of all samples reached ≥95%, ensuring spatiotemporal data consistency.

[0025] Step S134: Perform dimensionality compression and feature filtering on the processed time series tensor and spatial adjacency matrix to extract key temporal features from the time series tensor using principal component analysis and simplify the spatial adjacency matrix using sparse matrix decomposition, thereby reducing data computation complexity while retaining core information.

[0026] In this embodiment of the invention, the 33×3×12 time series tensor and the 33×33 spatial adjacency matrix are subjected to dimensionality compression and feature filtering. Principal component analysis is used to extract key time series features: the covariance matrix of the tensor (99×99, 33 nodes × 3 parameters) is calculated, the eigenvalues ​​are solved and sorted by proportion, the top two principal components with a cumulative contribution rate ≥90% are selected, a 99×2 dimensionality-reduced matrix is ​​constructed, and the original tensor is converted into a 33×2×12 dimensionality-reduced time series tensor, preserving the core trends of voltage and current changes; the spatial adjacency matrix is ​​simplified by sparse matrix decomposition: the 33×33 matrix is ​​decomposed into a lower triangular matrix and an upper triangular matrix using LU decomposition, rows and columns with a non-zero element proportion ≥10% (corresponding to the core connected branches of the power grid) are retained, isolated nodes and invalid edges are removed, and a 28×28 sparse adjacency matrix is ​​generated, with non-zero elements still retaining the original edge weights. The data computation is reduced by 40% after compression. At the same time, the information retention rate is verified to be 92% of the original information of the time series features and 98% accuracy of the adjacency matrix connectivity description. While reducing complexity, the integrity of the core topology and electrical quantity information is guaranteed.

[0027] Furthermore, the bidirectional gated graph recursive unit mentioned in step S2 includes a forward propagation chain, a backward propagation chain, a state fusion gate, and a residual connection module. The long-term dependency modeling of the time series tensor using the bidirectional gated graph recursive unit in the time dimension includes: The forward propagation chain encodes the features of the time series tensor from the historical moment to the current moment. The input gate filters out new features at the current moment, the forget gate discards redundant historical information, and the output gate generates the forward state vector at the current moment. The gate weight parameters are jointly determined by the electrical quantity features at the current moment and the historical state features. In this embodiment of the invention, the forward propagation chain encodes the features of the 33×4×432 time series tensor (the four types of parameters of node 5: voltage V, current I, active power P, reactive power Q, time step t=1 to t=432) from t=1 to t=432. A forward gating structure with bidirectional gated graph recursive units is adopted, and the input gate, forget gate, and output gate are all 3-layer fully connected networks (input dimension 4, hidden layer dimension 8, output dimension 4). For the electrical quantity features of node 5 at time t=100 (V=0.85, I=0.6, P=0.7, Q=0.5, all normalized values), the input gate weight parameters are calculated as follows: combining the current feature with the historical state features at time t=99 (V=0.83, I=0.58, P=0.68, Q=0.48), the input gate weights [0.7, 0.65, 0.72, 0.68] are output through the Sigmoid activation function to filter out significant changes in voltage and power in the current new features; the forget gate weights [0.2, 0.25, 0.18, 0.22] are used to discard redundant historical information of current and reactive power; the output gate weights [0.8, 0.75, 0.82, 0.78] are used to combine the filtered current features with the retained historical features, and the forward state vector at time t=100 [0.84, 0.59, 0.70, 0.49] is generated through the Tanh activation function. All time steps are calculated according to this logic, and the gating weight parameters are iteratively optimized through backpropagation to ensure that the forward state vector can accumulate effective historical time series information.

[0028] Preferably, the backpropagation chain performs feature decoding on the time series tensor from the future time to the current time, so as to generate the reverse state vector at the current time by adopting a gating structure symmetrical with the forward propagation chain, wherein the gating weight parameters are determined by learning the trend of electrical quantity changes in the future time. In this embodiment of the invention, the backpropagation chain decodes the features of the time series tensor from t=432 to t=1, and adopts a gating structure symmetrical to the forward propagation chain (the same 3-layer fully connected network with consistent input and output dimensions). The gating weight parameters are determined by learning the trend of electrical quantity changes in future time moments. For node 5 at time t=100, backpropagation uses future features from time t=101 to t=105 (e.g., V=0.86, I=0.61, P=0.71, Q=0.50 at time t=101) as a reference to calculate the backpropagation input gate weights [0.72, 0.68, 0.74, 0.70], focusing on the future upward trends of voltage and power; the backpropagation forget gate weights [0.18, 0.22, 0.16, 0.20] discard historical fluctuations unrelated to future trends; and the backpropagation output gate weights [0.82, 0.78, 0.84, 0.80] fuse future trend information with current features to generate the backpropagation state vector at time t=100 [0.85, 0.60, 0.71, 0.50]. The backpropagation gate weights are trained by minimizing the error between future features and current decoded features, ensuring that the backpropagation state vector can capture the future evolution of electrical quantities in advance.

[0029] Preferably, the state fusion gate dynamically weights and fuses the forward state vector and the backward state vector through an attention mechanism, calculates the similarity between the forward state vector and the backward state vector in different feature dimensions, assigns fusion weights according to the similarity, and generates a comprehensive state vector containing bidirectional temporal information. In this embodiment of the invention, the state fusion gate dynamically and weights the forward state vector (at time t=100 [0.84, 0.59, 0.70, 0.49]) and the reverse state vector ([0.85, 0.60, 0.71, 0.50]) through an attention mechanism. The cosine similarity of the two vectors in each feature dimension is calculated: voltage dimension similarity = 0.84 × 0.85 / (√(0.84² + 0.59² + 0.70² + 0.49²) × √(0.85² + 0.60² + 0.71² + 0.50²)) ≈ 0.998, current dimension ≈ 0.997, power dimension ≈ 0.998, reactive power dimension ≈ 0.997. Fusion weights are assigned based on similarity: higher similarity results in higher weights, with voltage weighted at 0.502, current at 0.501, power at 0.502, and reactive power at 0.501. The weighted average results in the following comprehensive state vector: V = 0.84 × 0.502 + 0.85 × 0.498 ≈ 0.845, I = 0.59 × 0.501 + 0.60 × 0.499 ≈ 0.595, P = 0.70 × 0.502 + 0.71 × 0.498 ≈ 0.705, Q = 0.49 × 0.501 + 0.50 × 0.499 ≈ 0.495, i.e. [0.845, 0.595, 0.705, 0.495]. This vector contains both historical accumulation and future trend information.

[0030] Preferably, the residual connection module adds the original time series tensor to the comprehensive state vector element by element, and alleviates the gradient vanishing problem through layer normalization. At the same time, an attention mechanism is introduced to assign differentiated weights to the time series features of different electrical parameter types, thereby capturing the bidirectional evolution law of electrical quantities at multiple time points to generate time dimension feature vectors.

[0031] In this embodiment of the invention, the residual connection module adds the features ([0.85,0.6,0.7,0.5]) of node 5 at time t=100 in the original time series tensor to the comprehensive state vector ([0.845,0.595,0.705,0.495]) element by element to obtain the residual features [1.695,1.195,1.405,0.995]. Through layer normalization (calculating the mean of the residual features to be 1.3225 and the standard deviation to be 0.275, and converting it according to (element value - mean) / standard deviation), the normalized residual features [1.35,-0.46,0.30,-1.20] are obtained, which alleviates the gradient vanishing problem. A parametric attention mechanism is introduced to assign differentiated weights to four types of electrical parameters: based on the characteristic that voltage and power are more sensitive to topology changes in distribution network topology analysis, the weights are determined through training to be 0.35 for voltage, 0.35 for power, 0.2 for current, and 0.1 for reactive power. After weighting, a time-dimensional feature vector is generated: 1.35×0.35+(-0.46)×0.2+0.30×0.35+(-1.20)×0.1≈0.473-0.092+0.105-0.12=0.366. All 33 nodes and 432 time steps are processed according to this process, and finally a 33×432 time-dimensional feature vector matrix is ​​generated, which fully captures the bidirectional evolution law of electrical quantities.

[0032] Furthermore, the hierarchical graph attention pooling module described in step S2 includes multi-level attention heads, feature enhancement units, and topology robust modifiers. The multi-scale topological feature extraction of the spatial adjacency matrix through the spatial dimension hierarchical graph attention pooling module includes: The bottom-level attention head focuses on the local topological features of directly adjacent nodes, calculates the electrical quantity similarity and physical distance attenuation coefficient between nodes, and weights and fuses the two as the bottom-level attention weight; In this embodiment of the invention, the bottom-level attention head focuses on the local topological features of directly adjacent nodes in a 33×33 spatial adjacency matrix (node ​​5's direct neighbors are nodes 4, 6, and 10) to calculate weights. Using an electrical quantity similarity tool, the voltage and power similarity between node 5 and its neighboring nodes is calculated: node 5 voltage 0.845, power 0.705; node 4 voltage 0.83, power 0.69; similarity = (0.845×0.83+0.705×0.69) / (√(0.845²+0.705²)×√(0.83²+0.69²))≈0.98; the similarity between node 5 and node 6 is 0.97, and the similarity with node 10 is 0.95. Using a physical distance attenuation coefficient tool, the attenuation coefficients were calculated based on distance (0.8km for nodes 5-4, 1.0km for 5-6, and 1.5km for 5-10) as 1 / (1+distance), yielding values ​​of 0.556, 0.5, and 0.4 respectively. The similarity and attenuation coefficients were then weighted and fused with weights of 0.6 and 0.4: Node 5-4 weight = 0.98×0.6 + 0.556×0.4 ≈ 0.6 + 0.222 = 0.822; 5-6 ≈ 0.97×0.6 + 0.5×0.4 = 0.582 + 0.2 = 0.782; 5-10 ≈ 0.95×0.6 + 0.4×0.4 = 0.57 + 0.16 = 0.73. The weights of non-directly adjacent nodes were set to 0, generating a 33×33 underlying attention weight matrix to ensure that the weights focus on the local associations of directly adjacent nodes.

[0033] Preferably, the intermediate-level attention head captures intermediate-scale topological features of the 2-N order neighborhood through jump connections. The receptive field of each level attention head expands exponentially. At the same time, cross-layer residual connections are introduced to prevent feature degradation. The intermediate-level attention weights are calculated jointly by local topological features and global topological structure features. In this embodiment of the invention, the middle-layer attention head is set with 3 levels (N=3), and captures 2nd-3rd order neighborhood features through jump connections. Level 1 (2nd-order neighborhood): The 2nd-order neighborhood of node 5 is nodes 3, 7, and 9 (extended through nodes 4 and 6). The receptive field range is expanded to 2 hops. The similarity between the local features (voltage deviation ≤ 0.02) and global features (regional power flow ≥ 0.6) of the neighboring nodes and node 5 is calculated. The weight = local similarity × 0.5 + global similarity × 0.5. The weights for nodes 5-3 are 0.65, 5-7 are 0.62, and 5-9 are 0.58. Level 2 (3rd-order neighborhood): The receptive field expands exponentially (covering 8 nodes). The weight calculation introduces cross-layer residual connections. 30% of the weights of the 1st level are superimposed on the current level. The weight for node 5-2 is 0.55 (including 0.65 × 0.3 residuals). Level 3 (N=3): The receptive field covers 15 nodes. The weights are fused with the residuals of the first two levels and the current features. The weight for node 5-1 is 0.52. All mid-level attention head output features are prevented from degradation by layer normalization (mean 0.58, standard deviation 0.12), generating a 33×33 mid-level attention weight matrix. The receptive field of each layer is expanded by 2¹, 2², and 2³ nodes to ensure complete capture of mid-scale topological features.

[0034] Preferably, the high-level attention head extracts the global topology features corresponding to the distribution network through global pooling operations, and assigns differentiated weights to the topology features of different regions by combining the tree structure characteristics of the power grid topology and the power flow distribution law. In this embodiment of the invention, a high-level attention head performs a global pooling operation on a 33-node distribution network (tree structure, with root node 1 being a substation) to extract global topology features. A global average pooling tool is used to calculate the average power flow (root region 0.75, branches 0.6, and terminal regions 0.45) and voltage stability (root region 0.9, branches 0.85, and terminal regions 0.8) for each region (root node regions 1-5, branch regions 6-15, and terminal regions 16-33). Combining the characteristics of a tree structure (the root node influences the entire system) and the power flow pattern (power is concentrated in the root region), differentiated weights are assigned: Root region weight = 0.75×0.4 + 0.9×0.6 = 0.3 + 0.54 = 0.84; Branch region weight = 0.6×0.4 + 0.85×0.6 = 0.24 + 0.51 = 0.75; Terminal region weight = 0.45×0.4 + 0.8×0.6 = 0.18 + 0.48 = 0.66. These region weights are then allocated to the corresponding nodes: node 1 weight 0.84, nodes 6-15 weight 0.75, and nodes 16-33 weight 0.66, generating a global attention weight vector to ensure that global features focus on key regions.

[0035] Preferably, the feature enhancement unit performs channel attention weighting on the feature channels output by each level of attention head, calculates the contribution of different feature channels to topology state recognition, and corrects the topology feature information corresponding to each level of attention head based on the weighted contribution of different feature channels to topology state recognition. In this embodiment of the invention, the feature enhancement unit calculates the channel contribution for the three channels of attention features at the bottom (33×33), middle (33×33), and top (33×1) levels. A channel attention tool is used to learn the contribution through a fully connected network (3D input, 3D output): bottom-level features capture local connections, contributing 0.4; middle-level features capture intermediate associations, contributing 0.35; and top-level features capture the global structure, contributing 0.25. Features at each level are weighted and corrected according to their contribution: bottom-level feature × 0.4 + middle-level feature × 0.35 + top-level feature × 0.25. For example, the corrected feature of node 5 = 0.822 × 0.4 (bottom-level 5-4 weight) + 0.65 × 0.35 (middle-level 5-3 weight) + 0.84 × 0.25 (weight of the root region where top-level node 5 is located) ≈ 0.329 + 0.228 + 0.21 = 0.767. All nodes are corrected in this way to generate a 33×33 enhanced spatial feature matrix. The channel contribution is verified through training data (the accuracy of topology recognition is improved by 5% after correction), ensuring that the features highlight key channel information.

[0036] Preferably, the topology robust corrector dynamically adjusts the weight ratio of abnormal connections by calculating the feature consistency score for abnormal connections identified, including those with misconnections or short circuits. When the topology features of a line are found to be seriously inconsistent with those of surrounding lines, the weight of the line in the spatial adjacency matrix is ​​automatically reduced to establish dynamic association weights between nodes and generate spatial dimension feature vectors.

[0037] In this embodiment of the invention, the topology robust corrector detects incorrect connection records in the spatial adjacency matrix (node ​​8 is labeled as connecting nodes 7 and 9, but actually connects 7 and 8), and calculates the feature consistency score: the voltage similarity between nodes 8 and 9 is 0.8 (below the normal threshold of 0.9), and the power flow deviation is 0.2 (above the threshold of 0.1), so the consistency score = 0.8 × 0.5 - 0.2 × 0.5 = 0.3 (below the acceptable threshold of 0.7). The abnormal connection weights are dynamically adjusted: the original weight of node 8-9 is 0.7, and after correction = 0.7 × (consistency score / acceptable threshold) = 0.7 × (0.3 / 0.7) = 0.3; simultaneously, the correct connection of node 8-8 is added (original weight 0), and the similarity is calculated to be 0.96, the attenuation coefficient is 0.5, and the weight = 0.96 × 0.6 + 0.5 × 0.4 = 0.776. For the short-circuit anomaly (nodes 12 and 13 short-circuited, power flow surge), the consistency score is 0.2, and the short-circuit connection weight is reduced from 0.8 to 0.23. After correction, a 33×33 dynamic association weight matrix is ​​generated. The matrix is ​​flattened row by row into a 33×33 spatial dimension feature vector to ensure that the vector accurately reflects the corrected topological association.

[0038] Furthermore, step S3 includes the following steps: Step S31: Extract the generated temporal and spatial feature vectors, map the two types of features to the same dimensional space through a feature normalization layer, and use the L2 normalization method to eliminate the difference in feature dimensions to ensure that spatiotemporal features are fused at the same scale; In this embodiment of the invention, a 33×432 time-dimensional feature vector matrix (the feature value range of node 5 at time step 432 is 0.3-0.9) and a 33×33 spatial-dimensional feature vector matrix (the association weight of node 5 with other nodes ranges from 0.2-0.9) are extracted and mapped to the same dimensional space through a feature normalization layer. The time-dimensional matrix is ​​flattened row-wise into a 33×14256 (432×33) vector, and the spatial-dimensional matrix is ​​flattened into a 33×1089 (33×33) vector. Then, a fully connected network (14256-dimensional input and 1089-dimensional output on the time side; 1089-dimensional input and 1089-dimensional output on the spatial side) is used to unify the dimensions to 33×1089. The L2 normalization method is used for processing: For the 1089-dimensional feature vector of each node, the L2 norm of the vector is calculated (e.g., the L2 norm of the time feature of node 5 = √(0.3² + 0.4² + ... + 0.9²) = 12.5). Each element in the vector is divided by the L2 norm, so that the normalized feature value range is 0.002-0.072. The difference between the dimensions of time and space features is eliminated, ensuring that the two are fused at the same scale. The L2 norm of the normalized feature vector is 1, and the error is ≤0.001.

[0039] Step S32: Construct a cross-modal fusion gating unit, using the temporal dimension feature vector and the spatial dimension feature vector as input, and generate a dynamic fusion weight matrix through the sigmoid activation function. The element values ​​of the dynamic fusion weight matrix are learned from the correlation strength of spatiotemporal features under different topological states. In this embodiment of the invention, a cross-modal fusion gating unit is constructed, with a 33×1089 time and spatial feature vector as input. The gating unit comprises a two-layer fully connected network (2178-dimensional input, 1089-dimensional hidden layer, and 1089-dimensional output). The time and spatial feature vectors are concatenated into a 33×2178 vector along the channel dimension and then input into the network. A 33×1089 dynamic fusion weight matrix is ​​generated through a sigmoid activation function (output range 0-1). The element values ​​of the weight matrix are learned from the spatiotemporal feature correlation strength: the voltage time series trend in the time feature of node 5 has a high correlation strength with the spatial feature of nodes 5-4, corresponding to an element weight of 0.8; the reactive power fluctuation in the time feature has a low correlation strength with the spatial feature of nodes 5-10, corresponding to an element weight of 0.3. By iteratively optimizing the parameters of the gating unit through training data, the weight matrix can accurately reflect the spatiotemporal correlation under different topological states (such as normal and ledger misconnection). Under the normal topological state, the average weight of the time feature is 0.52 and the average weight of the spatial feature is 0.48, ensuring that the weight allocation conforms to the actual correlation law of the topology.

[0040] Step S33: Based on the dynamic fusion weight matrix, nonlinear coupling is performed on the time dimension feature vector and the spatial dimension feature vector. The time dimension feature vector affects the adjacency aggregation mode of the spatial dimension feature vector through the state propagation of the gated loop unit, so that the weight of the spatial adjacency matrix is ​​dynamically adjusted with time. At the same time, the spatial dimension feature vector corrects the temporal dependency strength of the time dimension feature vector through the graph attention coefficient, enhancing the ability to identify spatiotemporal coupling anomalies, so as to generate the fused feature vector. In this embodiment of the invention, the temporal and spatial feature vectors are nonlinearly coupled based on a dynamic fusion weight matrix. The temporal feature vector is transferred through the state of the gated loop unit (forget gate weight 0.6, input gate weight 0.7) to convert the voltage temporal changes (e.g., voltage increase of 0.2 from t=100 to t=200) into a weight adjustment signal of the spatial adjacency matrix, so that the spatial weight of node 5-4 is dynamically adjusted from 0.73 to 0.81 (enhancing the matching voltage correlation). The spatial feature vector corrects the temporal dependence strength of the temporal features through the graph attention coefficient (attention coefficient of node 5-4 0.82), and feeds back the spatial correlation strength of node 5-4 to the temporal side, so that the voltage temporal dependence weight from t=200 to t=300 is increased from 0.5 to 0.65, enhancing the ability to identify abnormal voltage fluctuations (e.g., voltage drop caused by misconnection of ledgers). After coupling, a fusion feature vector of 33×1089 is generated. Among the fusion features of node 5, the feature values ​​of the spatiotemporal coupling region (0.05-0.072) are significantly higher than those of the uncoupled region (0.002-0.03), ensuring that the coupling features can reflect the spatiotemporal correlation.

[0041] Step S34: The feature vector after fusion is processed by residual connection and layer normalization. The residual connection is used to preserve the original spatiotemporal feature information, and the layer normalization is used to stabilize the feature distribution during the training process, generating a line topology feature representation containing spatiotemporal joint semantic information. In this embodiment of the invention, the feature vector is fused through residual connections and layer normalization. The residual connections superimpose the original temporal and spatial feature vectors with a weight of 0.3 onto the fused feature vector: fused feature vector = fused feature × 0.7 + temporal feature × 0.15 + spatial feature × 0.15. For example, in the fused feature of node 5, an element = 0.06 × 0.7 + 0.05 × 0.15 + 0.04 × 0.15 = 0.057, preserving the original spatiotemporal feature information. Layer normalization calculates the mean (e.g., mean 0.035 for node 5) and variance (0.0004) of the 1089-dimensional fused features for each node, processed using the formula (element value - mean) / √(variance + 1e-5), resulting in a normalized feature mean of 0 and a variance of 1. During training, the feature distribution fluctuation range decreases from ±0.02 to ±0.005, stabilizing the training process. The final generated line topology feature representation is 33×1089, which includes spatiotemporal joint semantic information. For example, the representation of node 5 simultaneously reflects the voltage time series trend and the change in node association weight.

[0042] Step S35: Perform anomaly feature mining on the line topology feature representation, and use an autoencoder structure to reconstruct the line topology feature representation, calculate the reconstruction error and set an error threshold, determine the features whose reconstruction error exceeds the error threshold as abnormal topology features, and fuse them to generate a unified topology feature representation containing the abnormal topology.

[0043] In this embodiment of the invention, an autoencoder structure (1089-dimensional input and 512-dimensional hidden layer for encoder; 512-dimensional input and 1089-dimensional output for decoder) is used to reconstruct the line topology feature representation. The 33×1089 feature representation is input to the autoencoder, and the decoder outputs a reconstructed feature vector. The reconstruction error (mean squared error, MSE) for each node is calculated: MSE = 0.002 for normal topology nodes (e.g., node 1); MSE = 0.015 for nodes with incorrect connections (e.g., node 8). An error threshold of 0.008 is set (based on the mean MSE of 1000 normal topology samples + 2 times the standard deviation). Node features with MSE > 0.008 are identified as abnormal topology features (nodes 8, 12, etc.). Abnormal and normal features are fused: abnormal node features are labeled with anomaly type (incorrect connection / short circuit), while normal node features retain their original information, generating a unified 33×1089 topology feature representation. In this representation, the anomaly flag for abnormal nodes is set to 1, and for normal nodes, it is set to 0, ensuring a clear distinction between abnormal and normal topology features.

[0044] Furthermore, step S4 includes the following steps: Step S41: Construct a dynamic topology state prediction head, and use a graph convolutional decoder to reconstruct the topology relationship of the unified topology feature representation. The convolution kernel parameters of the graph convolutional decoder are determined by learning the mapping law between topology features and connection relationships. The output is a connection probability matrix between nodes. The element values ​​of the connection probability matrix represent the probability that there is an effective connection between the corresponding nodes. In this embodiment of the invention, a dynamic topology state prediction head is constructed, and a three-layer graph convolutional decoder is used to reconstruct the topological relationships of a unified topological feature representation of 33×1089. The convolutional kernel parameters of each layer of the graph convolutional decoder are determined by learning the mapping law between topological features and connectivity relationships: the first layer has a kernel size of 3×3, 1089 input channels, and 512 output channels. The kernel weights are initialized using a uniform Xavier distribution, and through training, the mapping weight between voltage time-series features and the connectivity relationship of node 5-4 reaches 0.7; the second layer has a kernel size of 3×3, 512 input channels, and 256 output channels, focusing on learning the mapping between power flow features and critical link connectivity relationships; the third layer has a kernel size of 1×1, 256 input channels, and 33 output channels. The output is converted into 0-1 probability values ​​through a Softmax activation function, generating a 33×33 connectivity probability matrix. The matrix element values ​​represent the probability of effective connections between nodes: 0.98 for node 1-2 (almost certain connection), 0.25 for node 8-9 (high probability of disconnection), and 0.92 for node 18-19 (normal connection). The matching degree between the connection probability matrix and the actual topology connection relationship is optimized through training iterations, and the final matching accuracy is ≥93%.

[0045] Step S42: Design a spatiotemporal joint loss function, which includes a time-series prediction loss in the time dimension and a topology loss in the spatial dimension. The time-series prediction loss in the time dimension is used to constrain the model's prediction accuracy for the time-series changes of electrical quantities, and the topology loss in the spatial dimension is used to optimize the prediction accuracy of node connection relationships. The balance between the two-dimensional optimization objectives is achieved through dynamic weighting factors. In this embodiment of the invention, a spatiotemporal joint loss function is designed, comprising temporal prediction loss in the time dimension and topology loss in the spatial dimension. The temporal prediction loss employs an improved Huber loss to constrain the accuracy of electrical quantity (voltage, current) time-series predictions: for the deviation between the predicted and actual voltage values ​​of node 5, small deviations (≤0.12 pu) are compensated by squared loss (e.g., a deviation of 0.08 pu results in a loss of 0.0032), while large deviations (>0.12 pu) are compensated by absolute loss (e.g., a deviation of 0.2 pu results in a loss of 0.0168). The temporal prediction loss accounts for 40%. The spatial topology loss comprises cross-entropy loss (40%) and link prediction loss (20%): cross-entropy loss constrains node connection state classification (e.g., a prediction error loss of 0.0316 for nodes 8-9), and link prediction loss optimizes edge weight ranking (e.g., the predicted score of actually connected edges is 0.3 or higher than that of non-connected edges). The topology loss accounts for 60%. The dynamic weighting factor is adjusted according to the training process: the temporal and topological loss weights are 0.5:0.5 for the first 50 rounds of training, gradually adjusted to 0.4:0.6 from rounds 51 to 150, and stabilized after round 151 to ensure the balance of the two-dimensional optimization objectives. The joint loss function value stabilizes at 0.015-0.02 after training convergence.

[0046] Step S43: End-to-end model training is performed using an adaptive learning rate optimization algorithm. The initial learning rate is set according to the data scale and network complexity. During the training process, the initial learning rate is periodically adjusted using a cosine annealing mechanism. At the same time, an early stopping mechanism is introduced. When the validation set loss does not decrease for several consecutive rounds, training is stopped, and the model parameters with the best performance on the validation set are saved to build a dynamic topology state prediction model. In this embodiment of the invention, an adaptive learning rate optimization algorithm (AdamW) is used for end-to-end model training. The data scale consists of 33 nodes running data for one year (17,520 hours, 1 sample per hour). The network contains 5 fully connected layers and 3 graph convolutional layers. The initial learning rate is set to 0.005 (calibrated based on data scale and network complexity to ensure stable initial training loss). During training, a cosine annealing mechanism is used to adjust the learning rate: the period is set to 50 rounds, and the learning rate changes periodically between 0.005 and 0.0001. It decreases to 0.0001 in the 50th round and rises back to 0.005 in the 100th round to avoid local optima. An early stopping mechanism is introduced: training stops if the validation set loss does not decrease for 15 consecutive rounds (bias ≤ 0.001). When training reaches 180 rounds, if the validation set loss stabilizes at 0.017 for 15 consecutive rounds, training stops and the model parameters (including convolutional kernel weights and fully connected layer parameters) for that round are saved. During model training, a batch size of 32 was used, and the regularization coefficient L2=1e-4+Dropout=0.3 was applied. The final model achieved a topology connectivity prediction accuracy of 96.2% on the test set, and the electrical quantity timing prediction error was ≤0.05pu.

[0047] Step S44: Convert the real-time collected line operation data into a unified topology feature representation according to the processing flow of steps S1-S3, input it into the trained dynamic topology state prediction model, and output the dynamic topology state prediction results, including the node connection relationship matrix, equipment status health score and topology change trend probability distribution. In this embodiment of the invention, the real-time collected line operation data (voltage, current, and power data of 33 nodes within 1 hour, sampling frequency 1 minute / time) is processed according to steps S1-S3: Step S1 collects data and generates initial topology data; Step S2 preprocesses (interpolates to fill in 2 missing values ​​and corrects 1 ledger anomaly); Step S3 generates a unified topology feature representation of 33×1089 through spatiotemporal separation encoder and feature fusion. This feature representation is input into the trained dynamic topology state prediction model, and the model outputs the dynamic topology state prediction results: a 33×33 node connection relationship matrix (node ​​1-2 connection probability 0.99, node 8-9 0.26, node 18-19 0.91); the status health scores of 33 devices (node ​​8 device 72 points, node 18 device 88 points, node 1 device 95 points); the probability distribution of topology change trends (the probability of node 8-9 losing connection in the next 1 hour is 78%, the probability of node 18-19 tripping is 12%, and the overall topology stability probability is 85%). The prediction results are output at the same frequency as the data acquisition frequency, updated once per hour, to ensure that the topology status is reflected in real time.

[0048] Step S45: Post-process the dynamic topology state prediction results and verify them in conjunction with historical topology data to ensure the reliability of the output results, thereby outputting the real-time topology connection relationship and equipment status change trend of the distribution network; perform dynamic topology reconstruction based on the real-time topology connection relationship and equipment status change trend of the distribution network to generate a reliable topology map of the current moment that includes potential branch disconnection and temporary tripping.

[0049] In this embodiment of the invention, the dynamic topology state prediction results are post-processed, and a threshold judgment is used (connection probability ≥80% is considered connected, ≤30% is considered disconnected) to transform the connection relationship matrix into a binary topology graph (connected 1, disconnected 0). An abnormal warning is marked for equipment health scores ≤75. Verification is performed using historical topology data (topology connection records and equipment health changes within the same time period over the past month): Nodes 8-9 have 3 disconnection records within the same time period over the past month, and the current predicted disconnection probability of 78% matches historical patterns; Nodes 18-19 have no tripping records within the past month, and the current predicted tripping probability of 12% conforms to historical stability, verifying the reliability of the output results. Real-time distribution network topology connection relationships (32 connected branches, 1 disconnected branch) and equipment status change trends are generated (equipment health at node 8 continues to decline, while equipment health at node 18 remains stable). Based on this result, dynamic topology reconstruction is performed, marking potential disconnected branches (nodes 8-9) and normal branches, generating a reliable topology map at the current time (including 32 normal branches and 1 branch marked as disconnected), and attaching a list of equipment status warnings for operation and maintenance scheduling.

[0050] Furthermore, the temporal prediction loss in step S42 employs an improved Huber loss function, and the topology loss in the spatial dimension adopts a combined loss mechanism. The specific implementation process includes: In the time dimension loss calculation, the improved Huber loss function achieves differentiated processing of electrical quantity fluctuations of different amplitudes through a dynamic threshold adjustment module. Square loss is used for small-amplitude normal fluctuations to improve prediction accuracy, while absolute value loss is used for large-amplitude fault fluctuations to enhance the model's anti-interference ability. The dynamic threshold is adaptively adjusted according to historical electrical quantity fluctuation data and fault statistical patterns. In this embodiment of the invention, an improved Huber loss function is used in the time-dimensional loss calculation, and a dynamic threshold adjustment module is used to handle the deviation between the predicted and actual electrical quantity time-series values ​​(such as voltage and power) of the 33 nodes. The dynamic threshold is adaptively adjusted based on the historical electrical quantity fluctuation data of the past year (normal fluctuation range 0-0.12pu, fault fluctuation >0.12pu) and fault statistical patterns (fault fluctuation accounts for 5%), and the threshold is set at 0.12pu. For small-amplitude normal fluctuations (deviation ≤ 0.12 pu), the squared loss is used for calculation: the voltage prediction deviation of node 5 is 0.08 pu, and the loss value = 0.5 × (0.08)² = 0.0032, improving the accuracy of normal time-series prediction. For large-amplitude fault fluctuations (deviation > 0.12 pu), the absolute value loss is used for calculation: the voltage prediction deviation of node 8 is 0.2 pu due to a misconnection in the ledger, and the loss value = 0.12 × 0.2 - 0.5 × (0.12)² = 0.024 - 0.0072 = 0.0168, enhancing the model's anti-interference ability against fault fluctuations. The dynamic threshold is updated daily to ensure matching with the real-time electrical quantity fluctuation characteristics. During peak load periods, the threshold is adjusted to 0.15 pu to avoid normal load fluctuations being misjudged as faults. The average loss in the time dimension is controlled between 0.005 and 0.018, balancing the loss calculation accuracy for both normal and fault scenarios.

[0051] Preferably, in the spatial dimension loss calculation, cross-entropy loss is used to constrain the classification accuracy of node connection status, and the prediction accuracy of the connection relationship of critical tie lines and substation outgoing lines is highlighted by weighting factors, thereby reducing the impact of non-critical line prediction errors on the overall topology analysis results. In this embodiment of the invention, the cross-entropy loss is used to constrain the node connection status (1 for connected, 0 for disconnected) of the 33×33 spatial adjacency matrix in the spatial dimension loss calculation to predict accuracy. Critical lines are highlighted by weighting factors: critical connecting lines (such as nodes 1-2 and 5-4, carrying more than 50% of the regional power transmission) are weighted at 0.8; substation outgoing lines (nodes 1-3 and 1-5) are weighted at 0.9; and non-critical lines (such as nodes 25-26, carrying <5% of the power) are weighted at 0.3. Calculate the cross-entropy loss: Node 1-2 connection state prediction is correct (actual 1, predicted 1), loss value = -0.9 × 1 × ln(0.95) ≈ 0.046 (prediction probability 0.95); Node 8-9 is incorrectly predicted due to ledger error (actual 0, predicted 1), loss value = -0.3 × 0 × ln(0.1) - 0.3 × 1 × ln(0.9) ≈ 0 - (-0.0316) = 0.0316, reducing the impact of non-critical path prediction errors on the overall topology. After balancing the total spatial dimension loss through weighting factors, the critical path loss accounts for 65%, and the non-critical path loss accounts for 35%, ensuring accurate core topology connection prediction.

[0052] Preferably, a link prediction loss is introduced, and a Bayesian personalized ranking loss function is used to compare the prediction scores of actual connected edges and non-connected edges, optimize the relative ranking relationship of edge weights, and enable the model to more accurately identify effective and invalid connections in the topology. In this embodiment of the invention, by introducing link prediction loss, the prediction scores of actual connected edges (32 edges) and non-connected edges (33×33-32=1057 edges) in the spatial adjacency matrix are compared using a Bayesian personalized ranking loss function. For each actual connected edge, 5 non-connected edges are randomly selected to form a comparison group, and the loss is calculated: the prediction score of actual connected edge node 5-4 is 0.81, and the prediction score of non-connected edge node 5-9 is 0.2, so the loss value = ln(1+exp(0.2-0.81)) = ln(1+0.543) = 0.434; the prediction score of actual connected edge node 1-2 is 0.92, and the prediction score of non-connected edge node 1-20 is 0.15, so the loss value = ln(1+exp(0.15-0.92)) = ln(1+0.463) = 0.381. By optimizing the relative ranking of edge weights using this loss, the predicted scores of actual connected edges are all higher than those of non-connected edges (difference ≥ 0.3). The model can accurately identify effective connections (such as nodes 5-4) and invalid connections (such as nodes 8-9). The average link prediction loss is controlled between 0.35 and 0.45, and the edge weight ranking accuracy is ≥ 92%.

[0053] Preferably, a loss balancing mechanism is constructed to dynamically adjust the weighting factor to weight and fuse the temporal and spatial losses, balancing their weights in the early stages of training and gradually increasing the proportion of spatial topology loss as training progresses. In this embodiment of the invention, a loss balancing mechanism is constructed, and the weighting factor is dynamically adjusted to fuse the time loss (Lt) and the spatial loss (Ls, including cross-entropy loss and link prediction loss). In the initial training phase (rounds 1-50), the weighting factor is set to Lt:Ls=0.5:0.5 to ensure synchronous learning of spatiotemporal features. For example, in round 10, Lt=0.008 and Ls=0.04, the total loss is 0.5×0.008+0.5×0.04=0.024. As the training progresses (rounds 51-150), the proportion of spatial topology loss is gradually increased. Every 10 rounds, the weight of Ls increases by 0.05, and the weight of Lt decreases by 0.05. In the later training phase (rounds 151-200), the weighting factor is stabilized at Lt:Ls=0.2:0.8 to prioritize accurate prediction of topology structure. For example, in round 180, Lt=0.005 and Ls=0.02, the total loss is 0.2×0.005+0.8×0.02=0.017. The dynamic weights are adjusted based on the topology prediction accuracy feedback from the validation set. When the accuracy is ≥95%, the Ls weights no longer increase, ensuring that the model focuses on topology accuracy optimization in the later stages of training, and the final topology prediction accuracy stabilizes at over 96%.

[0054] Preferably, the loss function is regularized by introducing an L2 regularization term to suppress excessively large model parameters, and Dropout technology is used to randomly block some neurons to prevent overfitting of the model, thereby designing the corresponding spatiotemporal joint loss function.

[0055] In this embodiment of the invention, overfitting is prevented by regularizing the loss function and introducing an L2 regularization term and Dropout technology. The L2 regularization term coefficient is set to 1e-4, and the sum of squares of all model parameters (such as fully connected network weights and attention coefficients) is calculated: assuming a total of 1e5 model parameters and a mean of 0.02 for the sum of squares, the L2 regularization loss = 1e-4 × 0.02 = 0.002, suppressing excessively large parameters (absolute value of a single parameter ≤ 0.5). Using Dropout technology, 30% of neurons in the fully connected and attention layers are randomly masked. For example, in the temporal feature processing layer of node 5, 327 out of 1089 neurons are randomly masked, making the model independent of specific neurons and enhancing generalization ability. The final designed spatiotemporal joint loss function = dynamic weighted fusion loss + L2 regularization loss. For example, in the 200th round, the dynamic weighted fusion loss is 0.015, the L2 loss is 0.002, and the total loss is 0.017. By applying regularization, the model's topology prediction accuracy on the test set improved by 4% compared to the unregularized version, and the overfitting degree (the difference between the accuracy of the training set and the test set) decreased from 12% to 5%, ensuring stable generalization of the model.

[0056] Furthermore, the post-processing of the dynamic topology state prediction results described in step S45 includes: Based on the dynamic topology state prediction results, the basic connectivity indicators of the topology structure are calculated, including node degree distribution, average path length and clustering coefficient. In this embodiment of the invention, the basic connectivity index of the topology is calculated based on the dynamic topology state prediction results (33×33 spatial adjacency matrix, containing 32 effective connecting edges). The degree distribution of nodes is calculated using a degree statistics tool: root node 1 connects 5 lines (degree 5), critical link node 5 connects 3 lines (degree 3), and terminal node 33 connects 1 line (degree 1), generating a degree distribution [5,3,2,...,1] with a mean degree of 1.94 (64 / 33). The average path length is calculated using the shortest path algorithm (Dijkstra's algorithm) to find the shortest path for all node pairs: node 1 to node 33 requires passing through 8 nodes (path length 8), and node 5 to node 20 requires passing through 5 nodes (path length 5). The path lengths of all 33×32 / 2=528 node pairs are counted, and the average path length = total path length / 528 = 1260 / 528≈2.39. The clustering coefficient is calculated using the following formula: The actual number of connecting edges between the three neighboring nodes (4, 6, 10) of node 5 is 2 (4-6, 6-10), and the theoretical maximum number of connecting edges is 3 (3×2 / 2). The clustering coefficient is 2 / 3≈0.67. The average clustering coefficient of all nodes is 15.2 / 33≈0.46. The basic connectivity index fully reflects the connection density and path characteristics of the topology.

[0057] Preferably, a multi-scenario fault set is generated through Monte Carlo simulation to simulate the impact of different types of faults on the topology, calculate the load transfer margin and power restoration time under different fault scenarios, and generate dynamic response capability indicators of the topology. In this embodiment of the invention, 1000 sets of multi-scenario faults are generated through Monte Carlo simulation, covering line circuit breaks (60%), node faults (30%), and equipment malfunctions (10%). Simulating a line 1 (nodes 1-2) circuit break: Calculate the load transfer margin, transferring the 20MW load carried by line 1 to the adjacent line 3 (nodes 1-3). Line 3 has a rated capacity of 25MW and a current load of 15MW. Margin = 25 - 15 - 20 = -10MW (further transfer to line 5 is required). Power restoration time is accumulated by the fault location (5 seconds), isolation (10 seconds), and transfer (20 seconds) times, resulting in a restoration time of 5 + 10 + 20 = 35 seconds. Simulating a node 10 fault: Load transfer margin = the sum of the remaining capacities of surrounding lines 6 (nodes 5-6) and 9 (nodes 9-10) 30MW - the load of node 10 15MW = 15MW; restoration time = 8 + 12 + 18 = 38 seconds. Statistics were collected on 1000 fault scenarios. The average load transfer margin was 8.5MW and the average power restoration time was 32 seconds. Dynamic response capability index was generated. The larger the index value, the stronger the topology's ability to respond to faults.

[0058] Preferably, a fault propagation model is constructed to simulate the impact range of a single node fault on the global topology based on the electrical coupling relationship and topology connection relationship of nodes, and the fault propagation index is calculated to generate the disturbance resistance index of the topology structure. In this embodiment of the invention, a fault propagation model is constructed to simulate fault propagation based on the electrical coupling relationship (voltage coupling coefficient ≥ 0.8) and topological connection relationship (directly adjacent) of nodes. Taking a fault at node 8 (voltage drop caused by incorrect connection of ledger) as an example: node 8 is directly adjacent to nodes 6, 7, and 9 (topologically connected), and electrically coupled to nodes 5 and 10 (voltage coupling coefficients 0.82 and 0.78, respectively). The fault first propagates to the directly adjacent nodes (voltage drop of 0.15 pu at nodes 6, 7, and 9), and then spreads to the electrically coupled nodes (voltage drop of 0.1 pu at nodes 5 and 10). The fault propagation index is calculated as: number of propagation nodes / total number of nodes × 100% + maximum voltage drop / initial voltage × 100%. The number of propagation nodes is 6 (8, 6, 7, 9, 5, and 10), the total number of nodes is 33, the maximum voltage drop is 0.2 pu, and the initial voltage is 1.0 pu. The propagation index is calculated as: 6 / 33 × 100% + 0.2 / 1.0 × 100% ≈ 18.18% + 20% = 38.18%. Simulated node 1 fault (root node): number of propagating nodes 33, maximum voltage drop 0.5 pu, propagation index = 100% + 50% = 150%. The average fault propagation index of all nodes is 45.2%, generating a disturbance immunity index. The lower the index, the stronger the topology's ability to resist fault propagation.

[0059] Preferably, a topology reliability scoring system is established, which integrates basic connectivity indicators, dynamic response capability indicators, and disturbance resistance capability indicators according to weights to generate a comprehensive reliability score for the topology. In this embodiment of the invention, a topology reliability scoring system is established, in which the basic connectivity index (weight 0.3), dynamic response capability index (weight 0.4), and disturbance resistance index (weight 0.3) are linearly weighted and fused. The basic connectivity index is standardized as follows: degree distribution mean 1.94 (2.0 for a full score of 100, score 97), average path length 2.39 (2.0 for a full score of 100, score 83), clustering coefficient 0.46 (0.5 for a full score of 100, score 92), mean = (97+83+92) / 3 = 90.67, weighted score = 90.67×0.3≈27.2. Standardized dynamic response capability indicators: Load transfer margin 8.5MW (10MW out of 100, score 85), recovery time 32 seconds (30 seconds out of 100, score 93), mean = (85+93) / 2 = 89, weighted score = 89×0.4≈35.6. Standardized disturbance immunity indicators: Propagation index 45.2% (30% out of 100, score 66), weighted score = 66×0.3≈19.8. Overall reliability score = 27.2+35.6+19.8=82.6 (out of 100), a higher score indicates stronger topology reliability.

[0060] Preferably, potential faulty links with a comprehensive reliability score below a set threshold are screened out, and root cause analysis is performed in conjunction with historical topology data to extract the electrical and topological characteristics of the potential faulty links. Similarity matching is performed with historical fault cases in the historical topology data to determine the cause of the fault, and alarm information including fault location, possible causes, and scope of impact, as well as topology repair suggestions, are output. Based on the corresponding fault causes, the dynamic topology state prediction results are verified and predicted to output the real-time topology connection relationship and equipment status change trend of the distribution network.

[0061] In this embodiment of the invention, by setting a comprehensive reliability score threshold of 75, lines 8 (nodes 8-9) with a score of 72 and lines 15 (nodes 15-16) with a score of 68 are selected as potential faulty links. Root cause analysis is performed by combining historical topology data (100 fault cases from the past 3 years): the electrical characteristics (voltage fluctuation 0.2 pu, power flow deviation 15%) and topology characteristics (incorrect ledger labeling, adjacent node degree 3) of line 8 are extracted and matched with the historical case "Line X ledger misconnection" (92% similarity), determining the fault cause to be ledger misconnection; the characteristics of line 15 (impedance increase 20%, connection node degree 2) are matched with the historical case "Line Y connector oxidation" (88% similarity), determining the fault cause to be connector oxidation. The alarm information output is: "Fault location: Line 8 (nodes 8-9), possible cause: incorrect connection in the ledger, affected area: voltage drop in 6 nodes; Fault location: Line 15 (nodes 15-16), possible cause: joint oxidation, affected area: abnormal power in 3 nodes." The repair suggestion is: "Correct the ledger information for Line 8 to node 8-8, replace the joint in Line 15." Based on the fault cause verification prediction: After the simulated ledger correction, the score of Line 8 increased to 85 points, verifying the accuracy of the prediction result. Finally, the real-time topology connection relationship of the distribution network (32 effective edges) and the trend of equipment status changes are output (Lines 8 and 15 require key monitoring).

[0062] Furthermore, the dynamic topology reconstruction based on the real-time topology connection relationship and equipment status change trend of the distribution network described in step S45 includes: Extract real-time topology connection relationships and device status change trends. The real-time topology connection relationships include the connection probability values ​​between each node, and the device status change trends include the device health score change curve over time and abnormal status warning indicators. In this embodiment of the invention, the real-time topology connection relationship and equipment status change trend of the IEEE 33-node distribution network are extracted. The real-time topology connection relationship is calculated based on the dynamic topology status prediction results to determine the connection probability value between each node: for each branch, based on the topology prediction results of 12 time steps in the past hour (connection status 1 is connected, 0 is disconnected), the connection probability value = number of connections / total time steps. For line 8 (nodes 8-9), only 3 of the past 12 steps predict connection, so the connection probability value = 3 / 12 = 25%; for line 1 (nodes 1-2), all 12 steps are connected, so the connection probability value = 100%; for line 15 (nodes 15-16), 8 steps are connected, so the connection probability value = 8 / 12 ≈ 66.7%. A 33×33 connection probability matrix is ​​generated. The trend of equipment status changes is obtained through the equipment health rating system: the health rating is calculated based on the equipment operating parameters (temperature, humidity, insulation resistance), with a full score of 100 points. The health rating curve of Line 8 over the past 12 hours is "90→85→80→72" (recorded once every 2 hours). When the score drops to 75 points, an abnormal status warning sign (red warning) is marked. The health rating curve of Line 15 is "92→90→88→85", with no warning sign. The health rating of Line 1 is stable at 95 points, with no warning, ensuring that the trend of equipment status changes fully reflects the equipment deterioration process and abnormal warnings.

[0063] Preferably, a dynamic topology reconstruction rule base is constructed. For potential branch disconnection scenarios, dual judgment conditions are set: the connection probability value is lower than the disconnection judgment threshold and the electrical quantity of adjacent nodes changes suddenly. For temporary tripping scenarios, a joint judgment condition is set: the equipment health score drops sharply, the corresponding branch current changes to zero suddenly, and the connection probability of the branch in the topology connection relationship matrix instantly returns to zero. In this embodiment of the invention, a dynamic topology reconstruction rule base is constructed, and two types of scenario judgment conditions are set. Potential branch disconnection scenario: The disconnection judgment threshold is set to 30% (based on the statistics of historical disconnection cases, when the connection probability is ≤30%, the branch disconnection probability is ≥90%). The dual judgment conditions are "connection probability value ≤30% and sudden change in electrical quantity of adjacent nodes (voltage deviation ≥0.1pu or current deviation ≥20%)", such as the connection probability of line 8 being 25%≤30%, and the voltage deviation between adjacent nodes 8 and 9 being 0.15pu≥0.1pu, which meets the condition. Temporary tripping scenario: The joint judgment condition is "a sudden drop in equipment health score (a decrease of ≥10 points within 1 hour), a sudden change in the corresponding branch current to zero (current value ≤0.5A), and an instantaneous return to zero in the connection probability of this branch in the topology connection matrix (from ≥80% to ≤10% within 1 time step)". For example, simulating a trip of line 5 (nodes 5-6), the health score drops from 90 points to 78 points within 1 hour (a decrease of 12 points), the branch current drops from 180A to 0.2A, and the connection probability drops from 95% to 5%, thus meeting this condition. All thresholds in the rule base have been calibrated through nearly 500 fault cases over the past 3 years to ensure that the accuracy of the judgment condition is ≥95%, avoiding false positives and false negatives.

[0064] Preferably, the real-time topology connection relationship is analyzed by topology structure, and the connection relationship between nodes is traversed based on the connectivity analysis algorithm in graph theory. Branches whose connection probability values ​​meet the dual judgment conditions are marked, and branches that meet the joint judgment conditions are identified by combining the change curve in the equipment status change trend and the abnormal status warning sign. The fault location of potential branch disconnection and temporary tripping is initially located. In this embodiment of the invention, the topological structure of the 33×33 connection probability matrix of the real-time topological connection relationship is analyzed, and the depth-first search algorithm in graph theory is used to traverse all the connection relationships between nodes (starting from the root node 1, traversing adjacent nodes 2, 3, 5, etc. in sequence, and recording the connection probability value of each branch). Branches that meet the dual judgment conditions of potential branch disconnection are marked: traversal reveals line 8 (connection probability 25%≤30%, voltage deviation 0.15pu≥0.1pu) and line 22 (nodes 22-23, connection probability 28%≤30%, current deviation 22%≥20%). Combined with the trend of equipment status change, the health score curve of line 8 shows a downward trend and has an abnormal warning, while the health score of line 22 is stable but there is a sudden change in electrical quantity. These two branches are initially located as potential branch disconnection fault locations. Branches meeting the joint criteria for temporary tripping were identified: Traversal revealed that the connection probability of line 18 (nodes 18-19) decreased from 92% to 8%, the equipment health score decreased from 88 to 75 within one hour (a decrease of 13 points), and the branch current decreased from 150A to 0.3A, thus meeting the joint criteria and initially locating the temporary tripping fault. All location results were compared with fault alarm information from the real-time monitoring system, verifying an accuracy rate of ≥92%, ensuring precise fault location.

[0065] Preferably, a multi-source data cross-validation mechanism is introduced to compare the initially located fault location with the switch status signals and fault waveform data collected by the real-time monitoring system of the distribution network. If the connection status of the fault location is consistent with the actual open / closed status of the switch and the electrical quantity changes match the fault waveform data, then the abnormal scenario is confirmed. If there is a data deviation, the backtracking verification process is initiated to retrieve the unified topology feature representation generated in step S3 and correct the connection probability values ​​between each node. In this embodiment of the invention, a multi-source data cross-verification mechanism is introduced to compare the initially located fault location with data from the real-time monitoring system of the distribution network. For line 8 (potential disconnection): the switch status signal of the monitoring system is retrieved, and the switch corresponding to line 8 is actually in the open state (consistent with the disconnection trend reflected by the 25% connection probability); the fault waveform data is checked, and the voltage of adjacent nodes 8 and 9 of line 8 drops sharply from 0.98 pu to 0.83 pu at 10:00 (deviation 0.15 pu, matching the electrical quantity change data), confirming the potential branch disconnection scenario. For line 22 (potential disconnection): the switch status shows that it is closed, but the current of line 22 in the fault waveform data drops from 120A to 95A (deviation 20.8%, meeting the change condition), indicating a data deviation, and the backtracking verification process is initiated. The unified topology feature representation (spatial-temporal fusion feature vector of line 22) generated in step S3 was retrieved again, and the connection probability calculation was corrected: prediction data for 6 time steps over nearly 30 minutes were added (4 steps of connectivity, 2 steps of disconnection). The new connection probability value = (28%×12+4 / 6×6) / (12+6) = (3.36+4) / 18≈40.9% (above the 30% threshold), thus eliminating the potential disconnection judgment. For line 18 (temporary trip): the switch status is open, and the fault waveform shows a sudden change in current of 0.3A, which perfectly matches the judgment condition, confirming the temporary trip scenario.

[0066] Preferably, a topology completion algorithm is used to repair the topology of the confirmed abnormal scenarios. For potential branch disconnection, virtual backup connection paths are generated based on the historical connection patterns of the disconnected branches and the topological association characteristics of surrounding nodes. For temporary tripping, temporary alternative branches are marked based on the historical recovery records of the tripped equipment and the grid topology redundancy design, thereby generating backup paths. In this embodiment of the invention, a topology completion algorithm is used to repair confirmed abnormal scenarios. For line 8 (potential disconnection): its historical connection pattern is extracted (during normal operation in the past 6 months, the main connection is between node 8 and node 7, and the backup connection is between node 8 and node 10). Combined with the topological association characteristics of surrounding nodes (node ​​7 connects to nodes 5 and 6, and node 10 connects to nodes 5 and 9), a virtual backup connection path "node 8 → node 7 → node 5 → node 9" is generated (replacing the original "node 8 → node 9" path), with a total impedance of 0.35Ω (close to the original path's 0.32Ω). For line 18 (temporary trip): the historical recovery records of the tripped equipment are queried (the last 3 trips were all temporarily recovered via the node 17 → node 19 path). Combined with the grid topology redundancy design (a backup line exists between node 17 and node 19, with a current load factor of 60%), "node 18 → node 17 → node 19" is marked as a temporary replacement branch. This branch has a rated current of 200A and a current of 120A, meeting the load transfer requirements (the original load of line 18 was 80A). After the repair, all backup paths were verified through power flow calculations to ensure that power transmission loss is ≤5% and voltage drop is ≤0.05pu.

[0067] Preferably, a visualization generation module for the current topology map is constructed. Based on the spatial coordinates of the equipment in the distribution network geographic information system, different colors are used to identify normal branches, potentially disconnected branches, and tripped branches. The location information, anomaly judgment criteria, and recommended handling schemes for abnormal branches are marked on the current topology map, including maintenance priorities and backup paths. In this embodiment of the invention, a topology visualization generation module is constructed based on the spatial coordinates of the equipment in the distribution network geographic information system (e.g., coordinates of node 8: 30.1256°N, 120.5701°E; coordinates of node 18: 30.1302°N, 120.5789°E). The status of branches is indicated by color: normal branches (e.g., lines 1 and 15) are green, potentially disconnected branches (line 8) are yellow, and tripped branches (line 18) are red. Abnormal branch information is marked on the topology map: line 8 is marked "Location: Nodes 8-9, Judgment basis: Connection probability 25% + Voltage deviation 0.15pu, Maintenance priority: High, Backup path: 8→7→5→9"; line 18 is marked "Location: Nodes 18-19, Judgment basis: Health score decreased by 13 points + Current returned to zero, Maintenance priority: Medium, Backup path: 18→17→19". The visual interface supports zooming (scale 1:10000) and clicking to view details (clicking on a line displays real-time current and voltage), ensuring that maintenance personnel can intuitively obtain abnormal information and handling solutions.

[0068] Preferably, the reliability of the topology graph at the current moment is verified, and the connectivity, redundancy and load coverage capacity indicators of the topology graph at the current moment are calculated. If the connectivity is lower than the power grid safe operation threshold, the redundancy cannot meet the fault transfer requirements, or there are blind spots in the load coverage capacity indicators, then the backup path is re-optimized. If all reliability indicators meet the requirements, then the final reliable topology graph at the current moment is output.

[0069] In this embodiment of the invention, the reliability of the current topology graph is verified, and core indicators are calculated. Connectivity is calculated using graph theory: all 33 nodes in the entire power grid are connected to root node 1 through at least one path, with connectivity = 100% (power grid safe operation threshold ≥ 95%). Redundancy is calculated by determining the number of backup paths for each branch: normal branches have an average of 2 backup paths, and abnormal repair branches (lines 8 and 18) have 1 backup path, with an average redundancy of 1.8 (meeting the fault transfer requirement threshold ≥ 1.2). Load coverage capacity is assessed through load point connectivity statistics: all 120 load points in the entire power grid (33 nodes each containing 3-4 load points) can obtain power through the main path or backup path, with no coverage blind spots (load coverage capacity threshold ≥ 100%). Since all indicators meet the requirements, no backup path optimization is needed, and the final reliable topology graph for the current time is output. This topology graph contains 32 normal branches and 2 repair branches, which can be directly used for distribution network operation and maintenance scheduling.

[0070] Therefore, the embodiments should be considered as exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of the equivalents of the application are intended to be included within the invention.

[0071] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.

Claims

1. A spatiotemporal fusion neural network method for line topology analysis in power distribution networks, characterized in that, Includes the following steps: Step S1: Obtain the original line topology data corresponding to the distribution network, including the ledger information corresponding to the line operation, electrical quantity time series data and equipment spatial distribution data, and perform structured decomposition and preprocessing of the original line topology data through a spatiotemporal separation encoder to construct a spatiotemporal double graph structure containing time series tensors and spatial adjacency matrices. The time series tensors record the dynamic evolution characteristics of electrical quantities corresponding to voltage and current, and the spatial adjacency matrix represents the physical connection relationship of equipment and the initial topology association strength. Step S2: Construct a bidirectional dynamic feature interaction mechanism based on the spatiotemporal double graph structure. This mechanism uses bidirectional gating graph recursive units in the time dimension to model the long-term dependency of time series tensors, capturing the bidirectional evolution of electrical quantities at multiple time points. Simultaneously, it uses a hierarchical graph attention pooling module in the spatial dimension to extract multi-scale topological features from the spatial adjacency matrix, establishing dynamic association weights between nodes and generating a spatiotemporally separated feature vector set, including time dimension feature vectors and spatial dimension feature vectors. Step S3: A cross-modal gated loop and graph attention hybrid mechanism is used to deeply couple and fuse the spatiotemporally separated feature vector sets, and dynamic weighted interaction between the temporal dimension feature vectors and the spatial dimension feature vectors is realized through learnable gate weight parameters to generate a unified topological feature representation that includes the anomaly topology. Step S4: Construct a dynamic topology state prediction model based on unified topology feature representation, optimize the spatiotemporal joint loss function through end-to-end training, and output the real-time topology connection relationship and equipment state change trend of the distribution network. At the same time, perform dynamic topology reconstruction based on the real-time topology connection relationship and equipment state change trend of the distribution network to generate a reliable topology map of the current moment that includes potential branch disconnection and temporary tripping.

2. The spatiotemporal fusion neural network line topology analysis method for distribution networks according to claim 1, characterized in that, Step S1 includes the following steps: Step S11: Collect the original line topology data of the distribution network in collaboration with the distribution network monitoring system, equipment ledger management platform and geographic information system. The ledger information corresponding to the line operation includes the line model, connection node number and laying method information. The electrical quantity time series data includes the effective values ​​of three-phase voltage and current and active and reactive power data sampled at the minute level. The equipment spatial distribution data includes the latitude, longitude and elevation data of substations, switching stations and line towers. Step S12: Preprocess the original line topology data to fill in the missing values ​​in the electrical quantity time series data and equipment spatial distribution data using interpolation algorithms, and use the isolated forest algorithm to identify and correct abnormal records corresponding to line misconnection and missing connection in the ledger information. At the same time, the influence of electrical parameters with different dimensions is eliminated by the range normalization method to generate standardized line topology data. Step S13: Input the standardized line topology data into the spatiotemporal separation encoder, and perform structured decomposition according to the time and space dimensions to generate a time series tensor indexed by timestamps and a spatial adjacency matrix with node-edge relationships as the core. The dimension of the time series tensor is determined by the sampling time length and the number of electrical parameter types. The initial values ​​of the elements of the spatial adjacency matrix are calculated by the physical distance between devices and the line impedance. Step S14: Dynamically correct the spatial adjacency matrix by introducing real-time line operating parameters, including power flow distribution and voltage drop rate, to adjust the initial values ​​of the elements in the spatial adjacency matrix, so that the spatial adjacency matrix reflects both the physical connection relationship of the equipment and the coupling strength of electrical functions, and combines the time series tensor to construct a spatiotemporal double graph structure.

3. The spatiotemporal fusion neural network line topology analysis method for distribution networks according to claim 2, characterized in that, The spatiotemporal separation encoder described in step S13 includes a feature mapping layer, a dimension alignment module, and a spatiotemporal consistency verification unit. The specific implementation process includes: Step S131: The feature mapping layer decomposes the standardized line topology data into a structured form according to the time and spatial dimensions through a multimodal embedding function, generating a time series tensor indexed by timestamps and a spatial adjacency matrix with node-edge relationships as the core. Step S132: The dimension alignment module uses a dynamic time warping algorithm to synchronize the time axis of data with different sampling frequencies. For high-frequency sampled time series tensors, a sliding window mean frequency reduction process is used, and for low-frequency updated spatial adjacency matrices, a linear interpolation frequency increase process is used, so that the time series tensors and spatial adjacency matrices are consistent in time scale, avoiding feature misalignment caused by differences in data sampling frequency. Step S133: The spatiotemporal consistency verification unit identifies the asynchronous deviation between time series data and spatial data by calculating the matching degree between the mutation time corresponding to the time series tensor and the timestamp of each topological change record in the spatial adjacency matrix. For samples with asynchronous deviation exceeding the set threshold, a secondary verification mechanism is initiated to correct the asynchronous deviation by combining the historical topological evolution law and the electrical quantity change association rule, and the processed time series tensor and spatial adjacency matrix are generated. Step S134: Perform dimensionality compression and feature filtering on the processed time series tensor and spatial adjacency matrix to extract key temporal features from the time series tensor using principal component analysis and simplify the spatial adjacency matrix using sparse matrix decomposition, thereby reducing data computation complexity while retaining core information.

4. The spatiotemporal fusion neural network line topology analysis method for distribution networks according to claim 1, characterized in that, The bidirectional gated graph recursive unit mentioned in step S2 includes a forward propagation chain, a backward propagation chain, a state fusion gate, and a residual connection module. The long-term dependency modeling of the time series tensor using the bidirectional gated graph recursive unit in the time dimension includes: The forward propagation chain encodes the features of the time series tensor from the historical moment to the current moment. The input gate filters out new features at the current moment, the forget gate discards redundant historical information, and the output gate generates the forward state vector at the current moment. The gate weight parameters are jointly determined by the electrical quantity features at the current moment and the historical state features. The backpropagation chain decodes the features of the time series tensor from the future time to the current time, and generates the reverse state vector of the current time by adopting a gating structure symmetrical with the forward propagation chain. The gating weight parameters are determined by learning the trend of electrical quantity changes in the future time. The state fusion gate dynamically weights and fuses the forward and backward state vectors through an attention mechanism, calculates the similarity between the forward and backward state vectors on different feature dimensions, assigns fusion weights based on similarity, and generates a comprehensive state vector containing bidirectional temporal information. The residual connection module adds the original time series tensor to the comprehensive state vector element by element and alleviates the gradient vanishing problem through layer normalization. At the same time, it introduces an attention mechanism to assign differentiated weights to the time series features of different electrical parameter types, thereby capturing the bidirectional evolution of electrical quantities at multiple time points to generate time dimension feature vectors.

5. The spatiotemporal fusion neural network line topology analysis method for distribution networks according to claim 1, characterized in that, The hierarchical graph attention pooling module described in step S2 includes a multi-level attention head, a feature enhancement unit, and a topology robust corrector. The multi-scale topological feature extraction of the spatial adjacency matrix through the hierarchical graph attention pooling module in the spatial dimension includes: The bottom-level attention head focuses on the local topological features of directly adjacent nodes, calculates the electrical quantity similarity and physical distance attenuation coefficient between nodes, and weights and fuses the two as the bottom-level attention weight; The intermediate-level attention head captures intermediate-scale topological features of the 2-N order neighborhood through jump connections. The receptive field of each level attention head expands exponentially. At the same time, cross-layer residual connections are introduced to prevent feature degradation. The intermediate-level attention weights are calculated jointly by local topological features and global topological structure features. The high-level attention head extracts the global topology features of the distribution network through global pooling operations, and assigns differentiated weights to the topology features of different regions by combining the tree structure characteristics of the power grid topology and the power flow distribution law. The feature enhancement unit performs channel attention weighting on the feature channels output by each level of attention head, calculates the contribution of different feature channels to topology state recognition, and corrects the topology feature information corresponding to each level of attention head based on the weighted contribution of different feature channels to topology state recognition. The topology robust corrector dynamically adjusts the weight ratio of abnormal connections by calculating feature consistency scores for identified abnormal connections, including those with misconnections or short circuits. When the topology features of a line are found to be seriously inconsistent with those of surrounding lines, the weight of that line in the spatial adjacency matrix is ​​automatically reduced to establish dynamic association weights between nodes and generate spatial dimension feature vectors.

6. The spatiotemporal fusion neural network line topology analysis method for distribution networks according to claim 1, characterized in that, Step S3 includes the following steps: Step S31: Extract the generated temporal and spatial feature vectors, map the two types of features to the same dimensional space through a feature normalization layer, and use the L2 normalization method to eliminate the difference in feature dimensions to ensure that spatiotemporal features are fused at the same scale; Step S32: Construct a cross-modal fusion gating unit, using the temporal dimension feature vector and the spatial dimension feature vector as input, and generate a dynamic fusion weight matrix through the sigmoid activation function. The element values ​​of the dynamic fusion weight matrix are learned from the correlation strength of spatiotemporal features under different topological states. Step S33: Based on the dynamic fusion weight matrix, nonlinear coupling is performed on the time dimension feature vector and the spatial dimension feature vector. The time dimension feature vector affects the adjacency aggregation mode of the spatial dimension feature vector through the state propagation of the gated loop unit, so that the weight of the spatial adjacency matrix is ​​dynamically adjusted with time. At the same time, the spatial dimension feature vector corrects the temporal dependency strength of the time dimension feature vector through the graph attention coefficient, enhancing the ability to identify spatiotemporal coupling anomalies, so as to generate the fused feature vector. Step S34: The feature vector after fusion is processed by residual connection and layer normalization. The residual connection is used to preserve the original spatiotemporal feature information, and the layer normalization is used to stabilize the feature distribution during the training process, generating a line topology feature representation containing spatiotemporal joint semantic information. Step S35: Perform anomaly feature mining on the line topology feature representation, and use an autoencoder structure to reconstruct the line topology feature representation, calculate the reconstruction error and set an error threshold, determine the features whose reconstruction error exceeds the error threshold as abnormal topology features, and fuse them to generate a unified topology feature representation containing the abnormal topology.

7. The spatiotemporal fusion neural network line topology analysis method for distribution networks according to claim 1, characterized in that, Step S4 includes the following steps: Step S41: Construct a dynamic topology state prediction head, and use a graph convolutional decoder to reconstruct the topology relationship of the unified topology feature representation. The convolution kernel parameters of the graph convolutional decoder are determined by learning the mapping law between topology features and connection relationships. The output is a connection probability matrix between nodes. The element values ​​of the connection probability matrix represent the probability that there is an effective connection between the corresponding nodes. Step S42: Design a spatiotemporal joint loss function, which includes a time-series prediction loss in the time dimension and a topology loss in the spatial dimension. The time-series prediction loss in the time dimension is used to constrain the model's prediction accuracy for the time-series changes of electrical quantities, and the topology loss in the spatial dimension is used to optimize the prediction accuracy of node connection relationships. The balance between the two-dimensional optimization objectives is achieved through dynamic weighting factors. Step S43: End-to-end model training is performed using an adaptive learning rate optimization algorithm. The initial learning rate is set according to the data scale and network complexity. During the training process, the initial learning rate is periodically adjusted using a cosine annealing mechanism. At the same time, an early stopping mechanism is introduced. When the validation set loss does not decrease for several consecutive rounds, training is stopped, and the model parameters with the best performance on the validation set are saved to build a dynamic topology state prediction model. Step S44: Convert the real-time collected line operation data into a unified topology feature representation according to the processing flow of steps S1-S3, input it into the trained dynamic topology state prediction model, and output the dynamic topology state prediction results, including the node connection relationship matrix, equipment status health score and topology change trend probability distribution. Step S45: Post-process the dynamic topology state prediction results and verify them in conjunction with historical topology data to ensure the reliability of the output results, thereby outputting the real-time topology connection relationship and equipment status change trend of the distribution network; perform dynamic topology reconstruction based on the real-time topology connection relationship and equipment status change trend of the distribution network to generate a reliable topology map of the current moment that includes potential branch disconnection and temporary tripping.

8. The spatiotemporal fusion neural network line topology analysis method for distribution networks according to claim 7, characterized in that, The temporal prediction loss in step S42 employs an improved Huber loss function, and the topology loss in the spatial dimension uses a combined loss mechanism. The specific implementation process includes: In the time dimension loss calculation, the improved Huber loss function achieves differentiated processing of electrical quantity fluctuations of different amplitudes through a dynamic threshold adjustment module. Square loss is used for small-amplitude normal fluctuations to improve prediction accuracy, while absolute value loss is used for large-amplitude fault fluctuations to enhance the model's anti-interference ability. The dynamic threshold is adaptively adjusted according to historical electrical quantity fluctuation data and fault statistical patterns. In the spatial dimension loss calculation, cross-entropy loss is used to constrain the classification accuracy of node connection status, and the prediction accuracy of the connection relationship of critical tie lines and substation outgoing lines is highlighted by weighting factors, thereby reducing the impact of non-critical line prediction errors on the overall topology analysis results. By introducing link prediction loss and using a Bayesian personalized ranking loss function to compare the prediction scores of actual connected edges and non-connected edges, the relative ranking relationship of edge weights is optimized, enabling the model to more accurately identify effective and invalid connections in the topology. A loss balancing mechanism is constructed to dynamically adjust the weighting factor to weight and fuse temporal and spatial losses. The weights of the two are balanced in the early stage of training, and the proportion of spatial topology loss is gradually increased as the training progresses. The loss function is regularized by introducing an L2 regularization term to suppress excessively large model parameters, and Dropout technology is used to randomly block some neurons to prevent overfitting, thus designing the corresponding spatiotemporal joint loss function.

9. The spatiotemporal fusion neural network line topology analysis method for distribution networks according to claim 7, characterized in that, The post-processing of the dynamic topology state prediction results in step S45 includes: Based on the dynamic topology state prediction results, the basic connectivity indicators of the topology structure are calculated, including node degree distribution, average path length and clustering coefficient. Multi-scenario fault sets are generated through Monte Carlo simulation to simulate the impact of different types of faults on the topology, calculate the load transfer margin and power restoration time under different fault scenarios, and generate dynamic response capability indicators of the topology. A fault propagation model is constructed to simulate the impact range of a single node fault on the global topology based on the electrical coupling relationship and topology connection relationship of nodes, and the fault propagation index is calculated to generate the disturbance resistance index of the topology. Establish a topology reliability scoring system, and integrate basic connectivity indicators, dynamic response capability indicators, and disturbance resistance capability indicators according to weights to generate a comprehensive reliability score for the topology structure; Potentially faulty links with a comprehensive reliability score below a set threshold are screened out, and root cause analysis is performed using historical topology data to extract the electrical and topological characteristics of the potential faulty links. Similarity matching is then performed with historical fault cases in the historical topology data to determine the cause of the fault. Alarm information including fault location, possible causes, and scope of impact, as well as topology repair suggestions, are output. Based on the corresponding fault causes, the dynamic topology state prediction results are verified and predicted, thereby outputting the real-time topology connection relationship and equipment status change trend of the distribution network.

10. The spatiotemporal fusion neural network line topology analysis method for distribution networks according to claim 9, characterized in that, The dynamic topology reconstruction based on the real-time topology connection relationship and equipment status change trend of the distribution network in step S45 includes: Extract real-time topology connection relationships and device status change trends. The real-time topology connection relationships include the connection probability values ​​between each node, and the device status change trends include the device health score change curve over time and abnormal status warning indicators. A dynamic topology reconstruction rule base is constructed. For potential branch disconnection scenarios, dual judgment conditions are set: the connection probability value is lower than the disconnection judgment threshold and the electrical quantity of adjacent nodes changes suddenly. For temporary tripping scenarios, a joint judgment condition is set: the equipment health score drops sharply, the corresponding branch current changes to zero suddenly, and the connection probability of the branch in the topology connection relationship matrix instantly returns to zero. The real-time topology connection relationship is analyzed. Based on the connectivity analysis algorithm in graph theory, the connection relationship between nodes is traversed. Branches whose connection probability values ​​meet the dual judgment conditions are marked. The branch that meets the joint judgment conditions is identified by combining the change curve in the equipment status change trend and the abnormal status warning sign. The fault location of potential branch disconnection and temporary tripping is initially located. A multi-source data cross-validation mechanism is introduced to compare the initially located fault location with the switch status signals and fault waveform data collected by the real-time monitoring system of the distribution network. If the connection status of the fault location is consistent with the actual open / closed status of the switch and the electrical quantity changes match the fault waveform data, the abnormal scenario is confirmed. If there is a data deviation, the backtracking verification process is initiated to retrieve the unified topology feature representation generated in step S3 and correct the connection probability values ​​between each node. A topology completion algorithm is used to repair the topology of confirmed abnormal scenarios. For potential branch disconnection, virtual backup connection paths are generated based on the historical connection patterns of the disconnected branches and the topology association characteristics of surrounding nodes. For temporary tripping, temporary alternative branches are marked based on the historical recovery records of the tripped equipment and the grid topology redundancy design, thereby generating backup paths. A visualization generation module for the current topology map is constructed. Based on the spatial coordinates of equipment in the distribution network geographic information system, different colors are used to identify normal branches, potentially disconnected branches, and tripped branches. The location information, anomaly judgment criteria, and recommended handling solutions for abnormal branches are marked on the current topology map, including maintenance priorities and backup paths. The reliability of the current topology graph is verified by calculating the connectivity, redundancy, and load coverage indicators of the current topology graph. If the connectivity is lower than the power grid safe operation threshold, the redundancy cannot meet the fault transfer requirements, or there are blind spots in the load coverage indicators, the backup path is re-optimized. If all reliability indicators meet the requirements, the final reliable topology graph for the current time is output.

Citation Information

Patent Citations

  • Regional power grid voltage sag propagation trajectory identification method based on deep learning

    CN115877068A

  • Large power grid transient power angle stability assessment method based on high-dimensional map attention network

    CN116760015A

  • Active power distribution network topology identification method based on multi-task graph learning and related device

    CN118889428A

  • Reactive compensation optimization method and system based on AI

    CN120300823A

  • Systems and methods for identifying and remediating architecture risk

    US20230281368A1

Cited By

  • Power distribution network topology dynamic reconstruction method based on spatial-temporal feature fusion

    CN121055343A

  • A power distribution network topology dynamic reconstruction method based on space-time feature fusion

    CN121055343B

  • Transformer overheating fault intelligent diagnosis system based on physical information neural network

    CN121071754A

  • Medium-voltage power distribution network wiring mode intelligent identification method and system based on multi-source data fusion

    CN121071835A

  • Complex system data visualization modeling method based on GIS and topological graph fusion

    CN121117094A