Photovoltaic power generation data prediction method, system and equipment based on integrated learning
The ensemble learning method with genetic and exhaustive algorithms improves photovoltaic power generation prediction accuracy and stability by optimizing weight ratios among base learners, addressing the inefficiencies of traditional methods.
Patent Information
- Application Number
- CN202411045823.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-12-13
AI Technical Summary
Traditional photovoltaic power generation prediction methods suffer from low accuracy and efficiency, particularly in handling complex changes and abnormal situations, leading to unstable power system operations.
A photovoltaic power generation data prediction method based on ensemble learning, utilizing a genetic algorithm and exhaustive algorithm to determine weight ratios for base learners, integrating their prediction data to improve accuracy and stability.
Enhances photovoltaic power generation prediction accuracy and reduces time consumption, ensuring stable distribution network operations by optimizing weight ratios and reducing overfitting and data variance.
Smart Images

Figure CN119134272A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of distribution network operation analysis and control, and specifically to a photovoltaic power generation data prediction method, system and equipment based on ensemble learning. Background Art
[0002] The construction of a new power system is an important part of building a new power system with new energy as the main body. The proportion of photovoltaic power generation in the new power system is increasing year by year, and the stable operation of the power system is closely related to photovoltaic power generation. Traditional photovoltaic output forecasting is mostly a single output forecast, and its ability to cope with complex changes in photovoltaic power stations is relatively weak. Distributed photovoltaics are in a stage of rapid development, with high reliability and good scalability, and can better cope with abnormal situations in photovoltaic power station output forecasts. Therefore, the research on distributed photovoltaic power generation output forecasting is in the ascendant.
[0003] Traditional photovoltaic power generation prediction methods usually use weather forecast data and photovoltaic power generation physical principles to establish mathematical models for solution. Abnormal situations such as extreme weather and staff misoperation will lead to deviations in data prediction, resulting in low photovoltaic prediction accuracy. At present, photovoltaic power generation prediction is more often solved in combination with machine learning. Information such as photovoltaic power generation and weather data is input into the trained machine learning model for data prediction. Common machine learning models include vector machines and decision trees. As an excellent technical framework, ensemble learning can combine several machine learning algorithms with extended data prediction algorithms to build multiple "base learners" and integrate each learner through a certain strategy to achieve better data prediction results. The most widely used ensemble learning framework methods include Bagging guided aggregation algorithm, Boosting method and Stacking generalization method.
[0004] The traditional Bagging integration framework includes the mean method, the weight method, etc. Its advantages are that the base learners do not interfere with each other and are in line with the application characteristics of distributed photovoltaics. However, the use of the mean method for data integration cannot reasonably utilize the characteristics of each base learner, resulting in the final result being flattened. When using the Bagging algorithm for data integration prediction and analysis, the prediction data of different base learners may have different degrees of deviation on the final prediction data. If only the voting method is used for data integration, it is possible to exclude the influence of the base learners that are beneficial to the final prediction data, making the final prediction data biased towards a single high-accuracy data, which means that the base learners that may have a positive impact on the final prediction result are abandoned. The mean method improves the accuracy of the prediction to a certain extent, and combines multiple base learners to predict the final data, so that the final prediction data combines the advantages of each base learner to a certain extent, reduces the variance of the prediction data, and further eliminates the interference of abnormal data.
[0005] Therefore, the low accuracy and efficiency of photovoltaic power generation prediction and the unstable operation of the power system are problems that need to be solved urgently. Summary of the invention
[0006] In order to solve the problems of low photovoltaic power generation prediction accuracy and efficiency and unstable power system operation in the prior art, this application proposes a photovoltaic power generation data prediction method based on ensemble learning, including:
[0007] Based on the photovoltaic power generation data set obtained at the current moment, calculation is performed in combination with each base learner to obtain the prediction data of each base learner at the next moment;
[0008] Based on the photovoltaic power generation data set at the current moment, a genetic algorithm and an exhaustive algorithm are used to calculate to obtain a weight ratio of each base learner;
[0009] Based on the prediction data of each base learner at the next moment and the weight ratio of each base learner, data integration is performed to obtain a photovoltaic power generation prediction data set at the next moment.
[0010] Preferably, the photovoltaic power generation data set acquired at the current moment is combined with each base learner to perform calculations to obtain prediction data of each base learner at the next moment, including:
[0011] Dividing the photovoltaic power generation data set at the current moment into a plurality of sub-data sets;
[0012] Based on the plurality of sub-data sets, a sub-data set is randomly extracted and input into each base learner for prediction, so as to obtain prediction data of each base learner at the next moment;
[0013] Wherein, each base learner is trained based on the photovoltaic power generation historical data set combined with each data prediction algorithm.
[0014] Preferably, the original photovoltaic power generation data set based on the current moment is calculated using a genetic algorithm and an exhaustive algorithm to obtain a weight ratio of each base learner, including:
[0015] Based on the photovoltaic power generation data set at the current moment, a range of weight ratios of each base learner is calculated using a genetic algorithm;
[0016] Based on the range of the weight ratio of each base learner, an exhaustive algorithm is used to enumerate and calculate the fitness function of each weight combination to obtain the fitness function value of each weight combination;
[0017] Based on the fitness function values of the weight combinations, a weight combination with the largest fitness function value is selected as the weight ratio of each base learner.
[0018] Preferably, the weight ratio range of each base learner calculated by using a genetic algorithm based on the photovoltaic power generation data set at the current moment includes:
[0019] Based on the genetic algorithm with set parameters and initial weight ratios, iterative calculations of selection, crossover and mutation operations are performed in combination with the photovoltaic power generation data set at the current moment, and a fitness function value is calculated using the fitness function;
[0020] Until the number of iterations reaches the set value, the range of the weight ratio of each base learner is determined according to the fitness function value.
[0021] Preferably, the prediction data of each base learner at the next moment is combined with the weight ratio of each base learner to perform data integration to obtain a photovoltaic power generation prediction data set at the next moment, including:
[0022] The predicted data of each base learner at the next moment are added to the product of the weight ratio of each base learner to obtain a photovoltaic power generation prediction data set at the next moment.
[0023] Preferably, the photovoltaic power generation data set at the current moment includes: one or more of photovoltaic power generation data and weather information data of the site.
[0024] Preferably, the parameters include: one or more of the number of populations per generation, fitness function, crossover rate, mutation rate, evolutionary generations and evolutionary step length.
[0025] Based on the same application concept, this application also proposes a photovoltaic power generation data prediction system based on integrated learning, including:
[0026] The base learner prediction module is used to calculate based on the photovoltaic power generation data set obtained at the current moment in combination with each base learner to obtain the prediction data of each base learner at the next moment;
[0027] A weight ratio calculation module, used to calculate the weight ratio of each base learner by using a genetic algorithm and an exhaustive algorithm based on the photovoltaic power generation data set at the current moment;
[0028] The photovoltaic power generation prediction module is used to perform data integration based on the prediction data of each base learner at the next moment in combination with the weight ratio of each base learner to obtain the photovoltaic power generation prediction data set at the next moment.
[0029] Preferably, the base learner prediction module is specifically used for:
[0030] Dividing the photovoltaic power generation data set at the current moment into a plurality of sub-data sets;
[0031] Based on the plurality of sub-data sets, a sub-data set is randomly extracted and input into each base learner for prediction, so as to obtain prediction data of each base learner at the next moment;
[0032] Wherein, each base learner is trained based on the photovoltaic power generation historical data set combined with each data prediction algorithm.
[0033] Preferably, the weight ratio calculation module includes:
[0034] A weight ratio range calculation submodule, used for calculating the weight ratio range of each base learner by using a genetic algorithm based on the photovoltaic power generation data set at the current moment;
[0035] A fitness function calculation submodule, used for enumerating and calculating the fitness function of each weight combination by using an exhaustive algorithm based on the range of the weight ratio of each base learner, to obtain the fitness function value of each weight combination;
[0036] The optimal weight ratio determination submodule is used to select the weight combination with the largest fitness function value as the weight ratio of each base learner based on the fitness function values of the weight combinations.
[0037] Preferably, the weight ratio range calculation submodule is specifically used for:
[0038] Based on the genetic algorithm with set parameters and initial weight ratios, iterative calculations of selection, crossover and mutation operations are performed in combination with the photovoltaic power generation data set at the current moment, and a fitness function value is calculated using the fitness function;
[0039] Until the number of iterations reaches the set value, the range of the weight ratio of each base learner is determined according to the fitness function value.
[0040] Preferably, the photovoltaic power generation prediction module is specifically used for:
[0041] The predicted data of each base learner at the next moment are added to the product of the weight ratio of each base learner to obtain a photovoltaic power generation prediction data set at the next moment.
[0042] Preferably, the photovoltaic power generation data set at the current moment in the base learner prediction module and the weight ratio calculation module includes: one or more of photovoltaic power generation power data and weather information data of the site.
[0043] Preferably, the parameters in the weight ratio range calculation submodule include: one or more of the number of populations per generation, fitness function, crossover rate, mutation rate, evolutionary generations and evolutionary step length.
[0044] On the other hand, the present application also proposes an electronic device, comprising: at least one processor and a memory; the memory and the processor are connected via a bus;
[0045] The memory is used to store one or more programs;
[0046] When the one or more programs are executed by the at least one processor, a photovoltaic power generation data prediction method based on ensemble learning as described above is implemented.
[0047] On the other hand, the present application also proposes a readable storage medium having an execution program stored thereon, and when the execution program is executed, a photovoltaic power generation data prediction method based on ensemble learning as described above is implemented.
[0048] Compared with the prior art, the beneficial effects of this application are:
[0049] A photovoltaic power generation data prediction method, system and device based on integrated learning include: based on the photovoltaic power generation data set acquired at the current moment, calculation is performed in combination with each base learner to obtain the prediction data of each base learner at the next moment; based on the photovoltaic power generation data set at the current moment, a genetic algorithm and an exhaustive algorithm are used to calculate to obtain the weight ratio of each base learner; based on the prediction data of each base learner at the next moment, data integration is performed in combination with the weight ratio of each base learner to obtain the photovoltaic power generation prediction data set at the next moment; the application adopts a genetic algorithm and an exhaustive algorithm to determine the weight ratio, which reduces the time consumption of weight selection, improves the efficiency and accuracy of distributed photovoltaic power generation prediction, and ensures the stable operation of the distribution network; the application uses the weight ratio of each base learner to perform data integration, reduces the occurrence of overfitting, reduces data variance, and further improves the similarity between the final prediction data and the real data;
[0050] The present application integrates multiple data prediction algorithms through multiple base learners and weight ratios, which helps different data prediction algorithms to give full play to their respective advantages, reduce generalization errors, and improve the stability of data prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is a flow chart of the integrated learning Bagging algorithm for this application;
[0052] Figure 2 This is a flow chart of a photovoltaic power generation data prediction method based on ensemble learning in this application;
[0053] Figure 3 A schematic diagram of the parameters required for algorithm improvement in this application;
[0054] Figure 4 This is a schematic diagram of the algorithm flow of this application;
[0055] Figure 5 This is a structure diagram of a photovoltaic power generation data prediction system based on ensemble learning in this application;
[0056] Figure 6 A diagram of an electronic device for the present application. DETAILED DESCRIPTION
[0057] Based on the Bagging integrated framework, a strong photovoltaic power generation prediction system containing several prediction algorithms and models is constructed. After collecting sufficient photovoltaic power generation prediction data, each prediction model is used for data training to finally obtain a single prediction data set. A single prediction model and method may cause large data prediction errors and affect the prediction results. Therefore, after obtaining the prediction data sets of each base learner, a weight method is used for data integration. This application improves the Bagging integrated framework, focusing on how to more efficiently obtain a reasonable weight ratio between different base learners, so as to better predict photovoltaic power generation data and reduce the volatility of the distribution network operation process. The flowchart of the integrated learning Bagging algorithm is shown below. Figure 1 shown.
[0058] The present application combines genetic algorithms and exhaustive algorithms to provide a photovoltaic power generation data prediction method based on ensemble learning, fully utilizing the advantages of genetic algorithms and exhaustive algorithms in searching for optimal solutions, and combining the characteristics of the Bagging algorithm. Through operations such as crossover, mutation, and exhaustive enumeration, the search range of the weight ratio is narrowed, and efficient search for the weight ratio of photovoltaic power generation prediction based on ensemble learning is achieved, so that the data of short-term photovoltaic output prediction has higher accuracy and the operation control capability of the distribution network is improved. In order to better understand the present application, the content of the present application is further explained below in conjunction with the drawings and embodiments of the specification.
[0059] Embodiment 1:
[0060] A photovoltaic power generation data prediction method based on ensemble learning, the specific process is as follows Figure 2 As shown, including:
[0061] Step 1, based on the photovoltaic power generation data set obtained at the current moment, combined with each base learner, calculation is performed to obtain the prediction data of each base learner at the next moment;
[0062] Step 2, using a genetic algorithm and an exhaustive algorithm to calculate based on the photovoltaic power generation data set at the current moment, to obtain a weight ratio of each base learner;
[0063] Step 3: Perform data integration based on the prediction data of each base learner at the next moment in combination with the weight ratio of each base learner to obtain a photovoltaic power generation prediction data set at the next moment.
[0064] In step 1, the photovoltaic power generation data set obtained at the current moment is combined with each base learner to perform calculations to obtain the prediction data of each base learner at the next moment, specifically including:
[0065] Get the photovoltaic power generation data set at the current moment;
[0066] The photovoltaic power generation data set includes: photovoltaic power generation data and weather information data of the corresponding site.
[0067] The photovoltaic power generation data set at the current moment is divided into several sub-data sets, and each base learner is used for calculation to obtain the prediction data of each base learner at the next moment, as shown in the following formula:
[0068] d all ={d1,d2,d3…d n}
[0069] Where, d all is the data set of each base learner; d1 is the data of the first base learner; d2 is the data of the second base learner; d3 is the data of the third base learner; n is the data of the nth base learner; n is the number of base learners.
[0070] Each base learner is trained using the photovoltaic power generation historical data set combined with a single prediction algorithm.
[0071] In step 2, the weight ratio of each base learner is obtained by calculating using a genetic algorithm and an exhaustive algorithm based on the photovoltaic power generation data set at the current moment, specifically including:
[0072] When selecting the optimal weight ratio, we first use a genetic algorithm to set the parameters of the genetic algorithm, determine the specific content of the fitness function, the number of iterations, the crossover rate, the mutation rate, and the initial population size, and estimate the general range of weight distribution. After iterative evolution obtains a more accurate weight distribution range, we then use an exhaustive algorithm to enumerate the weight combinations within the range in order to obtain the most appropriate weight distribution ratio.
[0073] First, set the parameters required by the genetic algorithm and the exhaustive algorithm. The enumeration step and evolution step should not exceed 0.1. The relevant parameters involved are as follows: Figure 3 shown.
[0074] Use genetic algorithms to find the approximate range of the optimal weight ratio. With the help of the idea of "evolution", design the fitness function and the original population. Each original individual represents a weight ratio. Individuals may have operations such as crossover or mutation during the evolution process. The weight ratio corresponding to each individual may change, and individuals with low fitness will be eliminated and no longer participate in evolution. As evolution continues, there are more and more individuals with high fitness, that is, the corresponding weight ratio is getting closer and closer to the optimal weight ratio. By setting parameters such as evolutionary algebra, crossover rate, and mutation rate, the weight ratio can be continuously optimized and iterated, and finally the approximate range of the weight ratio can be obtained.
[0075] In the evolution process of genetic algorithms, there are many options for the design of fitness functions. The fitness function needs to be selected based on the actual situation. The general principle is to reflect the correlation between the final predicted data and the real data, such as the Pearson correlation coefficient, mean absolute error and root mean square error of the two sets of data, as shown in the following formula:
[0076]
[0077] In the formula, r P is the Pearson correlation coefficient; x i is the true value of the i-th individual in the first set of data; y i is the true value of the i-th individual in the second set of data; is the mean of the first set of data; is the mean of the second group of data; i is the number of individuals; N is the number of single group data;
[0078]
[0079] In the formula, MAE is the mean absolute error; N is the total amount of data, y i is the true value of the i-th individual, y i ′ is the predicted value of the ith individual.
[0080]
[0081] In the formula, RMSE is the root mean square error; N is the total amount of data, y i is the true value of the i-th individual, y i ′ is the predicted value of the ith individual.
[0082] For example, the Pearson correlation coefficient is widely used to measure the correlation between two sets of data, and its value ranges from -1 to 1. Therefore, the more accurate the photovoltaic power generation data prediction is and the closer the predicted data is to the real data, the larger the absolute value of the Pearson correlation coefficient is, which also means a higher fitness.
[0083] This embodiment uses the Pearson correlation coefficient as a fitness function to iteratively calculate the range of the weight ratio, and specific operations include selection, crossover, mutation, etc.
[0084] According to the obtained weight ratio range, various weight combinations are exhaustively enumerated, and the fitness function value corresponding to each weight combination is recorded;
[0085] The weight ratio with the largest fitness function value is taken as the optimal weight ratio.
[0086] In step 3, data integration is performed based on the prediction data of each base learner at the next moment combined with the weight ratio of each base learner to obtain a photovoltaic power generation prediction data set at the next moment, specifically including:
[0087] The predicted data of each base learner is added to the product of the weight ratio of each base learner to obtain a photovoltaic power generation prediction data set, as shown in the following formula:
[0088] D=d1p1+d2p2+...+d t p t +d n p n
[0089] Where D is the final predicted data value; d1 is the data of the first base learner; d2 is the data of the second base learner; d t is the data of the t-th base learner; d n is the data of the nth base learner; p1 is the weight ratio corresponding to the first base learner; p2 is the weight ratio corresponding to the second base learner; p t is the weight ratio corresponding to the tth base learner; p n is the weight ratio corresponding to the nth base learner; n is the number of base learners.
[0090] As we all know, the selection of different prediction algorithms and models in the process of photovoltaic power generation prediction will greatly affect the accuracy of the final prediction results, and the results of a single prediction model are prone to large errors and difficulty in reproduction. The widespread application of ensemble learning can provide a good solution. Integrating multiple prediction algorithms can reduce generalization errors and improve the stability of data prediction to a certain extent. This application uses genetic algorithms and exhaustive algorithms to optimize the integration method, such as Figure 4 As shown, it is more convenient, efficient and accurate to find the optimal weight ratio corresponding to a single base learner to achieve the purpose of reducing errors, which can effectively improve the data prediction accuracy of photovoltaic power generation.
[0091] This application proposes a photovoltaic power generation data prediction method based on ensemble learning, which can flexibly combine different data prediction algorithms to integrate strong learners and effectively improve the operation and control efficiency of the distribution network. This method is conducive to different data prediction algorithms to give full play to their respective advantages, and the most appropriate prediction algorithm can be selected for combination according to different application scenarios. The ensemble learning framework based on the mean method integrates the data by averaging, which is not enough to highlight the characteristics of the data predicted by each base learner; this application improves on the basis of the mean integration method, and approaches the optimal weight as much as possible through genetic algorithms and exhaustive algorithms. A reasonable weight ratio can reduce the occurrence of overfitting and reduce data variance, further improving the similarity between the final predicted data and the real data, and improving the accuracy of the final photovoltaic power generation prediction data.
[0092] In addition, the weight selection strategy of the present invention, which combines the genetic algorithm with the exhaustive algorithm, can further reduce the time consumption of weight selection, thereby improving the efficiency and accuracy of distributed photovoltaic power generation prediction and ensuring the stable operation of the distribution network.
[0093] Embodiment 2:
[0094] A photovoltaic power generation data prediction system based on ensemble learning, the structure is as follows Figure 5 As shown, including:
[0095] The base learner prediction module is used to calculate based on the photovoltaic power generation data set obtained at the current moment in combination with each base learner to obtain the prediction data of each base learner at the next moment;
[0096] A weight ratio calculation module, used to calculate the weight ratio of each base learner by using a genetic algorithm and an exhaustive algorithm based on the photovoltaic power generation data set at the current moment;
[0097] The photovoltaic power generation prediction module is used to perform data integration based on the prediction data of each base learner at the next moment in combination with the weight ratio of each base learner to obtain the photovoltaic power generation prediction data set at the next moment.
[0098] The base learner prediction module is specifically used for:
[0099] Dividing the photovoltaic power generation data set at the current moment into a plurality of sub-data sets;
[0100] Based on the plurality of sub-data sets, a sub-data set is randomly extracted and input into each base learner for prediction, so as to obtain prediction data of each base learner at the next moment;
[0101] Wherein, each base learner is trained based on the photovoltaic power generation historical data set combined with each data prediction algorithm.
[0102] Weight ratio calculation module, including:
[0103] A weight ratio range calculation submodule, used for calculating the weight ratio range of each base learner by using a genetic algorithm based on the photovoltaic power generation data set at the current moment;
[0104] A fitness function calculation submodule, used for enumerating and calculating the fitness function of each weight combination by using an exhaustive algorithm based on the range of the weight ratio of each base learner, to obtain the fitness function value of each weight combination;
[0105] The optimal weight ratio determination submodule is used to select the weight combination with the largest fitness function value as the weight ratio of each base learner based on the fitness function values of the weight combinations.
[0106] The weight ratio range calculation submodule is specifically used for:
[0107] Based on the genetic algorithm with set parameters and initial weight ratios, iterative calculations of selection, crossover and mutation operations are performed in combination with the photovoltaic power generation data set at the current moment, and a fitness function value is calculated using the fitness function;
[0108] Until the number of iterations reaches the set value, the range of the weight ratio of each base learner is determined according to the fitness function value.
[0109] Photovoltaic power generation prediction module is specifically used for:
[0110] The predicted data of each base learner at the next moment are added to the product of the weight ratio of each base learner to obtain a photovoltaic power generation prediction data set at the next moment.
[0111] The photovoltaic power generation data set at the current moment in the base learner prediction module and the weight ratio calculation module includes: one or more of photovoltaic power generation power data and weather information data of the site.
[0112] The parameters in the weight ratio range calculation submodule include: one or more of the number of populations per generation, fitness function, crossover rate, mutation rate, evolutionary generations and evolutionary step length.
[0113] This application focuses on the integrated learning method for predicting photovoltaic power generation data in distribution networks. Genetic algorithms and exhaustive algorithms are applied in the process of finding the optimal weight ratio, and the weights are continuously and dynamically adjusted to make the final predicted data closer to the actual photovoltaic data, thereby improving the accuracy of photovoltaic power generation prediction and maintaining the stability of distribution network operation control.
[0114] This application introduces a genetic algorithm to define the approximate range of the optimal weight ratio when looking for the weights corresponding to each base learner in the Bagging algorithm. After determining the better weight benchmark corresponding to each base learner, the actual situation of the application is considered, the range of variation of the given weight is given, and then the exhaustive algorithm is used to enumerate the weight combination within the range to approximate more accurate prediction data. On the one hand, in the process of using the genetic algorithm for iteration, it is generally evolving in the direction of a more optimal solution, and the approximate range of the optimal solution can be determined. But on the other hand, due to the certain probability of errors caused by operations such as crossover and mutation, evolution may fall into a dead loop of the local optimal solution, making it impossible to have an optimal solution within a limited time. At this time, the introduction of an exhaustive algorithm for algorithm optimization can alleviate this dilemma. The exhaustive algorithm can arrange and combine the weights of the approximate range and enumerate various possibilities, so that the optimal solution will not fall into the dilemma of the local optimal solution. Enumerating the weight combination of a specific range can also reduce the fatal problem of the exhaustive algorithm itself being too large in computational effort and low in solution efficiency.
[0115] Embodiment 3:
[0116] like Figure 6 As shown, the present invention also provides an electronic device, which may be a computer device, a single-chip device, an intelligent mobile device, etc. The electronic device in this embodiment may include a processor, a memory, a transceiver component, etc. The memory, the processor, and the transceiver component are connected via a bus; the memory may be used to store an execution program, and an exemplary execution program may include instructions; the processor is used to execute the instructions stored in the memory. The memory may also be used to store data, which may be called and / or modified when the instructions are executed.
[0117] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in a storage medium to implement the corresponding method flow or corresponding functions, so as to implement the steps of a photovoltaic power generation data prediction method based on integrated learning in the above-mentioned embodiment.
[0118] Embodiment 4:
[0119] Based on the same inventive concept, the present invention also provides a readable storage medium, specifically an electronic device readable storage medium (Memory), which is a memory device in an electronic device for storing programs and data. It can be understood that the storage medium here can include both built-in storage media in electronic devices and, of course, extended storage media supported by electronic devices. The storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by a processor are also stored in the storage space, and these instructions can be one or more execution programs (including program codes). It should be noted that the storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The processor loads and executes one or more instructions stored in the storage medium, which can implement the steps of a photovoltaic power generation data prediction method based on ensemble learning in the above embodiment.
[0120] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0121] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0122] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0123] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0124] The above are merely embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application are included in the scope of the claims of the present application to be approved.
Claims
1. A photovoltaic power generation data prediction method based on ensemble learning, characterized in that: include: Based on the photovoltaic power generation data set obtained at the current moment, calculation is performed in combination with each base learner to obtain the prediction data of each base learner at the next moment; Based on the photovoltaic power generation data set at the current moment, a genetic algorithm and an exhaustive algorithm are used to calculate to obtain a weight ratio of each base learner; Based on the prediction data of each base learner at the next moment and the weight ratio of each base learner, data integration is performed to obtain a photovoltaic power generation prediction data set at the next moment.
2. The method according to claim 1, characterized in that The photovoltaic power generation data set acquired at the current moment is combined with each base learner to perform calculations to obtain prediction data of each base learner at the next moment, including: Dividing the photovoltaic power generation data set at the current moment into a plurality of sub-data sets; Based on the plurality of sub-data sets, a sub-data set is randomly extracted and input into each base learner for prediction, so as to obtain prediction data of each base learner at the next moment; Wherein, each base learner is trained based on the photovoltaic power generation historical data set combined with each data prediction algorithm.
3. The method according to claim 1, characterized in that: The original photovoltaic power generation data set based on the current moment is calculated using a genetic algorithm and an exhaustive algorithm to obtain a weight ratio of each base learner, including: Based on the photovoltaic power generation data set at the current moment, a range of weight ratios of each base learner is calculated using a genetic algorithm; Based on the range of the weight ratio of each base learner, an exhaustive algorithm is used to enumerate and calculate the fitness function of each weight combination to obtain the fitness function value of each weight combination; Based on the fitness function values of the weight combinations, a weight combination with the largest fitness function value is selected as the weight ratio of each base learner.
4. The method according to claim 3, characterized in that: The range of the weight ratio of each base learner calculated by using a genetic algorithm based on the photovoltaic power generation data set at the current moment includes: Based on the genetic algorithm with set parameters and initial weight ratios, iterative calculations of selection, crossover and mutation operations are performed in combination with the photovoltaic power generation data set at the current moment, and a fitness function value is calculated using the fitness function; Until the number of iterations reaches the set value, the range of the weight ratio of each base learner is determined according to the fitness function value.
5. The method according to claim 1, characterized in that The prediction data of each base learner at the next moment is combined with the weight ratio of each base learner to perform data integration to obtain a photovoltaic power generation prediction data set at the next moment, including: The predicted data of each base learner at the next moment are added to the product of the weight ratio of each base learner to obtain a photovoltaic power generation prediction data set at the next moment.
6. The method according to claim 1, characterized in that The photovoltaic power generation data set at the current moment includes: one or more of photovoltaic power generation data and weather information data of the site.
7. The method according to claim 4, characterized in that The parameters include: one or more of the number of populations per generation, fitness function, crossover rate, mutation rate, evolutionary generations and evolutionary step length.
8. A photovoltaic power generation data prediction system based on ensemble learning, characterized in that: include: The base learner prediction module is used to calculate based on the photovoltaic power generation data set obtained at the current moment in combination with each base learner to obtain the prediction data of each base learner at the next moment; A weight ratio calculation module, used to calculate the weight ratio of each base learner by using a genetic algorithm and an exhaustive algorithm based on the photovoltaic power generation data set at the current moment; The photovoltaic power generation prediction module is used to perform data integration based on the prediction data of each base learner at the next moment in combination with the weight ratio of each base learner to obtain the photovoltaic power generation prediction data set at the next moment.
9. The system according to claim 8, characterized in that The base learner prediction module is specifically used for: Dividing the photovoltaic power generation data set at the current moment into a plurality of sub-data sets; Based on the plurality of sub-data sets, a sub-data set is randomly extracted and input into each base learner for prediction, so as to obtain prediction data of each base learner at the next moment; Wherein, each base learner is trained based on the photovoltaic power generation historical data set combined with each data prediction algorithm.
10. The system according to claim 8, characterized in that The weight ratio calculation module includes: A weight ratio range calculation submodule, used for calculating the weight ratio range of each base learner by using a genetic algorithm based on the photovoltaic power generation data set at the current moment; A fitness function calculation submodule, used for enumerating and calculating the fitness function of each weight combination by using an exhaustive algorithm based on the range of the weight ratio of each base learner, to obtain the fitness function value of each weight combination; The optimal weight ratio determination submodule is used to select the weight combination with the largest fitness function value as the weight ratio of each base learner based on the fitness function values of the weight combinations.
11. The system according to claim 10, characterized in that The weight ratio range calculation submodule is specifically used for: Based on the genetic algorithm with set parameters and initial weight ratios, iterative calculations of selection, crossover and mutation operations are performed in combination with the photovoltaic power generation data set at the current moment, and a fitness function value is calculated using the fitness function; Until the number of iterations reaches the set value, the range of the weight ratio of each base learner is determined according to the fitness function value.
12. The system according to claim 8, characterized in that The photovoltaic power generation prediction module is specifically used for: The predicted data of each base learner at the next moment are added to the product of the weight ratio of each base learner to obtain a photovoltaic power generation prediction data set at the next moment.
13. The system according to claim 8, characterized in that The photovoltaic power generation data set at the current moment in the base learner prediction module and the weight ratio calculation module includes: one or more of photovoltaic power generation power data and weather information data of the site.
14. The system according to claim 11, characterized in that The parameters in the weight ratio range calculation submodule include: one or more of the number of populations per generation, fitness function, crossover rate, mutation rate, evolutionary generations and evolutionary step length.
15. An electronic device, characterized in that: include: at least one processor and memory; The memory and the processor are connected via a bus; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, a photovoltaic power generation data prediction method based on ensemble learning as described in any one of claims 1 to 7 is implemented.
16. A readable storage medium, characterized in that: An execution program is stored thereon, and when the execution program is executed, a photovoltaic power generation data prediction method based on ensemble learning as described in any one of claims 1 to 7 is implemented.
