A power grid carbon emission flow dynamic tracking method based on a physical guidance map neural network

By combining physical guided graph neural networks and breadth-first search algorithms, the computational complexity and insufficient physical constraints of power grid carbon flow tracing are solved, enabling efficient and accurate dynamic carbon flow tracing and second-level load carbon source tracing.

CN122434552APending Publication Date: 2026-07-21MARKETING SERVICE CENT OF STATE GRID HEILONGJIANG ELECTRIC POWER CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
MARKETING SERVICE CENT OF STATE GRID HEILONGJIANG ELECTRIC POWER CO LTD
Filing Date
2026-04-29
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing power grid carbon flow tracking technology has high computational complexity, making it difficult to meet real-time requirements. Furthermore, the lack of physical constraints in purely data-driven models leads to unreasonable output results.

Method used

A physical-guided graph neural network is used in conjunction with a breadth-first search algorithm. The graph structure is constructed by collecting power grid data in real time. The graph attention network is trained using a loss function that includes physical constraints to infer carbon potential and perform reverse tracking and proportional allocation.

Benefits of technology

It achieves efficient and accurate dynamic carbon flow tracking, meets the real-time scheduling requirements of power systems, adapts to topology changes without retraining, and improves the physical rationality and computational efficiency of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122434552A_ABST
    Figure CN122434552A_ABST
Patent Text Reader

Abstract

The application discloses a power grid carbon emission flow dynamic tracking method based on a physical guided graph neural network, and belongs to the technical field of power system operation analysis and low-carbon dispatching, and comprises the following steps: collecting power grid data in real time and dynamically constructing a power grid topology graph structure; inputting the graph structure into a physical guided graph attention network model trained through a loss function containing physical constraints, wherein the model fuses the edge features of line power and impedance when calculating attention coefficients, so as to infer the carbon potential of all nodes in the network; based on the inferred carbon potential, using a breadth-first search algorithm to start from a load node, tracking and proportionally allocating in the reverse direction along the active power flow path, and determining the carbon emission contribution of the generator set. The application ensures the physical consistency and precision of carbon flow tracking under the condition of lacking real labels, and significantly improves the efficiency of large-scale power grid carbon flow analysis and the adaptability to topology changes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power system operation analysis and low-carbon dispatching technology, and in particular relates to a method for dynamic tracking of power grid carbon emission flows based on a physical guided graph neural network. Background Technology

[0002] Grid carbon flow tracking is fundamental to achieving accurate carbon metering and low-carbon dispatch in power systems. Currently, existing technologies primarily revolve around analysis methods based on physical models. Among these, the power flow sensitivity method quantifies the impact of changes in node injected power on the overall grid carbon flow distribution by constructing a sensitivity matrix; the proportional allocation method distributes generation-side carbon emissions to each load node based on power flow proportions. These methods, based on well-defined grid physical models, can establish the carbon flow transfer relationship from generation to load, providing a fundamental framework for grid carbon accounting.

[0003] However, existing methods still have significant limitations in practical applications. First, traditional methods typically rely on large-scale matrix operations, such as matrix inversion, which have high computational complexity and are difficult to meet the efficiency requirements of real-time carbon flow tracking for large-scale power grids. Second, these methods are mostly based on fixed power grid topology models. When the system operation changes or a fault causes a change in the topology, the model often needs to be reconstructed and solved, resulting in poor adaptability. In addition, with the improvement of power system data acquisition systems, existing methods are unable to effectively integrate multi-source, heterogeneous real-time measurement data to improve tracking accuracy. In recent years, although some studies have attempted to introduce data-driven methods such as Graph Neural Networks (GNNs) into power system analysis to improve computational efficiency and topology adaptability, these purely data-driven models lack clear physical mechanism embeddings, and their output results may violate fundamental physical laws of power systems such as energy conservation and Kirchhoff's laws, leading to insufficient interpretability and physical consistency of the model. Therefore, existing technologies still face challenges in achieving efficient, accurate, and physically interpretable real-time carbon flow tracking in power grids. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention proposes a dynamic tracking method for power grid carbon emission flows based on a physical guided graph neural network, thereby resolving the issues present in the prior art.

