Medium and long term wind power probabilistic prediction method and system based on time sequence attention

Through the medium- and long-term wind power prediction method based on timing attention, the dependence on data and calculation complexity in the prior art and the insufficient prediction capability in complex environments are solved, and high-precision and reliable wind power prediction are achieved, especially in nonlinear and complex and variable environments.

CN120069231AActive Publication Date: 2025-05-30GUIZHOU POWER GRID CO LTD

Patent Information

Application Number
CN202510526072.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-05-30
Estimated Expiration
2045-04-25

AI Technical Summary

Technical Problem

In the medium and long-term wind power prediction, it is difficult for the prior art to reduce the dependence on a large amount of accurate data and high-complexity calculations while ensuring prediction accuracy. At the same time, the prediction capability is insufficient in nonlinear, non-stationary and complex and variable environments.

Method used

The medium- and long-term wind power probability prediction method based on timing attention is adopted, and local and long-term dependency feature data are obtained through the multi-attention dependency calculation module and the timing feature extraction module, and the features are fusionized by the two-way cross attention module, combining the quantile regression LSTM model and the adaptive index smoothing error correction module for prediction.

Benefits of technology

It significantly improves the modeling ability of different timescale dependencies in the time series, enhances the ability to capture key historical patterns in ultra-long sequences, can effectively capture nonlinear and complex patterns in wind power data, provide probability distribution prediction of wind power, and improve prediction accuracy and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120069231A_ABST
    Figure CN120069231A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of wind power prediction, and discloses a medium and long term wind power probabilistic prediction method and system based on time sequence attention, and the method comprises the steps: carrying out the preprocessing of meteorological data and fan power data of a wind power plant; dependency features in the sequence are obtained through global attention, local attention and a memory unit in the MAHT module, time sequence features in the sequence are obtained through the TCN module, and feature information between different modules is fused through the cross attention module; performing probabilistic prediction on medium and long term wind power based on the fused features to obtain a preliminary prediction result; and introducing an adaptive exponential smoothing error correction module to correct the preliminary prediction result to obtain a final prediction result. According to the method, different feature extraction modules are fully utilized to extract sequence features, and probabilistic prediction and error correction are introduced, so that high-precision medium-and-long-term wind power prediction is realized, and stable and safe operation of a power system is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of wind power prediction, and particularly to a medium and long-term wind power probabilistic prediction method and system based on temporal attention. Background Art

[0002] As a clean and renewable energy source, wind energy is playing an increasingly important role in the global energy structure. However, due to the instability and uncontrollability of wind energy, the volatility of wind power generation poses certain challenges to the stable operation of the power grid and the management of the power market. Therefore, accurate prediction of wind power has become one of the key technologies to improve the economy and reliability of wind power systems. Medium and long-term wind power prediction can arrange the power grid operation plan, maintenance plan and power trading strategy in advance, which is of great significance to the safe operation and planning of the power system.

[0003] Medium and long-term wind power prediction methods can be mainly classified into physical methods, statistical methods and artificial intelligence methods. Physical methods are based on the physical principles of meteorology and wind power generation, and simulate and predict wind power by constructing complex mathematical models, usually involving in-depth research on the characteristics of the wind field, including the influence of factors such as terrain, vegetation, and obstacles on wind speed and direction; due to the dependence of physical methods on accurate physical models and a large amount of meteorological data, their computational complexity is high. Statistical methods focus on extracting the statistical relationship between wind power and meteorological factors from historical data, and predict wind power by constructing time series models, regression models or machine learning algorithms based on probability and statistics theory; statistical methods do not require in-depth understanding of the physical characteristics of the wind farm, but rely on the regularity and correlation of historical data, and their prediction accuracy may be limited when dealing with non-linear, non-stationary and complex wind farm environments.

[0004] Artificial intelligence methods, especially machine learning and deep learning technologies, have made remarkable progress in the field of wind power prediction in recent years. Deep learning can automatically learn the complex mapping relationship between wind power and various meteorological factors from a large amount of historical data without explicitly constructing a physical model or a statistical model. Artificial intelligence methods can capture the spatio-temporal distribution characteristics, periodic changes and the impact of extreme weather events of wind power. Due to the powerful data processing ability and pattern recognition ability of artificial intelligence methods, they can provide more accurate and stable prediction results, especially showing excellent performance when dealing with non-linear, non-stationary and complex wind farm data. Summary of the Invention

[0005] In view of the above existing problems, the present invention is proposed.

[0006] Therefore, the present invention provides a medium- and long-term wind power probabilistic prediction method and system based on temporal attention to solve the problem of how to reduce the dependence on a large amount of accurate data and high-complexity calculations while ensuring the prediction accuracy, and at the same time improve the wind power prediction ability in a non-linear, non-stationary and complex variable environment.

[0007] To solve the above technical problems, the present invention provides the following technical solutions: In a first aspect, the present invention provides a medium- and long-term wind power probabilistic prediction method based on temporal attention, including: Obtain the meteorological data and wind turbine power-related data of the wind farm and perform preprocessing; Input the preprocessed data sets into the encoder of the multi-attention dependence calculation module and the temporal feature extraction module respectively to obtain first feature data with local and long-term dependencies and second feature data with temporal information; Input the first feature data and the second feature data into the bidirectional cross-attention module, and fuse the features extracted by different modules by calculating the attention weights; Perform probabilistic prediction on the medium- and long-term wind power based on the fused features to obtain a preliminary prediction result; Introduce an adaptive exponential smoothing error correction module to correct the preliminary prediction result to obtain the final result of the medium- and long-term wind power probabilistic prediction.

[0008] As a preferred scheme of the medium- and long-term wind power probabilistic prediction method based on temporal attention of the present invention, wherein: the process of the preprocessing includes: The data set Each is a d-dimensional feature vector. Use the dynamic adaptive K-nearest neighbor filling method to fill the missing values of the meteorological data and wind power. For the missing points, calculate the Mahalanobis distance between it and the nearest nearest neighbors in the training set, and calculate the local density of the current missing point; Dynamically select the K value according to the local density; Calculate the Gaussian weight of the missing point and each nearest neighbor point , and add a time series regularization term; Normalize the calculated Gaussian weights and then calculate the missing values and fill them into the corresponding positions. Normalize the meteorological data and wind power data filled with missing values, and divide the data set into a training set and a test set.

[0009] As a preferred scheme of the medium- and long-term wind power probabilistic prediction method based on temporal attention of the present invention, wherein: the acquisition of the first feature data with local and long-term dependencies includes: Divide the original time series into multiple local windows, each window containing n time steps. Calculate self-attention within each window, and concatenate the local attention representations of all windows in chronological order to obtain the local attention of the sequence. Use the original time series as the input of global attention, calculate self-attention on the entire sequence to obtain global attention. Introduce a memory unit. Use the attention mechanism to take the input sequence as the query, and the memory unit as the key and value. By calculating the attention weights, retrieve the information most relevant to the current input from the memory unit, and dynamically update the memory unit according to the current input through a gating structure. Fuse the outputs of the local attention, global attention, and memory unit through a gated fusion mechanism using dynamic weights, and input the fused data into the feed-forward neural network of the Transformer encoder to output the first feature data with local and long-term dependencies.

[0010] As a preferred scheme of the medium- and long-term wind power probabilistic prediction method based on temporal attention according to the present invention, wherein: the acquisition of the second feature data with temporal information includes: Input the preprocessed data set into the temporal feature extraction module. After the first-layer convolution and the second-layer convolution processing, input it into the Relu activation function. Perform channel matching on the input channel number and the output channel number through downsampling operations, and perform residual connection with the input data to obtain the second feature data with temporal information.

[0011] As a preferred scheme of the medium- and long-term wind power probabilistic prediction method based on temporal attention according to the present invention, wherein: the fusion of features extracted from different modules by calculating attention weights includes: Take the first feature data with local and long-term dependencies as the query, the second feature data with temporal information as the key and value, use the multi-head attention mechanism to calculate the attention weights, multiply the attention weights with the value vector elements, and perform weighted summation on the results. Take the second feature data with temporal information as the query, the first feature data with local and long-term dependencies as the key and value, use the multi-head attention mechanism to calculate the attention weights, multiply the attention weights with the value vector elements, and perform weighted summation on the results. Concatenate the data obtained from the two weighted summations in the feature dimension, and use a fully connected layer to map the concatenated features to the target dimension, and obtain the fused feature data through residual connection.

[0012] As a preferred embodiment of the medium- and long-term wind power probabilistic prediction method based on temporal attention according to the present invention, wherein: the probabilistic prediction of medium- and long-term wind power based on the fused features includes: Define the quantile and the loss function of quantile regression, and the loss function of quantile regression is expressed as: , wherein, is the target quantile, y is the true value, is the predicted value; Construct a quantile regression LSTM model, take the obtained temporal and dependency feature fusion data as the input of the quantile regression LSTM model, and perform probabilistic prediction on future wind power, where the size of the output layer is equal to the number of quantiles; Take the obtained predicted values of each quantile as the reference points of the probability distribution, fit the normal probability distribution, and calculate the coverage probability to evaluate the accuracy of the probability prediction interval. The formula is expressed as: , where CP is the coverage probability, N is the sample space, is the true value of the i-th sample, is the indicator function, which takes the value of 1 when the condition is satisfied and 0 otherwise, L is the lower limit of the prediction interval, and U is the upper limit of the prediction interval.

