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

By preprocessing the weather forecast data and inputting an indefinite element regression prediction model, the problem that traditional photovoltaic power generation prediction models are difficult to adapt to weather conditions in different regions is solved, and accurate prediction of photovoltaic power generation and optimization of energy management are achieved.

CN118916849APending Publication Date: 2024-11-08四川新能源汽车创新中心有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410949119.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

Traditional photovoltaic power generation prediction models are difficult to adapt to weather conditions in different regions, resulting in inaccurate power output prediction and difficult to meet the needs of modern energy management.

Method used

By obtaining weather forecast data for several days in the future, preprocessing is performed to form a weather forecast data matrix, and inputting the trained uncertain element regression prediction model for prediction, combining historical weather and photovoltaic power generation data for fitting training, and establishing adaptive photovoltaic power generation Predictive model.

Benefits of technology

Accurate prediction of photovoltaic power generation is achieved, the adaptability and timeliness of prediction are improved, and the power supply situation can be understood in advance, and energy dispatch and management are optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916849A_ABST
    Figure CN118916849A_ABST
Patent Text Reader

Abstract

The invention relates to the field of machine learning, in particular to a photovoltaic power generation prediction method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring weather forecast data of several days in the future; preprocessing the weather forecast data to form a weather forecast data matrix; and inputting the weather forecast data matrix into a trained photovoltaic power generation prediction model for prediction to obtain predicted photovoltaic power generation output by the photovoltaic power generation prediction model. Through the weather forecast data at different times and the photovoltaic power generation prediction model, accurate prediction of the photovoltaic power generation amount is realized, and the monitoring strength of photovoltaic power generation is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In the current energy structure transformation, photovoltaic power generation is gradually becoming one of the world's major energy sources due to its clean and renewable characteristics. However, due to the intermittent and volatile nature of photovoltaic power generation, its power output is affected by many factors such as weather conditions and geographical location, which poses a challenge to the stable supply of energy. In addition, with the transformation of energy consumption structure and the complexity of power system, traditional energy management methods have been unable to meet the energy needs of modern society. Therefore, how to achieve real-time prediction of photovoltaic power generation and optimize energy scheduling and management has become an important topic in the current energy field. Traditional prediction models usually use a single model for prediction, which is not easy to adapt to weather conditions in different regions. Summary of the invention

[0003] In a first aspect, the present application provides a photovoltaic power generation prediction method, comprising:

[0004] Get weather forecast data for the next few days;

[0005] Preprocessing the weather forecast data to form a weather forecast data matrix;

[0006] The weather forecast data matrix is ​​input into a trained photovoltaic power generation prediction model for prediction, and the predicted photovoltaic power generation output by the photovoltaic power generation prediction model is obtained.

[0007] Furthermore, the weather forecast data includes discrete data and continuous data, and the weather forecast data is preprocessed to form a weather forecast data matrix, including:

[0008] Performing data cleaning and normalization processing on the weather forecast data;

[0009] Determine the discrete data in the normalized weather forecast data, convert all discrete data into dummy variables, and obtain multiple sets of matrix data;

[0010] The weather forecast data matrix is ​​obtained by splicing each group of the matrix data and the continuous data.

[0011] Further, the weather forecast data includes wind direction data, weather conditions, temperature data and humidity data;

[0012] The wind direction data and the weather conditions are discrete data, and the temperature data and the humidity are continuous data;

[0013] The discrete data in the weather forecast data are determined, and all the discrete data are converted into dummy variables to obtain multiple sets of matrix data, including:

[0014] Determine the wind direction type of the wind direction data and the weather type of the weather state, set the values ​​of the wind direction type and weather type that occurred as dummy variables corresponding to the meaning of occurrence, and set the values ​​of the wind direction type and weather type that did not occur as dummy variables corresponding to the meaning of non-occurrence;

