A comprehensive energy system rapid energy flow analysis method based on physical mechanism guidance and multi-head graph attention mechanism

CN119830130BActive Publication Date: 2026-08-11CHINA AGRI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

其主要缺点是精度有限、适用范围窄、模型依赖性强、难以验证以及在面对系统参数波动或不确定性时鲁棒性较差

Benefits of technology

[0013]本发明综合利用综合能源系统历史运行数据以及综合能源系统静态数据等相关信息,实现综合能源系统中的快速潮流判敛及预测,能够解决传统能流计算中计算效率低、精度有限的问题,能够为综合能源系统的调度和决策提供快速有效的数据支撑,最大限度的提高调度决策的管理时效。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119830130B_ABST
    Figure CN119830130B_ABST
Patent Text Reader

Abstract

This invention discloses a rapid energy flow analysis method for integrated energy systems based on physical mechanism guidance and multi-head graph attention mechanism. The method includes a graph neural network-based node and topology feature extraction method for the integrated energy system, used to construct multi-energy flow node information and graph representation of the integrated energy system; an energy flow convergence discrimination model based on a long short-term memory neural network algorithm, used to determine whether the real-time energy flow to be predicted has converged; and an energy flow prediction method based on multi-head graph attention and physical mechanism guidance, addressing the problems of low computational efficiency in traditional energy flow analysis methods and the lack of consideration for actual physical constraints in conventional machine learning methods. Simultaneously, the multi-head graph attention mechanism expands the attention scope and enhances the model's learning ability of relationships between different nodes, ensuring the computational efficiency and accuracy of subsequent energy flow prediction. Based on historical operating data of the integrated energy system, this invention constructs and represents the relationships between nodes and branches through a graph neural network, and uses a long short-term memory neural network to construct a discrimination model to guide the energy flow prediction model in determining whether to perform energy flow prediction, providing rapid and accurate energy flow analysis results for the operation and scheduling of integrated energy systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The application of this invention belongs to the field of integrated energy systems, and the technical means of this invention belong to the field of time series data analysis and machine learning, as well as the field of artificial intelligence technology, particularly the field of power flow analysis of power systems and energy flow analysis of integrated energy systems involving graph neural networks. Background Technology

[0002] Against the backdrop of the "dual carbon target," the proportion of renewable energy in integrated energy systems is increasing, making the construction of integrated energy systems dominated by new energy sources such as wind power and photovoltaics an inevitable trend. However, the volatility and uncertainty of wind and solar power generation pose significant challenges to the operation, scheduling, and control of integrated energy systems. Accurate prediction of new energy power generation can provide reliable decision-making information for the scheduling and control of integrated energy systems at different levels, thereby ensuring the safe, stable, economical, and green operation of the system. Meanwhile, the electrical load in the power system, the heat load in the heating system, and the natural gas load in the gas system constantly change over time, giving the integrated energy system a certain degree of determinism. Uncertainty in individual energy systems within an integrated energy system is transmitted to other systems through energy coupling devices, causing changes in the system's operating state and thus affecting the overall operating state of the integrated energy system. However, traditional multi-energy flow calculations can only provide the energy flow distribution of the system within a single time frame, failing to provide the continuous operating state of the system under the influence of uncertainties, and also suffer from low computational efficiency. Therefore, research on rapid multi-energy flow calculation methods that consider the influence of multiple uncertainties in integrated energy systems is urgently needed.

[0003] Developing a fast and accurate method for energy flow analysis of integrated energy systems is a current challenge for researchers. Traditional methods for energy flow analysis of integrated energy systems generally employ probabilistic energy flow analysis, mainly categorized into three types: simulation methods, approximation methods, and analytical methods. When considering uncertainties in integrated energy systems, the advantages and disadvantages of different methods under various conditions are detailed below.

[0004] (1) Simulation method. The simulation method is mainly represented by the Monte Carlo simulation method (MCSM). The main disadvantages are long computation time, high model complexity, sensitivity to initial conditions and parameters, and difficulty in capturing the long-term dynamic behavior and global optimization of the system. These disadvantages may limit the accuracy and reliability of the simulation results, especially when dealing with large-scale and highly complex systems.