[0013] As a preferred embodiment of the medium- and long-term wind power probabilistic prediction method based on temporal attention according to the present invention, wherein: the introduction of an adaptive exponential smoothing error correction module to correct the preliminary prediction result to obtain the final result of medium- and long-term wind power probabilistic prediction includes: Calculate the error sequence and define the dynamic adjustment factor; Dynamically adjust the smoothing coefficient according to the change of the error sequence; Calculate the improved exponential smoothing formula according to the dynamic adjustment factor, input the smoothed error sequence into the model to obtain the corrected error sequence, and add the corrected error sequence to the prediction sequence to obtain the final result of medium- and long-term wind power probabilistic prediction.

[0014] In a second aspect, the present invention provides a medium- and long-term wind power probabilistic prediction system based on temporal attention, including: A data acquisition and processing unit for acquiring meteorological data and fan power-related data of a wind farm and performing preprocessing; A sequence feature extraction unit for respectively inputting the preprocessed data set into the encoder of the multi-attention dependency calculation module and the temporal feature extraction module to obtain first feature data with local and long-term dependencies and second feature data with temporal information; A feature fusion unit, configured to input the first feature data and the second feature data into a bidirectional cross-attention module, and fuse the features extracted by different modules by calculating attention weights; A probabilistic prediction unit, configured to perform probabilistic prediction on medium- and long-term wind power based on the fused features to obtain a preliminary prediction result; A prediction result correction unit, configured to introduce an adaptive exponential smoothing error correction module to correct the preliminary prediction result to obtain a final result of probabilistic prediction of medium- and long-term wind power.

[0015] In a third aspect, the present invention provides an electronic device, including: A memory and a processor; The memory is configured to store computer-executable instructions, and the processor is configured to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method for probabilistic prediction of medium- and long-term wind power based on temporal attention are implemented.

[0016] In a fourth aspect, the present invention provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the steps of the method for probabilistic prediction of medium- and long-term wind power based on temporal attention are implemented.

[0017] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention provides a method and system for probabilistic prediction of medium- and long-term wind power based on temporal attention. Through a hierarchical design of local attention to capture short-term dependencies and global attention to capture long-term dependencies, the modeling ability for different time-scale dependencies in time series is significantly improved. A memory unit is introduced to explicitly store historical key information, and through a dynamic retrieval and update mechanism, the ability to capture key historical patterns in ultra-long sequences is enhanced; moreover, the present invention can effectively capture the non-linear and complex patterns in wind power data, can dynamically adjust the prediction result according to real-time data to adapt to the rapid changes of wind power, and at the same time can provide a probabilistic distribution prediction of wind power, rather than just a single point prediction. This probabilistic prediction can help wind farm operators better evaluate the future power fluctuation range, thereby improving the reliability of power grid scheduling; in addition, by introducing a dynamic adjustment factor, the present invention can dynamically adjust the smoothing coefficient according to the change of the error sequence, has strong adaptability to the change of the error sequence, and can maintain a good smoothing effect under different error distributions, thereby improving the prediction accuracy. Description of the Drawings

[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0019] Figure 1 Schematic diagram of the overall process logic of the method according to an embodiment of the present invention; Figure 2 Schematic diagram of the module process structure of the method according to an embodiment of the present invention; Figure 3 Schematic diagram of the prediction result curve of the method according to an embodiment of the present invention; Figure 4 Schematic diagram of the comparative experiment of the method according to an embodiment of the present invention; Figure 5 Schematic diagram of the mean square error comparison curve of the method according to an embodiment of the present invention. Detailed implementation manners

[0020] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will provide a detailed description of the specific implementation manners of the present invention in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0021] Embodiment 1 Refer to Figure 1 - Figure 2 An embodiment of the present invention provides a medium- and long-term wind power probabilistic prediction method based on temporal attention, as Figure 1 shown, which specifically includes the following steps: S100: Obtain the meteorological data and wind turbine power-related data of the wind farm and perform preprocessing; S200: Input the preprocessed data set into the encoder of the multi-attention dependence calculation module to obtain first feature data with local and long-term dependencies; S300: Input the preprocessed data set into the temporal feature extraction module to obtain second feature data with temporal information; S400: Input the first feature data and the second feature data into the bidirectional cross-attention module, and fuse the features extracted by different modules by calculating the attention weights; S500: Input the fused features into the quantile regression LSTM model to perform probabilistic prediction on the medium- and long-term wind power, and obtain a preliminary prediction result; S600: Introduce an adaptive exponential smoothing error correction module to correct the preliminary prediction results and obtain the final results of medium- and long-term wind power probabilistic prediction.

