Generated power prediction method and device, electronic equipment and storage medium

By calculating the error state vector and selecting an adaptive expert model, the prediction model is dynamically adjusted, solving the accuracy problem of new energy power generation prediction during weather transition periods and achieving higher prediction accuracy and adaptability.

CN121863347APending Publication Date: 2026-04-14SHANGHAI SIGE DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In existing technologies, the prediction accuracy of new energy power generation models is low during periods of weather transition and cannot adapt to the switching of error patterns under different meteorological backgrounds, resulting in insufficient prediction accuracy.

Method used

By calculating the error state vectors of historical weather forecast data and measured data, an expert model adapted to the current error state is selected for prediction. Combining the routing network and the state evolution model, the prediction model is dynamically adjusted to adapt to weather changes.

Benefits of technology

It improves the accuracy of new energy power generation forecasting, reduces the impact of sudden changes in weather forecast error types on forecasts, and enhances the model's adaptability under different meteorological conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121863347A_ABST
    Figure CN121863347A_ABST
Patent Text Reader

Abstract

The invention discloses a generation power prediction method and device, electronic equipment and a storage medium, and belongs to the technical field of artificial intelligence. The method comprises the following steps: calculating a first error state vector according to historical weather forecast data and weather measured data; determining at least one target expert model from a plurality of expert models based on the first error state vector; and inputting the weather forecast data at the current moment into at least one target expert model to obtain the generated power in the future target time period. According to the embodiment of the invention, the first error state vector is calculated according to the historical weather forecast data and the weather measured data, the at least one target expert model is determined from the plurality of expert models based on the first error state vector for prediction, the change of the weather forecast error is considered, and the expert model adaptive to the error state is selected for prediction. The influence of the sudden change of the weather forecast error type on the generation power prediction is reduced, and the accuracy of the generation power prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of artificial intelligence technology, and in particular relates to a method, device, electronic device and medium for predicting power generation. Background Technology

[0002] Accurate forecasting of renewable energy generation, such as photovoltaic (PV) and wind power, is crucial for power grid dispatching. It helps grid operators develop reasonable dispatching strategies in advance, optimize grid operation, and ensure the safe and stable operation of the power system. Renewable energy generation, such as PV, is significantly affected by meteorological factors like solar irradiance, cloud cover, and temperature, while wind power is affected by wind speed and other meteorological factors, exhibiting significant fluctuations and intermittent characteristics. Therefore, forecasting the power generation of renewable energy systems relies on meteorological input data provided by numerical weather prediction.

[0003] In related technologies, historical numerical weather predictions and historical measured power data are typically combined and input into a single machine learning model to train an end-to-end static model. However, the error of numerical weather prediction exhibits drastically different and nonlinear error patterns under different meteorological backgrounds, and these patterns can switch between each other. When weather changes occur, the prediction accuracy of the aforementioned static model is extremely low, severely affecting the prediction accuracy of new energy power generation. Summary of the Invention

[0004] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a power generation prediction method, apparatus, electronic device, and storage medium to improve the accuracy of power generation prediction.

[0005] In a first aspect, this application provides a method for predicting power generation, including: The first error state vector is calculated based on historical weather forecast data and actual weather measurement data; the first error state vector represents the weather forecast error at the current moment; At least one target expert model is determined from multiple expert models based on the first error state vector; wherein, different expert models are trained based on historical weather forecast data and actual historical power generation values ​​corresponding to different weather forecast errors; The current weather forecast data is input into the at least one target expert model to obtain the power generation capacity for the future target time period.

[0006] The power generation prediction method provided in this application calculates a first error state vector based on historical weather forecast data and actual weather data. Based on the first error state vector, at least one target expert model is determined from multiple expert models for prediction. This method takes into account the changes in weather forecast errors and selects an expert model that is compatible with the error state for prediction, thereby reducing the impact of sudden changes in weather forecast error types on power generation prediction and improving the accuracy of power generation prediction.

[0007] According to one embodiment of this application, the step of calculating the first error state vector based on historical weather forecast data and actual weather data includes: According to the formula

[0008]

[0009] Calculate the first error state vector; in, This represents the first error state vector at time t. This represents the weather forecast value at time t based on historical weather forecast data. This represents the measured weather value at time t, obtained from actual weather data. This represents the difference between the predicted weather value and the actual weather value at time t. express The difference between the weather forecast and the actual weather measurement at any given time. This represents the rate of change of the error between the predicted and measured weather values ​​at time t. This represents the integral of the error between the predicted weather value and the actual weather value at time t.

[0010] In this embodiment, by calculating the difference between the weather forecast data and the measured weather data at each historical time point before and after the current time, the first error state vector includes recent error information at the current time. By calculating the rate of change of the error between the weather forecast and the measured weather values ​​over a period before the current time, the first error state vector includes recent error trend information at the current time. By calculating the integral of the error between the weather forecast and the measured weather values ​​over a period before the current time, the first error state vector includes recent cumulative error information at the current time. Therefore, the first error state vector contains recent error information, recent error trend information, and recent cumulative error information at the current time, which can more accurately reflect the error situation of the weather forecast.

[0011] According to one embodiment of this application, determining at least one target expert model based on the first error state vector includes: The first error state vector is input into the routing network to obtain the weights of each expert model output by the routing network; the routing network is obtained by joint training with the expert models. The k expert models with the highest weights are identified as the target expert models; where k is greater than or equal to 1.

[0012] In this embodiment, by inputting the first error state vector into the routing network, the weights of each expert model output by the routing network are obtained, and the k expert models with the highest weights are selected as target expert models, so that the expert models selected for prediction are the most suitable for the current error state, thereby improving the accuracy of power generation prediction.

[0013] According to one embodiment of this application, determining at least one target expert model based on the first error state vector includes: The first error state vector is input into the state evolution model to obtain the second error state vector at the future time output by the state evolution model. The second error state vector is input into the routing network to obtain the weights of each expert model output by the routing network; the routing network is obtained by joint training with the expert models. The k expert models with the highest weights are identified as the target expert models; where k is greater than or equal to 1.

[0014] In this embodiment, the second error state vector at future moments is predicted by the state evolution model, thereby determining the future weather forecast error situation. This allows for the identification of the most suitable expert model for future error states, reducing the impact of sudden changes in weather forecast error types on power generation forecasting and improving the accuracy of power generation forecasting.

[0015] According to one embodiment of this application, determining at least one target expert model based on the first error state vector includes: The weather scenario vector for future times is determined based on the weather forecast data; the weather scenario vector represents the weather characteristics. The first error state vector and the meteorological situation vector are concatenated to obtain a joint feature vector; The joint feature vector is input into the routing network to obtain the weights of each expert model output by the routing network; the routing network is obtained by joint training with the expert models. The k expert models with the highest weights are identified as the target expert models; where k is greater than or equal to 1.

[0016] In this embodiment, by concatenating the meteorological situation vector for future moments determined by the weather forecast data with the first error vector, the resulting joint feature vector includes not only the recent error status information at the current moment but also the meteorological situation information for future moments. This improves the accuracy of expert model determination by considering not only recent error conditions but also future weather conditions.

[0017] According to one embodiment of this application, determining at least one target expert model based on the first error state vector includes: The weather scenario vector for future times is determined based on the weather forecast data; the weather scenario vector represents the weather characteristics. The first error state vector and the meteorological situation vector are concatenated to obtain a joint feature vector; The joint feature vector is input into the state evolution model to obtain the second error state vector at the future time output by the state evolution model. The second error state vector is concatenated with the meteorological situation vector to obtain a joint feature vector for future moments; The joint feature vectors at future time steps are input into the routing network to obtain the weights of each expert model output by the routing network. The k expert models with the highest weights are identified as the target expert models; where k is greater than or equal to 1.

