Photovoltaic power generation prediction method and device, equipment and storage medium

Through automatic machine learning technology and real-time evaluation mechanism, the photovoltaic power generation prediction model is constructed and updated, and the problem of low prediction accuracy in the existing technology is solved, achieving higher prediction accuracy.

CN119849663APending Publication Date: 2025-04-18ZHUHAI UNITECH POWER TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411938741.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The accuracy of existing photovoltaic power generation prediction methods is low, and due to the complexity of training samples and hyperparameter settings, it is difficult to ensure the accuracy of model prediction.

Method used

Automatic machine learning technology is used to obtain historical power generation data and weather data of photovoltaic equipment, build sample sets and train models through multiple training samples. The predictive capability value of the model is calculated using the test sample, and the target model is determined based on the predictive capability value comparison. Evaluate the prediction accuracy of the model in real time and trigger the model retraining service when the preset time is reached.

Benefits of technology

Through automatic machine learning technology and real-time evaluation mechanism, the prediction model is selected to select appropriate parameters and updated the model based on the evaluation results, which significantly improves the accuracy of photovoltaic power generation prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119849663A_ABST
    Figure CN119849663A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of photovoltaic power generation, and discloses a photovoltaic power generation prediction method and device, equipment and a storage medium. According to the method, the prediction capability of the photovoltaic power generation prediction model is evaluated by using an automatic machine learning technology, so that the prediction model is constructed by selecting proper parameters, and meanwhile, the model can be updated according to an evaluation result, so that the accuracy of photovoltaic power generation prediction is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of power electronics technology, and in particular to a photovoltaic power generation prediction method, device, equipment and storage medium. Background Art

[0002] With the development of photovoltaic power generation technology, especially the construction and use of photovoltaic power stations, in order to facilitate the maintenance of photovoltaic power stations, the power generation of photovoltaic equipment can be predicted to determine whether maintenance is needed.

[0003] At present, the photovoltaic power generation prediction method mainly trains prediction models based on machine learning methods to predict the future photovoltaic power generation of photovoltaic equipment. However, the machine learning methods currently used require manual selection of models and adjustment of hyperparameters, and different data sets and tasks require different machine learning algorithms and parameter settings, which greatly increases the difficulty of model training. In addition, the models trained in this way are still limited to the training samples. As time goes by, the prediction accuracy of the model cannot be guaranteed. Summary of the invention

[0004] The present application provides a photovoltaic power generation prediction method, device, equipment and storage medium to solve the problem of low photovoltaic power generation prediction accuracy provided by the prior art.

[0005] The first aspect of the present application provides a photovoltaic power generation prediction method, comprising: obtaining historical power generation data and corresponding historical weather data of photovoltaic equipment, and constructing a sample set, wherein the sample set includes a test sample and a plurality of training samples; using automatic machine learning technology, using each of the training samples to perform model training, and calculating the prediction ability value of the model obtained in each training according to the test sample; determining a target photovoltaic power generation prediction model by comparing the prediction ability value of the model trained at the current moment with the prediction ability value of the model trained at the previous moment; obtaining weather data for a time period to be predicted and inputting it into the target photovoltaic power generation prediction model to predict the power generation prediction value for the time period to be predicted; when a first preset time arrives, calculating the prediction accuracy of the target photovoltaic power generation prediction model according to each of the power generation prediction values ​​and the corresponding power generation true value, and triggering a model retraining service based on the prediction accuracy, wherein the first preset time is the time for triggering the model prediction accuracy calculation.

[0006] In a feasible implementation manner, the method of obtaining the historical power generation data of the photovoltaic equipment and the corresponding historical weather data to construct a sample set includes: collecting the historical power generation data of the photovoltaic equipment and recording the historical weather data of the corresponding historical time period through data service subscription; cleaning the historical power generation data to obtain complete historical power generation data; constructing a plurality of sample data based on the complete historical power generation data and the historical weather data, and dividing the plurality of sample data into training samples and test samples according to a preset ratio to obtain a sample set.

[0007] In a feasible implementation manner, the historical power generation data is cleaned to obtain complete historical power generation data, including: dividing the historical power generation data into multiple data segments, wherein each data segment includes historical power generation for t time periods; taking an average value of the power generation in each data segment, and cleaning each data segment based on the average value to obtain complete historical power generation data.

[0008] In a feasible implementation manner, the data segments are cleaned based on the average value to obtain complete historical power generation data, including: selecting a target data segment from multiple data segments based on the average value, wherein the target data segment is a data segment with abnormal or missing power generation; based on the normal distribution relationship between solar irradiance and power generation, using the 3σ criterion to clean up the abnormal power generation in the target data segment; using the third-order B-spline curve interpolation method to fill the missing power generation in the target data segment to obtain complete historical power generation data.

[0009] In a feasible implementation, the automatic machine learning technology is used to train the several training samples to obtain a photovoltaic power generation prediction model, including: using the automatic machine learning technology to select a target machine learning algorithm from a plurality of preset machine learning algorithms, and determining the hyperparameters of the prediction model; based on the target machine learning algorithm and the hyperparameters, each of the training samples is used for training to obtain a photovoltaic power generation prediction model.

