Medium- and long-term wind power probabilistic forecasting method and system based on temporal attention

Through the combination of the timing attention model and the adaptive smoothing error correction module, the data dependence and complexity problems in medium and long-term wind power prediction are solved, high-precision probability prediction of wind power is achieved, and the reliability of grid scheduling is enhanced.

CN120069231BActive Publication Date: 2025-08-19GUIZHOU POWER GRID CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art has a dependence on a large amount of accurate data and high-complexity calculations in medium- and long-term wind power prediction, and the prediction accuracy is insufficient in nonlinear, non-stationary and complex and variable environments.

Method used

The medium- and long-term wind power probability prediction method is adopted based on timing attention, and the dependence of the time series is captured through local and global attention, and combined with the memory unit and the adaptive index smoothing error correction module to perform data preprocessing, feature extraction and probability prediction.

Benefits of technology

It significantly improves the modeling ability of dependencies on different time scales, can dynamically adjust the prediction results, adapt to the rapid changes in wind power, provide probability distribution prediction of wind power, and improves prediction accuracy and reliability of grid scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120069231B_ABST
    Figure CN120069231B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of wind power prediction technology, and discloses a method and system for probabilistically predicting medium- and long-term wind power based on temporal attention. The method comprises: preprocessing meteorological data and wind turbine power data of a wind farm; obtaining dependency features in the sequence through global attention, local attention, and memory units in a MAHT module, obtaining temporal features in the sequence using a TCN module, and fusing feature information between different modules through a cross-attention module; performing probabilistic prediction of medium- and long-term wind power based on the fused features to obtain preliminary prediction results; and introducing an adaptive exponential smoothing error correction module to correct the preliminary prediction results to obtain a final prediction result. The present invention makes full use of different feature extraction modules to extract sequence features, and introduces probabilistic prediction and error correction to achieve high-precision medium- and long-term wind power prediction, ensuring the stable and safe operation of the power system.
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 in particular to a medium- and long-term wind power probabilistic prediction method and system based on temporal attention. Background Art

[0002] As a clean, renewable energy source, wind power plays an increasingly important role in the global energy mix. However, due to its instability and uncontrollability, the volatility of wind power generation poses challenges to the stable operation of power grids and the management of electricity markets. Therefore, accurate wind power forecasting has become a key technology for improving the economic efficiency and reliability of wind power systems. Medium- and long-term wind power forecasting enables the proactive planning of grid operations, maintenance schedules, and power trading strategies, and is therefore crucial for the safe operation and planning of power systems.

[0003] Medium- and long-term wind power forecasting methods can be mainly summarized as physical methods, statistical methods, and artificial intelligence methods. Physical methods are based on the physical principles of meteorology and wind power generation. They simulate and predict wind power by constructing complex mathematical models. They usually involve in-depth research on wind field characteristics, including the impact of factors such as terrain, vegetation, and obstacles on wind speed and direction. Because physical methods rely on precise physical models and a large amount of meteorological data, they are computationally intensive and highly complex. Statistical methods focus on extracting the statistical relationship between wind power and meteorological factors from historical data. Based on probability and statistical theory, they predict wind power by constructing time series models, regression models, or machine learning algorithms. Statistical methods do not require an in-depth understanding of the physical characteristics of wind farms, but rely on the regularity and correlation of historical data. When dealing with nonlinear, non-stationary, and complex and changing wind farm environments, their prediction accuracy may be limited.

[0004] Artificial intelligence methods, particularly machine learning and deep learning technologies, have made significant progress in wind power forecasting in recent years. Deep learning can automatically learn the complex mapping relationship between wind power and various meteorological factors from large amounts of historical data without explicitly building physical or statistical models. Artificial intelligence methods can capture the spatiotemporal distribution characteristics of wind power, its cyclical variations, and the impact of extreme weather events. Due to their powerful data processing and pattern recognition capabilities, artificial intelligence methods can provide more accurate and stable forecasts, especially when dealing with nonlinear, nonstationary, 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 probabilistic wind power prediction method and system based on temporal attention to solve the problem of how to reduce the dependence on large amounts of precise data and high-complexity calculations while ensuring prediction accuracy, while improving the wind power prediction capability in nonlinear, non-stationary and complex and changeable environments.

[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0008] In a first aspect, the present invention provides a medium- and long-term wind power probabilistic forecasting method based on temporal attention, comprising:

