Regional wind power prediction method and device, equipment and storage medium
Through the use of space -time TRANSFORMER models in regional wind power predictions, to extract the space -time characteristics of wind farm data, solve the problem of limited accuracy and data information loss in existing technology, and achieve higher prediction accuracy and robustness.
Patent Information
- Application Number
- CN202411489948.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-01-24
AI Technical Summary
The existing rising scale matching methods have problems such as limited accuracy and loss of data information in regional wind power prediction, especially when wind farms fluctuate greatly due to sudden weather changes, the prediction quality is significantly reduced.
The spatiotemporal Transformer model is used to extract the spatiotemporal characteristics of the wind field data in the region through the spatial Transformer module and the time Transformer module, and the regional wind power power is predicted through the encoder.
It improves the accuracy of regional wind power power prediction results, can more effectively capture the complex spatiotemporal correlations in wind power data, and enhances the robustness of predictions.
Smart Images

Figure CN119358597A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wind power prediction, and in particular to a regional wind power prediction method, device, equipment and computer-readable storage medium. Background Art
[0002] The wind power prediction system is crucial to the dispatching and management of the power grid. It provides a key basis for the grid company to formulate grid-connected power generation plans and directly affects its dispatching decisions. Regional wind power prediction usually uses upscaling matching technology, selects wind farms with excellent performance in the region as a benchmark, and calculates the total wind power of the entire region through multiplication or deep learning methods.
[0003] As a prediction method, the upscaling matching method is similar to the prediction of a single wind farm in terms of calculation method, but it has shortcomings in practical applications. On the one hand, the volatility of wind farms is greater than that of wind power clusters, which results in the accuracy of cluster prediction based on upscaling matching being limited to the prediction accuracy of a single station. In particular, when wind farms experience large fluctuations due to sudden weather changes, the quality of the overall cluster prediction will be significantly reduced. On the other hand, the upscaling matching method isolates each wind farm in the cluster, ignoring the relationship between them and the overall smoothness of regional wind power output, thereby losing the rich data information within the cluster. Summary of the invention
[0004] The purpose of the present invention is to provide a regional wind power prediction method, device, equipment and computer-readable storage medium, which are applied to the field of wind power prediction. The method constructs a spatiotemporal Transformer model for regional wind power prediction. The spatiotemporal Transformer model includes a spatial Transformer module and a temporal Transformer module to extract the spatiotemporal characteristics of wind field data in the region, and predicts regional wind power through an encoder, thereby improving the accuracy of regional wind power prediction results.
[0005] In order to solve the above technical problems, the present invention provides a regional wind power prediction method, comprising:
[0006] Select a target area, divide the target area into grids, and obtain real-time meteorological data, geographic information data, and historical power data of wind turbines at various time points within the grids;
[0007] Inputting the geographic information data into a spatial Transformer module including a location embedding layer in the prediction model to extract spatial domain interaction features;
[0008] Inputting the real-time meteorological data and the historical power data at each time point into the temporal Transformer module including the time embedding layer in the prediction model to extract the temporal attention features;
[0009] The spatial domain interaction features and the temporal domain attention features are fused and then input into the decoder of the prediction model to obtain the regional predicted wind power within a preset time period.
[0010] Optionally, the step of fusing the spatial interaction feature and the temporal attention feature and inputting the feature into a decoder of the prediction model to obtain the output of the regional predicted wind power within a preset time period includes:
[0011] Generate random Gaussian noise through the random noise module;
[0012] The random Gaussian noise, the spatial domain interaction feature and the temporal domain attention feature are subjected to feature fusion to obtain a fusion feature;
[0013] The fusion feature is input into the decoder of the prediction model to obtain the output of the regional predicted wind power within the preset time period.
[0014] Optionally, the method further includes:
[0015] Determine the model loss value according to the regional wind power within the preset time period and the regional predicted wind power;
[0016] Model parameters of the prediction model are updated based on the model loss value.
[0017] Optionally, the step of fusing the spatial interaction feature and the temporal attention feature and inputting the feature into a decoder of the prediction model to obtain the output of the regional predicted wind power within a preset time period includes:
[0018] The spatial domain interaction features and the temporal domain attention features are concatenated or weightedly fused and then input into the decoder of the prediction model to obtain the regional predicted wind power within a preset time period.
[0019] Optionally, the acquisition of real-time meteorological data, geographic information data and historical power data of wind turbines at various time points in each grid includes:
[0020] Acquire the real-time meteorological data, the geographic information data and the historical power data of the wind turbine at each time point in each grid;
[0021] The real-time meteorological data, the geographic information data and the historical power data are subjected to missing value processing, outlier processing and data normalization processing.
[0022] Optionally, the first self-attention layer of the temporal Transformer module is a masked self-attention layer.
[0023] Optionally, the real-time meteorological data includes wind speed, wind direction, temperature and air pressure; and the geographic information data includes grid coordinates.
[0024] In order to solve the above technical problems, the present invention provides a regional wind power prediction device, comprising:
[0025] The first module is used to select a target area, divide the target area into grids, and obtain real-time meteorological data, geographic information data, and historical power data of wind turbines at various time points within the grids;
[0026] The second module is used to input the geographic information data into a spatial Transformer module containing a location embedding layer in the prediction model to extract spatial domain interaction features;
[0027] The third module is used to input the real-time meteorological data and the historical power data at each time point into the time Transformer module containing the time embedding layer in the prediction model to extract the time domain attention features;
[0028] The fourth module is used to perform feature fusion on the spatial domain interaction feature and the temporal domain attention feature and input the feature into the decoder of the prediction model to obtain the regional predicted wind power within a preset time period as an output.
[0029] In order to solve the above technical problems, the present invention provides a regional wind power prediction device, comprising:
[0030] Memory, for storing computer programs;
[0031] A processor is used to implement the above-mentioned regional wind power prediction method when executing the computer program.
[0032] In order to solve the above technical problems, the present invention provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the above-mentioned regional wind power prediction method is implemented.
[0033] It can be seen that the method of the present invention selects a target area, divides the target area into grids, obtains real-time meteorological data, geographic information data and historical power data of wind turbines at various time points in the grid; inputs the geographic information data into the spatial Transformer module containing a position embedding layer in the prediction model to extract spatial interaction features; inputs the real-time meteorological data and historical power data at various time points into the temporal Transformer module containing a temporal embedding layer in the prediction model to extract temporal attention features; and inputs the spatial interaction features and the temporal attention features into the decoder of the prediction model after feature fusion to obtain the regional predicted wind power within the preset time period. The method of the present invention constructs a spatiotemporal Transformer model for regional wind power prediction. The spatiotemporal Transformer model includes a spatial Transformer module and a temporal Transformer module to extract the spatiotemporal features of wind field data in the region, and predicts regional wind power through an encoder, thereby improving the accuracy of regional wind power prediction results compared to the upscaling matching method. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0035] Figure 1 A flow chart of a regional wind power prediction method provided by an embodiment of the present invention;
[0036] Figure 2 This is a structural block diagram of a regional wind power prediction device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] The wind power prediction system is crucial to the dispatching and management of the power grid. It provides a key basis for power grid companies to formulate grid-connected power generation plans and directly affects their dispatching decisions. Wind power prediction is mainly divided into two levels: wind farm level and provincial / municipal level. The power prediction of wind farms mainly relies on historical actual power data and meteorological information, and is predicted through intelligent algorithm models, and updated using real-time data. Regional wind power prediction usually uses upscaling matching technology, selects wind farms with excellent performance in the region as benchmarks, and calculates the total wind power of the entire region through multiplication or deep learning methods. In recent years, with the advancement of deep learning technology, convolutional neural networks and graph convolutional neural networks have been used to extract spatial features. However, these methods still have shortcomings in extracting the spatiotemporal correlation of multiple information in the region.
[0039] To solve these problems, this paper proposes a neural network prediction method based on the spatiotemporal Transformer architecture. This method takes into account the interaction of spatiotemporal features and deeply explores the complex spatiotemporal correlations in wind power data to improve the accuracy of prediction. Through this method, the ultra-short-term output prediction of wind power clusters can be more effectively carried out, thereby providing more reliable support for power grid dispatching.
[0040] The following combination Figure 1 , Figure 1 A flowchart of a regional wind power prediction method provided by an embodiment of the present invention, the method may include:
[0041] S101: Select a target area, divide the target area into grids, and obtain real-time meteorological data, geographic information data, and historical power data of wind turbines at various time points within the grids.
[0042] The fluctuation of regional wind power is deeply influenced by weather systems and is closely linked to temporal evolution and geographical location. Wind power not only shows autocorrelation trends in time, but also shows correlations in spatial distribution. The wind power output at a specific location is not only affected by the location of the local wind farm, but also by environmental factors such as temperature and air pressure.
[0043] Therefore, in this embodiment, a target area may be first selected, the target area may be divided into grids, and real-time meteorological data, geographic information data, and historical power data of wind turbines at various time points within the grids may be obtained.
[0044] The target area in this embodiment may cover multiple wind farm areas. This embodiment may perform grid division on the wind farm areas in the target area. This embodiment does not limit the specific method of grid division. Generally, a specific wind farm area is selected as the target area for power prediction. Through geographic information system technology, the target area is divided into grids of equal size and regular shape.
[0045] After the grid division is completed, the present embodiment can obtain the spatiotemporal information in each grid, that is, can obtain the real-time meteorological data, geographic information data and historical power data of the wind turbine at each time point in the grid. The present embodiment does not limit the specific type of real-time meteorological data, which can generally be wind speed, wind direction, temperature and air pressure, etc., which can be determined based on actual applications. The present embodiment does not limit the specific type of geographic information data, which can generally be information representing the relative position between grids, such as grid coordinates in the target area.
[0046] In order to improve the accuracy of model prediction, this embodiment can perform data preprocessing after obtaining real-time meteorological data, geographic information data and historical power data of wind turbines at various time points, such as performing missing value processing, outlier processing and data normalization processing on real-time meteorological data, geographic information data and historical power data. This embodiment does not limit the specific method of performing missing value processing, outlier processing and data normalization processing, which can be determined based on actual applications.
[0047] S102: The geographic information data is input into the spatial Transformer module including the location embedding layer in the prediction model to extract the spatial domain interaction features.
[0048] In this embodiment, a prediction model including a conditional embedding layer and stacked spatiotemporal Transformer modules can be constructed to predict regional wind power. Transformer is a deep learning architecture based on a self-attention mechanism. The self-attention mechanism allows the model to capture the relationship between words when processing an input sequence, allowing the model to focus on all parts of the input sequence rather than just local information.
[0049] There is a spatial Transformer module in the prediction model that contains a position embedding layer. The position embedding layer is used for position encoding to encode the location information of each grid into the prediction model, ensuring that the prediction model can identify the potential impact of different geographical locations on wind power. Position encoding provides the model with the location information of each element in the sequence.
[0050] The spatial transformer module uses the self-attention mechanism to calculate the spatial attribute value vector of each grid. In this embodiment, the geographic information data is input into the spatial transformer module containing the position embedding layer in the prediction model to extract the spatial interaction features. The spatial transformer module can extract spatial features through multi-head self-attention and feedforward networks, and use residual connections to maintain the stability of the deep network.
[0051] By adopting multi-head attention technology, spatial features are extracted from multiple angles and scales, enhancing the model's ability to understand complex spatial patterns; by using a feedforward network to further process the output of the self-attention layer, more refined spatial features are extracted to provide support for subsequent time series analysis; by using residual connections to solve the gradient vanishing problem in deep learning, the stability and effectiveness of the deep network are ensured.
[0052] S103: Input the real-time meteorological data and the historical power data at each time point into the temporal Transformer module including the time embedding layer in the prediction model to extract the time domain attention features.
[0053] Since wind power data is essentially spatiotemporal series data obtained from observations of wind farms distributed in different geographical locations, it is not only embedded in a continuous space, but also has temporal and spatial correlations. When making regional wind power forecasts, it is necessary to consider both the temporal dependency of wind power signals and the interdependence of the spatial dimensions of various wind farms, which will change dynamically over time.
[0054] In this embodiment, a time Transformer module can be designed to further extract time features, and a time embedding layer is introduced to enhance the model's ability to capture time series features. Similar to the spatial module, the self-attention mechanism is also used to capture dynamic changes in the time series. Time embedding is to map the timestamp to a high-dimensional space to capture the periodicity and trend characteristics of time. The timestamp in this embodiment is the time points of historical power data collection.
[0055] In this embodiment, real-time meteorological data and historical power data at each time point are input into a temporal Transformer module including a time embedding layer in the prediction model to extract time-domain attention features.
[0056] In this embodiment, the first self-attention layer of the decoder of the temporal Transformer module can be a masked self-attention layer. The first self-attention layer of the decoder uses a masking mechanism to prevent information of future positions from flowing into the prediction of the current position. This embodiment does not limit the specific masking method. Generally, sequence masking can be achieved by constructing a lower triangular matrix.
[0057] S104: The spatial domain interaction features and the temporal domain attention features are fused and input into the decoder of the prediction model to obtain the regional predicted wind power within a preset time period.
[0058] In this embodiment, the time-domain attention features extracted by the time Transformer module and the spatial-domain interaction features extracted by the space Transformer module can be fused for spatio-temporal features, and the spatial-domain interaction features and the time-domain attention features can be fused and input into the decoder of the prediction model to obtain the regional predicted wind power within the preset time period.
[0059] This embodiment does not limit the specific method of feature fusion. Generally, the spatial domain interaction features and the time domain attention features can be concatenated or weighted fused and then input into the decoder of the prediction model to obtain the regional predicted wind power within a preset time period.
[0060] Furthermore, in order to cope with the inevitable uncertainty in the prediction process, the present invention introduces a random noise module. This module provides a mechanism for the model to handle uncertainty by simulating random fluctuations in nature. By outputting random Gaussian noise, the model can take into account various random factors that may exist in the prediction process, so that the prediction results are closer to the actual situation. This processing method not only enhances the model's adaptability to random fluctuations, but also significantly improves the robustness of the prediction results, and can provide stable and reliable predictions even in the face of complex and changeable meteorological conditions.
[0061] Specifically, this embodiment can generate random Gaussian noise through a random noise module; obtain fused features by fusing the random Gaussian noise, spatial interaction features and time-domain attention features; input the fused features into a decoder of a prediction model to obtain an output of regional predicted wind power within a preset time period.
[0062] In the feature fusion process, environmental factors, meteorological data, and historical power data are embedded into the spatiotemporal features, and feature extraction is performed through the fully connected layer. This embodiment can utilize the real-time fine-tuning capability of the model, dynamically adjust the model parameters according to the latest data, integrate the prediction results from different grids and different models, obtain a more comprehensive wind power prediction data tensor, and improve the accuracy and robustness of the prediction. Specifically, this embodiment can determine the model loss value based on the regional wind power (true value) and the regional predicted wind power within a preset time period; and update the model parameters of the prediction model based on the model loss value.
[0063] Based on the above embodiments, the method of the present invention constructs a spatiotemporal Transformer model for regional wind power prediction. The spatiotemporal Transformer model includes a spatial Transformer module and a temporal Transformer module to extract the spatiotemporal characteristics of wind field data in the region, and predicts regional wind power through an encoder. Compared with the upscaling matching method, the accuracy of the regional wind power prediction results is improved.
[0064] The following combination Figure 2 , Figure 2 A structural block diagram of a regional wind power prediction device provided by an embodiment of the present invention, the device may include:
[0065] The first module 100 is used to select a target area, divide the target area into grids, and obtain real-time meteorological data, geographic information data, and historical power data of wind turbines at various time points within the grids;
[0066] The second module 200 is used to input the geographic information data into a spatial Transformer module including a location embedding layer in a prediction model to extract spatial domain interaction features;
[0067] The third module 300 is used to input the real-time meteorological data and the historical power data at each time point into the time Transformer module including the time embedding layer in the prediction model to extract the time domain attention features;
[0068] The fourth module 400 is used to perform feature fusion on the spatial domain interaction feature and the temporal domain attention feature and input the resultant feature into the decoder of the prediction model to obtain the regional predicted wind power within a preset time period as an output.
[0069] Based on the above embodiments, the present invention constructs a spatiotemporal Transformer model for regional wind power prediction. The spatiotemporal Transformer model includes a spatial Transformer module and a temporal Transformer module to extract the spatiotemporal characteristics of wind field data in the region, and predicts regional wind power through an encoder. Compared with the upscaling matching method, the accuracy of the regional wind power prediction results is improved.
[0070] Based on the above embodiment, the fourth module 400 may include:
[0071] The first unit is used to generate random Gaussian noise through a random noise module;
[0072] The second unit is used to fuse the random Gaussian noise, the spatial domain interaction feature and the temporal domain attention feature to obtain a fused feature;
[0073] The third unit is used to input the fusion feature into the decoder to obtain the output of the regional predicted wind power within the preset time period.
[0074] Based on the above embodiments, the device may further include:
[0075] A fifth module is used to determine the model loss value according to the regional wind power within the preset time period and the regional predicted wind power;
[0076] The sixth module is used to update the model parameters of the prediction model based on the model loss value.
[0077] Based on the above embodiments, the fourth module 400 may include:
[0078] The fourth unit is used to perform feature splicing or weighted fusion on the spatial domain interaction features and the temporal domain attention features, and then input the features into the decoder of the prediction model to obtain the regional predicted wind power within a preset time period as an output.
[0079] Based on the above embodiments, the first module 100 may include:
[0080] A fifth unit is used to obtain the real-time meteorological data, the geographic information data and the historical power data of the wind turbine at each time point in each grid;
[0081] The sixth unit is used to perform missing value processing, abnormal value processing and data normalization processing on the real-time meteorological data, the geographic information data and the historical power data.
[0082] Based on the above embodiments, the first self-attention layer of the temporal Transformer module is a masked self-attention layer.
[0083] Based on the above embodiments, the real-time meteorological data includes wind speed, wind direction, temperature and air pressure; the geographic information data includes grid coordinates.
[0084] Based on the above embodiments, the present invention further provides a regional wind power prediction device, which may include a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps provided in the above embodiments may be implemented. Of course, the device may also include various necessary network interfaces, power supplies, and other components.
[0085] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by an execution terminal or a processor, the method provided in the embodiment of the present invention can be implemented; the storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0086] In this article, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
Claims
1. A regional wind power prediction method, characterized in that: include: Select a target area, divide the target area into grids, and obtain real-time meteorological data, geographic information data, and historical power data of wind turbines at various time points within the grids; Inputting the geographic information data into a spatial Transformer module including a location embedding layer in the prediction model to extract spatial domain interaction features; Inputting the real-time meteorological data and the historical power data at each time point into the temporal Transformer module including the time embedding layer in the prediction model to extract the temporal attention features; The spatial domain interaction features and the temporal domain attention features are fused and then input into the decoder of the prediction model to obtain the regional predicted wind power within a preset time period.
2. The regional wind power prediction method according to claim 1, characterized in that: The step of fusing the spatial interaction feature and the temporal attention feature and inputting the feature into the decoder of the prediction model to obtain the output of the regional predicted wind power within the preset time period includes: Generate random Gaussian noise through the random noise module; The random Gaussian noise, the spatial domain interaction feature and the temporal domain attention feature are subjected to feature fusion to obtain a fusion feature; The fusion feature is input into the decoder of the prediction model to obtain the output of the regional predicted wind power within the preset time period.
3. The regional wind power prediction method according to claim 1, characterized in that: Also includes: Determine the model loss value according to the regional wind power within the preset time period and the regional predicted wind power; Model parameters of the prediction model are updated based on the model loss value.
4. The regional wind power prediction method according to claim 1, characterized in that: The step of fusing the spatial interaction feature and the temporal attention feature and inputting the feature into the decoder of the prediction model to obtain the output of the regional predicted wind power within the preset time period includes: The spatial domain interaction features and the temporal domain attention features are concatenated or weightedly fused and then input into the decoder of the prediction model to obtain the regional predicted wind power within a preset time period.
5. The regional wind power prediction method according to claim 1, characterized in that: The acquisition of real-time meteorological data, geographic information data and historical power data of wind turbines at various time points in each grid includes: Acquire the real-time meteorological data, the geographic information data and the historical power data of the wind turbine at each time point in each grid; The real-time meteorological data, the geographic information data and the historical power data are subjected to missing value processing, outlier processing and data normalization processing.
6. The regional wind power prediction method according to claim 1, characterized in that: The first self-attention layer of the temporal Transformer module is a masked self-attention layer.
7. The regional wind power prediction method according to claim 1, characterized in that: The real-time meteorological data includes wind speed, wind direction, temperature and air pressure; the geographic information data includes grid coordinates.
8. A regional wind power prediction device, characterized in that: include: The first module is used to select a target area, divide the target area into grids, and obtain real-time meteorological data, geographic information data, and historical power data of wind turbines at various time points within the grids; The second module is used to input the geographic information data into a spatial Transformer module including a location embedding layer in the prediction model to extract spatial domain interaction features; The third module is used to input the real-time meteorological data and the historical power data at each time point into the time Transformer module containing the time embedding layer in the prediction model to extract the time domain attention features; The fourth module is used to perform feature fusion on the spatial domain interaction feature and the temporal domain attention feature and input the feature into the decoder of the prediction model to obtain the regional predicted wind power within a preset time period as an output.
9. A regional wind power prediction device, characterized in that: include: Memory, for storing computer programs; A processor, configured to implement the regional wind power prediction method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the regional wind power prediction method according to any one of claims 1 to 7 is implemented.