[0005] To achieve the above objectives, in a first aspect, the present invention provides a method for dynamic tracking of power grid carbon emission flows based on a physical guided graph neural network, comprising: S1: Real-time acquisition of power grid operation data, and dynamic construction of a graph structure based on the power grid topology, where nodes represent power generation nodes, substation nodes or load nodes in the power grid, and edges represent transmission lines; S2: Input the graph structure into a pre-trained physical-guided graph attention network model to infer the carbon potential of each node in the entire network; wherein, the physical-guided graph attention network model is trained using a loss function that includes physical constraints, and edge features are fused when calculating the attention coefficients between nodes; S3: Based on the inferred nodal carbon potential, a breadth-first search algorithm is used to trace and proportionally allocate carbon emissions from the target load node along the active power flow path, starting from the target load node, to determine the carbon emission contribution of each power generation node to the target load node.

[0006] Preferably, in step S1, constructing the graph structure specifically includes: The node feature vector is defined to include at least voltage amplitude, voltage phase angle, active power injection, reactive power injection, and carbon emission intensity. The edge feature vector is defined as containing at least line resistance, line reactance, and real-time active power flow. The adjacency relationships between nodes are dynamically updated based on the real-time topology of the power grid.

[0007] Preferably, the physical guidance graph attention network model is a multi-layer graph attention network model.

[0008] Preferably, the expression for calculating the attention coefficient is: ; in, Let represent the attention coefficient of node j towards node i. and Let i and j be the feature vectors of nodes i and j, respectively. Let be the feature vector of the edge connecting nodes i and j. The weight matrix is ​​a learnable matrix. For learnable attention vectors, This indicates a vector concatenation operation.

[0009] Preferably, the loss function containing physical constraints is a composite loss function that includes a carbon flow conservation constraint loss term.

[0010] Preferably, the composite loss function further includes at least one of the following constraint loss terms: power balance constraint loss term, carbon potential boundary constraint loss term, and carbon flow direction constraint loss term.

[0011] Preferably, in step S3, the proportional allocation specifically involves: at each hop node of the reverse tracing path, the carbon emission demand is allocated to the upstream node according to the active power flow ratio of each in-degree line flowing into that node.

[0012] Preferably, step S3 specifically includes: S31: Initialize the queue and add the target load node to the queue; S32: Remove the head node from the queue and retrieve all upstream power supply nodes of that node; S33: For each upstream power supply node, if it is a power generation node, calculate and record its carbon contribution ratio to the target load node; if it is a connection node, proportionally convert the carbon emission demand to the connection node and add the connection node to the queue. S34: Repeat steps S32 to S33 until the queue is empty or the preset maximum number of tracing jumps is reached.

[0013] Preferably, the carbon contribution ratio is calculated based on the proportion of active power flow from upstream power generation nodes to the current node relative to the total active power inflow to the current node.

[0014] Preferably, after step S3 is executed, a carbon contribution matrix is ​​also generated to quantify the carbon emission contribution rate of each power generation node to each load node.

[0015] Compared with the prior art, the present invention has the following advantages and technical effects: This invention employs a physics-guided graph attention network model trained with a loss function incorporating physical constraints. This model embeds core physical laws such as carbon flow conservation and power balance as constraint terms into the model training process. This technical feature forces the model's learning objective to be directed towards a solution space that satisfies the fundamental physical laws of power systems, even in the absence of a true carbon potential label. This significantly improves the physical plausibility of the model's output and the overall accuracy of carbon potential inference, overcoming the problems of purely data-driven models potentially violating physical laws and exhibiting poor interpretability.

[0016] This invention combines the efficient forward inference of a physically guided graph attention network model with backward path traversal and proportional allocation based on a breadth-first search algorithm. The graph attention network avoids the high-complexity matrix inversion operations of traditional methods, while the breadth-first search algorithm based on graph topology is far more computationally efficient than global matrix operations on sparse power grid structures. The synergistic effect of these two approaches enables dynamic tracking of carbon flow across the entire power grid and second-level load carbon source tracing, meeting the needs of real-time scheduling and analysis in power systems.

[0017] The technical solution of this invention is based on dynamically constructing a graph structure from real-time acquired data and utilizing the inherent inductive learning characteristics of graph neural networks for processing. When the power grid topology changes due to switching operations or faults, this method does not require retraining the model; it only needs to update the adjacency relationships of the input graph to perform carbon potential inference and source analysis for the new operating state, thereby achieving rapid adaptation to changes in power grid operation. Attached Figure Description