[0009] Obtain meteorological data and wind turbine power-related data of the wind farm and perform preprocessing;

[0010] 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;

[0011] 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 the attention weight;

[0012] Based on the fused features, a probabilistic forecast of medium- and long-term wind power is conducted to obtain preliminary forecast results.

[0013] 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 probabilistic wind power prediction.

[0014] As a preferred solution of the medium- and long-term wind power probabilistic prediction method based on temporal attention described in the present invention, the preprocessing process includes:

[0015] Dataset Each They are all d-dimensional feature vectors. Dynamic adaptive K-nearest neighbor filling method is used to fill the missing values of meteorological data and wind power. For 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;

[0016] Dynamically selecting a K value based on the local density;

[0017] Calculate the Gaussian weights of the missing point and each neighboring point , and add time series regularization terms;

[0018] 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 dataset is divided into a training set and a test set.

[0019] As a preferred solution of the medium- and long-term wind power probabilistic prediction method based on temporal attention according to the present invention, the acquisition of the first characteristic data with local and long-term dependence includes:

[0020] The original time series is divided into multiple local windows, each containing n time steps. Self-attention is calculated within each window, and the local attention representations of all windows are spliced in chronological order to obtain the local attention of the sequence.

[0021] The original time series is used as the input of global attention, and self-attention is calculated on the entire sequence to obtain global attention;

[0022] A memory cell is introduced, and an attention mechanism is used to treat the input sequence as a query, and the memory cell as a key and value. By calculating the attention weight, the most relevant information of the current input is retrieved from the memory cell, and the memory cell is dynamically updated according to the current input through a gating structure.

[0023] 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.

[0024] As a preferred solution of the medium- and long-term wind power probabilistic prediction method based on time series attention described in the present invention, the acquisition of the second feature data with time series information includes:

[0025] The preprocessed data set is input into the time series feature extraction module, and after the first convolution layer and the second convolution layer, it is input into the ReLU activation function;

[0026] The number of input channels and the number of output channels are matched by downsampling operation, and residual connection is performed with the input data to obtain the second feature data with time series information.

[0027] As a preferred solution of the medium- and long-term wind power probabilistic prediction method based on temporal attention described in the present invention, the features extracted from different modules by calculating attention weights include:

[0028] 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. The attention weight is calculated using a multi-head attention mechanism, and the attention weight is multiplied by the value element-wise, and the result is weighted summed.

[0029] 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. The attention weight is calculated using a multi-head attention mechanism, and the attention weight is multiplied by the value element-wise, and the result is weighted summed.

[0030] The data obtained by the two weighted sums are spliced in the feature dimension, and the spliced features are mapped to the target dimension using a fully connected layer, and the fused feature data is obtained through residual connection.

[0031] As a preferred solution of the medium- and long-term wind power probabilistic prediction method based on temporal attention described in the present invention, the probabilistic prediction of medium- and long-term wind power based on fused features includes:

[0032] Define the quantile and the loss function of quantile regression. The loss function of quantile regression is expressed as:

[0033] ,

[0034] in, is the target quantile, y is the true value, is the predicted value;

[0035] Constructing a quantile regression LSTM model, using the obtained time series and dependency feature fusion data as input to the quantile regression LSTM model to perform a probabilistic forecast of future wind power, wherein the size of the output layer is equal to the number of quantiles;

[0036] 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 evaluation probability prediction interval is calculated. The formula is expressed as follows:

[0037] ,

[0038] 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, otherwise it is 0. L is the lower limit of the prediction interval, and U is the upper limit of the prediction interval.

[0039] As a preferred solution of the medium- and long-term wind power probabilistic forecasting method based on time series attention described in the present invention, wherein: the adaptive exponential smoothing error correction module is introduced to correct the preliminary forecast result, and the final result of the medium- and long-term wind power probabilistic forecasting is obtained, which includes:

[0040] Calculate the error series and define dynamic adjustment factors;

[0041] Dynamically adjust the smoothing coefficient according to the change of the error sequence;

[0042] An improved exponential smoothing formula is calculated based on the dynamic adjustment factor, and the smoothed error sequence is input into the model to obtain a corrected error sequence, which is then added to the prediction sequence to obtain the final result of the medium- and long-term probabilistic wind power prediction.

[0043] In a second aspect, the present invention provides a medium- and long-term wind power probabilistic prediction system based on temporal attention, comprising:

[0044] Data acquisition and processing unit, used to acquire meteorological data of the wind farm and wind turbine power-related data and perform pre-processing;

[0045] A sequence feature extraction unit is 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;

[0046] 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;

[0047] 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;

[0048] 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.

[0049] In a third aspect, the present invention provides an electronic device, comprising:

[0050] memory and processor;

[0051] 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 medium- and long-term wind power probabilistic prediction method based on temporal attention are implemented.

[0052] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the medium- and long-term wind power probabilistic prediction method based on temporal attention.

[0053] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention provides a medium- and long-term probabilistic wind power prediction method and system based on temporal attention, which significantly improves the modeling ability of dependencies of different time scales in time series through a hierarchical design of capturing short-term dependencies with local attention and capturing long-term dependencies with global attention, introduces memory units to explicitly store historical key information, and enhances the ability to capture key historical patterns in ultra-long sequences through a dynamic retrieval and update mechanism; moreover, the present invention can effectively capture the nonlinear and complex patterns in wind power data, dynamically adjust the prediction results according to real-time data, and adapt to the rapid changes in wind power; at the same time, it 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 assess the future power fluctuation range, thereby improving the reliability of power grid dispatch; in addition, the present invention can dynamically adjust the smoothing coefficient according to the changes in the error sequence by introducing a dynamic adjustment factor, has strong adaptability to the changes in the error sequence, and can maintain a good smoothing effect under different error distribution conditions, thereby improving the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0055] Figure 1 A schematic diagram of the overall process logic of the method according to one embodiment of the present invention;

[0056] Figure 2 A module flow chart of a method according to an embodiment of the present invention;

[0057] Figure 3 A graph showing prediction results of the method according to an embodiment of the present invention;

[0058] Figure 4 A schematic diagram of a comparative experiment of the method according to one embodiment of the present invention;

[0059] Figure 5 Schematic diagram of mean square error comparison curve of the method described in one embodiment of the present invention. DETAILED DESCRIPTION

[0060] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, the following detailed description of the specific embodiments of the present invention is given in conjunction with the accompanying drawings. It is obvious that the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in this field without creative work should fall within the scope of protection of the present invention.

[0061] Example 1

[0062] Reference Figure 1-Figure 2 As an embodiment of the present invention, a medium- and long-term wind power probabilistic prediction method based on temporal attention is provided, such as Figure 1 The specific steps shown include:

[0063] S100: Acquire meteorological data and wind turbine power-related data of the wind farm and perform preprocessing;

[0064] S200: Inputting the preprocessed data set into the encoder of the multi-attention dependency calculation module to obtain first feature data with local and long-term dependencies;

[0065] S300: Inputting the preprocessed data set into a time series feature extraction module to obtain second feature data with time series information;

[0066] S400: 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 weight;

[0067] S500: Input the fused features into the quantile regression LSTM model to perform probabilistic prediction of medium- and long-term wind power and obtain preliminary prediction results;

[0068] S600: 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 probabilistic wind power prediction.

[0069] It should be noted that the present invention provides a medium- and long-term probabilistic wind power prediction method and system based on temporal attention. Through the hierarchical design of capturing short-term dependencies with local attention and capturing long-term dependencies with global attention, the modeling capability of dependencies at different time scales in time series is significantly improved. Memory units are introduced to explicitly store historical key information. Through dynamic retrieval and update mechanisms, the ability to capture key historical patterns in ultra-long sequences is enhanced. Moreover, the present invention can effectively capture nonlinear and complex patterns in wind power data, dynamically adjust prediction results according to real-time data, and adapt to rapid changes in wind power. At the same time, it 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 assess future power fluctuation ranges, thereby improving the reliability of power grid dispatch. In addition, the present invention can dynamically adjust the smoothing coefficient according to changes in the error sequence by introducing a dynamic adjustment factor. It has strong adaptability to changes in the error sequence and can maintain a good smoothing effect under different error distribution conditions, thereby improving prediction accuracy.

[0070] like Figure 2 The figure shows the overall structure of the medium- and long-term wind power probabilistic prediction method based on time series attention. Figure 2 The medium- and long-term wind power probabilistic prediction method of the present invention is described in detail.

[0071] In the embodiment of the present application, the above step S100 includes the following sub-steps A1-A2:

