Wind and light complementarity method and system based on graph convolutional neural network
Through graph convolutional neural network, the dependence relationship between wind energy and solar energy data is captured, and the proportion of installed capacity of wind power photovoltaics is optimized, which solves the problem of insufficient data processing and adaptability in the existing technology, and achieves more efficient research on wind and light complementarity.
Patent Information
- Application Number
- CN202411032498.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-12-31
AI Technical Summary
Existing research methods for complementarity of the landscape is difficult to effectively capture the complex dependence between wind and solar data, and it is difficult to extract and aggregate useful information when processing large-scale spatiotemporal data, and lack of flexibility and adaptability, resulting in unstable energy supply.
Using a graph convolution neural network method, a graph relationship matrix is constructed by acquiring wind and solar data, and a global self-attention and blocked self-attention mechanism captures the dependence between data, combining sentence encoder and graph convolution The network extracts the characteristic vectors of wind and solar energy, performs uniform pooling and linear transformation, and optimizes the installed capacity ratio of wind power photovoltaics.
It improves the comprehensive utilization efficiency of wind and solar energy resources, achieves higher accuracy and coverage, adapts to different regions and climatic conditions, and improves the accuracy of feature representation and data utilization efficiency.
Smart Images

Figure CN119227852A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of renewable energy technology, and in particular to a wind-solar complementarity method and system based on a graph convolutional neural network. Background Art
[0002] With the continuous growth of global energy demand and the increasing awareness of environmental protection, the development of renewable energy technology has received widespread attention and attention. As two major forms of renewable energy, wind energy and solar energy are clean, sustainable and widely distributed. However, the spatiotemporal distribution of wind energy and solar energy is highly uncertain and volatile, and relying solely on a certain form of energy may lead to unstable energy supply. Traditional wind-solar complementarity research methods mainly rely on historical meteorological data and empirical formulas. Although they can optimize the installed capacity ratio of wind power and photovoltaics to a certain extent, they are often difficult to achieve ideal optimization effects due to the lack of in-depth mining of the complex spatiotemporal relationship of data. In recent years, with the development of big data technology and deep learning technology, more and more studies have begun to try to improve the optimization effect of wind-solar complementarity through more intelligent and accurate algorithms.
[0003] The existing methods for studying wind-solar complementarity mainly have the following deficiencies. First, traditional methods often ignore the complex dependencies between wind and solar data, resulting in insufficient accuracy and stability of the optimization results. Second, when processing large-scale spatiotemporal data, existing methods often find it difficult to effectively extract and aggregate useful information, resulting in low data utilization efficiency. In addition, the current methods lack flexibility and adaptability when dealing with different regions and environmental conditions, and are difficult to dynamically adjust according to actual conditions. In contrast, the present invention effectively captures the spatiotemporal dependencies between wind and solar data by introducing a graph convolutional neural network (GCN) and a self-attention mechanism, thereby optimizing the proportion of wind power and photovoltaic installed capacity. Specifically, the present invention obtains wind data and solar data and forms sentences; constructs a graph relationship matrix based on the sentence introduction of an attention mechanism, and obtains an initial feature matrix and a relationship matrix through a sentence encoder; performs convolution aggregation on the initial feature matrix and the relationship matrix to obtain a final feature representation matrix; extracts wind energy word vectors and solar energy word vectors from the final feature representation matrix, performs uniform pooling and linear transformation, and obtains the optimal optimized wind power and photovoltaic installed capacity ratio.
[0004] Existing wind-solar complementarity technologies have many problems in processing data dependencies, data utilization efficiency, and dynamic adaptability. The present invention proposes a wind-solar complementarity method and system based on graph convolutional neural networks. By introducing advanced deep learning technology, the above problems in the prior art are effectively solved, and the comprehensive utilization efficiency of wind and solar energy resources is improved. The present invention belongs to the field of renewable energy technology, and aims to optimize the installed capacity ratio of wind power and photovoltaics through intelligent and precise algorithms, thereby maximizing energy utilization. Summary of the invention
[0005] In view of the above-mentioned problems, the present invention is proposed.
[0006] Therefore, the technical problems solved by the present invention are: solving the problem of capturing and processing the complex dependencies between wind energy and solar energy data, and solving the problem of effectively extracting and aggregating large-scale spatiotemporal data.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions: a wind-solar complementarity method based on graph convolutional neural network, comprising:
[0008] Get wind energy data and solar energy data and form sentences;
[0009] Based on the sentence, the attention mechanism is introduced to build the graph relationship matrix, and the initial feature matrix and relationship matrix are obtained through the sentence encoder;
[0010] The initial feature matrix and the relationship matrix are convolved and aggregated to obtain the final feature representation matrix;
[0011] The wind energy word vector and solar energy word vector are extracted from the final feature representation matrix respectively, and uniform pooling and linear transformation are performed to obtain the optimal optimized wind power and photovoltaic installed capacity ratio.
[0012] As a preferred solution of the wind-solar complementarity method based on graph convolutional neural network described in the present invention, the wind energy data includes wind speed data of 100m in the area, wind direction data, average wind power density, effective wind speed hours and air pressure;
[0013] Solar energy data includes sunshine hours, sunshine intensity data, solar radiation data and temperature data;
[0014] Get wind and solar data via ERA5.
[0015] As a preferred solution of the wind-solar complementarity method based on graph convolutional neural network described in the present invention, wherein: constructing a graph relationship matrix based on sentence-based attention mechanism includes: a global self-attention mechanism module calculates the global dependency between data items in the sentence, but the meteorological data does not exist independently, but is interconnected;
[0016] If we only focus on global dependencies, the attention score assessment of wind and solar energy on their own capabilities will lose accuracy. Therefore, the block self-attention mechanism is introduced again to enhance the accurate attention score assessment of wind and solar energy.
[0017] As a preferred solution of the wind-solar complementarity method based on graph convolutional neural network described in the present invention, wherein: the global self-attention mechanism module calculates the global dependency relationship between each data item in sentence X to obtain a global attention score matrix;
[0018] Sentence X is represented as:
[0019] X={v,θ,P w ,T v ,p,T s ,I s ,R s ,T}
[0020] Among them, v represents wind speed data, θ represents wind direction data, P w represents the average wind power density, T v represents effective wind speed hours, p represents air pressure data, T s Indicates the number of sunshine hours, I s Represents the sunshine intensity data, R s represents solar radiation data, T represents temperature data;
[0021] Calculate the query, key, and value matrices, the formula is expressed as:
[0022] Q=XW Q
[0023] K=XW K
[0024] V=XW V
[0025] Among them, W Q Represents the query weight matrix, W K represents the key weight matrix, W V A weight matrix representing the values;
[0026] Calculate the complementary attention score, the formula is expressed as:
[0027] For each node’s query vector q i , calculate the similarity score between it and the key vectors of other nodes, and get the complementary score matrix, which is expressed as:
[0028] E ij =q i ·k j =(xi W Q )·(x j W K )
[0029] Divide the score by Normalize
[0030]
[0031] Among them, d k is the dimension of the key vector, q i represents the query vector, k j represents the key vector, E ij represents the element (i, j) in the complementarity score matrix, x i and x j : represents the i-th and j-th data items in the input data,
[0032] Calculate the attention weight, the formula is expressed as:
[0033] The score matrix E is converted into an attention weight matrix through the softmax function. The formula is expressed as:
[0034]
[0035]
[0036] Among them, A ij Represents the element (i, j) in the attention weight matrix, i.e., the query vector q i With the key vector k j The normalized similarity weight of global represents the global attention weight matrix, Q represents the query matrix, and K represents the key matrix.
[0037] As a preferred solution of the wind-solar complementarity method based on graph convolutional neural network described in the present invention, wherein: the block attention matrix includes dividing the input sentence X into two blocks with a length of l;
[0038] Calculate self-attention within each block to obtain a new representation within the block;
[0039] For each block X k , calculate the query, key and value matrix within the block, the formula is expressed as:
[0040] Q k =X k W Q
[0041] K k =X k W K
[0042] V k =X k W V
[0043] Calculate the attention score within the block, the formula is expressed as:
[0044]
[0045] A k =softmax(E k )
[0046] Calculate the combination block matrix, the formula is expressed as:
[0047]
[0048] Among them, X k represents the data of the kth block, Q k represents the query matrix of the kth block, X k represents the data of the kth block, W Q represents the weight matrix used to generate the query vector, K k represents the key matrix of the kth block, X k represents the data of the kth block, W K represents the weight matrix used to generate the key vector, V k represents the value matrix of the kth block, X k represents the data of the kth block, W V represents the weight matrix used to generate the value vector, E k represents the attention score matrix of the kth block, Q k represents the query matrix of the kth block, represents the transpose of the key matrix of the kth block, d k Indicates the dimension of the key vector.
[0049] As a preferred solution of the wind-solar complementarity method based on graph convolutional neural network described in the present invention, the construction of the graph relationship matrix includes introducing the attention mechanism to extract features of wind-solar energy data, aggregating the obtained global self-attention matrix and block self-attention matrix to obtain a fusion attention score, and constructing the graph relationship matrix. The formula is expressed as follows:
[0050] A combined =aA global +(1-a)A local
[0051] G=A combined
[0052] Among them, A combinedrepresents the combined attention weight matrix, a represents a weight coefficient, A global represents the global attention weight matrix, (1-a) represents the complement weight corresponding to the weight coefficient a, A local represents the local attention weight matrix, and G represents the graph relationship matrix.
[0053] As a preferred solution of the wind-solar complementarity method based on graph convolutional neural network described in the present invention, the final feature representation matrix includes: passing sentence X through a sentence encoder to obtain an initial feature matrix E0 and performing feature aggregation with the graph relationship matrix G using a graph convolutional network, and the formula is expressed as:
[0054] E0=Encoder(X)
[0055] H (l+1) =σ(GH (l) W (l) +b (l) )
[0056] Among them, H (l) represents the node feature matrix of the lth layer, W (l) and b (l) They represent the weight matrix and bias vector of the lth layer respectively, and σ represents the activation function;
[0057] After obtaining the final matrix H after convolution aggregation, the wind energy word vector and solar energy word vector are extracted and uniformly pooled and linearly transformed to obtain the optimal wind power and photovoltaic installed capacity ratio, which is expressed as follows:
[0058] V w =WV s +b
[0059] Among them, V w represents the wind energy feature vector extracted after uniform pooling, V s represents the solar energy feature vector extracted after uniform pooling, W represents the optimal wind power and photovoltaic installed capacity ratio under the current wind power and solar energy data environment, and b represents the offset.
[0060] A wind-solar complementarity system based on graph convolutional neural network, wherein:
[0061] Data acquisition module, which acquires wind energy data and solar energy data;
[0062] The data processing module combines the acquired wind and solar data into sentences and introduces an attention mechanism to capture the dependencies between wind and solar data;
[0063] The feature extraction and aggregation module uses the sentence encoder to encode the constructed sentences, generates an initial feature matrix, and performs convolution aggregation with the graph relationship matrix to obtain the final feature representation matrix;
[0064] The optimization calculation module processes the final feature representation matrix after convolution aggregation, extracts wind energy word vectors and solar energy word vectors respectively, and calculates the optimal wind power and photovoltaic installed capacity ratio through uniform pooling and linear transformation.
[0065] A computer device comprises: a memory and a processor; the memory stores a computer program, wherein the processor implements the steps of any one of the methods of the present invention when executing the computer program.
[0066] A computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of any one of the methods of the present invention.
[0067] Beneficial effects of the present invention: A wind-solar complementarity method based on graph convolutional neural network provided by the present invention is based on the high spatiotemporal resolution data of ERA5, has high accuracy and coverage, and can adapt to wind-solar complementarity research in different regions and climatic conditions. The 100m high-altitude data is selected so that it can flexibly adapt to the data requirements of different altitudes and environmental conditions, and provide reliable data support for diversified wind-solar complementarity research. Based on the graph convolutional neural network, non-Euclidean data can be effectively processed. By constructing a graph relationship matrix and convolution aggregation, the potential relationship between wind and solar energy data can be fully explored, thereby improving the accuracy of feature representation and data utilization efficiency. By introducing a global self-attention mechanism and a block self-attention mechanism, this method can capture the complex dependencies between wind and solar energy data. The global self-attention mechanism can identify the global dependencies between different meteorological data, while the block self-attention mechanism enhances the accuracy of the data, making the wind and solar energy feature extraction more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0069] Figure 1 An overall flow chart of a wind-solar complementarity method based on a graph convolutional neural network provided in the first embodiment of the present invention;
[0070] Figure 2An overall structural diagram of a network model of a wind-solar complementarity method based on a graph convolutional neural network provided in the first embodiment of the present invention;
[0071] Figure 3 Wind speed data of a wind-solar complementarity method based on a graph convolutional neural network provided in the second embodiment of the present invention;
[0072] Figure 4 Wind direction data of a wind-solar complementarity method based on a graph convolutional neural network provided in the second embodiment of the present invention;
[0073] Figure 5 Average wind power density data of a wind-solar complementarity method based on a graph convolutional neural network provided in the second embodiment of the present invention;
[0074] Figure 6 The effective wind speed hourly data of a wind-solar complementarity method based on a graph convolutional neural network provided in the second embodiment of the present invention;
[0075] Figure 7 Air pressure data of a wind-solar complementarity method based on a graph convolutional neural network provided in the second embodiment of the present invention;
[0076] Figure 8 The sunshine duration data of a wind-solar complementarity method based on a graph convolutional neural network provided in the second embodiment of the present invention;
[0077] Fig. 9 The sunshine intensity data of a wind-solar complementarity method based on a graph convolutional neural network provided in the second embodiment of the present invention;
[0078] Fig.10 Solar radiation data of a wind-solar complementarity method based on a graph convolutional neural network provided in the second embodiment of the present invention;
[0079] Fig.11 Temperature data of a wind-solar complementarity method based on a graph convolutional neural network provided in the second embodiment of the present invention. DETAILED DESCRIPTION
[0080] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0081] Example 1, reference Figure 1, as an embodiment of the present invention, provides a wind-solar complementarity method based on a graph convolutional neural network, comprising:
[0082] S1: Obtain wind energy data and solar energy data and form sentences.
[0083] Obtaining wind and solar energy data in the study area is a basic step of the present invention. In order to ensure the accuracy and representativeness of the data, the present invention uses the fifth generation of global atmospheric reanalysis data of ERA5. ERA5 data has high spatial and temporal resolution and provides long-term meteorological data, making it an ideal choice for studying wind-solar complementarity.
[0084] The spatial resolution of ERA5 data is 0.25°×0.25° (about 31km×31km), and the temporal resolution is 1 hour. This dataset covers meteorological information on a global scale and can better reflect the actual meteorological conditions obtained from actual observations. In order to better study the complementarity of wind energy and solar energy, data at an altitude of 100 meters were selected. This altitude can more accurately reflect the distribution of wind energy resources and take into account the actual installation height of wind turbines.
[0085] In terms of wind energy data, the present invention focuses on acquiring the following types of data:
[0086] Wind speed data (v): Wind speed is an important factor affecting wind power generation. Wind speed data is obtained through the ERA5 dataset, which can provide wind speed changes in different time periods and provide a basis for subsequent wind energy evaluation.
[0087] Wind direction data (θ): Wind direction data can help understand the directional distribution of wind energy and is of great significance for the layout and optimization of wind turbines.
[0088] Average wind power density (P w ): Wind power density is an important indicator to measure the richness of wind energy resources. It is calculated based on wind speed and air density and can reflect the amount of wind energy resources per unit area.
[0089] Effective wind speed hours (T v ): Effective wind speed hours refers to the cumulative time when the wind speed is within a certain range (usually between the cut-in wind speed and the cut-out wind speed of the wind turbine). This data can help evaluate the operating time and efficiency of the wind turbine.
[0090] Air pressure data (p): Air pressure affects the calculation of wind speed and wind power density. Obtaining air pressure data helps improve the accuracy of wind energy assessment.
[0091] In terms of solar energy data, the present invention obtains the following types of data:
[0092] Sunshine hours (Ts ): Sunshine hours refers to the total duration of sunlight exposure. This data is obtained through the ERA5 dataset and can reflect the distribution of solar energy resources in a day.
[0093] Sunshine intensity data (I s ): Sunshine intensity refers to the solar radiation power per unit area. This data can help evaluate the power generation capacity of solar panels.
[0094] Solar radiation data (R s ): Solar radiation data includes different types of radiation, such as global radiation, direct radiation and diffuse radiation. These data comprehensively reflect the overall situation of solar energy resources.
[0095] Temperature data (T): Temperature has a significant impact on the efficiency of solar panels. By obtaining temperature data, the performance of solar panels can be evaluated more accurately.
[0096] Obtaining high-quality wind and solar data lays a solid foundation for subsequent steps. By using the ERA5 dataset, we can ensure the accuracy and comprehensiveness of the data and provide reliable input for the subsequent graph convolutional neural network model.
[0097] S2: Based on the sentence, the attention mechanism is introduced to construct the graph relationship matrix, and the initial feature matrix and relationship matrix are obtained through the sentence encoder.
[0098] The acquired wind energy data and solar energy data are combined into sentence X, and an attention mechanism is introduced to capture the dependency between wind energy and solar energy data. The attention mechanism is divided into global self-attention mechanism and block self-attention mechanism.
[0099] First, the acquired wind and solar energy data are integrated to form a sentence X representing wind and solar energy data. The sentence X contains multiple data items such as wind speed, wind direction, average wind power density, effective wind speed hours, air pressure, sunshine hours, sunshine intensity, solar radiation and temperature. By integrating these data items, the spatiotemporal distribution characteristics of wind and solar energy in the study area can be fully reflected.
[0100] The representation of sentence X is:
[0101] X={v,θ,P w ,T v ,p,T s ,I s ,R s ,T}
[0102] Among them, v represents wind speed data, θ represents wind direction data, P w represents the average wind power density, T vrepresents effective wind speed hours, p represents air pressure data, T s Indicates the number of sunshine hours, I s Represents sunshine intensity data, R s represents solar radiation data, and T represents temperature data.
[0103] After constructing sentence X, in order to extract the intrinsic connection between wind and solar power complementarity, we introduce an attention mechanism to capture the dependency between wind and solar power data. The attention mechanism is divided into two modules: global self-attention mechanism and block self-attention mechanism.
[0104] The global self-attention mechanism is used to calculate the global dependencies between data items in sentence X, which is used to predict the volatility potential relationship between wind energy and solar energy.
[0105] Compute the query, key, and value matrices:
[0106] Q=XW Q K=XW K V=XW V
[0107] Among them, W Q Represents the query weight matrix, W K represents the key weight matrix, W V A weight matrix representing the values.
[0108] Compute complementary attention scores: For each node’s query vector q i (where i can be any one in sentence X), calculate its key vector k with other nodes j (where j is also any one of the sentences X) similarity scores, and we get the complementary score matrix E ij :
[0109] E ij =q i ·k j =(x i W Q )·(x j W K )
[0110] Divide the score by Normalized, where d k is the dimension of the key vector.
[0111]
[0112] Calculate the attention weight: E ij Transformed into attention weight matrix A through softmax function global :
[0113]
[0114]
[0115] Based on the global self-attention mechanism, we also introduce the block self-attention mechanism. When the global self-attention mechanism takes into account the global complementary relationship, it may ignore the energy intensity of wind and solar energy itself and the energy potential predicted by wind and solar energy data to a certain extent. The introduction of the block self-attention mechanism is to strengthen the surface feature relationship of this part of the data and improve the accurate attention score evaluation of wind and solar energy.
[0116] The specific steps are as follows:
[0117] Divide the input sentence X into two blocks of length l. The first block is wind energy data and the second block is solar energy data.
[0118] X={X1,X2}
[0119] Self-attention is calculated within each block to obtain a new representation within the block.
[0120] For each block X k , calculate the query (Q), key (K), and value (V) matrices within the block:
[0121] Q k =X k W Q ,K k =X k W K ,V k =X k W V
[0122] Calculate the intra-block attention score
[0123]
[0124] A k =softmax(E k )
[0125] Compute the combined block matrix
[0126]
[0127] The global self-attention matrix A global and the block self-attention matrix A locak Aggregate to get the fused attention score and construct the graph relationship matrix G:
[0128] A combined =aA global +(1-a)A local
[0129] Among them, X k represents the data of the kth block, Q k represents the query matrix of the kth block, X k represents the data of the kth block, W Q represents the weight matrix used to generate the query vector, K k represents the key matrix of the kth block, X k represents the data of the kth block, W K represents the weight matrix used to generate the key vector, V k represents the value matrix of the kth block, X k represents the data of the kth block, W V represents the weight matrix used to generate the value vector, E k represents the attention score matrix of the kth block, Q k represents the query matrix of the kth block, represents the transpose of the key matrix of the kth block, d k Indicates the dimension of the key vector.
[0130] The graph relationship matrix G is obtained by aggregating the global self-attention matrix and the block self-attention matrix, which represents the dependency relationship between wind energy and solar energy data.
[0131] G=A combined
[0132] Through the global self-attention mechanism and the block self-attention mechanism, we can capture the complex dependencies between wind and solar data. The global self-attention mechanism can identify the overall interdependence, while the block self-attention mechanism can handle local dependencies in more detail. Finally, the fused attention score matrix A combined A comprehensive dependency representation is provided to ensure the accuracy and robustness of the model.
[0133] S3: Convolutionally aggregate the initial feature matrix and the relationship matrix to obtain the final feature representation matrix.
[0134] We use the sentence encoder to encode the constructed sentence X, generate the initial feature matrix, and perform convolution aggregation with the graph relationship matrix G to obtain the final feature representation matrix. This process involves encoding and convolution operations in deep learning, which helps to further extract implicit features and relationships in the data.
[0135] The choice of sentence encoder is crucial to model performance. Common sentence encoders include Transformer, Long Short-Term Memory (LSTM), etc. In this paper, we choose Transformer as the sentence encoder, mainly because of its excellent performance in processing long sequence data and capturing global dependencies.
[0136] Input sentence X into the Transformer encoder to get the initial feature matrix E0
[0137] E0=Encoder(X)
[0138] Among them, Encoder represents the Transformer encoder, and E0 represents the encoded representation of sentence X.
[0139] Graph convolutional neural network is an effective graph neural network model that can perform convolution operations on graph structured data to extract the relationship features between nodes and their neighbors. The initial feature matrix E0 of sentence X is combined with the graph relationship matrix G, and convolution aggregation is performed through graph convolution.
[0140] In graph convolution, the convolution operation of each layer can be expressed as:
[0141] H (l+1) =σ(GH (l) W (l) +b (l) )
[0142] Among them, H (l) is the node feature matrix of the lth layer, W (l) and b (l) are the weight matrix and bias vector of the lth layer respectively, σ is the activation function, and ReLU (linear rectification function) is usually used.
[0143] The node feature matrix of the initial input layer is the encoding representation of sentence X:
[0144] H 0 =E0
[0145] By stacking multiple layers of graph convolution, the features of nodes and their neighboring nodes in sentence X are gradually extracted to obtain a richer feature representation. The output of each layer of graph convolution is used as the input of the next layer of graph convolution for feature aggregation.
[0146] The activation function plays a role in introducing nonlinear transformation in graph convolution, allowing the model to learn more complex feature representations. Common activation functions include ReLU, Sigmoid, and Tanh. In this method, we choose ReLU as the activation function, and its formula is as follows:
[0147] σ(x)=max(0,x)
[0148] The advantage of ReLU is that it can effectively alleviate the gradient vanishing problem and improve the training speed and performance of the model.
[0149] After convolution operations of multiple layers of graph convolution, we obtain the final feature representation matrix of sentence X. This matrix integrates the multi-level feature representation of wind and solar data, and fully reflects the global and local dependencies in the data. Through the combination of sentence encoder and graph convolution network, we perform in-depth feature extraction and aggregation of wind and solar data. The sentence encoder is responsible for the preliminary extraction of global features of the data, while the graph convolution network further captures the complex dependencies in the data. The final feature representation matrix provides high-quality input for the subsequent optimization of wind-solar complementarity.
[0150] S4: Extract wind energy word vectors and solar energy word vectors from the final feature representation matrix, perform uniform pooling and linear transformation, and obtain the optimal optimized wind power and photovoltaic installed capacity ratio.
[0151] We use the final feature representation matrix after convolution aggregation to extract the wind energy word vector and solar energy word vector respectively, and finally obtain the optimal wind power and photovoltaic installed capacity ratio through uniform pooling and linear transformation. This process involves multiple steps such as feature extraction, feature aggregation and optimization calculation.
[0152] The final feature representation matrix H after convolution aggregation contains the multi-level features of wind and solar data. We first extract the wind energy word vector and solar energy word vector from the matrix H respectively.
[0153] The wind energy word vector and solar energy word vector are obtained from the final feature representation matrix H agg Extract the vectors corresponding to the features to form the wind energy word vector matrix H w , solar energy word vector matrix H s .
[0154] H w ={H v ,H θ ,H Pw ,H Tv ,H p}
[0155] H s ={H Ts ,H Is ,H Rs ,H T}
[0156] Uniform pooling is a feature aggregation method that averages each feature vector in the feature matrix to obtain a more representative vector. wEach vector in is uniformly pooled to obtain the wind energy feature vector V w , for H s Each vector in is uniformly pooled to obtain the wind energy feature vector V s .
[0157] V w =AveragePooling(H w )
[0158] V s =AveragePooling(H s )
[0159] The linear transformation adjusts the representation of the eigenvector through matrix multiplication and addition to make it more suitable for subsequent optimization calculations. In this step, we adjust the wind energy eigenvector V w and the solar eigenvector V s Perform linear transformation and calculate the curvature W of wind energy and solar energy.
[0160] V w =WV s +b
[0161] Among them, W is the optimal wind power and photovoltaic installed capacity ratio under the current wind and solar energy data environment.
[0162] On the other hand, this embodiment also provides a wind-solar complementarity system based on a graph convolutional neural network, which includes:
[0163] The data acquisition module acquires wind energy data and solar energy data.
[0164] The data processing module combines the acquired wind and solar energy data into sentences and introduces an attention mechanism to capture the dependencies between wind and solar energy data.
[0165] The feature extraction and aggregation module uses the sentence encoder to encode the constructed sentences, generates an initial feature matrix, and performs convolution aggregation with the graph relationship matrix to obtain the final feature representation matrix.
[0166] The optimization calculation module processes the final feature representation matrix after convolution aggregation, extracts wind energy word vectors and solar energy word vectors respectively, and calculates the optimal wind power and photovoltaic installed capacity ratio through uniform pooling and linear transformation.
[0167] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0168] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0169] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0170] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0171] Example 2
[0172] The data acquisition module is used to obtain wind and solar energy data in a certain area, including wind speed, wind direction, average wind power density, effective wind speed hours, air pressure, sunshine hours, sunshine intensity, solar radiation, temperature, etc. These data are based on the fifth-generation global atmospheric reanalysis data of ERA5, with high spatial resolution (0.25°×0.25°) and high temporal resolution (1 hour), and 100-meter high-altitude data are selected for research.
[0173] Select the meteorological data of the area for 10 consecutive days and perform bilinear interpolation to obtain the wind speed and hourly wind speed value in m / s. Figure 4 As shown in the figure; wind direction, hourly wind direction value, unit is degree. Figure 5 Shown; average wind power density, unit is W / m 2 .like Figure 6 As shown. Air pressure, hourly air pressure value, unit is hPa. Figure 7 The sunshine hours refer to the time in a day when the sun's rays shine directly on the ground, in hours. Figure 8 As shown. Sunshine intensity, sunshine intensity per hour, unit is W / m 2 .like Fig. 9 Solar radiation, the amount of solar radiation per hour, in W / m 2 .like Fig.10 Temperature, the temperature value per hour, in ℃. Fig.11 shown.
[0174] Construct a sentence X containing the above data and process it using the self-attention mechanism. The global self-attention mechanism captures the global information in the sentence, while the block self-attention mechanism focuses on the local information of the sentence. By aggregating the attention scores, a graph relationship matrix G is constructed. The global self-attention mechanism calculates the global complementary dependency between the data items in the sentence X and obtains the global complementary attention score matrix. The block self-attention mechanism further enhances the accurate attention score evaluation of wind and solar energy.
[0175] Calculate the query, key and value matrix of global complementary attention, calculate the global complementary attention score, normalize with softmax function, calculate the global complementary attention weight matrix, input sentence X into the global complementary attention module, and obtain the global complementary adjacency matrix, which is the inherent potential connection and volatility complementary connection between each wind energy data and solar energy data. At the same time, use the block attention module to calculate the energy potential within wind and solar energy, strengthen the local correlation of wind and solar energy, and avoid focusing too much on global attention and ignoring its own energy.
[0176] The block self-attention module is as follows:
[0177] X={X1,X2}
[0178] X1={v,θ,P w ,T v ,p}
[0179] X2={T s ,I s ,R s ,T}
[0180] Among them, X1 is the set of all wind energy data, and X2 is the set of all solar energy data. Block self-attention needs to divide multiple blocks according to the length of the input sentence X, and calculate the self-attention score within the block. Generally speaking, wind energy potential is higher than solar energy potential, and the factors affecting wind energy potential are more than those for solar energy. Put wind energy data before solar energy data, divide the blocks according to the length of wind energy data, and calculate the attention relationship matrix within the block.
[0181] For each block X k , calculate the query, key, and value matrix within the block, calculate the attention score within the block, and calculate the combined block matrix
[0182] The global self-attention matrix A global and the block self-attention matrix A local Aggregate to obtain the fused attention score and construct the graph relationship matrix G;
[0183] The graph relationship matrix G is directly composed of the fused attention score matrix A combined Each element G in this matrix ij Represents the strength of the dependency between input data points i and j. The graph relationship matrix G captures the dependencies between input data points, both global and local dependencies. By integrating global and local attention mechanisms, the graph relationship matrix G provides a comprehensive dependency representation, enabling the model to understand and process input data more accurately, thereby improving prediction performance.
[0184] Sentence X passes through a sentence encoder (such as Transformer, LSTM, etc.) to obtain the initial feature matrix E0, which is input into the graph convolutional network together with the relationship matrix G for convolution aggregation operation to obtain the final feature representation matrix H.
[0185] From the final feature representation matrix H agg The wind energy word vector and solar energy word vector are extracted, and uniform pooling and linear function processing are performed respectively to obtain the optimal installed capacity ratio of wind power and photovoltaic power generation.
[0186] In the wind and solar energy feature vector, the feature vectors of different data represent the potential value of wind and solar energy in various directions. Pooling operation is performed on them to obtain the wind energy feature vector V w and the solar eigenvector V s Under the current meteorological data environment, the best adaptation of wind energy and solar energy, the experimental results are shown in Table 1.
[0187] Table 1 Experimental data table
[0188]
[0189]
[0190] A grid diagram of wind energy data and solar energy data in the study area was drawn and displayed, showing wind speed data, wind direction data, average wind power density, effective wind speed hours, and wind energy data of air pressure; sunshine hours and sunshine intensity data, solar radiation data, and temperature data of solar energy. The optimal wind and photovoltaic installed capacity ratio was calculated through model tests, showing that under the influence of geographical, climatic and time factors, wind energy and solar energy data in different regions or at different times fluctuate up and down, and the optimal optimization ratio changes and adjusts with the complementary relationship between wind energy and solar energy, and the strength relationship between wind energy and solar energy is rationally utilized to fully stimulate resource potential.
[0191] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A wind-solar complementarity method based on graph convolutional neural network, characterized in that: include: Get wind energy data and solar energy data and form sentences; Based on the sentence, the attention mechanism is introduced to build the graph relationship matrix, and the initial feature matrix and relationship matrix are obtained through the sentence encoder; The initial feature matrix and the relationship matrix are convolved and aggregated to obtain the final feature representation matrix; The wind energy word vector and solar energy word vector are extracted from the final feature representation matrix respectively, and uniform pooling and linear transformation are performed to obtain the optimal optimized wind power and photovoltaic installed capacity ratio.
2. The method for wind-solar complementarity based on graph convolutional neural network according to claim 1, characterized in that: Wind energy data include wind speed data at 100m in the area, wind direction data, average wind power density, effective wind speed hours and air pressure; Solar energy data includes sunshine hours, sunshine intensity data, solar radiation data and temperature data; Get wind and solar data via ERA5.
3. The method for wind-solar complementarity based on graph convolutional neural network according to claim 2, characterized in that: The graph relationship matrix is constructed based on the sentence-based attention mechanism, including the global self-attention mechanism module calculating the global dependency between the data items in the sentence, but the meteorological data does not exist independently, but is interconnected; If we only focus on global dependencies, the attention score assessment of wind energy and solar energy on their own capabilities will lose accuracy. Therefore, the block self-attention mechanism is introduced again to enhance the accurate attention score assessment of wind energy and solar energy.
4. The method for wind-solar complementarity based on graph convolutional neural network according to claim 3, characterized in that: The global self-attention mechanism module calculates the global dependencies between the data items in sentence X and obtains the global attention score matrix; Sentence X is represented as: X={v,θ,P w ,T v ,p,T s ,I s ,R s ,T} Among them, v represents wind speed data, θ represents wind direction data, P w represents the average wind power density, T v represents effective wind speed hours, p represents air pressure data, T s Indicates the number of sunshine hours, I s Represents the sunshine intensity data, R s represents solar radiation data, T represents temperature data; Calculate the query, key, and value matrices, the formula is expressed as: Q=XW Q K=XW K V=XW V Among them, W Q Represents the query weight matrix, W K represents the key weight matrix, W V A weight matrix representing the values; Calculate the complementary attention score, the formula is expressed as: For each node’s query vector q i , calculate the similarity score between it and the key vectors of other nodes, and get the complementary score matrix, which is expressed as: E ij =q i ·k j =(x i W Q )·(x j W K ) Divide the score by Normalize Among them, d k is the dimension of the key vector, q i represents the query vector, k j represents the key vector, E ij represents the element (i, j) in the complementarity score matrix, x i and x j : represents the i-th and j-th data items in the input data, Calculate the attention weight, the formula is expressed as: The score matrix E is converted into an attention weight matrix through the softmax function. The formula is expressed as: Among them, A ij Represents the element (i, j) in the attention weight matrix, i.e., the query vector q i With the key vector k j The normalized similarity weight of global represents the global attention weight matrix, Q represents the query matrix, and K represents the key matrix.
5. The method for wind-solar complementarity based on graph convolutional neural network according to claim 4, characterized in that: The block attention matrix includes,dividing the input sentence X into two blocks of length l; Calculate self-attention within each block to obtain a new representation within the block; For each block X k , calculate the query, key and value matrix within the block, the formula is expressed as: Q k =X k W Q K k =X k W K V k =X k W V Calculate the attention score within the block, the formula is expressed as: THE k =softmax(E k ) Calculate the combination block matrix, the formula is expressed as: Among them, X k represents the data of the kth block, Q k represents the query matrix of the kth block, X k represents the data of the kth block, W Q represents the weight matrix used to generate the query vector, K k represents the key matrix of the kth block, X k represents the data of the kth block, W K represents the weight matrix used to generate the key vector, V k represents the value matrix of the kth block, X k represents the data of the kth block, W V represents the weight matrix used to generate the value vector, E k represents the attention score matrix of the kth block, Q k represents the query matrix of the kth block, represents the transpose of the key matrix of the kth block, d k Indicates the dimension of the key vector.
6. The method for wind-solar complementarity based on graph convolutional neural network according to claim 5, characterized in that: Constructing the graph relationship matrix includes introducing the attention mechanism to extract features from wind and solar energy data, aggregating the global self-attention matrix and the block self-attention matrix to obtain the fusion attention score, and constructing the graph relationship matrix. The formula is expressed as: A combined =aA global +(1-a)A local G=A combined Among them, A combined represents the combined attention weight matrix, a represents a weight coefficient, A global represents the global attention weight matrix, (1-a) represents the complement weight corresponding to the weight coefficient a, A local represents the local attention weight matrix, and G represents the graph relationship matrix.
7. The method for wind-solar complementarity based on graph convolutional neural network according to claim 6, characterized in that: The final feature representation matrix includes passing the sentence X through the sentence encoder to obtain the initial feature matrix E0 and using the graph convolution network to aggregate features with the graph relationship matrix G. The formula is expressed as: E0=Encoder(X) H (l+1) =σ(GH (l) W (l) +b (l) ) Among them, H (l) represents the node feature matrix of the lth layer, W (l) and b (l) They represent the weight matrix and bias vector of the lth layer respectively, and σ represents the activation function; After obtaining the final matrix H after convolution aggregation, the wind energy word vector and solar energy word vector are extracted and uniformly pooled and linearly transformed to obtain the optimal optimized wind power and photovoltaic installed capacity ratio, which is expressed as follows: V w =WV s +b Among them, V w represents the wind energy feature vector extracted after uniform pooling, V s represents the solar energy feature vector extracted after uniform pooling, W represents the optimal wind power and photovoltaic installed capacity ratio under the current wind power and solar energy data environment, and b represents the offset.
8. A wind-solar complementarity system based on a graph convolutional neural network using the method according to any one of claims 1 to 7, characterized in that: Data acquisition module, which acquires wind energy data and solar energy data; The data processing module combines the acquired wind and solar data into sentences and introduces an attention mechanism to capture the dependencies between wind and solar data; The feature extraction and aggregation module uses the sentence encoder to encode the constructed sentences, generates an initial feature matrix, and performs convolution aggregation with the graph relationship matrix to obtain the final feature representation matrix; The optimization calculation module processes the final feature representation matrix after convolution aggregation, extracts wind energy word vectors and solar energy word vectors respectively, and calculates the optimal wind power and photovoltaic installed capacity ratio through uniform pooling and linear transformation.
9. A computer device comprising: Memory and processor; The memory stores a computer program, characterized in that when the processor executes the computer program, the processor implements the steps of a wind-solar complementarity method based on a graph convolutional neural network.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a wind-solar complementarity method based on a graph convolutional neural network are implemented.