[0015] Arranging the wind direction data and the weather conditions of the same day in rows, and arranging the wind direction types and the weather conditions in columns, to obtain wind direction matrix data of the wind direction data and weather condition matrix data of the weather conditions, respectively;

[0016] The step of splicing the matrix data and the continuous data to obtain the weather forecast data matrix includes:

[0017] The wind direction matrix data, the weather status matrix data, the temperature data and the humidity data are aligned and spliced ​​row by row to obtain a weather forecast data matrix.

[0018] Furthermore, after the weather forecast data is cleaned and normalized, the method further includes:

[0019] If there are missing values ​​in the weather forecast data of the continuous data, the trend and seasonality of the missing values ​​are predicted according to the time series smoothing method and the nearest neighbor algorithm to obtain the predicted value;

[0020] The missing values ​​are filled with the predicted values.

[0021] Furthermore, the continuous data includes temperature, and the calculation method expression of the predicted value of the temperature is:

[0022]

[0023] Where T is the predicted value of the temperature, t represents the current day, and z represents the future day. is the predicted value of the t+z period, a and b are weight coefficients respectively, X kt is the nearest temperature value within k days.

[0024] Furthermore, the training process of the photovoltaic power generation prediction model includes:

[0025] Obtain historical weather data and historical photovoltaic power generation data;

[0026] Preprocessing the historical weather data to form weather independent variable matrix data;

[0027] Establish a cluster of indeterminate regression prediction models;

[0028] The low-variable model, the model without independent variables and the model with all independent variables being 0 in the indefinite variable regression prediction model cluster are excluded to obtain a screened indefinite variable regression prediction model cluster;

[0029] The historical photovoltaic power generation data and the weather independent variable matrix data are input into the indefinite variable regression prediction model cluster for regression fitting to obtain a photovoltaic power generation prediction model.

[0030] Furthermore, after obtaining the photovoltaic power generation prediction model, the method further includes:

[0031] Separate the historical photovoltaic power generation data and the weather independent variable matrix data into test set data, and use the weather independent variable matrix data in the test set data as input to input into the photovoltaic power generation prediction model to obtain a predicted value;

[0032] The predicted value is compared with the corresponding historical photovoltaic power generation data in the test set data, the photovoltaic power generation prediction model is evaluated to obtain an evaluation result, and the photovoltaic power generation prediction model is fitted and trained according to the evaluation result, the weather independent variable matrix data and the historical photovoltaic power generation data to obtain an updated photovoltaic power generation prediction model. In a second aspect, the present application provides a photovoltaic power generation prediction device, comprising:

[0033] Data collection module, used to obtain weather forecast data for the next several days;

[0034] A data processing module, used for preprocessing the weather forecast data to form a weather forecast data matrix;

[0035] The prediction module is used to input the weather forecast data matrix into the trained photovoltaic power generation prediction model for prediction, and obtain the predicted photovoltaic power generation output by the photovoltaic power generation prediction model.

[0036] In a third aspect, the present application provides a computer device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program runs on the processor, the photovoltaic power generation prediction method is executed.

[0037] In a fourth aspect, the present application provides a readable storage medium storing a computer program, which executes the photovoltaic power generation prediction method when running on a processor.

[0038] The present invention discloses a photovoltaic power generation prediction method, which includes: obtaining weather forecast data for several days in the future; preprocessing the weather forecast data to form a weather forecast data matrix; inputting the weather forecast data matrix into a trained photovoltaic power generation prediction model for prediction, and obtaining the predicted photovoltaic power generation output by the photovoltaic power generation prediction model. The photovoltaic power generation can be predicted through the weather forecast data, and the photovoltaic power generation can be accurately predicted. The photovoltaic power generation prediction model is an indefinite variable regression prediction model, which has better adaptability and timeliness. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope of protection of the present invention. In each of the drawings, similar components are numbered similarly.

[0040] Figure 1 A schematic diagram of a photovoltaic power generation prediction method according to an embodiment of the present application is shown;