[0018] In this embodiment, by inputting the joint feature vector into the state evolution model, the error information at future times is predicted and the second error state vector is calculated. The second error state vector and the meteorological situation vector are concatenated so that the joint feature vector at future times contains the error state information and meteorological situation information at future times. Thus, when determining the expert model, not only future weather conditions are considered, but also possible future error conditions are taken into account, thereby improving the accuracy of expert model determination.

[0019] According to one embodiment of this application, the state evolution model is trained in the following manner: Obtain historical weather forecast data and actual weather measurement data for the sample; Calculate multiple sample first error state vectors representing weather prediction errors at different historical times based on the sample historical weather forecast data and the sample measured weather data; and determine sample meteorological scenario vectors at different historical times based on the sample historical weather forecast data; By concatenating the first error state vector of the sample at the first historical moment and the meteorological situation vector of the sample at the second historical moment, a joint feature vector of the sample is obtained; the second historical moment is a future moment of the first historical moment. The first error state vector of the sample at the second historical moment is used as the label, and the state evolution model is trained using the joint feature vector of the sample.

[0020] In this embodiment, by calculating multiple sample first error state vectors and sample meteorological situation vectors representing weather errors at different historical moments based on sample historical weather forecast data and sample measured weather data, and training a state evolution model, the obtained state evolution model can predict the error state at future moments based on the error state at the current moment and the meteorological situation at future moments, thereby improving the accuracy of the state evolution model in predicting the error state at future moments.

[0021] According to one embodiment of this application, the expert model is trained in the following manner: Obtain historical weather forecast data and actual weather measurement data for the sample; Calculate multiple sample first error state vectors representing weather prediction errors at different times based on the sample historical weather forecast data and the sample measured weather data; Cluster the first error state vectors of multiple samples to obtain N error categories; Establish N expert models, and train each of them using historical weather forecast data and actual historical power generation data corresponding to N error categories.

[0022] In this embodiment, N error categories are obtained by clustering the first error state vectors of multiple samples. The historical weather forecast data and the actual historical power generation values ​​of the samples corresponding to the N error categories are used to train N expert models respectively. This enables each expert model to predict power generation based on the weather forecast data corresponding to an error category, thereby improving the prediction accuracy of each expert model under different error conditions.

[0023] According to one embodiment of this application, the clustering of the multiple sample first error state vectors to obtain N error categories includes: Determine the meteorological scenario vector for each sample corresponding to the historical weather forecast data; The first error state vector of each sample and the meteorological situation vector of each sample are concatenated to obtain a joint feature vector of multiple samples. Clustering is performed on the joint feature vectors of multiple samples to obtain N error categories.

[0024] In this embodiment, by concatenating the first error state vector of each sample with the corresponding meteorological situation vector, multiple sample joint feature vectors are obtained. Then, clustering these multiple sample joint feature vectors ensures that each error category contains not only error information but also the meteorological situation information corresponding to the time the error information was generated by the weather forecast. Therefore, when training corresponding expert models based on the error categories, each expert model can predict power generation based on the weather forecast data corresponding to a given error and meteorological situation category, thereby improving the prediction accuracy of each expert model under the given error and meteorological situation.

[0025] According to one embodiment of this application, the step of inputting the current weather forecast data into the at least one target expert model to obtain the power generation capacity for a future target time period includes: When there is only one target expert model, the output of the target expert model is determined as the power generation capacity for the future target time period; When there are multiple target expert models, determine the weight of each target expert model; The outputs of each of the target expert models are weighted and fused to obtain the power generation capacity for the future target time period.

[0026] In this embodiment, when there are multiple target expert models, the weight of each target expert model is determined, and the output results of each target expert model are weighted and fused. This ensures that the power generation for the future target time period takes into account the output results of each target expert model according to the weights, thereby reducing the impact of sudden changes in weather forecast error types on power generation prediction and improving the accuracy of power generation prediction.

[0027] Secondly, this application provides a power generation prediction device, comprising: The calculation module is used to calculate a first error state vector based on historical weather forecast data and actual weather measurement data; the first error state vector represents the weather forecast error at the current moment; The determination module is used to determine at least one target expert model from multiple expert models based on the first error state vector; wherein, different expert models are trained based on historical weather forecast data and actual historical power generation values ​​corresponding to different weather forecast errors. The input module is used to input the current weather forecast data into the at least one target expert model to obtain the power generation capacity for the future target time period.

[0028] According to the power generation prediction device of this application, a first error state vector is calculated based on historical weather forecast data and actual weather data. Based on the first error state vector, at least one target expert model is determined from multiple expert models for prediction. The device takes into account the changes in weather forecast error and selects an expert model that is suitable for the error state for prediction, thereby reducing the impact of sudden changes in weather forecast error type on power generation prediction and improving the accuracy of power generation prediction.

[0029] Thirdly, this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the power generation prediction method as described in the first aspect above.

[0030] Fourthly, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the power generation prediction method as described in the first aspect above.

[0031] Fifthly, this application provides a chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the power generation prediction method as described in the first aspect above.

[0032] In a sixth aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the power generation prediction method as described in the first aspect above.

[0033] The above-described one or more technical solutions in the embodiments of this application have at least one of the following technical effects: According to the power generation prediction method of this application, a first error state vector is calculated based on historical weather forecast data and actual weather data. Based on the first error state vector, at least one target expert model is determined from multiple expert models for prediction. The method takes into account the changes in weather forecast error and selects an expert model that is suitable for the error state for prediction, thereby reducing the impact of sudden changes in weather forecast error type on power generation prediction and improving the accuracy of power generation prediction.

[0034] In some embodiments, the first error state vector includes recent error information for the current moment by calculating the difference between weather forecast data and measured weather data at each historical time point before the current moment and a period prior to the current moment; it includes recent error trend information for the current moment by calculating the rate of change of error between the weather forecast and measured weather values ​​at each historical time point before the current moment; and it includes recent cumulative error information for the current moment by calculating the integral of the error between the weather forecast and measured weather values ​​at each historical time point before the current moment. Therefore, the first error state vector includes recent error information, recent error trend information, and recent cumulative error information for the current moment, which can more accurately reflect the error situation of weather forecasts.

[0035] In some embodiments, by inputting the first error state vector into the routing network, the weights of each expert model output by the routing network are obtained, and the k expert models with the highest weights are selected as target expert models, so that the expert models selected for prediction are the most suitable for the current error state, thereby improving the accuracy of power generation prediction.

[0036] In some embodiments, the second error state vector at future moments is predicted by a state evolution model, thereby determining the future weather forecast error situation. This enables the identification of the most suitable expert model for future error states, reducing the impact of sudden changes in weather forecast error types on power generation forecasting and improving the accuracy of power generation forecasting.

[0037] In some embodiments, by concatenating the meteorological situation vector for future moments determined from the weather forecast data with the first error vector, the resulting joint feature vector includes not only the recent error status information at the current moment but also the meteorological situation information for future moments. This improves the accuracy of expert model determination by considering not only recent error conditions but also future weather conditions.

[0038] In some embodiments, by inputting the joint feature vector into the state evolution model, the error information at future times is predicted and a second error state vector is calculated. The second error state vector and the meteorological situation vector are then concatenated so that the joint feature vector at future times contains both the error state information and the meteorological situation information at future times. This improves the accuracy of expert model determination by considering not only future weather conditions but also possible future error conditions.