[0022] It should be noted that the present invention provides a medium- and long-term wind power probabilistic prediction method and system based on temporal attention. Through a hierarchical design that captures short-term dependencies with local attention and long-term dependencies with global attention, the modeling ability for different time-scale dependencies in time series is significantly improved. A memory unit is introduced to explicitly store historical key information, and through a dynamic retrieval and update mechanism, the ability to capture key historical patterns in ultra-long sequences is enhanced. Moreover, the present invention can effectively capture the non-linear and complex patterns in wind power data, can dynamically adjust the prediction results according to real-time data to adapt to the rapid changes in wind power, and at the same time can provide a probabilistic distribution prediction of wind power, rather than just a single point prediction. This probabilistic prediction can help wind farm operators better evaluate the future power fluctuation range, thereby improving the reliability of power grid scheduling. In addition, by introducing a dynamic adjustment factor, the present invention can dynamically adjust the smoothing coefficient according to the changes in the error sequence, has strong adaptability to the changes in the error sequence, and can maintain a good smoothing effect under different error distributions, thereby improving the prediction accuracy.

[0023] As Figure 2 shown in the overall structure diagram of the medium- and long-term wind power probabilistic prediction method based on temporal attention, the medium- and long-term wind power probabilistic prediction method of the present invention will be specifically described below based on Figure 2 this.

[0024] In the embodiment of the present application, the above step S100 includes the following sub-steps A1 to A2: In A1: Obtain historical wind power data, anemometer tower wind speed, anemometer tower wind direction, and ERA5 meteorological data; In A2: Preprocess the obtained data, mainly dynamically filling the missing data.

[0025] Specifically, the preprocessing process includes: Each in the data set is a d-dimensional feature vector. Use the dynamic adaptive K-nearest neighbor filling method to fill the missing values of meteorological data and wind power. For the missing points, calculate the Mahalanobis distance from it to the nearest neighbors in the training set, and calculate the local density of the current missing point. The Mahalanobis distance and the local density of the missing point are calculated as follows: , , where is the missing point And its neighboring points The Mahalanobis distance of is the inverse of the covariance matrix, is the preset maximum number of neighbors; Dynamically select the value of K according to the local density. The higher the local density, the larger the value of K, and the lower the local density, the smaller the value of K, as shown in the following formula: , where and are the preset minimum and maximum values, and these two values determine the range of the dynamic K value, is the maximum local density of all missing points; On the premise of determining the value of K, calculate the Gaussian weight of the missing point with each neighboring point , and add a time series regularization term to avoid overfitting. The time series regularization term and the Gaussian weight are as follows: , , where is the time series regularization term, is the missing point timestamp, is the neighboring point timestamp, is the time scale parameter, is the standard deviation of the Gaussian weight, is the regularization coefficient; Normalize the calculated Gaussian weights and then calculate the missing values and fill them in the corresponding positions; Normalize the meteorological data and wind power data filled with missing values, and divide the data set into a training set and a test set.

[0026] It should be noted that the above step S100 preprocesses the meteorological data and fan power related data of the wind farm to provide high-quality and structured input data for subsequent analysis, ensuring the accuracy and availability of the data.

[0027] In the embodiment of the present application, the above step S200 includes the following sub-steps B1 to B4: In B1: Divide the original time series into multiple local windows, each window contains n time steps, calculate the self-attention inside each window, and splice the local attention representations of all windows in chronological order to obtain the local attention of the sequence, where the dimension of the data is 32×16×32; In B2: The original time series is used as the input for global attention. Self-attention is calculated over the entire sequence to obtain global attention, where the dimension of the input features is 7, the number of attention heads is 2, and the dimension of the global attention representation is 32×16×32; In B3: A memory unit is introduced. The input sequence is used as the query by means of the attention mechanism, and the memory unit is used as the key and value. By calculating the attention weights, the information most relevant to the current input is retrieved from the memory unit, and the memory unit is dynamically updated through a gating structure according to the current input, where the memory unit is a learnable parameter matrix with a size of 64 for storing historical information; In B4: The outputs of local attention, global attention, and the memory unit are fused using a dynamic weight through a gating fusion mechanism. The fused data is input into the feed-forward neural network of the Transformer encoder, and the first feature data with local and long-term dependencies is output, where the dimension of the data is 32×16×32.

[0028] It should be noted that in the above step S200, the preprocessed data is input into the encoder of the multi-attention dependency calculation module to extract the first feature data with local and long-term dependencies, effectively capturing the short-term fluctuations and long-term trends in the data, enhancing the model's ability to model dependencies at different time scales, and improving the accuracy and reliability of predictions.