[0041] Figure 2 A schematic diagram of a training method for a photovoltaic power generation prediction model according to an embodiment of the present application is shown;

[0042] Figure 3 A schematic diagram of an indefinite variable regression model cluster according to an embodiment of the present application is shown;

[0043] Figure 4 A schematic diagram of the structure of a photovoltaic power generation prediction device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0044] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0045] The components of the embodiments of the present invention generally described and shown in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0046] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present invention, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.

[0047] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.

[0048] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present invention belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present invention.

[0049] The technical solution of the present application is applied to the application scenario of photovoltaic power generation, and in particular provides an adaptive prediction method for photovoltaic power generation. The method creates a model cluster, screens the model cluster and finally establishes a model. The multivariate prediction model is used to realize the prediction of photovoltaic power generation based on weather data, so as to reduce the weight of the variables in the model and make real-time prediction of the output power of photovoltaic power generation. The power supply situation can be understood in advance, so as to better dispatch and manage energy storage equipment.

[0050] Next, the technical solution of the present application is described with specific embodiments.

[0051] Example 1

[0052] like Figure 1 As shown, the adaptive prediction photovoltaic power generation method of this embodiment includes:

[0053] Step S100, obtaining weather forecast data for the next several days.

[0054] In this embodiment, the photovoltaic power generation is predicted, and the amount of photovoltaic power generation often depends on the weather conditions. For example, if the sunshine time is long, more power will be generated, and if the sunshine time is short, less power will be generated. At the same time, relevant data such as sunshine quality will also affect the photovoltaic power generation.

[0055] What affects the duration and quality of sunshine is the weather data of the day, so there is a correlation between weather data and photovoltaic power generation.

[0056] Moreover, this embodiment is to predict the future photovoltaic power generation, so it is necessary to obtain future weather data. In this embodiment, the weather forecast for the next few days is obtained by means of a web crawler, and the corresponding prediction operation is performed based on the weather forecast data.

[0057] Step S200, preprocessing the weather forecast data to form a weather forecast data matrix.

[0058] The types of weather forecast data include wind direction, weather conditions, temperature, humidity and other data. The wind direction can be calm, northeast, east, southeast, south, southwest, west, northwest, north, and rotating. The weather conditions can be sunny, few clouds, sunny and cloudy, cloudy, overcast, windy, calm, breeze, gentle breeze, light breeze, strong wind / hard wind, gale, heavy wind and other data. The temperature and humidity are represented by specific numerical values.

[0059] It can be seen that there are many types of data such as wind direction and weather conditions, so these types need to be set to determine which wind directions or weather conditions need to be identified and unify these data.

[0060] The weather forecast data is the morning and evening data for the next day or several days. Therefore, the data of the same day are placed in one row, and the data of the same type are placed in one column, so that each type of weather forecast data can form a data matrix.

[0061] The acquired weather forecast data needs to be preprocessed, that is, the data needs to be cleaned and normalized to remove duplicate and erroneous data and classify the data under a unified standard.

[0062] Moreover, from the above data types, there are discrete data and continuous data. Discrete data refers to the wind direction and weather conditions mentioned above. This type of data is not a numerical value, but a certain category. Snake data needs to be converted into a dummy variable.

[0063] For example, the wind direction may be a number of wind direction types, such as no wind direction, northeast, east, southeast, south, southwest, west, northwest, north, and rotationally uncertain, and the wind direction data actually obtained may only be one of these. When the corresponding wind direction type is obtained, the value of the corresponding wind direction type is set to 1, and the others are set to 0. Specifically, if yesterday's wind direction is east wind, the data in the row where yesterday's wind direction data is located and the column where the east wind is located are set to 1, and the other data in the row are 0. By analogy, the conversion of wind direction data can be completed to form wind direction matrix data. In the same way, the data of weather status can also be converted and set in the above manner to form weather status matrix data.