[0005] (2) Approximation methods. Approximation methods are mainly represented by point estimation, first second moment method, and unscented transformation method. Their main disadvantages are limited accuracy, narrow applicability, strong model dependence, difficulty in verification, and poor robustness in the face of system parameter fluctuations or uncertainties. These disadvantages may lead to inaccurate and unreliable calculation results, affecting the final system analysis and optimization decision.

[0006] (3) The main drawback of analytical methods (including convolution and semi-invariant methods) in calculating energy flow in integrated energy systems is their high computational complexity, especially when dealing with high-dimensional and multivariable systems. They typically require accurate mathematical models and a large amount of computational resources, leading to a significant increase in computation time and memory usage. In addition, analytical methods make strict assumptions about the model, and nonlinear and uncertain factors in real-world systems may be difficult to model accurately, thus affecting the accuracy and reliability of the calculation results. Summary of the Invention

[0007] To overcome the shortcomings of the existing technologies, the ultimate goal of this invention is to provide a rapid energy flow analysis method for integrated energy systems based on machine learning. This method employs a multi-head graph attention mechanism and a physical guidance mechanism, constructing the node and branch relationships in a real integrated energy system through a graph network. This solves the problem of classical neural network models not considering boundary properties. Furthermore, the physical constraint-guided model training improves the accuracy of energy flow prediction. The specific technical route of this invention includes the following steps:

[0008] Step 1: Construct an input feature set using data collected by various sensors in the integrated energy system. In power system flow calculations, the input features for PQ nodes are injected active power P and reactive power Q; for PV nodes, they are injected active power P and voltage amplitude V; and for slack nodes, they are voltage amplitude V and phase angle θ. In the energy flow analysis of natural gas systems, similar input features are used: for pressure-flow nodes, the input features are injected flow rate and node pressure; for pressure-production nodes, they are node pressure and natural gas production; and for slack nodes, they are node pressure and reference flow rate. In the energy flow analysis of thermal systems, the input features for temperature-flow nodes are injected heat load and node temperature; for temperature-flow nodes, they are node temperature and flow rate; and for slack nodes, they are node temperature and reference flow rate. All these node features are then combined into a node feature matrix H. In power systems, conductivity and admittance are used as edge features of the graph; in natural gas systems, frictional loss and heat loss are used; and in thermal systems, thermal conductivity, pressure loss, and heat loss coefficient are used to construct an edge feature matrix. Simultaneously, the topological relationships between nodes and branches in the graph are represented by a node adjacency matrix A.

[0009] Step 2: Construct an energy flow convergence algorithm based on the LSTM algorithm. Perform energy flow calculations from the overall levels of the power system, thermal system, natural gas system, and integrated energy system to determine whether the energy flow equation has a real solution, that is, whether the actual integrated energy system can operate normally under these operating conditions.

[0010] Step 3: Construct an energy flow analysis model based on a graph neural network. Embed the topological structure information and physical constraints of the integrated energy system into the GCN network. This enables the graph neural network to capture the dynamic relationships of time-series data under the guidance of physical constraints during training, and to conform to physical equations such as Ohm's law and the law of conservation of energy. This enhances the model's learning ability at the level of physical knowledge and improves the model's prediction accuracy.

[0011] Compared with existing technologies, this invention addresses the problems of low computational efficiency, high sensitivity of model parameters, computational complexity, and limited accuracy in energy flow analysis of integrated energy systems. It proposes an innovative graph neural network-based method. By inputting the topological and node information of the actual integrated energy system into the graph neural network, it can more accurately capture the dynamic characteristics of different energy flows within the system. By effectively integrating the data input features and topological relationships of the power, natural gas, and heat systems, this invention solves the problem that classical neural network models cannot effectively handle boundary attributes and maintain physical constraints. Simultaneously, an LSTM-based energy flow convergence algorithm solves the challenge of determining whether energy flows have converged, further improving the computational speed and accuracy of energy flow prediction. This enables more efficient and accurate energy flow analysis and judgment of integrated energy systems under complex operating conditions.