[0010] In a feasible implementation, the predictive capability value of the model obtained through each training is calculated based on the test sample, including: inputting the test sample into the photovoltaic power generation prediction model trained at the current moment to perform multiple power generation predictions to obtain multiple prediction values; calculating the standard deviation between the multiple prediction values ​​and the historical power generation in the test sample, and determining the predictive capability value of the photovoltaic power generation prediction model based on the standard deviation.

[0011] In a feasible implementation manner, the calculation formula of the standard deviation is:

[0012]

[0013] Where δ is the standard deviation, is the predicted value, is the historical power generation, and n is the number of predictions.

[0014] In a feasible implementation, the prediction accuracy of the target photovoltaic power generation prediction model is calculated according to each of the power generation prediction values ​​and the corresponding actual power generation values, and the model retraining service is triggered based on the prediction accuracy, including: obtaining the actual power generation value of the target photovoltaic power generation prediction model in each time period to be predicted before the time for retraining the model arrives; calculating the prediction accuracy of the target photovoltaic power generation prediction model based on all the power generation prediction values ​​and all the actual power generation values ​​output by the target photovoltaic power generation prediction model before the time for retraining the model arrives; judging whether the prediction accuracy is greater than a preset accuracy threshold, and determining whether to trigger the model retraining service based on the judgment result.

[0015] In a feasible implementation manner, the calculation formula for the prediction accuracy is:

[0016]

[0017] Among them, p i is the historical power generation at time t, p i , is the predicted value at time t.

[0018] In a feasible implementation, after calculating the prediction accuracy of the target photovoltaic power generation prediction model based on each of the power generation prediction values ​​and the corresponding actual power generation values, and triggering the model retraining service based on the prediction accuracy, it also includes: judging whether a second preset time has arrived, wherein the second preset time is the time to trigger model retraining; if so, updating a number of the training samples based on the actual power generation values ​​of each time period to be predicted, and retraining the model based on the updated training samples.

[0019] The second aspect of the present application provides a photovoltaic power generation prediction device, including: an acquisition module, used to acquire historical power generation data and corresponding historical weather data of photovoltaic equipment, and construct a sample set, wherein the sample set includes a test sample and a plurality of training samples; a training module, used to use automatic machine learning technology to use each of the training samples for model training; a first calculation module, used to calculate the prediction ability value of the model obtained in each training according to the test sample; and determine the target photovoltaic power generation prediction model according to the prediction ability value of the model trained at the current moment and the prediction ability value of the model trained at the previous moment; a prediction module, used to acquire weather data of a time period to be predicted and input it into the target photovoltaic power generation prediction model to predict the power generation prediction value of the time period to be predicted; a second calculation module, used to calculate the prediction accuracy of the target photovoltaic power generation prediction model according to each of the power generation prediction values ​​and the corresponding power generation true value when a first preset time arrives, and trigger the model retraining service based on the prediction accuracy, wherein the first preset time is the time to trigger the model prediction accuracy calculation.

[0020] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein the memory stores executable instructions that can be executed by the processor, and the processor executes the executable instructions to implement the photovoltaic power generation prediction method provided above.

[0021] In a fourth aspect, an embodiment of the present application provides a readable storage medium, wherein the readable storage medium stores executable instructions. When the executable instructions are called and executed by a processor, the machine executable instructions prompt the processor to implement the photovoltaic power generation prediction method provided above.

[0022] In the technical solution provided by the present application, the method includes obtaining the historical power generation data and the corresponding historical weather data of the photovoltaic equipment, constructing a sample set, wherein the sample set includes a test sample and a number of training samples; using automatic machine learning technology, using each training sample to train the model, and calculating the prediction ability value of the model obtained by each training according to the test sample; determining the target photovoltaic power generation prediction model according to the prediction ability value of the model trained at the current moment and the prediction ability value of the model trained at the previous moment; obtaining the weather data of the time period to be predicted and inputting it into the target photovoltaic power generation prediction model, predicting the power generation prediction value of the time period to be predicted; when the first preset time arrives, the prediction accuracy of the target photovoltaic power generation prediction model is calculated according to each power generation prediction value and the corresponding power generation true value, and the model retraining service is triggered based on the prediction accuracy, wherein the first preset time is the time to trigger the calculation of the model prediction accuracy. In the present application, by using automatic machine learning technology and the prediction ability evaluation of the photovoltaic power generation prediction model, it is possible to select appropriate parameters to construct the prediction model, and at the same time, the model can be updated according to the evaluation results to ensure the accuracy of the photovoltaic power generation prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic diagram of a process flow of a photovoltaic power generation prediction method in an embodiment of the present application;

[0024] Figure 2 Another schematic diagram of the photovoltaic power generation prediction method in the embodiment of the present application;

[0025] Figure 3 This is a flowchart of data cleaning in an embodiment of the present application;

[0026] Figure 4 A network structure diagram of a photovoltaic power generation prediction model in an embodiment of the present application;