[0039] In some embodiments, by calculating multiple sample first error state vectors and sample meteorological situation vectors representing weather errors at different historical times based on sample historical weather forecast data and sample measured weather data, and training a state evolution model, the obtained state evolution model can predict the error state at future times based on the error state at the current time and the meteorological situation at future times, thereby improving the accuracy of the state evolution model in predicting the error state at future times.

[0040] In some embodiments, N error categories are obtained by clustering the first error state vectors of multiple samples, and N expert models are trained using the historical weather forecast data and the actual historical power generation values ​​of the samples corresponding to the N error categories, so that each expert model can predict the power generation based on the weather forecast data corresponding to the category for an error category, thereby improving the prediction accuracy of each expert model under different error conditions.

[0041] In some embodiments, by concatenating the first error state vector of each sample with the corresponding sample meteorological situation vector, multiple sample joint feature vectors are obtained. Then, clustering these multiple sample joint feature vectors ensures that each error category contains not only error information but also the meteorological situation information corresponding to the time the error information was generated by the weather forecast. Therefore, when training corresponding expert models based on the error categories, each expert model can predict power generation based on the weather forecast data corresponding to a given error and meteorological situation category, thereby improving the prediction accuracy of each expert model under the given error and meteorological situation.

[0042] In some embodiments, when there are multiple target expert models, the weights of each target expert model are determined, and the outputs of each target expert model are weighted and fused, so that the power generation for the future target time period takes into account the outputs of each target expert model according to the weights, thereby reducing the impact of sudden changes in weather forecast error types on power generation prediction and improving the accuracy of power generation prediction.

[0043] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0044] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 This is a schematic flowchart of the power generation prediction method provided in the embodiments of this application; Figure 2 This is a schematic diagram of the power generation prediction process provided in the embodiments of this application; Figure 3 This is a schematic diagram of the power generation prediction device provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0046] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0047] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0048] Accurate forecasting of renewable energy generation is crucial for power grid dispatching, enabling grid operators to develop reasonable dispatching strategies in advance, optimize grid operation, and ensure the safe and stable operation of the power system. Renewable energy generation, such as photovoltaic power, is significantly affected by meteorological factors such as solar irradiance, cloud cover, and temperature, exhibiting significant fluctuations and intermittent characteristics. Therefore, forecasting the power generation of renewable energy systems relies on meteorological input data provided by numerical weather prediction.

[0049] Numerical Weather Prediction (NWP) is a weather forecasting system that uses measured meteorological data as initial conditions, models meteorological processes based on atmospheric physics and mathematical equations to simulate atmospheric motion, and solves fluid dynamics and thermodynamic equations by computer to generate future weather predictions.

[0050] In related technologies, historical numerical weather predictions and historical measured power data are typically combined and input into a single machine learning model to train an end-to-end static model. However, the error of numerical weather prediction exhibits drastically different, non-linear error patterns under different meteorological backgrounds, and these patterns can switch between each other. When weather changes occur, the prediction accuracy of the aforementioned static model is extremely low, severely impacting the accuracy of predicting renewable energy power generation.

[0051] Taking numerical weather prediction (NMR) system forecasting future solar irradiance as an example, under clear skies without clouds, the error in NMR forecasts is relatively small, and the predicted solar irradiance value remains stable within a certain range above the actual value. Under cloudy skies with a few clouds, the error in NMR forecasts increases, and the predicted solar irradiance value fluctuates around the actual value. During the operation of a photovoltaic power station, meteorological conditions randomly switch between clear skies, cloudy skies, and other meteorological backgrounds, and the error type of NMR forecasts also randomly switches between consistently high, fluctuating, and other types. If a single static model is used for prediction based solely on historical NMR forecasts and historical measured power data, the results can only adapt to a specific meteorological condition and error type. When meteorological conditions change, such as from clear skies to cloudy skies, this static model cannot dynamically adjust its internal parameters and correction logic, resulting in low prediction accuracy.

[0052] To address at least one of the aforementioned technical problems, embodiments of this application provide a power generation prediction method, apparatus, electronic device, and storage medium. The power generation prediction method, apparatus, electronic device, and storage medium provided in these embodiments can be applied to any power generation scenario, such as photovoltaic power generation, wind power generation, and power load prediction; these embodiments are not limited thereto.

[0053] The following description, in conjunction with the accompanying drawings, details the power generation prediction method, apparatus, electronic equipment, and storage medium provided in this application through specific embodiments and application scenarios.

[0054] The power generation prediction method can be applied to the terminal, specifically executed by the hardware or software in the terminal.

[0055] The terminal includes, but is not limited to, portable communication devices such as mobile phones or tablets with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads). It should also be understood that, in some embodiments, the terminal may not be a portable communication device, but rather a desktop computer with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads).

[0056] The following embodiments describe a terminal including a display and a touch-sensitive surface. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and joystick.

[0057] The power generation prediction method provided in this application can be executed by an electronic device or a functional module or entity in an electronic device that can implement the power generation prediction method. The electronic devices mentioned in this application include photovoltaic systems, wind power generation systems, servers, etc. The power generation prediction method provided in this application is described below using an electronic device as the execution subject.

[0058] like Figure 1 As shown, the power generation prediction method includes steps 110, 120, and 130.

[0059] Step 110: Calculate the first error state vector based on historical weather forecast data and actual weather measurement data; the first error state vector represents the weather forecast error at the current moment.

[0060] Observed weather data are records of meteorological elements directly measured by meteorological stations, satellites, radar, and other equipment. These can include actual observed values ​​of temperature, humidity, GHI (Global Horizontal Irradiance), DNI (Direct Normal Irradiance), and DHI (Diffuse Horizontal Irradiance). Weather forecast data are predictions of meteorological element values ​​published by numerical weather prediction systems. Numerical weather forecast data can be obtained from systems such as ECMWF (European Centre for Medium-Range Weather Forecasts) and GFS (Global Forecast System).

[0061] For example, at the current time t, which is 12:00 on January 10th, the meteorological observation station of the photovoltaic power plant directly measures the temperature as 10℃, the humidity as 25%, and the GHI as 1000W / m², which is the actual weather data at 12:00 on January 10th. Historical weather forecast data refers to weather forecast data prior to the current time t. For example, if the GFS predicts at 11:00 on January 10th that at 12:00 on January 10th, the temperature in the photovoltaic power plant area will be 15℃, the humidity as 30%, and the GHI as 900W / m², which is the historical weather forecast data.

[0062] The first error state vector is a vector that describes the error state between recent weather forecast data and actual weather data at a certain moment. The first error state vector can also be an array, where each element of the array is the difference between the weather forecast data and the actual weather data at that moment.

[0063] For example, the temperature forecast values ​​(in degrees Celsius) from t to t-3 published by the numerical weather prediction system at a certain time t. The actual temperature values ​​measured by the meteorological observation station from t to t-3 were respectively It can be and The difference obtained by subtraction is used as the first error state vector, i.e. Of course, the rate of change of both can also be used as the first error state vector. This application does not limit the content of the first error state vector in its embodiments.

[0064] In some embodiments, calculating a first error state vector based on historical weather forecast data and actual weather data includes: According to the formula

[0065]

[0066] Calculate the first error state vector; in, This represents the first error state vector at time t. This represents the weather forecast value at time t based on historical weather forecast data. This represents the measured weather value at time t, obtained from actual weather data. This represents the difference between the predicted weather value and the actual weather value at time t. express The difference between the weather forecast and the actual weather measurement at any given time. This represents the rate of change of the error between the predicted and measured weather values ​​at time t. This represents the integral of the error between the predicted weather value and the actual weather value at time t.

