Line loss prediction method and device based on space-time diagram neural network deduction, and medium

By constructing an edge weight adjacency matrix and feature fusion model based on a spatiotemporal graph neural network, the problem of insufficient accuracy in distribution network line loss prediction is solved, achieving high-precision line loss prediction and supporting the optimized management of the distribution network.

CN121899562APending Publication Date: 2026-04-21ZHANGJIAKOU POWER SUPPLY COMPANY OF STATE GRID JINBEI ELECTRIC POWER COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHANGJIAKOU POWER SUPPLY COMPANY OF STATE GRID JINBEI ELECTRIC POWER COMPANY
Filing Date
2025-11-27
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing line loss prediction methods suffer from insufficient prediction accuracy in distribution networks, especially during high-load periods and at high-loss nodes, making them unable to adapt to the complex topology and dynamic load changes of distribution networks.

Method used

An edge-weighted adjacency matrix is ​​constructed based on a spatiotemporal graph neural network. By combining physical correlation and electrical coupling, a spatiotemporal graph sequence is formed. Spatial and temporal features are extracted through a pre-trained spatiotemporal graph neural network model to predict line loss.

Benefits of technology

It significantly improves the accuracy of line loss prediction, provides reliable data support, and reduces power grid operation losses and management costs for distribution network line loss management, network structure optimization, and load dispatching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121899562A_ABST
    Figure CN121899562A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of electric power, and provides a line loss prediction method and device based on time-space diagram neural network deduction and a medium, and the method comprises the steps: taking each feeder line in a power distribution network as a node, constructing an edge weight adjacency matrix through calculating the physical correlation degree and the electrical coupling degree between the nodes, and obtaining a space diagram; obtaining a node feature sequence of each feeder line in the power distribution network, and combining the node feature sequences with the space diagram to form a space-time diagram sequence; and inputting the space-time diagram sequence into a pre-trained space-time diagram neural network model, extracting spatial features through a physical attention space module, extracting time features through a time convolution module, fusing the spatial features and the time features, and predicting the line loss of each node. The problem that an existing line loss prediction method is insufficient in prediction precision can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power technology, and in particular relates to a method, device and medium for predicting line loss based on spatiotemporal graph neural network deduction. Background Technology

[0002] Line loss is the inherent loss of electrical energy in the transmission, transformation, distribution, and consumption stages. Its magnitude directly reflects the operating efficiency and rationality of the power grid's planning and design. Accurate prediction of line loss is a core prerequisite for power companies to carry out energy conservation, loss reduction, cost control, and lean management. Among them, the distribution network, as the terminal link of the power system, is characterized by a large number of nodes, complex topology, severe load fluctuations, and uneven coverage of measurement equipment. Its line loss accounts for more than 60% of the total power grid line loss, making it a key focus and challenge in line loss management. Therefore, developing a high-precision line loss prediction method adapted to the characteristics of the distribution network is of significant practical importance for improving the economic efficiency and reliability of power grid operation.

[0003] In existing technologies, line loss prediction methods mainly include empirical methods based on power physics formulas and statistical methods based on traditional machine learning. Empirical methods based on power physics formulas (such as the root mean square current method and the equivalent resistance method) rely heavily on grid topology parameters and power flow calculation models. While they can reflect some physical laws, they suffer from difficulties in obtaining parameters, poor adaptability to dynamic load changes, and difficulty in addressing the lack of "pseudo-topology" in the distribution network. Prediction errors fluctuate significantly with operating conditions. Statistical methods based on traditional machine learning (such as support vector machines, gradient boosting trees, and neural networks) achieve prediction by mining the statistical correlation between measurement data and line loss. However, they can only capture time dependence at a single scale and cannot adapt to the dual characteristics of line loss—"spatial correlation + temporal dynamics"—leading to insufficient prediction accuracy during high-load periods and at high-loss nodes. Summary of the Invention

[0004] This invention provides a method, device, and medium for predicting line loss based on spatiotemporal graph neural network deduction, in order to solve the problem of insufficient prediction accuracy in existing line loss prediction methods.

