Photovoltaic power prediction method, device, computer equipment and storage medium
By decomposing and weighted smoothing the historical data of the photovoltaic site, the deviation problem of traditional photovoltaic power prediction models under unstable meteorological conditions is solved, and more accurate photovoltaic power prediction is achieved, suitable for power grid scheduling and energy optimization.
Patent Information
- Application Number
- CN202510757902.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-06-09
AI Technical Summary
Traditional photovoltaic power prediction models are difficult to accurately predict photovoltaic power output under unstable meteorological conditions, resulting in large deviations in prediction results, affecting power grid scheduling and optimized allocation of energy resources.
By obtaining the historical power and meteorological data of the photovoltaic site, decomposition is carried out to obtain long-term trend characteristics and short-term fluctuation characteristics under multiple preset time scales, the pre-trained photovoltaic power prediction model is inputted with the meteorological data, and weighted smoothing is performed to improve prediction accuracy.
In the scenario of load-limited and severe meteorological changes, the accuracy and reliability of photovoltaic power prediction are improved, and the power performance in future periods can be characterized, fluctuations on short time scales can be reduced, and the consistency of prediction results can be enhanced.
Smart Images

Figure CN120277368B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of clean energy technology, and in particular to a photovoltaic power prediction method, device, computer equipment and storage medium. Background Art
[0002] Currently, photovoltaic power generation faces the challenge of difficult power forecasting under unstable meteorological conditions.
[0003] Due to the frequent and dramatic fluctuations in meteorological factors such as radiation intensity, ambient temperature, and air humidity, traditional forecasting models struggle to accurately align with the actual photovoltaic power output curve, resulting in significant deviations in forecast results. This error directly impacts the efficiency of grid scheduling and the optimal allocation of energy resources. For example, when experiencing sudden changes in weather, such as sudden clearing or cloudiness, or sudden changes in temperature and humidity, traditional models may not be able to promptly reflect changes in the actual output of photovoltaic panels. Consequently, forecasts often lag behind fluctuations in actual power output, reducing their reliability.
[0004] Therefore, there is an urgent need to propose a photovoltaic power prediction method to solve the problem that traditional prediction models are difficult to fit the actual photovoltaic power output curve, resulting in large deviations in prediction results. Summary of the Invention
[0005] In view of this, the present invention provides a photovoltaic power prediction method, apparatus, computer equipment and storage medium to solve the problem that traditional prediction models are difficult to fit the actual photovoltaic power output curve, resulting in large deviations in prediction results.
[0006] In a first aspect, the present invention provides a photovoltaic power prediction method, which includes: obtaining first historical power data and first historical meteorological data of a target photovoltaic station; decomposing the first historical power data based on the fluctuation characteristics of the first historical power data to obtain first long-term trend characteristics and corresponding first short-term fluctuation characteristics of the first historical power data at multiple preset time scales; inputting the first long-term trend characteristics, the first short-term fluctuation characteristics, and the first historical meteorological data at each of the preset time scales into a pre-trained photovoltaic power prediction model to obtain a power prediction result; wherein the photovoltaic power prediction model is trained based on second historical power data of a first time period, third historical power data of a second time period, and second historical meteorological data; during the model training process, taking the third historical power data as a target value, learning the mapping relationship between the second long-term trend characteristics, the second short-term fluctuation characteristics, the second historical meteorological data, and the third historical power data of the second historical power data at each of the preset time scales based on the photovoltaic power prediction model, and learning the fusion relationship when fusing the sub-power prediction results corresponding to each of the preset time scales to obtain the power prediction result; and performing weighted smoothing on the power prediction result to obtain the photovoltaic power prediction result.
[0007] As an exemplary embodiment, the method for training the photovoltaic power prediction model includes: obtaining the second historical power data of the first time period of the target photovoltaic station, the third historical power data of the second time period and the second historical meteorological data corresponding to the time series of the second historical power data; wherein, the first time period is adjacent to the second time period in time series, and the first time period is earlier than the second time period; decomposing the second historical power data to obtain the second long-term trend characteristics and corresponding second short-term fluctuation characteristics of the second historical power data at multiple preset time scales; inputting the second historical power data and the second historical meteorological data into a pre-built photovoltaic power prediction model for model training; during the model training process, taking the third historical power data as the target value, based on the photovoltaic power prediction model, learning the second long-term trend characteristics, the second short-term fluctuation characteristics and the mapping relationship between the second historical meteorological data and the third historical power data of the second historical power data at each preset time scale, and learning the fusion relationship when fusing the sub-power prediction results corresponding to each preset time scale to obtain the power prediction result.
[0008] As an exemplary embodiment, the photovoltaic power prediction model includes multiple sub-prediction networks and weighted fusion modules corresponding to the preset time scales, and the second historical power data and the second historical meteorological data are input into a pre-built photovoltaic power prediction model for model training, including: inputting the second long-term trend characteristics, the second short-term fluctuation characteristics and the second historical meteorological data under each preset time scale into the sub-prediction network corresponding to each preset time scale for training; during the training process, taking the third historical power data as the target value, continuously adjusting the network parameters of each sub-prediction network, so that each sub-prediction network learns the corresponding relationship between the second long-term trend characteristics, the second short-term fluctuation characteristics, the second historical meteorological data and the third historical power data under the corresponding preset time scale until each sub-prediction network converges; based on the weighted fusion module, the fusion relationship when the sub-power prediction results corresponding to each preset time scale are fused to obtain the power prediction result.
[0009] As an exemplary embodiment, after decomposing the first historical power data based on the fluctuation characteristics of the first historical power data to obtain the first long-term trend characteristics and the corresponding first short-term fluctuation characteristics of the first historical power data at multiple preset time scales, the photovoltaic power prediction method also includes: inputting the first long-term trend characteristics and the first short-term fluctuation characteristics into a pre-constructed feature correction model, and using the feature correction model to correct the first long-term trend characteristics and / or the first short-term fluctuation characteristics based on the mapping relationship between the second long-term trend characteristics and the second short-term fluctuation characteristics; wherein the feature correction model is trained based on the second long-term trend characteristics and the second short-term fluctuation characteristics, and the feature correction model is composed of a first fully connected layer, a second fully connected layer and a ReLU activation function; the first fully connected layer is used to input the second long-term trend characteristics, the second fully connected layer is used to input the second short-term trend characteristics, and the first fully connected layer and the second fully connected layer are activated by the ReLU activation function; during the model training process, the model parameters of the feature correction model are continuously adjusted so that the feature correction model learns the mapping relationship between the second long-term trend characteristics and the second short-term fluctuation characteristics.
[0010] As an exemplary embodiment, before decomposing the first historical power data based on the fluctuation characteristics of the historical power data, the photovoltaic power prediction method also includes: obtaining historical measured irradiance data that matches the time series of the first historical power data; calculating the correlation coefficient between the historical measured irradiance data and the first historical power data that matches the time series; and eliminating the first historical power data whose correlation coefficient is less than a preset correlation coefficient.
[0011] As an exemplary embodiment, the power prediction result is weighted and smoothed to obtain a photovoltaic power prediction result, including: in the power prediction result, traversing each power prediction value, and taking a first preset number of target power prediction values before and after the power prediction value as a predicted power data sequence; determining a smoothing weight of each target power prediction value based on the sequence distance of each target power prediction value relative to the power prediction value in each predicted power data sequence; wherein each smoothing weight is inversely correlated with the sequence distance; and correcting each power prediction value based on each smoothing weight and each target power prediction value to obtain a photovoltaic power prediction result.
[0012] As an exemplary embodiment, the photovoltaic power prediction method also includes: in the power prediction result, calculating the power change rate of each power prediction value relative to N adjacent power prediction values that are earlier and / or later in time; wherein N is a positive integer; obtaining the power change rate corresponding to each of the power prediction values; determining the first preset number based on the power change rate; wherein the first preset number is inversely correlated with the change rate.
[0013] In a second aspect, the present invention provides a photovoltaic power prediction device, which includes: an acquisition module for acquiring first historical power data and first historical meteorological data of a target photovoltaic station; a decomposition module for decomposing the first historical power data based on the fluctuation characteristics of the first historical power data to obtain a first long-term trend characteristic and a corresponding first short-term fluctuation characteristic of the first historical power data at multiple preset time scales; a power prediction module for inputting the first long-term trend characteristic, the first short-term fluctuation characteristic and the first historical meteorological data at each of the preset time scales into a pre-trained photovoltaic power prediction model to obtain a power prediction result; wherein, The photovoltaic power prediction model is obtained by model training based on the second historical power data of the first time period, the third historical power data of the second time period and the second historical meteorological data; during the model training process, the third historical power data is used as the target value, and the second long-term trend characteristics, the second short-term fluctuation characteristics, the mapping relationship between the second historical meteorological data and the third historical power data of the second historical power data at each preset time scale are learned based on the photovoltaic power prediction model, and the fusion relationship when the sub-power prediction results corresponding to each preset time scale are fused to obtain the power prediction result is learned; a smoothing module is used to perform weighted smoothing on the power prediction result to obtain a photovoltaic power prediction result.
[0014] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0015] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method of the first aspect or any corresponding embodiment thereof.
[0016] The power prediction method of the present invention obtains first historical power data and first historical meteorological data of a target photovoltaic station; decomposes the first historical power data based on the fluctuation characteristics of the first historical power data to obtain first long-term trend characteristics and corresponding first short-term fluctuation characteristics of the first historical power data at multiple preset time scales; inputs the first long-term trend characteristics, the first short-term fluctuation characteristics and the first historical meteorological data at each of the preset time scales into a pre-trained photovoltaic power prediction model to obtain a power prediction result; wherein, the photovoltaic power prediction model is obtained by model training based on the second historical power data of the first time period, the third historical power data of the second time period and the second historical meteorological data; in the process of model training, with the third historical power data as the target value, based on the photovoltaic power prediction model, learns the second long-term trend characteristics, the second short-term fluctuation characteristics, the mapping relationship between the second historical meteorological data and the third historical power data of the second historical power data at each of the preset time scales, and learns the fusion relationship when the sub-power prediction results corresponding to each of the preset time scales are fused to obtain the power prediction result; weighted smoothing is performed on the power prediction result to obtain the photovoltaic power prediction result; In the above-mentioned embodiment of inputting the first long-term trend characteristics, the first short-term fluctuation characteristics, and the first historical meteorological data at each preset time scale into a pre-trained photovoltaic power prediction model to obtain a power prediction result, the photovoltaic power prediction model is trained by the mapping relationship between the second long-term trend characteristics, the second short-term fluctuation characteristics, the second historical meteorological data, and the third historical power data at each preset time scale. During model training, the specific fluctuation state of the power data at each preset time scale in the scenario where load limit and drastic meteorological changes coexist within the historical period, as well as the power performance of the third historical power data in the future period relative to the period corresponding to the fluctuation state can be considered. On the other hand, each preset time scale is independent of each other and has its own mapping relationship at each preset time scale, which can avoid interference from different preset time scales and improve the accuracy of power prediction at each preset time scale. Furthermore, by inputting the first long-term trend characteristics, the first short-term fluctuation characteristics, and the first historical meteorological data at each preset time scale into the photovoltaic power prediction model, the fluctuation state of the first historical power data within the historical period can be considered for power prediction, and the obtained power prediction result can represent the specific performance of power in the future period. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 is a schematic flow chart of a photovoltaic power prediction method according to an embodiment of the present invention;
[0019] Figure 2 is a structural block diagram of a photovoltaic power prediction device according to an embodiment of the present invention;
[0020] Figure 3 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0022] Currently, photovoltaic power generation faces the challenge of difficult power forecasting under unstable meteorological conditions.
[0023] Due to the frequent dramatic fluctuations in meteorological factors such as radiation intensity, ambient temperature, and air humidity, the photovoltaic power prediction models in related technologies are difficult to fit the actual photovoltaic power output curve, resulting in large deviations in the prediction results. This error directly affects the efficiency of grid scheduling and optimal allocation of energy resources.
[0024] For example, when encountering sudden changes from clear to cloudy weather or sudden changes in temperature and humidity, traditional models may not be able to promptly reflect changes in the actual output of photovoltaic panels. The predictions often cannot keep up with the fluctuations in actual power, thereby reducing the reliability of the predictions.
[0025] On the other hand, in recent years, with the surge in photovoltaic installed capacity, power grids in various places often experience load restrictions (i.e., limiting photovoltaic output) on sunny days, especially during the winter heating period. Although this artificial output restriction measure protects the safety of the power grid, it also causes historical power data to be inconsistent with actual irradiance, bringing additional difficulties to prediction.
[0026] Since renewable energy power generation participates in intraday trading in the electricity spot market, the accuracy requirements for ultra-short-term (within fifteen minutes to two hours) forecasts are becoming increasingly higher. Power plants need to report ultra-short-term power forecast results in advance and use them to formulate bidding strategies for intraday trading to increase profits.
[0027] In the scenario where load limits and drastic weather changes coexist, the errors of traditional forecasting methods are further amplified. Short-term and ultra-short-term forecasts will show chain deviations, for example, inaccurate weather forecasts will lead to inaccurate forecasts at all levels. As a result, the forecast models in related technologies are difficult to fit the actual photovoltaic power output curve, resulting in large deviations in the forecast results.
[0028] According to an embodiment of the present invention, an embodiment of a photovoltaic power prediction method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0029] In this embodiment, a photovoltaic power prediction method is provided. Figure 1 is a flow chart of a photovoltaic power prediction method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0030] Step S101: Acquire first historical power data and first historical meteorological data of a target photovoltaic station.
[0031] For example, the first historical power data may be obtained by collecting historical actual power output of the target photovoltaic station.
[0032] Exemplarily, the first historical meteorological data can be obtained through historical meteorological forecasts and collection equipment; wherein the first historical meteorological data includes the total radiation, temperature, humidity, etc. given by the historical meteorological forecast, and also includes the measured irradiance data collected by the collection equipment.
[0033] After obtaining the original data, steps such as data cleaning and preprocessing are performed on the first historical power data and the first historical meteorological data.
[0034] Step S102 : Decomposing the first historical power data based on the fluctuation characteristics of the first historical power data to obtain first long-term trend characteristics and corresponding first short-term fluctuation characteristics of the first historical power data at multiple preset time scales.
[0035] As described above, in the scenario where the above-mentioned load limit and drastic weather changes coexist, the historical power data fluctuates; in order to perform power forecasting taking into account the fluctuation of the historical power data, in this embodiment, the first historical power data is decomposed based on the fluctuation characteristics of the historical power data to obtain the first long-term trend characteristics and the corresponding first short-term fluctuation characteristics of the first historical power data at multiple preset time scales.
[0036] Among them, exemplarily, the decomposition of the first historical power data based on the fluctuation characteristics of the historical power data can be achieved by means of wavelet transform; wavelet transform is a signal processing method that can decompose time series data at different frequencies and time resolutions, and can simultaneously capture local fluctuations and global trends; in this embodiment, a discrete wavelet transform is performed on the first historical power data, and a multi-layer wavelet decomposition is performed on the power time series to obtain a set of wavelet coefficients [CA_1, CD_1,...,CD_n],...,[CA_i, CD_1,...,CD_n] in different frequency bands; wherein CA_i represents the approximation coefficient of the wavelet decomposition of the i-th layer, and [CA_1, CD_1,...,CD_n] represents the detail coefficients under the wavelet decomposition of each layer; the approximation coefficient is used to represent the first long-term trend of the historical power data, and the detail coefficient is used to represent the first short-term fluctuation under the wavelet decomposition of each layer. Each group of wavelet coefficients represents the dynamic characteristics of the first historical power data at each preset time scale. Wavelet decomposition is a general extension of the time sampling method in the related technology.
[0037] However, the wavelet decomposition (wavelet transform) method in the related art usually does not consider the time scale during the decomposition, but only performs multiple rounds of decomposition on the power series data or meteorological series data to obtain the approximation coefficient of the wavelet decomposition of the i-th layer and the detail coefficients under the wavelet decomposition of each layer, and further trains the related power prediction model through the approximation coefficient obtained by the last round of decomposition and the fluctuation coefficients obtained by the last round and / or the previous rounds of decomposition; the fluctuation characteristics decomposed by this method can reflect the fluctuation of the sequence data to a certain extent; however, the above process has high requirements on the quality of the original power series data and the decomposition process during wavelet decomposition.
[0038] On the one hand, the long-term trend characteristics and short-term fluctuation trends obtained by decomposition are highly correlated with the original power series data. The decomposition results obtained by the final decomposition can only reflect the long-term trend characteristics and short-term fluctuation trends of the original power series data at the corresponding fixed time scale, and cannot fully consider the power fluctuations of photovoltaic stations at different time scales based on the randomness of power fluctuations; on the other hand, the method of using wavelet decomposition for power prediction in related technologies, when the time scale of the prediction target is short (for example, for ultra-short-term power prediction of 15 minutes to 4 hours), requires multiple rounds of wavelet decomposition to extract detailed features with higher time resolution so as to perform power prediction at a shorter time scale. As the decomposition rounds (levels) increase step by step, the long-term trend characteristics obtained after multiple rounds of wavelet decomposition represent the power more finely. The long-term stable trend is highlighted, while the short-term fluctuations highlight the detailed features. However, too many rounds of wavelet decomposition may cause the extracted short-term fluctuations to be affected by factors such as noise in the power sequence and power mutations under the influence of power restriction. The extracted long-term trend features are lost in the fluctuations of the fixed time scale corresponding to the original power sequence due to too many rounds of decomposition. Moreover, in the related art, for the decomposed long-term trend features and short-term trends, a solution is usually adopted to train prediction branches for the long-term trend features and the short-term trends respectively, and then directly average the prediction results to obtain the final power prediction results. The deviation caused by constructing the model in the averaging process is inevitably averaged into the power prediction results. The above three factors lead to the poor prediction accuracy of the power prediction model finally trained when making predictions.
[0039] To solve the above problems, in the present invention, after obtaining the first historical power data, the first historical power data is decomposed based on the fluctuation characteristics of the first historical power data to obtain the first long-term trend characteristics and corresponding first short-term fluctuation characteristics of the first historical power data under multiple preset time scales.
[0040] Among them, the preset time scales are hours, day and night, day, week, and season.
[0041] For example, after obtaining the first historical power data, the first historical power data can be first intercepted according to a preset time scale to obtain first sub-historical power data sequences with preset time scales of hours, day and night, day, week, and season, respectively. Each sub-historical power data sequence is further decomposed to obtain the first long-term trend characteristics and corresponding first short-term fluctuation characteristics of the first historical power data at multiple preset time scales.
[0042] Exemplarily, before inputting the first long-term trend characteristics and the first short-term fluctuation characteristics under each preset time scale into the photovoltaic power prediction model, each set of wavelet scale features is input into an independent encoder network designed according to the preset time scale, and is mapped to a unified feature space for subsequent processing; the encoded preset time scale features are input into the model backbone structure to participate in subsequent prediction tasks.
[0043] Furthermore, after obtaining the first long-term trend characteristics and the first short-term fluctuation characteristics under each of the preset time scales, the first long-term trend characteristics, the first short-term fluctuation characteristics and the first historical meteorological data under each of the preset time scales are input into a pre-trained photovoltaic power prediction model to obtain a power prediction result.
[0044] Step S103, input the first long-term trend characteristics, the first short-term fluctuation characteristics and the first historical meteorological data under each of the preset time scales into a pre-trained photovoltaic power prediction model to obtain a power prediction result; wherein, the photovoltaic power prediction model is obtained by model training based on the second historical power data of the first time period, the third historical power data of the second time period and the second historical meteorological data; in the process of model training, the third historical power data is used as the target value, and the second long-term trend characteristics, the second short-term fluctuation characteristics, the second historical meteorological data and the third historical power data of the second historical power data under each of the preset time scales are learned based on the photovoltaic power prediction model, as well as the fusion relationship when the sub-power prediction results corresponding to each of the preset time scales are fused to obtain the power prediction result.
[0045] In this embodiment, the photovoltaic power prediction model is obtained by model training based on the second historical power data of the first time period, the third historical power data of the second time period and the second historical meteorological data; the first time period is adjacent to the second time period in time sequence, and the first time period is earlier than the second time period; in the process of model training, the third historical power data is used as the target value, and the second long-term trend characteristics, the second short-term fluctuation characteristics, the mapping relationship between the second historical meteorological data and the third historical power data of the second historical power data at each preset time scale are learned based on the photovoltaic power prediction model, and the fusion relationship when the sub-power prediction results corresponding to each preset time scale are fused to obtain the power prediction result is learned; that is, when the photovoltaic power model is trained, the short-term fluctuations and long-term trends of the historical power data at different preset time scales are considered.
[0046] In the above-mentioned embodiment of inputting the first long-term trend characteristics, the first short-term fluctuation characteristics, and the first historical meteorological data at each preset time scale into a pre-trained photovoltaic power prediction model to obtain a power prediction result, the photovoltaic power prediction model is trained by the mapping relationship between the second long-term trend characteristics, the second short-term fluctuation characteristics, the second historical meteorological data, and the third historical power data at each preset time scale. During model training, the specific fluctuation state of the power data at each preset time scale in the scenario where load limit and drastic meteorological changes coexist within the historical period, as well as the power performance of the third historical power data in the future period relative to the period corresponding to the fluctuation state can be considered. On the other hand, each preset time scale is independent of each other and has its own mapping relationship at each preset time scale, which can avoid interference from different preset time scales and improve the accuracy of power prediction at each preset time scale. Furthermore, by inputting the first long-term trend characteristics, the first short-term fluctuation characteristics, and the first historical meteorological data at each preset time scale into the photovoltaic power prediction model, the fluctuation state of the first historical power data within the historical period can be considered for power prediction, and the obtained power prediction result can represent the specific performance of power in the future period.
[0047] Step S104: weighted smoothing is performed on the power prediction result to obtain a photovoltaic power prediction result.
[0048] In order to further improve the practicality of the power prediction results output by the power prediction model, the present invention adds a post-processing step after obtaining the preliminary prediction value to smooth and correct the prediction curve.
[0049] For example, when performing weighted smoothing on the power prediction results, the triangular dynamic weighted window method can be used to smooth the prediction results; specifically, when calculating the smoothed value at a certain moment, the prediction values within a certain range before and after are considered, and the power value with the current moment as the center point is given the highest weight, and the weight gradually decreases linearly as it is farther away from the center.
[0050] The implementation scheme of weighted smoothing the power prediction results can effectively reduce sharp fluctuations or spikes on a short time scale while keeping the overall curve trend unchanged, making the prediction curve appear smoother and more coherent.
[0051] The power prediction method of the present invention obtains first historical power data and first historical meteorological data of a target photovoltaic station; decomposes the first historical power data based on the fluctuation characteristics of the first historical power data to obtain first long-term trend characteristics and corresponding first short-term fluctuation characteristics of the first historical power data at multiple preset time scales; inputs the first long-term trend characteristics, the first short-term fluctuation characteristics and the first historical meteorological data at each of the preset time scales into a pre-trained photovoltaic power prediction model to obtain a power prediction result; wherein, the photovoltaic power prediction model is obtained by model training based on the second historical power data of the first time period, the third historical power data of the second time period and the second historical meteorological data; in the process of model training, with the third historical power data as the target value, based on the photovoltaic power prediction model, learns the second long-term trend characteristics, the second short-term fluctuation characteristics, the mapping relationship between the second historical meteorological data and the third historical power data of the second historical power data at each of the preset time scales, and learns the fusion relationship when the sub-power prediction results corresponding to each of the preset time scales are fused to obtain the power prediction result; weighted smoothing is performed on the power prediction result to obtain the photovoltaic power prediction result; In the above-mentioned embodiment of inputting the first long-term trend characteristics, the first short-term fluctuation characteristics, and the first historical meteorological data at each preset time scale into a pre-trained photovoltaic power prediction model to obtain a power prediction result, the photovoltaic power prediction model is trained by the mapping relationship between the second long-term trend characteristics, the second short-term fluctuation characteristics, the second historical meteorological data, and the third historical power data at each preset time scale. During model training, the specific fluctuation state of the power data at each preset time scale in the scenario where load limit and drastic meteorological changes coexist within the historical period, as well as the power performance of the third historical power data in the future period relative to the period corresponding to the fluctuation state can be considered. On the other hand, each preset time scale is independent of each other and has its own mapping relationship at each preset time scale, which can avoid interference from different preset time scales and improve the accuracy of power prediction at each preset time scale. Furthermore, by inputting the first long-term trend characteristics, the first short-term fluctuation characteristics, and the first historical meteorological data at each preset time scale into the photovoltaic power prediction model, the fluctuation state of the first historical power data within the historical period can be considered for power prediction, and the obtained power prediction result can represent the specific performance of power in the future period.
[0052] Data cleaning in related technologies usually uses simple mean or linear interpolation to deal with outliers and missing values, but this rough method cannot accurately identify and process abnormal data, which may lead to a decline in the data quality of the model input.
[0053] To solve the above problem, as an exemplary embodiment, after obtaining the first historical power data and the first historical meteorological data of the target photovoltaic station, the photovoltaic power prediction method also includes: in the first historical power data, calculating the power change of the power at adjacent moments; marking the historical power data whose power change is negative and the absolute value of the power change is greater than a first preset value, or whose absolute value of the power change is less than a second preset value and lasts for a preset period as abnormal historical power data; the second preset value is approximately zero; filtering the power data that is prior to the abnormal historical power data in time sequence to obtain the first target power value where the power change is positive for the first time or the absolute value of the change is less than or equal to the first preset value, or the second target power value where the absolute value is greater than the second preset value for the first time; correcting the abnormal historical power data based on the numerical change trend of the first target power value and / or the second target power value to obtain first corrected power data.
[0054] In this embodiment, for the first historical power data obtained, the power variation is calculated, and further, historical power data whose power variation is negative and whose absolute value is greater than a first preset value (indicating that at a certain moment there may be a sudden and substantial drop in power due to a data feedback error or the photovoltaic station receiving a power restriction instruction), or whose absolute value is less than a second preset value and lasts for a preset period of time, is marked as abnormal historical power data; and power values whose second preset value is approximately zero (indicating that within a period of time there may be a momentary drop in power to a low point close to zero or to zero due to a data feedback error or the photovoltaic station receiving a power restriction instruction) are marked as abnormal historical power data; the above-mentioned method of marking abnormal historical power data based on power variation, compared with the traditional method relying on thresholds or simple interpolation, this differential-based anomaly detection can more sensitively capture sudden drops in power and abnormally flat sections, thereby precisely locating the abnormal points.
[0055] Furthermore, an upward interpolation method is used to screen the power data whose time series precedes the abnormal historical power data, and a first target power value is obtained when the power change is positive for the first time or the absolute value of the change is less than or equal to a first preset value, or a second target power value is obtained when the absolute value is greater than a second preset value for the first time; the abnormal historical power data is corrected based on the numerical change trend of the first target power value and the second target power value to obtain first corrected power data; the above-mentioned upward interpolation method shows excellent stability in filling missing values in the new energy field, especially when there is a long period of data gap, forward interpolation can provide a smooth and reasonable transition, and will not introduce excessive fluctuations like simple linear interpolation.
[0056] In addition, considering that under special circumstances such as load limit on sunny days, the relationship between the actual photovoltaic output and the solar irradiance will deviate abnormally, the present invention further sets a correlation threshold filtering mechanism to further screen the historical power data according to the correlation coefficient between the measured irradiance data and the actual power data.
[0057] Specifically, as an exemplary embodiment, the historical meteorological data includes historical measured irradiance data. After obtaining first historical power data and first historical meteorological data of the target photovoltaic station, the photovoltaic power prediction method further includes:
[0058] Extracting historical measured irradiance data corresponding to the first historical power data time series from the historical meteorological data;
[0059] Calculate the correlation coefficient between the historical measured irradiance and the first historical power data corresponding to the time series on a daily basis;
[0060] Eliminate the first historical power data whose correlation coefficient is less than a preset correlation coefficient; wherein the preset correlation coefficient takes any value within the interval [0.8, 1];
[0061] In this embodiment, the correlation coefficient of the historical measured irradiance and the first historical power data corresponding to the time series is calculated on a daily time scale; if the correlation coefficient is lower than the preset correlation coefficient, it is considered that the photovoltaic output on that day is inconsistent with the normal illumination-power generation mode. For example, there may be sunshine on a sunny day but the output is limited due to load limiting and peak shaving, or the data on that day is interfered by abnormal factors; the first historical power data below the threshold is filtered to eliminate these abnormal data with meteorological-power mismatch, ensuring that the data input to the model is more accurate and reliable.
[0062] After the above cleaning steps, the quality of the historical data set used by the model is greatly improved, laying a solid foundation for subsequent predictions.
[0063] As an exemplary embodiment, the method for training the photovoltaic power prediction model includes:
[0064] Obtain the second historical power data of the first time period, the third historical power data of the second time period and the second historical meteorological data corresponding to the time series of the second historical power data of the target photovoltaic station; wherein, the first time period is adjacent to the second time period in time series, and the first time period is earlier than the second time period; decompose the second historical power data to obtain the second long-term trend characteristics and the corresponding second short-term fluctuation characteristics of the second historical power data at multiple preset time scales; input the second historical power data and the second historical meteorological data into a pre-built photovoltaic power prediction model for model training; during the model training process, take the third historical power data as the target value, and learn the mapping relationship between the second long-term trend characteristics, the second short-term fluctuation characteristics and the second historical meteorological data and the third historical power data of the second historical power data at each preset time scale based on the photovoltaic power prediction model, as well as learn the fusion relationship when the sub-power prediction results corresponding to each preset time scale are fused to obtain the power prediction result.
[0065] Exemplarily, the first time period may be a season, and the second time period may be a target prediction duration for photovoltaic power prediction.
[0066] Exemplarily, the photovoltaic power prediction model is used to perform ultra-short-term photovoltaic power prediction, and the second time period is 15 minutes to 4 hours.
[0067] Exemplarily, the photovoltaic power prediction model is used to perform short-term photovoltaic power prediction, and the second time period is 24 hours, 32 hours, or 72 hours.
[0068] Illustratively, after obtaining the second historical power data of the target photovoltaic station in the first period and the third historical power data in the second period, the abnormal historical power data correction as in the above embodiment is performed on the second historical power data and the third historical power data.
[0069] Furthermore, the corrected second historical power data is decomposed to obtain second long-term trend characteristics and corresponding second short-term fluctuation characteristics of the second historical power data at multiple preset time scales.
[0070] For example, after obtaining the second historical power data, the second historical power data can be decomposed based on the fluctuation characteristics of the second historical power data to obtain the first long-term trend characteristics and corresponding second short-term fluctuation characteristics of the second historical power data at multiple preset time scales.
[0071] Among them, the preset time scales are hours, day and night, day, week, and season.
[0072] For example, after obtaining the second historical power data, the second historical power data can be first intercepted according to a preset time scale to obtain second sub-historical power data sequences with preset time scales of hours, day and night, day, week, and season, respectively. Each second sub-historical power data sequence is further decomposed to obtain the second long-term trend characteristics and corresponding second short-term fluctuation characteristics of the second historical power data at multiple preset time scales.
[0073] Exemplarily, the wavelet decomposition method can be used to perform multi-layer wavelet decomposition on the second historical power data to obtain long-term trend characteristics and short-term fluctuation characteristics; specifically, the second historical power data is subjected to discrete wavelet transform (DWT) to obtain detail coefficients and approximation coefficients of each layer of wavelet transform; wherein the approximation coefficient is used to represent the second long-term trend characteristics of the second historical power data, and the detail coefficient is used to represent the second short-term fluctuation characteristics under each layer of wavelet decomposition, and each group of wavelet coefficients represents the dynamic characteristics of the first historical power data at each preset time scale.
[0074] The above method performs wavelet decomposition on the second historical power data according to a preset time scale; compared with the wavelet decomposition method in the related art, it can obtain the long-term trend characteristics and short-term fluctuation characteristics of the second historical power data at multiple preset time scales.
[0075] In one embodiment, for the obtained multiple second sub-historical power data sequences, different scaling functions and wavelet functions may be set based on the fluctuation characteristics of the second sub-historical power data sequences to match the fluctuation state of each second sub-historical power data sequence.
[0076] In one embodiment, for the obtained multiple second sub-historical power data sequences, different scaling functions and wavelet functions can be set based on the fluctuation characteristics of the second sub-historical power data sequences, and different wavelet decomposition layers can be set based on the fluctuation characteristics of the second sub-historical power data sequences to match the fluctuation state of each second sub-historical power data sequence.
[0077] Furthermore, each set of wavelet scale features is input into an independent encoder network designed according to a preset time scale, and mapped into a unified feature space for subsequent processing; the encoded preset time scale features are input into the pre-built photovoltaic power model backbone structure to participate in subsequent training tasks.
[0078] Furthermore, the mapped second historical power data and the second historical meteorological data are input into a pre-built photovoltaic power prediction model for model training; during the model training process, the third historical power data is used as the target value, and based on the photovoltaic power prediction model, the second long-term trend characteristics, the second short-term fluctuation characteristics and the mapping relationship between the second historical meteorological data and the third historical power data of the second historical power data at each preset time scale are learned, as well as the fusion relationship when the sub-power prediction results corresponding to each preset time scale are fused to obtain the power prediction result.
[0079] The above method, on the one hand, inputs the long-term trend and short-term fluctuation of the second historical power data at multiple preset time scales obtained by wavelet decomposition of the second historical power data according to the preset time scale into the photovoltaic power prediction model for model training. During model training, the long-term trend characteristics and short-term fluctuation characteristics at multiple preset time scales have different time domain resolutions, and the model can learn the correspondence between the power fluctuation situation and the power value at each time domain resolution.
[0080] As mentioned above, in the wavelet decomposition method in the related art, too many rounds of wavelet decomposition may cause the extracted short-term fluctuations to be factors such as noise in the power sequence, power mutations under the influence of power restriction, etc., and the extracted long-term trend characteristics are lost due to too many rounds of decomposition, resulting in the fluctuation of the fixed preset time scale corresponding to the original power sequence, resulting in inaccurate prediction results of the power prediction model finally trained.
[0081] To solve this problem, in the present invention, after obtaining the long-term trend characteristics and short-term fluctuation characteristics of multiple preset time scales, a feature correction model is further constructed during model training to correct the fluctuation characteristics; exemplarily, after obtaining the second long-term trend characteristics and the second short-term trend characteristics, in order to further enhance the interaction ability between information of different time scales, a neural network is constructed based on the second long-term trend characteristics and the second short-term trend characteristics, and the nonlinear dependency relationship between the second long-term trend characteristics and the second short-term trend characteristics between different time scale channels is learned through the neural network.
[0082] Based on this, as an exemplary embodiment, after decomposing the first historical power data based on the fluctuation characteristics of the first historical power data to obtain the first long-term trend characteristics and the corresponding first short-term fluctuation characteristics of the first historical power data at multiple preset time scales, the photovoltaic power prediction method also includes: inputting the first long-term trend characteristics and the first short-term fluctuation characteristics into a pre-constructed feature correction model, and using the feature correction model to correct the first long-term trend characteristics and / or the first short-term fluctuation characteristics based on the mapping relationship between the second long-term trend characteristics and the second short-term fluctuation characteristics; wherein the feature correction model is trained based on the second long-term trend characteristics and the second short-term fluctuation characteristics, and the feature correction model is composed of a first fully connected layer, a second fully connected layer and a ReLU activation function; the first fully connected layer is used to input the second long-term trend characteristics, the second fully connected layer is used to input the second short-term trend characteristics, and the first fully connected layer and the second fully connected layer are activated by the ReLU activation function; during the model training process, the model parameters of the feature correction model are continuously adjusted so that the feature correction model learns the mapping relationship between the second long-term trend characteristics and the second short-term fluctuation characteristics.
[0083] The above implementation method can establish a nonlinear dependency relationship between channels of different scales through a feature correction model, thereby more accurately capturing the coupling behavior between multiple scales; the first long-term trend feature and the first short-term fluctuation feature are input into a pre-constructed feature correction model method. On the one hand, when the long-term trend feature undergoes an abnormal mutation, the stable trend information provided by the short-term fluctuation feature can be used to correct it, making the overall model more robust to drastic weather changes.
[0084] As an exemplary embodiment, the photovoltaic power prediction model includes multiple sub-prediction networks and weighted fusion modules corresponding to the preset time scales, and the second historical power data and the second historical meteorological data are input into a pre-built photovoltaic power prediction model for model training, including: inputting the second long-term trend characteristics, the second short-term fluctuation characteristics and the second historical meteorological data under each preset time scale into the sub-prediction network corresponding to each preset time scale for training; during the training process, taking the third historical power data as the target value, continuously adjusting the network parameters of each sub-prediction network, so that each sub-prediction network learns the corresponding relationship between the second long-term trend characteristics, the second short-term fluctuation characteristics, the second historical meteorological data and the third historical power data under the corresponding preset time scale until each sub-prediction network converges; based on the weighted fusion module, the fusion relationship when the sub-power prediction results corresponding to each preset time scale are fused to obtain the power prediction result.
[0085] In this embodiment, the photovoltaic power prediction model includes a plurality of sub-prediction networks corresponding to the preset time scale and a weighted fusion module; wherein, each sub-prediction network takes the third historical power data as the target value, and inputs the second long-term trend characteristics, the second short-term fluctuation characteristics and the second historical meteorological data corresponding to the preset time scale for training; when performing model training, the features extracted at different wavelet scales are respectively sent to a plurality of sub-prediction networks with relatively independent structures and their own exclusive network weights. Each sub-prediction network is trained for the features of a specific scale and outputs the power prediction estimate at the current scale, which can avoid interference between different scales and improve the accuracy and stability of each sub-prediction network.
[0086] Exemplarily, the sub-prediction network may be a decoupled sub-predictor.
[0087] Furthermore, after all sub-prediction networks have completed their individual predictions, the photovoltaic power prediction model fuses the sub-power prediction results of each sub-prediction network through a weighted fusion module to obtain the photovoltaic power prediction result.
[0088] Among them, exemplarily, the weighted fusion module can adopt a multi-head attention mechanism to assign a fusion weight to each sub-prediction network output based on the input features and the historical prediction error feedback of each sub-prediction network, and finally fuse the sub-power prediction results based on the fusion weight to obtain the power prediction result.
[0089] Specifically, the weighted fusion module can be a hierarchical attention fusion module (HAF), which is used to integrate prediction results of different scales; this module uses a multi-head attention mechanism to assign a fusion weight to each sub-prediction network output based on the input features and historical error feedback. , and finally use formula (1) to aggregate and output the predicted value:
[0090] (1)
[0091] In formula (1), represents the power prediction result, represents the fusion weight of the i-th sub-prediction network, Represents the sub-power prediction result of the i-th sub-prediction network, and the sum of the fusion weights of all sub-prediction networks is 1.
[0092] In one embodiment, when assigning a weight to each sub-prediction network output based on the input features and the historical prediction error feedback of each sub-prediction network, as a possible implementation method, the corresponding fusion weight can be matched according to the prediction error of each sub-prediction network on the test set; wherein the fusion weight is positively correlated with the prediction error.
[0093] In one embodiment, when a weight is assigned to the output of each sub-prediction network based on the input characteristics and the historical prediction error feedback of each sub-prediction network, the correspondence between the second long-term trend characteristics and the second short-term trend characteristics and the fusion weight can be learned based on the test results of each sub-prediction network; when the photovoltaic power prediction is subsequently performed, the fusion weight is determined based on the first long-term trend characteristics, the first short-term trend characteristics and the corresponding relationship.
[0094] As an exemplary embodiment, the first historical power data is decomposed based on the fluctuation characteristics of the first historical power data to obtain the first long-term trend characteristics and the corresponding first short-term fluctuation characteristics of the first historical power data at multiple preset time scales, including: obtaining the preset scale function and preset wavelet function corresponding to each of the preset time scales when performing wavelet decomposition; performing discrete wavelet decomposition on the first historical power data based on each of the scale functions and wavelet functions in turn to obtain the approximation coefficient and detail coefficient corresponding to each of the preset time scales; wherein the approximation coefficient is used to represent the first long-term trend characteristics of the historical power data at the current preset time scale, and the detail coefficient is used to represent the first short-term fluctuation characteristics at the current preset time scale.
[0095] As an exemplary embodiment, the power prediction result is weighted and smoothed to obtain a photovoltaic power prediction result, including: in the power prediction result, traversing each power prediction value, and taking a first preset number of target power prediction values before and after the power prediction value as a predicted power data sequence; determining a smoothing weight of each target power prediction value based on the sequence distance of each target power prediction value relative to the power prediction value in each predicted power data sequence; wherein each smoothing weight is inversely correlated with the sequence distance; and correcting each power prediction value based on each smoothing weight and each target power prediction value to obtain a photovoltaic power prediction result.
[0096] In this embodiment, in order to further improve the practicality of the power prediction results output by the power prediction model, the present invention adds a post-processing step after obtaining the preliminary prediction value to smooth and correct the prediction curve.
[0097] Specifically, in the power prediction result, each power prediction value is traversed, and the first preset number of target power prediction values before and after the power prediction value are taken as a predicted power data sequence; the smoothing weight of each target power prediction value is determined based on the sequence distance of each target power prediction value in each predicted power data sequence relative to the power prediction value; wherein each smoothing weight is inversely correlated with the sequence distance; based on each smoothing weight and each target power prediction value, each power prediction value is corrected to obtain a photovoltaic power prediction result.
[0098] Specifically, at a moment t corresponding to each of the power prediction values, a first preset number of target power values before and after are selected as a predicted power data sequence; and the smoothing weight of each of the target power prediction values in each of the predicted power data sequences is determined based on the sequence distance of each of the target power prediction values relative to the power prediction value.
[0099] The smoothed power It can be calculated according to formula (2):
[0100] (2)
[0101] In formula (2), is the smoothed power, is the original prediction value in the window, and the smoothing weight is ω k , k is the sequence distance between each target power prediction value and the power prediction value, as |k| increases (i.e., the farther away from the time center t corresponding to the power prediction value), ω k The smaller the ω k Decrease linearly to 0 according to the triangle rule.
[0102] The above smoothing method can effectively reduce the sharp fluctuations or spikes on a short time scale while keeping the overall curve trend unchanged, making the prediction curve appear smoother and more coherent.
[0103] In the present invention, the power prediction results are further smoothed by further considering the differences in time points or output characteristics; specifically, as an exemplary embodiment, the photovoltaic power prediction method also includes: in the power prediction results, calculating the power change rate of each power prediction value relative to N adjacent power prediction values that are earlier and / or later in time sequence; wherein N is a positive integer; obtaining the power change rate corresponding to each of the power prediction values; determining the first preset number based on the power change rate; wherein the first preset number is inversely correlated with the change rate.
[0104] In this embodiment, a power change rate of each power prediction value relative to N adjacent power prediction values preceding and / or following the power prediction value is calculated, where N is a positive integer. The power change rate corresponding to each power prediction value is obtained. A first preset number is determined based on the power change rate to adjust the number of target power prediction values selected during smoothing based on the time point or output characteristics of the photovoltaic station. In the above embodiment, during periods of large slope changes in photovoltaic output, such as early morning sunrise and evening sunset, a smaller window can be used to preserve the details of the changes. During periods of stable output at noon, a slightly larger window can be used to filter out minor fluctuations. Compared with the traditional method of using a fixed sliding average window, this dynamic weighted smoothing strategy has dual advantages: on the one hand, it ensures the effectiveness of the smoothing process (removing irrelevant noise without excessively weakening the actual change signal); on the other hand, it improves the interpretability of the results (using different smoothing intensities at different stages, which is more consistent with actual physical meaning). The smoothed photovoltaic power prediction curve is more stable and closer to reality, making it more valuable for grid scheduling and power station operation.
[0105] This embodiment provides a photovoltaic power prediction device, such as Figure 2 As shown, including:
[0106] An acquisition module 501 is configured to acquire first historical power data and first historical meteorological data of a target photovoltaic station;
[0107] a decomposition module 502 configured to decompose the first historical power data based on the fluctuation characteristics of the first historical power data to obtain first long-term trend characteristics and corresponding first short-term fluctuation characteristics of the first historical power data at multiple preset time scales;
[0108] The power prediction module 503 is used to input the first long-term trend characteristics, the first short-term fluctuation characteristics and the first historical meteorological data at each of the preset time scales into a pre-trained photovoltaic power prediction model to obtain a power prediction result; wherein, the photovoltaic power prediction model is obtained by model training based on the second historical power data of the first time period, the third historical power data of the second time period and the second historical meteorological data; during the model training process, the third historical power data is used as the target value, and the mapping relationship between the second long-term trend characteristics, the second short-term fluctuation characteristics, the second historical meteorological data and the third historical power data of the second historical power data at each of the preset time scales is learned based on the photovoltaic power prediction model, and the fusion relationship when the sub-power prediction results corresponding to each of the preset time scales are fused to obtain the power prediction result is learned;
[0109] The smoothing module 504 is configured to perform weighted smoothing on the power prediction result to obtain a photovoltaic power prediction result.
[0110] It should be noted here that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments.
[0111] It should be noted that the above modules as part of the device can be implemented through software or hardware, wherein the hardware environment includes a network environment.
[0112] An embodiment of the present invention also provides a computer device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus, the memory is used to store computer programs; the processor is used to execute the method in any of the above embodiments by running the computer program stored in the memory.
[0113] Figure 3 is a structural block diagram of an optional computer device according to an embodiment of the present application, such as Figure 3 As shown, it includes a processor 10, a communication interface 20, a memory 30 and a communication bus 40, wherein the processor 10, the communication interface 20 and the memory 30 communicate with each other through the communication bus 40, wherein,
[0114] Memory 30, for storing computer programs;
[0115] The processor 10 is configured to implement the method of any of the above embodiments when executing the computer program stored in the memory 30 .
[0116] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0117] The communication interface is used for communication between the above-mentioned computer device and other devices.
[0118] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Alternatively, the memory may also be at least one storage device located away from the aforementioned processor.
[0119] The above-mentioned processor can be a general-purpose processor, which can include but is not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0120] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0121] It can be understood by those skilled in the art that Figure 3 The structure shown is for illustration only. The device for implementing any one of the methods in the above embodiments may be a terminal device, which may be a smart phone (such as an Android phone, an IOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, or other terminal devices. Figure 3 It does not limit the structure of the above electronic device. For example, the terminal device may also include Figure 3 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 3 Different configurations shown.
[0122] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0123] As an exemplary embodiment, the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute any one of the method steps of the present embodiment when run.
[0124] Optionally, in this embodiment, the above-mentioned storage medium can be used to execute the program code of the method steps of the embodiment of the present application.
[0125] Optionally, in this embodiment, the above-mentioned storage medium may be located on at least one network device among the multiple network devices in the network shown in the above-mentioned embodiment.
[0126] Optionally, in this embodiment, the storage medium is configured to store data for executing the method in the above embodiment.
[0127] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.
[0128] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.
[0129] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0130] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above-mentioned computer-readable storage medium. Based on this understanding, the technical solution of this application, or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a number of instructions for causing one or more computer devices (such as personal computers, servers, or network devices) to execute all or part of the steps of the method in the above embodiments.
[0131] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is merely a logical functional division. In actual implementation, there may be other division methods, such as combining or integrating multiple units or components into another system, or ignoring or not implementing some features. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interface, indirect coupling or communication connection of units or modules, and may be electrical or other forms.
[0132] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected based on actual needs to achieve the purpose of the solution provided in this embodiment.
[0133] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0134] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0135] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A photovoltaic power prediction method, characterized in that: The photovoltaic power prediction method comprises: Acquire first historical power data and first historical meteorological data of a target photovoltaic station; Decomposing the first historical power data based on the fluctuation characteristics of the first historical power data to obtain first long-term trend characteristics and corresponding first short-term fluctuation characteristics of the first historical power data at multiple preset time scales; The first long-term trend feature, the first short-term fluctuation feature and the first historical meteorological data at each of the preset time scales are input into a pre-trained photovoltaic power prediction model to obtain a power prediction result; wherein, the photovoltaic power prediction model is obtained by model training based on the second historical power data of the first time period, the third historical power data of the second time period and the second historical meteorological data; during the model training process, the third historical power data is used as the target value, and the second long-term trend feature, the second short-term fluctuation feature, the second historical meteorological data and the third historical power data of the second historical power data at each of the preset time scales are learned based on the photovoltaic power prediction model, and the fusion relationship when the sub-power prediction results corresponding to each of the preset time scales are fused to obtain the power prediction result is learned; The power prediction result is weighted and smoothed to obtain a photovoltaic power prediction result.
2. The photovoltaic power prediction method according to claim 1, wherein: The method for training the photovoltaic power prediction model includes: Acquire second historical power data of a first time period, third historical power data of a second time period, and second historical meteorological data corresponding to a time series of the second historical power data of a target photovoltaic station; wherein the first time period is adjacent to the second time period in time series, and the first time period is earlier than the second time period; Decomposing the second historical power data to obtain second long-term trend characteristics and corresponding second short-term fluctuation characteristics of the second historical power data at multiple preset time scales; The second historical power data and the second historical meteorological data are input into a pre-built photovoltaic power prediction model for model training; during the model training process, the third historical power data is used as the target value, and the second long-term trend characteristics, the second short-term fluctuation characteristics and the mapping relationship between the second historical meteorological data and the third historical power data under each of the preset time scales are learned based on the photovoltaic power prediction model, as well as the fusion relationship when the sub-power prediction results corresponding to each of the preset time scales are fused to obtain the power prediction result.
3. The photovoltaic power prediction method according to claim 2, wherein: The photovoltaic power prediction model includes a plurality of sub-prediction networks corresponding to the preset time scale and a weighted fusion module, and the inputting of the second historical power data and the second historical meteorological data into the pre-built photovoltaic power prediction model for model training includes: inputting the second long-term trend characteristics, the second short-term fluctuation characteristics, and the second historical meteorological data at each preset time scale into the sub-prediction network corresponding to each preset time scale for training; during the training process, taking the third historical power data as a target value, continuously adjusting the network parameters of each sub-prediction network, so that each sub-prediction network learns the corresponding relationship between the second long-term trend characteristics, the second short-term fluctuation characteristics, the second historical meteorological data, and the third historical power data at the corresponding preset time scale, until each sub-prediction network converges; The weighted fusion module learns and fuses the sub-power prediction results corresponding to the preset time scales to obtain a fusion relationship when the power prediction result is obtained.
4. The photovoltaic power prediction method according to claim 3, wherein: After decomposing the first historical power data based on the fluctuation characteristics of the first historical power data to obtain first long-term trend characteristics and corresponding first short-term fluctuation characteristics of the first historical power data at multiple preset time scales, the photovoltaic power prediction method further includes: The first long-term trend feature and the first short-term fluctuation feature are input into a pre-constructed feature correction model, and the feature correction model is used to correct the first long-term trend feature and / or the first short-term fluctuation feature based on the mapping relationship between the second long-term trend feature and the second short-term fluctuation feature; wherein, the feature correction model is trained based on the second long-term trend feature and the second short-term fluctuation feature, and the feature correction model consists of a first fully connected layer, a second fully connected layer and a ReLU activation function; the first fully connected layer is used to input the second long-term trend feature, and the second fully connected layer is used to input the second short-term trend feature, and the first fully connected layer and the second fully connected layer are activated by the ReLU activation function; during the model training process, the model parameters of the feature correction model are continuously adjusted so that the feature correction model learns the mapping relationship between the second long-term trend feature and the second short-term fluctuation feature.
5. The photovoltaic power prediction method according to claim 1, wherein: Before decomposing the first historical power data based on the fluctuation characteristics of the historical power data, the photovoltaic power prediction method further includes: Acquire historical measured irradiance data that matches the time series of the first historical power data; Calculating a correlation coefficient between the historical measured irradiance data and the first historical power data that matches the time series; The first historical power data having the correlation coefficient smaller than a preset correlation coefficient is eliminated.
6. The photovoltaic power prediction method according to claim 1, wherein: The step of performing weighted smoothing on the power prediction result to obtain a photovoltaic power prediction result includes: In the power prediction result, traverse each power prediction value and take a first preset number of target power prediction values before and after the power prediction value as a predicted power data sequence; determining a smoothing weight of each target power prediction value based on a sequence distance between each target power prediction value and the power prediction value in each predicted power data sequence; wherein each smoothing weight is inversely correlated with the sequence distance; Each of the power prediction values is corrected based on each of the smoothing weights and each of the target power prediction values to obtain a photovoltaic power prediction result.
7. The photovoltaic power prediction method according to claim 6, wherein: The photovoltaic power prediction method further includes: In the power prediction result, the power change rate of each power prediction value relative to N adjacent power prediction values that are preceding and / or following in time sequence is calculated; wherein N is a positive integer; Obtaining the power change rate corresponding to each of the power prediction values; The first preset number is determined based on the power change rate; wherein the first preset number is inversely correlated with the change rate.
8. A photovoltaic power prediction device, characterized in that: The photovoltaic power prediction device comprises: An acquisition module, configured to acquire first historical power data and first historical meteorological data of a target photovoltaic station; a decomposition module, configured to decompose the first historical power data based on the fluctuation characteristics of the first historical power data to obtain first long-term trend characteristics and corresponding first short-term fluctuation characteristics of the first historical power data at multiple preset time scales; A power prediction module is used to input the first long-term trend characteristics, the first short-term fluctuation characteristics and the first historical meteorological data at each preset time scale into a pre-trained photovoltaic power prediction model to obtain a power prediction result; wherein, the photovoltaic power prediction model is obtained by model training based on the second historical power data of the first time period, the third historical power data of the second time period and the second historical meteorological data; during the model training process, the third historical power data is used as the target value, and the mapping relationship between the second long-term trend characteristics, the second short-term fluctuation characteristics, the second historical meteorological data and the third historical power data of the second historical power data at each preset time scale is learned based on the photovoltaic power prediction model, and the fusion relationship when the sub-power prediction results corresponding to each preset time scale are fused to obtain the power prediction result is learned; The smoothing module is used to perform weighted smoothing on the power prediction result to obtain a photovoltaic power prediction result.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the photovoltaic power prediction method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the photovoltaic power prediction method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Photovoltaic output power prediction method and system and storage medium
CN109840633A
Power efficiency optimization method based on intelligent load management
CN119578923A