[0029] In the embodiment of the present application, the above step S300 includes the following sub-steps C1 to C3: In C1: The preprocessed data set undergoes the first layer of convolution of the time series feature extraction module, where the size of the convolution kernel is 3 and the dilation coefficient is 1; through the operations of cropping and padding, the redundant padding part is removed, weight normalization is performed, and it is input into the Relu activation function; It should be noted that in order to ensure that the model can only rely on current and past information, zeros are padded to the right side of the input sequence in the first layer of convolution operation, and the padding size is 2. After the convolution operation, due to the existence of the right padding, the output time step will be one part more than the input, and a cropping operation is required. The cropping size is equal to the padding size in the convolution operation, and by retaining all batches and channels, but cropping the last 2 elements in the time dimension to remove the redundant padding part.

[0030] In C2: The data obtained after the first layer of convolution undergoes the second layer of convolution of the time series feature extraction module, where the size of the convolution kernel is 3 and the dilation coefficient is 2; through the operations of cropping and padding, the redundant padding part is removed, weight normalization is performed, and it is input into the Relu activation function; It should be noted that, in order to ensure that the model can only rely on current and past information, zeros are padded to the right side of the input sequence in the second convolutional operation, and the padding size is 4. After the convolutional operation, due to the existence of the right padding, the output time steps will be more than the input by a part, and a cropping operation is required. The cropping size is equal to the padding size in the convolutional operation. By retaining all batches and channels, but cropping the last 4 elements in the time dimension to remove the extra padding part.

[0031] In C3: The number of input channels and output channels is kept the same through downsampling operations. 1×1 convolutions are used for channel matching, and finally a residual connection is made with the input data to obtain the second feature data with temporal information, where the data dimension is 32×16×64.

[0032] It should be noted that if the number of channels of the output data of the second convolution of the temporal feature extraction module is inconsistent with the original data channels of the first convolution of the input temporal feature extraction module, then 1×1 convolutions are used for the original input data for channel matching; if the number of channels of both is the same, no matching operation is required. The output data of the second convolution of the temporal feature extraction module is connected with the original input data or the original input data after channel matching processing through a residual connection to obtain the second feature data with temporal information.

[0033] It should be noted that in the above step S300, by inputting the preprocessed data set into the temporal feature extraction module to obtain the second feature data with temporal information, it can effectively capture the time dynamic characteristics in the wind power data, provide rich temporal information support for subsequent fusion of different features, and enhance the model's understanding and prediction ability of the time series dependence relationship.

[0034] In the embodiment of the present application, the above step S400 includes the following sub-steps D1 to D3: In D1: The first feature data with local and long-term dependencies is used as the query, the second feature data with temporal information is used as the key and value, the multi-head attention mechanism is used to calculate the attention weights, the attention weights are multiplied by the value vector elements, and the results are weighted and summed. In D2: The second feature data with temporal information is used as the query, the first feature data with local and long-term dependencies is used as the key and value, the multi-head attention mechanism is used to calculate the attention weights, the attention weights are multiplied by the value vector elements, and the results are weighted and summed. In D3: The data obtained by the two weighted sums are concatenated in the feature dimension, and the fully connected layer is used to map the concatenated features to the target dimension, and the fused feature data is obtained through a residual connection, where the dimension of the fused feature data is 32×16×32.

[0035] It should be noted that in the above step S400, the first feature data and the second feature data are fused through a bidirectional cross-attention module, and the local and long-term dependencies and time series information are integrated by calculating the attention weights, accurately capturing the correlations between the features extracted by different modules, improving the model's recognition ability and prediction accuracy for complex patterns, and making the wind power prediction more accurate and reliable.

[0036] In the embodiment of the present application, the above step S500 includes the following sub-steps E1 to E3: In E1: Define the quantiles and the loss function of quantile regression, where the quantiles include 0.1, 0.5, and 0.9, and the loss function of quantile regression is expressed as: , where, is the target quantile, y is the true value, is the predicted value; In E2: Construct a quantile regression LSTM model, take the fused time series and dependency feature data as the input of the quantile regression LSTM model, and perform probabilistic prediction on the future wind power, where the size of the output layer is equal to the number of quantiles; Specifically, constructing a quantile regression LSTM model includes: using LSTM as the core module, adding a fully connected layer after the LSTM layer, and its output size is equal to the number of quantiles to generate the predicted value corresponding to each quantile.

[0037] In E3: Take the obtained predicted values of each quantile as the reference points of the probability distribution, fit the normal probability distribution, and calculate the coverage probability to evaluate the accuracy of the probability prediction interval, and the formula is expressed as: , where CP is the coverage probability, N is the sample space, is the true value of the i-th sample, is the indicator function that takes the value of 1 when the condition is satisfied, otherwise 0, L is the lower limit of the prediction interval, and U is the upper limit of the prediction interval.