[0005] A first aspect of this invention provides a line loss prediction method based on spatiotemporal graph neural network deduction, comprising: Using each feeder in the distribution network as a node, the edge weight adjacency matrix is ​​constructed by calculating the physical correlation and electrical coupling between each node, and a spatial graph is obtained. Obtain the node feature sequence of each feeder in the distribution network, and combine the node feature sequence with the spatial graph to form a spatiotemporal graph sequence; The spatiotemporal graph sequence is input into a pre-trained spatiotemporal graph neural network model. Spatial features are extracted through the physical attention spatial module, and temporal features are extracted through the temporal convolution module. The spatial features and the temporal features are fused to predict the line loss of each node.

[0006] In one possible implementation, constructing an edge-weighted adjacency matrix by calculating the physical and electrical coupling between each node includes: The ratio of the transmission power flow between nodes to the equivalent line impedance is calculated, and the physical correlation between nodes is determined based on the ratio. The electrical coupling degree between nodes is obtained by calculating the power flow correlation between nodes using the Pearson correlation coefficient method. The physical correlation and electrical coupling between nodes are weighted and fused to obtain the edge weights between nodes, and the edge weight adjacency matrix is ​​generated.

[0007] In one possible implementation, the node features include: measurement temporal features and physical static features; the step of combining the node feature sequence with the spatial graph to form a spatiotemporal graph sequence includes: A dynamic feature matrix for each time step is constructed based on the measured time series characteristics. X t ; Construct a static feature matrix for each time step based on the aforementioned physical static features. S ; According to the dynamic feature matrix X t The static feature matrix S Node set V The set of edges between nodes Constructing a spatiotemporal graph sequence G t =( V , , X t , S ).

[0008] In one possible implementation, the extraction of spatial features via the physical attention space module includes: The dynamic feature matrix at each time step X t With static characteristic matrix S The matrices are then concatenated to obtain the concatenation matrix for each time step. Projecting the spliced ​​matrix into a high-dimensional space yields a high-dimensional feature representation of each node. Calculate the attention score between nodes based on the high-dimensional feature representation of each node. Calculate the physical attention coefficient between each node based on the attention score between each node and the edge weight adjacency matrix; Based on the high-dimensional feature representation of each node and the physical attention coefficient between each node, the neighbor features of each node are aggregated to obtain the spatial features.

[0009] In one possible implementation, calculating the physical attention coefficients between nodes based on the attention scores between nodes and the edge weight adjacency matrix includes: For any two nodes, multiply the attention score between the two nodes by the edge weight, process the product through the Softmax function, and obtain the physical attention coefficient between the two nodes.

[0010] In one possible implementation, the spatial features are obtained by aggregating the neighbor features of each node based on the high-dimensional feature representations of each node and the physical attention coefficients between each node, including: according to The spatial features are obtained by aggregating the neighbor features of each node; wherein, Spatial features; t For time steps; It is the ReLU activation function; N i For nodes i The set of neighboring nodes; For nodes i , j The physical attention coefficient between them; For nodes j High-dimensional feature representation.

[0011] In one possible implementation, the measurement timing characteristics include the line current, active power, and historical line loss rate.

[0012] In one possible implementation, the physical static characteristics include the resistance and length of the line.

[0013] A second aspect of the present invention 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 computer program to implement the steps of the method described in the first aspect above.

[0014] A third aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in the first aspect above.

[0015] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows: This invention uses feeders as nodes and constructs an edge-weighted adjacency matrix by combining physical correlation and electrical coupling. This accurately depicts the dual correlation of physical connection and electrical interaction between nodes, providing a foundation for modeling the spatial dependence of line loss that conforms to the laws of the power system. The node feature sequence is fused with the spatial graph to form a spatiotemporal graph sequence, which fully preserves the temporal dynamic changes and spatial coupling characteristics of line loss, solving the problem that single-dimensional data cannot fully represent the factors affecting line loss. The pre-trained spatiotemporal graph neural network, through the physical attention space module, can specifically enhance the feature interaction between high-loss nodes and related nodes. Combined with the temporal convolution module, it accurately captures the short-term fluctuations and long-term periodic dependence of line loss. Then, through feature fusion, it achieves in-depth mining of spatiotemporal information, ultimately significantly improving the accuracy of line loss prediction. This provides reliable data support for distribution network line loss management, network optimization, and load dispatching, reducing power grid operation losses and management costs. Attached Figure Description

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