[0018] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a diagram of the four-layer architecture of PI-GNN according to an embodiment of the present invention; Figure 2 This is a detailed diagram of the GAT network architecture according to an embodiment of the present invention; Figure 3 This is a diagram illustrating the physical guidance loss function structure of an embodiment of the present invention. Figure 4 This is a flowchart of the BFS carbon traceability algorithm according to an embodiment of the present invention. Detailed Implementation

[0019] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0020] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0021] Example 1 This embodiment provides a method for dynamic tracking of power grid carbon emission flows based on a physical guided graph neural network. By embedding physical equations such as carbon flow conservation and Kirchhoff's laws into the loss function of the neural network, it achieves high-precision, self-supervised learning without the need for labeled data.

[0022] like Figure 1 As shown, this embodiment implements end-to-end carbon flow tracing based on a four-layer data flow architecture: Data access layer: Collects real-time SCADA / PMU data (voltage, power), generator set real-time output and emission factors.

[0023] Graph Construction Layer: Dynamically maps the power grid topology to a graph structure. The node characteristics include electrical quantities and carbon potential, while the edge characteristics include line impedance and power flow.

[0024] Core Model Layer (PI-GNN): Employs a multi-layer graph attention network (GAT) for feature extraction and carbon potential inference, and uses a physical constraint loss function to guide training.

[0025] Application layer: Based on the inferred node carbon potential, perform full network carbon flow distribution calculation and load carbon source tracing analysis.

[0026] A method for dynamically tracking carbon emission flows in power grids based on a physical guided graph neural network, specifically including: S1: Real-time acquisition of power grid operation data, and dynamic construction of a graph structure based on the power grid topology, where nodes represent power generation nodes, substation nodes or load nodes in the power grid, and edges represent transmission lines; Furthermore, in step S1, constructing the graph structure specifically includes: The node feature vector is defined to include at least voltage amplitude, voltage phase angle, active power injection, reactive power injection, and carbon emission intensity. The edge feature vector is defined as containing at least line resistance, line reactance, and real-time active power flow. The adjacency relationships between nodes are dynamically updated based on the real-time topology of the power grid.

[0027] Specifically, since the power grid topology changes in real time with switching operations, an adaptive graph data structure is constructed: Node definition: This includes generators, substations, and load nodes. Node feature vectors. Includes voltage amplitude Phase angle Active / Reactive Injection and unit carbon emission intensity (Only the generating nodes are known).

[0028] Edge definition: This corresponds to the power transmission line. Edge feature vector. Includes line resistance Reactance Real-time active power flow .

[0029] Topology update: Monitor circuit breaker status and utilize adjacency matrix It can represent physical connectivity in real time, and due to the inductive learning characteristics of GNNs, it can handle local topological changes without retraining.

[0030] S2: Input the graph structure into a pre-trained physical-guided graph attention network model to infer the carbon potential of each node in the entire network; wherein, the physical-guided graph attention network model is trained using a loss function that includes physical constraints, and edge features are fused when calculating the attention coefficients between nodes; Furthermore, the physical guidance graph attention network model is a multi-layer graph attention network model.

[0031] Furthermore, the loss function containing physical constraints is a composite loss function that includes a carbon flow conservation constraint loss term.

[0032] Furthermore, the composite loss function also includes at least one of the following constraint loss terms: power balance constraint loss term, carbon potential boundary constraint loss term, and carbon flow direction constraint loss term.

[0033] Specifically, such as Figure 2 As shown, the Physically Guided Graph Attention Network (GAT) inference is the core computing engine, employing a 3-layer, 8-head GAT architecture: (1) Attention mechanism: Unlike the fixed weights of traditional GCN, GAT uses attention coefficients. The influence weights of neighboring nodes on the carbon potential of the central node are dynamically learned. The expression for calculating the attention coefficient is: (1) in, Let represent the attention coefficient of node j towards node i. and Let i and j be the feature vectors of nodes i and j, respectively. Let be the feature vector of the edge connecting nodes i and j. The weight matrix is ​​a learnable matrix. For learnable attention vectors, This indicates a vector concatenation operation.

[0034] Feature fusion innovation: integrating edge features (Line power and impedance) Explicit attention injection calculations simulate the physical law that "high-current lines carry more carbon flow".