[0038] It should be noted that the above step S500 inputs the fused features into the quantile regression LSTM model for probabilistic prediction of medium- and long-term wind power. It can not only provide the probability distribution of wind power instead of a single predicted value, effectively capture the non-linearity and complex patterns in the wind power data, but also dynamically adjust the prediction results according to real-time data to adapt to the rapid changes in wind power, thereby improving the accuracy and reliability of the prediction and helping the operator better evaluate the future power fluctuation range.

[0039] In the embodiment of the present application, the above step S600 includes the following sub-steps F1 to F2: In F1: Calculate the error sequence and define the dynamic adjustment factor. Dynamically adjust the smoothing coefficient according to the change of the error sequence. The error sequence and the dynamic adjustment factor are as follows: , , where, is the dynamic adjustment factor, and respectively represent the true wind power value and the initial model prediction result at time t, represents the error sequence, is a regulation parameter used to control the sensitivity of dynamic adjustment; In F2: Calculate the improved exponential smoothing formula according to the dynamic adjustment factor, and input the smoothed error sequence into the model to obtain the corrected error sequence. Add the corrected error sequence and the prediction sequence to get the final result of medium and long-term wind power probabilistic prediction. The smoothed error sequence and the corrected error sequence are as follows: , , where, is the smoothed error sequence, is the smoothing coefficient, and its range is [0, 1], is the corrected error sequence.

[0040] It should be noted that in the above step S600, an adaptive exponential smoothing error correction module is introduced to correct the preliminary prediction result. The smoothing coefficient is automatically adjusted according to the change of the error sequence by the dynamic adjustment factor, effectively improving the accuracy and adaptability of the prediction result, being able to maintain a good smoothing effect under different error distributions, further reducing the prediction error, and ensuring the stability and reliability of the final wind power probabilistic prediction result.

[0041] Example 2 Referring to Figure 3 - Figure 5 , based on the previous example, this example provides an application example of the medium and long-term wind power probabilistic prediction method based on time series attention to verify and illustrate the technical effects adopted in this method.

[0042] The experimental data of this example uses the recorded data of a domestic wind farm for 2 months. The data includes fan data and historical meteorological data including wind speed, wind direction, temperature, and air pressure. Among them, the wind power data is sampled every 1 hour. The data of the first 50 days is used as training data, and the data of the last 10 days is used as test data. Table 1 shows the quantitative analysis results of 4 wind power prediction methods. Experiments are carried out on each model in the test set divided by the present invention. , the average values of RMSE, MSE, and MAE are taken from 20 experiments.

[0043] Table 1: Quantitative analysis results of four wind power prediction methods.

[0044] , As can be seen from Table 1, the performance of QR-LSTM is better than other methods. The MSE of QR-LSTM reaches 0.029, which is 0.006 lower than that of TCN-Transformer, 0.017 lower than that of ConvLSTM, and 0.033 lower than that of BiGRU. In , QR-LSTM is still the best, and TCN-Transformer is close to it, both higher than ConvLSTM and BiGRU. At the same time, in terms of RMSE and MAE, the method of the present invention is the best, and the performance is the most stable.

[0045] In addition, as Figure 3 shown is the result display of the probabilistic prediction of wind power for the next 6 days by the present invention. It can be seen that the prediction result is relatively close to the true value; as Figure 4 shown is the comparative prediction experiment between the method of the present invention and other methods. It can be seen that the prediction result of the method of the present invention is relatively accurate; as Figure 5 shown is the comparison of the mean square error between the method of the present invention and other invention methods. It can be seen from this that the method of the present invention can reach the lowest mean square error relatively quickly.

[0046] It can be seen from the above embodiments that the present invention provides a medium and long-term wind power probabilistic prediction method and system based on temporal attention. Through a hierarchical design of local attention to capture short-term dependencies and global attention to capture long-term dependencies, the modeling ability of different time-scale dependencies in time series is significantly improved. A memory unit is introduced to explicitly store historical key information, and through a dynamic retrieval and update mechanism, the ability to capture key historical patterns in ultra-long sequences is enhanced; moreover, the present invention can effectively capture the non-linearity and complex patterns in wind power data, can dynamically adjust the prediction results according to real-time data to adapt to the rapid changes in wind power, and at the same time can provide the probabilistic distribution prediction of wind power, rather than just a single point prediction. This probabilistic prediction can help wind farm operators better evaluate the future power fluctuation range, thereby improving the reliability of power grid dispatching; in addition, by introducing a dynamic adjustment factor, the present invention can dynamically adjust the smoothing coefficient according to the change of the error sequence, has strong adaptability to the change of the error sequence, and can maintain a good smoothing effect under different error distributions, thereby improving the prediction accuracy.