[0064] The temperature and humidity data are continuous data, and the corresponding data can be directly obtained through weather forecasts. Therefore, the obtained data can be directly arranged in rows to form a single-column and multi-row matrix.

[0065] After processing, multiple data matrices with the same number of rows but different numbers of columns can be obtained. By concatenating these data matrices row by row, a weather forecast data matrix that integrates all weather forecast data can be obtained.

[0066] It can be understood that the above weather forecast data matrix contains all weather forecast data, based on which the photovoltaic power generation in the next few days can be predicted.

[0067] In addition, because the weather forecast data in this embodiment comes from the Internet, there are omissions after obtaining the weather forecast data from the municipal bureau, so these missing data also need to be supplemented.

[0068] When supplementing data, it will be different depending on whether the data is discrete data or continuous data. Discrete data such as wind direction and weather conditions can be filled with the value of the previous time scale, while for continuous data such as temperature, the sequence mean is generally used to replace abnormal value processing methods while retaining the integrity of the time series. However, the change in temperature generally has a strong jump, and the temperature has a greater impact on the prediction of photovoltaic power generation, so the data cannot be simply filled according to the mean, and a comprehensive prediction based on multiple indicators is required. This embodiment will comprehensively predict the temperature value based on time series smoothing technology and the nearest neighbor algorithm.

[0069] The temperature is smoothed according to the time series smoothing method to obtain missing values. Two smoothing parameters γ and β are introduced for trend and seasonal prediction.

[0070] Trend:

[0071] S t =γ(X t -X t-1 )+(1-γ)S t-1

[0072] Seasonality:

[0073]

[0074] Prediction formula:

[0075]

[0076] Where, X t is the observed value in period t, X t-1 is the observed value in period t-1, is the predicted value of the t+z period, S t is the trend value of period t, St-1 is the trend value of the t-1 period, I t is the seasonal value of period t, I t-1 is the seasonal value of the t-1th period, t is the time when the data needs to be supplemented, and z is a number of days in the future.

[0077] In addition, the nearest neighbor algorithm is used to calculate the temperature of the k days with the most similar wind direction, wind speed, and weather conditions, and the average value is calculated to obtain the nearest neighbor calculation result value X kt Where k can be an appropriate number of days such as 5, 6, 7, etc.

[0078] Then the final temperature value T can be obtained as:

[0079]

[0080] In the formula, a and b are weight coefficients. a can be set based on experience through the weight coefficient of the predicted value of time series smoothing, and b value can be calculated through the fifth-order nearest neighbor algorithm. is the calibration value.

[0081] The temperature data calculated by the two methods have better prediction effects, and the treatment of temperature anomalies is more effective and closer to the observed value than using a single method. When calculating the temperature by smoothing the time series, predictions are made from two dimensions to finally obtain the calculated value. Trend indicators can be used as predictions of the time axis, while seasonal indicators can be used to predict the temperature from a periodic perspective, and the two values ​​are combined to obtain the smoothed value of the time series. In addition, the nearest neighbor algorithm is used to comprehensively calculate the temperature range based on external indicator data such as wind direction, wind force, and weather conditions to obtain the final value, thus completing the supplement of missing data and ensuring the integrity of the data.

[0082] In addition to the above-mentioned prediction of temperature, the same idea can be used to predict continuous data such as humidity, thereby filling in missing data.

[0083] Step S300: input the weather forecast data matrix into a trained photovoltaic power generation prediction model for prediction, and obtain the predicted photovoltaic power generation output by the photovoltaic power generation prediction model.

[0084] By inputting the weather forecast data matrix of the previous step into the trained photovoltaic power generation prediction model, the corresponding photovoltaic power generation can be obtained. For example, if only tomorrow's weather forecast data is obtained, the model will output the predicted data for tomorrow's photovoltaic power generation. If the weather forecast data for the next two days is obtained, the predicted data for the photovoltaic power generation for the next two days will be output respectively.

[0085] Among them Figure 2 As shown, the training process of the above photovoltaic power generation prediction model includes:

[0086] Step S400, obtaining historical weather data and historical photovoltaic power generation data.

[0087] In order to train the model, training data is required, so historical weather data and historical photovoltaic power generation data are obtained. These data can be used as training data to train the model.

[0088] As can be seen from the above steps, weather data is used as model input and photovoltaic power generation data is used as output. Therefore, the weather data and photovoltaic power generation data of the same day are a pair of data that can be used for model training.

[0089] The data can be obtained by querying historical records online.

[0090] Step S500, preprocessing the historical weather data to form weather independent variable matrix data.

[0091] The processing in this step is the same as that in step S200, except that the data objects processed are different. This step processes historical weather data and processes the historical weather data into corresponding weather independent variable matrix data as input for training.

[0092] Step S600: Establishing an indefinite variable regression prediction model cluster.

[0093] In this embodiment, according to the model depth N parameter setting, a linear regression independent variable matrix of multiple groups of 1-N elements is generated, and a regression model cluster of indefinite elements is established.

[0094] Specifically, the regression model cluster is generated based on the aforementioned weather independent variable matrix data. It can be understood that each column in the matrix is ​​a variable value. After setting the depth N, several variables are extracted to fit the corresponding photovoltaic power generation, and then the fitting model of these variables and historical photovoltaic power generation is established.

[0095] The types of variables extracted can start from 1 and go up to N. For example, if N is 5, 1 variable is extracted. After extracting the permutations and combinations of 1 variable, two variables are extracted, and so on, until 5 variables are extracted, thus completing the establishment of the model cluster.

[0096] It can be seen that the indefinite regression model cluster contains multiple regression models, which are generated based on the historical weather data obtained above. Based on these model clusters, a preliminary model screening is performed to eliminate the models with all zero independent variables and low-element models, and to exclude the models without independent variables.

[0097] Step S700: input the historical photovoltaic power generation data and the weather independent variable matrix data into the indefinite variable regression prediction model cluster for regression fitting to obtain a photovoltaic power generation prediction model.

[0098] Since photovoltaic power generation prediction is highly correlated with weather conditions, in order to eliminate the use of repeated models due to uncertainty in weather conditions, which will lead to repeated values ​​in the first-level prediction model, the number of models can be reduced to a certain extent through preliminary elimination. Then, according to the set model branch number M parameter, the first M models of each order are selected to calculate the average value as the input variable of the secondary model, and the final prediction model is established.

[0099] After screening, the final model is formed by regressing again on the basis of the model cluster, and the following can be obtained: Figure 3 The indeterminate regression model is shown.

[0100] Figure 3 Y in it represents photovoltaic power generation, X is various variables from weather independent variable matrix data, and β is a parameter.

[0101] After sorting, it can be expressed as:

[0102]

[0103] The indeterminate regression prediction model can be used to process all variables and avoid the false fitting effect on the prediction due to the influence of multicollinearity. The indeterminate regression model cluster is used to regress the fitted model, which can avoid the variable differences caused by a single regression model, thereby reducing the adaptability of the model and further correcting the predicted value. In addition, once the indeterminate regression model is trained, it has good timeliness for the calculation of photovoltaic power generation.

[0104] The sub-model of the model is based on the linear regression model. Therefore, the functional relationship between the expected value of Y and the independent variable is the univariate linear regression model:

[0105]

[0106] In the formula, For x i The average of for y i The average of .

[0107] The mean square error can be used as the loss function during training:

[0108]

[0109] In this formula, L is the mean square error, m represents the amount of data, and y i is the true value, For the predicted value, if the mean square error is always large, continue to fit the model. When the mean square error is less than a certain value, it can be considered that the training is over, and the fitting training operation can be stopped to obtain a trained model.