[0017] Figure 1 This is a schematic diagram illustrating the implementation process of the line loss prediction method based on spatiotemporal graph neural network deduction provided in this embodiment of the invention; Figure 2 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0018] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.

[0019] To illustrate the technical solution described in this invention, specific embodiments are described below.

[0020] In recent years, Spatiotemporal Graph Neural Networks (STGNNs), as an emerging technology that integrates the spatial modeling capabilities of graph neural networks with the time dependency capture capabilities of temporal models, have demonstrated excellent performance in fields such as traffic flow prediction and environmental monitoring. Some studies have attempted to apply them to line loss prediction, but existing spatiotemporal graph constructions lack a sense of power physics. The node edge definitions of STGNNs often rely on data-driven correlations (such as load temporal correlations) without considering the physical topology of the distribution network (such as feeder connection relationships) and electrical characteristics (such as line impedance and transmission power flow). This results in the constructed spatiotemporal graphs being disconnected from the actual operating laws of the power system, and the spatial correlation modeling deviating from the physical essence.

[0021] See Figure 1 It illustrates a schematic diagram of the implementation process of the line loss prediction method based on spatiotemporal graph neural network deduction provided in this application embodiment, including: Step 101: Using each feeder in the distribution network as a node, construct an edge weight adjacency matrix by calculating the physical correlation and electrical coupling between each node to obtain a spatial graph.

[0022] In this embodiment, the prediction target can be the line loss rate of each feeder in the next time step, with a time granularity of 15 minutes as one time step and a spatial granularity of 10kV feeder as the node.

[0023] The construction of the spatiotemporal graph is the core of STGNN's modeling of spatial relationships. The key to physical perception is defining nodes, edges, and edge weights based on the physical topology and electrical characteristics of the power system, rather than relying solely on data-driven correlations. For example, consider 10 feeders in a certain region: Using 10kV feeders as the basic node unit, each node corresponds to a unique code for a feeder. The characteristics of a node consist of dynamic features and static physical features. The edges of a feeder node are divided into physical connection edges (feeder...) i With feeder j (direct physical connection via the same substation busbar / switchgear) and electrical coupling side (if feeder) i With feeder j (No physical connection, but high power flow correlation) takes into account both the topological characteristics and electrical connections of the power grid.

[0024] Traditional STGNN edge weights are mostly data-driven. This scheme combines power physics formulas to design edge weights: calculate the ratio of the transmitted power flow between nodes to the equivalent line impedance, and determine the physical correlation between nodes based on the ratio; calculate the power flow correlation between nodes using the Pearson correlation coefficient method to obtain the electrical coupling between nodes; and weight and fuse the physical correlation and electrical coupling between nodes to obtain the edge weights between nodes and generate an edge weight adjacency matrix.

[0025] The formula for calculating edge weights is as follows: w ij =α· + ( 1 α ) ·ρ ij α ∈[0,1]: The balance coefficient of physical weights (typically 0.7, prioritizing physical laws); Feeder i and j Power flow between them (kW, normalized); Feeder i and j The equivalent line impedance (Ω, after normalization) between them; ρ ij Feeder i and j The load time-series correlation (Pearson correlation coefficient).

[0026] in, The larger the value, the better the feeder. i and j The higher the power transmission efficiency, the stronger the spatial correlation, and the greater the weight; combined with ρ ij It can compensate for the lack of physical measurement.

[0027] Finally, calculate the value of each edge. w ij Fill the adjacency matrix according to the edge connection relationship.

[0028] Step 102: Obtain the node feature sequence of each feeder in the distribution network, and combine the node feature sequence with the spatial diagram to form a spatiotemporal diagram sequence.

[0029] In this embodiment, node characteristics include: measurement timing characteristics and physical static characteristics. The measurement timing characteristics may include, but are not limited to, line current, active power, and historical line loss rate. The physical static characteristics may include, but are not limited to, line resistance and length.

[0030] Specifically: Construct a dynamic feature matrix for each time step based on the measurement time series characteristics. X t ; Construct a static feature matrix for each time step based on physical static characteristics. S ; Based on the dynamic feature matrixX t The static feature matrix S Node set V The set of edges between nodes Constructing a spatiotemporal graph sequence G t =( V , , X t , S ).