[0047] Embodiment 3 In this embodiment, a medium and long-term wind power probabilistic prediction system based on temporal attention is provided, including: A data acquisition and processing unit, configured to acquire meteorological data and fan power-related data of a wind farm and perform preprocessing; A sequence feature extraction unit, configured to respectively input the preprocessed data set into the encoder of the multi-attention dependence calculation module and the time series feature extraction module, so as to obtain first feature data with local and long-term dependencies and second feature data with time series information; A feature fusion unit, configured to input the first feature data and the second feature data into a bidirectional cross-attention module, and fuse the features extracted by different modules by calculating attention weights; A probabilistic prediction unit, configured to perform probabilistic prediction on medium- and long-term wind power based on the fused features to obtain a preliminary prediction result; A prediction result correction unit, configured to introduce an adaptive exponential smoothing error correction module to correct the preliminary prediction result to obtain the final result of the probabilistic prediction of medium- and long-term wind power.

[0048] It should be noted that the technical solution of the system for probabilistic prediction of medium- and long-term wind power based on time series attention belongs to the same concept as the technical solution of the above-mentioned method for probabilistic prediction of medium- and long-term wind power based on time series attention. For the details not described in detail in the technical solution of the system for probabilistic prediction of medium- and long-term wind power based on time series attention in this embodiment, reference can be made to the description of the technical solution of the method for probabilistic prediction of medium- and long-term wind power based on time series attention.

[0049] The above-mentioned each unit module can be embedded in the processor of the computer device in a hardware form or be independent of the processor, or can be stored in the memory of the computer device in a software form, so that the processor can call and execute the operations corresponding to the above-mentioned each module.

[0050] This embodiment also provides an electronic device, which includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a carrier network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, it is used to implement the method for probabilistic prediction of medium- and long-term wind power based on time series attention. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or can be a button, a trackball or a touchpad provided on the housing of the computer device, or can also be an external keyboard, a touchpad or a mouse, etc.

[0051] This embodiment also provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method proposed in the above embodiment is implemented.

[0052] The storage medium proposed in this embodiment and the method proposed in the above embodiment belong to the same inventive concept. For technical details not described in detail in this embodiment, reference can be made to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0053] From the above description of the embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software and the necessary general-purpose hardware. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disc of a computer, etc., including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method of the embodiments of the present invention.

[0054] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.

[0055] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present application can be implemented in various computer languages.

[0056] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices produce a means for implementing the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or a means for implementing the functions specified in multiple blocks.

[0057] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including an instruction means that implements the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or a means for implementing the functions specified in multiple blocks.

[0058] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or a means for implementing the functions specified in multiple blocks.

[0059] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they know the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0060] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims

1. A medium- and long-term wind power probabilistic prediction method based on temporal attention, characterized in that: include: Obtain the meteorological data and wind turbine power-related data of the wind farm and perform preprocessing; Inputting the preprocessed data set into the encoder of the multi-attention dependency calculation module and the temporal feature extraction module respectively to obtain first feature data with local and long-term dependencies and second feature data with temporal information; Inputting the first feature data and the second feature data into a bidirectional cross attention module, and fusing the features extracted by different modules by calculating the attention weights; Based on the fused features, the medium- and long-term wind power is probabilistically predicted and the preliminary prediction results are obtained; An adaptive exponential smoothing error correction module is introduced to correct the preliminary prediction results to obtain the final result of the medium- and long-term wind power probabilistic prediction.

2. The medium- and long-term wind power probabilistic prediction method based on temporal attention according to claim 1 is characterized in that: The pre-treatment process includes: Dataset Each The missing values ​​of meteorological data and wind power are filled by using the dynamic adaptive K-nearest neighbor filling method. For the missing points, the nearest neighbor to the training set is calculated. The Mahalanobis distance of the nearest neighbors is used to calculate the local density of the current missing point; Dynamically selecting a K value based on the local density; Calculate the Gaussian weights of the missing point and each neighboring point , and add time series regularization terms; After normalizing the calculated Gaussian weights, the missing values ​​are calculated and filled in the corresponding positions. The meteorological data and wind power data with filled missing values ​​are normalized, and the data set is divided into a training set and a test set.

3. The medium- and long-term wind power probabilistic prediction method based on temporal attention according to claim 2 is characterized in that: The acquisition of the first feature data having local and long-term dependencies comprises: The original time series is divided into multiple local windows, each containing n time steps. Self-attention is calculated inside each window, and the local attention representations of all windows are concatenated in chronological order to obtain the local attention of the sequence. Take the original time series as the input of global attention, calculate self-attention on the entire sequence, and get global attention; A memory unit is introduced, and an attention mechanism is used to take the input sequence as a query, and the memory unit as a key and a value. By calculating the attention weight, the most relevant information to the current input is retrieved from the memory unit, and the memory unit is dynamically updated through a gating structure according to the current input. The outputs of the local attention, global attention and memory units are fused using dynamic weights through a gated fusion mechanism, and the fused data are input into a feedforward neural network of a Transformer encoder to output first feature data with local and long-term dependencies.