[0027] Figure 5 A schematic diagram of a photovoltaic power generation prediction device provided in an embodiment of the present application;

[0028] Figure 6 Another schematic diagram of the structure of the photovoltaic power generation prediction device provided in the embodiment of the present application;

[0029] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] The present application provides a photovoltaic power generation prediction method, device, equipment and storage medium, which trains a photovoltaic power generation prediction model through automatic machine learning technology, and evaluates the prediction ability of the photovoltaic power generation prediction model in real time to determine whether the prediction model needs to be updated, so as to obtain the optimal model for photovoltaic power generation prediction, and solve the problem of low accuracy of photovoltaic power generation prediction provided by the prior art. At the same time, it also solves the conventional manual training model, and can gradually improve the accuracy of the model through the model scoring mechanism.

[0031] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] like Figure 1 As shown, the embodiment of the present application provides an implementation of a photovoltaic power generation prediction method, the method comprising the following steps:

[0033] 110. Obtain historical power generation data of photovoltaic equipment and corresponding historical weather data, and construct a sample set, which includes a test sample and a plurality of training samples.

[0034] In this embodiment, historical power generation data is extracted from the pre-recorded operating data of the photovoltaic equipment. Specifically, the extraction can be performed according to a preset recording period, such as using days, weeks, months and other time periods as the extraction period for historical power generation data, and constructing a sample with the data of one period. Of course, the data of one period can also be divided into multiple time periods, and the data of each time period constructs a sample.

[0035] After the historical power generation data is extracted, the historical weather data of the corresponding time is obtained from the weather monitoring software or system based on the time of each historical power generation data as an index, or intercepted from the pre-recorded weather data based on the time.

[0036] After obtaining the historical power generation data and historical weather data, the historical power generation data and historical weather data of the same time are merged based on time as the classification standard to construct a sample. After the classification is completed, all samples are divided into training samples and test samples according to a certain ratio to obtain a sample set.

[0037] 120. Using automatic machine learning technology, use each training sample to train the model, and calculate the predictive ability value of the model obtained in each training based on the test sample.

[0038] In this embodiment, automatic machine learning technology is used to select machine learning algorithms and model parameters that meet the conditions, such as: automatic machine learning technology is used to select corresponding machine learning algorithms and model parameters based on the working parameters and operating environment of the photovoltaic equipment, and the model parameters are used to set the network structure corresponding to the machine learning algorithm to obtain a prototype of the prediction model, and then the prototype of the prediction model is trained with a number of training samples to learn the rules of photovoltaic power generation in each training sample to obtain a target photovoltaic power generation prediction model.

[0039] It should be noted that the model training process is that each training sample is trained to obtain a photovoltaic power generation prediction model, and then the prediction capability value of the model is calculated after each training is completed to obtain a photovoltaic power generation prediction model.

[0040] 130. Determine the target photovoltaic power generation prediction model by comparing the prediction capability value of the model trained at the current moment with the prediction capability value of the model trained at the previous moment.

[0041] It is understandable that after obtaining the prediction ability value, it is compared with the prediction ability of the model trained by the previous training sample or the model selected in the previous training to select a model with a larger prediction ability value as a candidate photovoltaic power generation prediction model.

[0042] For example, after selecting training sample 1 at time t1 to train a model, and determining the model at time t1 as candidate photovoltaic power generation prediction model 1, select training sample 2 at the next time t2 of t1 to train a model, and then calculate the prediction ability value of the model, compare the prediction ability value of the model at time t2 with the prediction ability value of candidate photovoltaic power generation prediction model 1, select the largest one, and update the candidate photovoltaic power generation prediction model. For example, if the prediction ability value of the model at time t2 is greater than the prediction ability value of candidate photovoltaic power generation prediction model 1, the model at time t2 is retained for subsequent prediction operations; if it is less than or equal to, the candidate photovoltaic power generation prediction model 1 is continued to be used for subsequent prediction operations, and the training selection is repeated in this way to obtain the output target photovoltaic power generation prediction model.

[0043] In another feasible implementation, the target photovoltaic power generation prediction model and the calculation of the prediction capability value are not necessarily based on the above-mentioned calculation selection output for each training, but can be selected by calculating the prediction capability value after a training is completed and used for prediction multiple times. Specifically, the evaluation of the prediction capability of the photovoltaic power generation prediction model can be evaluated by starting the evaluation program by setting a timer trigger, such as after completing N predictions using the photovoltaic power generation prediction model, the model is evaluated once, where N is a natural number greater than or equal to 1. Furthermore, the evaluation of the model can be triggered by setting each time period.

[0044] In this embodiment, the test sample is input into the target photovoltaic power generation prediction model for prediction, and an evaluation calculation is performed based on the prediction result and the actual power generation data in the test sample to obtain the prediction capability value of the photovoltaic power generation prediction model.

[0045] 140. Obtain weather data for a time period to be predicted and input the data into a target photovoltaic power generation prediction model to predict a power generation prediction value for the time period to be predicted.