[0110] After obtaining the model, the model can also be evaluated and optimized. Model evaluation is to calculate the test set data using the trained model to obtain the predicted value of the test set and compare it with the true value of the test set. The test set here can be the training set separated in the aforementioned training step, or it can be newly acquired historical weather data and historical photovoltaic power generation data. In this embodiment, the mean absolute error (MAE) is used for model evaluation:

[0111] Mean Absolute Error (MAE):

[0112]

[0113] In the above formula, m represents the amount of data, y i is the true value, is the predicted value, X is the weather data, and w is the coefficient.

[0114] Based on the evaluation results, corresponding model optimization operations can be performed. Model optimization is an additional adaptation based on the model prediction situation. Each predicted value is trained again with a multivariate linear regression model instead of simply taking the mean, so that the predicted value has a weight coefficient and the final predicted value is obtained comprehensively.

[0115] That is to say, after the model training is completed, and before and after it is put into practical application, the model can still be optimized based on historical data. For example, when the model runs for a week, it generates forecast data for a week, and also records the actual weather data for a week and the corresponding actual photovoltaic power generation. Based on the forecast data and actual data, the mean absolute error can be calculated. Based on the size of the mean absolute error, the current photovoltaic power generation model can be further optimized and updated through historical photovoltaic power generation data and historical weather data.

[0116] The above-mentioned model evaluation and optimization operations can be carried out during the production of the model. For example, the optimization can be set to be performed once a week. The weather data and actual photovoltaic power generation within this week can be used as training data for re-training the regression model. This can realize self-updating of the model without the need for additional operations by technical personnel.

[0117] The photovoltaic power generation prediction method of this embodiment obtains weather forecast data, inputs the weather forecast data into a trained indefinite variable regression prediction model for prediction, and obtains a prediction result. The indefinite variable regression model is generated after being screened by a regression model cluster, which increases the diversity of the model, improves the adaptability and timeliness of the model, and can also be self-updated in real time in a production environment to ensure that it can adapt to environmental changes. The accuracy of the prediction is increased.

[0118] Example 2

[0119] like Figure 4 As shown, this embodiment provides a photovoltaic power generation prediction device, including:

[0120] The data collection module 10 is used to obtain weather forecast data for the next several days;

[0121] The data processing module 20 is used to pre-process the weather forecast data to form a weather forecast data matrix;

[0122] The prediction module 30 is used to input the weather forecast data matrix into a trained photovoltaic power generation prediction model for prediction, and obtain the predicted photovoltaic power generation output by the photovoltaic power generation prediction model.

[0123] The present application provides a computer device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program runs on the processor, the photovoltaic power generation prediction method is executed.

[0124] The computer device can be a personal computer, a control terminal, a tablet computer, etc., which can be used in a photovoltaic power plant to monitor and predict power generation.

[0125] The present application provides a readable storage medium storing a computer program, wherein the computer program executes the photovoltaic power generation prediction method when running on a processor.

[0126] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow chart, and the combination of boxes in the structure diagram and / or the flow chart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0127] In addition, the functional modules or units in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0128] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0129] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A photovoltaic power generation prediction method, characterized in that: include: Get weather forecast data for the next few days; Preprocessing the weather forecast data to form a weather forecast data matrix; The weather forecast data matrix is ​​input into a trained photovoltaic power generation prediction model for prediction, and the predicted photovoltaic power generation output by the photovoltaic power generation prediction model is obtained.

2. The photovoltaic power generation prediction method according to claim 1, characterized in that: The weather forecast data includes discrete data and continuous data. The preprocessing of the weather forecast data to form a weather forecast data matrix includes: Performing data cleaning and normalization processing on the weather forecast data; Determine the discrete data in the normalized weather forecast data, convert all discrete data into dummy variables, and obtain multiple sets of matrix data; The weather forecast data matrix is ​​obtained by splicing each group of the matrix data and the continuous data.