[0067] For example, for At that moment, the weather data was measured. The measured GHI (Global Horizontal Irradiance) at time 1 is 1000 W / m², then Historical weather forecast data prediction When GHI is 990W / m², then ; calculated according to the formula ,Right now The difference between the predicted and measured GHI values ​​at time t. Similarly, according to The predicted and measured GHI values ​​at time t were calculated. ,according to The predicted and measured GHI values ​​at time t were calculated. ..., and finally the differences between the predicted and measured GHI values ​​at various times within a recent period of t=12 are obtained, such as... .

[0068] This represents the rate of change of error between the predicted and measured weather values ​​at time t. It is calculated based on the error situation over a period of time prior to t and reflects the trend of error change at time t. For example, it can be defined as follows: Let k be the linear regression coefficient, and let k be the error value at each time point within t=[8, 12]. Performing univariate linear regression yields a straight line that roughly passes through all points. Let the slope k of this straight line be taken as the rate of change. The calculation yields k=-1, indicating that the rate of change of the error between the weather forecast and the actual weather measurement at t=12 is -1, reflecting that the error at t=12 may be gradually increasing.

[0069] This represents the integral of the error between the weather forecast and the actual weather measurement at time t, reflecting the cumulative error over the period preceding time t; for example, by performing the integral calculation, we obtain... That is, the cumulative error during the period from t=8 to t=12.

[0070] Therefore, the first error state vector calculated at time t=12 is... .

[0071] In this embodiment, the first error state vector includes recent error information for the current moment by calculating the difference between weather forecast data and measured weather data at each historical time point before the current moment and a period prior to the current moment; it also includes recent error trend information for the current moment by calculating the rate of change of error between the forecast and measured weather values ​​over a period prior to the current moment; and it includes recent cumulative error information for the current moment by calculating the integral of the error between the forecast and measured weather values ​​at each historical time point before the current moment. Therefore, the first error state vector contains recent error information, recent error trend information, and recent cumulative error information for the current moment, enabling a more accurate reflection of weather forecast errors.

[0072] Step 120: Determine at least one target expert model from multiple expert models based on the first error state vector; wherein, different expert models are trained based on historical weather forecast data and actual historical power generation values ​​corresponding to different weather forecast errors.

[0073] An expert model is a machine learning model specifically designed to handle a particular type of data or task. In this embodiment, the expert model is specifically used to predict power generation based on weather forecast data. The initial expert model can be built using the XGBoost (Extreme Gradient Boosting) framework, the LSTM (Long Short-Term Memory) framework, or a simpler framework like MLR (Multiple Linear Regression), SVR (Support Vector Regression), or a more complex Transformer encoder. This embodiment does not limit the choice of framework for the expert model.

[0074] In some embodiments, different expert models are trained based on historical weather forecast data and actual historical power generation values ​​corresponding to different weather forecast errors. For example, users can classify the training data according to time, such as classifying historical weather forecast data and actual historical power generation values ​​into four categories according to spring, summer, autumn, and winter; establish four expert models corresponding to each season, and train the expert model using the data of the corresponding season, for example, using only spring data to train the spring expert, and using only summer data to train the summer expert. Alternatively, the training data can not be classified, and multiple expert models can be trained using different historical weather forecast data and actual historical power generation values, and this application does not limit this.

[0075] In some embodiments, the expert model is trained as follows: Obtain historical weather forecast data and actual weather measurement data for the sample; Calculate multiple sample first error state vectors representing weather prediction errors at different times based on sample historical weather forecast data and sample measured weather data; Cluster the first error state vectors of multiple samples to obtain N error categories; Establish N expert models, and train each of them using historical weather forecast data and actual historical power generation data corresponding to N error categories.

[0076] Clustering is an unsupervised machine learning method that calculates the similarity between objects in a dataset and groups highly similar data into the same group, ensuring that objects within the same group are similar to each other, while objects in different groups are significantly different. Algorithms such as K-means clustering and GMM (Gaussian Mixture Model) clustering can be used to cluster multiple first error state vectors, resulting in N error categories. The first error state vectors within each category are similar to each other. The value of N can be preset by the user.

[0077] For example, users can obtain the 24-hour NWP forecast and measured values ​​of GHI for the photovoltaic power station location area over the past three years from a meteorological database as historical weather forecast data and measured weather data, respectively, and calculate the first error state vector of the sample. Setting N=4, the K-means clustering algorithm is used to cluster these first error state vectors of the sample, resulting in four error categories. For example, category 1 corresponds to the first error state vector of the sample with an overall higher error and a smaller rate of change; category 2 corresponds to the first error state vector of the sample with an overall lower error and a smaller rate of change; category 3 corresponds to the first error state vector of the sample with an overall higher error and a larger rate of change; and category 4 corresponds to the first error state vector of the sample with an overall lower error and a larger rate of change. Of course, N can also be other values, such as 5, 8, 10, 12, etc., and this embodiment of the application does not limit this.

[0078] N expert models are established, and each model is trained using historical weather forecast data and actual historical power generation values ​​corresponding to N error categories. For example, four XGBoost machine learning models are established as expert model 1, expert model 2, expert model 3, and expert model 4, corresponding to the four error categories set by the user. Expert model 1 is trained using historical weather forecast data and actual historical power generation values ​​corresponding to error category 1. For example, expert model 1 can be trained using only samples with the category "overall error is relatively high, and the rate of change is relatively small". For example, for the sample... =At the time of "January 10th 12:00", K-means clustering will If the data is classified as Category 1, which is characterized by "overall high error and small rate of change", then the historical weather forecast data for "January 10, 12:00" and the previous period, as well as the actual historical PV (Photovoltaic) power generation data, will be included in the training data of Expert Model 1.

[0079] The training task of expert model 1 is to take numerical weather forecast data for each time period in the future as input and output the predicted PV power generation values ​​for each time period in the future.

[0080] For example, for the current time t, input the weather forecast data released at time t by NWP for future times t+1, t+2, and t+3. Output predicted power generation .

[0081] In each round of training, the weather forecast data at times t+1, t+2, and t+3 are input. Based on the loss function, the predicted power generation of expert model 1 is calculated. Compared with actual power generation The loss value is calculated as Loss. The mean squared error, absolute mean absolute error, etc., can be used as the loss function. Based on the loss value, the parameters in Expert 1 are updated, and a new round of training begins until the predicted power generation value is obtained. The value of PV tends to be consistent with the actual value or reaches the number of training rounds preset by the user.

[0082] Similarly, expert model 2 is trained using historical weather forecast data and actual historical power generation values ​​of samples corresponding to error category 2, and expert model i is trained using historical weather forecast data and actual historical power generation values ​​of samples corresponding to error category i.

[0083] In this embodiment, N error categories are obtained by clustering multiple first error state vectors, and N expert models are trained using the sample historical weather forecast data and the actual value of sample historical power generation corresponding to the N error categories. This enables each expert model to predict power generation based on the weather forecast data corresponding to an error category, thereby improving the prediction accuracy of each expert model under different error conditions.

[0084] Based on the first error state vector, at least one target expert model is determined from multiple expert models. For example, for the calculated current time... First error state vector , can be The similarity assessment in clustering is calculated by comparing the first error state vector of the samples that have already been divided into N classes. Based on the similarity to each category, the expert model corresponding to the category with the highest similarity is selected as the target expert model. Alternatively, the top M expert models with high similarity can be selected as the target expert model, or the M expert models with similarity greater than the target similarity can be selected as the target expert model, where M is an integer greater than or equal to 1.

