Collaborative analysis method, system and equipment for main and distribution networks and storage medium

By integrating the main and distribution networks into a heterogeneous graph, and using a spatiotemporal graph neural network model with graph neural networks and physical information embedding for cross-domain analysis, the problem of high computational complexity and low efficiency caused by independent analysis of the main and distribution networks is solved, and efficient and reliable collaborative analysis and optimization of the power grid is achieved.

CN121614813APending Publication Date: 2026-03-06NARI TECH CO LTD +2

Patent Information

Application Number
CN202511753055.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Traditional independent analysis models for the main grid and distribution network are insufficient to meet the global precision sensing, analysis and control requirements of the power grid under high-proportion renewable energy access. They are characterized by huge computational scale, high complexity, difficulty in data fusion, low computational efficiency, and difficulty in dealing with cross-domain chain reactions and global optimization.

Method used

An integrated graph model of the main grid and distribution network is adopted, which abstracts the main grid and distribution network into heterogeneous graphs. Cross-domain analysis is carried out through graph neural network and spatiotemporal graph neural network model with physical information embedding. Combined with graph self-attention pooling and multi-task learning architecture, cross-level and cross-domain collaborative analysis is realized, and the consistency of calculation results is ensured through cross-domain calculation result interaction verification mechanism.

Benefits of technology

It enables cross-level and cross-domain collaborative analysis between the main grid and the distribution network, improves computational efficiency and accuracy, ensures the reliability and robustness of the calculation results, adapts to the rapid analysis needs of large-scale power grids, and enhances the system's adaptability and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121614813A_ABST
    Figure CN121614813A_ABST
Patent Text Reader

Abstract

The invention discloses a main and distribution network collaborative analysis method, system and device and a storage medium, and belongs to the technical field of power system analysis and calculation. The method comprises the following steps: abstracting a main power distribution network integrated model into a heterogeneous graph and generating a fusion node feature matrix; a time-space diagram neural network model is constructed and trained, the model ensures that a prediction result conforms to a power system physical law by introducing physical information neural network constraints, and multi-task parallel prediction is completed by adopting a diagram self-attention pooling and multi-task learning architecture; performing cross-domain interaction verification on a collaborative analysis result output by the model, wherein the cross-domain interaction verification comprises boundary consistency verification and energy / power balance verification; and dynamically adjusting calculation granularity or model parameters according to a verification result, and accelerating a calculation process based on a linear self-attention mechanism. According to the method, the problems of model splitting and inconsistent calculation results caused by independent analysis of the traditional main and distribution networks are solved, and global consistent, physically credible, efficient and collaborative power grid analysis is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system analysis and calculation technology, and in particular to a method, system, device and storage medium for coordinated analysis of main and distribution networks. Background Technology

[0002] With the rapid development of new power systems, the large-scale integration of distributed energy resources and flexible loads into distribution networks has made the operating characteristics of power grids increasingly complex. The traditional model of analyzing the main grid and distribution network separately is no longer sufficient to meet the needs of accurate global sensing, analysis, and control of the power grid under high-proportion renewable energy integration. Collaborative analysis of the main grid and distribution network has become an inevitable trend. However, collaborative analysis of the main grid and distribution network faces many technical challenges: First, the computational scale is enormous; after coupling the main grid and distribution network models, the number of nodes surges, leading to an exponential increase in computational complexity. Second, the system has a high degree of nonlinearity, making it difficult to solve physical models such as power flow equations; traditional numerical iterative methods are computationally inefficient and cannot meet real-time requirements. Third, the fusion and representation of multi-source heterogeneous data (such as SCADA, PMU, and smart meter data) is difficult, and problems such as data gaps and asynchronicity exist. Finally, the analysis tasks are diverse (such as state estimation, power flow calculation, N-1 verification, etc.); traditional methods are usually designed for single tasks, resulting in poor model reusability and low utilization of computational resources.

[0003] With the integration of high proportions of renewable energy and the diversification of loads, the volatility and uncertainty of both the power system's source and load sides have increased dramatically. Current main grid and distribution network analyses are usually conducted independently, resulting in problems such as model fragmentation and inconsistent calculation conclusions, making it difficult to cope with cross-domain cascading effects and global optimization needs. In addition, traditional numerical calculation methods suffer from technical bottlenecks when facing large-scale, multi-timescale joint calculations of main grid and distribution networks, including low computational efficiency, excessive reliance on the integrity of measurement data, and difficulty in quickly adapting to multi-task scenarios. Summary of the Invention

[0004] Purpose of the Invention: The purpose of this invention is to provide a method for coordinated analysis of the main and distribution networks, which can overcome the computational difficulties caused by source-load fluctuations and insufficient measurement information, achieve deep coupling of the main and distribution network models, dynamic intelligent scheduling of computational tasks, and improved computational efficiency, supporting real-time sensing, analysis, decision-making, and optimization of the power grid. Another purpose of this invention is to provide a coordinated analysis system, device, and storage medium for the main and distribution networks.

[0005] Technical solution: According to a first aspect of the present invention, a method for coordinated analysis of primary and secondary distribution networks is provided, comprising:

[0006] Based on the integrated diagram model of the main and distribution networks, the main network and distribution network are abstracted into a heterogeneous diagram, and the nodes and edges in the heterogeneous diagram are given features containing electrical attributes and state variables. Based on the features of the nodes and edges, spatial feature aggregation and multimodal fusion processing are performed on each node to form a fused node feature matrix.

[0007] Based on the fused node feature matrix, a spatiotemporal graph neural network model for embedding physical information is trained; wherein, this model is jointly trained in the following manner:

[0008] The model adopts graph self-attention pooling and multi-task learning architecture as its main framework;

[0009] During the training process, the residuals obtained by substituting the predicted values ​​into the power system physical equations are used as physical loss terms, and these are used together with data loss terms as joint constraints.

[0010] Real-time main and distribution network operation data are input into the trained spatiotemporal graph neural network model embedded with physical information to perform collaborative analysis and calculation, and the calculation results of the main network and distribution network are obtained synchronously; cross-domain calculation results are interactively verified on the results of the collaborative analysis and calculation.

[0011] Optionally, forming the fused node feature matrix includes:

[0012] For power supply side data, the spatial correlation information within the topological neighborhood of each node is aggregated through the message passing mechanism of graph neural network to generate the core initial features of each node.

[0013] Feature extraction is performed on user-side data to obtain advanced features;

[0014] The advanced features are fused with the core initial features to generate the fused node feature matrix.

[0015] Optionally, the power supply side data comes from SCADA data, which is collected at key nodes (such as substations and important loads). The data refresh rate is low (seconds / minutes), but the accuracy and reliability are high.

[0016] Optionally, the user-side data comes from Advanced Measurement System (AMI) data, which is collected at the user end. The data granularity is fine (generally minute-level / 15-minute-level), and the amount is massive but the noise is relatively large.

[0017] Optionally, the feature extraction of user-side data to obtain high-level features includes: to avoid feature dimension explosion and extract effective information, first preprocessing the historical load sequence of each AMI node (such as missing value imputation and outlier detection), and then performing feature extraction through a lightweight one-dimensional convolutional neural network (1D-CNN) or long short-term memory network (LSTM) module to obtain its high-level feature representation.

[0018] Optionally, fusing the high-level features with the core initial features includes: performing vector concatenation or weighted summation between the high-level features and the core initial features, which are the features of the upper-level nodes, to achieve deep fusion of coarse-grained data and fine-grained data, forming a unified and information-rich node feature representation.