[0072] In A1: Obtain historical wind power data, wind speed and direction of wind towers, and ERA5 meteorological data;

[0073] In A2: The acquired data is preprocessed, mainly by dynamically filling in missing data.

[0074] Specifically, the preprocessing process includes:

[0075] Dataset Each They are all d-dimensional feature vectors. Dynamic adaptive K-nearest neighbor filling method is used to fill the missing values of meteorological data and wind power. For 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. The Mahalanobis distance and the local density of the missing point are calculated as follows:

[0076] ,

[0077] ,

[0078] in, Missing point and neighboring points The Mahalanobis distance, is the inverse of the covariance matrix, is the preset maximum number of neighbors;

[0079] The K value is dynamically selected based on the local density. The higher the local density, the larger the K value, and the lower the local density, the smaller the K value, as shown in the following formula:

[0080] ,

[0081] in, and The minimum and maximum values are preset, and these two values determine the range of the dynamic K value. is the local density maximum of all missing points;

[0082] Under the premise of determining K value, calculate the Gaussian weight of the missing point and each neighboring point for the missing point , and add a time series regularization term to avoid overfitting. The time series regularization term and Gaussian weight are as follows:

[0083] ,

[0084] ,

[0085] in, is the time series regularization term, Missing point timestamp, For neighboring points timestamp, is the time scale parameter, is the Gaussian weighted standard deviation, is the regularization coefficient;

[0086] After normalizing the calculated Gaussian weights, calculate the missing values and fill them in the corresponding positions;

[0087] The meteorological data and wind power data with filled missing values are normalized, and the datasets are divided into training and testing sets.

[0088] It should be noted that the above step S100 obtains and pre-processes the meteorological data and wind turbine power-related data of the wind farm, thereby providing high-quality, structured input data for subsequent analysis and ensuring the accuracy and availability of the data.

[0089] In the embodiment of the present application, the above step S200 includes the following sub-steps B1 to B4:

[0090] In B1: the original time series is divided into multiple local windows, each containing n time steps. Self-attention is calculated within each window, and the local attention representations of all windows are spliced in chronological order to obtain the local attention of the sequence. The data dimension is 32×16×32.

[0091] In B2: the original time series is used as the input of global attention, and self-attention is calculated on the entire sequence to obtain global attention, where the dimension of the input feature is 7, the number of attention heads is 2, and the dimension of the global attention representation is 32×16×32;

[0092] In B3, memory cells are introduced. An attention mechanism is used to treat the input sequence as a query and the memory cells as keys and values. The attention weights are calculated to retrieve the most relevant information from the memory cells. The memory cells are dynamically updated based on the current input through a gating structure. The memory cell is a learnable parameter matrix of size 64, used to store historical information.

[0093] In B4: The outputs of local attention, global attention, and memory units are fused using dynamic weights through a gated fusion mechanism. The fused data is input into the feedforward neural network of the Transformer encoder, and the first feature data with local and long-term dependencies is output. The data dimension is 32×16×32.

[0094] It should be noted that the above step S200 inputs the preprocessed data into the encoder of the multi-attention dependency calculation module, extracts the first feature data with local and long-term dependencies, effectively captures the short-term fluctuations and long-term trends in the data, enhances the model's ability to model dependencies at different time scales, and improves the accuracy and reliability of the prediction.

[0095] In the embodiment of the present application, the above step S300 includes the following sub-steps C1 to C3:

[0096] In C1: the preprocessed dataset is passed through the first convolution layer of the time series feature extraction module, where the convolution kernel size is 3 and the expansion coefficient is 1; after the cropping and padding operations, the redundant padding is removed, and the weights are normalized before inputting into the ReLU activation function;

[0097] It should be noted that to ensure that the model can only rely on current and past information, the input sequence is padded with zeros on the right side in the first convolution operation, with a padding size of 2. After the convolution operation is completed, due to the existence of right-side padding, the output time step will be a part longer than the input, and a cropping operation is required. The cropping size is equal to the padding size in the convolution operation. The redundant padding is removed by retaining all batches and channels but cropping the last two elements in the time dimension.

[0098] In C2, the data obtained from the first convolution layer passes through the second convolution layer of the time series feature extraction module, where the convolution kernel size is 3 and the expansion coefficient is 2. After the cropping and padding operation, the redundant padding is removed, and the weight is normalized before inputting into the ReLU activation function.