[0012] The beneficial effects of this invention are:

[0013] This invention comprehensively utilizes historical operating data and static data of integrated energy systems to achieve rapid power flow convergence and prediction in integrated energy systems. It can solve the problems of low computational efficiency and limited accuracy in traditional energy flow calculations, and can provide fast and effective data support for the scheduling and decision-making of integrated energy systems, thereby maximizing the management timeliness of scheduling decisions. Attached Figure Description

[0014] Figure 1 This is a flowchart of the energy flow convergence model based on the LSTM algorithm used in the fast energy flow analysis method for integrated energy systems based on physical mechanism guidance and multi-head graph attention mechanism of the present invention.

[0015] Figure 2 This is a flowchart of the graph neural network-based energy flow prediction method mentioned in the present invention, which is a rapid energy flow analysis method for integrated energy systems based on physical mechanism guidance and multi-head graph attention mechanism.

[0016] Figure 3This is the overall technical roadmap for energy flow convergence and prediction mentioned in the present invention, which is a rapid energy flow analysis method for integrated energy systems based on physical mechanism guidance and multi-head graph attention mechanism. Detailed Implementation

[0017] To make the objectives, advantages and features of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0018] like Figure 1 As shown, the specific steps in a particular embodiment of the present invention are as follows:

[0019] Step A. Obtain historical operating data and static information of the integrated energy system, construct a training feature set for the energy flow prediction model, and obtain the real-time energy flow feature sequence of the integrated energy system to be predicted based on the real-time operating data of the integrated energy system.

[0020] The specific steps include: collecting historical operational data of the integrated energy system, including time-series data of different energy flows such as electricity, heat, and natural gas. The data should cover relevant variables such as system load, power generation, energy storage, and energy conversion efficiency. It also involves acquiring static information related to the system structure and parameters, such as equipment capacity, efficiency, topology, and energy conversion coefficients; this information helps in understanding the system's configuration and operational characteristics.

[0021] Secondly, feature engineering is performed. Besides collecting data on the system's historical operating characteristics over time periods such as hours, days, weeks, and months, meteorological characteristics such as temperature, air pressure, and humidity, which significantly influence system operation, are also considered. System operating characteristics are used as the primary features, while external features (time features and meteorological features) are used as auxiliary features to construct a feature set. The real-time features of the nodes within the system are combined to obtain the energy flow feature sequence to be predicted, X = [X1, X2, X3, ...], where X1 represents the feature set of the first node, and so on. Simultaneously, conductivity and admittance are used as edge features of the graph. In natural gas systems, frictional loss and heat loss are used as edge features, while in thermal systems, thermal conductivity, pressure loss, and heat loss coefficient are used as edge features, constructing an edge feature matrix L = [L1, L2, L3, ...], where L1 is the feature set of the first edge, and so on. Based on step A, the input feature set of the basic energy flow prediction model is obtained.

[0022] Step B. Construct an energy flow convergence model based on the LSTM algorithm, and calculate whether each subsystem and the overall integrated energy system converge to have real solutions. If convergent, input the data into the prediction model for the next step of integrated energy system energy flow prediction. If not convergent, output that the system is not convergent. Figure 1 As shown. The specific steps are as follows:

[0023] First, based on the real-time node feature matrix and edge feature matrix constructed in step A, spatiotemporal features are extracted using a graph convolutional neural network. Specifically, graph-level features are extracted using a heterogeneous graph attention mechanism and graph pooling, which are then input into the subsequent LSTM discriminant model for energy flow convergence. Mainstream graph neural networks transmit network topology information through adjacency matrices, node matrices, and edge feature matrices. During the forward propagation of the graph neural network, a graph convolution operation is first performed on the input node feature matrix H. Combined with the adjacency matrix A and the edge feature matrix L, the attention weight coefficients aij between nodes are calculated using a graph attention mechanism. Specifically, the calculation formula for the graph attention layer is as follows:

[0024]

[0025] a ij is the attention weight between nodes i and j, a is a learned attention vector, W is the weight matrix, || represents the vector concatenation operation, and h represents the node feature matrix input to the neural network.

[0026] After processing by the graph convolutional layer and graph attention layer, a new node feature matrix (H′∈R) is obtained. N×d To aggregate the features of all nodes in the graph into a global graph-level representation, global graph pooling is employed. Global pooling aggregates the features of all nodes in the graph, outputting a global representation of size (d) (g∈R). d The formula for calculating global graph average pooling is as follows:

[0027] [g j =max i∈V (h′ ij ),j=1,2,…,d]

[0028] Among them, g j h' is the maximum value of the graph on the j-th feature dimension. ij Let V be the value of node i in the j-th feature dimension, and V be the number of nodes.

[0029] The global feature vector g∈R obtained by pooling operation d This can be used as input to the subsequent discriminative model LSTM for further graph-level energy flow determination. On graph-based time-series data, LSTM is used for binary classification. The input at each time step is features extracted from the graph (usually a global graph representation with dimension d). The model needs to predict whether the current energy flow converges based on the feature sequences of these time steps; if converged, the output label value is 1; otherwise, the output label value is 0.

[0030] LSTM mainly consists of cell state, input gate, output gate, and forget gate. Its calculation process is as follows:

[0031] First, the input gate determines the new information input to the memory cell to update the cell state. The function expression is as follows:

[0032] i t =σ(W i [h t-1 ,x t ]+b i (1)

[0033] g t =tanh(W C [h t-1 ,x t ]+b C (2)

[0034] C t =f t C t-1 +i t g t (3)

[0035] In the formula: σ is the sigmoid function, which makes the output value range 0-1; i t For input gate parameters; W i W represents the input gate weights. C b represents the cell state weights. i b is the bias matrix of the input gate; C g is the bias matrix for the cell state. t The input state of the memory cell; tanh is the hyperbolic tangent function; C t In cellular state; C t-1 The cell state at the previous moment; f t Forget gate parameters; h t-1 The hidden layer state at the previous time step; x t This is the input for the current moment.

[0036] Secondly, the output gate is used to filter information from the memory cells and control the model output. The function expression is as follows:

[0037] ο t =σ(W ο [h t-1 ,x t ]+b ο (4)

[0038] h t =ο t tanh(C t (5)

[0039] In the formula: ο t For output gate parameters; W οb represents the output gate weights; ο h is the bias matrix of the output gate; t This represents the current hidden layer state.

[0040] Finally, the forget gate selects the information to be forgotten and retained at time t-1, with the output value ranging from 0 to 1. The function expression is as follows:

[0041] f t =σ(W f [h t-1 ,x t ]+b f (6)

[0042] In the formula: W f Forget gate weights; b f Let be the bias matrix of the forget gate.

[0043] The LSTM layer passes information through time steps and eventually outputs the hidden state h at each time step. t For classification tasks, the hidden state at the last time step is typically used as the model's output feature because it contains contextual information for the entire sequence. After computation in the LSTM layer, a linear fully connected layer is used for energy flow convergence (binary classification) to transform the hidden information output of the LSTM layer into class predictions. The hidden state ht output by the LSTM is used as the input to the fully connected layer for classification, mapping ht to the class space. For the convergence task (0 or 1), the following linear transformation is used:

[0044] z = W fc ·h T +b fc

[0045] Among them, W fc These are the weights of the fully connected layer, b fc It is a bias term, h T This is the last hidden state of the LSTM. The sigmoid function is used as the activation function to map the model's output z to probability values ​​between [0,1].

[0046]

[0047] in, This represents the probability of the classification result (the probability of belonging to category 1). During the training of the LSTM classification model, the binary cross-entropy loss is used as the loss function to measure the difference between the model's output probability and the actual label. Given the true label y∈0,1, the cross-entropy loss is calculated as follows:

[0048]

[0049] The goal of the model is to minimize this loss function, thereby making The model aims to approximate the true label y as closely as possible. By using the LSTM convergence model, it can be determined whether the energy flow distribution of the integrated energy system to be predicted has convergent real solutions. If it converges, the next step of energy flow prediction can be performed.

[0050] Step C. Construct a comprehensive energy system energy flow prediction model based on graph convolutional neural networks and multi-task learning.

[0051] Prediction process as follows Figure 2 As shown, the specific steps are as follows:

[0052] First, the node feature and edge feature sets are normalized separately. Normalizing the node and edge features can accelerate the training of the neural network. The normalization calculation formula is as follows:

[0053]

[0054] Where, x i x is the raw data in the input features. i ′ represents the normalized data, μ i σ is the average value. i Let be the standard deviation and m be the minimum value. The goal of energy flow forecasting is to predict the energy flow (electricity, heat, natural gas, etc.) at each node in a comprehensive energy system. This process involves spatiotemporal forecasting problems, therefore it is necessary not only to consider the instantaneous state of each node in the system, but also to capture the time-dimensional dependencies.

[0055] The prediction model is a GNN (Graph Neural Network), and its framework and process are as follows:

[0056] 1. Graph Representation Construction: First, the graph data is represented as a set of nodes and edges. Each node v∈V will have a feature vector x. v This represents the state information of the node. Each edge e∈E will have a feature vector x. e This represents the transmission characteristics between nodes (such as transmission loss, transmission capacity, etc.). Since energy flow prediction is typically a time series problem, the characteristics of nodes and edges will change over time. Therefore, the characteristics of each node and edge can be represented as a time series x. v (t) and x e (t), where t represents the time step.

[0057] 2. Graph Convolutional Network (GCN): GCN is a neural network based on convolution operations. It shares parameters among the neighbors of a node and updates the node representation by aggregating the features of neighboring nodes. The formula for graph convolution is as follows:

[0058]

[0059] in, Let N(v) be the representation of node v at level l. N(v) is the set of neighboring nodes of node v. vu W is the normalization constant between node v and its neighbor u. (l) b is the weight matrix of the l-th layer. (l) σ is the bias term, and σ is the activation function.

[0060] 3. Temporal Convolutional Layer: To capture temporal dependencies, a temporal convolutional layer can be introduced on top of the GNN to process the time-series features of each node. The formula for the temporal convolutional layer is as follows:

[0061] hv (l) (t)=σ(∑k=0 K-1 W (l) ·x v (tk)+b (l) )

[0062] Where: x v (tk) represents the feature of node v at time step tk. K is the size of the convolution kernel, which controls the length of the time window and is defined as 16.

[0063] 4. Graph Attention Mechanism: The self-attention mechanism can dynamically adjust the relationships between nodes, allowing each node to selectively focus on different neighboring nodes and better understand and simulate the local structure of the graph during information transmission.

[0064] An attention mechanism is incorporated into the information aggregation process of a graph convolutional neural network (GNN), enabling nodes to not only aggregate information from their neighbors but also adjust weights based on the "importance" of those neighbors. Weighted aggregation is performed by calculating the attention coefficients between nodes and their neighbors, and the updated node features are then transformed using a non-linear transformation (ReLU activation function) to obtain a new node representation. Finally, multiple graph attention layers are stacked to enhance the representational power of nodes, similar to the stacking of layers in traditional GNNs.

[0065] To weight neighboring nodes, we first need to calculate the attention coefficient between nodes. For node v and its neighbor u, we calculate the attention coefficient α between them. vu The formula is as follows:

[0066]

[0067] Where: h v and h uis the feature representation of nodes v and u. W is the learned weight matrix used to linearly transform the node features. a is the weight vector used to calculate the attention coefficients. | denotes the vector concatenation operation. LeakyReLU is an activation function with a negative slope, used to enhance the model's response to smaller inputs. The normalization operation exponentially normalizes the attention coefficients of all neighboring nodes and the target node to ensure that the sum of all weights is 1.

[0068] Based on the calculated attention coefficient α vu Node v will perform weighted aggregation based on the information of its neighboring nodes. The formula is as follows:

[0069]

[0070] in: It is the representation of node v at level l. This is the representation of neighbor node u at level l-1. α vu It is the attention weight of neighbor node u to node v.

[0071] To enhance the model's expressive power, the single-head attention mechanism is improved to a multi-head attention mechanism. That is, multiple independent attention heads are used, and the outputs of each head are concatenated or averaged. The aim is to allow the model to understand the relationships between nodes from multiple different perspectives, and to understand the coupling relationships between different energy nodes in the integrated energy system from different perspectives. The formula for the multi-head attention mechanism is as follows:

[0072]

[0073] Where: K is the number of attention heads. W is the attention coefficient of the i-th attention head. (i) It is the weight matrix of the (i)th attention head. | indicates that the outputs of all heads are concatenated.

[0074] The output of each layer can be transformed using a non-linear activation function, specifically LeakyReLU. After attention aggregation and weighting, the output can be linearly transformed or dimensionality reduced to obtain new node features. Global average pooling is used to achieve a global representation of the graph. The calculation formula is:

[0075]

[0076] Where |V| is the number of nodes in the graph, h G It is a representation of a graph.

[0077] After obtaining the global representation of the graph, the high-dimensional graph representation is linearly transformed into a lower-dimensional vector space to reduce computational resource consumption. The calculation formula is as follows:

[0078]

[0079] Among them W out It is a weight matrix with reduced dimensionality.

[0080] 5. Physics-Driven Loss Function: The graph neural network-based energy flow prediction model models the mapping relationship between system state information and energy flow prediction results. However, using only this structure cannot guarantee that the prediction results well satisfy physical constraints such as node power balance in the system, which is a major drawback of existing data-driven models. To improve this shortcoming in the training process of existing data-driven models, we borrow the concept of a physical constraint loss function from physical information neural networks, dividing the loss function in the graph neural network training process into a data loss function and a physical loss function. The data loss function uses mean squared error:

[0081]

[0082] N is the number of nodes, T is the number of time steps, and y v (t) represents the actual energy flow value.

[0083] Taking a power subsystem as an example, the physical constraint loss function uses nodal power balance as the physical loss function. The specific physical loss function is constructed as follows:

[0084] L=(1-α)L MSE +α(L physic_p +L physic_q )

[0085]

[0086]

[0087] In the formula: L physic_pj and L physic_qi These represent the degree to which the active and reactive power at node i violates the nodal power balance equation in the model prediction results, respectively, with α representing the regularization weight. After rearranging and squaring the nodal power balance equation represented by the above formula, we can obtain L. physic_pj and L physic_qi The calculation formula is as follows:

[0088]

[0089]

[0090] The above formula contains the topology information of the power system nodes, and it is used as a regularization term to characterize the connection relationship between the nodes in the power system.

[0091] 6. Forecasting: Energy flow forecasting tasks are divided into two categories based on the forecasting step size: single-step forecasting and multi-step forecasting. Single-step forecasting is the simplest case, while multi-step forecasting is further divided into two types: direct multi-step forecasting based on fixed historical data and recursive multi-stage forecasting based on the latest forecast values. To perform multi-step rolling energy flow forecasting, two graph convolutional blocks are stacked, and multi-layer attributes are fused to capture the spatiotemporal patterns of the data. Then, an output module is built with one temporal convolutional layer and two fully connected layers to directly obtain the load forecasts for all nodes at future steps. The overall technical route for energy flow convergence and forecasting is as follows: Figure 3 As shown.

[0092] The above embodiments are for illustrative purposes only and are not intended to limit the scope of this invention. Those skilled in the art can make various changes and modifications without departing from the essence and scope of this invention. Therefore, all equivalent technical solutions also fall within the scope of this invention, and the patent protection scope of this invention should be defined by the claims. Content not described in detail in this specification is prior art known to those skilled in the art.

Claims

1. A rapid energy flow analysis method for integrated energy systems based on physical mechanism guidance and multi-head graph attention mechanism, characterized in that, Includes the following steps: The system constructs node feature sets and edge feature sets based on data collected from various sensors in the integrated energy system. In power system energy flow calculations, the input features for PQ nodes are injected active power P and reactive power Q; for PV nodes, they are injected active power P and voltage amplitude V; and for slack nodes, they are voltage amplitude V and phase angle θ. In natural gas system energy flow analysis, the input features for pressure-flow nodes are injected flow rate and node pressure; for pressure-production nodes, they are node pressure and natural gas production; and for equilibrium nodes, they are node pressure and reference flow rate. In thermal system energy flow analysis, the input features for temperature-flow nodes are injected heat load and node temperature; for temperature-flow nodes, they are node temperature and flow rate; and for equilibrium nodes, they are node temperature and reference flow rate. All node features are merged into a node feature matrix. In power systems, conductivity and admittance are used as edge features; in natural gas systems, friction loss and heat loss are used; and in thermal systems, thermal conductivity, pressure loss, and heat loss coefficient are used. An edge feature matrix is ​​constructed accordingly. Graph features are extracted using graph neural networks and graph attention mechanisms to provide data preparation for the energy flow convergence model. An energy flow convergence model based on the LSTM algorithm is constructed. Energy flow calculations are performed at the overall levels of the power system, thermal system, natural gas system, and integrated energy system to determine whether the energy flow equation has real solutions and whether it converges. When constructing the LSTM convergence model, during the forward propagation of the graph neural network, a graph convolution operation is first performed on the input node feature matrix H. Combined with the adjacency matrix A and the edge feature matrix L, the attention weight coefficient 'a' between nodes is calculated through a graph attention mechanism. ij a ij The attention weights between nodes i and j are used to form a graph representation and extract graph-level features; Global feature vector g∈R extracted by graph neural network d As input to the subsequent discriminative model LSTM, further graph-level energy flow determination is performed. On graph-based time series data, LSTM is used for binary classification to determine whether convergence has occurred. Improve the training process of graph neural networks by utilizing multi-head graph attention mechanisms; Establish physical loss functions for power systems, natural gas systems, and heating systems to guide the training process of graph neural networks; The learning of graph neural networks is guided by a physical loss function based on physical information neural networks, which makes the learning process of graph neural networks more consistent with the constraints of actual physical equations. Drawing inspiration from the concept of physical constraint loss function in physical information neural networks, the loss function in the training process of graph neural networks is divided into data loss function and physical loss function. The data loss function uses mean squared error. , N is the number of nodes, and T is the prediction time step. This represents the actual energy flow value; The power subsystem uses nodal power balance as the physical loss function, and the specific physical loss function is constructed as follows: , In the formula: L physic_pj and L physic_qi These represent the degree to which the active and reactive power of node i violates the nodal power balance equation in the model prediction results. Indicates the regularization weight; Construct a rapid energy flow analysis method for integrated energy systems based on graph neural networks.

2. The rapid energy flow analysis method for integrated energy systems as described in claim 1, characterized in that, A fast energy flow analysis method for energy systems is constructed by employing a multi-graph attention mechanism and physical guidance to train graph neural networks.

3. The rapid energy flow analysis method for integrated energy systems as described in claim 1, characterized in that, The attention mechanism used is a multi-graph attention mechanism improved from graph attention mechanism; To enhance the model's expressive power, the single-head attention mechanism is improved to a multi-head attention mechanism, using multiple independent attention heads and concatenating or averaging the outputs of each head. This aims to enable the model to understand the relationships between nodes from multiple different perspectives, and to understand the coupling relationships between different energy nodes in the integrated energy system from various viewpoints. The formula for the multi-head attention mechanism is as follows: , Where: K is the number of attention heads. It is the attention coefficient of the i-th attention head. It is the weight matrix of the i-th attention head, and | indicates that the outputs of all heads are concatenated.

4. The rapid energy flow analysis method for integrated energy systems as described in claim 1, characterized in that, Physical constraints in practical integrated energy systems are considered and incorporated into the training process of graph neural networks in the form of loss functions, thereby enabling graph neural networks to better fit physical equations.

5. The rapid energy flow analysis method for integrated energy systems as described in claim 1, characterized in that, The proposed rapid energy flow analysis method for integrated energy systems is based on historical data of integrated energy systems. It is a data-driven machine learning method that can significantly improve computational efficiency while taking into account the physical constraint equations of the system.

6. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Heterogeneous graph neural network-based discipline and inspection clue multi-label classification method

    CN114722192A

  • Multi-graph representation learning method based on attention mechanism fusion

    CN116415038A