[0019] Optionally, training a spatiotemporal graph neural network model embedding physical information includes:

[0020] The node feature matrix and the adjacency matrix of the graph are input into the graph neural network to output the higher-order node embedding features;

[0021] The higher-order node embedding features are passed through a task-related output layer to obtain the predicted value of the system state;

[0022] Training is performed by minimizing a joint loss function that includes both data loss and physical loss; wherein the data loss is the difference between the predicted and actual measurements of the system state, and the physical loss is the residual calculated by substituting the predicted system state into the power system physical equations.

[0023] Optionally, the graph self-attention pooling and multi-task learning architecture includes:

[0024] A shared feature encoder, which takes the heterogeneous graph as input and is composed of alternating layers of graph neural network layers and graph self-attention pooling layers, is used to perform hierarchical feature extraction on the integrated graph model of the main power distribution network and output general node and graph representations.

[0025] The multi-task learning output head takes the general node and graph representation as input and outputs the prediction result of the task respectively.

[0026] Optionally, the graph self-attention pooling layer is used to perform the following steps:

[0027] An importance score is calculated for nodes in the integrated main and distribution network diagram model using a learnable self-attention scoring function.

[0028] Based on the importance score, the top-ranked key nodes are selected and retained, and the features of the retained nodes are weighted and aggregated according to their importance. At the same time, a new, smaller graph structure is constructed based on the index of the retained nodes.

[0029] Optionally, the cross-domain calculation result interactive verification includes: bidirectional comparison of boundary state quantities at the common connection point between the main grid and the distribution network, and system-level power data balance verification.

[0030] Furthermore, in the cross-domain computation result interactive verification, the bidirectional comparison of boundary state quantities at the common connection point between the main network and the distribution network includes:

[0031] Forward calculation comparison: The common coupling voltage calculated by the main grid is used as the boundary condition. The distribution network calculates the injected power based on this and compares the calculated value with the injected power calculated by the distribution network itself.

[0032] Reverse calculation comparison: The injected power calculated by the distribution network is used as the boundary condition. The main network uses this to reverse calculate the voltage at the point of common coupling and compares the reverse calculated value with the voltage calculated by the main network itself.

[0033] Furthermore, the system-level power grid data balance verification in the cross-domain calculation result interaction verification includes:

[0034] The total power sent to all distribution networks is counted on the main grid side.

[0035] On the distribution network side, the total power received from the main network and the total network loss within the distribution network are statistically analyzed.

[0036] Verify whether the sum of the total power transmitted from the main grid side and the total power received and total network loss from the distribution grid side is consistent within the preset error range.

[0037] Optionally, the method further includes dynamic feedback adjustment, including: dynamically adjusting the computational granularity or model parameters of subsequent computation tasks based on the results of the cross-domain computation result interaction verification, and accelerating the computation process based on a linear self-attention mechanism to optimize the next collaborative analysis computation.

[0038] Optionally, the acceleration of the computation process based on the linear self-attention mechanism specifically includes:

[0039] Use spatiotemporal graph convolutional networks to capture the local spatiotemporal dependencies of the power grid;

[0040] A linear self-attention mechanism is used to capture long-range global dependencies in the power grid, replacing the self-attention layer in the standard Transformer and reducing computational complexity.

[0041] According to a second aspect of the present invention, a main distribution network collaborative analysis system is provided, comprising:

[0042] The feature fusion module is used to abstract the main network and distribution network into a heterogeneous graph based on the integrated main network and distribution network graph model, and to assign features containing electrical attributes and state variables to the nodes and edges in the heterogeneous graph; based on the features of the nodes and the features of the edges, spatial feature aggregation and multimodal fusion processing are performed on each node to form a fused node feature matrix;

[0043] The neural network module is used to train a spatiotemporal graph neural network model for embedding physical information based on the fusion node feature matrix. The model is trained in the following way: a graph self-attention pooling and multi-task learning architecture is used as the main framework of the model. During the training process, the residuals obtained by substituting the predicted values ​​into the power system physical equations are used as physical loss terms, and these residuals are used as joint constraints along with data loss terms.

[0044] The cross-domain calculation result interaction verification module is used to input real-time main and distribution network operation data into a spatiotemporal graph neural network model embedded with trained physical information, perform collaborative analysis calculations, and synchronously obtain the calculation results of the main network and distribution network; and perform cross-domain calculation result interaction verification on the results of the collaborative analysis calculations.

[0045] Optionally, the feature fusion module includes:

[0046] The power supply side feature generation unit is used to aggregate the spatial correlation information within the topological neighborhood of each node through the message passing mechanism of the graph neural network, and generate the core initial features of each node.

[0047] The user-side feature generation unit is used to fuse the high-level features of the user side with the core initial features to obtain the fused node feature matrix.

[0048] Optionally, the cross-domain calculation result interactive verification module:

[0049] The bidirectional comparison submodule is used to perform bidirectional comparison of boundary state quantities at the common connection point between the main network and the distribution network.

[0050] The balance verification submodule is used to perform system-level power data balance verification.

[0051] Optionally, the bidirectional comparison submodule includes:

[0052] The forward calculation and comparison unit is used to take the common coupling point voltage calculated by the main grid as the boundary condition, and the distribution network calculates the injected power accordingly, and compares the calculated value with the injected power calculated by the distribution network itself.

[0053] The reverse calculation and comparison unit is used to take the injected power calculated by the distribution network as a boundary condition, and the main network uses this to reverse calculate the voltage at the point of common coupling, and compares the reverse calculated value with the voltage calculated by the main network itself.

[0054] Optionally, the balance verification submodule includes:

[0055] The statistics unit is used to count the total power sent to all distribution networks on the main grid side; and to count the total power received from the main grid and the total network loss within the distribution network on the distribution network side.

[0056] The verification unit is used to verify whether the sum of the total power transmitted from the main grid side and the total power received and the total network loss from the distribution grid side is consistent within a preset error range.

[0057] According to a third aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement some or all of the steps of the above-described main and distribution network collaborative analysis method.

[0058] According to a fourth aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by the processor, implements some or all of the steps in the above-described main and distribution network collaborative analysis method.

[0059] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:

[0060] 1. Based on the integrated diagram model of the main grid and distribution network, the main grid and distribution network are abstracted into a heterogeneous diagram, breaking down the model barriers between the main grid and distribution network, thereby realizing cross-level and cross-domain collaborative analysis, calculation and verification between the main grid and distribution network.

[0061] 2. A cross-domain calculation result interaction verification mechanism and module were introduced, which realized the global consistency of the calculation results and ensured that the calculation results of the main network and the distribution network are physically self-consistent. This solved the long-standing problem of separate calculations and asynchronous data between the main network and the distribution network, and provided a guarantee for the credibility of the calculation results.

[0062] 3. A hybrid architecture consisting of graph neural networks and physical information neural networks is adopted, which deeply integrates the physical constraints of physical information neural networks (PINN) with the data-driven capabilities of graph neural networks (GNN) on a unified graph model. This achieves the unification of computational accuracy and physical laws, significantly improves robustness and generalization ability under harsh data conditions, and avoids the failure of traditional algorithms due to source load fluctuations and insufficient measurement information.

[0063] 4. The hybrid computation of linear self-attention and spatiotemporal graph neural network is adopted. The linear self-attention mechanism is used to accelerate the computation process, shorten the training and prediction time of graph network model, and is suitable for the needs of rapid analysis of large-scale power grids.

