A power distribution network topology identification method based on a graph neural network
By combining complex octet graph convolutional networks and attention mechanisms with sliding window and Hippocampus optimization algorithms, the modeling and dynamic adaptation problems of existing methods in distribution network topology identification are solved, achieving high-precision and fast topology identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHE JIANG ZHUO RUI WEI ZHI NENG ZHI ZAO YOU XIAN GONG SI
- Filing Date
- 2026-03-04
- Publication Date
- 2026-06-09
AI Technical Summary
Existing graph neural network methods struggle to accurately model complex characteristics such as three-phase quantities, phase shifts, and power factors in distribution network topology identification. They also cannot adapt to dynamic distribution scenarios with frequently changing connection relationships, lack high-dimensional expression capabilities with multi-channel, multi-component, and strong coupling characteristics, and have a high risk of local optimal convergence. Consequently, they fail to meet the application requirements of distribution networks with strong real-time performance, frequent dynamic structural changes, and complex data dimensions.
We employ a complex octagon graph convolutional network and attention mechanism, combined with a sliding window modeling mechanism and hippocampus optimization algorithm, to construct a complex octagon input structure. We integrate physical connection edges and perturbation behavior edges, extract topological embedding representations through graph convolutional networks, and perform joint optimization.
It improves the ability to represent the electrical characteristics of distribution nodes, enhances the ability to dynamically perceive topology, improves model optimization efficiency and recognition accuracy, adapts to frequent topology changes and power disturbances in distribution networks, and has high recognition accuracy and computational efficiency.
Smart Images