[0085] Step 130: Input the current weather forecast data into at least one target expert model to obtain the power generation capacity for the target time period in the future.

[0086] For example, the current moment Since expert model 1 has been selected as the target expert model, the GHI data for a future period predicted by the numerical weather prediction system will be used. Input expert 1, and get the power generation for the future time period output by expert 1. .

[0087] The power generation prediction method provided in this application calculates a first error state vector based on historical weather forecast data and actual weather data. Based on the first error state vector, at least one target expert model is determined from multiple expert models for prediction. This method takes into account the changes in weather forecast errors and selects an expert model that is compatible with the error state for prediction, thereby reducing the impact of sudden changes in weather forecast error types on power generation prediction and improving the accuracy of power generation prediction.

[0088] In some embodiments, determining at least one target expert model based on a first error state vector includes: The first error state vector is input into the routing network to obtain the weights of each expert model output by the routing network; the routing network is obtained by joint training with the expert models. The k expert models with the highest weights are identified as the target expert models; where k is greater than or equal to 1.

[0089] The routing network is a gating mechanism in a hybrid expert model architecture, used to dynamically determine which expert model(s) to allocate data for processing based on the characteristics of the input data. In this embodiment, the routing network is used to output the weights of each expert model based on the first error state vector at the current time step.

[0090] A small neural network can be built as the routing network G. The input to the routing network G is the first error state vector at time t. The output is an N-dimensional vector. ,in The weights corresponding to expert model i represent the degree of trust in expert model i.

[0091] The training of the routing network G and the expert model are carried out simultaneously.

[0092] For example, in each round of training of a neural network, during the forward propagation phase, the... Input routing network G, output routing network G At the same time, weather forecast data The input is given to each expert model, and each expert model i outputs a predicted power generation value. The prediction results of each expert model ;according to Select weights The top K expert models are identified as the target expert models, and the final prediction result is calculated based on the prediction results of these K target expert models. Alternatively, the predicted power generation can be calculated by weighted fusion of the outputs of these K target expert models. This serves as the final prediction of power generation capacity for the target future time period.

[0093] After obtaining the final prediction result, it is compared with the historical power generation data of the sample to calculate the prediction loss of the final power. and auxiliary losses used to maintain expert load balancing .in, It can be PV(t) and The mean square error or mean absolute error; It can be calculated by assessing the importance loss of each expert during the training process.

[0094] According to the formula The loss function is calculated. .in Hyperparameters can be preset by users to balance power prediction accuracy and expert load balancing.

[0095] Calculated Afterwards, according to Update the parameters in the neural network and start a new round of training until the power generation prediction result at time t is obtained. Compared with historical power generation data of the sample The training will tend to be consistent or reach the number of training rounds preset by the user.

[0096] In this embodiment, by inputting the first error state vector into the routing network, the weights of each expert model output by the routing network are obtained, and the k expert models with the highest weights are selected as the target expert models, so that the expert models selected for prediction are the most suitable for the current error state, thereby improving the accuracy of power generation prediction.

[0097] In some embodiments, determining at least one target expert model based on a first error state vector includes: The first error state vector is input into the state evolution model to obtain the second error state vector at the future time output by the state evolution model. The second error state vector is input into the routing network to obtain the weights of each expert model output by the routing network; the routing network is obtained by joint training with the expert models. The k expert models with the highest weights are identified as the target expert models; where k is greater than or equal to 1.

[0098] A state evolution model is a machine learning model that describes the state transition laws of a system through mathematical equations or probability distributions, thereby predicting the changes in the system state over time. In this embodiment, the state evolution model is used to predict the error state at future moments based on the error state described at the current moment and a period of time prior. An RNN (Recurrent Neural Network), LSTM, or Transformer can be pre-trained as the state evolution model, or other sequence models can be used; this embodiment does not limit the specific approach.

[0099] The first error state vector is input into the state evolution model to obtain the second error state vector at the future time point output by the state evolution model. The second error state vector contains the error state information of the future time point predicted by the state evolution model.

[0100] For example, the current moment , First error state vector Include time, Error information for time...; The input is given to the state evolution model, and the state evolution model will analyze it. time, The changing pattern of error information at time... and the prediction of future times. Error information , then calculate , , constituting future moments Error state vector This is the second error state vector.

[0101] The second error state vector is input into the routing network. The weights of each expert model output by the routing network describe the degree of trust in each expert model under the predicted future error conditions. Therefore, the k expert models with the highest weights, i.e., the highest degree of trust, are determined as the target expert models for subsequent power generation prediction.

[0102] The routing network is trained synchronously with the expert model. For example, during the forward propagation phase of each training round, the routing network is trained simultaneously with the expert model. Input the routing network G, and output the weights of each expert model. Simultaneously, weather forecast data is input into each expert model to obtain the prediction results of each expert model; the weighted average of the prediction results of each expert model is calculated as the final prediction result; the loss value between the final prediction result and the actual power generation is calculated according to the loss function, and the parameters in the neural network are updated to start a new round of training.

[0103] In this embodiment, the second error state vector at future moments is predicted by the state evolution model, thereby determining the future weather forecast error situation. This allows for the identification of the most suitable expert model for future error states, reducing the impact of sudden changes in weather forecast error types on power generation forecasting and improving the accuracy of power generation forecasting.

[0104] In some embodiments, determining at least one target expert model based on a first error state vector includes: The meteorological scenario vector for future moments is determined based on weather forecast data; the meteorological scenario vector represents meteorological characteristics. The first error state vector and the meteorological situation vector are concatenated to obtain a joint feature vector; The joint feature vector is input into the routing network to obtain the weights of each expert model output by the routing network; the routing network is obtained by joint training with the expert models. The k expert models with the highest weights are identified as the target expert models; where k is greater than or equal to 1.

[0105] If the current time is Future moments meteorological situation vector Numerical weather forecasting systems can issue forecasts of... The weather forecast values ​​at any given time constitute, for example, ,in for The predicted value of GHI at time 10:00. for Forecast values ​​of cloud cover at any given time. for The forecast value of the solar altitude angle at any given time. The resulting meteorological scenario vector describes the physical background of the numerical weather prediction, i.e., the meteorological characteristics.

[0106] By concatenating the first error state vector and the meteorological situation vector according to certain rules, such as connecting them end-to-end or merging them along a specific dimension, a spliced ​​feature containing both error state information and meteorological situation information is obtained. For example, the first error state vector... With meteorological situation vector By concatenating the first and last parts of the vector together, the resulting joint feature vector is... The concatenated joint feature vector contains both the error state information at the current moment and the future weather scenario information. Joint feature vectors The input is fed into the routing network, and the weights of each expert model output by the routing network describe the degree of trust in each expert model, taking into account both current error conditions and future weather scenarios. Therefore, the k expert models with the highest weights (i.e., the highest degree of trust) are selected as the target expert models for subsequent power generation prediction.

[0107] The routing network is trained synchronously with the expert model. For example, during the forward propagation phase of each training round, the routing network is trained simultaneously with the expert model. Input the routing network G, and output the weights of each expert model. Simultaneously, weather forecast data is input into each expert model to obtain the prediction results of each expert model; the weighted average of the prediction results of each expert model is calculated as the final prediction result; the loss value between the final prediction result and the actual power generation is calculated according to the loss function, and the parameters in the neural network are updated to start a new round of training.

[0108] In this embodiment, by concatenating the meteorological situation vector for future moments determined from weather forecast data with the first error vector, the resulting joint feature vector includes not only the recent error status information at the current moment but also the meteorological situation information for future moments. This improves the accuracy of expert model determination by considering not only recent error conditions but also future weather conditions.