[0031] Step 103: Input the spatiotemporal graph sequence into the pre-trained spatiotemporal graph neural network model, extract spatial features through the physical attention spatial module, extract temporal features through the temporal convolution module, fuse spatial and temporal features, and predict the line loss of each node.

[0032] Based on the aforementioned physically-aware spatiotemporal graph sequence and spatiotemporal graph, this embodiment designs a physically enhanced STGNN model. This model replaces traditional pure data-driven attention by incorporating impedance-current coupling physical attention into the spatial module. Its architecture consists of six parts: input layer, feature concatenation layer, physical attention spatial module, temporal convolution module, spatiotemporal fusion layer, and prediction head. The overall process is as follows: Input: Spatiotemporal graph sequence.

[0033] Feature concatenation layer: Combines the dynamic feature matrix at each time step X t With static characteristic matrix S The matrices are concatenated to obtain the concatenated matrix for each time step. H t .

[0034] Physical attention space module: (1) Project the splicing matrix into a high-dimensional space to obtain the high-dimensional feature representation of each node. ,in The projection matrix; (2) Calculate the attention score between nodes based on the high-dimensional feature representation of each node. D is the projection dimension; (3) Calculate the physical attention coefficient between each node based on the attention score and the edge weight adjacency matrix between each node. ; (4) According to By aggregating the neighbor features of each node, spatial features are obtained; among them, Spatial features; t For time steps; It is the ReLU activation function; N iFor nodes i The set of neighboring nodes; For nodes i , j The physical attention coefficient between them; For nodes j High-dimensional feature representation.

[0035] Temporal convolution module: for Perform time feature extraction to obtain time features.

[0036] Spatiotemporal fusion layer: residual connections fuse spatial and temporal features.

[0037] Prediction Head: The fully connected layer outputs the predicted line loss rate.

[0038] This invention uses feeders as nodes and constructs an edge-weighted adjacency matrix by combining physical correlation and electrical coupling. This accurately depicts the dual correlation of physical connection and electrical interaction between nodes, providing a foundation for modeling the spatial dependence of line loss that conforms to the laws of the power system. The node feature sequence is fused with the spatial graph to form a spatiotemporal graph sequence, which fully preserves the temporal dynamic changes and spatial coupling characteristics of line loss, solving the problem that single-dimensional data cannot fully represent the factors affecting line loss. The pre-trained spatiotemporal graph neural network, through the physical attention space module, can specifically enhance the feature interaction between high-loss nodes and related nodes. Combined with the temporal convolution module, it accurately captures the short-term fluctuations and long-term periodic dependence of line loss. Then, through feature fusion, it achieves in-depth mining of spatiotemporal information, ultimately significantly improving the accuracy of line loss prediction. This provides reliable data support for distribution network line loss management, network optimization, and load dispatching, reducing power grid operation losses and management costs.

[0039] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0040] Figure 2 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. For example... Figure 2 As shown, the electronic device 2 in this embodiment includes a processor 20 and a memory 21. The memory 21 stores a computer program 22. When the processor 20 executes the computer program 22, it implements the steps in the various method embodiments described above. Alternatively, when the processor 20 executes the computer program 22, it implements the functions of each module in the various device embodiments described above.

[0041] For example, computer program 22 may be divided into one or more modules / units, which are stored in memory 21 and executed by processor 20 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 22 in electronic device 2.

[0042] Electronic device 2 may include, but is not limited to, processor 20 and memory 21. Those skilled in the art will understand that... Figure 2 This is merely an example of electronic device 2 and does not constitute a limitation on electronic device 2. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 2 may also include input / output devices, network access devices, buses, etc.

[0043] The processor 20 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0044] The memory 21 can be an internal storage unit of the electronic device 2, such as a hard disk or RAM. The memory 21 can also be an external storage device of the electronic device 2, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 21 can include both internal and external storage units of the electronic device 2. The memory 21 is used to store the computer program 22 and other programs and data required by the electronic device 2. The memory 21 can also be used to temporarily store data that has been output or will be output.