[0046] 150. When the first preset time arrives, the prediction accuracy of the target photovoltaic power generation prediction model is calculated according to each power generation prediction value and the corresponding actual power generation value, and the model retraining service is triggered based on the prediction accuracy. The first preset time is the time to trigger the model prediction accuracy calculation.

[0047] It should be noted that when the model retraining service is triggered based on the prediction accuracy, it is determined by comparing the prediction accuracy with a preset threshold, which refers to the prediction accuracy threshold of the photovoltaic power generation prediction model. By comparing the prediction accuracy of the evaluation output with the prediction accuracy threshold, if the comparison result is less than the threshold, the model retraining service is triggered. If it is greater than or equal to the threshold, return to execute step 140.

[0048] In this embodiment, when the photovoltaic power generation prediction model is retrained, the retraining can be performed in the following manner:

[0049] Re-acquire historical power generation data and historical weather data, construct new training samples, and then use automatic machine learning technology to retrain a photovoltaic power generation prediction model based on the new training samples and replace the original photovoltaic power generation model;

[0050] Alternatively, the original photovoltaic power generation prediction model is optimized and trained using new training samples, and the optimized model is evaluated. After the evaluation meets the prediction accuracy threshold, the optimization training is terminated.

[0051] When using the photovoltaic power generation prediction model for prediction, first determine the predicted time period, and then determine the weather data from the weather software or system based on the time period. Specifically, it is obtained through weather forecasting. Of course, when the predicted time period is close to the current time, it can be directly read from the weather forecast software. If it is far from the current time, that is, it cannot be obtained from the weather forecast software, then the prediction function in the weather forecast software is called for prediction, and even historical weather data with similar time periods can be selected from historical weather data as the weather data for the predicted time period.

[0052] Then, the weather data is input into the photovoltaic power generation prediction model for prediction. Specifically, the photovoltaic power generation prediction model is provided with multiple input layers, multiple hidden layers and an output layer. Different information in the weather data is input from different input layers and then output to each hidden layer for prediction calculation. Finally, the prediction results of multiple hidden layers are summed, averaged, or even regressed through the output layer to output the power generation prediction data.

[0053] In this embodiment, the photovoltaic power generation prediction model is trained by using automatic machine learning technology, and then a prediction ability evaluation process for the photovoltaic power generation prediction model is provided. This method can not only train a high-accuracy prediction model, but also ensure that the prediction model is stable at the same prediction accuracy level through evaluation, thereby improving the accuracy of photovoltaic power generation prediction.

[0054] See also Figure 2 , is another implementation of the photovoltaic power generation prediction method provided by the present application, the method comprising the following steps:

[0055] 210. Subscribe to the historical power generation data and historical weather data of photovoltaic equipment, and perform cleaning processing to generate training samples and test samples.

[0056] In this step, historical power generation data of photovoltaic equipment is collected through data service subscription, and historical weather data of the corresponding historical time period is recorded; the historical power generation data is cleaned to obtain complete historical power generation data; multiple sample data are constructed based on the complete historical power generation data and the historical weather data, and the multiple sample data are divided into training samples and test samples according to a preset ratio to obtain a sample set.

[0057] It should be noted that the data service subscription actually interacts with the photovoltaic equipment through different connection methods and different communication rules, and pushes the historical power generation data reported by the photovoltaic equipment to the back-end data processing service (data processing platform) for processing.

[0058] The data processing service cleans the historical power generation data pushed by subscription. The cleaning process is as follows: Figure 3 As shown, the historical power generation data is processed by abnormal presentation, redundancy deletion, missing supplementation, etc., and then stored in the database. Then, the cleaned data is read from the database to construct the sample.

[0059] In this embodiment, the historical power generation data is cleaned to obtain complete historical power generation data, including: dividing the historical power generation data into multiple data segments, wherein each data segment includes historical power generation for t time periods; taking an average value of the power generation in each data segment, and cleaning each data segment based on the average value to obtain complete historical power generation data.

[0060] Among them, the cleaning of each data segment based on the average value to obtain complete historical power generation data includes: selecting a target data segment from multiple data segments based on the average value, wherein the target data segment is a data segment with abnormal or missing power generation; based on the normal distribution relationship between solar irradiance and power generation, using the 3σ criterion to clean up the abnormal power generation in the target data segment; using the third-order B-spline curve interpolation method to fill the missing power generation in the target data segment to obtain complete historical power generation data.

[0061] It is understandable that when the historical power generation data is received, the data is transmitted to the data processing service, and the average value of all photovoltaic power generation data in each t time period is taken. The cleaned power generation cleaned value is stored in the database, and finally the cleaned data is preprocessed every day through the sample data preprocessing logic to generate a sample set.

[0062] Since the solar irradiance has the greatest impact on photovoltaic power generation data, and the solar irradiance is small in the morning and evening and large at noon, and is approximately normally distributed, the 3σ criterion is selected to clean up outliers; the missing data is filled with the third-order B-spline curve interpolation method. Through the above operations, samples of historical power generation data of photovoltaic equipment with a specified time span are obtained and stored in the sample library.

[0063] 220. Use automatic machine learning technology to select a target machine learning algorithm from multiple preset machine learning algorithms and determine the hyperparameters of the prediction model.