3. The photovoltaic power generation prediction method according to claim 2, characterized in that: The weather forecast data includes wind direction data, weather conditions, temperature data and humidity data; The wind direction data and the weather conditions are discrete data, and the temperature data and the humidity are continuous data; The discrete data in the weather forecast data are determined, and all the discrete data are converted into dummy variables to obtain multiple sets of matrix data, including: Determine the wind direction type of the wind direction data and the weather type of the weather state, set the values ​​of the wind direction type and weather type that occurred as dummy variables corresponding to the meaning of occurrence, and set the values ​​of the wind direction type and weather type that did not occur as dummy variables corresponding to the meaning of non-occurrence; Arranging the wind direction data and the weather conditions of the same day in rows, and arranging the wind direction types and the weather conditions in columns, to obtain wind direction matrix data of the wind direction data and weather condition matrix data of the weather conditions, respectively; The step of splicing the matrix data and the continuous data to obtain the weather forecast data matrix includes: The wind direction matrix data, the weather status matrix data, the temperature data and the humidity data are aligned and spliced ​​row by row to obtain a weather forecast data matrix.

4. The photovoltaic power generation prediction method according to claim 2, characterized in that: After the weather forecast data is cleaned and normalized, the method further includes: If there are missing values ​​in the weather forecast data of the continuous data, the trend and seasonality of the missing values ​​are predicted according to the time series smoothing method and the nearest neighbor algorithm to obtain the predicted value; The missing values ​​are filled with the predicted values.

5. The photovoltaic power generation prediction method according to claim 4, characterized in that: The continuous data includes temperature, and the calculation method expression of the predicted value of the temperature is: Where T is the predicted value of the temperature, t represents the current day, and z represents the future day. is the predicted value of the t+z period, a and b are weight coefficients respectively, X kt is the nearest temperature value within k days.

6. The photovoltaic power generation prediction method according to claim 1, characterized in that: The training process of the photovoltaic power generation prediction model includes: Obtain historical weather data and historical photovoltaic power generation data; Preprocessing the historical weather data to form weather independent variable matrix data; Establish a cluster of indeterminate regression prediction models; The low-variable model, the model without independent variables and the model with all independent variables being 0 in the indefinite variable regression prediction model cluster are excluded to obtain a screened indefinite variable regression prediction model cluster; The historical photovoltaic power generation data and the weather independent variable matrix data are input into the indefinite variable regression prediction model cluster for regression fitting to obtain a photovoltaic power generation prediction model.

7. The photovoltaic power generation prediction method according to claim 6, characterized in that: After the photovoltaic power generation prediction model is obtained, the method further includes: Separate the historical photovoltaic power generation data and the weather independent variable matrix data into test set data, and use the weather independent variable matrix data in the test set data as input to input into the photovoltaic power generation prediction model to obtain a predicted value; The predicted value is compared with the corresponding historical photovoltaic power generation data in the test set data, the photovoltaic power generation prediction model is evaluated to obtain an evaluation result, and the photovoltaic power generation prediction model is fit-trained according to the evaluation result, the weather independent variable matrix data and the historical photovoltaic power generation data to obtain an updated photovoltaic power generation prediction model.

8. A photovoltaic power generation prediction device, characterized in that: include: Data collection module, used to obtain weather forecast data for the next several days; A data processing module, used for preprocessing the weather forecast data to form a weather forecast data matrix; The prediction module is used to input the weather forecast data matrix into the trained photovoltaic power generation prediction model for prediction, and obtain the predicted photovoltaic power generation output by the photovoltaic power generation prediction model.

9. A computer device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is run on the processor, the photovoltaic power generation prediction method according to any one of claims 1 to 7 is executed.

10. A readable storage medium, characterized in that: The computer program stores a computer program, and when the computer program is run on a processor, the photovoltaic power generation prediction method according to any one of claims 1 to 7 is executed.