[0045] For the sake of simplicity and clarity, only the above-described functional modules / units are used as examples. In practical applications, the functions described above can be assigned to different functional modules / units as needed. These modules / units can be implemented in hardware, software, or a combination of both.

[0046] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the methods described in the above-described method embodiments.

[0047] This invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the methods described in the above-described method embodiments.

[0048] Computer programs include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. Computer-readable media can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0049] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Unless otherwise specified or in conflict with logic, the terminology and / or descriptions between different embodiments are consistent and can be referenced interchangeably. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.

[0050] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for predicting line loss based on spatiotemporal graph neural network deduction, characterized in that, include: Using each feeder in the distribution network as a node, the edge weight adjacency matrix is ​​constructed by calculating the physical correlation and electrical coupling between each node, and a spatial graph is obtained. Obtain the node feature sequence of each feeder in the distribution network, and combine the node feature sequence with the spatial graph to form a spatiotemporal graph sequence; The spatiotemporal graph sequence is input into a pre-trained spatiotemporal graph neural network model. Spatial features are extracted through the physical attention spatial module, and temporal features are extracted through the temporal convolution module. The spatial features and the temporal features are fused to predict the line loss of each node.

2. The line loss prediction method based on spatiotemporal graph neural network deduction as described in claim 1, characterized in that, The process of constructing an edge-weighted adjacency matrix by calculating the physical and electrical coupling between each node includes: The ratio of the transmission power flow between nodes to the equivalent line impedance is calculated, and the physical correlation between nodes is determined based on the ratio. The electrical coupling degree between nodes is obtained by calculating the power flow correlation between nodes using the Pearson correlation coefficient method. The physical correlation and electrical coupling between nodes are weighted and fused to obtain the edge weights between nodes, and the edge weight adjacency matrix is ​​generated.

3. The line loss prediction method based on spatiotemporal graph neural network deduction as described in claim 1 or 2, characterized in that, The node features include: measurement time-series features and physical static features; combining the node feature sequence with the spatial graph to form a spatiotemporal graph sequence includes: A dynamic feature matrix for each time step is constructed based on the measured time series characteristics. X t ; Construct a static feature matrix for each time step based on the aforementioned physical static features. S ; According to the dynamic feature matrix X t The static feature matrix S Node set V The set of edges between nodes Constructing a spatiotemporal graph sequence G t =( V , , X t , S ).

4. The line loss prediction method based on spatiotemporal graph neural network deduction as described in claim 3, characterized in that, The extraction of spatial features through the physical attention space module includes: The dynamic feature matrix at each time step X t With static characteristic matrix S The matrices are then concatenated to obtain the concatenation matrix for each time step. Projecting the spliced ​​matrix into a high-dimensional space yields a high-dimensional feature representation of each node. Calculate the attention score between nodes based on the high-dimensional feature representation of each node. Calculate the physical attention coefficient between each node based on the attention score between each node and the edge weight adjacency matrix; Based on the high-dimensional feature representation of each node and the physical attention coefficient between each node, the neighbor features of each node are aggregated to obtain the spatial features.

5. The line loss prediction method based on spatiotemporal graph neural network deduction as described in claim 4, characterized in that, The step of calculating the physical attention coefficients between nodes based on the attention scores between each node and the edge weight adjacency matrix includes: For any two nodes, multiply the attention score between the two nodes by the edge weight, process the product through the Softmax function, and obtain the physical attention coefficient between the two nodes.

6. The line loss prediction method based on spatiotemporal graph neural network deduction as described in claim 4, characterized in that, The spatial features are obtained by aggregating the neighbor features of each node based on the high-dimensional feature representation of each node and the physical attention coefficients between each node, including: according to The spatial features are obtained by aggregating the neighbor features of each node; wherein, Spatial features; t For time steps; It is the ReLU activation function; N i For nodes i The set of neighboring nodes; For nodes i , j The physical attention coefficient between them; For nodes j High-dimensional feature representation.

7. The line loss prediction method based on spatiotemporal graph neural network deduction as described in claim 3, characterized in that, The measured timing characteristics include the line current, active power, and historical line loss rate.

8. The line loss prediction method based on spatiotemporal graph neural network deduction as described in claim 3, characterized in that, The physical static characteristics include the resistance and length of the line.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 8.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 8.