[0064] It should be noted that different machine learning algorithms are set in advance according to different photovoltaic devices, and different model parameters are set according to the working parameters and operating environment of each photovoltaic device. After the photovoltaic device to be predicted is determined, the automatic machine learning technology is used to select the algorithm and parameters matching the photovoltaic device from the preset algorithms and parameters, such as Figure 4As shown, the framework of the prediction model corresponding to the selected algorithm includes a network structure of multiple input layers, three hidden layers and one output layer. The hyperparameters of the network structure are selected according to the working parameters and operating environment of the photovoltaic equipment, and the parameters of the input layer, hidden layer and output layer in the network structure are set.

[0065] 230. Based on the target machine learning algorithm and hyperparameters, the photovoltaic power generation prediction model is obtained by training with each training sample.

[0066] It should be noted that the automatic machine learning technology AutoML is used to automatically select the best machine learning algorithm and hyperparameters for model setting, and to train historical power data to build a predictive model.

[0067] In this embodiment, the training process includes the following two types: one is training by timing setting, that is, training to obtain a photovoltaic power generation prediction model is an intermittent process. After each training, a photovoltaic power generation prediction model will be obtained and used for subsequent predictions.

[0068] In the prediction process, the model obtained through training can be replaced to continue the next prediction. Specifically, after the training is performed, the timer starts to count down the first preset time T2 and the second preset time T1, and after a photovoltaic power generation prediction model is trained using the training samples, step 240 is entered.

[0069] 240. Input the test sample into the photovoltaic power generation prediction model trained at the current moment to perform multiple power generation predictions to obtain multiple prediction values.

[0070] In this step, the test sample is actually a set of standard weather data and power generation data. The same test sample is used to repeatedly predict the photovoltaic power generation prediction model currently trained to obtain multiple prediction values.

[0071] 250. Calculate the standard deviation between the multiple predicted values ​​and the historical power generation in the test sample, and determine the prediction capability value of the photovoltaic power generation prediction model based on the standard deviation.

[0072] In this embodiment, after the benchmark data (the benchmark data is a set of historical power generation data of the photovoltaic equipment) is input into the photovoltaic power generation prediction model for prediction and the predicted value of the power generation is obtained, the standard deviation calculation formula is used to calculate the standard deviation δ between multiple predicted values ​​and historical values. If the value of δ is greater than the value of the original prediction model, it indicates that the prediction accuracy is lower than the original prediction model and it will not be updated; otherwise, it will be updated.

[0073] The calculation formula of the standard deviation is:

[0074]

[0075] Where δ is the standard deviation, is the predicted value, is the historical power generation, and n is the number of predictions.

[0076] 260. Determine the target photovoltaic power generation prediction model by comparing the prediction capability value of the model trained at the current moment with the prediction capability value of the model trained at the previous moment.

[0077] After comparing the prediction ability values ​​of the previous and next models each time, the one with the largest prediction ability value is selected to enter the prediction process, that is, executing step 270.

[0078] 270. Obtain weather data for a time period to be predicted and input it into a target photovoltaic power generation prediction model to predict a power generation prediction value for the time period to be predicted.

[0079] For example, obtain weather forecast data from a third-party weather service, such as Xinzhi Weather, to obtain weather forecast data for the next three days, input the weather forecast data into a photovoltaic power generation prediction model for prediction, and obtain the predicted power generation value for the next three days.

[0080] It should be noted that the prediction process includes predictions for multiple time periods, that is, at the beginning of the training model, the first preset time T2 is counted. After each prediction, it is necessary to identify whether the first preset time T2 has been reached. If it has been reached, step 280 is executed, otherwise step 270 is continued to predict the next time period.

[0081] 280. When the first preset time arrives, the prediction accuracy of the target photovoltaic power generation prediction model is calculated according to each power generation prediction value and the corresponding actual power generation value, and the model retraining service is triggered based on the prediction accuracy. The first preset time is the time to trigger the model prediction accuracy calculation.

[0082] In this implementation, when evaluating the prediction capability of the target photovoltaic power generation prediction model, it can also be achieved by evaluating the prediction accuracy, specifically:

[0083] Obtaining the actual power generation value of the target photovoltaic power generation prediction model in each time period to be predicted before the time for retraining the model arrives;

[0084] Calculate the prediction accuracy of the target photovoltaic power generation prediction model by using all power generation prediction values ​​and all power generation true values ​​output by the target photovoltaic power generation prediction model before the time for retraining the model arrives;

[0085] Determine whether the prediction accuracy is greater than a preset accuracy threshold, and determine whether to trigger a model retraining service based on the result of the determination.

[0086] The calculation formula of the prediction accuracy is:

[0087]

[0088] Among them, p i is the historical power generation at time t, p i , is the predicted value at time t.

[0089] For example, the prediction accuracy of the model in a month is calculated through the prediction accuracy calculation formula. If the accuracy is lower than the set threshold, the prediction service is informed to retrain the model. After the model is trained, the benchmark data is also needed to test the prediction ability.