[0035] In this embodiment, the GAT network model architecture adopts a 3-layer stacked graph attention architecture: Input embedding: node features (5-dimensional:) ) and edge features (3D:) First, it goes through a fully connected layer (Linear, 5→64 / 3→32) for dimensionality upscaling.

[0036] Intermediate layer: Employs two multi-head attention layers, each containing... Size, hidden layer dimensions The activation function used is LeakyReLU (negative slope). Residual connections and layer normalization are introduced between layers to prevent gradient vanishing. The dropout rate is set to 0.1 to enhance generalization ability.

[0037] Output layer: The last attention layer (1 head) directly outputs the predicted carbon potential of the nodes. (1-dimensional), and scaled to using the Sigmoid function (scaling to) Ensure that the output is non-negative and bounded.

[0038] (2) such as Figure 3 As shown, the physical constraint loss function is a composite loss function designed to address the lack of true carbon potential labels (label-free). Guide the model to converge to a physically feasible solution: (2) (Carbon flux conservation): Carbon flux flowing into a node = Carbon flux flowing out + Carbon produced by the node itself. This is the most fundamental physical constraint.

[0039] (Power balance): Constrained by Kirchhoff's current law in physics.

[0040] (Boundary constraints): Limiting carbon potential .

[0041] (Directional constraint): Force the carbon flow direction to be consistent with the active power flow direction.

[0042] In this embodiment, the total loss function Dynamic weighted summation is used, and the weights of each component are set as follows: Data loss weights MSE is calculated only for nodes that are tagged (e.g., known emissions from thermal power plants).

[0043] Carbon flow conservation weight This is a strong physical constraint, assigned the highest weight.

[0044] (3) Power balance weight Constrain the balance between active power injection and outflow at nodes.

[0045] Boundary and Direction Weights : As a soft constraint to aid convergence.

[0046] Optimizer: Adam optimizer is used, initial learning rate... Set weight decay. .

[0047] S3: Based on the inferred nodal carbon potential, a breadth-first search algorithm is used to trace and proportionally allocate carbon emissions from the target load node along the active power flow path, starting from the target load node, to determine the carbon emission contribution of each power generation node to the target load node.

[0048] Furthermore, in step S3, the proportional allocation specifically involves: at each hop node of the reverse tracing path, the carbon emission demand is allocated to the upstream node according to the active power flow ratio of each in-degree line flowing into that node.

[0049] Furthermore, step S3 specifically includes: S31: Initialize the queue and add the target load node to the queue; S32: Remove the head node from the queue and retrieve all upstream power supply nodes of that node; S33: For each upstream power supply node, if it is a power generation node, calculate and record its carbon contribution ratio to the target load node; if it is a connection node, proportionally convert the carbon emission demand to the connection node and add the connection node to the queue. S34: Repeat steps S32 to S33 until the queue is empty or the preset maximum number of tracing jumps is reached.

[0050] Furthermore, the carbon contribution ratio is calculated based on the proportion of active power flow from upstream power generation nodes to the current node relative to the total active power inflow to the current node.

[0051] Furthermore, after step S3 is executed, a carbon contribution matrix is ​​generated to quantify the carbon emission contribution rate of each power generation node to each load node.

[0052] Specifically, such as Figure 4 As shown, after obtaining the carbon potential of all network nodes... Next, the sources and composition of carbon emissions on the load side were analyzed: (1) Reverse tracing: Starting from the target load node, use breadth-first search (BFS) to traverse the active power flow path in reverse.

[0053] (2) Proportional allocation: At each hop node, the carbon demand is allocated upstream according to the in-degree flow ratio until it reaches the generator node.

[0054] (3) Contribution matrix: Constructing the carbon contribution matrix This quantifies the carbon emission contribution of each generating unit to each user. Compared to traditional matrix inversion, the BFS algorithm significantly reduces computational complexity on sparse graphs. Down to It supports traceability at the second level.

[0055] In this embodiment, the graph-based breadth-first search (BFS) tracing process is as follows: S31: Initialization: Establish queue The target load node to be traced Enqueue. Initialize the carbon contribution dictionary. .

[0056] S32: Reverse traversal: when If not empty, retrieve the head node of the queue. .

[0057] Search All upstream power supply nodes .