[0064] 5. This invention forms a closed-loop adaptive system of perception-analysis-decision-verification, which can significantly improve the system's adaptive capability and long-term operational reliability, and complete the intelligent allocation and dynamic scheduling of computing resources according to the system's real-time status and computing needs. Attached Figure Description

[0065] Figure 1 This is a schematic diagram of the method flow of the present invention;

[0066] Figure 2 This is a schematic diagram illustrating the construction of the spatial enhancement feature matrix of the present invention;

[0067] Figure 3 This is a schematic diagram of attention pooling and multi-task learning architecture.

[0068] Figure 4 This is a logical view of the physical power grid model and the spatiotemporal graph neural network. Detailed Implementation

[0069] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0070] like Figure 1 As shown, a method for coordinated analysis of primary and secondary distribution networks includes:

[0071] S1. A graph-based power grid feature encoding method: The main distribution network topology is abstracted into a heterogeneous graph, and electrical attributes and state variables are assigned to nodes and edges. Then, based on the characteristics of nodes and edges, multi-source heterogeneous data are fused through the message passing mechanism of graph neural network (GNN) to achieve efficient and unified representation of power grid topology and operating status.

[0072] S2. Hybrid Architecture of Physical Information Neural Network (PINN) and Graph Neural Network (GNN): This invention provides a hybrid model architecture that integrates data-driven approaches and physical mechanisms. It utilizes graph neural networks to capture complex patterns in the topology, while simultaneously embedding power system physical equations (such as power flow equations and Kirchhoff's laws) as constraints into the loss function to train a physically consistent model.

[0073] Graph-based attention pooling and multi-task optimization: This approach employs graph-based attention pooling to automatically learn the importance weights of each node in the power grid topology, enabling focus on key areas. The architecture features spatiotemporal fusion and multi-timescale representation capabilities. By sharing the underlying encoder and independent task heads, it supports collaborative learning and optimization of multiple tasks, including state estimation, load forecasting, and fault analysis, thereby enhancing the model's generalization ability to the dynamic characteristics of the power grid.

[0074] S3. Cross-domain interactive verification mechanism: Design an interactive verification mechanism for cross-domain calculation results of the main and distribution networks. Boundary state variables (such as power and voltage) are compared and power balance is verified at the point of common connection (PCC) to ensure the physical consistency of the calculation results. The verification results serve as feedback signals, triggering the rescheduling of calculation tasks or adaptive adjustment of model parameters.

[0075] S4. Hybrid Computation of Linear Self-Attention and Spatiotemporal Graph Neural Networks: A hybrid computational architecture based on linear self-attention mechanisms (such as Linformer) and spatiotemporal graph neural networks (STGNN) is designed. Spatiotemporal graph convolution captures local spatiotemporal correlations, while linear self-attention mechanisms efficiently capture global dependencies of long sequences. This reduces computational complexity while integrating the spatiotemporal characteristics and physical laws of the power grid, effectively addressing the problem of missing measurement data and achieving efficient parallel computation.

[0076] In the scientific computing foundation model architecture implementation method and system for main and distribution network collaborative analysis of the present invention, the power grid feature encoding method based on graph structure in step S1 aims to fuse physical power grid topology with multi-source heterogeneous measurement data and transform it into standardized graph structure data that can be processed by machine learning models. Its specific implementation includes the following steps:

[0077] S1.1 Graph Structure Definition and Construction:

[0078] First, the entire integrated model of the main and distribution networks is abstracted into a heterogeneous graph. Where: V represents the set of all nodes in the graph; E represents the set of all edges in the graph; A is the adjacency matrix of the graph, used to describe the connection relationships between nodes; The feature matrix of all nodes; Let be the characteristic matrix of all edges.

[0079] Specifically:

[0080] The nodes can be defined as follows: power plants, substation buses, and load nodes in the main grid are defined as graph nodes; feeders, distribution transformers, and load switches in the distribution network are defined as graph nodes. A complete topology connection relationship is constructed from the transmission network to the distribution network.

[0081] The edges can be defined as follows: physical devices connecting the aforementioned nodes, such as transmission lines and transformers in the main grid, and overhead lines, cable lines, and sectionalizing switches in the distribution network, are defined as edges in the diagram. This fully preserves the electrical connection attributes of the power grid.

[0082] S1.2 Multidimensional Feature Assignment and Embedding:

[0083] Each node and edge is assigned a high-dimensional feature vector to accurately represent its physical properties, real-time operating status, and historical behavior patterns.

[0084] Node feature matrix Construction: For any node Its eigenvectors Including but not limited to the following dimensions:

[0085] Static physical properties: node type (e.g., power plant, busbar, load), rated voltage, maximum allowable load capacity.

[0086] Dynamic measurement data: real-time or near real-time voltage amplitude V, voltage phase angle θ, injected active power P, and injected reactive power Q.

[0087] Historical load characteristics: Statistical features such as load curves for the past 24 / 72 hours, daily maximum / minimum load, and load change rate.

[0088] Edge feature matrix Construction: For any edge (Connecting nodes) and ), its eigenvector Including but not limited to the following dimensions:

[0089] Static parameters: resistance R, reactance X, conductance G, susceptance B, length, rated current carrying capacity.

[0090] S1.3 Spatial Feature Aggregation Based on Message Passing:

[0091] The message passing mechanism of a graph neural network (GNN) is used to process the node features defined in step S1.2. Sum of edge features Multi-level aggregation and updates are performed. For any node in the graph, a single aggregation and update process specifically includes the following steps:

[0092] First, message generation: For each neighboring node of this node, a message vector is constructed, which is composed of the following parts: [ , , ].in This represents the current characteristics of neighboring nodes. This represents the characteristics of the edge connecting to that neighbor. The current characteristics of this node itself.

[0093] Secondly, message aggregation: collect messages sent to this node from all neighboring nodes, and process these messages using an aggregation function. The aggregation function can be selected from element-wise addition or arithmetic average to generate a comprehensive aggregated message vector.

[0094] Subsequently, feature transformation and dimensionality enhancement: the aggregated message vector obtained above is subjected to nonlinear transformation and dimensionality enhancement through a linear neural network layer. For example, the original low-dimensional features (such as a 10-dimensional vector composed of power, voltage, phase angle, and network topology parameters) are mapped to a high-dimensional latent space (such as 128 dimensions). This linear neural network can be equipped with bias terms and activation functions to enhance the expressive power of the model.

[0095] Finally, node feature update: the high-dimensional vector after dimensionality increase is used as the new feature of the node. It is used for subsequent graph neural network layer computation or output tasks.

[0096] This invention preferably uses a Graph Convolutional Network (GCN) as the core operator. For the l-th layer, the update formula for node features is: ;in, It is the feature matrix of all nodes in the l-th layer; It is the sum of the normalized adjacency matrix and the identity matrix (introducing self-loops), where A is the adjacency matrix and D is the degree matrix; σ is the trainable weight matrix of the l-th layer; σ is a nonlinear activation function (such as ReLU, LeakyReLU). Through this operation, each node aggregates information from its direct neighbors. After multiple layers of propagation, the final feature representation of each node will contain the comprehensive spatial information within its K-hop neighborhood, thus effectively characterizing the local topology and operating status of the power grid.

[0097] S1.4 Multimodal Fusion Processing