[0090] In another feasible implementation, the test sample can be used to realize the calculation of prediction accuracy, that is, the test sample is input into the photovoltaic power generation prediction model for power generation prediction to obtain T prediction values; based on the T prediction values ​​and T historical power generation powers, the prediction accuracy of the target photovoltaic power generation prediction model within a cycle is calculated.

[0091] If the prediction accuracy does not reach the preset accuracy threshold, the model retraining service is triggered to retrain the photovoltaic power generation prediction model.

[0092] The retraining is specifically carried out by obtaining samples of photovoltaic equipment power generation data through the above-mentioned data cleaning, obtaining real-time weather through weather services, and comprehensively obtaining new training samples, and then retraining is carried out based on the new training samples.

[0093] 290. Determine whether the second preset time has arrived, and determine whether to trigger the model retraining service based on the result of the determination.

[0094] Specifically, by judging whether the second preset time has arrived, wherein the second preset time is the time for triggering the retraining of the model and is less than the first preset time; if so, a number of the training samples are updated based on the actual value of power generation in each time period to be predicted, and the model is retrained based on the updated training samples.

[0095] It should be noted that while determining whether to trigger the model retraining service based on the prediction accuracy, the timer continues to count. When the timing reaches the second preset time T1, the model is trained using the training samples, that is, returning to step 220, and then the test samples are used to predict the models obtained twice before and after, and the accuracy is calculated. If the accuracy is greater than the accuracy of the model obtained last time, the model is updated, otherwise it is not updated.

[0096] In another feasible implementation, after the photovoltaic power generation prediction model is trained, the method further includes:

[0097] Real-time monitoring of sample capacity means that the training samples of the model set here are continuously constructed and increased. When the capacity increases to a certain level, the model training process will be restarted.

[0098] It can be understood that by detecting whether the number of training samples in the sample set increases to the next capacity level; if so, performing model training based on the increased training samples to obtain a candidate photovoltaic power generation prediction model; respectively calculating the standard deviation of the photovoltaic power generation prediction model and the candidate photovoltaic power generation prediction model when predicting photovoltaic power generation; if the standard deviation of the candidate photovoltaic power generation prediction model is not greater than the standard deviation of the photovoltaic power generation prediction model, the candidate photovoltaic power generation prediction model is used as the photovoltaic power generation prediction model.

[0099] In summary, the method provided by this application can automatically select the appropriate algorithm through automatic machine learning technology and can automatically evaluate and calculate the prediction accuracy of the prediction model in real time. When the accuracy decreases, the model training is automatically triggered. If the accuracy of the new model is higher, the model is automatically updated. At the same time, it also has a timed update mechanism. The two mechanisms can maximize the guarantee of the optimal model and the highest accuracy of the prediction results, solving the problem of low accuracy of photovoltaic power generation prediction provided by the prior art.

[0100] For the above method, the present application also provides a photovoltaic power generation prediction device, see Figure 5 and 6 As shown, the device comprises:

[0101] An acquisition module 510 is used to acquire historical power generation data of photovoltaic equipment and corresponding historical weather data, and construct a sample set, wherein the sample set includes a test sample and a plurality of training samples;

[0102] A training module 520 is used to use automatic machine learning technology to perform model training using each of the training samples;

[0103] The first calculation module 530 is used to calculate the prediction capability value of the model obtained by each training according to the test sample; and determine the target photovoltaic power generation prediction model according to the prediction capability value of the model obtained by the current training moment and the prediction capability value of the model obtained by the previous training moment;

[0104] The prediction module 540 is used to obtain weather data of a time period to be predicted and input it into the target photovoltaic power generation prediction model to predict the power generation prediction value of the time period to be predicted;

[0105] The second calculation module 550 is used to calculate the prediction accuracy of the target photovoltaic power generation prediction model according to each of the power generation prediction values ​​and the corresponding actual power generation values ​​when the first preset time arrives, and trigger the model retraining service based on the prediction accuracy, wherein the first preset time is the time to trigger the model prediction accuracy calculation.

[0106] Optionally, the acquisition module 510 includes:

[0107] The collection unit 511 is used to collect historical power generation data of the photovoltaic equipment and record historical weather data of the corresponding historical time period by means of data service subscription;

[0108] A cleaning unit 512, used for cleaning the historical power generation data to obtain complete historical power generation data;

[0109] The construction unit 513 is used to construct a plurality of sample data based on the complete historical power generation data and the historical weather data, and divide the plurality of sample data into training samples and test samples according to a preset ratio to obtain a sample set.

[0110] Optionally, the cleaning unit 512 is specifically used for:

[0111] Dividing the historical power generation data into multiple data segments, wherein each data segment includes the historical power generation of t time periods;

[0112] An average value is taken for the power generation in each data segment, and each data segment is cleaned based on the average value to obtain complete historical power generation data.

[0113] Optionally, the cleaning unit 512 is specifically used for:

[0114] Selecting a target data segment from a plurality of data segments based on the average value, wherein the target data segment is a data segment with abnormal or missing power generation;

