Short-term wind power prediction method, device, equipment and storage medium
By using multi-scale feature fusion and multi-task learning, the high complexity of wind power prediction at a wide spatial scale is solved, and efficient and accurate wind power cluster prediction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NORTHEAST DIANLI UNIVERSITY
- Filing Date
- 2025-08-13
- Publication Date
- 2026-04-28
AI Technical Summary
Existing wind power prediction methods have high computational and storage requirements when dealing with high-dimensional meteorological features at a wide spatial scale, and fail to fully explore the personalized modeling of regional and local meteorological conditions of wind farms, ignoring the heterogeneity and mutual influence between wind farms.
A multi-scale feature fusion method is adopted to construct a feature extraction module from three perspectives: global, cluster, and site. By combining global block-level attention and dynamic hybrid sparse graph attention, the cluster prediction task is decomposed into direct prediction, indirect prediction, and fusion prediction through multi-task learning, so as to achieve efficient feature extraction and prediction.
It reduces the computational complexity of the model, improves computational efficiency and prediction accuracy, and enhances the model's generalization ability and prediction robustness.
Smart Images

Figure CN121011997B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wind power prediction technology, and in particular to a short-term wind power prediction method, device, equipment and storage medium. Background Technology
[0002] Due to the rapid increase in the number of wind farms and the continuous expansion of wind power clusters, the dimensionality of the input to the prediction model—Numerical Weather Prediction (NWP)—has increased significantly, raising the training cost and difficulty of the prediction model. The literature "Ouyang Jing, Qin Long, Wang Jianfeng, et al. Short-term power prediction of distributed photovoltaic clusters based on PCA-ShapeDTW-QWGRU [J]. Acta Energiae Solaris Sinica, 2024, 45(5): 458-467" divides sub-clusters based on principal component analysis and density clustering, and predicts cluster power through statistical upscaling; the literature "Yang Mao, Peng Tian, Su Xin. Ultra-short-term power prediction of wind power clusters based on dynamic partitioning of two-dimensional coordinates of prediction information [J]. Proceedings of the CSEE, 2022, 42(24): 8854-8864" performs dynamic clustering of the two-dimensional coordinates of the wind farms and completes cluster prediction through gated cyclic units; the literature "Zhang Zhe, Wang Bo. Short-term power prediction method for wind power clusters based on CBAM-LSTM [J]" uses a different approach. Journal of Northeast Electric Power University, 2024, 44(1): 1-8. The method extracts the temporal characteristics of wind power and the spatial characteristics of NWP, and then inputs the extracted features into a long short-term memory neural network for prediction. The above method only uses meteorological features of nearby nodes of the wind farm, which places relatively low demands on the model in terms of computation and storage resources. However, the meteorological information used is only a small part of the spatial range, ignoring the spatiotemporal correlation of wide-area meteorological information. Conversely, if high-dimensional meteorological features of a wide area are directly input into the prediction model, it will significantly increase the computation and storage requirements of the model. This problem is particularly prominent for complex architectures represented by Transformer and graph models.
[0003] Besides the challenge of computational efficiency, how to efficiently mine and utilize meteorological features on a large spatial scale has also become an important issue in wind power prediction. The literature "Qiao Kuanlong, Dong Cun, Che Jianfeng, et al. Short-term prediction method for wind power clusters based on graph convolutional neural networks under spatiotemporal characteristics [J]. Acta Energiae Solaris Sinica, 2024, 45(5): 95-103" constructs a graph convolutional neural network model, extracts the correlation features of meteorological map nodes from non-Euclidean space, and feeds them into a gated recurrent unit network with an attention mechanism to enhance the temporal feature extraction capability; the literature "Deng Weisi, Che Jianfeng, Wang Mingqing, et al. Day-ahead power prediction method for wind power clusters based on grid-type numerical weather prediction [J]. Southern Power Grid Technology, 2024, 18(6): 51-57+78" uses a grid-type NWP and a residual network to establish a wind power cluster prediction model, mining the correlation between meteorological distribution and power; the literature "Zhan Wenhua, Che Jianfeng, Wang Bo, et al." A Method for Predicting Regional Photovoltaic Power Output Based on Gridded Numerical Weather Prediction [J]. China Electric Power, 2024, 57(3): 144-151. This paper proposes a method for predicting regional photovoltaic power output based on gridded numerical weather prediction [J]. China Electric Power, 2024, 57(3): 144-151. The method utilizes residual networks to establish a regional multi-output prediction model, fully exploring the correlation between regional meteorological resource distribution and the power output of each power station. However, although the above method uses gridded NWP and takes the overall meteorological characteristics as input, it lacks personalized modeling of wind farm areas and local meteorological conditions, limiting the model's predictive ability.
[0004] Multi-task learning is a machine learning method that improves the generalization ability of a model by simultaneously training multiple related tasks within a single model and exploring the commonalities and differences between the learning tasks. Conventional wind power prediction is a single-task learning method, which predicts the output power at a certain time or over a period of time in the future based on the NWP or historical power. For cluster prediction, the model focuses on only one task, namely, predicting the total power of the wind farm cluster, and summing the power of all wind farms as the prediction target. However, this method only focuses on the overall trend of power, ignoring the heterogeneity and mutual influence between individual wind farms, and fails to fully utilize the independent information of each wind farm. For example, the literature "Du Mingshan, Zhang Haiqing, Li Daiwei, et al. Research on short-term wind power generation prediction based on multi-task learning [J / OL]. Software Guide, 2025, 24(04): 32-41. In the task-specific layer, for each subtask, the encoding information of the multi-scale module and the cross-dimensional-time-dependent hybrid encoding information are first fused. After multi-layer decoder decoding, the prediction output of each subtask is finally obtained by one-step decoding of the Transformer generative prediction model. The literature "Chen Dianhao, Zang Haixiang, Liu Jingxuan, et al. Multi-step prediction of photovoltaic power based on multi-view feature extraction and multi-task learning [J]. High Voltage Technology, 2024, 50(9): 3924-3933" transforms the multi-step power prediction task into multiple single-step power prediction subtasks. It uses a multi-task learning model based on attention mechanism and expert network to perform multi-step prediction, so as to make full use of the correlation of multi-step prediction values. The literature "Pang Senshen. Short-term photovoltaic power generation prediction method based on data-driven and multi-task learning [D]. Guangxi University, 2023" sets the prediction model with better prediction performance as the target model and other prediction models as auxiliary models. The target model and auxiliary models are trained on the same prediction task to carry out power prediction.
[0005] The methods mentioned above all use multi-task learning when performing power prediction, but their focus is on studying the multi-step prediction problem of small-scale power plants. They do not consider the correspondence between the power of a single power plant and the power of the cluster, and fail to fully explore the synergistic effect of the coupling characteristics between power plants on the power of the cluster. Summary of the Invention
[0006] This application provides a method, apparatus, device, and storage medium for short-term wind power prediction to address the high complexity modeling problem caused by high-dimensional meteorological features at a wide spatial scale for wind farm cluster power prediction. This application achieves feature fusion at three scales: global, cluster, and site. On one hand, feature extraction modules are constructed from three perspectives: global, cluster, and site. Global block-level attention and dynamically hybrid sparse graph attention are used to reduce model complexity and improve computational efficiency. On the other hand, the cluster prediction task is decomposed into three tasks: direct prediction, indirect prediction, and fusion prediction. Cluster prediction is achieved through multi-task learning.
[0007] In a first aspect, this application provides a short-term wind power forecasting method, including:
[0008] Acquire numerical weather forecast data and calculate the meteorological feature importance matrix based on the numerical weather forecast data;
[0009] Based on the meteorological feature importance matrix, the numerical weather forecast data are weighted, decomposed, transformed and combined to obtain global-scale meteorological features.
[0010] All wind farms are divided into multiple clusters, and each cluster is used as a cluster node in the first graph structure. Based on the meteorological feature importance matrix of the upgraded dimension, the feature vector of each cluster node is calculated, and graph attention operation is performed on the feature vector of the cluster node to obtain the cluster-scale meteorological features.
[0011] Each wind farm is treated as a wind farm node in the second graph structure. Based on the meteorological feature importance matrix of the higher dimension, the characteristic vector of each wind farm node is calculated, and the graph attention operation is performed on the characteristic vector of the wind farm node to obtain the meteorological features at the site scale.
[0012] The global-scale meteorological features, cluster-scale meteorological features, and station-scale meteorological features are spliced together along the same dimension to obtain fused meteorological features.
[0013] A multi-task cluster power prediction framework is established. This framework takes the fused meteorological features as input and outputs a predicted cluster power. The framework includes a direct prediction task, an indirect prediction task, and a fused prediction task. The direct prediction task directly outputs the predicted value of the cluster power. The indirect prediction task outputs the predicted value for each wind farm, and the indirect prediction value of the cluster power is obtained by accumulating the predicted values for each wind farm. The fused prediction task fuses the outputs of the direct and indirect prediction tasks through a fully connected layer to obtain a fused predicted value of the cluster power. This fused predicted value of the cluster power is used as the predicted cluster power output by the multi-task cluster power prediction framework.
[0014] In one possible design, the meteorological feature importance matrix is calculated based on the numerical weather forecast data, including:
[0015] The Pearson correlation coefficient matrix between the total power of a wind farm cluster and the NWP wind speed is calculated using the following formula:
[0016]
[0017] In the formula, The Pearson correlation coefficient matrix is located at... The element at that location, h and w These are indexes for longitude and latitude, respectively. yes t Time and location Wind speed at the location; It is a location The average wind speed at the location; yes t Total cluster power at any given time; It is the average of the total power of the cluster; T It is the time length of the sample;
[0018] Based on the Pearson correlation coefficient matrix, the importance matrix of meteorological features is calculated using the following formula:
[0019]
[0020] In the formula, exp is the natural exponential function. H and W These are longitude and latitude, respectively. Z g It is a meteorological feature importance matrix.
[0021] In one possible design, based on the meteorological feature importance matrix, the numerical weather prediction data are weighted, decomposed, transformed, and combined to obtain global-scale meteorological features, including:
[0022] The numerical weather forecast data is multiplied element-by-element by the meteorological feature importance matrix to obtain the weighted features;
[0023] The weighted features are decomposed into multiple non-overlapping data blocks according to spatial dimensions;
[0024] The self-attention transformed data blocks are obtained by applying the attention mechanism in parallel within each data block using the following formula:
[0025]
[0026] In the formula, It is the first after self-attention transformation One data block; It is the first One data block; , and These are the first linear transformation matrix, the second linear transformation matrix, and the third linear transformation matrix, respectively. , and Shared across all data blocks; It is the Softmax activation function; d k This is a scaling factor to prevent gradient vanishing due to excessively large values; # indicates matrix transpose.
[0027] The data blocks after self-attention transformation are combined and restored according to their original positions to obtain global-scale meteorological features.
[0028] In one possible design, based on the meteorological feature importance matrix, the numerical weather prediction data are weighted, decomposed, transformed, and combined to obtain global-scale meteorological features, including:
[0029] The numerical weather forecast data is multiplied element-by-element by the meteorological feature importance matrix to obtain the weighted features;
[0030] The weighted features are decomposed into multiple non-overlapping data blocks according to spatial dimensions;
[0031] By introducing global variables and applying the attention mechanism in parallel within each data block using the following formula, we obtain the data block after self-attention transformation:
[0032]
[0033] In the formula, It is the first after self-attention transformation One data block; , and These are the first linear transformation matrix, the second linear transformation matrix, and the third linear transformation matrix, respectively. , and Shared across all data blocks; , 、 These are the query matrix, key matrix, and value matrix after introducing global variables. Represents matrix concatenation; It is a global variable; It is the Softmax activation function; d kis the scaling factor, to prevent gradient vanishing that may occur due to excessively large values; # is the matrix transpose;
[0034] The update formula for global variables is as follows:
[0035]
[0036] In the formula, It is the output of global variables. , , These are the global variables resulting from concatenating the query matrix, key matrix, and value matrix. , 、 These are the query matrix, key matrix, and value matrix for global variables, respectively.
[0037] The data blocks after self-attention transformation are combined and restored according to their original positions to obtain global-scale meteorological features.
[0038] In one possible design, all wind farms are divided into multiple clusters, with each cluster serving as a cluster node in a first graph structure. Based on an upgraded meteorological feature importance matrix, the characteristic vectors of each cluster node are calculated, and a graph attention operation is performed on the characteristic vectors of the cluster nodes to obtain cluster-scale meteorological features, including:
[0039] Based on the spatial distance between wind farms, all wind farms are divided into multiple clusters;
[0040] Constructing a region masking matrix M i Among them, the region masking matrix is located at... matrix elements at the location The calculation formula is as follows:
[0041]
[0042] In the formula, Representing the i A convex hull, h and w These are indexes for longitude and latitude, respectively.
[0043] Each cluster is viewed as a cluster node in the first graph structure. eigenvectors The calculation formula is as follows:
[0044]
[0045] In the formula, Principal component analysis is representative. It is numerical weather prediction data; It is the meteorological feature importance matrix after dimensionality upgrade;
[0046] The calculation formula is as follows:
[0047]
[0048] In the formula, Represents matrix dimensionality increase; Z g It is a meteorological feature importance matrix;
[0049] Based on the feature vectors of each cluster node, the cluster node is calculated using the following formula. and adjacent cluster nodes Attention weights between :
[0050]
[0051] In the formula, is the attention parameter vector used to calculate the attention score between nodes; exp is the natural exponential function; It is a weight matrix; and These are cluster nodes and eigenvectors; It is a cluster node The set of adjacent nodes; This is the LeakyReLU activation function; # represents matrix transpose.
[0052] Based on cluster nodes and adjacent cluster nodes Attention weights between Cluster nodes are determined using the following formula. Cluster-scale meteorological characteristics:
[0053]
[0054] In the formula: It is the Sigmoid activation function; It is a cluster-scale meteorological characteristic.
[0055] In one possible design, each wind farm is treated as a node in a second graph structure. Based on an upgraded meteorological feature importance matrix, the characteristic vector of each wind farm node is calculated, and a graph attention operation is performed on the characteristic vectors of the wind farm nodes to obtain the meteorological features at the farm scale, including:
[0056] Each wind farm is treated as a node in the second graph structure, and a masking matrix for each wind farm node is constructed; wherein, the masking matrix of the wind farm node is located at... matrix elements at the location The calculation formula is as follows:
[0057]
[0058] In the formula, h and w These are indexes for longitude and latitude, respectively.
[0059] Based on the masking matrix of the wind farm nodes, the formula for calculating the feature vector of the wind farm nodes is as follows:
[0060]
[0061] In the formula, For wind farm a The feature vector of a node;
[0062] Based on wind farm a The feature vectors of the nodes are calculated using the following formula to obtain the wind farm's feature vectors. Meteorological characteristics at the station scale of the node:
[0063]
[0064] In the formula, It is a wind farm a Attention weights between node b and node b of the wind farm; It is a weight matrix; g b It is the feature vector of node b in the wind farm; It is the Sigmoid activation function; It is a wind farm a The set of adjacent nodes of a node;
[0065] wind farm a The formula for calculating the attention weight between node b and node b of the wind farm is as follows:
[0066]
[0067] In the formula, exp is the natural exponential function; It is an attention parameter vector used to calculate the attention score between nodes; It is the set of adjacent nodes. , In order to select with wind farm Most relevant front One wind farm, the wind farm obtained The set of prior nodes, The number of prior nodes. To calculate wind farm Attention weights with other nodes, before selection One wind farm, the resulting wind farm A dynamic set of nodes. This represents the number of dynamic nodes.
[0068] In one possible design, after establishing the multi-task cluster power prediction framework, the method further includes:
[0069] The multi-task cluster power prediction framework is trained based on the set total loss function, and cluster power prediction is realized based on the trained multi-task cluster power prediction framework; wherein, the total loss function is the weighted sum of the losses of the direct prediction task, the indirect prediction task and the fusion prediction task.
[0070] Loss function for direct prediction task for:
[0071]
[0072] In the formula, yes Direct prediction of cluster power at any given time; yes The actual value of cluster power at any given time; T It is the time length of the sample;
[0073] Loss function for indirect prediction task for:
[0074]
[0075] In the formula, yes Indirect prediction of cluster power at any given time; It is the first The predicted value for each wind farm; I It refers to the number of wind farms;
[0076] The loss function of the fusion prediction task for:
[0077]
[0078] In the formula, yes Cluster power fusion prediction at any given time.
[0079] Secondly, this application provides a short-term wind power forecasting device, the device comprising:
[0080] The importance matrix calculation unit is configured to acquire numerical weather forecast data and calculate the meteorological feature importance matrix based on the numerical weather forecast data.
[0081] The global feature extraction unit is configured to perform weighted, decomposed, transformed and combined operations on the numerical weather forecast data based on the meteorological feature importance matrix to obtain global-scale meteorological features.
[0082] The cluster feature extraction unit is configured to divide all wind farms into multiple clusters, with each cluster as a cluster node in the first graph structure. Based on the upgraded meteorological feature importance matrix, the unit calculates the feature vector of each cluster node and performs graph attention operation on the feature vector of the cluster node to obtain cluster-scale meteorological features.
[0083] The site feature extraction unit is configured to treat each wind farm as a wind farm node in the second graph structure, calculate the characteristic vector of each wind farm node based on the upgraded meteorological feature importance matrix, and perform graph attention operation on the characteristic vector of the wind farm node to obtain the site-scale meteorological features.
[0084] The feature fusion unit is configured to splice the global-scale meteorological features, cluster-scale meteorological features and station-scale meteorological features in the same dimension to obtain fused meteorological features;
[0085] A multi-task learning unit is configured to establish a multi-task cluster power prediction framework. This framework takes the fused meteorological features as input and outputs a predicted cluster power. The framework includes a direct prediction task, an indirect prediction task, and a fusion prediction task. The direct prediction task directly outputs the predicted value of the cluster power. The indirect prediction task outputs the predicted value for each wind farm, and the cluster power is indirectly predicted by accumulating the predicted values for each wind farm. The fusion prediction task fuses the outputs of the direct and indirect prediction tasks through a fully connected layer to obtain a fused predicted value of the cluster power. This fused predicted value of the cluster power is used as the predicted cluster power output by the multi-task cluster power prediction framework.
[0086] Thirdly, embodiments of this application provide an electronic device, including: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, causing the at least one processor to perform the short-term wind power prediction method as described in the first aspect and various possible designs of the first aspect.
[0087] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, it implements the short-term wind power prediction method described in the first aspect and various possible designs of the first aspect.
[0088] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the short-term wind power prediction method as described in the first aspect and various possible designs of the first aspect.
[0089] The short-term wind power prediction method, apparatus, equipment, and storage medium provided in this application have at least the following beneficial effects:
[0090] 1) When the spatial scale is large, the high-dimensional and complex wide-area meteorological features significantly increase the computational cost of the Transformer's self-attention mechanism. To reduce this cost, this application decomposes the overall data, breaking down large data blocks into multiple smaller data blocks, which effectively improves the computational efficiency of the self-attention mechanism. Furthermore, by introducing global variables, the problem of global information loss caused by data decomposition can be mitigated.
[0091] 2) For graph attention mechanisms, increasing the sparsity of the graph structure can improve the computational speed of the model. Selecting dynamic nodes based on the data structure and prior nodes based on prior knowledge can construct a reasonable graph structure to enhance the model's generalization ability.
[0092] 3) For large-scale numerical weather forecasting, extracting input features from the global scale, cluster scale, and station scale can improve the model's ability to perceive complex meteorological features, thereby improving prediction accuracy.
[0093] 4) By splitting the cluster prediction task into direct prediction task, indirect prediction task and fusion prediction task, and taking into account the characteristics of different tasks, higher prediction accuracy and robustness can be achieved. Attached Figure Description
[0094] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0095] Figure 1 A flowchart illustrating a short-term wind power prediction method provided in this application embodiment;
[0096] Figure 2 A heatmap showing the correlation between total cluster power and NWP wind speed provided in an embodiment of the present invention;
[0097] Figure 3This is a data processing diagram of the global feature extraction module provided in an embodiment of the present invention;
[0098] Figure 4 This is a schematic diagram of a wind farm cluster and its corresponding convex hull provided in an embodiment of the present invention;
[0099] Figure 5 A schematic diagram illustrating the generation method of a dynamic hybrid sparse graph provided in an embodiment of the present invention;
[0100] Figure 6 A flowchart illustrating the specific implementation of the short-term wind power prediction method provided in this embodiment of the invention;
[0101] Figure 7 Power prediction curves for different prediction tasks provided in embodiments of the present invention;
[0102] Figure 8 Power prediction curves for different prediction models provided in embodiments of the present invention;
[0103] Figure 9 A structural diagram of the short-term wind power prediction device provided in the embodiments of this application.
[0104] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0105] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0106] The collection, storage, use, processing, transmission, provision, and disclosure of financial data or user data involved in the technical solution of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0107] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0108] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0109] This application provides a short-term wind power forecasting method, such as... Figure 1 The diagram shows a flowchart of a short-term wind power prediction method provided in an embodiment of this application. The short-term wind power prediction method includes the following steps S100-S600.
[0110] S100: Acquire numerical weather forecast data and calculate the meteorological feature importance matrix based on the numerical weather forecast data.
[0111] For example, in this embodiment, the acquired numerical weather forecast data is represented as follows: , This is a four-dimensional grid-type NWP dataset, where... The time length of the sample; The number of feature channels; and These correspond to latitude and longitude respectively; the spatial resolution of the NWP is 0.1° × 0.1°.
[0112] Calculate the Pearson correlation coefficient matrix between the total power of a wind farm cluster and the wind speed of a grid-type NWP at a larger spatial scale. The calculation formula is as follows:
[0113] (1)
[0114] In the formula: yes In position Elements at the location; yes t Time and location Wind speed at the location; It is a location The average wind speed at the location; yes t Total cluster power at any given time; It is the average of the total power of the cluster.
[0115] Will Visualized as a correlation heatmap, with the locations of wind farms marked, such as... Figure 2 As shown, Figure 2 A heatmap showing the correlation between total cluster power and NWP wind speed provided for embodiments of this application. From Figure 2It is evident that the correlation is greatly affected by the distribution of wind farms; the denser the distribution of wind farms, the stronger the correlation of meteorological characteristics.
[0116] High correlation usually reflects the higher importance of the meteorological features at that node. Using this feature importance as prior information input into the prediction model can reduce the interference of irrelevant features on model training, guide the model to focus on key features, and accelerate model convergence. Therefore, this embodiment refers to the normalized exponent (Softmax) function to calculate the meteorological feature importance matrix. This is used to weight NWP, and its calculation formula is as follows:
[0117] (2)
[0118] In the formula: It is a natural exponential function. h and w These are the indexes for longitude and latitude, respectively.
[0119] S200: Based on the meteorological feature importance matrix, numerical weather prediction data are weighted, decomposed, transformed, and combined to obtain global-scale meteorological features.
[0120] It should be noted that the global-scale meteorological characteristics mentioned in this article refer to the meteorological characteristics of the entire large area where the wind farm cluster is located. This includes both areas where wind farms exist and areas where wind farms do not exist. It is a large-scale meteorological characteristic used to characterize the overall trend of meteorological changes.
[0121] In some embodiments, a global feature extraction module is designed to perform step S200 to extract meteorological features at a global scale.
[0122] Self-attention is a widely used deep learning modeling method that allows the model to dynamically pay attention to other elements in the same input sequence while processing a certain input element, thereby capturing the relationship between different parts.
[0123] In existing technologies, numerical weather prediction data is input into the model. The attention score is calculated using the following formula through linear data transformation. :
[0124] (3)
[0125] In the formula: , It is a linear transformation matrix; It is a scaling factor to prevent gradient vanishing that may occur due to excessively large values.
[0126] Numerical weather forecast Substituting into formula (3), we obtain the complexity of the self-attention mechanism as follows: As resolution and spatial scale increase, complexity increases quadratically, significantly increasing the computational cost and memory requirements for feature extraction.
[0127] To balance model performance and computational efficiency, the global feature extraction module proposed in this embodiment consists of four parts: weighting, decomposition, transformation, and combination, to obtain the final output, namely, global-scale meteorological features. .
[0128] In this embodiment, the global feature extraction module can obtain global-scale meteorological features in two ways, one of which is represented by the calculation process as follows:
[0129] (4)
[0130] In the formula, The height of the data block; The width of the data block; This represents global feature extraction.
[0131] Global Feature Extraction The specific process includes the following steps:
[0132] 1) Weighting. This involves weighting numerical weather prediction data. Importance matrix of meteorological features Element-wise multiplication, as shown in formula (B1), reduces the search space for training, improving training efficiency and convergence speed.
[0133] (B1)
[0134] In the formula: It is a weighted feature, that is, the weighted NWP; It is Hadamaji.
[0135] 2) Decomposition. [The remaining text appears to be incomplete and contains errors. A more accurate translation would require the full context Decomposed according to spatial dimensions A non-overlapping data block, as shown in the following formula:
[0136] (B2)
[0137] In the formula: For the first One data block; This is a decomposition operation; The height of the data block; The width of the data block; the size of each data block is [value missing]. .
[0138] 3) Transformation. An attention mechanism is used in parallel within each data block, and the data after self-attention transformation... Data blocks for:
[0139] (B3)
[0140] In the formula: , , These are the first linear transformation matrix, the second linear transformation matrix, and the third linear transformation matrix, and these three parameters are shared across all data blocks.
[0141] The complexity of the global feature extraction module after transformation is:
[0142] (B4)
[0143] As can be seen from the above formula, complexity is linearly related to data resolution and spatial scale. When and In this case, the complexity of the module will be much smaller than the complexity of the self-attention mechanism. This significantly reduces the amount of computation.
[0144] 4) Combination. Combination is the inverse operation of decomposition. It restores the transformed data of each data block according to its original position, obtaining the final output of the module, namely the global-scale meteorological features. :
[0145] (B5)
[0146] In the formula: This represents a combination operation.
[0147] The data were weighted, decomposed, transformed, and combined sequentially using formulas (B1), (B2), (B3), and (B5), and then... Representing this weighting, decomposition, transformation, and combination operation, the module output can be written as the above formula (4).
[0148] In another approach, compared to the aforementioned method of extracting global-scale meteorological features, global variables are introduced for feature extraction. Specifically, while decomposing NWP into small data blocks and calculating attention scores separately effectively reduces computational complexity, each data block can only perceive information within the block and cannot capture the global relationships between blocks. Therefore, global variables are needed to supplement global information.
[0149] Therefore, global variables are introduced. ,in To customize hyperparameters, This ensures that when each data block executes the self-attention mechanism, it not only focuses on elements within the same data block but also on the global vector. Based on the derivation process in Appendix B, the output of the global feature extraction module after introducing global variables is as follows:
[0150] (5)
[0151] In the formula, This represents global feature extraction containing global variables.
[0152] like Figure 3 The diagram shown is a data processing diagram of the global feature extraction module provided in an embodiment of this application. Figure 3 This shows the process of extracting global-scale meteorological features after introducing global variables.
[0153] Based on the process shown in steps 1)-4) above, formula (B3) becomes as follows after introducing a global vector:
[0154] (B6)
[0155] In the formula: , 、 These are the query matrix, key matrix, and value matrix after introducing global variables. This represents matrix concatenation.
[0156] The update formula for the global variable is as follows:
[0157] (B7)
[0158] In the formula: It is the output of global variables. , , These are the global variables resulting from concatenating the query matrix, key matrix, and value matrix. , 、 These are the query matrix, key matrix, and value matrix for global variables, respectively.
[0159] Combining formulas (4), (B6), and (B7), the output of the global feature extraction module after introducing global variables is as shown in formula (5) above.
[0160] Due to general Smaller values reduce the complexity of global variables. The computational cost is relatively low, so it won't significantly increase the computational load of the global feature extraction module.
[0161] S300: Divide all wind farms into multiple clusters, treat each cluster as a cluster node in the first graph structure, calculate the characteristic vector of each cluster node based on the meteorological feature importance matrix of the upgraded dimension, and perform graph attention operation on the characteristic vector of the cluster node to obtain the cluster-scale meteorological features.
[0162] It should be noted that the cluster-scale meteorological characteristics mentioned in this paper refer to the meteorological characteristics within a cluster, which are divided into multiple clusters and taken as the basic unit. These are meteorological characteristics of multiple sub-regions, used to characterize the local synergistic effect of wind farm clusters.
[0163] In some embodiments, a cluster feature extraction module is designed to perform the above step S300 to extract cluster-scale meteorological features.
[0164] Specifically, to capture the meteorological characteristics of key areas, the data processing flow of the feature extraction module at this wind farm is as follows: It provides accurate regional information support for power prediction. Based on the spatial distance between wind farms, the K-Means algorithm is used to divide all wind farms into multiple clusters. For each cluster, the convex hull algorithm is applied to draw the shape of the wind farm cluster, such as... Figure 4 The diagram shown is a schematic diagram of a wind farm cluster and its corresponding convex hull provided in an embodiment of this application.
[0165] Define the region masking matrix For convex hull Nodes inside and on the boundary are defined as 1, otherwise as 0, and their position is... matrix elements at the location The calculation formula is as follows:
[0166] (6)
[0167] In the formula: Representing the i A convex hull.
[0168] GAT is a deep learning method based on graph structures.
[0169] By introducing an attention mechanism, weights are dynamically assigned to the relationships between different nodes in the graph. Since the distribution of wind farms naturally exhibits graph properties, and the relationships between nodes can be expressed through edges, this paper selects the GAT model for cluster feature extraction, treating each cluster as a cluster node in a first graph structure. eigenvectors The calculation formula is as follows:
[0170] (7)
[0171] In the formula: Principal component analysis is representative. It is the meteorological feature importance matrix after dimensionality upgrade.
[0172] The calculation formula is as follows:
[0173] (8)
[0174] In the formula: This represents matrix dimensionality increase.
[0175] Transform the two-dimensional matrix into a four-dimensional matrix so that the importance matrix matches the dimension of the input data.
[0176] The key to graph attention is calculating the attention weights between nodes. (Cluster nodes) and adjacent cluster nodes Attention weights between The formula is as follows:
[0177] (9)
[0178] In the formula: It is an attention parameter vector used to calculate the attention score between nodes; It is a weight matrix; and These are cluster nodes and eigenvectors; It is a cluster node The set of adjacent nodes; It is the LeakyReLU activation function.
[0179] After weighting the features of adjacent nodes, graph attention is applied to cluster nodes. Cluster-scale meteorological characteristics We obtain it from the following formula:
[0180] (10)
[0181] In the formula: It is the Sigmoid activation function.
[0182] S400: Treat each wind farm as a wind farm node in the second graph structure, calculate the characteristic vector of each wind farm node based on the upgraded meteorological feature importance matrix, and perform graph attention operation on the characteristic vector of the wind farm node to obtain the meteorological features at the site scale.
[0183] It should be noted that the meteorological characteristics at the wind farm scale mentioned in this article refer to the meteorological characteristics at the nodes where the wind farm is located. These are multi-point meteorological characteristics used to characterize the changes in the microenvironment of the wind farm.
[0184] In some embodiments, a station feature extraction module is designed to perform the above step S400 to extract meteorological features at the station scale.
[0185] Specifically, to focus on the detailed information of each wind farm site, each wind farm is regarded as a wind farm node in the second diagram structure, and a wind farm is defined. Node masking There is a wind farm. A node is defined as 1 if it is positive and 0 otherwise, and its position is... matrix elements at the location The calculation formula is as follows:
[0186] (11)
[0187] use Replace in formula (7) Obtain wind farm Node feature vectors The calculation formula is as follows:
[0188] (12)
[0189] use , Replace the formulas in formulas (9) and (10) , Obtain wind farm The node's final output As shown in the following formula:
[0190] (13)
[0191] (14)
[0192] Complexity of graph attention The number of nodes in the graph structure The average number of neighbors of a node in each graph structure and the number of features of nodes in the graph structure Relevant. In reality, the number of nodes in a wind farm is far greater than the number of nodes in a cluster. If the graph structure is dense, near The complexity is approximately 1. The computational overhead is significant. Therefore, for the node feature extraction module, it is necessary to increase the sparsity of the graph structure to improve computational efficiency. Thus, this embodiment proposes a dynamic hybrid sparse graph attention mechanism (DHS-GAT), which is implemented using steps 1) to 4).
[0193] 1) Prior node selection. Based on the historical power of each wind farm, calculate the correlation coefficient of the historical power of the wind farm. For each wind farm... Choose the one most relevant to it. A wind farm, obtained wind farm Prior node set . This represents the number of prior nodes.
[0194] 2) Dynamic node selection. Based on formula (13), the wind farm is calculated. Attention weights with other nodes, before selection A wind farm, received Dynamic node set of a wind farm . This represents the number of dynamic nodes.
[0195] 3) Generation of dynamic sparse graphs. The union of the prior node set and the dynamic node set is used to generate the adjacent node set. , will node and If the nodes in the equation are connected, then formula (13) can be modified as follows:
[0196] (15)
[0197] The generation method of dynamic blended sparse graphs is as follows: Figure 5 As shown.
[0198] 4) Output the results. Substitute formula (15) into formula (14) to obtain the wind farm node. a The output result.
[0199] S500: Combines global-scale meteorological features, cluster-scale meteorological features, and station-scale meteorological features along the same dimension to obtain fused meteorological features.
[0200] In some embodiments, a multi-scale feature fusion module is designed to perform the above step S500. This multi-scale feature fusion module performs dimensionality reduction and concatenation of the outputs from the three feature extraction modules through a fully connected layer, and then passes the concatenated output through another fully connected layer to obtain the multi-scale fused output, i.e., the fused meteorological features. The calculation formula is as follows:
[0201] (16)
[0202] In the formula: It is the output of the main channel of the global feature extraction module after dimensionality reduction; It is the output of the global variable dimensionality reduction module of the global feature extraction module; This is the output of the cluster feature extraction module after dimensionality reduction; It is the output of the site feature extraction module after dimensionality reduction.
[0203] S600: Establish a multi-task cluster power prediction framework; wherein, the multi-task cluster power prediction framework takes fused meteorological features as input and outputs predicted cluster power. The multi-task cluster power prediction framework includes direct prediction tasks, indirect prediction tasks and fused prediction tasks. The direct prediction task directly outputs the predicted value of cluster power. The indirect prediction task outputs the predicted value of each wind farm respectively. The indirect prediction value of cluster power is obtained by accumulating the predicted values of each wind farm. The fused prediction task fuses the output results of the direct prediction task and the indirect prediction task through a fully connected layer to obtain the fused predicted value of cluster power. The fused predicted value of cluster power is used as the predicted cluster power output by the multi-task cluster power prediction framework.
[0204] In some embodiments, a multi-task cluster power prediction framework is trained based on a set total loss function, and cluster power prediction is realized based on the trained multi-task cluster power prediction framework; wherein, the total loss function is a weighted sum of the losses of the direct prediction task, the indirect prediction task, and the fusion prediction task.
[0205] Specifically, the target variable during training of the multi-task cluster power prediction framework The power output of a wind farm is calculated by combining the power output of each individual wind farm and the total power output of the cluster. ,in, It is the first The power output of a wind farm; The number of wind farms; This represents the total power of the cluster.
[0206] Direct prediction tasks refer to tasks where the model directly outputs predicted cluster power values. Then, based on the formula for calculating the mean square error, the true value of the total power of the cluster is used. To calculate the loss, the loss function of the task is directly predicted. The calculation formula is as follows:
[0207] (17)
[0208] In the formula: yes Direct prediction of cluster power at any given time; yes The actual value of cluster power at any given time.
[0209] The indirect prediction task refers to the model outputting the predicted value for each wind farm separately, and then summing the predicted values to obtain the indirect predicted value of the cluster power. Then the loss function for the indirect prediction task The calculation formula is as follows:
[0210] (18)
[0211] In the formula: yes Indirect prediction of cluster power at any given time; It is the first The predicted value for each wind farm.
[0212] The fusion prediction task refers to obtaining a fused prediction value of cluster power by fusing the outputs of direct and indirect prediction tasks through a fully connected layer. The loss function for the fusion prediction task is... The calculation formula is as follows:
[0213] (19)
[0214] In the formula: yes The cluster power fusion prediction value at any given time is also the final output of the multi-task cluster power prediction framework.
[0215] In this way, the direct task learns the overall power trend from a global perspective; the indirect task predicts the power of each wind farm individually from a regional perspective, capturing detailed information and providing fine-grained predictions; the fusion task combines the first two prediction tasks, enabling the framework to better perceive fine-grained local information and global trends.
[0216] Since the multi-task cluster power prediction framework includes three learning tasks, its total loss function is... as follows:
[0217] (20)
[0218] To further illustrate the feasibility and progressiveness of the method proposed in this application, this embodiment uses data from a wind farm cluster from December 2021 to February 2024 to conduct a case study analysis. For example... Figure 6 The diagram shown is a flowchart illustrating the specific implementation of the short-term wind power forecasting method provided in this application. Figure 6In this context, GBA-Transformer stands for Global Block-wise Attention Transformer, indicating that it extracts global-scale meteorological features by introducing global variables. GAT represents the GAT model used for cluster feature extraction, and DHS-GAT represents the core mechanism (dynamically hybrid sparse graph attention mechanism) used for site feature extraction. When applying the above data, this short-term wind power prediction method can be implemented as follows: Figure 6 The process shown includes steps 1 through 4.
[0219] Step 1: Global Feature Extraction. Calculate the correlation coefficient between the total power of the cluster and the wind speed of the grid-type NWP to obtain the meteorological feature importance matrix. Construct the main channel of the global feature extraction module based on weighting, decomposition, transformation, and combination, and construct the bypass channel of the global feature extraction module based on global variables.
[0220] Step 2: Cluster Feature Extraction. The wind farm is divided into different clusters, and each cluster is treated as a node in a graph structure. The GAT model is used to extract cluster features.
[0221] Step 3: Site Feature Extraction. Each wind farm is treated as a node in a graph structure. Based on prior nodes and dynamic nodes, a dynamic hybrid sparse graph attention mechanism is constructed to extract node features.
[0222] Step 4: Multi-task learning. The outputs of the three feature extraction modules are fused using a multi-scale feature fusion module. Direct prediction results of cluster power are obtained based on the direct prediction task, and indirect prediction results are obtained based on the indirect prediction task. The fusion prediction task is then used to fuse and optimize these prediction results to obtain the final prediction result.
[0223] Data from a wind farm cluster spanning from December 2021 to February 2024 includes 40 wind farms with a total installed capacity of 4822 MW. Data from December 2021 to November 2023 was used as the training set, and data from December 2023 to February 2024 was used as the test set, with a training-to-validation ratio of 8:2. The data has a 1-hour temporal resolution and includes a grid-based NWP (Near-Wave Dynamics View) and measured power for each wind farm. The NWP provides 10 day-ahead meteorological features for each spatial node: 10 m wind speed, 30 m wind speed, 100 m wind speed, 10 m wind direction, 30 m wind direction, 100 m wind direction, 2 m temperature, 2 m pressure, cloud cover, and 2 m relative humidity.
[0224] Normalized root mean square error (NRMSE) and normalized mean absolute error (NMAE) are selected as evaluation metrics for the model, and their calculation formulas are as follows:
[0225] (D1)
[0226] (D2)
[0227] In the formula: It refers to the installed capacity; yes Real-time measured power; yes Predict power at any time; E NRMSE and E NMAE These represent the normalized root mean square error and the normalized mean absolute error, respectively.
[0228] The short-term wind power prediction model is based on Python 3.9, built using the PyTorch framework, running Windows 11, powered by an AMD Ryzen 7 5800H CPU with Radeon Graphics, 16GB of RAM, and an Nvidia GeForce RTX 3060 GPU. The model's hyperparameters are: learning rate 0.001, batch size 32, epoch size 50, and data block size... Prior node number The number of dynamic nodes is 4. It is 5.
[0229] It should be noted that the short-term wind power prediction model (hereinafter referred to as the "model in this paper") is a model that can execute the short-term wind power prediction method proposed in this application. Its structure may include the global feature extraction module, cluster feature extraction module, site feature extraction module, multi-scale feature fusion module, and multi-task cluster power prediction framework mentioned above.
[0230] The innovations of the proposed method in this application include four parts: GBA-transformer for global feature extraction, DHS-GAT for station feature extraction, multi-scale feature fusion, and multi-task learning. Therefore, four case studies were designed to demonstrate its significant progress.
[0231] This embodiment first performs meteorological feature selection. Since NWP has too many features, using them all for model training would affect the model's convergence speed. Therefore, Copula entropy is used to extract meteorological features that have a significant impact on power prediction. The higher the Copula entropy, the higher the importance of the feature. The Copula entropy of meteorological features and power is shown in Table 1. Table 1 shows that 100 m wind speed has the highest importance; therefore, 100 m wind speed is used to calculate the meteorological feature importance matrix. Simultaneously, using 10% Copula entropy as a threshold, six features—100 m wind speed, 30 m wind speed, 10 m wind speed, 2 m temperature, 100 m wind direction, and cloud cover—are selected as inputs to the model in this embodiment.
[0232] Table 1. Copula Entropy of Meteorological Characteristics and Power
[0233]
[0234] Example 1: Comparison experiment on the effectiveness of GBA-Transformer.
[0235] To verify the effectiveness of GBA-Transformer (GBA-Tf), four comparative models were used to predict the total cluster power based on all NWP data: Convolutional Neural Network-Long Short Term Memory (CNN-LSTM), Residual Network (ResNet), Transformer (Tf), and Block-wise Attention Transformer (BA-Tf) without global variables. The prediction performance of each model is shown in Table 2.
[0236] Table 2 Predictive performance of the global feature extraction model
[0237]
[0238] As shown in Table 2, Tf's prediction accuracy is higher than CNN-LSTM and ResNet, but its training time is very long, which is not conducive to model parameter tuning and deployment. BA-Tf significantly reduces model complexity through data decomposition and combination, reducing the training time to 6.8% of Tf's. However, it discards global correlations in data decomposition, resulting in lower prediction accuracy than Tf. GBA-Tf introduces global variables on the basis of BA-Tf, achieving a better balance between prediction accuracy and computational efficiency. Not only is its training time much shorter than Tf, but compared to Tf, its prediction NRMSE is reduced by 0.465%, and NMAE is reduced by 0.249%.
[0239] Example 2: Comparison experiment on the effectiveness of DHS-GAT.
[0240] To verify the effectiveness of DHS-GAT, five comparative models were used to predict the total power of the wind farm cluster based on NWP data of wind farm nodes. C-GAT is a GAT model using a complete graph structure, where all nodes are directly connected. S-GAT is a GAT model using a dynamic sparse graph structure, where nodes are dynamically connected based on their attention scores without using prior knowledge. The prediction performance of each model is shown in Table 3.
[0241] Table 3 Predictive performance of the station feature extraction model
[0242]
[0243] As shown in Table 3, due to the introduction of the graph structure, the prediction accuracy of the GAT model is higher than that of the model without a graph structure, and among the three graph models, DHS-GAT has the highest prediction accuracy. Compared to C-GAT, DHS-GAT's training time is only 50.9% of the former due to the use of a sparse connected graph, significantly improving computational efficiency. Compared to S-GAT, DHS-GAT introduces important prior knowledge of nodes, which can reduce the impact of outlier data, thereby improving the overall prediction performance.
[0244] Example 3: Ablation Experiment of Multi-Scale Feature Fusion Model
[0245] To verify the effectiveness of the multi-scale feature fusion model, ablation experiments were conducted without using multi-task learning. The prediction performance of each model in the ablation experiments is shown in Table 4.
[0246] Table 4 Predictive performance of the ablation experimental model
[0247]
[0248] As shown in Table 4, the dual-scale model is slightly better than the single-scale model, and the multi-scale model that integrates the three scales achieves the best prediction results. Compared with Global, Region, and Node, the predicted NRMSE is reduced by 0.658%, 0.934%, and 1.196%, respectively. This indicates that the feature extraction module of the single scale can only capture the features of a certain scale and easily ignores the important features of other scales. Integrating the three modules can make up for the shortcomings of the single-scale model.
[0249] Example 4: Comparative Experiment on the Effectiveness of Multi-Task Learning
[0250] The prediction framework designed in this embodiment comprises three parts: a direct prediction task, an indirect prediction task, and a fusion prediction task. To verify the effectiveness of multi-task learning, based on the Multi-scale model, the direct prediction task, indirect prediction task, and fusion prediction task (the model presented in this paper) are performed respectively. The prediction curves of each model are shown in [the table below]. Figure 7 The prediction performance is shown in Table 5.
[0251] Depend on Figure 7 As shown in Table 4, the prediction performance of the model in this paper is better than that of the direct prediction task and the indirect prediction task. This is because the direct prediction task focuses on macro trends, while the indirect prediction task reflects the local characteristics of individuals. By fusing and complementing each other, the complex changes in the power of wind farm clusters can be perceived more accurately. Furthermore, the direct and indirect tasks provide two independent but related data distribution sources, which can help the model generalize better.
[0252] Table 5. Prediction performance of different prediction tasks
[0253]
[0254] The model presented in this paper is compared with common prediction models, including: Transformer, Back Propagation Neural Network (BPNN), Graph Convolutional Network (GCN), and U-Net. The model prediction curves are shown below. Figure 8 The prediction performance is shown in Table 6.
[0255] Table 6. Predictive performance of different prediction models
[0256]
[0257] Depend on Figure 8 As shown in Table 6, the proposed model achieves the best prediction performance, reducing NRMSE by 3.042%, 2.095%, 1.823%, and 1.166% compared to BPNN, U-Net, Transformer, and GCN, respectively. This is because the proposed model divides the high-dimensional and complex wide-area meteorological features into multi-scale segments, allowing the model to learn richer information at different levels and ranges, thereby improving its prediction performance. Furthermore, the proposed model employs a complexity-reducing design, resulting in a shorter training time compared to Transformer and GCN, achieving a good balance between accuracy and efficiency.
[0258] This application also provides a short-term wind power forecasting device, such as... Figure 9 As shown, the short-term wind power forecasting device includes:
[0259] The importance matrix calculation unit 901 is configured to acquire numerical weather forecast data and calculate the meteorological feature importance matrix based on the numerical weather forecast data.
[0260] The global feature extraction unit 902 is configured to perform weighted, decomposed, transformed and combined operations on the numerical weather forecast data based on the meteorological feature importance matrix to obtain global-scale meteorological features.
[0261] The cluster feature extraction unit 903 is configured to divide all wind farms into multiple clusters, take each cluster as a cluster node in the first graph structure, calculate the characteristic vector of each cluster node based on the upgraded meteorological feature importance matrix, and perform graph attention operation on the characteristic vector of the cluster node to obtain cluster-scale meteorological features.
[0262] The site feature extraction unit 904 is configured to treat each wind farm as a wind farm node in the second graph structure, calculate the characteristic vector of each wind farm node based on the upgraded meteorological feature importance matrix, and perform graph attention operation on the characteristic vector of the wind farm node to obtain the site-scale meteorological features.
[0263] The feature fusion unit 905 is configured to splice the global-scale meteorological features, cluster-scale meteorological features and station-scale meteorological features in the same dimension to obtain fused meteorological features;
[0264] The multi-task learning unit 906 is configured to establish a multi-task cluster power prediction framework. This framework takes the fused meteorological features as input and outputs a predicted cluster power. The framework includes a direct prediction task, an indirect prediction task, and a fused prediction task. The direct prediction task directly outputs the predicted value of the cluster power. The indirect prediction task outputs the predicted value for each wind farm, and the cluster power is obtained by accumulating the predicted values for each wind farm. The fused prediction task fuses the outputs of the direct and indirect prediction tasks through a fully connected layer to obtain a fused predicted value of the cluster power. This fused predicted value of the cluster power is used as the predicted cluster power output by the multi-task cluster power prediction framework.
[0265] This application provides an electronic device. The electronic device may include a processor and a memory, wherein the processor and the memory can communicate; exemplarily, the processor and the memory communicate via a communication bus.
[0266] The processor executes computer execution instructions stored in memory, causing the processor to perform the scheme in the above embodiments. The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0267] The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. Transceivers are used to enable communication between database access devices and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory.
[0268] The electronic device provided in this application embodiment can be the terminal device described in the above embodiments.
[0269] This application also provides a computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the technical solution of the short-term wind power prediction method described in the above embodiments.
[0270] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, it can implement the technical solution of the short-term wind power prediction method in the above embodiments.
[0271] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.
[0272] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.
[0273] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit integrating the above modules can be implemented in hardware or in the form of hardware plus software functional units.
[0274] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.
[0275] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0276] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.
[0277] Buses can be Industry Standard Architecture (ISA) buses, Peripheral Component Interconnect (PCI) buses, or Extended Industry Standard Architecture (EISA) buses, etc. Buses can be categorized into address buses, data buses, control buses, etc.
[0278] The aforementioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0279] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. The processor and storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic control unit or main control device.
[0280] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0281] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A short-term wind power prediction method, characterized in that, The method includes: Acquire numerical weather forecast data and calculate the meteorological feature importance matrix based on the numerical weather forecast data; Based on the meteorological feature importance matrix, the numerical weather forecast data are weighted, decomposed, transformed and combined to obtain global-scale meteorological features. All wind farms are divided into multiple clusters, and each cluster is used as a cluster node in the first graph structure. Based on the meteorological feature importance matrix of the upgraded dimension, the feature vector of each cluster node is calculated, and graph attention operation is performed on the feature vector of the cluster node to obtain the cluster-scale meteorological features. Each wind farm is treated as a wind farm node in the second graph structure. Based on the meteorological feature importance matrix of the higher dimension, the characteristic vector of each wind farm node is calculated, and the graph attention operation is performed on the characteristic vector of the wind farm node to obtain the meteorological features at the site scale. The global-scale meteorological features, cluster-scale meteorological features, and station-scale meteorological features are spliced together along the same dimension to obtain fused meteorological features. A multi-task cluster power prediction framework is established. This framework takes the fused meteorological features as input and outputs a predicted cluster power. The framework includes a direct prediction task, an indirect prediction task, and a fused prediction task. The direct prediction task directly outputs the predicted value of the cluster power. The indirect prediction task outputs the predicted value for each wind farm, and the indirect prediction value of the cluster power is obtained by accumulating the predicted values for each wind farm. The fused prediction task fuses the outputs of the direct and indirect prediction tasks through a fully connected layer to obtain a fused predicted value of the cluster power. This fused predicted value of the cluster power is used as the predicted cluster power output by the multi-task cluster power prediction framework.
2. The short-term wind power forecasting method according to claim 1, characterized in that, Based on the numerical weather forecast data, calculate the meteorological feature importance matrix, including: The Pearson correlation coefficient matrix between the total power of a wind farm cluster and the NWP wind speed is calculated using the following formula: In the formula, The Pearson correlation coefficient matrix is located at... The element at that location, h and w These are indexes for longitude and latitude, respectively. yes t Time and location Wind speed at the location; It is a location The average wind speed at the location; yes t Total cluster power at any given time; It is the average of the total power of the cluster; T It is the time length of the sample; Based on the Pearson correlation coefficient matrix, the importance matrix of meteorological features is calculated using the following formula: In the formula, exp is the natural exponential function. H and W These are longitude and latitude, respectively. Z g It is a meteorological feature importance matrix.
3. The short-term wind power forecasting method according to claim 1, characterized in that, Based on the meteorological feature importance matrix, the numerical weather prediction data are subjected to weighting, decomposition, transformation, and combination operations to obtain global-scale meteorological features, including: The numerical weather forecast data is multiplied element-by-element by the meteorological feature importance matrix to obtain the weighted features; The weighted features are decomposed into multiple non-overlapping data blocks according to spatial dimensions; The self-attention transformed data blocks are obtained by applying the attention mechanism in parallel within each data block using the following formula: In the formula, It is the first after self-attention transformation One data block; It is the first One data block; , and These are the first linear transformation matrix, the second linear transformation matrix, and the third linear transformation matrix, respectively. , and Shared across all data blocks; It is the Softmax activation function; d k is the scaling factor, to prevent gradient vanishing that may occur due to excessively large values; # is the matrix transpose; The data blocks after self-attention transformation are combined and restored according to their original positions to obtain global-scale meteorological features.
4. The short-term wind power forecasting method according to claim 1, characterized in that, Based on the meteorological feature importance matrix, the numerical weather prediction data are weighted, decomposed, transformed, and combined to obtain global-scale meteorological features, including: The numerical weather forecast data is multiplied element-by-element by the meteorological feature importance matrix to obtain the weighted features; The weighted features are decomposed into multiple non-overlapping data blocks according to spatial dimensions; By introducing global variables and applying the attention mechanism in parallel within each data block using the following formula, we obtain the data block after self-attention transformation: In the formula, It is the first after self-attention transformation One data block; , and These are the first linear transformation matrix, the second linear transformation matrix, and the third linear transformation matrix, respectively. , and Shared across all data blocks; , 、 These are the query matrix, key matrix, and value matrix after introducing global variables. Represents matrix concatenation; It is a global variable; It is the Softmax activation function; d k is the scaling factor, to prevent gradient vanishing that may occur due to excessively large values; # is the matrix transpose. The update formula for global variables is as follows: In the formula, It is the output of global variables. , , These are the global variables resulting from concatenating the query matrix, key matrix, and value matrix. , 、 These are the query matrix, key matrix, and value matrix for global variables, respectively. The data blocks after self-attention transformation are combined and restored according to their original positions to obtain global-scale meteorological features.
5. The short-term wind power forecasting method according to claim 1, characterized in that, All wind farms are divided into multiple clusters, with each cluster serving as a cluster node in the first graph structure. Based on an upgraded meteorological feature importance matrix, the characteristic vectors of each cluster node are calculated, and a graph attention operation is performed on the characteristic vectors of the cluster nodes to obtain cluster-scale meteorological features, including: Based on the spatial distance between wind farms, all wind farms are divided into multiple clusters; Constructing a region masking matrix M i Among them, the region masking matrix is located at... matrix elements at the location The calculation formula is as follows: In the formula, Representing the i A convex hull, h and w These are indexes for longitude and latitude, respectively. Each cluster is viewed as a cluster node in the first graph structure. eigenvectors The calculation formula is as follows: In the formula, Principal component analysis is representative. It is numerical weather prediction data; It is the meteorological feature importance matrix after dimensionality upgrade; The calculation formula is as follows: In the formula, Represents matrix dimensionality increase; Z g It is a meteorological feature importance matrix; Based on the feature vectors of each cluster node, the cluster node is calculated using the following formula. and adjacent cluster nodes Attention weights between : In the formula, is the attention parameter vector used to calculate the attention score between nodes; exp is the natural exponential function; It is a weight matrix; and These are cluster nodes and eigenvectors; It is a cluster node The set of adjacent nodes; This is the LeakyReLU activation function; # represents matrix transpose. Based on cluster nodes and adjacent cluster nodes Attention weights between Cluster nodes are determined using the following formula. Cluster-scale meteorological characteristics: In the formula: It is the Sigmoid activation function; It is a cluster-scale meteorological characteristic.
6. The short-term wind power forecasting method according to claim 1, characterized in that, Each wind farm is treated as a node in the second graph structure. Based on the upgraded meteorological feature importance matrix, the characteristic vector of each wind farm node is calculated, and a graph attention operation is performed on the characteristic vectors of the wind farm nodes to obtain the meteorological features at the site scale, including: Each wind farm is treated as a node in the second graph structure, and a masking matrix for each wind farm node is constructed; wherein, the masking matrix of the wind farm node is located at... matrix elements at the location The calculation formula is as follows: In the formula, h and w These are indexes for longitude and latitude, respectively. Based on the masking matrix of the wind farm nodes, the formula for calculating the feature vector of the wind farm nodes is as follows: In the formula, For wind farm a The feature vector of a node; Based on wind farm a The feature vectors of the nodes are calculated using the following formula to obtain the wind farm's feature vectors. Meteorological characteristics at the station scale of the node: In the formula, It is a wind farm a Nodes and wind farms b Attention weights of nodes; It is a weight matrix; g b It is a wind farm b The feature vector of a node; It is the Sigmoid activation function; It is a wind farm a The set of adjacent nodes of a node; wind farm a Nodes and wind farms b The formula for calculating the attention weight of a node is: In the formula, exp is the natural exponential function; It is an attention parameter vector used to calculate the attention score between nodes; It is the set of adjacent nodes. , In order to select with wind farm Most relevant front One wind farm, the wind farm obtained The set of prior nodes, The number of prior nodes. To calculate wind farm Attention weights with other nodes, before selection One wind farm, the resulting wind farm A dynamic set of nodes. This represents the number of dynamic nodes.
7. The short-term wind power forecasting method according to any one of claims 1 to 6, characterized in that, After establishing the multi-task cluster power prediction framework, the method further includes: The multi-task cluster power prediction framework is trained based on the set total loss function, and cluster power prediction is realized based on the trained multi-task cluster power prediction framework; wherein, the total loss function is the weighted sum of the losses of the direct prediction task, the indirect prediction task and the fusion prediction task. Loss function for direct prediction task for: In the formula, yes Direct prediction of cluster power at any given time; yes The actual value of cluster power at any given time; T It is the time length of the sample; Loss function for indirect prediction task for: In the formula, yes Indirect prediction of cluster power at any given time; It is the first The predicted value for each wind farm; I It refers to the number of wind farms; The loss function of the fusion prediction task for: In the formula, yes Cluster power fusion prediction at any given time.
8. A short-term wind power prediction device, characterized in that, The device includes: The importance matrix calculation unit is configured to acquire numerical weather forecast data and calculate the meteorological feature importance matrix based on the numerical weather forecast data. The global feature extraction unit is configured to perform weighted, decomposed, transformed and combined operations on the numerical weather forecast data based on the meteorological feature importance matrix to obtain global-scale meteorological features. The cluster feature extraction unit is configured to divide all wind farms into multiple clusters, with each cluster as a cluster node in the first graph structure. Based on the upgraded meteorological feature importance matrix, the unit calculates the feature vector of each cluster node and performs graph attention operation on the feature vector of the cluster node to obtain cluster-scale meteorological features. The site feature extraction unit is configured to treat each wind farm as a wind farm node in the second graph structure, calculate the characteristic vector of each wind farm node based on the upgraded meteorological feature importance matrix, and perform graph attention operation on the characteristic vector of the wind farm node to obtain the site-scale meteorological features. The feature fusion unit is configured to splice the global-scale meteorological features, cluster-scale meteorological features and station-scale meteorological features in the same dimension to obtain fused meteorological features; A multi-task learning unit is configured to establish a multi-task cluster power prediction framework. This framework takes the fused meteorological features as input and outputs a predicted cluster power. The framework includes a direct prediction task, an indirect prediction task, and a fusion prediction task. The direct prediction task directly outputs the predicted value of the cluster power. The indirect prediction task outputs the predicted value for each wind farm, and the cluster power is indirectly predicted by accumulating the predicted values for each wind farm. The fusion prediction task fuses the outputs of the direct and indirect prediction tasks through a fully connected layer to obtain a fused predicted value of the cluster power. This fused predicted value of the cluster power is used as the predicted cluster power output by the multi-task cluster power prediction framework.
9. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes the computer execution instructions stored in the memory to implement the short-term wind power prediction method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the short-term wind power prediction method as described in any one of claims 1-7.
Citation Information
Patent Citations
Wind power cluster power ultra-short-term prediction model establishment method
CN116894504A
Short-term wind power cluster power prediction method supporting conventional meteorological typing and extreme weather small sample expansion
CN119990797A