[0058] S33: Judgment and Apportionment: like For generator nodes: calculate their pairs carbon contribution ratio , accumulated to .

[0059] like For connecting nodes (substations): proportionally The target load demand is converted to and will Add to queue Let's trace back further.

[0060] S34: Termination: When the queue is empty or the maximum number of jumps is reached (e.g., ...). Stop when ), output normalized generator carbon contribution distribution.

[0061] This embodiment was verified on the IEEE 118-node system: Dataset: 100,000 samples were generated based on MATPOWER and divided into training / validation / test sets in an 8:1:1 ratio.

[0062] Convergence: PI-GNN converges within 50 epochs, and the conservation error decreases to [value missing]. Order of magnitude.

[0063] Comparison results of this embodiment: RMSE: PI-GNN (6.1 g / kWh) outperforms pure data-driven GAT (7.1 g / kWh).

[0064] Inference speed: PI-GNN requires only 98ms for a single inference, which is 18 times faster than the traditional matrix inversion method (1840ms), meeting the requirements of real-time scheduling.

[0065] Generalization: Under N-1 disconnection faults, the model can maintain more than 95% accuracy without retraining, verifying the adaptability of graph neural networks to topological changes.

[0066] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for dynamic tracking of power grid carbon emission flows based on a physical guided graph neural network, characterized in that, Includes the following steps: S1: Real-time acquisition of power grid operation data, and dynamic construction of a graph structure based on the power grid topology, where nodes represent power generation nodes, substation nodes or load nodes in the power grid, and edges represent transmission lines; S2: Input the graph structure into a pre-trained physical-guided graph attention network model to infer the carbon potential of each node in the entire network; wherein, the physical-guided graph attention network model is trained using a loss function that includes physical constraints, and edge features are fused when calculating the attention coefficients between nodes; S3: Based on the inferred nodal carbon potential, a breadth-first search algorithm is used to trace and proportionally allocate carbon emissions from the target load node along the active power flow path, starting from the target load node, to determine the carbon emission contribution of each power generation node to the target load node.

2. The method according to claim 1, characterized in that, In step S1, constructing the graph structure specifically includes: The node feature vector is defined to include at least voltage amplitude, voltage phase angle, active power injection, reactive power injection, and carbon emission intensity. The edge feature vector is defined as containing at least line resistance, line reactance, and real-time active power flow. The adjacency relationships between nodes are dynamically updated based on the real-time topology of the power grid.

3. The method according to claim 1, characterized in that, The physical guidance graph attention network model is a multi-layer graph attention network model.

4. The method according to claim 3, characterized in that, The expression for calculating the attention coefficient is as follows: ; in, Let represent the attention coefficient of node j towards node i. and Let i and j be the feature vectors of nodes i and j, respectively. Let be the feature vector of the edge connecting nodes i and j. The weight matrix is ​​a learnable matrix. For learnable attention vectors, This indicates a vector concatenation operation.

5. The method according to claim 1, characterized in that, The loss function containing physical constraints is a composite loss function that includes a carbon flow conservation constraint loss term.

6. The method according to claim 5, characterized in that, The composite loss function also includes at least one of the following constraint loss terms: power balance constraint loss term, carbon potential boundary constraint loss term, and carbon flow direction constraint loss term.

7. The method according to claim 1, characterized in that, In step S3, the proportional allocation specifically involves: at each hop node of the reverse tracing path, the carbon emission demand is allocated to the upstream node according to the active power flow ratio of each in-degree line flowing into that node.

8. The method according to claim 1, characterized in that, Step S3 specifically includes: S31: Initialize the queue and add the target load node to the queue; S32: Remove the head node from the queue and retrieve all upstream power supply nodes of that node; S33: For each upstream power supply node, if it is a power generation node, calculate and record its carbon contribution ratio to the target load node; if it is a connection node, proportionally convert the carbon emission demand to the connection node and add the connection node to the queue. S34: Repeat steps S32 to S33 until the queue is empty or the preset maximum number of traversal jumps is reached.

9. The method according to claim 8, characterized in that, The carbon contribution ratio is calculated based on the proportion of active power flow from upstream power generation nodes to the current node relative to the total active power inflow to the current node.

10. The method according to claim 1, characterized in that, After step S3 is executed, a carbon contribution matrix is ​​also generated to quantify the carbon emission contribution rate of each power generation node to each load node.