[0115] Based on the normal distribution relationship between solar irradiance and power generation, the abnormal power generation in the target data segment is cleaned up by using the 3σ criterion;

[0116] The missing power generation in the target data segment is filled by using the third-order B-spline curve interpolation method to obtain complete historical power generation data.

[0117] Optionally, the training module 520 includes:

[0118] A selection unit 521 is used to select a target machine learning algorithm from a plurality of preset machine learning algorithms using automatic machine learning technology, and to determine hyperparameters of a prediction model;

[0119] The first training unit 522 is used to perform training based on the target machine learning algorithm and the hyperparameters using each of the training samples to obtain a photovoltaic power generation prediction model.

[0120] Optionally, the first calculation module 530 includes:

[0121] A testing unit 531 is used to input the test sample into the photovoltaic power generation prediction model trained at the current moment to perform multiple power generation predictions to obtain multiple prediction values;

[0122] The first calculation unit 532 is used to calculate the standard deviation between the multiple predicted values ​​and the historical power generation in the test sample, and determine the prediction capability value of the photovoltaic power generation prediction model based on the standard deviation.

[0123] Optionally, the calculation formula of the standard deviation is:

[0124]

[0125] Where δ is the standard deviation, is the predicted value, is the historical power generation, and n is the number of predictions.

[0126] Optionally, the second calculation module 550 includes:

[0127] An acquisition unit 551 is used to acquire the actual power generation value of the target photovoltaic power generation prediction model in each time period to be predicted before the time for retraining the model arrives;

[0128] The second calculation unit 552 is used to calculate the prediction accuracy of the target photovoltaic power generation prediction model by using all power generation prediction values ​​and all power generation real values ​​output by the target photovoltaic power generation prediction model before the time of retraining the model arrives;

[0129] The judgment unit 553 is used to judge whether the prediction accuracy is greater than a preset accuracy threshold, and determine whether to trigger the model retraining service based on the judgment result.

[0130] Optionally, the calculation formula for the prediction accuracy is:

[0131]

[0132] Among them, p i is the historical power generation at time t, p i , is the predicted value at time t.

[0133] Optionally, the judgment unit 553 is also used to judge whether a second preset time has arrived, wherein the second preset time is the time for triggering model retraining and is less than the first preset time; if so, a number of the training samples are updated based on the actual value of power generation in each time period to be predicted, and the model is retrained based on the updated training samples.

[0134] By implementing the device provided above, by utilizing automatic machine learning technology and evaluating the predictive ability of the photovoltaic power generation prediction model, it is possible to select appropriate parameters to construct the prediction model. At the same time, the model can be updated according to the evaluation results to ensure the accuracy of the photovoltaic power generation prediction.

[0135] See also Figure 7 As shown, the electronic device includes a processor 700 and a memory 701 , wherein the memory 701 stores machine executable instructions that can be executed by the processor 700 , and the processor 700 executes the machine executable instructions to implement the photovoltaic power generation prediction method provided in the above embodiment.

[0136] Further, Figure 7 The electronic device shown further includes a bus 702 and a communication interface 703 , and the processor 700 , the communication interface 703 and the memory 701 are connected via the bus 702 .

[0137] The memory 701 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 703 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 702 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0138] The processor 700 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 700. The above processor 700 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 701, and the processor 700 reads the information in the memory 701 and completes the steps of the method of the above embodiment in combination with its hardware.

[0139] This embodiment also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the photovoltaic power generation prediction method provided in the above embodiment.

[0140] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0141] In addition, in the description of the embodiments of the present application, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.

[0142] In the description of the present application, the terms “first”, “second” and “third” are used for descriptive purposes only and should not be understood as indicating or implying relative importance.

[0143] Finally, it should be noted that the above embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art who is familiar with the technical field can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A photovoltaic power generation prediction method, characterized in that: The method comprises: Acquire historical power generation data of photovoltaic equipment and corresponding historical weather data, and construct a sample set, wherein the sample set includes a test sample and a plurality of training samples; Using automatic machine learning technology, using each of the training samples to perform model training, and calculating the prediction ability value of the model obtained from each training according to the test samples; Determine the target photovoltaic power generation prediction model by comparing the prediction capability value of the model trained at the current moment with the prediction capability value of the model trained at the previous moment; Acquire weather data for a time period to be predicted and input it into the target photovoltaic power generation prediction model to predict a power generation prediction value for the time period to be predicted; When the first preset time arrives, the prediction accuracy of the target photovoltaic power generation prediction model is calculated according to each of the power generation prediction values ​​and the corresponding actual power generation values, and the model retraining service is triggered based on the prediction accuracy, wherein the first preset time is the time for triggering the model prediction accuracy calculation.

2. The photovoltaic power generation prediction method according to claim 1, characterized in that: The step of acquiring historical power generation data of photovoltaic equipment and corresponding historical weather data and constructing a sample set includes: Through data service subscription, the historical power generation data of photovoltaic equipment is collected, and the historical weather data of the corresponding historical time period is recorded; Cleaning the historical power generation data to obtain complete historical power generation data; A plurality of sample data are constructed based on the complete historical power generation data and the historical weather data, and the plurality of sample data are divided into training samples and test samples according to a preset ratio to obtain a sample set.