[0099] It should be noted that to ensure that the model can only rely on current and past information, the right side of the input sequence is padded with zeros in the second convolution operation, with a padding size of 4. After the convolution operation is completed, due to the existence of right-side padding, the output time step will be a part longer than the input, and a cropping operation is required. The cropping size is equal to the padding size in the convolution operation. The redundant padding is removed by retaining all batches and channels but cropping the last 4 elements in the time dimension.

[0100] In C3: the number of input channels and output channels are kept consistent through downsampling operations, 1×1 convolution is used for channel matching, and finally a residual connection is performed with the input data to obtain the second feature data with time series information, where the data dimension is 32×16×64.

[0101] It should be noted that if the number of channels in the output data of the second convolution layer of the temporal feature extraction module is inconsistent with the number of channels in the original data when the first convolution layer of the temporal feature extraction module was input, a 1×1 convolution is used to perform channel matching on the original input data. If the number of channels in the two layers is consistent, no matching operation is required. The output data of the second convolution layer of the temporal feature extraction module is residually connected with the original input data or the original input data after the channel matching process to obtain second feature data with temporal information.

[0102] It should be noted that the above step S300 obtains the second feature data with time series information by inputting the preprocessed data set into the time series feature extraction module, which can effectively capture the time dynamic characteristics of wind power data, provide rich time series information support for the subsequent fusion of different features, and enhance the model's understanding and prediction capabilities of time series dependencies.

[0103] In the embodiment of the present application, the above step S400 includes the following sub-steps D1 to D3:

[0104] In D1: the first feature data with local and long-term dependencies is used as the query, and the second feature data with time series information is used as the key and value. The multi-head attention mechanism is used to calculate the attention weight, multiply the attention weight by the value element, and perform weighted summation on the results.

[0105] In D2: the second feature data with temporal information is used as the query, and 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 weight, multiply the attention weight by the value element, and perform weighted summation on the results.

[0106] In D3, the data obtained by the two weighted sums are concatenated in the feature dimension, and a fully connected layer is used to map the concatenated features to the target dimension. The fused feature data is obtained through residual connection, where the fused feature data dimension is 32×16×32.

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

[0108] In the embodiment of the present application, the above step S500 includes the following sub-steps E1 to E3:

[0109] In E1: define the quantile and the loss function of quantile regression, where the quantiles include 0.1, 0.5, and 0.9. The loss function of quantile regression is expressed as:

[0110] ,

[0111] in, is the target quantile, y is the true value, is the predicted value;

[0112] In E2: Build a quantile regression LSTM model and use the obtained time series and dependency feature fusion data as the input of the quantile regression LSTM model to make a probabilistic prediction of future wind power. The size of the output layer is equal to the number of quantiles.

[0113] Specifically, building a quantile regression LSTM model includes: using LSTM as the core module, adding a fully connected layer after the LSTM layer, whose output size is equal to the number of quantiles to generate a predicted value corresponding to each quantile.

[0114] In E3: Use the obtained quantile prediction values as 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:

[0115] ,

[0116] 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, otherwise it is 0. L is the lower limit of the prediction interval, and U is the upper limit of the prediction interval.

[0117] It should be noted that the above step S500 inputs the fused features into the quantile regression LSTM model to perform probabilistic prediction of medium- and long-term wind power. It can not only provide a probability distribution of wind power rather than a single prediction value, effectively capturing the nonlinearity and complex patterns in 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 operators better assess the future power fluctuation range.

[0118] In the embodiment of the present application, the above step S600 includes the following sub-steps F1 and F2:

[0119] 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 dynamic adjustment factor are as follows:

[0120] ,

[0121] ,

[0122] in, is the dynamic adjustment factor, and Represent the actual value of wind power at time t and the initial prediction result of the model, represents the error sequence, It is a tuning parameter used to control the sensitivity of dynamic adjustment;

[0123] In F2: The exponential smoothing formula is improved based on the dynamic adjustment factor calculation, and the smoothed error sequence is input into the model to obtain the corrected error sequence. The corrected error sequence is added to the forecast sequence to obtain the final result of the medium- and long-term probabilistic forecast of wind power. The smoothed error sequence and the corrected error sequence are as follows:

[0124] ,

[0125] ,

[0126] in, is the smoothed error sequence, is the smoothing coefficient, ranging from [0,1], is the corrected error sequence.