[0098] By fusing the core initial features from the power supply side with the high-level features from the user side, a fused node feature matrix is ​​obtained, which is the final feature matrix for all nodes. .in,

[0099] The construction of the core initial features includes: based on the multi-dimensional features in S1.2, and according to the message passing mechanism of the graph neural network in S1.3, aggregating the spatial association information within the topological neighborhood of each node. In one implementation, the multi-dimensional features come from SCADA data, which is collected from key nodes (substations, important loads), has a low data refresh rate (seconds / minutes), but high accuracy and reliability.

[0100] The construction of the advanced features includes: preprocessing the historical load sequence of each AMI (Advanced Measurement System) node (e.g., missing value imputation, outlier detection) to avoid feature dimension explosion and extract effective information; then, feature extraction is performed through a lightweight one-dimensional convolutional neural network (1D-CNN) or long short-term memory network (LSTM) module to obtain its advanced feature representation. The AMI data is collected at the user end, with fine data granularity (minute / 15-minute level).

[0101] In the scientific computing foundation model architecture implementation method and system for main and distribution network collaborative analysis of the present invention, the hybrid architecture of GNN and Physical Information Neural Network (PINN) in step S2 is processed as follows:

[0102] S2.1 embeds physical information into the definition of the spatiotemporal graph neural network model:

[0103] First, based on the power grid diagram structure defined in step S1.1 Furthermore, physical information is deeply embedded into the definition of the graph model.

[0104] Node physical equation constraints: for each node in the power grid (For example, a busbar) Its physical state must satisfy the power balance equation. This equation is used as a soft constraint to prepare for embedding in the subsequent loss function. Its equation form is:

[0105]

[0106]

[0107] in, The voltage amplitude of bus i; Let be the voltage amplitude at bus j; Let i be the voltage phase angle of bus i; Let be the voltage phase angle of bus j; The voltage phase angle difference between bus i and bus j; Inject active power into the generators on bus i; To absorb the active power of the load on bus i; Inject reactive power into the generator on bus i; To absorb the reactive power of the load on bus i; The active power imbalance of bus i (should be 0). The reactive power imbalance of bus i (should be 0); Let be the real part of the admittance between bus i and bus j; Let i be the imaginary part of the admittance between bus i and bus j; It is the set of all buses connected to bus i.

[0108] Edge physical equation constraints: for each edge in the power grid For lines ∈E (such as transmission lines), power flow calculations must satisfy physical laws such as Ohm's law. The active power flowing on them... and reactive power It can be represented as:

[0109]

[0110]

[0111] in, The active power flowing from bus i to bus j; The reactive power flowing from bus i to bus j; The voltage amplitude of bus i; Let be the voltage amplitude at bus j; Let i be the voltage phase angle of bus i; Let be the voltage phase angle of bus j; The voltage phase angle difference between bus i and j; This is the real part of the admittance between bus i and bus j, i.e., the conductance; It is the imaginary part of the admittance between bus i and bus j, i.e., the susceptance.

[0112] S2.2: Forward Propagation and Feature Extraction in Hybrid Models

[0113] The forward propagation process of the hybrid model integrates the spatial feature extraction capability of GNN and the physical law calculation of PINN.

[0114] 1. GNN spatial feature extraction: extracting node feature matrices and adjacency matrix The input is fed into a multi-layer graph convolutional network (such as GCN or GAT). Through a message-passing mechanism, the network aggregates neighbor information layer by layer, and finally outputs a set of high-order node embedding features containing rich spatial relationships. ,in These are the trainable parameters for the GNN. This step is responsible for learning complex, latent spatiotemporal patterns from the data.

[0115] 2. Physical prediction output: High-order features output by GNN The model's raw predictions about the system state are obtained through a task-specific fully connected output layer. For example, for a power flow calculation task, the output could be the voltage magnitude and phase angle of all nodes. Predicted value .

[0116] S2.3: Construction and Joint Optimization of Physical Law Loss

[0117] This step is the core embodiment of the PINN concept, constraining the model's prediction results by calculating the residuals of the physical equations.

[0118] 1. Data Loss Calculation: The difference between the model's predicted value Ŷ and the actual measured value Y (if labeled data) constitutes the data loss term. Mean squared error (MSE) is typically used.

[0119]

[0120] 2. Physical loss calculation: Calculate the model's predicted values ​​(e.g., predicted voltage). , Substitute the predicted values ​​into the physical equations (such as the power balance equation) defined in step S2.1. Since the predicted values ​​cannot perfectly satisfy the equations, a residual will be generated. The sum of the squares of these residuals constitutes the physical loss term. :

[0121]

[0122] This loss term does not depend on the true label, but only on the predicted value itself and the known physical equations.

[0123] Multi-objective joint training: The total loss function of the hybrid model It is a weighted sum of data loss and physical loss:

[0124]

[0125] in, and These are hyperparameters used to balance the accuracy of data fitting with the degree to which physical laws are satisfied. They are minimized simultaneously using the gradient descent algorithm. and This allows for the reverse update of all parameters. The driving model learns data features while its predictions spontaneously satisfy the constraints of physical laws.

[0126] When training the spatiotemporal graph neural network model with the aforementioned physical information embedding, a multi-task learning architecture based on graph self-attention pooling is adopted as the main framework of the model.

[0127] (1) Graph self-attention pooling

[0128] like Figure 3 As shown, in order to achieve collaborative analysis of multiple tasks such as state estimation, load forecasting, and fault detection, this invention adopts a multi-task learning (MTL) architecture that combines a shared feature encoder with a multi-task learning output head.

[0129] Shared Feature Encoder: Building a Powerful Shared Low-Level Encoder The encoder consists of a multi-layer graph convolutional network (GCN) or graph attention network (GAT) stacked with graph self-attention pooling layers. Its input is a power grid graph G, and its output is a hierarchically refined, generalized representation of nodes and the graph. The shared encoder is responsible for learning common features from the data that are beneficial for all tasks.

[0130] GraphSelf-AttentionPooling is a learnable node downsampling method used to generate hierarchical representations of graphs and automatically identify key regions. The construction process of the graph self-attention pooling layer is as follows.

[0131] Node Importance Scoring: First, a scalar importance score is calculated for each node in the graph using a learnable self-attention scoring function. This function is typically a single-layer neural network, and its calculation formula is as follows:

[0132]

[0133]

[0134] in, Node feature matrix The sum of the normalized adjacency matrix and the identity matrix is ​​given by GNN, which is a single-layer graph neural network (such as GCN). and For trainable parameters, The activation function (such as Sigmoid). Output Represents a node Importance score.

[0135] Node selection and feature aggregation: Based on the importance score *s*, the top *k* nodes are selected as retained nodes, forming a new, smaller graph. For the retained nodes, their new features are weighted aggregations of their own features and those of their neighboring nodes that were pooled out in the original graph, with the weights determined by the attention score. This process can be represented as:

[0136]

[0137]

[0138]

[0139] in, This represents the node score vector, calculated by the scoring network, where the score indicates the importance of the node. To select the indices of the k nodes with the highest scores; This means that in the original node feature matrix X, only the features of those nodes that are retained are extracted; ◦ represents the Hadamard product, which multiplies the retained node features by their corresponding scores (element-wise multiplication), with nodes having higher scores having their features enhanced. This means that in the original adjacency matrix A, only the connection relationships between the selected nodes are retained.

[0140] Through multi-level pooling operations, a hierarchical representation of the graph can be constructed, with each layer focusing on key information at different scales.