[0109] In some embodiments, determining at least one target expert model based on a first error state vector includes: The meteorological scenario vector for future moments is determined based on weather forecast data; the meteorological scenario vector represents meteorological characteristics. The first error state vector and the meteorological situation vector are concatenated to obtain a joint feature vector; By inputting the joint feature vector into the state evolution model, the second error state vector at the future time point is obtained from the output of the state evolution model. The second error state vector is concatenated with the meteorological situation vector to obtain the joint feature vector for future time moments; The joint feature vectors at future time steps are input into the routing network to obtain the weights of each expert model output by the routing network. The k expert models with the highest weights are identified as the target expert models; where k is greater than or equal to 1.

[0110] First error state vector The meteorological scenario vector describes the error information at time t and the time period before it. This describes the meteorological situation information at a future time t+1. The joint vector... By inputting a state evolution model, the model can analyze the changing patterns of error information at time t and the preceding time period, and, combined with the meteorological situation at time t+1, predict the error information at time t+1. , then calculate , This constitutes the second error state vector at future time points. .

[0111] get Afterwards, With meteorological situation vector By concatenating the features, we obtain the joint feature vector for future time steps. .Will The input is fed into the routing network, and the weights of each expert model output by the routing network describe the degree of trust in each expert model under the predicted future error conditions and meteorological scenarios. Therefore, the k expert models with the highest weights, i.e., the highest degree of trust, are determined as the target expert models for subsequent power generation prediction.

[0112] The routing network is trained synchronously with the expert model. For example, during the forward propagation phase of each training round, the routing network is trained simultaneously with the expert model. Input the routing network G, and output the weights of each expert model. Simultaneously, weather forecast data is input into each expert model to obtain the prediction results of each expert model; the weighted average of the prediction results of each expert model is calculated as the final prediction result; the loss value between the final prediction result and the actual power generation is calculated according to the loss function, and the parameters in the neural network are updated to start a new round of training.

[0113] In this embodiment, by inputting the joint feature vector into the state evolution model, the error information at future times is predicted and the second error state vector is calculated. The second error state vector and the meteorological situation vector are concatenated so that the joint feature vector at future times contains the error state information and meteorological situation information at future times. Thus, when determining the expert model, not only future weather conditions are considered, but also possible future error conditions are taken into account, thereby improving the accuracy of expert model determination.

[0114] In some embodiments, the state evolution model is trained in the following manner: Obtain historical weather forecast data and actual weather measurement data for the sample; Calculate multiple sample first error state vectors representing weather prediction errors at different historical times based on sample historical weather forecast data and sample measured weather data; and determine sample meteorological scenario vectors at different historical times based on sample historical weather forecast data; By concatenating the first error state vector of the sample at the first historical moment and the meteorological situation vector of the sample at the second historical moment, a joint feature vector of the sample is obtained; the second historical moment is the future moment of the first historical moment. Using the first error state vector of the sample at the second historical moment as the label, the state evolution model is trained using the joint feature vector of the samples.

[0115] For example, users can obtain the 24-hour NWP forecast and measured values ​​of GHI for the photovoltaic power station location area over the past three years from a meteorological database as sample historical weather forecast data and sample measured weather data, respectively, and calculate the sample first error state vector for each historical moment; they can also obtain the 24-hour cloud cover and solar altitude angle forecast values ​​of NWP for the photovoltaic power station location area over the past three years from a meteorological database as samples to determine the sample meteorological situation vector for each historical moment. The sample first error state vector at the first historical moment t is then used. The sample meteorological situation vector at the second historical time t+1 By concatenating the samples, we obtain the joint feature vector. For each sample, the joint feature vector ,calculate As a label.

[0116] The training task of the state evolution model is to predict the error state at the next moment based on the current error state and the meteorological situation predicted by the NWP. That is, the input joint feature vector... Output the error state at the next time step. .

[0117] In each round of training, the joint feature vector of each input sample is processed. Calculate the predicted values ​​of the state evolution model. With tags The loss value. For example, the mean squared error value can be used as the loss function, according to the formula... Calculate the loss value, where m is Dimensions.

[0118] Based on the loss value (Loss), update the parameters in the state evolution model and begin a new round of training until time t. With tags The training will tend to be consistent or reach the number of training rounds preset by the user.

[0119] In some embodiments, the error state vector can also be used directly. As input for training, The labels are used as input samples. The training task of the state evolution model is to predict the future state at the next time step based on the error state at the current time step, i.e., the input... Output During each round of training, for each input error state vector... Calculate the predicted values ​​of the state evolution model. With tags The loss value is used to update the parameters in the state evolution model, and a new round of training begins, until time t. With tags The training will tend to be consistent or reach the number of training rounds preset by the user.

[0120] In this embodiment, by calculating multiple sample first error state vectors and sample meteorological situation vectors representing weather errors at different historical moments based on sample historical weather forecast data and sample measured weather data, and training a state evolution model, the obtained state evolution model can predict the error state at future moments based on the error state at the current moment and the meteorological situation at future moments, thereby improving the accuracy of the state evolution model in predicting the error state at future moments.

[0121] In some embodiments, clustering is performed on the first error state vectors of multiple samples to obtain N error categories, including: Determine the meteorological scenario vector for each sample corresponding to the historical weather forecast data; The first error state vector of each sample and the meteorological situation vector of each sample are concatenated to obtain a joint feature vector of multiple samples. Clustering is performed on the joint feature vectors of multiple samples to obtain N error categories.

[0122] For example, users can obtain 24-hour forecasts of GHI, cloud cover, and solar altitude angle for the photovoltaic power station location from a meteorological database over the past three years as sample historical weather forecast data, and calculate the sample meteorological scenario vector accordingly. For each time t, the first error state vector of the sample at time t is then calculated. The sample meteorological situation vector at time t By concatenating the samples end-to-end, we obtain the joint feature vector of the samples at time t. .

[0123] It should be noted that the joint feature vector Z(t) of the samples in this embodiment is obtained by concatenating the first error state vector at time t and the meteorological situation vector at time t, that is... By using the joint feature vector Z(t) of the samples, the clustering process can combine the dual dimensions of the error state and the meteorological situation at the same time, thereby improving the accuracy of clustering. In the aforementioned embodiment, the joint feature vector is obtained by concatenating the error state vector at time t and the meteorological situation vector at the future time t+1, i.e. The main purpose is to enable the prediction of error states.

[0124] After obtaining the joint feature vector of the samples, the joint feature vector of the samples is then processed. Clustering is performed. For example, N=16, and the K-means clustering algorithm is used to cluster these sample joint feature vectors, resulting in 16 error categories. For example, category 1 corresponds to sample joint feature vectors with low overall error, small rate of change, high GHI, low cloud cover, and solar altitude angle close to 90°; category 2 corresponds to sample joint feature vectors with high overall error, large rate of change, high GHI, high cloud cover, and solar altitude angle close to 90°, and so on. The joint feature vectors within each category are similar to each other, while the joint feature vectors between categories are significantly different. Of course, N can also be other values, such as 5, 8, 10, 12, etc., and this embodiment of the application does not limit this.

[0125] In this embodiment, by concatenating the first error state vector of each sample with the corresponding meteorological situation vector, a joint feature vector of multiple samples is obtained. Then, clustering these joint feature vectors ensures that each error category contains not only error information but also the meteorological situation information corresponding to the time the weather forecast error occurred. Therefore, when training corresponding expert models based on the error categories, each expert model can predict power generation based on the corresponding weather forecast data for a given error and meteorological situation category, thereby improving the prediction accuracy of each expert model under different error and meteorological situations.

