CN114330705A - Photovoltaic power generation capacity prediction method and device, electronic equipment and storage medium - Google Patents
Photovoltaic power generation capacity prediction method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114330705A CN114330705A CN202111394598.3A CN202111394598A CN114330705A CN 114330705 A CN114330705 A CN 114330705A CN 202111394598 A CN202111394598 A CN 202111394598A CN 114330705 A CN114330705 A CN 114330705A
- Authority
- CN
- China
- Prior art keywords
- power generation
- photovoltaic power
- generation amount
- day
- amount prediction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000010248 power generation Methods 0.000 title claims abstract description 316
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000005070 sampling Methods 0.000 claims abstract description 123
- 239000013598 vector Substances 0.000 claims description 91
- 238000013527 convolutional neural network Methods 0.000 claims description 22
- 230000015654 memory Effects 0.000 claims description 22
- 238000000605 extraction Methods 0.000 claims description 10
- 238000013528 artificial neural network Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 4
- 230000008569 process Effects 0.000 abstract description 7
- 230000000875 corresponding effect Effects 0.000 description 77
- 238000004891 communication Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 238000012549 training Methods 0.000 description 6
- 238000010606 normalization Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 238000012163 sequencing technique Methods 0.000 description 3
- 230000006403 short-term memory Effects 0.000 description 3
- 230000004913 activation Effects 0.000 description 2
- 230000006399 behavior Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000001902 propagating effect Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 238000010219 correlation analysis Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001537 neural effect Effects 0.000 description 1
- 230000001151 other effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y04—INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
- Y04S—SYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
- Y04S10/00—Systems supporting electrical power generation, transmission or distribution
- Y04S10/50—Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Supply And Distribution Of Alternating Current (AREA)
Abstract
The application provides a method and a device for predicting photovoltaic power generation capacity, electronic equipment and a storage medium, wherein the method comprises the following steps: the method comprises the steps of obtaining historical sampling days of weather data and prediction days, inputting historical photovoltaic power generation capacity data of the historical sampling days into at least two photovoltaic power generation capacity prediction models to obtain photovoltaic power generation capacity prediction data corresponding to each photovoltaic power generation capacity prediction model, and carrying out weighted average on the photovoltaic power generation capacity prediction data corresponding to each photovoltaic power generation capacity prediction model to obtain photovoltaic power generation capacity prediction data corresponding to the prediction days. Therefore, in the process of predicting the photovoltaic power generation amount, the photovoltaic power generation amount is predicted by combining the photovoltaic power generation amount of the historical sampling day matched with the weather data and the prediction day and the plurality of photovoltaic power generation amount prediction models, and the plurality of photovoltaic power generation amount prediction results are weighted and averaged, so that the photovoltaic power generation amount prediction data corresponding to the prediction day is accurately predicted, and the accuracy of the photovoltaic power generation amount prediction data is improved.
Description
Technical Field
The application relates to the technical field of photovoltaic power generation, in particular to a method and a device for predicting photovoltaic power generation, electronic equipment and a storage medium.
Background
The prediction of the photovoltaic power generation capacity has great significance for site selection and grid connection of a photovoltaic power plant. Therefore, how to accurately predict the photovoltaic power generation amount is a technical problem which needs to be solved urgently at present.
Disclosure of Invention
The application provides a method and a device for predicting photovoltaic power generation capacity, electronic equipment and a storage medium.
The embodiment of the first aspect of the application provides a method for predicting photovoltaic power generation capacity, and the method includes: acquiring a predicted day and corresponding weather data; acquiring historical sampling days matched with the weather data and the prediction days; acquiring historical photovoltaic power generation capacity data of the historical sampling day; respectively inputting the historical photovoltaic power generation capacity data into at least two photovoltaic power generation capacity prediction models to obtain photovoltaic power generation capacity prediction data corresponding to each photovoltaic power generation capacity prediction model; and carrying out weighted average on the photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model to obtain the photovoltaic power generation amount prediction data corresponding to the prediction day.
In an embodiment of the application, each photovoltaic power generation amount prediction model includes an input layer, a convolutional neural network CNN layer, a long-short term memory artificial neural network LSTM layer, an attention layer, and an output layer, and the historical photovoltaic power generation amount data is respectively input into at least two photovoltaic power generation amount prediction models to obtain photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model, including: for each photovoltaic power generation amount prediction model, inputting the historical photovoltaic power generation amount data to an input layer of the photovoltaic power generation amount prediction model, and obtaining an input vector corresponding to the historical photovoltaic power generation amount data through the input layer of the photovoltaic power generation amount prediction model; inputting the input vector to a CNN layer of the photovoltaic power generation amount prediction model, and performing feature extraction on the input vector to obtain a target feature vector; inputting the target characteristic vector into an LSTM layer of the photovoltaic power generation prediction model to obtain an output vector corresponding to the target characteristic vector; inputting an output vector corresponding to the target feature vector into an attention layer of the photovoltaic power generation prediction model to obtain an attention weight corresponding to the output vector; and inputting the output vector and the corresponding attention weight into an output layer of the photovoltaic power generation amount prediction model to obtain photovoltaic power generation amount prediction data corresponding to the photovoltaic power generation amount prediction model.
In an embodiment of the application, the obtaining of the historical sampling day on which the weather data matches the prediction day includes: obtaining a plurality of first candidate sampling days prior to the prediction day; determining, for each first candidate sampling day, a similarity between the weather data for the predicted day and the weather data for the first candidate sampling day; acquiring a plurality of second candidate sampling days with the similarity larger than a preset similarity threshold from the plurality of first candidate sampling days; sorting the second candidate sampling days according to the date sequence to obtain a sorting result; and selecting the first M second candidate sampling days with dates close to the prediction day from the sorting result as the historical sampling days, wherein M is an integer larger than zero.
In one embodiment of the present application, the determining the similarity between the weather data on the predicted day and the weather data on the first candidate sampling day includes: determining a gray correlation between the weather data for the predicted day and the weather data for the first candidate sample day; determining cosine similarity between the weather data of the predicted day and the weather data of the first candidate sampling day; and determining the similarity between the weather data of the predicted day and the weather data of the first candidate sampling day according to the grey correlation degree and the cosine similarity.
The application provides a photovoltaic power generation amount prediction method, which comprises the steps of obtaining weather data corresponding to a prediction day, obtaining historical sampling days matched with the weather data and the prediction day, inputting historical photovoltaic power generation amount data of the historical sampling days into at least two photovoltaic power generation amount prediction models to obtain photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model, and carrying out weighted average on the photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model to obtain photovoltaic power generation amount prediction data corresponding to the prediction day. Therefore, in the process of predicting the photovoltaic power generation amount, the photovoltaic power generation amount is predicted by combining the photovoltaic power generation amount of the historical sampling day matched with the weather data and the prediction day and the plurality of photovoltaic power generation amount prediction models, and the plurality of photovoltaic power generation amount prediction results are weighted and averaged, so that the photovoltaic power generation amount prediction data corresponding to the prediction day is accurately predicted, and the accuracy of the photovoltaic power generation amount prediction data is improved.
The embodiment of the second aspect of the present application provides an apparatus for predicting photovoltaic power generation amount, the apparatus including: the first acquisition module is used for acquiring the predicted day and the corresponding weather data; the second acquisition module is used for acquiring historical sampling days matched with the weather data and the prediction days; the third acquisition module is used for acquiring historical photovoltaic power generation amount data of the historical sampling day; the photovoltaic power generation amount prediction module is used for respectively inputting the historical photovoltaic power generation amount data into at least two photovoltaic power generation amount prediction models to obtain photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model; and the determining module is used for carrying out weighted average on the photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model so as to obtain the photovoltaic power generation amount prediction data corresponding to the prediction day.
In an embodiment of the present application, each of the photovoltaic power generation amount prediction models includes an input layer, a convolutional neural network CNN layer, a long-short term memory artificial neural network LSTM layer, an attention layer, and an output layer, and the photovoltaic power generation amount prediction module includes: the input unit is used for inputting the historical photovoltaic power generation amount data into an input layer of each photovoltaic power generation amount prediction model, and obtaining an input vector corresponding to the historical photovoltaic power generation amount data through the input layer of the photovoltaic power generation amount prediction model; the characteristic extraction unit is used for inputting the input vector to a CNN layer of the photovoltaic power generation amount prediction model and performing characteristic extraction on the input vector to obtain a target characteristic vector; the prediction unit is used for inputting the target characteristic vector into an LSTM layer of the photovoltaic power generation amount prediction model so as to obtain an output vector corresponding to the target characteristic vector; the attention unit is used for inputting an output vector corresponding to the target characteristic vector into an attention layer of the photovoltaic power generation amount prediction model so as to obtain an attention weight corresponding to the output vector; and the photovoltaic power generation amount prediction unit is used for inputting the output vector and the corresponding attention weight into an output layer of the photovoltaic power generation amount prediction model so as to obtain photovoltaic power generation amount prediction data corresponding to the photovoltaic power generation amount prediction model.
In an embodiment of the application, the second obtaining module includes: a first acquisition unit configured to acquire a plurality of first candidate sampling days before the prediction day; a first determination unit configured to determine, for each first candidate sampling day, a similarity between the weather data on the predicted day and the weather data on the first candidate sampling day; the second acquisition unit is used for acquiring a plurality of second candidate sampling days with the similarity larger than a preset similarity threshold from the plurality of first candidate sampling days; the sorting unit is used for sorting the second candidate sampling days according to the date sequence to obtain a sorting result; and the second determining unit is used for selecting the first M second candidate sampling days with dates close to the prediction day from the sorting result as the historical sampling days, wherein M is an integer larger than zero.
In an embodiment of the application, the first determining unit is specifically configured to: determining a gray correlation between the weather data for the predicted day and the weather data for the first candidate sample day; determining cosine similarity between the weather data of the predicted day and the weather data of the first candidate sampling day; and determining the similarity between the weather data of the predicted day and the weather data of the first candidate sampling day according to the grey correlation degree and the cosine similarity.
The application provides a photovoltaic power generation amount prediction device, which is used for acquiring weather data corresponding to a prediction day, acquiring historical sampling days matched with the weather data and the prediction day, inputting historical photovoltaic power generation amount data of the historical sampling days into at least two photovoltaic power generation amount prediction models to obtain photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model, and performing weighted average on the photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model to obtain photovoltaic power generation amount prediction data corresponding to the prediction day. Therefore, in the process of predicting the photovoltaic power generation amount, the photovoltaic power generation amount is predicted by combining the photovoltaic power generation amount of the historical sampling day matched with the weather data and the prediction day and the plurality of photovoltaic power generation amount prediction models, and the plurality of photovoltaic power generation amount prediction results are weighted and averaged, so that the photovoltaic power generation amount prediction data corresponding to the prediction day is accurately predicted, and the accuracy of the photovoltaic power generation amount prediction data is improved.
An embodiment of a third aspect of the present application provides an electronic device, including: the photovoltaic power generation prediction method comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein when the processor executes the program, the prediction method of the photovoltaic power generation amount is realized.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, provides a method for predicting photovoltaic power generation in an embodiment of the present application.
Other effects of the above-described alternative will be described below with reference to specific embodiments.
Drawings
Fig. 1 is a schematic flow chart of a method for predicting photovoltaic power generation provided in an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a hybrid model provided in an embodiment of the present application;
FIG. 3 is a schematic flow chart of another photovoltaic power generation capacity prediction method provided by the embodiment of the application;
fig. 4 is a structural diagram of a device for predicting photovoltaic power generation provided by an embodiment of the present application;
fig. 5 is a structural diagram of another photovoltaic power generation capacity prediction device provided by an embodiment of the application;
FIG. 6 is a block diagram of an electronic device of one embodiment of the present application.
Detailed Description
Reference will now be made in detail to the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
The following describes a prediction method, a prediction device, and an electronic apparatus for photovoltaic power generation amount according to an embodiment of the present application with reference to the drawings.
Fig. 1 is a schematic flow chart of a method for predicting photovoltaic power generation provided in an embodiment of the present application.
It should be noted that the main execution subject of the method for predicting photovoltaic power generation amount provided in this embodiment is a device for predicting photovoltaic power generation amount, the device for predicting photovoltaic power generation amount may be implemented in a software and/or hardware manner, the device for predicting photovoltaic power generation amount in this embodiment may be configured in an electronic device, the electronic device in this embodiment may include a terminal device, a server, and the like, and this embodiment does not specifically limit the electronic device.
Fig. 1 is a schematic flow chart of a method for predicting photovoltaic power generation provided in an embodiment of the present application.
As shown in fig. 1, the method for predicting photovoltaic power generation amount may include:
In some embodiments, weather data corresponding to a predicted day may be a relatively reliable mechanism by, but is not limited to, a weather station or the like.
And 102, acquiring historical sampling days matched with the weather data and the prediction days.
In some embodiments, the historical sampling date matched with the weather data can be obtained according to the corresponding relation between the sampling date and the weather data which are saved in advance.
Wherein the historical sampling day is the sampling day prior to the prediction day.
In some embodiments, in order to accurately determine the historical sampling day matching the weather data with the predicted day, one possible implementation manner of obtaining the historical sampling day matching the weather data with the predicted day is as follows: acquiring a plurality of first candidate sampling days before the prediction day; for each first candidate sampling day, determining the similarity between the weather data of the prediction day and the weather data of the first candidate sampling day; and obtaining a plurality of second candidate sampling days with the similarity larger than a preset similarity threshold from the plurality of first candidate sampling days, sequencing the plurality of second candidate sampling days according to the date sequence to obtain a sequencing result, and selecting the first M second candidate sampling days with the dates close to the prediction day from the sequencing result as historical sampling days, wherein M is an integer larger than zero.
The preset similarity threshold is a critical value of similarity preset in a photovoltaic power generation amount prediction device, and is 0.8.
In some embodiments, in order to accurately determine the similarity between the weather data on the predicted day and the weather data on the first candidate sampling day, a gray correlation analysis method may be used in combination with the weather data on the predicted day to determine the similarity between the weather data on the predicted day and the weather data on the candidate sampling day.
Specifically, a gray correlation between the weather data for the predicted day and the weather data for the first candidate sample day may be determined; determining cosine similarity between the weather data of the predicted day and the weather data of the first candidate sampling day; and determining the similarity between the weather data of the predicted day and the weather data of the first candidate sampling day according to the grey correlation degree and the cosine similarity.
In some exemplary embodiments, meteorological features may be employedThe weather data is expressed in the form of a vector, N first candidate sampling days before the prediction day can be obtained, and the gray relevance R is obtained for the ith first candidate sampling day in the N first candidate sampling daysiWeather feature vector C reflecting ith first candidate sampling dayiAnd weather feature vector C of predicted day0The overall correlation between (see formula 1), the closer its value is to 1, the more correlated. Cosine similarity Ccosi reflects the meteorological feature vector C for the ith first candidate sampling dayiAnd weather feature vector C of predicted day0The more close the value to 1, the more similar the similarity (formula 3) between the changing trends of (c).
Where l is the number of components of the meteorological feature vector, for example, l is 20; epsiloni(k) The correlation coefficients of the kth meteorological feature component in the prediction day and the ith first candidate sampling day.
Wherein epsiloni(k) The calculation formula (2) is shown in (c).
Wherein, x '(k), x'i(k) Respectively obtaining the kth meteorological feature component in the normalized prediction day and the ith first candidate sampling day; ρ is a constant, and is, for example, 0.5.
Wherein, Cok,CikThe kth component of the meteorological feature vector for the prediction day and the ith first candidate sampling day, respectively.
Relating the gray to a degree RiAnd cosine similarity DcosiThe two indexes are combined into a similarity comprehensive index SiRepresents the general phaseSimilarity is shown in the formula (4). Will SiThe historical sampling days of more than or equal to 0.8 are arranged in a date sequence, and M days close to the prediction day are selected, for example, the M is 5.
S{i}=αR{i}+(1-α)Dcosi (4)
Wherein, alpha is an empirical weight coefficient, the value of which is combined with the specific weather condition, if the temperature and the wind speed change obviously in one day, the value of alpha is close to 0, otherwise, the value of alpha is close to 1.
The M is preset, for example, the value of M may be 5, 6, or 7, and in practical application, the value of M may be set according to actual service requirements.
And 103, acquiring historical photovoltaic power generation amount data of a historical sampling day.
In some embodiments, historical photovoltaic power generation data for historical sampling days may be obtained from a photovoltaic power generation database.
The photovoltaic power generation data can comprise historical photovoltaic power generation at each sampling moment. Since the illumination time is concentrated in the daytime, 10 whole-hour times within the 08:00-17:00 time period may be selected as daily sampling times.
And 104, respectively inputting the historical photovoltaic power generation amount data into at least two photovoltaic power generation amount prediction models to obtain photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model.
It should be noted that, the photovoltaic power generation amount prediction models are trained in advance, and may be models trained in an unsupervised manner or models trained in a supervised manner, which is not limited in the present application.
The model structures corresponding to the photovoltaic power generation capacity prediction models can be the same, but the corresponding model parameters are different. In other embodiments, the model structures corresponding to the photovoltaic power generation amount prediction models may be different.
In some embodiments, the photovoltaic power generation amount prediction models may be trained separately, wherein an exemplary implementation of training the photovoltaic power generation amount prediction models may be: the method comprises the steps of obtaining training data, wherein the training data comprise first photovoltaic power generation amount of a first sample sampling day at each sampling moment and second photovoltaic power generation amount of a second sample sampling day at each sampling moment, the date of the second sample sampling day is later than the date of the first sample sampling day, weather of the second sample sampling day and the weather of the first sample sampling day are the same as working conditions of photovoltaic power generation equipment, taking the first photovoltaic power generation amount of the first sample sampling day at each sampling moment as input of an initial photovoltaic power generation amount prediction model, taking the second photovoltaic power generation amount of the second sample sampling day at each sampling moment as output of the initial photovoltaic power generation amount prediction model, and training the photovoltaic power generation amount prediction model to obtain a trained photovoltaic power generation amount prediction model.
In some embodiments, in order to avoid the overfitting of the model, in the process of training the photovoltaic power generation amount prediction model, the neural nodes of the network layer of the photovoltaic power generation amount prediction model may be discarded, and the processed photovoltaic power generation amount prediction model may be trained by combining with training data.
And 105, carrying out weighted average on the photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model to obtain photovoltaic power generation amount prediction data corresponding to the prediction day.
Specifically, the weight corresponding to each photovoltaic power generation amount prediction model can be obtained. And then, carrying out weighted average processing based on the weight of each photovoltaic power generation amount prediction model and the photovoltaic power generation amount prediction data to obtain photovoltaic power generation amount prediction data corresponding to the prediction day.
The importance of different photovoltaic power generation capacity prediction models is represented by the weight.
The photovoltaic power generation amount prediction models are different in feature capturing effect, and therefore when historical power generation amount data are predicted by the photovoltaic power generation amount prediction models, photovoltaic power generation amount prediction data output by the photovoltaic power generation amount prediction models may be different. Therefore, in this embodiment, after acquiring the photovoltaic power generation amount prediction data output by each photovoltaic power generation amount prediction model, the photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model may be weighted and averaged, and the obtained fusion result is used as the photovoltaic power generation amount prediction data corresponding to the prediction day. Therefore, the photovoltaic power generation amount prediction data corresponding to the photovoltaic power generation amount prediction models are weighted and averaged, and the photovoltaic power generation amount prediction data corresponding to the prediction day are accurately obtained.
The application provides a photovoltaic power generation amount prediction method, which comprises the steps of obtaining weather data corresponding to a prediction day, obtaining historical sampling days matched with the weather data and the prediction day, inputting historical photovoltaic power generation amount data of the historical sampling days into at least two photovoltaic power generation amount prediction models to obtain photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model, and carrying out weighted average on the photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model to obtain photovoltaic power generation amount prediction data corresponding to the prediction day. Therefore, in the process of predicting the photovoltaic power generation amount, the photovoltaic power generation amount is predicted by combining the photovoltaic power generation amount of the historical sampling day matched with the weather data and the prediction day and the plurality of photovoltaic power generation amount prediction models, and the plurality of photovoltaic power generation amount prediction results are weighted and averaged, so that the photovoltaic power generation amount prediction data corresponding to the prediction day is accurately predicted, and the accuracy of the photovoltaic power generation amount prediction data is improved.
Based on the above embodiments, in order to accurately predict the photovoltaic power generation amount, in some embodiments, the photovoltaic power generation amount prediction model includes an input layer, a Convolutional Neural Network (CNN) layer, a Long Short-Term Memory artificial Neural network (LSTM) layer, an attention attribute layer, and an output layer. In the case where the number of the photovoltaic power generation amount prediction models is two, the two photovoltaic power generation amount prediction models are respectively represented by a first photovoltaic power generation amount prediction model and a second photovoltaic power generation amount prediction model, and an exemplary diagram of a model structure based on a hybrid model composed of the first photovoltaic power generation amount prediction model and the second photovoltaic power generation amount prediction model is shown in fig. 2. It should be noted that the output results of the first photovoltaic power generation amount prediction model and the second photovoltaic power generation amount prediction model shown in fig. 2 are input into the output layer, so that the output results of the first photovoltaic power generation amount prediction model and the second photovoltaic power generation amount prediction model are weighted and averaged through the output layer to obtain photovoltaic power generation amount prediction data corresponding to the prediction day.
Fig. 3 is a schematic flow chart of another photovoltaic power generation capacity prediction method provided in the embodiment of the present application. In this embodiment, each photovoltaic power generation amount prediction model includes an input layer, a Convolutional Neural Network (CNN) layer, a Long Short-Term Memory artificial Neural network (LSTM) layer, an attention attribute layer, and an output layer, which are used as examples to describe, and the above-mentioned step of inputting the historical photovoltaic power generation amount data into at least two photovoltaic power generation amount prediction models respectively to obtain a possible implementation manner of the photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model, as shown in fig. 3, may include:
In some embodiments, historical photovoltaic power generation amount data may be input into an input layer of the photovoltaic power generation amount prediction model, and vector representation may be performed on the historical photovoltaic power generation amount data to obtain an input vector.
In some embodiments, in order to accurately filter out the target feature vector, the CNN layer includes a convolution layer and a discard dropout layer, and one embodiment of inputting the input vector into the CNN layer and performing feature extraction on the input vector to filter out the target feature vector is as follows: inputting an input vector into the convolutional layer, acquiring a plurality of feature vectors of the input vector extracted by the convolutional layer, and inputting the plurality of feature vectors of the input vector into the dropout layer to screen out a target feature vector from the plurality of features.
In some exemplary embodiments, in the case that the data dimension of the photovoltaic power generation amount is 1 dimension, the convolution layer is selected as a one-dimensional convolution, and then the size of the convolution kernel is 3, and the RELU activation function is used in combination, so as to obtain a plurality of feature vectors of the input vector.
And step 303, inputting the target characteristic vector into an LSTM layer of the photovoltaic power generation prediction model to obtain an output vector corresponding to the target characteristic vector.
In some embodiments, in order to learn the photovoltaic power generation amount behavior characteristics and accurately predict the photovoltaic power generation amount based on the photovoltaic power generation amount behavior characteristics, the LSTM layer in this embodiment may adopt a Bi-directional Long Short-Term Memory artificial neural network (biLSTM) layer structure. That is, the LSTM layer may include forward propagating LSTM and backward propagating LSTM.
And step 304, inputting the output vector corresponding to the target characteristic vector into an attention layer of the photovoltaic power generation amount prediction model to obtain an attention weight corresponding to the output vector.
In some embodiments, the attention layer assigns a corresponding attention weight to the target feature vector in combination with the importance of the target feature vector.
And 305, inputting the output vector and the corresponding attention weight into an output layer of the photovoltaic power generation amount prediction model to obtain photovoltaic power generation amount prediction data corresponding to the photovoltaic power generation amount prediction model.
Specifically, after the output vector and the corresponding attention weight are input to the output layer, the photovoltaic power generation amount prediction data is output through the full connection layer.
Specifically, the photovoltaic power generation amount prediction data can be determined by using the output vector and the corresponding attention weight according to the full-connection activation function.
The photovoltaic power generation amount prediction data may include a photovoltaic power generation amount prediction value at each sampling time.
In some embodiments, in order to obtain an actual predicted value, after obtaining the photovoltaic power generation amount prediction data, the photovoltaic power generation amount prediction data may be subjected to an inverse normalization process.
wherein y is photovoltaic power generation amount prediction data which is obtained by prediction of the photovoltaic power generation amount prediction model and is before inverse normalization processing,for photovoltaic power generation capacity prediction data after reverse normalization processing, ymin、ymaxThe minimum value and the maximum value in the historical output data before normalization processing are respectively.
Fig. 4 is a schematic structural diagram of a device for predicting photovoltaic power generation amount according to an embodiment of the present application.
As shown in fig. 4, the photovoltaic power generation amount prediction apparatus 400 includes: a first obtaining module 401, a second obtaining module 402, a third obtaining module 403, a photovoltaic power generation amount prediction module 404, and a determination module 405, wherein:
the first obtaining module 401 is configured to obtain the predicted day and the corresponding weather data.
A second obtaining module 402, configured to obtain a historical sampling day on which the weather data matches the predicted day.
And a third obtaining module 403, configured to obtain historical photovoltaic power generation amount data of a historical sampling day.
And a photovoltaic power generation amount prediction module 404, configured to input the historical photovoltaic power generation amount data into at least two photovoltaic power generation amount prediction models respectively, so as to obtain photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model.
The determining module 405 is configured to perform weighted average on the photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model to obtain photovoltaic power generation amount prediction data corresponding to a prediction day.
In an embodiment of the present application, each photovoltaic power generation amount prediction model includes an input layer, a convolutional neural network CNN layer, a long-short term memory artificial neural network LSTM layer, an attention layer, and an output layer, and on the basis of the apparatus embodiment shown in fig. 4, as shown in fig. 5, the photovoltaic power generation amount prediction module 404 may include:
the input unit 4041 is configured to input the historical photovoltaic power generation amount data to an input layer of the photovoltaic power generation amount prediction model for each photovoltaic power generation amount prediction model, and obtain an input vector corresponding to the historical photovoltaic power generation amount data through the input layer of the photovoltaic power generation amount prediction model.
The feature extraction unit 4042 is configured to input the input vector to the CNN layer of the photovoltaic power generation amount prediction model, and perform feature extraction on the input vector to obtain a target feature vector.
The processing unit 4043 is configured to input the target feature vector into an LSTM layer of the photovoltaic power generation amount prediction model to obtain an output vector corresponding to the target feature vector.
The attention unit 4044 is configured to input an output vector corresponding to the target feature vector into an attention layer of the photovoltaic power generation amount prediction model to obtain an attention weight corresponding to the output vector.
The photovoltaic power generation amount processing unit 4045 is configured to input the output vector and the corresponding attention weight to an output layer of the photovoltaic power generation amount prediction model to obtain photovoltaic power generation amount prediction data corresponding to the photovoltaic power generation amount prediction model.
In an embodiment of the application, the second obtaining module 402 may include:
a first obtaining unit 4021 is configured to obtain a plurality of first candidate sampling days before the prediction day.
A first determining unit 4022, configured to determine, for each first candidate sampling day, a similarity between the weather data of the predicted day and the weather data of the first candidate sampling day.
The second obtaining unit 4023 is configured to obtain, from the plurality of first candidate sampling days, a plurality of second candidate sampling days whose similarity is greater than a preset similarity threshold.
The sorting unit 4024 is configured to sort the plurality of second candidate sampling days according to a date order to obtain a sorting result.
A second determining unit 4025, configured to select, as history sampling days, the first M second candidate sampling days whose dates are close to the prediction day from the sorting result, where M is an integer greater than zero.
In an embodiment of the application, the first determining unit 4022 is specifically configured to: determining a grey correlation degree between the weather data of the forecast day and the weather data of the first candidate sampling day; determining cosine similarity between the weather data of the predicted day and the weather data of the first candidate sampling day; and determining the similarity between the weather data of the predicted day and the weather data of the first candidate sampling day according to the grey correlation degree and the cosine similarity.
It should be noted that the explanation of the embodiment of the method for predicting photovoltaic power generation amount described above is also applicable to the device for predicting photovoltaic power generation amount of the present embodiment, and the embodiment is not described again.
The application provides a photovoltaic power generation amount prediction device, which is used for acquiring weather data corresponding to a prediction day, acquiring historical sampling days matched with the weather data and the prediction day, inputting historical photovoltaic power generation amount data of the historical sampling days into at least two photovoltaic power generation amount prediction models to obtain photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model, and performing weighted average on the photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model to obtain photovoltaic power generation amount prediction data corresponding to the prediction day. Therefore, in the process of predicting the photovoltaic power generation amount, the photovoltaic power generation amount is predicted by combining the photovoltaic power generation amount of the historical sampling day matched with the weather data and the prediction day and the plurality of photovoltaic power generation amount prediction models, and the plurality of photovoltaic power generation amount prediction results are weighted and averaged, so that the photovoltaic power generation amount prediction data corresponding to the prediction day is accurately predicted, and the accuracy of the photovoltaic power generation amount prediction data is improved.
FIG. 6 is a block diagram of an electronic device according to one embodiment of the present application.
As shown in fig. 6, the electronic apparatus includes:
The processor 602, when executing the instructions, implements the method of predicting photovoltaic power generation provided in the above-described embodiments.
Further, the electronic device further includes:
a communication interface 603 for communication between the memory 601 and the processor 602.
And a processor 602, configured to implement the method for predicting photovoltaic power generation amount according to the foregoing embodiment when executing a program.
If the memory 601, the processor 602 and the communication interface 603 are implemented independently, the communication interface 603, the memory 601 and the processor 602 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
Optionally, in a specific implementation, if the memory 601, the processor 602, and the communication interface 603 are integrated on a chip, the memory 601, the processor 602, and the communication interface 603 may complete mutual communication through an internal interface.
The processor 602 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present Application.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.
Claims (10)
1. A method for predicting photovoltaic power generation, the method comprising:
acquiring a predicted day and corresponding weather data;
acquiring historical sampling days matched with the weather data and the prediction days;
acquiring historical photovoltaic power generation capacity data of the historical sampling day;
respectively inputting the historical photovoltaic power generation capacity data into at least two photovoltaic power generation capacity prediction models to obtain photovoltaic power generation capacity prediction data corresponding to each photovoltaic power generation capacity prediction model;
and carrying out weighted average on the photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model to obtain the photovoltaic power generation amount prediction data corresponding to the prediction day.
2. The method of claim 1, wherein each of the photovoltaic power generation amount prediction models comprises an input layer, a Convolutional Neural Network (CNN) layer, a long-short term memory artificial neural network (LSTM) layer, an attention layer and an output layer, and the inputting the historical photovoltaic power generation amount data into at least two photovoltaic power generation amount prediction models respectively to obtain photovoltaic power generation amount prediction data corresponding to each of the photovoltaic power generation amount prediction models comprises:
for each photovoltaic power generation amount prediction model, inputting the historical photovoltaic power generation amount data to an input layer of the photovoltaic power generation amount prediction model, and obtaining an input vector corresponding to the historical photovoltaic power generation amount data through the input layer of the photovoltaic power generation amount prediction model;
inputting the input vector to a CNN layer of the photovoltaic power generation amount prediction model, and performing feature extraction on the input vector to obtain a target feature vector;
inputting the target characteristic vector into an LSTM layer of the photovoltaic power generation prediction model to obtain an output vector corresponding to the target characteristic vector;
inputting an output vector corresponding to the target feature vector into an attention layer of the photovoltaic power generation prediction model to obtain an attention weight corresponding to the output vector;
and inputting the output vector and the corresponding attention weight into an output layer of the photovoltaic power generation amount prediction model to obtain photovoltaic power generation amount prediction data corresponding to the photovoltaic power generation amount prediction model.
3. The method of claim 1, wherein said obtaining historical sample days for which the weather data matches the predicted days comprises:
obtaining a plurality of first candidate sampling days prior to the prediction day;
determining, for each first candidate sampling day, a similarity between the weather data for the predicted day and the weather data for the first candidate sampling day;
acquiring a plurality of second candidate sampling days with the similarity larger than a preset similarity threshold from the plurality of first candidate sampling days;
sorting the second candidate sampling days according to the date sequence to obtain a sorting result;
and selecting the first M second candidate sampling days with dates close to the prediction day from the sorting result as the historical sampling days, wherein M is an integer larger than zero.
4. The method of claim 3, wherein the determining the similarity between the weather data for the predicted day and the weather data for the first candidate sample day comprises:
determining a gray correlation between the weather data for the predicted day and the weather data for the first candidate sample day;
determining cosine similarity between the weather data of the predicted day and the weather data of the first candidate sampling day;
and determining the similarity between the weather data of the predicted day and the weather data of the first candidate sampling day according to the grey correlation degree and the cosine similarity.
5. An apparatus for predicting photovoltaic power generation amount, comprising:
the first acquisition module is used for acquiring the predicted day and the corresponding weather data;
the second acquisition module is used for acquiring historical sampling days matched with the weather data and the prediction days;
the third acquisition module is used for acquiring historical photovoltaic power generation amount data of the historical sampling day;
the photovoltaic power generation amount prediction module is used for respectively inputting the historical photovoltaic power generation amount data into at least two photovoltaic power generation amount prediction models to obtain photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model;
and the determining module is used for carrying out weighted average on the photovoltaic power generation amount prediction data corresponding to each photovoltaic power generation amount prediction model so as to obtain the photovoltaic power generation amount prediction data corresponding to the prediction day.
6. The apparatus of claim 5, wherein each of the photovoltaic power generation amount prediction models comprises an input layer, a Convolutional Neural Network (CNN) layer, a long-short term memory artificial neural network (LSTM) layer, an attention layer, and an output layer, and the photovoltaic power generation amount prediction module comprises:
the input unit is used for inputting the historical photovoltaic power generation amount data into an input layer of each photovoltaic power generation amount prediction model, and obtaining an input vector corresponding to the historical photovoltaic power generation amount data through the input layer of the photovoltaic power generation amount prediction model;
the characteristic extraction unit is used for inputting the input vector to a CNN layer of the photovoltaic power generation amount prediction model and performing characteristic extraction on the input vector to obtain a target characteristic vector;
the prediction unit is used for inputting the target characteristic vector into an LSTM layer of the photovoltaic power generation amount prediction model so as to obtain an output vector corresponding to the target characteristic vector;
the attention unit is used for inputting an output vector corresponding to the target characteristic vector into an attention layer of the photovoltaic power generation amount prediction model so as to obtain an attention weight corresponding to the output vector;
and the photovoltaic power generation amount prediction unit is used for inputting the output vector and the corresponding attention weight into an output layer of the photovoltaic power generation amount prediction model so as to obtain photovoltaic power generation amount prediction data corresponding to the photovoltaic power generation amount prediction model.
7. The apparatus of claim 5, wherein the second obtaining module comprises:
a first acquisition unit configured to acquire a plurality of first candidate sampling days before the prediction day;
a first determination unit configured to determine, for each first candidate sampling day, a similarity between the weather data on the predicted day and the weather data on the first candidate sampling day;
the second acquisition unit is used for acquiring a plurality of second candidate sampling days with the similarity larger than a preset similarity threshold from the plurality of first candidate sampling days;
the sorting unit is used for sorting the second candidate sampling days according to the date sequence to obtain a sorting result;
and the second determining unit is used for selecting the first M second candidate sampling days with dates close to the prediction day from the sorting result as the historical sampling days, wherein M is an integer larger than zero.
8. The apparatus of claim 7, wherein the first determining unit is specifically configured to:
determining a gray correlation between the weather data for the predicted day and the weather data for the first candidate sample day;
determining cosine similarity between the weather data of the predicted day and the weather data of the first candidate sampling day;
and determining the similarity between the weather data of the predicted day and the weather data of the first candidate sampling day according to the grey correlation degree and the cosine similarity.
9. An electronic device, comprising:
memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-4 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111394598.3A CN114330705A (en) | 2021-11-23 | 2021-11-23 | Photovoltaic power generation capacity prediction method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111394598.3A CN114330705A (en) | 2021-11-23 | 2021-11-23 | Photovoltaic power generation capacity prediction method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114330705A true CN114330705A (en) | 2022-04-12 |
Family
ID=81046642
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111394598.3A Pending CN114330705A (en) | 2021-11-23 | 2021-11-23 | Photovoltaic power generation capacity prediction method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114330705A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116384593A (en) * | 2023-06-01 | 2023-07-04 | 深圳市国电科技通信有限公司 | Distributed photovoltaic output prediction method and device, electronic equipment and medium |
-
2021
- 2021-11-23 CN CN202111394598.3A patent/CN114330705A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116384593A (en) * | 2023-06-01 | 2023-07-04 | 深圳市国电科技通信有限公司 | Distributed photovoltaic output prediction method and device, electronic equipment and medium |
CN116384593B (en) * | 2023-06-01 | 2023-08-18 | 深圳市国电科技通信有限公司 | Distributed photovoltaic output prediction method and device, electronic equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111507521B (en) | Method and device for predicting power load of transformer area | |
CN109671020B (en) | Image processing method, device, electronic equipment and computer storage medium | |
CN110874550A (en) | Data processing method, device, equipment and system | |
CN110991658A (en) | Model training method and device, electronic equipment and computer readable storage medium | |
CN113536144B (en) | Social network information propagation scale prediction method and device | |
CN114254556A (en) | Photovoltaic power generation power prediction method and device, electronic equipment and storage medium | |
CN106844788B (en) | Library intelligent search sorting method and system | |
CN117096504B (en) | Temperature control method and device, equipment and storage medium | |
CN116822651A (en) | Large model parameter fine adjustment method, device, equipment and medium based on incremental learning | |
WO2023236319A1 (en) | Convolutional neural network deployment and optimization method for microcontroller | |
CN113222149A (en) | Model training method, device, equipment and storage medium | |
CN111159481B (en) | Edge prediction method and device for graph data and terminal equipment | |
CN114819289A (en) | Prediction method, training method, device, electronic device and storage medium | |
CN112036488A (en) | Event identification method, device and equipment based on image identification and storage medium | |
CN114330705A (en) | Photovoltaic power generation capacity prediction method and device, electronic equipment and storage medium | |
CN113515653A (en) | Model recommendation method, device and equipment based on historical data and storage medium | |
CN116826734A (en) | Photovoltaic power generation power prediction method and device based on multi-input model | |
CN114155388B (en) | Image recognition method and device, computer equipment and storage medium | |
CN114298370A (en) | Photovoltaic power generation capacity prediction method and device, electronic equipment and storage medium | |
CN114971375A (en) | Examination data processing method, device, equipment and medium based on artificial intelligence | |
CN115374998A (en) | Load prediction method based on attention mechanism and CNN-BiGRU | |
CN113326885A (en) | Method and device for training classification model and data classification | |
CN114282428A (en) | Photovoltaic power generation capacity prediction method and device, electronic equipment and storage medium | |
CN116992944B (en) | Image processing method and device based on leavable importance judging standard pruning | |
CN117216650A (en) | Target object risk behavior early warning method and related equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |