Construction Method, Device, Equipment, Medium and Prediction Method of Wind Farm Prediction Model
By constructing a wind field prediction model based on prediction neural network, using multi-layer hidden state extraction units and feature prediction units, the problems of traditional wind field prediction methods in accuracy and computing resource consumption are solved, and more efficient and accurate wind field prediction is achieved.
Patent Information
- Application Number
- CN202210598158.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2042-05-30
AI Technical Summary
Traditional wind field prediction methods are based on physical modeling, resulting in low accuracy in prediction time, spatial resolution and prediction accuracy, and high computing resources consumption.
The wind field prediction model construction method based on prediction neural network is adopted. By obtaining the wind speed distribution sample images of multiple training samples, the prediction neural network is trained to build a wind field prediction model composed of encoder and decoder. The model includes a multi-layer hidden state extraction unit and a feature prediction unit, which improves the accuracy of wind field prediction through spatiotemporal feature extraction and prediction.
It significantly improves the prediction accuracy of wind field prediction, reduces the consumption of computing resources, and improves the economicality of wind energy utilization.
Smart Images

Figure CN114970855B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular, to a method, device, equipment, medium and prediction method for constructing a wind field prediction model. Background Art
[0002] Wind energy plays an important role in the development of new energy. However, due to the intermittent, random and sudden change characteristics of wind speed, it seriously affects the stability of wind power generation, bringing severe challenges to the safe, stable and economic operation of large-scale wind power grid connection. To address the above challenges, the primary prerequisite is to ensure high-precision prediction of wind speeds at various points in the wind field. High-precision wind field prediction can provide a reference for dispatchers to formulate power generation plans, timely adjust the dispatch plan, find the optimal unit combination plan, and then achieve the balance between power supply and demand, prevent waste caused by excessive wind resources during low-load periods, and ensure the economy of wind energy grid connection. Therefore, accurate wind field prediction is particularly important in the field of wind energy utilization.
[0003] In the related art, traditional wind field prediction methods mainly achieve wind speed prediction based on physical modeling. The physical modeling method mainly establishes a dynamic equation set of atmospheric motion according to Newton's law, fluid mechanics and thermodynamics, and solves the dynamic equations of relevant meteorological elements (such as wind speed, temperature, humidity, etc.) under the given initial atmospheric conditions to estimate the wind speed. However, the traditional method based on physical models not only consumes a large amount of computing resources when solving the equation set, but also its accuracy in prediction time, spatial resolution and prediction accuracy is not high.
[0004] Therefore, there is an urgent need for a new method for wind field prediction. Summary of the Invention
[0005] To solve the problem of low prediction accuracy of the original wind field prediction method, the embodiments of the present invention provide a method, device, equipment, medium and prediction method for constructing a wind field prediction model.
[0006] In a first aspect, the embodiments of the present invention provide a method for constructing a wind field prediction model, including:
[0007] Obtain a plurality of training samples, where the training samples include a plurality of wind speed distribution sample images, and the time intervals of each wind speed distribution sample image in the plurality of wind speed distribution sample images are equal;
[0008] Using multiple wind speed distribution sample images that are earlier in time and temporally continuous in the training samples as inputs, and using multiple wind speed distribution sample images that are later in time and continuous with the wind speed distribution sample images used as inputs as outputs, training a prediction neural network to construct a wind field prediction model; the prediction neural network includes: an encoder and a decoder; the decoder includes multiple feature prediction units; the number of feature prediction units is equal to the number of wind speed distribution sample images used as outputs.
[0009] Preferably, the encoder includes multiple hidden state extraction units; the multiple feature prediction units are connected in series;
[0010] The training of the prediction neural network includes:
[0011] Inputting the multiple wind speed distribution sample images used as inputs into the encoder to use each hidden state extraction unit to perform hidden state extraction of the corresponding layer on the multiple wind speed distribution sample images;
[0012] When extracting the hidden state of the target wind speed distribution sample image corresponding to the latest time among the inputs, inputting the hidden state of the corresponding layer output by each hidden state extraction unit and the target wind speed distribution sample image corresponding to the latest time among the inputs into the decoder to use the multiple feature prediction units to output multiple temporally continuous wind speed distribution prediction sample images one by one; the time of the multiple wind speed distribution prediction sample images is later than the time of the target wind speed distribution sample image and is temporally continuous;
[0013] According to the multiple wind speed distribution prediction sample images and the multiple wind speed distribution sample images used as outputs, adjusting the network parameters of the prediction neural network until a wind field prediction model that meets the expectations is obtained.
[0014] Preferably, the multiple hidden state extraction units are connected in series;
[0015] Each hidden state extraction unit performs hidden state extraction of the corresponding level on the multiple wind speed distribution sample images in the following manner:
[0016] Sequentially obtain the spatio-temporal features of each wind speed distribution sample image in chronological order, and after obtaining the spatio-temporal features of the current wind speed distribution sample image, use the spatio-temporal features to update the hidden state of the current level, and send the spatio-temporal features to the hidden state extraction unit of the higher level connected in series with it.
[0017] Preferably, each feature prediction unit includes multiple feature prediction modules corresponding one by one to the multiple hidden state extraction modules;
[0018] Each feature prediction unit outputs a predicted sample image of wind speed distribution in the following manner:
[0019] For each feature prediction module in the feature prediction unit, the following operations are performed:
[0020] Obtain the spatio-temporal features of the input image, and send the spatio-temporal features to a lower-level feature prediction module connected in series therewith; update the hidden state of the current level according to the spatio-temporal features and the hidden state of the corresponding level of the input, and send the updated hidden state of the current level to the next feature prediction unit connected in series with the output end of the feature prediction unit;
[0021] The lowest-level feature prediction module in the feature prediction unit also outputs a predicted sample image of wind speed distribution according to the received spatio-temporal features, and inputs the output predicted sample image of wind speed distribution to the next feature prediction unit.
[0022] Preferably, adjusting the network parameters of the prediction neural network according to the multiple predicted sample images of wind speed distribution and the multiple sample images of wind speed distribution as the output includes:
[0023] For each feature prediction unit, adjust the network parameters of the feature prediction unit according to the predicted sample image of wind speed distribution output by the feature prediction unit and the sample image of wind speed distribution at the corresponding time as the output.
[0024] In a second aspect, an embodiment of the present invention further provides a prediction method for wind field prediction using a wind field prediction model constructed by the construction method of any wind field prediction model described in this specification, including:
[0025] Obtain a plurality of sample images of wind speed distribution in a historical time series;
[0026] Input the plurality of sample images of wind speed distribution in the historical time series into the wind field prediction model;
[0027] Receive a plurality of predicted sample images of wind speed distribution of the next time series of the historical time series output by the wind field prediction model.
[0028] In a third aspect, an embodiment of the present invention further provides a construction device for a wind field prediction model, including:
[0029] An acquisition module, configured to acquire a plurality of training samples, where the training samples include a plurality of sample images of wind speed distribution, and the time intervals of each sample image of wind speed distribution in the plurality of sample images of wind speed distribution are equal;
[0030] A building block for training a prediction neural network to construct a wind field prediction model by using multiple temporally earlier and temporally continuous wind speed distribution sample images in the training samples as inputs and using multiple wind speed distribution sample images that are temporally later and continuous with the wind speed distribution sample images used as inputs in the training samples as outputs; the prediction neural network includes: an encoder and a decoder; the decoder includes multiple feature prediction units; the number of feature prediction units is equal to the number of wind speed distribution sample images used as outputs.
[0031] Fourthly, an embodiment of the present invention further provides a wind field prediction device, including:
[0032] A sequence acquisition module for acquiring a plurality of wind speed distribution sample images of a historical time series;
[0033] An input module for inputting a plurality of wind speed distribution sample images of a historical time series into the wind field prediction model; the wind field prediction model is constructed by using the construction method of any one of the wind field prediction models of the present invention;
[0034] A prediction module for receiving a plurality of wind speed distribution prediction sample images of the next time series of the historical time series output by the wind field prediction model.
[0035] Fifthly, an embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method described in any embodiment of this specification is implemented.
[0036] Sixthly, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed on a computer, the computer is made to execute the method described in any embodiment of this specification.
[0037] An embodiment of the present invention provides a method, device, equipment, medium and prediction method for constructing a wind field prediction model. By using multiple temporally earlier and temporally continuous wind speed distribution sample images in multiple training samples as inputs and using multiple wind speed distribution sample images that are temporally later and continuous with the wind speed distribution sample images used as inputs in the training samples as outputs, a prediction neural network is trained to construct a wind field prediction model; wherein the prediction neural network includes an encoder and a decoder composed of multiple feature prediction units, and spatio-temporal features of the wind speed distribution sample images are extracted and predicted to train a wind field prediction model, so as to improve the prediction accuracy of wind field prediction. Description of the Drawings
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.
[0039] Figure 1 It is a flowchart of a method for constructing a wind field prediction model provided by an embodiment of the present invention;
[0040] Figure 2 It is a schematic structural diagram of an encoder and a decoder provided by an embodiment of the present invention;
[0041] Figure 3 It is a schematic structural diagram of a feature prediction unit provided by an embodiment of the present invention;
[0042] Figure 4 It is a hardware architecture diagram of an electronic device provided by an embodiment of the present invention;
[0043] Figure 5 It is a structural diagram of a device for constructing a wind field prediction model provided by an embodiment of the present invention;
[0044] Figure 6 It is a hardware architecture diagram of another electronic device provided by an embodiment of the present invention;
[0045] Figure 7 It is a structural diagram of a wind field prediction device provided by an embodiment of the present invention. Detailed implementation manners
[0046] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, rather than all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
[0047] As mentioned above, in the related art, traditional wind field prediction methods mainly rely on physical modeling to achieve wind speed prediction. The physical modeling method mainly establishes a dynamic equation set of atmospheric motion according to Newton's law, fluid mechanics, and thermodynamics, and solves the dynamic equations of relevant meteorological elements (such as wind speed, temperature, humidity, etc.) under the given initial atmospheric conditions to estimate the wind speed. However, the traditional method based on the physical model not only consumes a large amount of computing resources when solving the equation set, but also its accuracy in prediction time, spatial resolution, and prediction accuracy is not high.
[0048] To solve the above technical problems, the inventor may first consider obtaining a plurality of training samples including a plurality of wind speed distribution sample images that are earlier in time and temporally continuous as inputs and a plurality of wind speed distribution sample images that are later in time and continuous with the wind speed distribution sample images used as inputs as outputs. Then, a prediction neural network including an encoder and a decoder composed of a plurality of feature prediction units is used to extract and predict the spatio-temporal features of the wind speed distribution sample images of the plurality of training samples, so as to train and obtain a wind field prediction model. Since the wind field prediction model is constructed based on the spatio-temporal features of the wind speed distributions of a plurality of meteorological grid points in the wind field, the prediction accuracy of the wind field prediction can be significantly improved.
[0049] The following describes the specific implementation manners of the above concept.
[0050] Please refer to Figure 1 , an embodiment of the present invention provides a method for constructing a wind field prediction model, and the method includes:
[0051] Step 100: Obtain a plurality of training samples, where the training samples include a plurality of wind speed distribution sample images, and the time intervals of each wind speed distribution sample image in the plurality of wind speed distribution sample images are equal;
[0052] Step 102: Use a plurality of temporally earlier and temporally continuous wind speed distribution sample images in the training samples as inputs, and use a plurality of temporally later and continuous wind speed distribution sample images in the training samples with the wind speed distribution sample images used as inputs as outputs to train the prediction neural network, so as to construct a wind field prediction model; the prediction neural network includes: an encoder and a decoder; the decoder includes a plurality of feature prediction units; the number of feature prediction units is equal to the number of wind speed distribution sample images used as outputs.
[0053] In an embodiment of the present invention, a plurality of temporally earlier and temporally continuous wind speed distribution sample images in the plurality of training samples are used as inputs, and a plurality of temporally later and continuous wind speed distribution sample images in the training samples with the wind speed distribution sample images used as inputs are used as outputs to train the prediction neural network, so as to construct a wind field prediction model; where the prediction neural network includes an encoder and a decoder composed of a plurality of feature prediction units, and the spatio-temporal features of the wind speed distribution sample images are extracted and predicted to train and obtain a wind field prediction model, thereby improving the prediction accuracy of the wind field prediction.
[0054] The following describes Figure 1 the execution manners of the respective steps shown.
[0055] Regarding step 100:
[0056] In the embodiments of the present invention, each wind speed distribution sample image among the multiple training samples obtained is a grid-type spatial distribution image data, namely the CAMS dataset. The wind speed distribution data of this dataset is evenly distributed geospatially, that is, grid-type, contains the wind speed spatial distribution characteristics of each region to be studied, and has high resolution and high accuracy.
[0057] Specifically, the construction method of the training samples is as follows:
[0058] For example, the continuously monitored wind speed distribution data in the CAMS dataset from 2018 to 2021 is selected. Taking 3 hours as a time interval, that is, using the data of 3 hours as a wind speed distribution sample image, and it is a wind speed distribution sample image at one moment. In order to make the number of training samples sufficient, enable the prediction neural network to be fully trained, and improve the prediction accuracy of the wind field prediction model, the sliding window with window overlap is used to segment the wind speed distribution data from 2018 to 2021. Each 3 hours is a unit length, and every 16 consecutive wind speed distribution sample images are used as a sequence. For example, the input sequence data of the first training sample is 16 wind speed distribution sample images at 16 moments from the zero moment on January 1, 2018 to the 21st moment on January 2, 2018, and the output sequence data is 16 wind speed distribution sample images at 16 moments from the zero moment on January 3, 2018 to the 24th moment on January 4, 2018; sliding backward by one image moment, that is, 3 hours, then the input sequence data of the second training sample is 16 wind speed distribution sample images at 16 moments from the 3rd moment on January 1, 2018 to the zero moment on January 3, 2018, and the output sequence data is 16 wind speed distribution sample images at 16 moments from the 3rd moment on January 3, 2018 to the zero moment on January 5, 2018. And so on, the wind speed distribution data is divided into training data, validation data, and test data. The training data, validation data, and test data are segmented according to the ratio of 6:2:2. Since the existing data is continuous in time, each sample image has its corresponding start time. Considering the actual situation, the model usually uses historical data to train the model to predict future data. Therefore, the segmentation of the data should also have a time sequence relationship. Therefore, when training the model, the first 60% of the historical data is used as training data, the next 20% of the data is used as validation data, and the last 20% of the data is used as test data. Then the training data and validation data are shuffled respectively. Shuffling can prevent the wind field prediction model from jittering during the training process, which is beneficial to the robustness of the wind field prediction model, especially when the batch size during training is small. In addition, shuffling the data can also prevent overfitting.
[0059] It should be noted that the number of wind speed distribution sample images in each time series as input, the number of wind speed distribution sample images in each time series as output, and the time interval corresponding to each wind speed distribution sample image can be determined according to the actual situation, so no specific limitation is made. Among them, the number of wind speed distribution sample images in each time series as input and the number of wind speed distribution sample images in each time series as output can be equal or unequal.
[0060] Regarding step 102:
[0061] In some embodiments, the encoder includes multiple layers of hidden state extraction units; the multiple feature prediction units are connected in series.
[0062] As Figure 2 Shown is a schematic structural diagram of the encoder and decoder. In the embodiment of the present invention, the encoder includes three layers of hidden state extraction units. Each layer of hidden state extraction unit includes a convolutional layer and a convolutional gated recurrent unit. In the embodiment of the present invention, there is only one set of three layers of hidden state extraction units in the encoding layer, which is repeatedly executed to perform hidden state extraction on each wind speed distribution sample image as input; while the decoding layer is composed of multiple feature prediction units connected in series, and the number of feature prediction units is equal to the number of wind speed distribution sample images as output.
[0063] It should be noted that there can be only one set of three layers of hidden state extraction units in the encoding layer, or there can be several sets of three layers of hidden state extraction units; similarly, in each set of hidden state extraction units, it can be a three-layer hidden state extraction unit or a single-layer hidden state extraction unit, and no specific limitation is made here.
[0064] In some embodiments, training the prediction neural network may include the following steps S1 - S3:
[0065] S1: Input multiple wind speed distribution sample images as input into the encoder to perform corresponding layer hidden state extraction on the multiple wind speed distribution sample images by using each layer of hidden state extraction units.
[0066] Since the wind speed change has characteristics such as intermittency, mutation, and non-stationarity, the memory state transfer method of most prediction models is unidirectional, which is not conducive to extracting global spatial features. Therefore, in the embodiment of the present invention, multiple layers of hidden state extraction units connected in series are arranged in the encoding layer, which is conducive to the encoding layer extracting multi-level spatial features to improve the prediction accuracy of the wind field prediction model.
[0067] In some embodiments, each layer of hidden state extraction unit performs corresponding layer hidden state extraction on multiple wind speed distribution sample images in the following manner:
[0068] Obtain the spatio-temporal features of each wind speed distribution sample image one by one in chronological order. After obtaining the spatio-temporal features of the current wind speed distribution sample image, use these spatio-temporal features to update the hidden state of the current layer, and send these spatio-temporal features to the hidden state extraction unit of the higher layer connected in series with it.
[0069] In the embodiment of the present invention, each hidden state extraction unit can extract the hidden state of the corresponding layer for multiple wind speed distribution sample images according to the following formula:
[0070]
[0071]
[0072]
[0073]
[0074] where * represents convolution, · represents the Hadamard product, L represents the layer number of the hidden state extraction unit, is the output of the update gate of the L-th layer at time i, is the output of the reset gate of the L-th layer at time i, represents the hidden state update vector of the L-th layer at time i, σ is the first activation function, tanh is the second activation function, W xz 、W hz 、W xr 、W hr 、W xf 、W hf 、 are the network parameters of the encoding layer, represents the spatial feature image extracted from the wind speed distribution sample image of the first time series input at the L-th layer, represents the hidden state obtained by encoding the wind speed distribution sample image corresponding to time i - 1 at the L-th layer, represents the hidden state obtained by encoding the wind speed distribution sample image corresponding to time i at the L-th layer.
[0075] For example, the wind field of a region can be regarded as an image of size M*N, and the value of a certain pixel point in the image represents the magnitude of the wind speed at the meteorological grid point. If X t ∈R M×N×1 represents the observation value of the wind field at time t, then the regional wind field prediction problem can be described as follows: Given J consecutive observed wind speed distribution sample images of the wind field {X t , X t-1 , …, X t-J-1} as input, predict the wind field images {Xt+1 ,X t+2 ,…,X t+T}.
[0076] like Figure 2 As shown, the J wind speed distribution sample images {X t ,X t-1 ,…,X t-J-1 The first hidden state extraction unit of the encoding layer is input one by one in chronological order. First, the wind speed distribution sample image at time tJ-1 is input into the first hidden state extraction unit. The convolution layer of the first hidden state extraction unit performs the first spatial feature extraction on the wind speed distribution sample image at time tJ-1 to obtain In the convolutional gated recurrent unit, random assignment According to the above formula, the hidden state of the first layer hidden state extraction unit at time tJ-1 is obtained and will The second level hidden state extraction unit is sent to the second level hidden state extraction unit in series with it. The second level hidden state extraction unit performs the same steps as the first level hidden state extraction unit to obtain Similarly, the output of the third level hidden state extraction unit is Next, the wind speed distribution sample image at the next moment, i.e., time tJ, is input into the first hidden state extraction unit. The convolution layer of the first hidden state extraction unit performs the first spatial feature extraction on the wind speed distribution sample image at time tJ to obtain In the convolutional gated recurrent unit, based on the tJ-1 moment According to the above formula, the hidden state of the first layer hidden state extraction unit at time tJ is obtained and will The second level hidden state extraction unit is sent to the second level hidden state extraction unit in series with it. The second level hidden state extraction unit performs the same steps as the first level hidden state extraction unit to obtain Similarly, the output of the third level hidden state extraction unit is So, input {X t ,X t-1 ,…,X t-J-1}, and each hidden state extraction unit of the last encoding layer outputs the hidden state of the wind speed distribution sample image at the last moment, that is, at time t.
[0077] S2: When extracting the hidden state of the target wind speed distribution sample image corresponding to the latest time as the input, the hidden state of each layer output by each hidden state extraction unit and the target wind speed distribution sample image corresponding to the latest time as the input are input into the decoder, so as to use multiple feature prediction units to output multiple temporally continuous wind speed distribution prediction sample images one by one; the time of the multiple wind speed distribution prediction sample images is later than the time of the target wind speed distribution sample image and is temporally continuous.
[0078] In the embodiment of the present invention, the hidden state of each layer of the target wind speed distribution sample image corresponding to the latest time as the input output by the encoding layer in step S1 is input into the feature prediction unit at the first moment in the decoder to predict the wind speed distribution prediction sample image at the next moment relative to the target wind speed distribution sample image corresponding to the latest time as the input, so that multiple cascaded feature prediction units predict the wind speed distribution prediction sample images at corresponding moments.
[0079] In some embodiments, each feature prediction unit includes multiple layers of feature prediction modules corresponding one by one to multiple layers of hidden state extraction modules;
[0080] Each feature prediction unit outputs the wind speed distribution prediction sample image in the following manner:
[0081] For each feature prediction module in the feature prediction unit, the following operations are performed:
[0082] Obtain the spatio-temporal features of the input image and send the spatio-temporal features to the lower-level feature prediction module cascaded with it; update the hidden state of the current layer according to the spatio-temporal features and the hidden state of the corresponding layer input, and send the updated hidden state of the current layer to the next feature prediction unit cascaded with the output end of the feature prediction unit;
[0083] The lowest-level feature prediction module in the feature prediction unit also outputs the wind speed distribution prediction sample image according to the received spatio-temporal features and inputs the output wind speed distribution prediction sample image to the next feature prediction unit.
[0084] To improve the prediction accuracy of the wind field prediction model, multiple layers of feature prediction modules corresponding one by one to the multiple layers of hidden state extraction modules of the encoding layer are set in each feature prediction unit. To vertically capture multi-level spatial features, a spatial convolutional gated recurrent unit is set in each feature prediction module to enable the spatial features to be transmitted between multiple layers of feature prediction modules along the vertical direction; to better extract temporal features and update the hidden state along the time sequence, a convolutional gated recurrent unit is set in each feature prediction module to horizontally transmit and update the hidden state along the time axis.
[0085] In the embodiments of the present invention, each layer of the feature prediction module predicts spatio-temporal features layer by layer according to the following formula:
[0086]
[0087]
[0088]
[0089]
[0090] wherein, * represents convolution, · represents the Hamilton product, L represents the layer name of the feature prediction module, is the output of the update gate of the L-th layer at the i-th moment, is the output of the reset gate of the L-th layer at the i-th moment, represents the spatial feature update vector of the L-th layer at the i-th moment, σ is the first activation function, tanh is the second activation function, W xz 、W hz 、W xr 、W hr 、W xf 、W hf 、 are the network parameters of the feature prediction module of the L-th layer of the feature prediction unit corresponding to the current time step in the decoding layer, represents the hidden state of the feature prediction module of the L-th layer of the feature prediction unit corresponding to the time step at the i-th moment, represents the spatial feature image predicted at the L + 1 layer, represents the predicted spatial feature image of the L-th layer.
[0091] As Figure 3 shown is the structural schematic diagram of the first feature prediction unit. When extracting the hidden state from the target wind speed distribution sample image as the input and corresponding to the latest time, the hidden state of each corresponding layer output by each layer of the hidden state extraction unit is respectively input into the feature prediction module of the corresponding layer, and the target wind speed distribution sample image X t as the input and corresponding to the latest time is input into the feature prediction module of the third layer. In the spatial convolutional gated recurrent unit, according to the output by the hidden state extraction unit of the third layer, the spatial feature of the feature prediction module of the third layer at the t-th moment is predicted according to the above formula and is sent to the second-layer feature prediction module connected in series with it. The second-layer feature prediction module is based on and the The spatial features of the second-layer feature prediction module at time t are predicted according to the above formula and sent to the first-layer feature prediction module connected in series with it. Similarly, the spatial features of the first-layer feature prediction module at time t can be predicted Finally, input into the convolutional layer, and the output result of the first feature prediction unit can be obtained, that is, the predicted wind speed distribution prediction sample image at time t+1. And the wind speed distribution prediction sample image at time t+1 output by the first feature prediction unit is input into the next feature prediction unit connected in series. The same as the above steps, the next feature prediction unit can predict the wind speed distribution prediction sample image at time t+2 until the T-th feature prediction unit predicts the wind speed distribution prediction sample image at time t+T, that is, the wind field images of the next T moments are predicted {X t+1 ,X t+2 ,…,X t+T}.
[0092] In the embodiment of the present invention, each layer of feature prediction module updates the hidden state according to the following formula:
[0093]
[0094]
[0095]
[0096]
[0097] where * represents convolution, · represents the Hadamard product, L represents the hierarchical name of the feature prediction module, is the output of the update gate of the L-th layer at time i, is the output of the reset gate of the L-th layer at time i, represents the hidden state update vector of the L-th layer at time i, σ is the first activation function, tanh is the second activation function, W xz 、W hz 、W xr 、W hr 、W xf 、W hf 、 are the network parameters of the L-th layer of the feature prediction module of the feature prediction unit corresponding to the current time step in the decoding layer, represents the predicted spatial feature image at the L+1 layer, represents the hidden state of the L-th layer of the feature prediction module of the feature prediction unit corresponding to the time step at time i, Denotes the hidden state of the feature prediction module at the L-th level of the feature prediction unit corresponding to the time step at t+1 obtained by calculation.
[0098] Continue to refer to Figure 3 When extracting the hidden state from the target wind speed distribution sample image that is used as input and corresponds to the latest time, the hidden state of the corresponding layer output by each hidden state extraction unit is respectively input into the feature prediction modules of the corresponding levels, and the target wind speed distribution sample image X that is used as input and corresponds to the latest time t is input into the feature prediction module of the third level. In the convolutional gated recurrent unit, according to the output by the hidden state extraction unit of the third level, the hidden feature of the third-level feature prediction module at t+1 is predicted according to the above formula and is sent to the third-level feature prediction module of the feature prediction unit at the next moment connected in series with it. The second-level feature prediction module is based on and the output by the hidden state extraction unit of the second level, and the hidden feature of the second-level feature prediction module at t+1 is predicted according to the above formula and is sent to the second-level feature prediction module of the feature prediction unit at the next moment connected in series with it. Similarly, the hidden feature of the first-level feature prediction module at t+1 can be predicted and is sent to the first-level feature prediction module of the feature prediction unit at the next moment connected in series with it, and the update of the hidden states of each level of the feature prediction unit at the next moment is completed.
[0099] S3: According to multiple wind speed distribution prediction sample images and multiple wind speed distribution sample images used as outputs, adjust the network parameters of the prediction neural network until a wind field prediction model that meets the expectations is obtained.
[0100] In the embodiments of the present invention, adjusting the network parameters of the prediction neural network according to multiple wind speed distribution prediction sample images and multiple wind speed distribution sample images used as outputs includes:
[0101] For each feature prediction unit, adjust the network parameters of the feature prediction unit according to the wind speed distribution prediction sample image output by the feature prediction unit and the wind speed distribution sample image corresponding to the corresponding time used as the output.
[0102] The traditional multi-step prediction model of regional wind field based on time-varying structure adopts a time-varying decoder structure and still updates its network parameters in the traditional gradient update manner. The parameter update of the spatio-temporal convolutional gated recurrent unit at a certain time step is affected not only by the loss function at the current time step but also by the loss functions at the time steps after the current time step. This is caused by Back-Propagation Through Time (BPTT), that is, the network parameters of the decoder at earlier time steps are affected by the parameters at later time steps. This is not conducive to the learning of the wind field dynamics by the network modules at different time steps in the time-varying decoder.
[0103] In the embodiments of the present invention, to avoid this situation, the inventor designs a more effective training method for the multi-step prediction model of regional wind field based on time-invariant structure. The core idea of this training method is to independently update the network parameters of different time steps, that is, to independently update the network parameters of the feature prediction units at different time steps. In this way, the loss at the current time step only affects its corresponding network parameters, and the losses at different time steps become independent of each other. This will help each feature prediction unit in the time-invariant decoder to focus more on the dynamic process modeling of each corresponding time step, thereby enhancing the prediction ability of the model.
[0104] The present embodiment also provides a prediction method for wind field prediction using a wind field prediction model constructed by the construction method of any of the wind field prediction models described in the specification, including:
[0105] Obtain a plurality of wind speed distribution sample images of the historical time series;
[0106] Input the plurality of wind speed distribution sample images of the historical time series into the wind field prediction model;
[0107] Receive a plurality of wind speed distribution prediction sample images of the next time series of the historical time series output by the wind field prediction model.
[0108] As Figure 4 、 Figure 5 shown, the embodiments of the present invention provide a construction device for a wind field prediction model. The device embodiments can be implemented by software, or by hardware, or by a combination of software and hardware. From the hardware level, as Figure 4 shown, it is a hardware architecture diagram of an electronic device where the construction device for a wind field prediction model provided by the embodiments of the present invention is located. In addition to Figure 5 shown processor, memory, network interface, and non-volatile memory, the electronic device where the device is located in the embodiments usually may also include other hardware, such as a forwarding chip responsible for processing packets, etc. Taking software implementation as an example, as Figure 5As shown, as a device in a logical sense, it is formed by reading the corresponding computer program in the non-volatile memory into the memory and running it through the CPU of the electronic device where it is located.
[0109] As Figure 5 As shown, a device for constructing a wind field prediction model provided in this embodiment includes:
[0110] An acquisition module 501, configured to acquire a plurality of training samples, where the training samples include a plurality of wind speed distribution sample images, and the time intervals of each wind speed distribution sample image in the plurality of wind speed distribution sample images are equal;
[0111] A construction module 502, configured to use a plurality of temporally earlier and temporally continuous wind speed distribution sample images in the training samples as inputs, and use a plurality of temporally later and continuous wind speed distribution sample images in the training samples with the input wind speed distribution sample images as outputs to train a prediction neural network to construct a wind field prediction model; the prediction neural network includes: an encoder and a decoder; the decoder includes a plurality of feature prediction units; the number of feature prediction units is equal to the number of wind speed distribution sample images used as outputs.
[0112] In an embodiment of the present invention, in the construction module 502, the encoder includes multiple hidden state extraction units; the multiple feature prediction units are connected in series;
[0113] When performing the training of the prediction neural network, the following operations are performed:
[0114] Input the plurality of wind speed distribution sample images used as inputs into the encoder to extract the hidden states of the corresponding layers of the plurality of wind speed distribution sample images by using each layer of hidden state extraction units;
[0115] When extracting the hidden states of the target wind speed distribution sample image corresponding to the latest time among the inputs, input the hidden states of the corresponding layers output by each layer of hidden state extraction units and the target wind speed distribution sample image corresponding to the latest time among the inputs into the decoder to output a plurality of temporally continuous wind speed distribution prediction sample images one by one by using the plurality of feature prediction units; the time of the plurality of wind speed distribution prediction sample images is later than the time of the target wind speed distribution sample image and is temporally continuous;
[0116] Adjust the network parameters of the prediction neural network according to the plurality of wind speed distribution prediction sample images and the plurality of wind speed distribution sample images used as outputs until a wind field prediction model that meets the expectations is obtained.
[0117] In an embodiment of the present invention, in the construction module 502, the multiple hidden state extraction units are connected in series;
[0118] Each layer of hidden state extraction units extracts the hidden state of the corresponding layer from multiple wind speed distribution sample images in the following manner:
[0119] In chronological order, the spatio-temporal features of each wind speed distribution sample image are obtained one by one. After obtaining the spatio-temporal features of the current wind speed distribution sample image, the spatio-temporal features are used to update the hidden state of the current layer, and the spatio-temporal features are sent to the hidden state extraction unit of the higher layer connected in series with it.
[0120] In an embodiment of the present invention, in the construction module 502, each feature prediction unit includes multiple layers of feature prediction modules corresponding one by one to the multiple layers of hidden state extraction modules;
[0121] Each feature prediction unit outputs a wind speed distribution prediction sample image in the following manner:
[0122] For each feature prediction module in the feature prediction unit, the following operations are performed:
[0123] The spatio-temporal features of the input image are obtained and sent to the feature prediction module of the lower layer connected in series with it; according to the spatio-temporal features and the hidden state of the corresponding layer of the input, the hidden state of the current layer is updated, and the updated hidden state of the current layer is sent to the next feature prediction unit connected in series with the output end of the feature prediction unit;
[0124] The lowest layer feature prediction module in the feature prediction unit also outputs a wind speed distribution prediction sample image according to the received spatio-temporal features, and inputs the output wind speed distribution prediction sample image to the next feature prediction unit.
[0125] In an embodiment of the present invention, when the construction module 502 adjusts the network parameters of the prediction neural network according to multiple wind speed distribution prediction sample images and multiple wind speed distribution sample images as outputs, the following operations are performed:
[0126] For each feature prediction unit, the network parameters of the feature prediction unit are adjusted according to the wind speed distribution prediction sample image output by the feature prediction unit and the wind speed distribution sample image at the corresponding time as the output.
[0127] As Figure 6 、 Figure 7 shown, an embodiment of the present invention provides a wind field prediction device. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. From the hardware level, as Figure 6 shown, it is a hardware architecture diagram of an electronic device where the wind field prediction device provided by the embodiment of the present invention is located. Except for Figure 7In addition to the processor, memory, network interface, and non-volatile memory shown, the electronic device where the device is located in the embodiments usually may also include other hardware, such as a forwarding chip responsible for processing packets, and so on. Taking software implementation as an example, as Figure 7 shown, as a logically meaningful device, it is formed by the CPU of the electronic device where it is located reading the corresponding computer program in the non-volatile memory into the memory and running it.
[0128] Such as Figure 7 shown, a wind field prediction device provided by an embodiment of the present invention includes:
[0129] A sequence acquisition module 701, configured to acquire a plurality of wind speed distribution sample images of a historical time series;
[0130] An input module 702, configured to input a plurality of wind speed distribution sample images of a historical time series into a wind field prediction model; the wind field prediction model is constructed by using the construction method of any of the wind field prediction models in this specification;
[0131] A prediction module 703, configured to receive a plurality of wind speed distribution prediction sample images of the next time series of the historical time series output by the wind field prediction model.
[0132] It can be understood that the structure schematically shown in the embodiments of the present invention does not constitute a specific limitation on a device for constructing a wind field prediction model / a wind field prediction device. In other embodiments of the present invention, a device for constructing a wind field prediction model / a wind field prediction device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure can be implemented by hardware, software, or a combination of software and hardware.
[0133] Regarding the information interaction, execution process, and other contents among the modules in the above device, since they are based on the same concept as the method embodiments of the present invention, the specific contents can be referred to the descriptions in the method embodiments of the present invention, and will not be elaborated here.
[0134] An embodiment of the present invention also provides an electronic device, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, it implements a method for constructing a wind field prediction model / a wind field prediction method in any embodiment of the present invention.
[0135] An embodiment of the present invention also provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, it causes the processor to execute a method for constructing a wind field prediction model / a wind field prediction method in any embodiment of the present invention.
[0136] Specifically, a system or device equipped with a storage medium can be provided, on which software program code for implementing the functions of any one of the above embodiments is stored, and the computer (or CPU or MPU) of the system or device is caused to read and execute the program code stored in the storage medium.
[0137] In this case, the program code read from the storage medium itself can implement the functions of any one of the above embodiments, so the program code and the storage medium storing the program code constitute a part of the present invention.
[0138] Examples of the storage medium for providing the program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code can be downloaded from a server computer via a communication network.
[0139] In addition, it should be clear that not only can the functions of any one of the above embodiments be implemented by executing the program code read by the computer, but also by causing an operating system or the like operating on the computer based on the instructions of the program code to complete part or all of the actual operations.
[0140] In addition, it can be understood that the program code read from the storage medium is written into the memory provided in the expansion board inserted into the computer or into the memory provided in the expansion module connected to the computer, and then based on the instructions of the program code, the CPU or the like installed on the expansion board or expansion module is caused to execute part and all of the actual operations, thereby implementing the functions of any one of the above embodiments.
[0141] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the presence of another identical element in the process, method, article or device comprising the element.
[0142] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for constructing a wind field prediction model, characterized in that, it includes: Obtain a plurality of training samples, where the training samples include a number of wind speed distribution sample images, and the time intervals of each wind speed distribution sample image among the number of wind speed distribution sample images are equal; Use the plurality of wind speed distribution sample images that are earlier in time and continuous in time in the training samples as inputs, and use the plurality of wind speed distribution sample images that are later in time and continuous with the wind speed distribution sample images used as inputs in the training samples as outputs to train a prediction neural network to construct a wind field prediction model; the prediction neural network includes: an encoder and a decoder; the decoder includes a plurality of feature prediction units; the number of feature prediction units is equal to the number of wind speed distribution sample images used as outputs; The encoder includes multiple hidden state extraction units; the multiple feature prediction units are connected in series; The training of the prediction neural network includes: Input the plurality of wind speed distribution sample images used as inputs into the encoder to use each hidden state extraction unit to extract the hidden state of the corresponding layer of the plurality of wind speed distribution sample images; When extracting the hidden state of the target wind speed distribution sample image corresponding to the latest time among the inputs, input the hidden state of the corresponding layer output by each hidden state extraction unit and the target wind speed distribution sample image corresponding to the latest time among the inputs into the decoder to use the plurality of feature prediction units to output a plurality of temporally continuous wind speed distribution prediction sample images one by one; the time of the plurality of wind speed distribution prediction sample images is later than the time of the target wind speed distribution sample image and is continuous in time; According to the plurality of wind speed distribution prediction sample images and the plurality of wind speed distribution sample images used as outputs, adjust the network parameters of the prediction neural network until a wind field prediction model that meets the expectations is obtained.
2. The method according to claim 1, characterized in that, the multiple hidden state extraction units are connected in series; Each hidden state extraction unit extracts the hidden state of the corresponding level of the plurality of wind speed distribution sample images in the following manner: Obtain the spatio-temporal features of each wind speed distribution sample image one by one in chronological order, and after obtaining the spatio-temporal features of the current wind speed distribution sample image, use the spatio-temporal features to update the hidden state of the current level, and send the spatio-temporal features to the higher-level hidden state extraction unit connected in series with it.
3. The method according to claim 1, characterized in that, Each feature prediction unit includes multiple feature prediction modules corresponding one by one to the multiple hidden state extraction modules; Each feature prediction unit outputs a wind speed distribution prediction sample image in the following manner: For each feature prediction module in the feature prediction unit, the following is executed: Obtain the spatio-temporal features of the input image and send the spatio-temporal features to a lower-level feature prediction module connected in series therewith; update the hidden state of the current level according to the spatio-temporal features and the hidden state of the corresponding level of the input, and send the updated hidden state of the current level to the next feature prediction unit connected in series with the output end of the feature prediction unit; The lowest-level feature prediction module in the feature prediction unit also outputs a wind speed distribution prediction sample image according to the received spatio-temporal features, and inputs the output wind speed distribution prediction sample image to the next feature prediction unit.
4. The method according to claim 1, wherein, adjusting the network parameters of the prediction neural network according to the plurality of wind speed distribution prediction sample images and the plurality of wind speed distribution sample images as outputs, including: For each feature prediction unit, adjust the network parameters of the feature prediction unit according to the wind speed distribution prediction sample image output by the feature prediction unit and the wind speed distribution sample image corresponding to the output time.
5. A prediction method for wind field prediction using a wind field prediction model constructed by any one of the methods according to claims 1-4, wherein, including: Obtain a plurality of wind speed distribution sample images of the historical time series; Input the plurality of wind speed distribution sample images of the historical time series into the wind field prediction model; Receive a plurality of wind speed distribution prediction sample images of the next time series of the historical time series output by the wind field prediction model.
6. An apparatus for constructing a wind field prediction model, wherein, including: An acquisition module for acquiring a plurality of training samples, the training samples including a plurality of wind speed distribution sample images, and the time intervals of each wind speed distribution sample image in the plurality of wind speed distribution sample images are equal; A construction module for using the plurality of wind speed distribution sample images that are earlier in time and continuous in the training samples as inputs, and using the plurality of wind speed distribution sample images that are later in time and continuous with the input wind speed distribution sample images in the training samples as outputs to train a prediction neural network to construct a wind field prediction model; the prediction neural network includes: an encoder and a decoder; the decoder includes a plurality of feature prediction units; The number of feature prediction units is equal to the number of wind speed distribution sample images as outputs.
7. A wind field prediction apparatus for implementing the method according to any one of claims 1-4, wherein, including: A sequence acquisition module for acquiring a plurality of wind speed distribution sample images of the historical time series; An input module for inputting the plurality of wind speed distribution sample images of the historical time series into the wind field prediction model; the wind field prediction model is constructed by any one of the methods according to claims 1-4; A prediction module for receiving a plurality of wind speed distribution prediction sample images of the next time series of the historical time series output by the wind field prediction model.
8. An electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method according to any one of claims 1-5 is implemented.
9. A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed on a computer, the computer is caused to execute the method according to any one of claims 1-5.
Citation Information
Patent Citations
Cross-country skiing track wind speed field prediction method
CN110222899A