[0141] (2) Multi-task collaborative learning and optimization

[0142] For each specific task (e.g., i=1 represents power flow calculation, i=2 represents load forecasting, and i=3 represents state estimation), design a lightweight task learning output head. (Typically a multi-layer fully connected neural network). Each task head shares features. As input, output task-specific prediction results .

[0143] Joint training and gradient balancing: During training, the total loss function is defined as the weighted sum of the losses from each task.

[0144]

[0145] in, For the task Loss functions (such as mean squared error, cross-entropy loss); The loss weight for this task is T; the total number of tasks is T. In one implementation, downstream tasks may include state estimation, load forecasting, power flow calculation, etc. This represents the actual result of the task. During backpropagation, the shared parameters are updated simultaneously using the gradient descent algorithm. And all task-specific parameters To prevent any single task from dominating the entire training process, a dynamic gradient balancing strategy (such as uncertainty weighting) can be used to automatically adjust the weights of each task. This enables collaborative optimization of multiple tasks.

[0146] The main distribution network collaborative analysis method of this invention includes a cross-domain calculation result interactive verification mechanism, and the processing steps are as follows:

[0147] The cross-domain calculation result interaction verification mechanism aims to solve the problems of inconsistent results and low global reliability after independent calculations of the main and distribution networks. Its core lies in building a systematic inter-domain data consistency verification protocol. Through multi-dimensional and multi-method cross-verification, it automatically identifies and locates calculation anomalies, ensuring the global consistency and physical reliability of the collaborative analysis results of the main and distribution networks. The specific processing steps are as follows:

[0148] S3.1: Construction of Data Consistency Verification Protocol between Primary and Secondary Network Domains

[0149] First, establish a standardized verification protocol to provide the rules and process foundation for automated interactive verification.

[0150] Verification Content and Indicator Definitions: The protocol clearly defines the set of key physical quantities that need to be verified, mainly including state quantities at the point of common coupling (PCC) (such as voltage amplitude). Voltage phase angle and power quantity (injected active power) Injecting reactive power Set reasonable dynamic error thresholds for each quantity. , , , This threshold can be adaptively adjusted according to the voltage level and network operating status.

[0151] Verification process and triggering mechanism: The protocol specifies that verification is usually triggered automatically after both parties complete a round of calculations. The protocol standardizes the data exchange format (such as adopting the IEEE CIM standard), communication interface, and verification command sequence to ensure that the main network and multiple distribution networks can exchange verification data in an orderly and efficient manner.

[0152] S3.2: Anomaly Identification Based on Redundancy Calculation Comparison

[0153] A computational redundancy strategy is adopted to solve the same computational objective from different perspectives, and anomalies are identified by comparing the consistency of the results.

[0154] Bidirectional Calculation Comparison: For boundary power flow, a bidirectional calculation comparison is performed. Forward Calculation: The main grid provides the voltage at the PCC based on its own calculation results. Phase angle The power distribution network calculates the injected power accordingly. Phase angle Reverse calculation: The distribution network provides its calculated injected active power. reactive power The main network uses this to deduce the voltage at PCC. Phase angle .

[0155] Result comparison and deviation analysis: The results of forward and reverse calculations are cross-compared, i.e., compared ( , )and( , ),as well as( , )and( , If the difference between any set of comparison values ​​exceeds its corresponding threshold, it is marked as an abnormal calculation result for that PCC point, and the deviation amount Δ is recorded.

[0156] S3.3: Global Consistency Guarantee Based on Boundary Condition Cross-Validation

[0157] Verification from the perspective of global energy conservation is the most core and effective verification method.

[0158] Power balance verification includes several aspects:

[0159] Main network side statistics: The total power transmitted downlink calculated by the main network is obtained by summing up all PCC points connected to the distribution network. ).in Indicates the active power transmitted. This indicates the reactive power being transmitted.

[0160] Distribution network side statistics: The sum of all power received by the distribution network from the main network. ,in This represents the active power received by the main network. This represents the reactive power received from the main grid and estimates the total network loss across all distribution networks. .

[0161] Balance check: verifying the equation Is this valid? Considering measurement and calculation errors, a certain degree of deviation is permissible, but the deviation value... It must be within a preset, reasonable range. If it exceeds the range, it indicates a global power imbalance and a calculation anomaly.

[0162] S3.4: Verification Result Feedback and Adaptive Adjustment

[0163] The verification mechanism forms a closed loop, feeding the results back to the computing system to trigger self-correction.

[0164] Anomaly Diagnosis and Location: Based on the verification results (such as which PCC point has an excessive deviation or global power imbalance), and in conjunction with the network topology, a preliminary diagnosis of the source of the anomaly (such as a specific distribution network calculation error or an error in the setting of the main network boundary conditions) is made.

[0165] Feedback and Adaptive Adjustment: The verification results and deviation data are used as feedback signals and input into the task dynamic adjustment framework. The system will automatically trigger one or more of the following adjustments:

[0166] Iterative correction: Start a new round of calculations and use the deviation information obtained from the verification to correct the boundary conditions.

[0167] Granular rescheduling: For identified abnormal areas, recalculation is performed using a finer granularity of calculation (such as decomposing the distribution network) to improve local calculation accuracy.

[0168] Model parameter calibration: If multiple verifications fail, it may indicate that the model parameters are mismatched, and the system can automatically start the parameter calibration process.

[0169] For the hybrid calculation of the linear self-attention and spatio-temporal graph neural network, the present invention designs a hybrid calculation architecture to simultaneously capture the local spatio-temporal dynamics and long-range global dependencies of the power grid. This architecture includes a spatio-temporal graph convolution module for local feature extraction and a linear self-attention mechanism for global dependency capture.

[0170] In one implementation, the spatio-temporal graph convolution module uses a spatio-temporal graph convolution network (STGNN) as the basic module, which is stacked by spatio-temporal blocks. Each block contains:

[0171] Spatial dimension convolution: Using a graph convolution layer (GCN or GAT) to process the power grid topology, aggregating neighbor node information to generate spatial features .

[0172] Temporal dimension convolution: Using a one-dimensional convolution layer (TCN) or a gated recurrent unit (GRU) to process the node feature time series, capturing dynamic changes and outputting spatio-temporal features .

[0173] This module efficiently extracts the local spatio-temporal patterns of nodes and their neighboring regions.

[0174] In one implementation, the linear self-attention mechanism, to solve the problem of the high computational complexity of the traditional Transformer self-attention mechanism introduces a linear self-attention variant (such as Linformer, Performer). By projecting the original key (K) and value (V) matrices into a low-dimensional space (k << N), the complexity is reduced to . Embedding this module in the high layer of STGNN:

[0175]

[0176] This operation enables each node to efficiently interact with all other nodes in the graph, thereby capturing global dependencies such as cross-voltage-level and long-distance electrical influences.

[0177] Example 1: Constructing a model architecture for coordinated analysis of the main and distribution networks

[0178] S1. Refer to the appendix Figure 2 , which shows the flowchart of the power grid feature encoding of the present invention. The specific implementation is as follows:

[0179] First, abstract the physical power grid into a heterogeneous graph structure . The node set includes power plants, substation buses, load nodes in the main network, as well as feeders, distribution transformers, load switches, etc. in the distribution network. The edge set includes components such as transmission lines, distribution lines, transformers that connect the above nodes. Let be the adjacency matrix of the graph.

