CN-121981318-A - Micro-grid source load prediction matching method based on graph neural network and attention mechanism
Abstract
The invention relates to the technical field of micro-grids, in particular to a micro-grid source load prediction matching method based on a graph neural network and an attention mechanism. The method comprises the steps of obtaining multidimensional data of a micro-grid, constructing an abnormal graph based on the multidimensional data, extracting space graph convolution characteristics and time sequence characteristics based on the abnormal graph, obtaining unified space-time characteristics through space-time graph attention network fusion, constructing a hierarchical attention network, outputting space-time characteristics after each node is enhanced, respectively predicting an available power output sequence, a power demand sequence and a cost matrix through three decoders, calculating an optimal matching matrix with minimum total transmission cost, converting the optimal matching matrix into a device control instruction, and sending the device control instruction to a device controller, and taking an execution result and the latest state of the grid as new multidimensional data. The invention realizes high-precision matching prediction and generates a real-time and optimal control strategy, thereby remarkably improving the running economy and safety of the micro-grid and the capacity of absorbing new energy.
Inventors
- ZHANG YAN
- HE SIFAN
- WU QIAN
- WU QIANGJUN
- YANG HONGYUN
- TAO PENG
- YANG PINGJIE
- LIU ZUOLIAN
Assignees
- 中曜达数能生态科技(浙江)有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251222
Claims (5)
- 1. The utility model provides a little electric wire netting source lotus prediction matching method based on picture neural network and attention mechanism, its characterized in that, little electric wire netting source lotus prediction matching method based on picture neural network and attention mechanism includes: acquiring multi-dimensional data of a micro-grid, and constructing an abnormal pattern at each moment based on the multi-dimensional data; Extracting space map convolution features and time sequence features based on the heterogeneous map of each moment, and fusing the space map convolution features and the time sequence features through a space map attention network to obtain unified space-time features of each moment; constructing a hierarchical attention network, and outputting the enhanced space-time characteristics of each node based on the unified space-time characteristic sequence of each node in a historical time window by combining the graph topology and the node characteristics of the heterogram; Based on the enhanced space-time characteristics, respectively predicting an available power output sequence, a power demand sequence and a cost matrix through three decoders; Calculating an optimal matching matrix with minimum total transmission cost based on the available power output sequence, the power demand sequence and the cost matrix; And converting the optimal matching matrix into a device control instruction, simulating the device control instruction, then sending the device control instruction to a device controller, collecting an execution result and a power grid latest state after the instruction is executed, and taking the execution result and the power grid latest state as new multidimensional data.
- 2. The method for matching source load prediction of a micro-grid based on a graph neural network and an attention mechanism according to claim 1, wherein the method for extracting space graph convolution features and time sequence features based on heterogeneous graphs at each moment, fusing the space graph convolution features and the time sequence features through a space graph attention network to obtain unified space-time features at each moment comprises the following steps: Extracting the space map convolution characteristics by using a multi-layer map convolution neural network; Node for outputting final one-layer graph convolution neural network at each moment For each moment node, a weighted sum of all neighbor features of (a) Is a spatial map convolution feature of (1); The space diagram convolution characteristic of each node at each moment is input into a gating circulation unit of each node, and the time sequence characteristic of each node at each moment is output; And calculating a correlation score between the convolution characteristic and the time sequence characteristic of the space diagram, and carrying out weighted summation to generate a unified space-time characteristic of each moment.
- 3. The method for matching microgrid source load prediction based on a graph neural network and an attention mechanism according to claim 1, wherein the hierarchical attention network comprises a device-level attention layer, a regional-level attention layer and a full-network-level attention layer; inputting the unified space-time characteristics of each node in the historical time window into a device-level attention layer, calculating the attention weight of each time step, and carrying out weighted aggregation on the unified space-time characteristic sequence based on the attention weight of each time step to obtain a device-level time enhancement characteristic; based on the weighted adjacent matrix, the initial node characteristic and the space diagram convolution characteristic in the iso-composition, obtaining inter-region characteristic representation by using the region-level attention layer; The unified space-time characteristics of all nodes are aggregated to obtain global context vectors, attention scores between the global context vectors and the unified space-time characteristics of each node are calculated, a global attention weight is distributed to each node based on the attention scores, and the unified space-time characteristics of each node are weighted and aggregated based on the global attention weights to obtain a full-network-level characteristic representation; And (3) carrying out multi-scale feature alignment on the equipment-level time enhancement features, the inter-region feature representations and the full-network-level feature representations, inputting the multi-scale feature alignment into a feature fusion layer after splicing, calculating fusion weights of the feature representations, carrying out weighted fusion, and outputting the enhanced space-time features.
- 4. The method for matching source load prediction of a micro-grid based on a graph neural network and an attention mechanism according to claim 3, wherein the obtaining the inter-region feature representation by using the region-level attention layer based on the weighted adjacency matrix, the initial node feature and the space graph convolution feature in the iso-graph comprises the following steps: dividing the micro-grid into a plurality of areas based on the weighted adjacent matrix, the initial node characteristic and the space diagram convolution characteristic in the heterogram; Carrying out maximum pooling on the unified space-time characteristics of all nodes in the region to obtain a region overview vector, carrying out dot product similarity calculation on the region overview vector and the unified space-time characteristics of each node in the region, carrying out normalization through a Softmax function to obtain attention weights, and carrying out weighted summation on the unified space-time characteristics of all nodes in the region based on the attention weights to obtain a region-level weighted characteristic representation; and constructing a region graph based on the region-level weighted feature representation of the target region and the region-level weighted feature representations of all other regions, calculating the attention weights between the target region and all other regions, and obtaining the inter-region feature representation according to the attention weights between the regions.
- 5. The method for matching source load prediction of a micro-grid based on a graph neural network and an attention mechanism according to claim 1, wherein the calculating the optimal matching matrix with minimum total transmission cost based on the available power output sequence, the power demand sequence and the cost matrix comprises: and inputting the available power output sequence, the power demand sequence and the cost matrix into a Sinkhorn algorithm layer, and calculating an optimal matching matrix with minimum total transmission cost.
Description
Micro-grid source load prediction matching method based on graph neural network and attention mechanism Technical Field The invention relates to the technical field of micro-grids, in particular to a micro-grid source load prediction matching method based on a graph neural network and an attention mechanism. Background At present, the source load matching prediction control of the micro-grid mainly adopts the following technical schemes: According to the scheme one, a predictive control method based on a time sequence is that a traditional method adopts a time sequence predictive model such as ARIMA, LSTM and the like to respectively predict source side power and load side requirements, and then source load matching is carried out through an optimization algorithm. For example, patent CN108964103a discloses a micro-grid load prediction method based on LSTM neural network, which implements short-term load prediction by training LSTM model with historical load data. In the second scheme, a Model Predictive Control (MPC) framework is adopted in the prior art, a state space model of a micro-grid is established, and source load matching control is realized through rolling optimization. Patent CN109921458a describes a micro-grid multi-time scale coordinated optimization scheduling method, which adopts a hierarchical optimization strategy to deal with scheduling problems of different time scales. The prior art has the following defects: 1. The prediction model fails to fully utilize topology information, and the traditional prediction method is mostly based on time sequence models (such as ARIMA, LSTM and the like) which predict each device in the micro-grid as an independent time sequence, so that an electric topology structure and a mutual coupling relation formed by physical lines between the devices are completely ignored. This results in a dramatic decrease in prediction accuracy when network structure changes (e.g., line repairs, island operation mode switching) occur. 2. The machine learning method is difficult to process non-Euclidean data, and a standard machine learning or deep learning model mainly processes Euclidean space data, can not directly model natural and complex graph structure data of a micro-grid, and limits the capability of the model to learn complex tide patterns and dynamic characteristics from the overall view of the network. 3. The dynamic adaptability is poor, namely when the micro-grid topology changes (such as equipment switching and line reconstruction), the existing prediction model needs to be retrained, the adaptability is poor, and online learning and dynamic adjustment cannot be realized. 4. The global optimization capability is insufficient, the existing method mostly adopts a local optimization strategy, the global optimality is guaranteed, the local optimal solution is easily trapped under the complex constraint condition, and the economical efficiency and the reliability of the system are to be improved. 5. The real-time requirement is difficult to meet, the traditional optimization algorithm has high computational complexity, the micro-grid millisecond control response requirement is difficult to meet, and the control delay is usually more than a second. Disclosure of Invention The invention aims to solve the problems in the prior art and provides a micro-grid source load prediction matching method based on a graph neural network and an attention mechanism. According to the invention, the dynamic topological structure of the micro-grid and the time-varying characteristics of the equipment can be uniformly modeled, the complex coupling relation between the source charges is deeply excavated through the time-space diagram attention network, the high-precision matching prediction is realized, and the real-time and optimal control strategy is generated, so that the running economy, the safety and the new energy consumption capability of the micro-grid are obviously improved. In order to achieve the above purpose, the technical scheme provided by the invention is as follows: A microgrid source load prediction matching method based on a graph neural network and an attention mechanism comprises the following steps: acquiring multi-dimensional data of a micro-grid, and constructing an abnormal pattern at each moment based on the multi-dimensional data; Extracting space map convolution features and time sequence features based on the heterogeneous map of each moment, and fusing the space map convolution features and the time sequence features through a space map attention network to obtain unified space-time features of each moment; constructing a hierarchical attention network, and outputting the enhanced space-time characteristics of each node based on the unified space-time characteristic sequence of each node in a historical time window by combining the graph topology and the node characteristics of the heterogram; Based on the enhanced space-time characteristics, respectively