Figure CN122174008A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system technology, and in particular to a distribution network topology identification method based on graph neural networks. Background Technology
[0002] As a crucial component of the power system, the accurate identification of the distribution network structure directly impacts tasks such as fault location, load analysis, and dispatch control. With the development of distribution automation, smart terminals, and multi-source measurement technologies, a large amount of time-series electrical data can be collected in real time, providing a technological foundation for data-driven topology identification. Existing technologies typically rely on topology archives, feeder status, and switch location information maintained by the distribution automation system, using rule matching, graph search, or heuristic algorithms to reconstruct node connectivity. However, under frequent switching operations, feeder wiring adjustments, and abnormal conditions in the distribution network, these methods based on static structural information lack sufficient identification capabilities and struggle to adapt to dynamic changes in the actual operating environment.
[0003] In recent years, graph neural networks have been introduced for power topology analysis tasks. Traditional graph convolutional networks model node connectivity through adjacency matrices and perform state propagation based on node features, which can extract structural information and feature interactions in distribution networks to a certain extent. However, existing graph neural network methods mostly represent electrical quantities based on real-valued vectors, making it difficult to accurately model data with complex characteristics such as three-phase quantities, phase offsets, and power factors. Furthermore, most methods use fixed topology structures for training and inference, failing to handle dynamic distribution scenarios with frequently changing connectivity. In addition, regarding edge weight modeling, existing methods typically rely solely on physical connections or static attribute assignments, neglecting the consistency of power disturbance behavior between nodes in the distribution network, resulting in edge weight information failing to reflect the coupling characteristics of structural and behavioral edges.
[0004] For power distribution operation data sampled at high frequencies, node features exhibit non-stationary perturbations over time, and potential dynamic behavioral relationships exist between nodes. Relying solely on structural adjacency information to construct the graph structure will limit recognition accuracy. Regarding model structure, existing studies mostly employ standard real-valued graph convolutional networks or attention networks, lacking the ability to express the high-dimensional characteristics of multi-channel, multi-component, and strongly coupled features in power distribution scenarios, making it difficult to form robust and universally applicable embedding representations. In terms of model optimization, traditional methods often employ gradient descent or Bayesian parameter tuning, which carries a high risk of local optima convergence and lacks the ability to jointly optimize structure and hyperparameters.
[0005] In summary, existing topology identification methods have limitations in terms of modeling dimensionality, structural representation capabilities, behavioral information fusion, and parameter optimization mechanisms, making it difficult to meet the application requirements of distribution networks, which are characterized by high real-time performance, frequent dynamic structural changes, and complex data dimensions. Therefore, providing a distribution network topology identification method based on graph neural networks is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] One objective of this invention is to propose a distribution network topology identification method based on graph neural networks. This invention constructs a complex octonium input structure by combining the multi-channel electrical features of distribution nodes, designs a context-sliding window modeling mechanism, and integrates physical connection edges and disturbance behavior edges to construct a coupled graph structure. Topology embedding representations are extracted through a complex octonium graph convolutional network and an attention mechanism. Furthermore, a Hippocampi optimization algorithm is introduced to jointly optimize network structure parameters and control parameters, thereby achieving accurate identification of the distribution network topology. This method possesses advantages such as high modeling dimensionality, strong adaptability to dynamic structural changes, high identification accuracy, and controllable computational efficiency.
[0007] A distribution network topology identification method based on graph neural networks according to an embodiment of the present invention includes the following steps: S1. Collect three-phase voltage, current, power factor and phase data of each node in the distribution network, and construct a node feature matrix according to node number and time step; S2. Based on the primary wiring diagram of the distribution network and the real-time switch status, extract the connection relationships between nodes, construct a list of node pairs, and generate a sparse adjacency matrix. S3. Map the four types of electrical quantities of each node in the node feature matrix to a complex octet vector; S4. Set the sliding window length and stack the complex octet vectors of multiple consecutive time steps to form the context input tensor; S5. Input the context input tensor and sparse adjacency matrix into the complex octet graph convolutional network, perform graph convolution operations, and output the initial node embedding representation; S6. Calculate the power perturbation correlation matrix based on node feature changes, and generate the edge weight matrix of physical connection edge and behavior coupling edge by combining the sparse adjacency matrix. Input the weight matrix into the gating mechanism for edge weight fusion. S7. Input the initial node embedding representation and the edge weight matrix into the attention mechanism, calculate the attention weights of each node and its neighboring nodes, and generate the context fusion node representation; S8. The hippocampus optimization algorithm is used to jointly optimize the number of complex octagonal convolution kernels, sliding window length, gating fusion ratio and attention layer structure, and output the topology recognition results and optimal model parameters.
[0008] Optionally, the three-phase voltage, current, power factor, and phase data collected in step S1 are synchronously sampled at a fixed period, with the sampling period being between 0.01 seconds and 0.1 seconds. The sampling results are constructed into a three-dimensional tensor structure using node numbers and timestamps as indices. The first dimension of the tensor is the node number, the second dimension is the sampling time step, and the third dimension is the numerical vector of the four types of electrical quantities. The three-phase voltage and current are preprocessed by weighted average denoising filtering, and the power factor and phase values are corrected for timing abrupt changes by differential correction.
[0009] Optionally, the process of constructing the sparse adjacency matrix in S2 includes: parsing the node connection relationship from the primary wiring diagram of the power distribution network, extracting each pair of nodes with a conductive path to form an initial connection list, filtering out connection entries in the disconnected state according to the real-time switch status, encoding the retained node pairs as non-zero element positions of the sparse matrix, uniformly setting the value range of the sparse adjacency matrix to 1, indicating that there is a valid electrical connection between nodes, and assigning 0 to the remaining positions of the matrix.
[0010] Optionally, S3 specifically includes: S31. From the node feature matrix, extract eight types of values in sequence according to node number and time step: three-phase voltage, three-phase current, power factor and phase angle. Among them, the three-phase voltage includes phase A voltage, phase B voltage and phase C voltage, and the three-phase current includes phase A current, phase B current and phase C current, which constitute the original feature vector of the corresponding node at the current time step. S32. Perform linear normalization on each electrical quantity in the original feature vector according to its extreme value range across the entire network and all time periods. All values are uniformly mapped to the range between zero and one. The normalized data retains three decimal places. S33. The eight normalized electrical values are sequentially assigned to the eight component bits of the complex octet, and the values are respectively assigned to the zeroth to seventh component slots of the complex octet vector to complete the complex octet vector representation. S34. Stack the complex octet vectors generated by all nodes at all time steps in chronological order to form a three-dimensional tensor data structure with the node number as the first dimension, the time step as the second dimension, and the octet values as the third dimension. S35. The three-dimensional tensor data structure is used as the direct construction basis for the context input tensor. Each position in the three-dimensional tensor structure corresponds to a complex octet vector representation of a node at a certain time step, and the data corresponds to the node number and time index.
[0011] Optionally, S4 specifically includes: S41. Set the context sliding window length parameter and sliding step parameters ,in This indicates the number of consecutive time steps contained in each window. This represents the number of steps forward in time for each swipe operation, and is always a positive integer. Less than or equal to the total number of node feature time steps ; S42. From the three-dimensional complex octet tensor, number the nodes... Extract its complex octet vector sequence at all time steps. The first dimension of the tensor is the node number, the second dimension is the time step, and the third dimension is the eight-dimensional complex octet representation. S43, with step length Perform a sliding window operation on the time series corresponding to each node number, extracting continuous data each time. A complex octet vector at each time step constitutes a node. At the window start time step The input sequence in the context window below is represented as a stacked matrix of complex octonions with a size of Rows of 8 columns; S44. Number all nodes. to Execute operation S43 to generate a set of node context window sequences; the maximum number of context window samples that can be generated for each node on the complete time series. Satisfy the following expressions: ; in, This represents the total number of time steps. This represents the floor function; S45. Organize the context window samples of all nodes at all time steps into a four-dimensional context input tensor by using node number as the first dimension, time step index as the second dimension, and window sequence as the third dimension. The first dimension is the number of nodes. The second dimension is the number of sliding window samples. The third dimension is the window length. The fourth dimension is the feature dimension, which is 8. S46. Input the four-dimensional context tensor The sparse adjacency matrix is used as a joint input to the complex octet graph convolutional network.
[0012] Optionally, S5 specifically includes: S51. Use the context input tensor as the graph convolution input feature and the sparse adjacency matrix as the graph structure input. S52. A graph neural network structure containing multiple layers of complex octet graph convolutional units is adopted. Each convolutional operation processes the interaction between eight components, and channel coupling is achieved through shared weights and gating mapping. S53. Introduce an activation function in each graph convolutional layer to perform a non-linear transformation on the output of each node in that layer and pass it to the next convolutional layer. S54. After all convolutional layers have been computed, use the output of the last layer as the initial embedding representation of the node in the current context window.
[0013] Optionally, S6 specifically includes: S61. Input tensor from context Extract all nodes Complex octet vector sequences at adjacent time steps Calculate the disturbance change vector ; S62, For any two nodes and Based on its perturbation variation sequence, the Pearson correlation coefficient is calculated along the time dimension and defined as: ; in, Represents the covariance function. Indicates standard deviation; S63. Based on the sparse adjacency matrix, extract all non-zero element positions to form a set of structural connection edges. The corresponding edge weights are all set to 1, forming a structural edge weight matrix. ; S64. The correlation coefficient matrix China satisfies The node pairs constitute the set of behaviorally coupled edges. The corresponding edge weight is set as This constitutes the behavioral edge weight matrix. ,in This is a preset threshold constant; S65, The structural edge weight matrix With behavioral edge weight matrix The input gating fusion mechanism uses the following formula to calculate the fusion edge weights: ; in, This is the gating fusion coefficient, with a value ranging from 0 to 1.
[0014] Optionally, S8 specifically includes: S81. Define the joint optimization parameter vector. ,in This represents the number of convolution kernels in a complex octant graph convolutional network. The sliding window length represents the context input tensor. Indicates the gating fusion coefficient. The layer depth representing the attention mechanism; S82. Constructing the fitness function Let the recognition accuracy be 10%. The calculation delay is The fitness function is expressed as ,in, The balancing factor, which controls the trade-off between recognition accuracy and delay, is a non-negative real number. S83, Set Population Size Initialize the population parameter set Each group All are randomly generated valid parameter combinations; S84, with each set of parameters Configure the parameters of modules S1 to S7 sequentially, execute the complete graph neural network training and topology recognition process, and calculate the corresponding parameters for each module. and And substitute it into the calculated fitness value; S85. Based on the hippocampus optimization algorithm update rules, combined with the optimal parameters from the previous round... Based on the fitness gradient of individuals in the current population, perform rotation search, position perturbation, and individual update operations to generate a new set of candidate parameters. ; S86. Repeat steps S84 to S85 until the maximum number of iterations is met or the optimal fitness error for two consecutive rounds is less than the convergence threshold. S87. Combine the finally obtained globally optimal parameters. It is applied to network structure configuration, completes the optimized deployment of complex octet graph neural network, and outputs the distribution network topology identification results and node classification label set based on the parameter combination.
[0015] The beneficial effects of this invention are: This invention improves the ability to represent electrical features of power distribution nodes: by introducing complex octet vectors to uniformly encode multi-dimensional time-series features such as three-phase voltage, current, power factor and phase of the node, compared with traditional real-value or complex-value representation methods, it can simultaneously model the amplitude and phase coupling relationship between multiple electrical channels in a high-dimensional algebraic space, thereby improving the completeness of feature representation and calculation accuracy.
[0016] This invention enhances the dynamic perception capability of topology structure: by constructing a joint edge weight matrix of structural edges and behavioral edges and using a gating mechanism for fusion, it realizes the joint modeling of physical connection relationships and disturbance behavior relationships, adapts to the frequent topology changes and power disturbance scenarios in distribution network operation, and improves the model's perception capability and robustness to dynamic structural changes.
[0017] This invention improves model optimization efficiency and recognition accuracy: it employs the hippocampus optimization algorithm to perform joint search and iterative updates on multiple key parameters such as the number of convolution kernels in complex octagonal graphs, the length of the context sliding window, the edge weight fusion coefficient, and the attention layer structure, avoiding the problem of easily getting trapped in local optima in traditional methods, and effectively improving the convergence speed and generalization performance of the recognition model. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is an overall flowchart of a power distribution network topology identification method based on graph neural networks proposed in this invention; Figure 2 This is a schematic diagram of the complex octet feature mapping of a power distribution network topology identification method based on graph neural networks proposed in this invention; Figure 3 This is a flowchart of the hippocampus optimization algorithm for a power distribution network topology identification method based on graph neural networks proposed in this invention. Detailed Implementation
[0019] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0020] refer to Figure 1-3 A distribution network topology identification method based on graph neural networks includes the following steps: S1. Collect three-phase voltage, current, power factor and phase data of each node in the distribution network, and construct a node feature matrix according to node number and time step; S2. Based on the primary wiring diagram of the distribution network and the real-time switch status, extract the connection relationships between nodes, construct a list of node pairs, and generate a sparse adjacency matrix. S3. Map the four types of electrical quantities of each node in the node feature matrix to a complex octet vector; S4. Set the sliding window length and stack the complex octet vectors of multiple consecutive time steps to form the context input tensor; S5. Input the context input tensor and sparse adjacency matrix into the complex octet graph convolutional network, perform graph convolution operations, and output the initial node embedding representation; S6. Calculate the power perturbation correlation matrix based on node feature changes, and generate the edge weight matrix of physical connection edge and behavior coupling edge by combining the sparse adjacency matrix. Input the weight matrix into the gating mechanism for edge weight fusion. S7. Input the initial node embedding representation and the edge weight matrix into the attention mechanism, calculate the attention weights of each node and its neighboring nodes, and generate the context fusion node representation; S8. The hippocampus optimization algorithm is used to jointly optimize the number of complex octagonal convolution kernels, sliding window length, gating fusion ratio and attention layer structure, and output the topology recognition results and optimal model parameters.
[0021] This invention constructs an eight-step process to encode multidimensional electrical quantities of distribution network nodes into complex octet vectors. Combining sliding window context modeling and graph neural network representation learning, it effectively extracts dynamic topology features. By fusing physical structure information with disturbance behavior edge weights, it constructs a coupled graph model with stronger real-world perception capabilities. Finally, the Hippocampus optimization algorithm is introduced to globally optimize key structural parameters, significantly improving the accuracy and adaptability of topology identification, making it suitable for high-precision topology modeling scenarios under complex power grid operating conditions.
[0022] In this embodiment, the three-phase voltage, current, power factor and phase data collected in step S1 are synchronously sampled at a fixed period, with the sampling period being between 0.01 seconds and 0.1 seconds. The sampling results are constructed into a three-dimensional tensor structure with node number and timestamp as indexes. The first dimension of the tensor is the node number, the second dimension is the sampling time step, and the third dimension is the numerical vector of the four types of electrical quantities. The three-phase voltage and current are preprocessed by weighted average denoising filtering, and the power factor and phase values are corrected for timing abrupt changes by differential correction.
[0023] This invention utilizes a unified acquisition mechanism for three-phase voltage, current, power factor, and phase to construct a time-synchronized node feature matrix, ensuring temporal consistency between subsequent vector mapping and contextual modeling. This approach improves the completeness of the original electrical quantity representation, reduces identification errors caused by temporal mismatch during data preprocessing, and provides a stable input source for complex octet modeling.
[0024] In this embodiment, the process of constructing the sparse adjacency matrix in S2 includes: parsing the node connection relationship from the primary wiring diagram of the power distribution network, extracting each pair of nodes with a conductive path to form an initial connection list, filtering out connection entries in the disconnected state according to the real-time switch status, encoding the remaining node pairs as non-zero element positions of the sparse matrix, uniformly setting the value range of the sparse adjacency matrix to 1, indicating that there is a valid electrical connection between nodes, and assigning 0 to the remaining positions of the matrix.
[0025] This invention dynamically eliminates disconnected connections in the original wiring diagram by combining real-time switch status, retaining only valid on / off path node pairs for adjacency matrix construction, thus avoiding the erroneous input of invalid connections into the graph neural network for calculation. This processing mechanism enhances the real-time performance and reliability of the structural input, improves the graph construction accuracy in dynamic scenarios, and lays an accurate structural foundation for subsequent coupled edge weight modeling.
[0026] In this embodiment, S3 specifically includes: S31. From the node feature matrix, extract eight types of values in sequence according to node number and time step: three-phase voltage, three-phase current, power factor and phase angle. Among them, the three-phase voltage includes phase A voltage, phase B voltage and phase C voltage, and the three-phase current includes phase A current, phase B current and phase C current, which constitute the original feature vector of the corresponding node at the current time step. S32. Perform linear normalization on each electrical quantity in the original feature vector according to its extreme value range across the entire network and all time periods. All values are uniformly mapped to the range between zero and one. The normalized data retains three decimal places. S33. The eight normalized electrical values are sequentially assigned to the eight component bits of the complex octet, and the values are respectively assigned to the zeroth to seventh component slots of the complex octet vector to complete the complex octet vector representation. S34. Stack the complex octet vectors generated by all nodes at all time steps in chronological order to form a three-dimensional tensor data structure with the node number as the first dimension, the time step as the second dimension, and the octet values as the third dimension. S35. The three-dimensional tensor data structure is used as the direct construction basis for the context input tensor. Each position in the three-dimensional tensor structure corresponds to a complex octet vector representation of a node at a certain time step, and the data corresponds to the node number and time index.
[0027] This invention achieves integrated modeling of multiple physical quantities in a unified algebraic space by mapping four types of basic electrical quantities to complex octonium channels. This structure avoids the information fragmentation problem caused by multidimensional real-valued decomposition, allowing the state of each node to be fully expressed in complex octonium form, significantly enhancing the robustness of node feature representation, and is particularly suitable for asymmetric power distribution loads and complex disturbance conditions.
[0028] In this embodiment, S4 specifically includes: S41. Set the context sliding window length parameter and sliding step parameters ,in This indicates the number of consecutive time steps contained in each window. This represents the number of steps forward in time for each swipe operation, and is always a positive integer. Less than or equal to the total number of node feature time steps ; S42. From the three-dimensional complex octet tensor, number the nodes... Extract its complex octet vector sequence at all time steps. The first dimension of the tensor is the node number, the second dimension is the time step, and the third dimension is the eight-dimensional complex octet representation. S43, with step length Perform a sliding window operation on the time series corresponding to each node number, extracting continuous data each time. A complex octet vector at each time step constitutes a node. At the window start time step The input sequence in the context window below is represented as a stacked matrix of complex octonions with a size of Rows of 8 columns; S44. Number all nodes. to Execute operation S43 to generate a set of node context window sequences; the maximum number of context window samples that can be generated for each node on the complete time series. Satisfy the following expressions: ; in, This represents the total number of time steps. This represents the floor function; S45. Organize the context window samples of all nodes at all time steps into a four-dimensional context input tensor by using node number as the first dimension, time step index as the second dimension, and window sequence as the third dimension. The first dimension is the number of nodes. The second dimension is the number of sliding window samples. The third dimension is the window length. The fourth dimension is the feature dimension, which is 8. S46. Input the four-dimensional context tensor The sparse adjacency matrix is used as a joint input to the complex octet graph convolutional network.
[0029] This invention designs a sliding window mechanism, stacking multiple time-step complex octet vectors to construct a context input tensor for capturing the dynamic evolution features of node states over time. Compared to static input methods, this approach improves the model's ability to model temporal information, provides more stable contextual dependency support for subsequent convolution operations, and helps extract the evolutionary trends of power distribution systems.
[0030] In this embodiment, S5 specifically includes: S51. Use the context input tensor as the graph convolution input feature and the sparse adjacency matrix as the graph structure input. S52. A graph neural network structure containing multiple layers of complex octet graph convolutional units is adopted. Each convolutional operation processes the interaction between eight components, and channel coupling is achieved through shared weights and gating mapping. S53. Introduce an activation function in each graph convolutional layer to perform a non-linear transformation on the output of each node in that layer and pass it to the next convolutional layer. S54. After all convolutional layers have been computed, use the output of the last layer as the initial embedding representation of the node in the current context window.
[0031] This invention is based on the initial embedding of the output of a complex octet graph convolutional network. It constructs an edge weight matrix by combining the dual-channel input of structural connection edges and power perturbation relationship edges, and achieves edge weight fusion through a gating mechanism. This allows the graph structure to simultaneously reflect the physical connection and behavioral coupling characteristics. This structure makes the network learning process closer to the actual operation of the power distribution network and significantly improves the credibility of the topology representation.
[0032] In this embodiment, S6 specifically includes: S61. Input tensor from context Extract all nodes Complex octet vector sequences at adjacent time steps Calculate the disturbance change vector ; S62, For any two nodes and Based on its perturbation variation sequence, the Pearson correlation coefficient is calculated along the time dimension and defined as: ; in, Represents the covariance function. Indicates standard deviation; S63. Based on the sparse adjacency matrix, extract all non-zero element positions to form a set of structural connection edges. The corresponding edge weights are all set to 1, forming a structural edge weight matrix. ; S64. The correlation coefficient matrix China satisfies The node pairs constitute the set of behaviorally coupled edges. The corresponding edge weight is set as This constitutes the behavioral edge weight matrix. ,in This is a preset threshold constant; S65, The structural edge weight matrix With behavioral edge weight matrix The input gating fusion mechanism uses the following formula to calculate the fusion edge weights: ; in, This is the gating fusion coefficient, with a value ranging from 0 to 1.
[0033] This invention integrates initial node embedding representation with fused edge weight matrix input attention mechanism. By calculating the attention distribution of each node in the adjacency structure, it achieves feature enhancement of cross-structure edges and behavioral edges. The context fusion node representation can effectively capture the interaction between structural adjacency weights and state change trends, enhancing the model's ability to identify topological boundaries and outliers.
[0034] In this embodiment, S8 specifically includes: S81. Define the joint optimization parameter vector. ,in This represents the number of convolution kernels in a complex octant graph convolutional network. The sliding window length represents the context input tensor. Indicates the gating fusion coefficient. The layer depth representing the attention mechanism; S82. Constructing the fitness function Let the recognition accuracy be 10%. The calculation delay is The fitness function is expressed as ,in, The balancing factor, which controls the trade-off between recognition accuracy and delay, is a non-negative real number. S83, Set Population Size Initialize the population parameter set Each group All are randomly generated valid parameter combinations; S84, with each set of parameters Configure the parameters of modules S1 to S7 sequentially, execute the complete graph neural network training and topology recognition process, and calculate the corresponding parameters for each module. and And substitute it into the calculated fitness value; S85. Based on the hippocampus optimization algorithm update rules, combined with the optimal parameters from the previous round... Based on the fitness gradient of individuals in the current population, perform rotation search, position perturbation, and individual update operations to generate a new set of candidate parameters. ; S86. Repeat steps S84 to S85 until the maximum number of iterations is met or the optimal fitness error for two consecutive rounds is less than the convergence threshold. S87. Combine the finally obtained globally optimal parameters. It is applied to network structure configuration, completes the optimized deployment of complex octet graph neural network, and outputs the distribution network topology identification results and node classification label set based on the parameter combination.
[0035] This invention employs the hippocampus optimization algorithm to jointly optimize key parameters in a graph neural network, avoiding the problems of local optima and low search efficiency in traditional parameter tuning methods. During the optimization process, the direction sense and convergence strategy of individual hippocampi are simulated to ensure that global search and local fine-tuning are taken into account. The final output parameter combination has significant advantages in both accuracy and response efficiency, improving the practicality of the model in power distribution topology identification scenarios.
[0036] Example 1: To verify the feasibility of this invention in practice, it was applied to the topology identification scenario of a smart monitoring platform for a regional power distribution network. This regional power distribution network has a wide coverage area, containing multiple medium-voltage feeders, branch lines, and several public transformers, with a total of 832 power nodes and 317 sets of distribution switchgear. It supports full acquisition of three-phase power data and has the capability to upload data in seconds. In traditional systems, due to frequent topology adjustments, the topology files maintained by the automation system often lag behind the actual connection status, resulting in inaccurate fault location and load calculation deviations.
[0037] The platform deploys the topology recognition method based on complex octet graph neural networks proposed in this invention. First, it collects four types of electrical data—three-phase voltage, current, power factor, and phase angle—from each power terminal, and performs alignment preprocessing on these data according to time steps to form a structured input tensor. Data from each node is collected once every 1 minute, with a sampling window set to 15 time steps (15 minutes) and a sliding step size set to 5 minutes. The input to each node includes eight components: three-phase voltage, three-phase current, total power factor, and phase angle.
[0038] To ensure the dynamic accuracy of the input graph structure, the system synchronously integrates a wiring diagram and switch status, automatically removing disconnected node connections before each round of recognition. Subsequently, the constructed sparse adjacency matrix and the node complex octet tensor are input into the OCGNN model. The model extracts the initial embedding through convolution, constructs a perturbation correlation matrix, fuses structural edges and behavioral edges, and calculates the fused edge weight of each edge through a gating mechanism. The model's attention module combines the fused weights of each node and its neighboring nodes to extract the final topological embedding representation.
[0039] To verify the performance of the method of this invention, it was compared and evaluated with traditional static graph convolutional networks (GCN), structure search reinforcement learning methods (RL-GCN), and heterogeneous graph convolutional models that do not consider behavioral edges (HGCN) on the same data. Evaluation metrics included topology reconstruction accuracy, outlier node identification rate, model response latency, and edge weight credibility. In actual operation, the topology of three transformers in a high-voltage line branch was selected as the test subnet, and the statistical results after two consecutive weeks of operation are as follows.
[0040] In terms of topology identification accuracy, the method of this invention achieves an average of 98.7%, an improvement of 5.4 percentage points compared to HGCN; the abnormal node identification rate reaches 95.2%, significantly better than RL-GCN's 84.7%; the average model response latency is within 1.28 seconds, nearly 40% shorter than GCN; in the edge weight confidence evaluation, the edge weight stability standard deviation of the method of this invention is 0.037, demonstrating high consistency and reliability. The following is a table of key experimental data statistics: Table: Performance Evaluation Results of Distribution Network Topology Identification
[0041] The performance evaluation results of distribution network topology identification clearly show that the method proposed in this invention outperforms the comparative methods in multiple key performance dimensions. In terms of topology identification accuracy, the method of this invention achieves 98.7%, significantly better than the HGCN method's 93.3%, the RL-GCN method's 90.4%, and the traditional GCN method's 88.9%. This result demonstrates that by introducing complex octet feature representation and a structure-behavior coupling mechanism, the model can more accurately reconstruct the true topology state under complex distribution structures.
[0042] In terms of anomaly node identification rate, the method of this invention also performs excellently, reaching 95.2%, which is 10.5 percentage points higher than RL-GCN. This advantage is due to the disturbance correlation modeling and edge weight fusion mechanism, which can effectively distinguish structural changes and isolated node problems caused by electrical disturbance anomalies, and has stronger sensitivity and robustness.
[0043] In terms of response efficiency, the average inference latency of the method of this invention is 1.28 seconds, which is much lower than the 2.04 seconds of the HGCN method and the 2.31 seconds of the RL-GCN method. This indicates that the method is not only accurate in identification but also has faster online processing capabilities, making it more suitable for monitoring systems that require real-time feedback.
[0044] The fluctuation of edge weight confidence is an important indicator for measuring the stability of the model's edge weight output. The method of this invention controls it within ±0.037, which is significantly better than other comparative methods. This shows that in the case of continuous data stream input, the model has stronger structural cognitive stability and is not easily affected by short-term disturbances or outliers.
[0045] In terms of model training efficiency, the method of this invention can achieve optimal parameter convergence within 27 rounds, while the comparative method requires more than 36 rounds, further demonstrating the high efficiency of the hippocampus optimization algorithm in searching high-dimensional parameter spaces. Furthermore, the optimal sliding window length and the number of convolutional kernels automatically optimized by this invention are 15, both demonstrating a reasonable ability to model temporal variations and spatial correlation features.
[0046] In summary, the topology identification method based on complex octet graph neural networks and Hippocampus optimization strategy proposed in this invention not only has higher accuracy and faster identification, but also has strong edge weight stability and good adaptability, which can fully meet the technical requirements for accurate topology identification and high-frequency updates in complex operation scenarios of power distribution networks.
[0047] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A distribution network topology identification method based on graph neural networks, characterized in that, Includes the following steps: S1. Collect three-phase voltage, current, power factor and phase data of each node in the distribution network, and construct a node feature matrix according to node number and time step; S2. Based on the primary wiring diagram of the distribution network and the real-time switch status, extract the connection relationships between nodes, construct a list of node pairs, and generate a sparse adjacency matrix. S3. Map the four types of electrical quantities of each node in the node feature matrix to a complex octet vector; S4. Set the sliding window length and stack the complex octet vectors of multiple consecutive time steps to form the context input tensor; S5. Input the context input tensor and sparse adjacency matrix into the complex octet graph convolutional network, perform graph convolution operations, and output the initial node embedding representation; S6. Calculate the power perturbation correlation matrix based on node feature changes, and generate the edge weight matrix of physical connection edge and behavior coupling edge by combining the sparse adjacency matrix. Input the weight matrix into the gating mechanism for edge weight fusion. S7. Input the initial node embedding representation and the edge weight matrix into the attention mechanism, calculate the attention weights of each node and its neighboring nodes, and generate the context fusion node representation; S8. The hippocampus optimization algorithm is used to jointly optimize the number of complex octagonal convolution kernels, sliding window length, gating fusion ratio and attention layer structure, and output the topology recognition results and optimal model parameters.
2. The distribution network topology identification method based on graph neural networks according to claim 1, characterized in that, In step S1, the three-phase voltage, current, power factor, and phase data are collected synchronously at a fixed period of 0.01 to 0.1 seconds. The sampling results are constructed into a three-dimensional tensor structure with node number and timestamp as indexes. The first dimension of the tensor is the node number, the second dimension is the sampling time step, and the third dimension is the numerical vector of the four types of electrical quantities. The three-phase voltage and current are preprocessed by weighted average denoising filtering, and the power factor and phase values are corrected for timing abrupt changes by differential correction.
3. The distribution network topology identification method based on graph neural networks according to claim 1, characterized in that, The process of constructing the sparse adjacency matrix in S2 includes: parsing the node connection relationship from the primary wiring diagram of the distribution network, extracting each pair of nodes with a conductive path to form an initial connection list, filtering out connection entries in the disconnected state based on the real-time switch status, encoding the remaining node pairs as non-zero element positions of the sparse matrix, uniformly setting the value range of the sparse adjacency matrix to 1, indicating that there is a valid electrical connection between nodes, and assigning 0 to the remaining positions of the matrix.
4. The distribution network topology identification method based on graph neural networks according to claim 1, characterized in that, S3 specifically includes: S31. From the node feature matrix, extract eight types of values in sequence according to node number and time step: three-phase voltage, three-phase current, power factor and phase angle. Among them, the three-phase voltage includes phase A voltage, phase B voltage and phase C voltage, and the three-phase current includes phase A current, phase B current and phase C current, which constitute the original feature vector of the corresponding node at the current time step. S32. Perform linear normalization on each electrical quantity in the original feature vector according to its extreme value range across the entire network and all time periods. All values are uniformly mapped to the range between zero and one. The normalized data retains three decimal places. S33. The eight normalized electrical values are sequentially assigned to the eight component bits of the complex octet, and the values are respectively assigned to the zeroth to seventh component slots of the complex octet vector to complete the complex octet vector representation. S34. Stack the complex octet vectors generated by all nodes at all time steps in chronological order to form a three-dimensional tensor data structure with the node number as the first dimension, the time step as the second dimension, and the octet values as the third dimension. S35. The three-dimensional tensor data structure is used as the direct construction basis for the context input tensor. Each position in the three-dimensional tensor structure corresponds to a complex octet vector representation of a node at a certain time step, and the data corresponds to the node number and time index.
5. The distribution network topology identification method based on graph neural networks according to claim 1, characterized in that, S4 specifically includes: S41. Set the context sliding window length parameter and sliding step parameters ,in This indicates the number of consecutive time steps contained in each window. This represents the number of steps forward in time for each swipe operation, and is always a positive integer. Less than or equal to the total number of node feature time steps ; S42. From the three-dimensional complex octet tensor, number the nodes... Extract its complex octet vector sequence at all time steps. The first dimension of the tensor is the node number, the second dimension is the time step, and the third dimension is the eight-dimensional complex octet representation. S43, with step length Perform a sliding window operation on the time series corresponding to each node number, extracting continuous data each time. A complex octet vector at each time step constitutes a node. At the window start time step The input sequence in the context window below is represented as a stacked matrix of complex octonions with a size of Rows of 8 columns; S44. Number all nodes. to Execute operation S43 to generate a set of node context window sequences; the maximum number of context window samples that can be generated for each node on the complete time series. Satisfy the following expressions: ; in, This represents the total number of time steps. This represents the floor function; S45. Organize the context window samples of all nodes at all time steps into a four-dimensional context input tensor by using node number as the first dimension, time step index as the second dimension, and window sequence as the third dimension. The first dimension is the number of nodes. The second dimension is the number of sliding window samples. The third dimension is the window length. The fourth dimension is the feature dimension, which is 8. S46. Input the four-dimensional context tensor The sparse adjacency matrix is used as a joint input to the complex octet graph convolutional network.
6. The distribution network topology identification method based on graph neural networks according to claim 1, characterized in that, S5 specifically includes: S51. Use the context input tensor as the graph convolution input feature and the sparse adjacency matrix as the graph structure input. S52. A graph neural network structure containing multiple layers of complex octet graph convolutional units is adopted. Each convolutional operation processes the interaction between eight components, and channel coupling is achieved through shared weights and gating mapping. S53. Introduce an activation function in each graph convolutional layer to perform a non-linear transformation on the output of each node in that layer and pass it to the next convolutional layer. S54. After all convolutional layers have been computed, use the output of the last layer as the initial embedding representation of the node in the current context window.
7. The distribution network topology identification method based on graph neural networks according to claim 1, characterized in that, S6 specifically includes: S61. Input tensor from context Extract all nodes Complex octet vector sequences at adjacent time steps Calculate the disturbance change vector ; S62, For any two nodes and Based on its perturbation variation sequence, the Pearson correlation coefficient is calculated along the time dimension and defined as: ; in, Represents the covariance function. Indicates standard deviation; S63. Based on the sparse adjacency matrix, extract all non-zero element positions to form a set of structural connection edges. The corresponding edge weights are all set to 1, forming a structural edge weight matrix. ; S64. The correlation coefficient matrix China satisfies The node pairs constitute the set of behaviorally coupled edges. The corresponding edge weight is set as This constitutes the behavioral edge weight matrix. ,in This is a preset threshold constant; S65, The structural edge weight matrix With behavioral edge weight matrix The input gating fusion mechanism uses the following formula to calculate the fusion edge weights: ; in, This is the gating fusion coefficient, with a value ranging from 0 to 1.
8. The distribution network topology identification method based on graph neural networks according to claim 1, characterized in that, S8 specifically includes: S81. Define the joint optimization parameter vector. ,in This represents the number of convolution kernels in a complex octant graph convolutional network. The sliding window length represents the context input tensor. Indicates the gating fusion coefficient. The layer depth representing the attention mechanism; S82. Constructing the fitness function Let the recognition accuracy be 10%. The calculation delay is The fitness function is expressed as ,in, The balancing factor, which controls the trade-off between recognition accuracy and delay, is a non-negative real number. S83, Set Population Size Initialize the population parameter set Each group All are randomly generated valid parameter combinations; S84, with each set of parameters Configure the parameters of modules S1 to S7 sequentially, execute the complete graph neural network training and topology recognition process, and calculate the corresponding parameters for each module. and And substitute it into the calculated fitness value; S85. Based on the hippocampus optimization algorithm update rules, combined with the optimal parameters from the previous round... Based on the fitness gradient of individuals in the current population, perform rotation search, position perturbation, and individual update operations to generate a new set of candidate parameters. ; S86. Repeat steps S84 to S85 until the maximum number of iterations is met or the optimal fitness error for two consecutive rounds is less than the convergence threshold. S87. Combine the finally obtained globally optimal parameters. It is applied to network structure configuration, completes the optimized deployment of complex octet graph neural network, and outputs the distribution network topology identification results and node classification label set based on the parameter combination.