[0180] For example, the graph structure (G) is a power grid containing 30 nodes (10 power plants, 15 load nodes, and 5 substation buses) and 35 lines. Node characteristics ( Real-time measurements (SCADA data) for some nodes include: injected active power P, injected reactive power Q, and real-time or near-real-time voltage amplitude V. Data is missing; for example, V and θ are completely missing for node N5. Edge characteristics ( R (resistance) and X (reactance) for each line.

[0181] To process multi-source heterogeneous data such as SCADA, AMI, and PMU, this invention employs a message-passing-based graph neural network (GNN) for feature fusion. Taking a graph convolutional network (GCN) as an example, through multi-layer message passing, the final embedding vector of each node contains contextual information from its multi-hop neighbors, achieving efficient representation of multimodal power grid data and addressing data issues. For example, the power grid is abstracted as a graph with nodes N1-N30 and edges L1-L35. Each node is assigned a feature vector, for example:

[0182] N1: [Type=Power Plant, Rated Voltage=500, =100MW, =50MVar, V=1.01 pu]

[0183] N5: [Type=Load Node, Rated Voltage=230, =80MW, =40MVar, V=NaN, θ=NaN] <-- Data missing

[0184] Assign a feature vector to each edge, for example: L10: [R=0.01, X=0.05] (connecting N5 and N6).

[0185] GNN message passing (feature fusion and missing value imputation) includes:

[0186] The first layer of GCN aggregation focuses on node N5, which has missing data. The GCN layer aggregates its own features (type and rated power only) and the features of its first-order neighbors (such as N4 and N6). N6's features might be complete: [Type = Substation, Rated Voltage = 230, V = 0.99, θ = -0.1, P = 150MW, Q = 30MVar]. Using a learnable parameter W, the GCN outputs a new feature vector for N5, which incorporates the voltage information from its neighbor N6. This is equivalent to performing a topological "interpolation" on the missing voltage of N5.

[0187] Multi-layer GCN aggregation: After 2-3 layers of message passing, the final embedding vector of N5 not only contains information about its neighbor N6, but also contextual information about multi-hop neighbors (such as power plant N1 that supplies power to N6).

[0188] S2: A hybrid architecture combining GNN and Physical Information Neural Network (PINN), implemented as follows:

[0189] A physical information neural network (PNN) with a graph neural network (GNN) as its main framework is constructed. The GNN is used to learn the mapping relationship between the input features of power grid nodes and the system state. The physical mechanism model of the power system, including Kirchhoff's Current Law (KCL), Kirchhoff's Voltage Law (KVL), and power flow calculation equations, is embedded as soft constraints into the neural network. Specifically, a physical law residual loss term is added to the loss function. Where F(·) represents the physical equation. The total loss function is defined as the weighted sum of data loss and physical loss: By using the gradient descent algorithm to simultaneously minimize both losses during joint training, the model output strictly conforms to physical laws even in regions with scarce data.

[0190] S3: Multi-task collaboration optimization

[0191] See appendix Figure 3 The specific implementation is as follows:

[0192] This module, as a learnable graph downsampling layer, aims to hierarchically refine the input power grid graph, automatically identify and retain key nodes and regions. Its specific implementation steps are as follows:

[0193] S3.1 Node Importance Score

[0194] First, the feature matrix containing nodes The sum of the normalized adjacency matrix and the identity matrix The power grid graph G is input into a single-layer graph neural network (GNN), which can be a graph convolutional network (GCN) or a graph attention network (GAT), to obtain a new node feature representation X' that incorporates graph structure information:

[0195] X' = ​​GNN( , )

[0196] Subsequently, a scalar importance score *s* is calculated for each node using a learnable self-attention scoring function. This function is implemented using a single-layer neural network, and its calculation formula is as follows:

[0197] s = σ(X'·a + b)

[0198] Where a and b are trainable parameter vectors, and σ is the activation function (a sigmoid function can be used), constraining the importance score within the interval (0, 1). The score s represents the criticality of each node in the power grid. Based on the calculated importance score s, a Top-k selection operation is performed to select the k nodes with the highest scores, forming an index list idx of the retained nodes:

[0199]

[0200] For nodes that are retained, their new features are obtained by weighted aggregation of the original features based on their importance scores, to ensure that key information is preserved and enhanced.

[0201]

[0202] Where ◦ represents the Hadamard product, and the original adjacency matrix A is pruned according to the indices of the nodes to be retained, constructing the adjacency relationships of the new downsampled graph. :

[0203]

[0204] This operation means extracting a submatrix from the original adjacency matrix where both row and column indices belong to idx, thus forming a new, smaller graph. By stacking multiple such pooling layers, a hierarchical representation of the power grid can be constructed, with each layer focusing on structural information at different scales.

[0205] S3.2 Implementation of the Multi-Task Collaborative Learning Module

[0206] A deep shared feature encoder is constructed, consisting of alternating stacks of multiple GNN layers described in S2 and graph self-attention pooling layers constructed in S3.1. The input is the original graph G or the output graph of the previous layer. After multiple feature extractions and downsampling processes, the final output is a highly refined, semantically rich, general node and graph representation. This shared encoder is responsible for learning common feature patterns that contribute to all downstream tasks.

[0207] Design a lightweight, dedicated output head for each specific power grid analysis task. Each task head typically consists of several fully connected layers that share the common characteristics of the encoder output. It takes as input and outputs task-specific predictions. For example:

[0208] Task Header 1 (Power Flow Calculation): Outputs the active power, reactive power, or voltage and phase angle of each node.

[0209] Task Header 2 (Load Forecast): Outputs the bus load value for a future period of time.

[0210] Task Header 3 (State Estimation): Output bus node voltage.

[0211] Example 2: Dynamic Adjustment Technology for Computational Tasks in Cross-Domain Collaborative Analysis of Main and Distribution Networks

[0212] S1: Cross-domain computation result interactive verification mechanism, implemented as follows:

[0213] A 220kV regional power grid serves as the main grid, supplying power to downstream distribution networks through two points of common coupling (PCCs). PCC-1 connects to distribution network A, and PCC-2 connects to distribution network B. Distribution network A is a 10kV urban distribution network containing a large number of industrial, commercial, and residential loads. Distribution network B is a 35kV industrial distribution network containing several large motor loads.

[0214] After the main network and the two distribution networks complete independent parallel calculations, a consistency check is performed. Assume that in this calculation, a parameter error in the model of distribution network B caused a calculation anomaly.

[0215] S2: Construction of Inter-Domain Data Consistency Verification Protocol

[0216] Verification content: voltage amplitude (V), voltage phase angle (θ), injected active power (P), and injected reactive power (Q) at each PCC point.

[0217] Dynamic error threshold: This sets the voltage amplitude threshold. Set to 0.01, meaning for the 220kV level, the allowable deviation is approximately 2.2kV. The active power threshold is... The value is set to 0.02, meaning that for a PCC point with a projected capacity of 50MW, the allowable deviation is 1MW.

[0218] Triggering mechanism: After all systems have completed their calculations and sent a completion signal, the central coordinator automatically triggers the verification process.

[0219] S3: Anomaly Identification Based on Redundancy Comparison

[0220] S31: The verification process is initiated, performing bidirectional calculation and comparison, including:

[0221] The forward calculation (main grid -> distribution network) sends the voltage and phase angle results (V1, θ1, V2, θ2) of PCC-1 and PCC-2 calculated in the main grid to the corresponding distribution networks. The calculation results (V1, θ1, V2, θ2) from the main grid are used as invariant boundary conditions to recalculate the power flow for distribution networks A and B, yielding the injected power for distribution network A. , and the injected power of distribution network B , .

[0222] The reverse calculation (distribution network -> main network) sends the injected power (P1, Q1, P2, Q2) calculated from distribution networks A and B to the main network. The main network uses the injected power sent by the distribution network as a fixed boundary load and performs a new power flow calculation to obtain the voltage phase angle values ​​for the two PCC points. , , ).

[0223] S32: The system automatically performs the following result comparison and deviation analysis:

[0224] (P1, Q1) and ( / / Is the power output of distribution network A self-consistent?

[0225] (P2, Q2) and / / Is the power output of distribution network B self-consistent?

[0226] (V1, θ1) and ( / / Is the voltage of the mainnet on PCC-1 self-consistent?

[0227] (V2, θ2) and ( / / Is the voltage of the mainnet on PCC-2 self-consistent?

[0228] Anomaly Detection: For PCC-1, the deviations of all comparison items (ΔP1, ΔQ1, ΔV1, Δθ1) are less than the threshold, and the verification passes. For PCC-2, the system detected... PCC-2 was marked as an anomaly, and the deviation was recorded. Initial suspicion was that the calculation results for distribution network B were unreliable.

[0229] S4: Global Consistency Guarantee Based on Boundary Condition Cross-Validation

[0230] S41: To confirm the anomaly and rule out errors in the main network itself, initiate global power balance verification.

[0231] The total downlink power calculated by the main grid side .

[0232] Distribution network A receives power from PCC-1. Distribution network B receives power from PCC-2. .

[0233] Total network loss estimated by the distribution network side .

[0234] Total power received by the distribution network .

[0235] S42: Perform a balance check based on the following verification equation:

[0236]

[0237] Conclusion: If If the power imbalance exceeds the allowable reasonable range, a global power imbalance alarm will be triggered.

[0238] Comprehensive diagnosis: The calculation results indicate that the problem is most likely in the calculation of distribution network B.

[0239] S5: Verification Result Feedback and Adaptive Adjustment

[0240] S51: Abnormal Diagnosis and Localization

[0241] The system generated a diagnostic report: "Abnormal calculation of distribution network B model, resulting in PCC-2 power data distortion and global power imbalance."

[0242] Feedback and Adaptive Adjustment: The report is fed into the task dynamic adjustment framework.

[0243] Strategy Selection: Since the specific problem area has been located, the system automatically selects a granular rescheduling strategy.

[0244] S52: Adjusting Actions

[0245] The calculation results for the main network and distribution network A are temporarily considered reliable, and their data will be retained.

[0246] The system initiates more refined calculations for distribution network B: it decouples it from the main network, performs independent and detailed power flow calculations, and may enable more detailed equipment models.

[0247] The system sends a correction command to the calculation unit of distribution network B, for example: "It is recommended to recalculate using the PCC-2 voltage reference value V2=220.5kV".

[0248] Recalculation and Verification: After completing the recalculation, Distribution Network B reports the new injected power. The system triggered a check again. This time, all deviations and global power balance returned to within reasonable thresholds.

[0249] Final output: The system outputs a globally consistent and physically reliable final calculation result for the main and distribution networks.

[0250] Example 3: Joint Acceleration Technology Driven by Main and Distribution Network Model and Scientific Computing

[0251] See appendix Figure 4 First, the Temporal Graph Convolutional Network (STGNN) module is used to capture local spatiotemporal dependencies: , Subsequently, linear self-attention mechanisms (such as the Linformer) were introduced to replace the traditional Transformer. This reduces computational complexity by projecting the key (K) and value (V) matrices into a lower-dimensional space. Down to This allows for the efficient capture of global spatiotemporal dependencies. Physical laws are embedded as constraints into the loss function, and the message passing mechanism of the graph is used to naturally supplement missing measurements.

[0252] To implement the above-mentioned main and distribution network collaborative analysis method, the present invention also provides a main and distribution network collaborative analysis system, equipment, and computer-readable storage medium.

[0253] The main distribution network collaborative analysis system includes:

[0254] The feature fusion module is used to abstract the main network and distribution network into a heterogeneous graph based on the integrated main network and distribution network graph model, and to assign features containing electrical attributes and state variables to the nodes and edges in the heterogeneous graph; based on the features of the nodes and the features of the edges, spatial feature aggregation and multimodal fusion processing are performed on each node to form a fused node feature matrix;

[0255] The neural network module is used to train a spatiotemporal graph neural network model for embedding physical information based on the fusion node feature matrix. The model is trained in the following way: a graph self-attention pooling and multi-task learning architecture is used as the main framework of the model. During the training process, the residuals obtained by substituting the predicted values ​​into the power system physical equations are used as physical loss terms, and these residuals are used as joint constraints along with data loss terms.

[0256] The cross-domain calculation result interaction verification module is used to input real-time main and distribution network operation data into a spatiotemporal graph neural network model embedded with trained physical information, perform collaborative analysis calculations, and synchronously obtain the calculation results of the main network and distribution network; and perform cross-domain calculation result interaction verification on the results of the collaborative analysis calculations.

[0257] In one implementation, the feature fusion module includes:

[0258] The power supply side feature generation unit is used to aggregate the spatial correlation information within the topological neighborhood of each node through the message passing mechanism of the graph neural network, and generate the core initial features of each node.

[0259] The user-side feature generation unit is used to fuse the high-level features of the user side with the core initial features to obtain the fused node feature matrix.

[0260] In one implementation, the cross-domain computation result interactive verification module:

[0261] The bidirectional comparison submodule is used to perform bidirectional comparison of boundary state quantities at the common connection point between the main network and the distribution network.

[0262] The balance verification submodule is used to perform system-level power data balance verification.

[0263] In one implementation, the bidirectional comparison submodule includes:

[0264] The forward calculation and comparison unit is used to take the common coupling point voltage calculated by the main grid as the boundary condition, and the distribution network calculates the injected power accordingly, and compares the calculated value with the injected power calculated by the distribution network itself.

[0265] The reverse calculation and comparison unit is used to take the injected power calculated by the distribution network as a boundary condition, and the main network uses this to reverse calculate the voltage at the point of common coupling, and compares the reverse calculated value with the voltage calculated by the main network itself.

[0266] In one implementation, the balance verification submodule includes:

[0267] The statistics unit is used to count the total power sent to all distribution networks on the main grid side; and to count the total power received from the main grid and the total network loss within the distribution network on the distribution network side.

[0268] The verification unit is used to verify whether the sum of the total power transmitted from the main grid side and the total power received and the total network loss from the distribution grid side is consistent within a preset error range.

[0269] In another embodiment, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement some or all of the steps of the above-described main and distribution network collaborative analysis method.

[0270] In another embodiment, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by the processor, implements some or all of the steps of the above-described main and distribution network collaborative analysis method.

[0271] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0272] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0273] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0274] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0275] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the invention.

[0276] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

[0277] 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 changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for main-grid and distribution-grid coordination analysis, characterized in that, The method comprises: According to the integrated graph model of the main power distribution network, the main network and the distribution network are abstracted into a heterogeneous graph, and the nodes and edges in the heterogeneous graph are assigned characteristics including electrical properties and state quantities; according to the characteristics of the nodes and the characteristics of the edges, the spatial characteristics of each node are aggregated and multi-modal fusion processing is performed to form a fusion node feature matrix; Based on the fusion node feature matrix, a physical information embedded space-time graph neural network model is trained; wherein the model is trained together by the following methods: Adopting a graph self-attention pooling and multi-task learning architecture as the main framework of the model; In the training process, the residual error calculated by substituting the predicted value into the physical equation of the power system is taken as the physical loss term, and the residual error and the data loss term are taken as the joint constraint; Real-time main distribution network operation data is input into the trained physical information embedded space-time graph neural network model, and collaborative analysis calculation is performed to synchronously obtain the calculation results of the main network and the distribution network; the results of the collaborative analysis calculation are cross-domain calculation result interaction verified.

2. The master network coordination analysis method according to claim 1, characterized in that, The formation of the fusion node feature matrix comprises: For power supply side data, the spatial correlation information in the topological neighborhood of each node is aggregated through the message passing mechanism of the graph neural network to generate the core initial features of each node; The advanced features of the user side are fused with the core initial features to obtain the fusion node feature matrix.

3. The master network coordination analysis method of claim 1, wherein, The graph self-attention pooling and multi-task learning architecture comprises: A shared feature encoder takes the heterogeneous graph as input and is formed by alternately stacking multiple graph neural network layers and graph self-attention pooling layers, which is used to perform hierarchical feature extraction on the main distribution network integrated graph model and output general node and graph representations; Each multi-task learning output head takes the general node and graph representation as input and outputs the prediction results of the task respectively.

4. The master network coordination analysis method according to claim 3, characterized in that, The graph self-attention pooling layer is used to perform the following steps: An importance score is calculated for the nodes in the main distribution network integrated graph model using a learnable self-attention scoring function; The top-ranked key nodes are selected according to the importance score and retained, and the features of the retained nodes are weighted and aggregated according to their importance, and a new graph structure with a smaller scale is constructed according to the index of the retained nodes.

5. The master network coordination analysis method of claim 1, wherein, The cross-domain calculation result interaction verification comprises: bidirectional comparison of boundary state quantities at the common connection points of the main network and the distribution network, and system-level power data balance verification.

6. The master network coordination analysis method according to claim 5, characterized in that, In the cross-domain calculation result interaction verification, the bidirectional comparison of boundary state quantities at the common connection points of the main network and the distribution network comprises: Forward calculation comparison: taking the common connection point voltage calculated by the main network as the boundary condition, the distribution network calculates the injected power accordingly, and compares the calculated value with the injected power calculated by the distribution network itself; Reverse calculation comparison: taking the injected power calculated by the distribution network as the boundary condition, the main network inversely calculates the common connection point voltage accordingly, and compares the inverse calculated value with the voltage calculated by the main network itself.

7. The master network coordination analysis method according to claim 5, characterized in that, In the cross-domain calculation result interaction verification, the system-level power grid data balance verification comprises: Statistically calculating the total power sent to all distribution networks on the main network side; Statistically calculating the total power received from the main network and the total network loss inside the distribution network on the distribution network side; Verify whether the sum of the total power sent by the main grid side, the total power received by the distribution grid side and the total network loss is consistent within a preset error range.

8. The master network coordination analysis method of claim 1, wherein, The method further comprises dynamic feedback adjustment, including: dynamically adjusting the calculation granularity or model parameters of subsequent calculation tasks according to the cross-domain calculation result interactive verification result, and accelerating the calculation process based on a linear self-attention mechanism to optimize the next collaborative analysis calculation.

9. The master network coordination analysis method according to claim 8, characterized in that, The accelerating the calculation process based on a linear self-attention mechanism specifically includes: Capturing local spatiotemporal dependencies of the power grid using a spatiotemporal graph convolution network; Capturing long-range global dependencies in the power grid using a linear self-attention mechanism, replacing the self-attention layer in the standard Transformer.

10. A main-grid and distribution network coordination analysis system, characterized in that, The system comprises: A feature fusion module configured to abstract the main grid and the distribution grid into a heterogeneous graph according to a main-distribution grid integrated graph model, and assign features including electrical properties and state quantities to nodes and edges in the heterogeneous graph; and perform spatial feature aggregation and multi-modal fusion processing on each node according to the features of the node and the features of the edge to form a fused node feature matrix; A neural network module configured to train a physical information embedded spatiotemporal graph neural network model based on the fused node feature matrix; wherein the model is trained together by: adopting a graph self-attention pooling and multi-task learning architecture as the main framework of the model; and in the training process, using the residual error obtained by substituting the predicted value into the physical equation of the power system as a physical loss term, and using the residual error and a data loss term as a joint constraint; A cross-domain calculation result interactive verification module configured to input real-time main-distribution grid operation data into the trained physical information embedded spatiotemporal graph neural network model, perform collaborative analysis calculation, and synchronously obtain the calculation results of the main grid and the distribution grid; and perform cross-domain calculation result interactive verification on the results of the collaborative analysis calculation.

11. The master network coordination analysis system of claim 10, wherein, The feature fusion module comprises: A power supply side feature generation unit configured to aggregate spatial correlation information within the topological neighborhood of each node by using a message passing mechanism of a graph neural network, and generate core initial features of each node based on the power supply side data; A user side feature generation unit configured to fuse the core initial features with high-level features of the user side to obtain the fused node feature matrix.

12. The master network coordination analysis system of claim 10, wherein, The cross-domain calculation result interactive verification module comprises: A bidirectional comparison submodule configured to perform bidirectional comparison of boundary state quantities at the common connection points of the main grid and the distribution grid; A balance verification submodule configured to perform system-level power data balance verification.

13. The master network coordination analysis system of claim 12, wherein, The bidirectional comparison submodule comprises: A forward calculation comparison unit configured to use the voltage of the common connection point calculated by the main grid as a boundary condition, calculate the injected power of the distribution grid based on the boundary condition, and compare the calculated value with the injected power calculated by the distribution grid itself; A reverse calculation comparison unit configured to use the injected power calculated by the distribution grid as a boundary condition, inversely calculate the voltage of the common connection point based on the boundary condition, and compare the inversely calculated value with the voltage calculated by the main grid itself.

14. The master network coordination analysis system of claim 12, wherein, The balance verification submodule comprises: A statistical unit configured to statistically calculate the total power sent to all distribution grids on the main grid side, and statistically calculate the total power received from the main grid and the total network loss within the distribution grid on the distribution grid side. A verification unit is configured to verify whether the sum of the total power sent from the main grid side, the total power received by the distribution grid side and the total grid loss is consistent with a preset error range.

15. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the main-distribution grid collaborative analysis method of any one of claims 1 to 9 when executing the program.

16. A computer readable storage medium characterized by: A computer program is stored on the computer readable storage medium, and when the computer program is executed by the processor, the main-distribution grid collaborative analysis method of any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Distributed power supply-containing main and distribution cooperative reactive voltage optimization scheduling method and distributed power supply-containing main and distribution cooperative reactive voltage optimization scheduling system

    CN116316804A

  • Method, system and device for monitoring waste gas outside hog house based on space-time diagram neural network

    CN118609712A

  • Power grid model parameter estimation method and system based on physical information graph neural network

    CN119004965A

  • Comprehensive energy system rapid energy flow analysis method based on physical mechanism guidance and multi-head map attention mechanism

    CN119830130A

  • Rapid N-1 fault analysis method and system based on graph neural network

    CN120492848A

Cited By

  • A main grid-voltage checking method and system

    CN122267920A