3. The photovoltaic power generation prediction method according to claim 2, characterized in that: The cleaning of the historical power generation data to obtain complete historical power generation data includes: Dividing the historical power generation data into multiple data segments, wherein each data segment includes the historical power generation of t time periods; An average value is taken for the power generation in each data segment, and each data segment is cleaned based on the average value to obtain complete historical power generation data.

4. The photovoltaic power generation prediction method according to claim 3, characterized in that: The data segments are cleaned based on the average value to obtain complete historical power generation data, including: Selecting a target data segment from a plurality of data segments based on the average value, wherein the target data segment is a data segment with abnormal or missing power generation; Based on the normal distribution relationship between solar irradiance and power generation, the abnormal power generation in the target data segment is cleaned up by using the 3σ criterion; The missing power generation in the target data segment is filled by using the third-order B-spline curve interpolation method to obtain complete historical power generation data.

5. The photovoltaic power generation prediction method according to any one of claims 1 to 4, characterized in that: The automatic machine learning technology is used to train the plurality of training samples to obtain a photovoltaic power generation prediction model, including: Use automatic machine learning technology to select a target machine learning algorithm from multiple preset machine learning algorithms and determine the hyperparameters of the prediction model; Based on the target machine learning algorithm and the hyperparameters, training is performed using each of the training samples to obtain a photovoltaic power generation prediction model.

6. The photovoltaic power generation prediction method according to any one of claims 1 to 4, characterized in that: The calculating the prediction capability value of the model obtained from each training according to the test sample comprises: Inputting the test sample into the photovoltaic power generation prediction model trained at the current moment to perform multiple power generation predictions to obtain multiple prediction values; The standard deviations between the plurality of predicted values ​​and the historical power generation in the test sample are calculated, and the prediction capability value of the photovoltaic power generation prediction model is determined based on the standard deviations.

7. The photovoltaic power generation prediction method according to claim 6, characterized in that: The calculation formula of the standard deviation is: Where δ is the standard deviation, is the predicted value, is the historical power generation, and n is the number of predictions.

8. The photovoltaic power generation prediction method according to any one of claims 1 to 4, characterized in that: The calculating the prediction accuracy of the target photovoltaic power generation prediction model according to each of the power generation prediction values ​​and the corresponding actual power generation value, and triggering the model retraining service based on the prediction accuracy, includes: Obtaining the actual power generation value of the target photovoltaic power generation prediction model in each time period to be predicted before the time for retraining the model arrives; Calculate the prediction accuracy of the target photovoltaic power generation prediction model by using all power generation prediction values ​​and all power generation true values ​​output by the target photovoltaic power generation prediction model before the time for retraining the model arrives; Determine whether the prediction accuracy is greater than a preset accuracy threshold, and determine whether to trigger a model retraining service based on the result of the determination.

9. The photovoltaic power generation prediction method according to claim 8, characterized in that: The calculation formula for the prediction accuracy is: Among them, p i is the historical power generation at time t, p i , is the predicted value at time t.

10. The photovoltaic power generation prediction method according to claim 8, characterized in that: After calculating the prediction accuracy of the target photovoltaic power generation prediction model according to each of the power generation prediction values ​​and the corresponding power generation actual values, and triggering the model retraining service based on the prediction accuracy, the method further includes: Determine whether a second preset time has arrived, wherein the second preset time is the time for triggering model retraining and is less than the first preset time; If so, a number of the training samples are updated based on the actual value of power generation in each time period to be predicted, and the model training is re-performed based on the updated training samples.

11. A photovoltaic power generation prediction device, characterized in that: The device comprises: An acquisition module, used to acquire historical power generation data of photovoltaic equipment and corresponding historical weather data, and construct a sample set, wherein the sample set includes a test sample and a plurality of training samples; A training module, used to use automatic machine learning technology to perform model training using each of the training samples; A first calculation module is used to calculate the prediction capability value of the model obtained by each training according to the test sample; and determine the target photovoltaic power generation prediction model according to the prediction capability value of the model obtained by training at the current moment and the prediction capability value of the model obtained by training at the previous moment; A prediction module is used to obtain weather data for a time period to be predicted and input it into the target photovoltaic power generation prediction model to predict the power generation prediction value for the time period to be predicted; The second calculation module is used to calculate the prediction accuracy of the target photovoltaic power generation prediction model according to each of the power generation prediction values ​​and the corresponding actual power generation values ​​when the first preset time arrives, and trigger the model retraining service based on the prediction accuracy, wherein the first preset time is the time to trigger the model prediction accuracy calculation.

12. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores executable instructions that can be executed by the processor, and the processor executes the executable instructions to implement the photovoltaic power generation prediction method according to any one of claims 1 to 10.

13. A readable storage medium, characterized in that: The readable storage medium stores executable instructions. When the executable instructions are called and executed by a processor, the machine executable instructions prompt the processor to implement the photovoltaic power generation prediction method according to any one of claims 1 to 10.