[0126] In some embodiments, current weather forecast data is input into at least one target expert model to obtain the power generation capacity for a future target time period, including: When there is only one target expert model, the output of the target expert model is determined as the power generation capacity for the future target time period; When there are multiple target expert models, determine the weight of each target expert model; The outputs of each target expert model are weighted and fused to obtain the power generation capacity for the future target time period.

[0127] For example, at time t, NWP publishes the future target time period. GHI data =[ .

[0128] In the case of having only one expert model 1, Input expert model 1, and obtain the predicted power generation value output by expert model 1. , then As a future target time period Power generation capacity.

[0129] When there are multiple objective expert models, determine the weights of each objective expert model.

[0130] For example, there are N expert models, and the route G gives the weights of each expert as follows: The K expert models with the highest weights were selected as the target expert models. For example, K=2, and the target expert models are denoted as expert model a and expert model b, with weights of respectively. and .right and Perform normalization calculations to obtain new weights. and , .

[0131] The outputs of each target expert model are weighted and fused to obtain the power generation capacity for the future target time period.

[0132] For example, The input is given to expert model a and expert model b, and each expert model outputs a predicted power generation value. The prediction results of each objective expert model For each future moment According to the formula Calculate the weighted average and obtain The predicted power generation value at time t is finally obtained. As a target time period for the future The final predicted power generation results.

[0133] In this embodiment, when there are multiple target expert models, the weight of each target expert model is determined, and the output results of each target expert model are weighted and fused. This ensures that the power generation for the future target time period takes into account the output results of each target expert model according to the weights, thereby reducing the impact of sudden changes in weather forecast error types on power generation prediction and improving the accuracy of power generation prediction.

[0134] The following scenario example illustrates the power generation prediction method provided in this application. For example... Figure 2 As shown in this scenario example, the historical weather forecast data, actual weather data, latest weather forecast data, and latest actual weather data for the photovoltaic power station area are first obtained over a period of time.

[0135] After acquiring the data, the model is trained offline. First, based on historical weather forecast data and historical weather measurement data, error state vectors and meteorological scenario vectors are calculated, and these vectors are concatenated into a joint feature vector. A clustering algorithm is used to cluster all joint feature vectors into N classes, each representing an error prototype. After obtaining the error prototypes, N expert models are established. Expert model i is trained using historical sample data belonging to error prototype i, resulting in N specialized expert models. A state evolution model is also established and trained using historical sample data. Finally, a routing network G is established and trained simultaneously with the specialized expert models.

[0136] After obtaining the specialized expert models, state evolution models, and routing networks, online prediction is performed. First, based on historical weather forecast data, measured data, and the latest weather forecast data and measured data, the current error state vector and the future weather scenario vector are calculated. The current error state vector and the future weather scenario vector are concatenated, and the state evolution model is used to predict the future error state, resulting in the future error state vector. The future error state vector is then input into the routing network to calculate the weights of each specialized expert model. The K specialized expert models with the highest weights are determined as target expert models. Weather forecast data for the target time period is simultaneously input into these K target expert models, and the weighted fusion value of the output results is calculated as the final predicted power, which is then output.

[0137] The power generation prediction method provided in this application can be executed by a power generation prediction device. This application uses the example of a power generation prediction device executing the power generation prediction method to illustrate the power generation prediction device provided in this application.

[0138] This application also provides a power generation prediction device.

[0139] like Figure 3 As shown, the power generation prediction device includes: The calculation module 310 is used to calculate a first error state vector based on historical weather forecast data and actual weather measurement data; the first error state vector represents the weather forecast error at the current moment; The determination module 320 is used to determine at least one target expert model from multiple expert models based on a first error state vector; wherein, different expert models are trained based on historical weather forecast data and actual historical power generation values ​​corresponding to different weather forecast errors. The input module 330 is used to input the current weather forecast data into at least one target expert model to obtain the power generation capacity for the target time period in the future.

[0140] According to the power generation prediction device of this application, a first error state vector is calculated based on historical weather forecast data and actual weather data. Based on the first error state vector, at least one target expert model is determined from multiple expert models for prediction. The device takes into account the changes in weather forecast error and selects an expert model that is suitable for the error state for prediction, thereby reducing the impact of sudden changes in weather forecast error type on power generation prediction and improving the accuracy of power generation prediction.

[0141] In some embodiments, the computing module 310 is further configured to: The first error state vector is calculated based on historical weather forecast data and actual weather measurement data, including: According to the formula

[0142]

[0143] Calculate the first error state vector; in, This represents the first error state vector at time t. This represents the weather forecast value at time t based on historical weather forecast data. This represents the measured weather value at time t, obtained from actual weather data. This represents the difference between the predicted weather value and the actual weather value at time t. express The difference between the weather forecast and the actual weather measurement at any given time. This represents the rate of change of the error between the predicted and measured weather values ​​at time t. This represents the integral of the error between the predicted weather value and the actual weather value at time t.

[0144] In some embodiments, the determining module 320 is further configured to: At least one target expert model is determined based on the first error state vector, including: The first error state vector is input into the routing network to obtain the weights of each expert model output by the routing network; the routing network is obtained by joint training with the expert models. The k expert models with the highest weights are identified as the target expert models; where k is greater than or equal to 1.

[0145] In some embodiments, the determining module 320 is further configured to: At least one target expert model is determined based on the first error state vector, including: The first error state vector is input into the state evolution model to obtain the second error state vector at the future time output by the state evolution model. The second error state vector is input into the routing network to obtain the weights of each expert model output by the routing network; the routing network is obtained by joint training with the expert models. The k expert models with the highest weights are identified as the target expert models; where k is greater than or equal to 1.

[0146] In some embodiments, the determining module 320 is further configured to: At least one target expert model is determined based on the first error state vector, including: The meteorological scenario vector for future moments is determined based on weather forecast data; the meteorological scenario vector represents meteorological characteristics. The first error state vector and the meteorological situation vector are concatenated to obtain a joint feature vector; The joint feature vector is input into the routing network to obtain the weights of each expert model output by the routing network; the routing network is obtained by joint training with the expert models. The k expert models with the highest weights are identified as the target expert models; where k is greater than or equal to 1.

[0147] In some embodiments, the determining module 320 is further configured to: At least one target expert model is determined based on the first error state vector, including: The meteorological scenario vector for future moments is determined based on weather forecast data; the meteorological scenario vector represents meteorological characteristics. The first error state vector and the meteorological situation vector are concatenated to obtain a joint feature vector; By inputting the joint feature vector into the state evolution model, the second error state vector at the future time point is obtained from the output of the state evolution model. The second error state vector is concatenated with the meteorological situation vector to obtain the joint feature vector for future time moments; The joint feature vectors at future time steps are input into the routing network to obtain the weights of each expert model output by the routing network. The k expert models with the highest weights are identified as the target expert models; where k is greater than or equal to 1.

[0148] In some embodiments, the determining module 320 is further configured to: The state evolution model is trained using the following method: Obtain historical weather forecast data and actual weather measurement data for the sample; Calculate multiple sample first error state vectors representing weather prediction errors at different historical times based on sample historical weather forecast data and sample measured weather data; and determine sample meteorological scenario vectors at different historical times based on sample historical weather forecast data; By concatenating the first error state vector of the sample at the first historical moment and the meteorological situation vector of the sample at the second historical moment, a joint feature vector of the sample is obtained; the second historical moment is the future moment of the first historical moment. Using the first error state vector of the sample at the second historical moment as the label, the state evolution model is trained using the joint feature vector of the samples.

[0149] In some embodiments, the determining module 320 is further configured to: Train the expert model using the following method: Obtain historical weather forecast data and actual weather measurement data for the sample; Calculate multiple sample first error state vectors representing weather prediction errors at different times based on sample historical weather forecast data and sample measured weather data; Cluster the first error state vectors of multiple samples to obtain N error categories; Establish N expert models, and train each of them using historical weather forecast data and actual historical power generation data corresponding to N error categories.

[0150] In some embodiments, the determining module 320 is further configured to: Clustering the first error state vectors of multiple samples yields N error categories, including: Determine the meteorological scenario vector for each sample corresponding to the historical weather forecast data; The first error state vector of each sample and the meteorological situation vector of each sample are concatenated to obtain a joint feature vector of multiple samples. Clustering is performed on the joint feature vectors of multiple samples to obtain N error categories.

[0151] In some embodiments, the input module 330 is further configured to: Input the current weather forecast data into at least one target expert model to obtain the power generation capacity for the target future time period, including: When there is only one target expert model, the output of the target expert model is determined as the power generation capacity for the future target time period; When there are multiple target expert models, determine the weight of each target expert model; The outputs of each target expert model are weighted and fused to obtain the power generation capacity for the future target time period.

[0152] The power generation prediction device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a photovoltaic system, a wind power generation system, a server, etc., and this application embodiment does not specifically limit it.

[0153] The power generation prediction device in this application embodiment can be a device with an operating system. This operating system can be Microsoft (Windows), Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.

[0154] In some embodiments, such as Figure 4 As shown, this application embodiment also provides an electronic device 400, including a processor 401, a memory 402, and a computer program stored in the memory 402 and executable on the processor 401. When the program is executed by the processor 401, it implements the various processes of the above-described power generation prediction method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0155] It should be noted that the electronic devices in the embodiments of this application include the aforementioned mobile electronic devices and non-mobile electronic devices.