4. The method for probabilistic prediction of medium- and long-term wind power based on temporal attention according to claim 3 is characterized in that: The acquisition of the second feature data having the time series information includes: The preprocessed data set is input into the time series feature extraction module, and after the first layer convolution and the second layer convolution processing, it is input into the Relu activation function; The number of input channels and the number of output channels are matched by a downsampling operation, and a residual connection is performed with the input data to obtain second feature data with time series information.

5. The method for probabilistic prediction of medium- and long-term wind power based on temporal attention according to claim 4, characterized in that: The features extracted by different modules are fused by calculating the attention weights, including: The first feature data with local and long-term dependencies is used as a query, and the second feature data with time series information is used as a key and a value, and an attention weight is calculated using a multi-head attention mechanism, and the attention weight is multiplied by the value element, and the result is weighted summed; The second feature data with time series information is used as a query, and the first feature data with local and long-term dependencies is used as a key and a value, and an attention weight is calculated using a multi-head attention mechanism, and the attention weight is multiplied by the value element, and the result is weighted summed; The data obtained by the two weighted sums are concatenated in the feature dimension, and the concatenated features are mapped to the target dimension using a fully connected layer, and the fused feature data is obtained through residual connection.

6. The method for probabilistic prediction of medium- and long-term wind power based on temporal attention according to claim 5, characterized in that: The probabilistic prediction of medium- and long-term wind power based on the fused features includes: Define the quantile and the loss function of quantile regression. The loss function of quantile regression is expressed as: , in, is the target quantile, y is the true value, is the predicted value; Constructing a quantile regression LSTM model, using the obtained time series and dependency feature fusion data as input of the quantile regression LSTM model, and performing a probabilistic prediction of future wind power, wherein the size of the output layer is equal to the number of quantiles; The obtained quantile prediction values ​​are used as reference points of the probability distribution, the normal probability distribution is fitted, and the accuracy of the coverage probability prediction interval is calculated. The formula is expressed as follows: , Among them, CP is the coverage probability, N is the sample space, is the true value of the i-th sample, The indicator function condition is 1 if it is satisfied, otherwise it is 0. L is the lower limit of the prediction interval, and U is the upper limit of the prediction interval.

7. The method for probabilistic prediction of medium- and long-term wind power based on temporal attention according to claim 6, characterized in that: The adaptive exponential smoothing error correction module is introduced to correct the preliminary prediction results, and the final result of the medium- and long-term wind power probabilistic prediction includes: Calculate the error series and define dynamic adjustment factors; Dynamically adjust the smoothing coefficient according to the change of the error sequence; An improved exponential smoothing formula is calculated according to the dynamic adjustment factor, and the smoothed error sequence is input into the model to obtain a corrected error sequence, and the corrected error sequence is added to the prediction sequence to obtain the final result of the medium- and long-term wind power probabilistic prediction.

8. A medium- and long-term wind power probabilistic prediction system based on temporal attention, using any method as claimed in claim 1 to claim 7, characterized in that: include: A data acquisition and processing unit, used to acquire the meteorological data of the wind farm and wind turbine power-related data and perform pre-processing; A sequence feature extraction unit, used to input the preprocessed data set into the encoder of the multi-attention dependency calculation module and the temporal feature extraction module respectively, to obtain first feature data with local and long-term dependencies and second feature data with temporal information; A feature fusion unit, configured to input the first feature data and the second feature data into a bidirectional cross attention module, and fuse features extracted by different modules by calculating attention weights; The probabilistic prediction unit is used to perform probabilistic prediction of medium- and long-term wind power based on the fused features and obtain preliminary prediction results; The prediction result correction unit is used to introduce an adaptive exponential smoothing error correction module to correct the preliminary prediction result to obtain the final result of the medium- and long-term wind power probabilistic prediction.

9. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having computer-executable instructions stored thereon, characterized in that: When the computer executable instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Probability wind speed prediction method and system based on multi-scale information

    CN114399021A

  • Wind power interval prediction and interpretable method considering space-time correlation

    CN116937579A

  • Short-term load interval prediction method

    CN118336705A

  • Wind power prediction method, system, equipment and medium

    CN118396042A

  • Wind power prediction method and system

    CN119362450A

Cited By

  • Wind power plant wind speed prediction correction method and system based on wind speed-error feature fusion

    CN120745436A

  • Intelligent weight prediction method for dynamic scene

    CN120805990A