[0127] It should be noted that the above step S600 introduces an adaptive exponential smoothing error correction module to correct the preliminary prediction results. The smoothing coefficient is automatically adjusted according to the change of the error sequence through a dynamic adjustment factor, which effectively improves the accuracy and adaptability of the prediction results. It can maintain a good smoothing effect under different error distribution conditions, further reduce the prediction error, and ensure the stability and reliability of the final wind power probabilistic prediction results.

[0128] Example 2

[0129] Reference Figures 3 to 5 Based on the previous embodiment, this embodiment provides an application example of a medium- and long-term wind power probabilistic prediction method based on temporal attention, in order to verify and illustrate the technical effects adopted in this method.

[0130] The experimental data in this example uses two months of recorded data from a domestic wind farm. The data includes wind turbine data and historical meteorological data including wind speed, wind direction, temperature, and air pressure. The wind power data is sampled every hour. The data for the first 50 days is used as training data, and the data for the last 10 days is used as test data. Table 1 shows the quantitative analysis results of four wind power prediction methods. Each model was tested on the test set divided by the present invention. , RMSE, MSE, and MAE are all averaged over 20 experiments.

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

[0132] ,

[0133] As can be seen from Table 1, QR-LSTM outperforms other methods. The MSE of QR-LSTM reaches 0.029, which is 0.006 lower than TCN-Transformer, 0.017 lower than ConvLSTM, and 0.033 lower than BiGRU. In terms of performance, 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 has the most stable performance.

[0134] In addition, if Figure 3 The figure shows the results of the probabilistic prediction of wind power for the next 6 days. It can be seen that the prediction results are close to the actual values. Figure 4 The figure shows a comparative prediction experiment between the method of the present invention and other methods. It can be seen that the prediction results of the method of the present invention are more accurate. Figure 5 The figure shows a comparison of the mean square error between the method of the present invention and other methods of the present invention. It can be seen that the method of the present invention can achieve the lowest mean square error more quickly.

[0135] It can be seen from the above embodiments that the present invention provides a medium- and long-term probabilistic wind power prediction method and system based on time series attention. Through the hierarchical design of capturing short-term dependencies with local attention and capturing long-term dependencies with global attention, the modeling capability of dependencies at different time scales in time series is significantly improved. Memory units are introduced to explicitly store historical key information. Through dynamic retrieval and update mechanisms, the ability to capture key historical patterns in ultra-long sequences is enhanced. Moreover, the present invention can effectively capture nonlinear and complex patterns in wind power data, dynamically adjust prediction results according to real-time data, and adapt to rapid changes in wind power. At the same time, it 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 assess the future power fluctuation range, thereby improving the reliability of power grid dispatch. In addition, the present invention can dynamically adjust the smoothing coefficient according to changes in the error sequence by introducing a dynamic adjustment factor. It has strong adaptability to changes in the error sequence and can maintain a good smoothing effect under different error distribution conditions, thereby improving prediction accuracy.

[0136] Example 3

[0137] This embodiment provides a medium- and long-term wind power probabilistic forecasting system based on temporal attention, including:

[0138] Data acquisition and processing unit, used to acquire meteorological data of the wind farm and wind turbine power-related data and perform pre-processing;

[0139] A sequence feature extraction unit is 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;

[0140] 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 the attention weight;

[0141] 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;

[0142] The prediction result correction unit is used to introduce an adaptive exponential smoothing error correction module to correct the preliminary prediction results and obtain the final result of the medium- and long-term wind power probabilistic prediction.

[0143] It should be noted that the technical solution of the system for probabilistic prediction of medium- and long-term wind power based on temporal attention and the technical solution of the above-mentioned method for probabilistic prediction of medium- and long-term wind power based on temporal attention belong to the same concept. 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 temporal attention in this embodiment, please refer to the description of the technical solution of the above-mentioned method for probabilistic prediction of medium- and long-term wind power based on temporal attention.

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

[0145] This embodiment also provides an electronic device, which includes a processor, memory, a communication interface, a display screen, and an input device connected via a system bus. 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 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. The wireless manner can be achieved through WIFI, an operator network, NFC (near field communication), or other technologies. When the computer program is executed by the processor, a medium- and long-term wind power probabilistic prediction method based on temporal attention is implemented. The display screen of the computer device can be a liquid crystal display or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a key, trackball, or touchpad provided on the computer device housing, or an external keyboard, touchpad, or mouse.

[0146] This embodiment further 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.

[0147] 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 fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0148] From the above description of the embodiments, those skilled in the art will clearly understand that the present invention can be implemented using software and necessary general-purpose hardware. Of course, it can also be implemented using hardware, but in many cases the former is the preferred embodiment. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, can be embodied in the form of a software product. This software product can be stored on a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk, or optical disk, and includes instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of the embodiments of the present invention.

[0149] 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 the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

[0150] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a fully hardware embodiment, a fully software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may 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 may be implemented using various computer languages.

[0151] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes 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 a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0152] These computer program instructions may 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, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0153] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0154] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.

[0155] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A medium- and long-term wind power probabilistic forecasting method based on temporal attention, characterized by: include: Obtain 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; The acquisition of the first feature data having local and long-term dependencies includes: The original time series is divided into multiple local windows, each containing n time steps. Self-attention is calculated within each window, and the local attention representations of all windows are spliced in chronological order to obtain the local attention of the sequence. The original time series is used as the input of global attention, and self-attention is calculated on the entire sequence to obtain global attention; A memory cell is introduced, and an attention mechanism is used to treat the input sequence as a query, and the memory cell as a key and value. By calculating the attention weight, the most relevant information of the current input is retrieved from the memory cell, and the memory cell is dynamically updated according to the current input through a gating structure. 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 is input into a feedforward neural network of a Transformer encoder to output first feature data with local and long-term dependencies; The acquisition of the second feature data having time series information includes: The preprocessed data set is input into the time series feature extraction module, and after the first convolution layer and the second convolution layer, it is input into the ReLU activation function; The number of input channels and the number of output channels are matched by downsampling operation, and residual connection is performed with the input data to obtain the second feature data with time series information; 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 the attention weight; The features extracted by different modules by calculating attention weights include: 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. The attention weight is calculated using a multi-head attention mechanism, and the attention weight is multiplied by the value element-wise, 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. The attention weight is calculated using a multi-head attention mechanism, and the attention weight is multiplied by the value element-wise, and the result is weighted summed. The data obtained by the two weighted sums are spliced in the feature dimension, and the spliced features are mapped to the target dimension using a fully connected layer, and the fused feature data is obtained through residual connection; Based on the fused features, a probabilistic forecast of medium- and long-term wind power is conducted to obtain preliminary forecast results. 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; 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 is obtained, which includes: 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 dynamic adjustment factor are as follows: E t =wpdata t -pd t Among them, β t Is a dynamic adjustment factor, wpdata t With pd t They represent the actual wind power value at time t and the initial prediction result of the model, E t represents the error sequence, and γ is a tuning parameter used to control the sensitivity of dynamic adjustment; Dynamically adjust the smoothing coefficient according to the change of the error sequence; An improved exponential smoothing formula is calculated based on the dynamic adjustment factor, and the smoothed error sequence is input into the model to obtain a corrected error sequence. The corrected error sequence is added to the forecast sequence to obtain the final result of the medium- and long-term probabilistic forecast of wind power. The smoothed error sequence and the corrected error sequence are as follows: in, is the smoothed error sequence, α is the smoothing coefficient, and the range is is the corrected error sequence.

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 D = {x1, x2, ..., x n } for each x i They are all d-dimensional feature vectors. Dynamic adaptive K-nearest neighbor filling method is used to fill the missing values of meteorological data and wind power. For missing points, the nearest K max 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 weight w of the missing point and each neighboring point il , 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 dataset 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 1 is 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: Among them, τ 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 to the quantile regression LSTM model to perform a probabilistic forecast 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 evaluation probability prediction interval is calculated. The formula is expressed as follows: Among them, CP is the coverage probability, N is the sample space, y i is the true value of the i-th sample, Π(·) is the indicator function whose value is 1 if the condition holds, otherwise it is 0, L is the lower limit of the prediction interval, and U is the upper limit of the prediction interval.

4. A medium- and long-term wind power probabilistic forecasting system based on temporal attention, applying the method according to any one of claims 1 to 3, characterized in that: include: Data acquisition and processing unit, used to acquire meteorological data of the wind farm and wind turbine power-related data and perform pre-processing; A sequence feature extraction unit is 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 the 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.

5. 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 3 are implemented.

6. 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 3 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