[0156] This application also provides a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described power generation prediction method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0157] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0158] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described power generation prediction method.

[0159] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0160] This application also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described power generation prediction method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0161] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0162] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0163] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0164] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

[0165] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0166] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.

Claims

1. A method for predicting power generation, characterized in that, include: The first error state vector is calculated based on historical weather forecast data and actual weather measurement data; The first error state vector represents the weather forecast error at the current moment; At least one target expert model is determined from multiple expert models based on the first error state vector; wherein, different expert models are trained based on historical weather forecast data and actual historical power generation values ​​corresponding to different weather forecast errors; The current weather forecast data is input into the at least one target expert model to obtain the power generation capacity for the future target time period.

2. The method according to claim 1, characterized in that, The calculation of the first error state vector based on historical weather forecast data and actual weather measurement data includes: According to the formula Calculate the first error state vector; in, This represents the first error state vector at time t. This represents the weather forecast value at time t based on historical weather forecast data. This represents the measured weather value at time t, obtained from actual weather data. This represents the difference between the predicted weather value and the actual weather value at time t. express The difference between the weather forecast and the actual weather measurement at any given time. This represents the rate of change of the error between the predicted and measured weather values ​​at time t. This represents the integral of the error between the predicted weather value and the actual weather value at time t.

3. The method according to claim 1, characterized in that, The step of determining at least one target expert model based on the first error state vector includes: The first error state vector is input into the routing network to obtain the weights of each expert model output by the routing network; the routing network is obtained by joint training with the expert models. The k expert models with the highest weights are identified as the target expert models; where k is greater than or equal to 1.

4. The method according to claim 1, characterized in that, The step of determining at least one target expert model based on the first error state vector includes: The first error state vector is input into the state evolution model to obtain the second error state vector at the future time output by the state evolution model. The second error state vector is input into the routing network to obtain the weights of each expert model output by the routing network; the routing network is obtained by joint training with the expert models. The k expert models with the highest weights are identified as the target expert models; where k is greater than or equal to 1.

5. The method according to claim 1, characterized in that, The step of determining at least one target expert model based on the first error state vector includes: The weather scenario vector for future times is determined based on the weather forecast data; the weather scenario vector represents the weather characteristics. The first error state vector and the meteorological situation vector are concatenated to obtain a joint feature vector; The joint feature vector is input into the routing network to obtain the weights of each expert model output by the routing network; the routing network is obtained by joint training with the expert models. The k expert models with the highest weights are identified as the target expert models; where k is greater than or equal to 1.

6. The method according to claim 1, characterized in that, The step of determining at least one target expert model based on the first error state vector includes: The weather scenario vector for future times is determined based on the weather forecast data; the weather scenario vector represents the weather characteristics. The first error state vector and the meteorological situation vector are concatenated to obtain a joint feature vector; The joint feature vector is input into the state evolution model to obtain the second error state vector at the future time output by the state evolution model. The second error state vector is concatenated with the meteorological situation vector to obtain a joint feature vector for future moments; The joint feature vectors at future time steps are input into the routing network to obtain the weights of each expert model output by the routing network. The k expert models with the highest weights are identified as the target expert models; where k is greater than or equal to 1.

7. The method according to claim 6, characterized in that, The state evolution model is trained in the following manner: Obtain historical weather forecast data and actual weather measurement data for the sample; Calculate multiple sample first error state vectors representing weather prediction errors at different historical times based on the sample historical weather forecast data and the sample measured weather data; and determine sample meteorological scenario vectors at different historical times based on the sample historical weather forecast data; By concatenating the first error state vector of the sample at the first historical moment and the meteorological situation vector of the sample at the second historical moment, a joint feature vector of the sample is obtained; the second historical moment is a future moment of the first historical moment. The first error state vector of the sample at the second historical moment is used as the label, and the state evolution model is trained using the joint feature vector of the sample.

8. The method according to claim 1, characterized in that, The expert model is trained in the following manner: Obtain historical weather forecast data and actual weather measurement data for the sample; Calculate multiple sample first error state vectors representing weather prediction errors at different times based on the sample historical weather forecast data and the sample measured weather data; Cluster the first error state vectors of multiple samples to obtain N error categories; Establish N expert models, and train each of them using historical weather forecast data and actual historical power generation data corresponding to N error categories.

9. The method according to claim 8, characterized in that, The clustering of the first error state vectors of multiple samples yields N error categories, including: Determine the meteorological scenario vector for each sample corresponding to the historical weather forecast data; The first error state vector of each sample and the meteorological situation vector of each sample are concatenated to obtain a joint feature vector of multiple samples. Clustering is performed on the joint feature vectors of multiple samples to obtain N error categories.

10. The method according to claim 1, characterized in that, The step of inputting current weather forecast data into the at least one target expert model to obtain the power generation capacity for a future target time period includes: When there is only one target expert model, the output of the target expert model is determined as the power generation capacity for the future target time period; When there are multiple target expert models, determine the weight of each target expert model; The outputs of each of the target expert models are weighted and fused to obtain the power generation capacity for the future target time period.

11. A power generation prediction device, characterized in that, include: The calculation module is used to calculate the first error state vector based on historical weather forecast data and actual weather measurement data; The first error state vector represents the weather forecast error at the current moment; The determination module is used to determine at least one target expert model from multiple expert models based on the first error state vector; wherein, different expert models are trained based on historical weather forecast data and actual historical power generation values ​​corresponding to different weather forecast errors. The input module is used to input the current weather forecast data into the at least one target expert model to obtain the power generation capacity for the future target time period.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1-10.

13. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-10.