Wind power online modeling prediction method and device for coping with concept drift
By adjusting the wind power prediction model online and utilizing historical data and numerical weather forecast wind speed, the problem of concept drift in wind power prediction is solved, the prediction accuracy and adaptability are improved, and the waste of computing resources and model overfitting are avoided.
Patent Information
- Application Number
- CN202510763051.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-09-19
AI Technical Summary
The existing offline modeling methods have low adaptability and low prediction accuracy in wind power prediction models when concepts drift due to changes in meteorological factors, unit status and wind turbine control strategies.
The initial model is trained by obtaining historical power sequence values, and the model is adjusted according to the input power sequence values and numerical weather forecast wind speed. Alternatively, the initial model is directly used for prediction when the divergence is less than the threshold. The Seq2Seq model is combined with the LSTM neural network to process the time series relationship and perform online modeling adjustment.
It effectively overcomes the concept drift problem, improves the accuracy and adaptability of wind power prediction, reduces computing resource consumption and training time, and prevents model overfitting and catastrophic forgetting.
Smart Images

Figure CN120671522A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of renewable energy power generation, and in particular to a method and device for online modeling and prediction of wind power for coping with concept drift. Background Art
[0002] Ultra-short-term wind power series forecasting is a key technology for ensuring the safe and stable operation of power systems. Most current research uses offline modeling. However, due to changes in external conditions such as meteorological factors, turbine status, and wind turbine control strategies, the mapping relationship between model input variables and power is time-varying, resulting in concept drift and low adaptability of offline modeling strategies.
[0003] Therefore, there is an urgent need for an online wind power modeling and prediction method that can deal with concept drift, which can effectively overcome the concept drift problem of offline modeling and thus improve the prediction accuracy. Summary of the Invention
[0004] In order to solve the above technical problems, the embodiments of the present disclosure provide a method and device for online modeling and prediction of wind power that copes with concept drift.
[0005] A first aspect of an embodiment of the present disclosure provides a method for online modeling and prediction of wind power to cope with concept drift, the method comprising:
[0006] Obtaining historical power sequence values, and training a preset initial model based on the historical power sequence values to obtain a first model; wherein the historical power sequence values include power sequence values within a historical preset time period and power sequence values within a historical future preset time period; the historical preset time period is a historical time period starting at a preset moment; the historical future preset time period is a future time period starting at the preset moment; the preset moment is preset;
[0007] Obtaining an input power sequence value, and determining whether to adjust the first model according to the input power sequence value;
[0008] If yes, adjusting the first model according to the input power sequence value and the preset numerical weather forecast wind speed to obtain a second model;
[0009] Inputting the input power sequence value into the second model, and predicting a power sequence value within a future preset time period based on the input power sequence value based on the second model; wherein the future preset time period is determined by the current moment of the input power sequence value;
[0010] If not, the input power sequence value is input into the first model, and the power sequence value within the future preset time period is predicted based on the first model according to the input power sequence value.
[0011] In one example, determining whether to adjust the first model according to the input power sequence value includes:
[0012] Searching for a first similar power sequence value in a preset historical database; wherein the first similar power sequence value includes a historical similar power sequence value and a future power sequence value; the time period of the historical similar power sequence value is the same as the time period of the input power sequence value; and the future power sequence value has a corresponding relationship with the first similar power sequence value;
[0013] determining a divergence of the future power sequence value according to the future power sequence value;
[0014] If the divergence is greater than a threshold, determining to adjust the first model;
[0015] If the divergence is not greater than the threshold, it is determined that the first model is not adjusted.
[0016] In one example, searching for the first similar power sequence value in a preset historical database includes:
[0017] Traversing the first power sequence value in the preset historical database in the same time period as the input power sequence value;
[0018] Calculating a first similarity between the first power sequence value and the input power sequence value;
[0019] Arrange the first similarities in ascending order to obtain a first sorting result;
[0020] The first power sequence values that are a preset number before the first sorting result are determined as the historical similar power sequence values, and the first similar power sequence value is determined according to the historical similar power sequence values.
[0021] In one example, determining the divergence of the future power sequence value according to the future power sequence value includes:
[0022] Calculating an average power sequence value within a future preset time period based on the future power sequence value;
[0023] Calculating a second similarity between the average power sequence value in the future preset time period and the future power sequence value;
[0024] The second similarity is determined as the divergence of the future power sequence value.
[0025] In one example, adjusting the first model according to the input power sequence value and a preset numerical weather forecast wind speed to obtain the second model includes:
[0026] Searching for a second power sequence value in a preset historical database according to the input power sequence value;
[0027] Calculating a third similarity between the second power sequence value and the input power sequence value;
[0028] Searching for historical numerical weather forecast wind speeds in a preset historical database according to the preset numerical weather forecast wind speeds;
[0029] Calculating a fourth similarity between the preset numerical weather forecast wind speed and the historical numerical weather forecast wind speed;
[0030] The first model is adjusted according to the third similarity and the fourth similarity to obtain the second model.
[0031] In one example, adjusting the first model according to the third similarity and the fourth similarity to obtain the second model includes:
[0032] performing a first normalization process on the third similarity to obtain a fifth similarity;
[0033] performing a second normalization process on the fourth similarity to obtain a sixth similarity;
[0034] calculating a weighted sum of the fifth similarity and the sixth similarity;
[0035] The first model is adjusted according to the weighted sum value to obtain the second model.
[0036] In one example, adjusting the first model according to the weighted sum value to obtain the second model includes:
[0037] Arranging the weighted sum values in ascending order to obtain a second sorting result;
[0038] Determining a second similar power sequence value according to the weighted sum value of a preset number of the second sorting results;
[0039] The first model is adjusted according to the second similar power sequence value to obtain the second model.
[0040] A second aspect of an embodiment of the present disclosure provides a wind power online modeling and prediction device for coping with concept drift, the device comprising:
[0041] A first acquisition module is configured to acquire historical power sequence values and train a preset initial model based on the historical power sequence values to obtain a first model; wherein the historical power sequence values include power sequence values within a historical preset period and power sequence values within a historical future preset period; the historical preset period is a historical time period starting at a preset moment; the historical future preset period is a future time period starting at the preset moment; and the preset moment is preset;
[0042] a second acquisition module, configured to acquire an input power sequence value, and determine whether to adjust the first model according to the input power sequence value;
[0043] a determining module, configured to, if yes, adjust the first model according to the input power sequence value and a preset numerical weather forecast wind speed to obtain a second model;
[0044] a first prediction module, configured to input the input power sequence value into the second model, and predict a power sequence value within a future preset time period based on the input power sequence value based on the second model; wherein the future preset time period is determined based on the current moment of the input power sequence value;
[0045] The second prediction module is configured to input the input power sequence value into the first model if no, and predict the power sequence value within the future preset time period based on the input power sequence value based on the first model.
[0046] A third aspect of an embodiment of the present disclosure provides an electronic device, comprising: a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the method of the first aspect above.
[0047] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of the first aspect described above can be implemented.
[0048] The disclosed embodiment provides a method and device for online modeling and prediction of wind power to cope with concept drift, the method comprising: obtaining historical power sequence values, training a preset initial model based on the historical power sequence values to obtain a first model; obtaining an input power sequence value, and determining whether to adjust the first model according to the input power sequence value; if so, adjusting the first model according to the input power sequence value and a preset numerical weather forecast wind speed to obtain a second model; inputting the input power sequence value into the second model, and predicting the power sequence value within a future preset period based on the input power sequence value based on the second model; wherein the future preset period is determined by the current moment of the input power sequence value; if not, inputting the input power sequence value into the first model, and predicting the power sequence value within the future preset period based on the input power sequence value based on the first model. The adoption of this technical solution can effectively overcome the concept drift problem of offline modeling, thereby improving prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0050] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0051] Figure 1 This is a flow chart of a method for online modeling and prediction of wind power to cope with concept drift provided by an embodiment of the present disclosure;
[0052] Figure 2 is a structural diagram of a first model provided by an embodiment of the present disclosure;
[0053] Figure 3 This is a flow chart of a method for online modeling and prediction of wind power to cope with concept drift provided by an embodiment of the present disclosure;
[0054] Figure 4a is a schematic diagram of a divergence greater than a threshold value provided by an embodiment of the present disclosure;
[0055] Figure 4b is a schematic diagram of determining a second similar power sequence value provided by an embodiment of the present disclosure;
[0056] Figure 5 is a schematic diagram of a divergence not greater than a threshold value provided by an embodiment of the present disclosure;
[0057] Figure 6 This is a schematic diagram of a comparison between a predicted value and an actual value of a power sequence value within a future preset time period provided by an embodiment of the present disclosure;
[0058] Figure 7 Schematic diagram of the structure of a wind power online modeling and prediction device for coping with concept drift provided by an embodiment of the present disclosure;
[0059] Figure 8 It is a structural diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0060] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.
[0061] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0062] Figure 1 This is a flow chart of a method for online modeling and prediction of wind power to cope with concept drift provided by an embodiment of the present disclosure. The method can be executed by an electronic device. The electronic device can be exemplarily understood as a device such as a mobile phone, tablet computer, laptop computer, desktop computer, smart TV, etc. Figure 1 As shown, the method provided in this embodiment includes the following steps:
[0063] S101. Obtain historical power sequence values, and train a preset initial model based on the historical power sequence values to obtain a first model; wherein the historical power sequence values include power sequence values within a historical preset time period and power sequence values within a historical future preset time period; the historical preset time period is a historical time period starting from a preset moment; the historical future preset time period is a future time period starting from a preset moment; the preset moment is preset.
[0064] In one example, for a clearer explanation, the preset moment may be a. The preset moment may be a historical moment. The power sequence value within the historical preset period may be Pa1, and the power sequence value within the historical future preset period may be Pa2. The historical preset period may be the past 4 hours starting from a, and the time period is determined at 15-minute time intervals. The historical future preset period may be the future 4 hours starting from a, and the time period is determined at 15-minute time intervals. For example, a is 12:00 on May 16, 2022, and the historical preset period may be from 8:00 to 11:45 on May 16, 2022. The historical future preset period may be from 12:00 to 15:45 on May 16, 2022.
[0065] In this embodiment, the power sequence values within a historical preset period are used as input of a preset initial model, and the power sequence values within a historical future preset period are used as output of the preset initial model to train the preset initial model and obtain a first model.
[0066] In this embodiment, the historical power sequence value is obtained from a preset historical database. The preset initial model can be a Seq2Seq model. For details, see Figure 2 The structure of the first model is shown in Figure 2. The Seq2Seq model is a classic sequence-to-sequence architecture in deep learning. Its core concept is to compress the input sequence into a fixed-length context vector (C) using an encoder, and then convert this vector into an output sequence using a decoder. In this paper, both the encoder and decoder are composed of LSTM neural network units. The LSTM-based Seq2Seq model not only improves the prediction model's ability to process the temporal relationships of input data, but also explores the coupling relationships between input features.
[0067] S102: Obtain an input power sequence value, and determine whether to adjust the first model according to the input power sequence value.
[0068] In one example, the input power sequence value can be P f ={p t-16 , p t-15 , p t-14 , ....p t-1}; where p t-16 ,…,p t-1 Represents the power sequence value of the past 4 hours from the current time t. t-1 represents the past 15 minutes from the current time t, and t-2 to t-16 and so on.
[0069] S103: If yes, adjust the first model according to the input power sequence value and the preset numerical weather forecast wind speed to obtain a second model.
[0070] In one example, the preset numerical weather forecast wind speed is the future numerical weather forecast wind speed. The preset numerical weather forecast wind speed can be obtained from a weather station, specifically WS f ={ws t , ws t+1 , ws t+2 ,...ws t+16}. Among them, ws t ,…,ws t+16 Represents the numerical weather forecast wind speed for the next four hours from the current time t. t+1 represents the next 15 minutes from the current time t, and t+2 to t+16 represent the same.
[0071] S104. Input the input power sequence value into the second model, and predict the power sequence value in a future preset time period based on the input power sequence value based on the second model; wherein the future preset time period is determined by the current moment of the input power sequence value.
[0072] In one example, when the first model is adjusted to the second model, the power sequence value within a future preset time period is predicted based on the input power sequence value using the second model.
[0073] S105: If not, input the input power sequence value into the first model, and predict the power sequence value within a future preset time period based on the input power sequence value based on the first model.
[0074] In one example, if the first model does not need to be adjusted, the power sequence value within a future preset time period is predicted using the first model based on the input power sequence value.
[0075] The disclosed embodiment provides a method for online modeling and prediction of wind power to cope with concept drift, the method comprising: obtaining historical power sequence values, training a preset initial model based on the historical power sequence values, and obtaining a first model; obtaining an input power sequence value, and determining whether to adjust the first model according to the input power sequence value; if so, adjusting the first model according to the input power sequence value and a preset numerical weather forecast wind speed to obtain a second model; inputting the input power sequence value into the second model, and predicting the power sequence value within a future preset period based on the input power sequence value based on the second model; wherein the future preset period is determined by the current moment of the input power sequence value; if not, inputting the input power sequence value into the first model, and predicting the power sequence value within a future preset period based on the input power sequence value based on the first model. By adopting this technical solution, the concept drift problem of offline modeling can be effectively overcome, thereby improving the prediction accuracy.
[0076] Figure 3The present invention provides a flow chart of an online modeling and prediction method for wind power to cope with concept drift. The present invention is optimized based on the above embodiment and can be combined with various optional solutions in one or more of the above embodiments.
[0077] like Figure 3 As shown, the online wind power modeling and prediction method for coping with concept drift may include the following steps:
[0078] S301. Obtain historical power sequence values, and train a preset initial model based on the historical power sequence values to obtain a first model; wherein the historical power sequence values include power sequence values within a historical preset time period and power sequence values within a historical future preset time period; the historical preset time period is a historical time period starting from a preset moment; the historical future preset time period is a future time period starting from a preset moment; the preset moment is pre-set.
[0079] In an example, this step can refer to the content of step S101 and will not be repeated here.
[0080] S302. Search for a first similar power sequence value in a preset historical database; wherein the first similar power sequence value includes a historical similar power sequence value and a future power sequence value; a time period of the historical similar power sequence value is the same as a time period of the input power sequence value; and the future power sequence value has a corresponding relationship with the first similar power sequence value.
[0081] In one example, the input power sequence value may be P f ={p t-16 , p t-15 , p t-14 ,...p t-1}; where p t-16 ,…p t-1 Represents the power sequence value of the past 4 hours from the current time t. t-1 represents the past 15 minutes from the current time t, and t-2 to t-16 and so on.
[0082] In one example, the first similar power sequence value includes a historical similar power sequence value and a future power sequence value. The historical similar power sequence value is the power sequence value of the past four hours at the historical moment ti. The future power sequence value is the power sequence value of the next four hours. For example, the first similar power sequence value is Pb[Pb ti-16 ,...Pb ti-1 , Pb ti ,...Pb ti+16 ]. Among them, Pb1[Pb ti-16 ,...Pb ti-1 ] is the historical similar power sequence value, Pb2[Pb ti,...Pb ti+16 ] is the future power sequence value.
[0083] In one example, searching for a first similar power sequence value in a preset historical database includes:
[0084] Traverse the first power sequence value in the same time period as the input power sequence value in the preset historical database;
[0085] Calculating a first similarity between the first power sequence value and the input power sequence value;
[0086] Arrange the first similarities in ascending order to obtain a first sorting result;
[0087] A preset number of first power sequence values preceding the first sorting result are determined as historical similar power sequence values, and the first similar power sequence value is determined according to the historical similar power sequence values.
[0088] In one example, a first power sequence value is searched in a preset historical database based on a time period of the input power sequence value, where the time period of the first power sequence value is the same as the time period of the input power sequence value. A first similarity is then calculated between each first power sequence value and the input power sequence value.
[0089] In this embodiment, Euclidean distance can be used for calculation. Those skilled in the art will appreciate that other similarity calculation methods can also be used, which are not limited here. The obtained first similarities are then sorted in ascending order to obtain a first sorting result. The preset number can be 500.
[0090] In one example, the first 500 first power sequence values in the first sorting result are determined as historical similar power sequence values, and then the first similar power sequence value corresponding to each historical similar power sequence value is found, wherein the first similar power sequence value includes the future power sequence value.
[0091] S303: Determine the divergence of the future power sequence value according to the future power sequence value.
[0092] In one example, determining the divergence of the future power sequence value according to the future power sequence value includes:
[0093] Calculate the average power sequence value within a future preset time period based on the future power sequence value;
[0094] Calculating a second similarity between the average power sequence value in a future preset time period and the future power sequence value;
[0095] The second similarity is determined as the divergence of the future power sequence values.
[0096] In one example, the number of future power sequence values is 500, and then the average of the 500 future power sequence values is calculated. In this embodiment, the average power sequence value of the future power sequence values is recorded as Z. The second similarity between Z and Pb2 is calculated. In this embodiment, Euclidean distance can be used for calculation. Those skilled in the art should know that other similarity calculation methods can also be used, which are not limited here. In this embodiment, the second similarity is the divergence of the future power sequence values. The larger the second similarity, the more divergent the future power sequence values are, and the smaller the second similarity, the more concentrated the future power sequence values are.
[0097] S304: If the divergence is greater than the threshold, determine to adjust the first model.
[0098] In one example, the threshold is a preset value, for example, 20000. If the divergence is greater than the threshold, it indicates that concept drift has occurred, and the first model is adjusted.
[0099] S305: If the divergence is not greater than the threshold, determine not to adjust the first model.
[0100] In one example, if the divergence is not greater than the threshold, it indicates that concept drift has not occurred, and the first model does not need to be adjusted.
[0101] S306: If yes, adjust the first model according to the input power sequence value and the preset numerical weather forecast wind speed to obtain a second model.
[0102] In one example, see Figure 4a A schematic diagram showing a divergence greater than a threshold.
[0103] In one example, adjusting the first model according to the input power sequence value and the preset numerical weather forecast wind speed to obtain the second model includes:
[0104] Searching for a second power sequence value in a preset historical database according to the input power sequence value;
[0105] calculating a third similarity between the second power sequence value and the input power sequence value;
[0106] Searching for historical numerical weather forecast wind speeds in a preset historical database according to preset numerical weather forecast wind speeds;
[0107] calculating a fourth similarity between a preset numerical weather forecast wind speed and a historical numerical weather forecast wind speed;
[0108] The first model is adjusted according to the third similarity and the fourth similarity to obtain a second model.
[0109] In one example, the second power sequence value may be:
[0110]
[0111] in, Representing a historical moment i The power sequence value of the first 4 hours. The calculation process of the third similarity Sim1 is as follows:
[0112]
[0113] Among them, the input power sequence value can be P f ={p t-16 , p t-15 , p t-14 ,...p t-1}; where p t-16 ,…,p t-1 Represents the power sequence value of the past 4 hours from the current time t, t-1 represents the past 15 minutes from the current time t, t-2 to t-16 and so on. The second power sequence value can be: in, Representing a historical moment i Power sequence values for the first 4 hours.
[0114] In one example, the preset numerical weather forecast wind speed may be WS f ={ws t , ws t+1 , ws t+2 ,...ws t+16}. Among them, ws t ,…ws t+16 Represents the numerical weather forecast wind speed for the next four hours from the current time t. t+1 represents the next 15 minutes from the current time t, and t+2 to t+16 represent the same.
[0115] Historical numerical weather forecast wind speeds can be:
[0116]
[0117] in, Representing a historical moment i The numerical weather forecast wind speed for the next 4 hours. The calculation process of the fourth similarity Sim2 is as follows:
[0118]
[0119] Among them, the preset numerical weather forecast wind speed can be WS f ={ws t , ws t+1 , wst+2 ,...ws t+16}. Among them, ws t ,…,ws t+16 Represents the numerical weather forecast wind speed for the next four hours from the current time t. t+1 represents the next 15 minutes from the current time t, and t+2 to t+16 represent the same.
[0120] Among them, the historical numerical weather forecast wind speed can be:
[0121]
[0122] in, Representing a historical moment i Numerical weather forecast wind speed for the next 4 hours.
[0123] In one example, adjusting the first model according to the third similarity and the fourth similarity to obtain the second model includes:
[0124] Performing a first normalization process on the third similarity to obtain a fifth similarity;
[0125] Performing a second normalization process on the fourth similarity to obtain a sixth similarity;
[0126] Calculating a weighted sum of the fifth similarity and the sixth similarity;
[0127] The first model is adjusted according to the weighted sum value to obtain the second model.
[0128] In one example, since it is necessary to perform weighted summation on Sim1 and Sim2, but the dimensions of the two are inconsistent, they need to be normalized to be between [0, 1]. nor , the sixth similarity is Sim2 nor .
[0129] In one example, the weighted sum value Sim nor It can be calculated according to the following formula:
[0130] Sim nor =αSiml nor +βSim2 nor ;
[0131] Among them, the fifth similarity is Sim1 nor , the sixth similarity is Sim2 nor , α is the weight information of the fifth similarity, and β is the weight information of the sixth similarity.
[0132] In one example, adjusting the first model according to the weighted sum value to obtain the second model includes:
[0133] Arrange the weighted sum values in ascending order to obtain a second sorting result;
[0134] Determine a second similar power sequence value according to a weighted sum value of a preset number of the second sorting results;
[0135] The first model is adjusted according to the second similar power sequence value to obtain a second model.
[0136] In one example, the weighted sum values are arranged in ascending order to obtain a second sorting result. Then the first 500 weighted sum values in the second sorting result are selected, and the second similar power sequence value in the 500 weighted sum values is determined. For example, the weighted sum value C is determined by the second power sequence value A and the preset numerical weather forecast wind speed B, then the second power sequence value A in the first 500 weighted sum values C is the second similar power sequence value. Then the first model is adjusted by the second similar power sequence value to obtain the second model. Specifically, the process of adjusting the first model by the second similar power sequence value can refer to the process of obtaining the first model by training the preset initial model based on the historical power sequence value. Specifically, you can refer to Figure 4b A schematic diagram showing a second similarity power sequence value determination is shown.
[0137] In this embodiment, during the adjustment of the first model, the feature extraction layer of the first model is frozen, and only the final classification layer of the first model is trained. This avoids the computational resource consumption caused by retraining the first model online, reduces model training time, ensures timeliness, and prevents the model from overfitting to new samples and catastrophically forgetting historical data.
[0138] In this embodiment, an early stopping mechanism is introduced to control the number of training iterations during the adjustment of the first model. The validation loss is monitored in real time. If the validation loss does not improve within a limited period, training is stopped early. This effectively avoids excessive training times and overfitting caused by setting too many iterations. A callback function is introduced to control the learning rate. The validation loss is monitored in real time. If the validation loss does not improve within a limited period, the learning rate is automatically adjusted. This effectively avoids slow convergence and local optimal solutions caused by a fixed learning rate.
[0139] S307: Input the input power sequence value into the second model, and predict the power sequence value in a future preset time period based on the input power sequence value based on the second model; wherein the future preset time period is determined by the current moment of the input power sequence value.
[0140] In one example, this step can refer to the content of step S104 and will not be repeated here.
[0141] S308: If not, input the input power sequence value into the first model, and predict the power sequence value within a future preset time period based on the input power sequence value based on the first model.
[0142] In one example, see Figure 5 A schematic diagram showing a divergence not greater than a threshold value is shown. For a clearer explanation, see Figure 6 A schematic diagram showing a comparison between a predicted value and an actual value of a power sequence value within a future preset time period is shown.
[0143] The disclosed embodiment provides an online modeling and prediction method for wind power that copes with concept drift. The method includes: obtaining an input power sequence value, searching for a first similar power sequence value in a preset historical database, and determining the divergence of the future power sequence value based on the future power sequence value. Determine whether to adjust the first model based on the divergence. Using this technical solution, samples similar to the model input power and numerical weather forecast wind speed are retrieved from the historical database, and the model is fine-tuned online. This effectively overcomes the concept drift problem and avoids catastrophic forgetting of the model, thereby improving prediction accuracy.
[0144] Figure 7 This is a schematic diagram of the structure of a wind power online modeling and prediction device for coping with concept drift provided by an embodiment of the present disclosure. The wind power online modeling and prediction device for coping with concept drift can be understood as the above-mentioned electronic device or some functional modules in the above-mentioned electronic device. Figure 7 As shown, the wind power online modeling and prediction device 70 for coping with concept drift includes:
[0145] The first acquisition module 701 is configured to acquire historical power sequence values and train a preset initial model based on the historical power sequence values to obtain a first model; wherein the historical power sequence values include power sequence values within a historical preset period and power sequence values within a historical future preset period; the historical preset period is a historical time period starting at a preset moment; the historical future preset period is a future time period starting at a preset moment; and the preset moment is a preset moment.
[0146] A second acquisition module 702 is configured to acquire an input power sequence value and determine whether to adjust the first model according to the input power sequence value;
[0147] a determination module 703 for, if yes, adjusting the first model according to the input power sequence value and the preset numerical weather forecast wind speed to obtain a second model;
[0148] A first prediction module 704 is configured to input the input power sequence value into a second model and predict a power sequence value within a future preset time period based on the input power sequence value based on the second model; wherein the future preset time period is determined based on the current moment of the input power sequence value;
[0149] The second prediction module 705 is configured to input the input power sequence value into the first model if no, and predict the power sequence value within a future preset time period based on the input power sequence value based on the first model.
[0150] In one example, the second obtaining module 702 is configured to:
[0151] Searching for a first similar power sequence value in a preset historical database; wherein the first similar power sequence value includes a historical similar power sequence value and a future power sequence value; a time period of the historical similar power sequence value is the same as a time period of the input power sequence value; and the future power sequence value has a corresponding relationship with the first similar power sequence value;
[0152] Determine the divergence of the future power sequence value according to the future power sequence value;
[0153] If the divergence is greater than the threshold, determining to adjust the first model;
[0154] If the divergence is not greater than the threshold, it is determined that the first model is not adjusted.
[0155] In one example, the second obtaining module 702 is configured to:
[0156] Traverse the first power sequence value in the same time period as the input power sequence value in the preset historical database;
[0157] Calculating a first similarity between the first power sequence value and the input power sequence value;
[0158] Arrange the first similarities in ascending order to obtain a first sorting result;
[0159] A preset number of first power sequence values preceding the first sorting result are determined as historical similar power sequence values, and the first similar power sequence value is determined according to the historical similar power sequence values.
[0160] In one example, the second obtaining module 702 is configured to:
[0161] Calculate the average power sequence value within a future preset time period based on the future power sequence value;
[0162] Calculating a second similarity between the average power sequence value in a future preset time period and the future power sequence value;
[0163] The second similarity is determined as the divergence of the future power sequence values.
[0164] In one example, the determination module 703 is configured to search a preset historical database for a second power sequence value according to the input power sequence value; calculate a third similarity between the second power sequence value and the input power sequence value;
[0165] Searching for historical numerical weather forecast wind speeds in a preset historical database according to preset numerical weather forecast wind speeds;
[0166] calculating a fourth similarity between a preset numerical weather forecast wind speed and a historical numerical weather forecast wind speed;
[0167] The first model is adjusted according to the third similarity and the fourth similarity to obtain a second model.
[0168] In one example, the determining module 703 is configured to perform a first normalization process on the third similarity to obtain a fifth similarity;
[0169] Performing a second normalization process on the fourth similarity to obtain a sixth similarity;
[0170] Calculating a weighted sum of the fifth similarity and the sixth similarity;
[0171] The first model is adjusted according to the weighted sum value to obtain the second model.
[0172] In one example, the determining module 703 is configured to arrange the weighted sum values in ascending order to obtain a second sorting result;
[0173] Determine a second similar power sequence value according to a weighted sum value of a preset number of the second sorting results;
[0174] The first model is adjusted according to the second similar power sequence value to obtain a second model.
[0175] The device provided in this embodiment can execute the method of any of the above embodiments, and its execution method and beneficial effects are similar, which will not be repeated here.
[0176] An embodiment of the present disclosure further provides an electronic device, which includes: a memory storing a computer program; a processor for executing the computer program, and when the computer program is executed by the processor, the method of any of the above embodiments can be implemented.
[0177] For example, Figure 8 This is a schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 8, which shows a schematic structural diagram of an electronic device 1000 suitable for implementing the embodiments of the present disclosure. The electronic device 1000 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 8 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0178] like Figure 8 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. Various programs and data required for the operation of the electronic device 1000 are also stored in the RAM 1003. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0179] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange data. Figure 8 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0180] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0181] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0182] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0183] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0184] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains historical power sequence values, trains a preset initial model based on the historical power sequence values, and obtains a first model; wherein the historical power sequence values include power sequence values within a historical preset time period and power sequence values within a historical future preset time period; the historical preset time period is a historical time period starting from a preset moment; the historical future preset time period is a future time period starting from a preset moment; the preset moment is preset; obtains input power sequence values, and determines whether to adjust the first model based on the input power sequence values; if so, adjusts the first model based on the input power sequence values and the preset numerical weather forecast wind speed to obtain a second model; inputs the input power sequence values into the second model, and predicts the power sequence values within the future preset time period based on the input power sequence values based on the second model; wherein the future preset time period is determined by the current moment of the input power sequence values; if not, inputs the input power sequence values into the first model, and predicts the power sequence values within the future preset time period based on the input power sequence values based on the first model.
[0185] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0186] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0187] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit does not necessarily limit the unit itself.
[0188] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0189] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0190] The embodiments of the present disclosure further provide a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of any of the above embodiments can be implemented. The execution method and beneficial effects are similar and will not be repeated here.
[0191] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0192] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.
Claims
1. A wind power online modeling and prediction method for coping with concept drift, characterized by: The method comprises: Obtaining historical power sequence values, and training a preset initial model based on the historical power sequence values to obtain a first model; wherein the historical power sequence values include power sequence values within a historical preset time period and power sequence values within a historical future preset time period; the historical preset time period is a historical time period starting at a preset moment; the historical future preset time period is a future time period starting at the preset moment; the preset moment is preset; Obtaining an input power sequence value, and determining whether to adjust the first model according to the input power sequence value; If yes, adjusting the first model according to the input power sequence value and the preset numerical weather forecast wind speed to obtain a second model; Inputting the input power sequence value into the second model, and predicting a power sequence value within a future preset time period based on the input power sequence value based on the second model; wherein the future preset time period is determined by the current moment of the input power sequence value; If not, the input power sequence value is input into the first model, and the power sequence value within the future preset time period is predicted based on the first model according to the input power sequence value.
2. The online modeling and prediction method for wind power to cope with concept drift according to claim 1 is characterized in that: The determining whether to adjust the first model according to the input power sequence value includes: Searching for a first similar power sequence value in a preset historical database; wherein the first similar power sequence value includes a historical similar power sequence value and a future power sequence value; the time period of the historical similar power sequence value is the same as the time period of the input power sequence value; and the future power sequence value has a corresponding relationship with the first similar power sequence value; determining a divergence of the future power sequence value according to the future power sequence value; If the divergence is greater than a threshold, determining to adjust the first model; If the divergence is not greater than the threshold, it is determined that the first model is not adjusted.
3. The online modeling and prediction method for wind power to cope with concept drift according to claim 2 is characterized in that: The searching for the first similar power sequence value in a preset historical database includes: Traversing the first power sequence value in the preset historical database in the same time period as the input power sequence value; Calculating a first similarity between the first power sequence value and the input power sequence value; Arrange the first similarities in ascending order to obtain a first sorting result; The first power sequence values that are a preset number before the first sorting result are determined as the historical similar power sequence values, and the first similar power sequence value is determined according to the historical similar power sequence values.
4. The online modeling and prediction method for wind power to cope with concept drift according to claim 2 is characterized in that: The determining, according to the future power sequence value, the divergence of the future power sequence value includes: Calculating an average power sequence value within a future preset time period based on the future power sequence value; Calculating a second similarity between the average power sequence value in the future preset time period and the future power sequence value; The second similarity is determined as the divergence of the future power sequence value.
5. The online modeling and prediction method for wind power to cope with concept drift according to claim 1 is characterized in that: The adjusting the first model according to the input power sequence value and the preset numerical weather forecast wind speed to obtain the second model includes: Searching for a second power sequence value in a preset historical database according to the input power sequence value; Calculating a third similarity between the second power sequence value and the input power sequence value; Searching for historical numerical weather forecast wind speeds in a preset historical database according to the preset numerical weather forecast wind speeds; Calculating a fourth similarity between the preset numerical weather forecast wind speed and the historical numerical weather forecast wind speed; The first model is adjusted according to the third similarity and the fourth similarity to obtain the second model.
6. The online modeling and prediction method for wind power to cope with concept drift according to claim 5 is characterized in that: The adjusting the first model according to the third similarity and the fourth similarity to obtain the second model includes: performing a first normalization process on the third similarity to obtain a fifth similarity; performing a second normalization process on the fourth similarity to obtain a sixth similarity; calculating a weighted sum of the fifth similarity and the sixth similarity; The first model is adjusted according to the weighted sum value to obtain the second model.
7. The online modeling and prediction method for wind power to cope with concept drift according to claim 6 is characterized in that: The adjusting the first model according to the weighted sum value to obtain the second model includes: Arranging the weighted sum values in ascending order to obtain a second sorting result; Determining a second similar power sequence value according to the weighted sum value of a preset number of the second sorting results; The first model is adjusted according to the second similar power sequence value to obtain the second model.
8. A wind power online modeling and prediction device for coping with concept drift, characterized by: The device comprises: A first acquisition module is configured to acquire historical power sequence values and train a preset initial model based on the historical power sequence values to obtain a first model; wherein the historical power sequence values include power sequence values within a historical preset period and power sequence values within a historical future preset period; the historical preset period is a historical time period starting at a preset moment; the historical future preset period is a future time period starting at the preset moment; and the preset moment is preset; a second acquisition module, configured to acquire an input power sequence value, and determine whether to adjust the first model according to the input power sequence value; a determining module, configured to, if yes, adjust the first model according to the input power sequence value and a preset numerical weather forecast wind speed to obtain a second model; a first prediction module, configured to input the input power sequence value into the second model, and predict a power sequence value within a future preset time period based on the input power sequence value based on the second model; wherein the future preset time period is determined based on the current moment of the input power sequence value; The second prediction module is configured to input the input power sequence value into the first model if no, and predict the power sequence value within the future preset time period based on the input power sequence value based on the first model.
9. An electronic device, characterized in that: include: A processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor performs the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.