Search

CN-116050627-B - Photovoltaic power prediction method and photovoltaic power prediction model training method

CN116050627BCN 116050627 BCN116050627 BCN 116050627BCN-116050627-B

Abstract

The application relates to a photovoltaic power prediction method, in particular to the technical field of photovoltaic power. The method comprises the steps of obtaining a target input sequence, carrying out sequence decomposition on the target input sequence to obtain an initialization period item and an initialization trend item, carrying out time feature extraction on the target input sequence to obtain a first time vector and a second time vector, processing the target input sequence and the first time vector according to an encoder in a photovoltaic power prediction model to obtain a coding result, inputting the initialization period item, the second time vector and the coding result into a first branch of a decoder in the photovoltaic power prediction model to obtain a first sub-result output by the decoder, inputting the initialization trend item into a second branch of the decoder to obtain a second sub-result, and determining the photovoltaic power result based on a fusion result of the first sub-result and the second sub-result. The photovoltaic power result predicted based on the scheme has higher accuracy.

Inventors

  • JIANG WEN
  • Fei Yuanyu
  • ZENG WEIBO

Assignees

  • 固德威技术股份有限公司

Dates

Publication Date
20260512
Application Date
20230130

Claims (9)

  1. 1. A method of photovoltaic power prediction, the method comprising: the method comprises the steps of obtaining a target input sequence, wherein the target input sequence is used for indicating the photovoltaic power generation condition of photovoltaic equipment in corresponding weather in a target time period; Performing sequence decomposition on the target input sequence to obtain an initialization period item and an initialization trend item; Extracting time features of the target input sequence to obtain a first time vector and a second time vector, wherein the first time vector is used for indicating the time stamp of each data of the target input sequence; processing the target input sequence and the first time vector according to an encoder in a photovoltaic power prediction model to obtain a coding result, wherein the encoder comprises an autocorrelation mechanism unit and a sequence decomposition unit which are sequentially connected, and the photovoltaic power prediction model is Autoformer model; Inputting an initialization period item, a second time vector and the coding result into a first branch of a decoder in the photovoltaic power prediction model to obtain a first sub-result output by the decoder, wherein the first branch of the decoder comprises at least one pair of autocorrelation mechanism units and a sequence decomposition unit which are connected in sequence; inputting the initialization trend item into a second branch of the decoder to obtain a second sub-result; Determining a photovoltaic power result based on the fusion result of the first sub-result and the second sub-result; The step of inputting the initialization period term, the second time vector and the encoding result into a first branch of a decoder in the photovoltaic power prediction model to obtain a first sub-result output by the decoder comprises the following steps: inputting the initialization period item and the second time vector into a first branch of the decoder to be processed by a first autocorrelation mechanism unit and a first sequence decomposition unit to obtain an intermediate vector; Processing the intermediate vector and the coding result sequentially through a second autocorrelation mechanism unit, a second sequence decomposition unit, a first feedforward neural network and a third sequence decomposition unit to obtain a first sub-result; The inputting the initialization trend term into the second branch of the decoder to obtain a second sub-result includes: Inputting the initialization trend item into a second branch of the decoder, and sequentially fusing the initialization trend item with the first sub trend item obtained by decomposing the first sequence decomposition unit, the second sub trend item obtained by decomposing the second sequence decomposition unit and the third sub trend item obtained by decomposing the third sequence decomposition unit to obtain a second sub result.
  2. 2. The method of claim 1, wherein performing sequence decomposition on the target input sequence to obtain an initialization period term and an initialization trend term comprises: Carrying out average pooling operation on the target input sequence to obtain an initialization trend item; and generating the initialization period item based on the difference value between the target input sequence and the initialization trend item.
  3. 3. The method of claim 1, wherein the performing the temporal feature extraction on the target input sequence to obtain a first temporal vector and a second temporal vector comprises: The method comprises the steps of carrying out feature extraction on time stamps of all data of a target input sequence to obtain time stamp data corresponding to all data respectively, wherein the time stamp data are used for indicating at least one time position, and the time position comprises the number of minutes in the current hour, the number of hours in the current day, the number of days in the current week, the number of days in the current month and the number of days in the current year; Generating the first time vector according to the timestamp data respectively corresponding to each data of the target input sequence; And generating the second time vector according to the time stamp information respectively corresponding to the data of the designated time interval of the target input sequence.
  4. 4. The method of claim 1, wherein the obtaining the target input sequence comprises: The method comprises the steps of obtaining target power generation data and target weather data, wherein the target power generation data are used for indicating the photovoltaic power generation condition of photovoltaic equipment in a target time period, and the target weather data are used for indicating the weather condition in the target time period; The method comprises the steps of obtaining historical forecast radiation and historical actual measurement radiation, wherein the historical forecast radiation is used for indicating the expected irradiance in a target time period, and the historical actual measurement radiation is used for indicating the actual irradiance in the target time period; generating irradiance errors according to the difference between the historical forecast radiation and the historical actual measurement radiation; and generating the target input sequence according to the target power generation data, the target weather data and the irradiance error.
  5. 5. A method for training a photovoltaic power prediction model, the method comprising: The method comprises the steps of obtaining a sample input sequence and a sample label corresponding to the sample input sequence, wherein the sample input sequence is used for indicating the photovoltaic power generation condition of photovoltaic equipment in corresponding weather in a first sample time period; performing sequence decomposition on the sample input sequence to obtain an initialized sample period item and an initialized sample trend item; extracting time features of the sample input sequence to obtain a first sample vector and a second sample vector, wherein the first sample vector is used for indicating the time stamp of each data of the sample input sequence; processing the sample input sequence and the first sample time vector according to an encoder in a photovoltaic power prediction model to obtain a sample coding result, wherein the encoder comprises an autocorrelation mechanism unit and a sequence decomposition unit which are sequentially connected, and the photovoltaic power prediction model is a Autoformer model; inputting an initialized sample period item, a second sample vector and the sample coding result into a first branch of a decoder in the photovoltaic power prediction model to obtain a first sample sub-result output by the decoder, wherein the first branch of the decoder comprises at least one pair of autocorrelation mechanism units and a sequence decomposition unit which are connected in sequence; inputting the initialized sample trend item into a second branch of the decoder to obtain a second sample sub-result; determining a sample photovoltaic power result based on the first and second sample sub-results; updating the photovoltaic power prediction model based on the sample photovoltaic power result and the sample label to obtain an updated photovoltaic power prediction model; The inputting the initialized sample period item, the second sample vector and the sample coding result into the first branch of the decoder in the photovoltaic power prediction model to obtain a first sample result output by the decoder comprises the following steps: inputting the initialization period item and the second time vector into a first branch of the decoder to be processed by a first autocorrelation mechanism unit and a first sequence decomposition unit to obtain an intermediate vector; Processing the intermediate vector and the coding result sequentially through a second autocorrelation mechanism unit, a second sequence decomposition unit, a first feedforward neural network and a third sequence decomposition unit to obtain a first sub-result; The inputting the initialization trend term into the second branch of the decoder to obtain a second sub-result includes: Inputting the initialization trend item into a second branch of the decoder, and sequentially fusing the initialization trend item with the first sub trend item obtained by decomposing the first sequence decomposition unit, the second sub trend item obtained by decomposing the second sequence decomposition unit and the third sub trend item obtained by decomposing the third sequence decomposition unit to obtain a second sub result.
  6. 6. A photovoltaic power generation apparatus, the apparatus comprising: the system comprises an input sequence acquisition module, a target input sequence acquisition module and a control module, wherein the input sequence acquisition module is used for acquiring a target input sequence, and the target input sequence is used for indicating the photovoltaic power generation condition of photovoltaic equipment in corresponding weather in a target time period; The sequence decomposition module is used for carrying out sequence decomposition on the target input sequence to obtain an initialization period item and an initialization trend item; The time extraction module is used for extracting time characteristics of the target input sequence to obtain a first time vector and a second time vector, wherein the first time vector is used for indicating the time stamp of each data of the target input sequence; The coding module is used for processing the target input sequence and the first time vector according to a coder in a photovoltaic power prediction model to obtain a coding result, wherein the coder comprises an autocorrelation mechanism unit and a sequence decomposition unit which are connected in sequence, and the photovoltaic power prediction model is Autoformer; The decoding module is used for inputting an initialization period item, a second time vector and the coding result into a first branch of a decoder in the photovoltaic power prediction model to obtain a first sub-result output by the decoder, wherein the first branch of the decoder comprises at least one pair of autocorrelation mechanism units and a sequence decomposition unit which are connected in sequence; the power prediction module is used for determining a photovoltaic power result based on the fusion result of the first sub-result and the second sub-result; The decoding module is specifically configured to input the initialization period term and the second time vector into a first branch of the decoder, process the initialization period term and the second time vector through a first autocorrelation mechanism unit and a first sequence decomposition unit to obtain an intermediate vector, process the intermediate vector and the encoding result sequentially through a second autocorrelation mechanism unit, a second sequence decomposition unit, a first feedforward neural network and a third sequence decomposition unit to obtain a first sub-result, input the initialization trend term into a second branch of the decoder, and fuse the initialization trend term with the first sub-trend term obtained by decomposition of the first sequence decomposition unit, the second sub-trend term obtained by decomposition of the second sequence decomposition unit and the third sub-trend term obtained by decomposition of the third sequence decomposition unit in sequence to obtain a second sub-result.
  7. 7. A photovoltaic power predictive model training apparatus, the apparatus comprising: The system comprises a sample acquisition module, a sample input sequence, a sample marking module and a sample marking module, wherein the sample acquisition module is used for acquiring a sample input sequence and a sample marking corresponding to the sample input sequence, the sample input sequence is used for indicating the photovoltaic power generation condition of photovoltaic equipment in corresponding weather in a first sample time period; the sample sequence decomposition module is used for carrying out sequence decomposition on the sample input sequence to obtain an initialized sample period item and an initialized sample trend item; The sample time extraction module is used for extracting time features of the sample input sequence to obtain a first sample vector and a second sample vector, wherein the first sample vector is used for indicating the time stamp of each data of the sample input sequence; The sample coding module is used for processing the sample input sequence and the first sample time vector according to an encoder in a photovoltaic power prediction model to obtain a sample coding result, wherein the encoder comprises an autocorrelation mechanism unit and a sequence decomposition unit which are connected in sequence, and the photovoltaic power prediction model is a Autoformer model; The system comprises a photovoltaic power prediction model, a sample decoding module, a sampling module and a sampling module, wherein the photovoltaic power prediction model is used for outputting a photovoltaic power prediction model, wherein the photovoltaic power prediction model is used for outputting a photovoltaic power; the sample prediction module is used for determining a sample photovoltaic power result based on the first sample sub-result and the second sample sub-result; The model updating module is used for updating the photovoltaic power prediction model based on the sample photovoltaic power result and the sample label to obtain an updated photovoltaic power prediction model; The sample decoding module is specifically configured to input the initialization period term and the second time vector into a first branch of the decoder, so as to obtain an intermediate vector through processing by a first autocorrelation mechanism unit and a first sequence decomposition unit; The initialization trend item is input into a second branch of a decoder and is fused with a first sub-trend item obtained by decomposing the first sequence decomposition unit, a second sub-trend item obtained by decomposing the second sequence decomposition unit and a third sub-trend item obtained by decomposing the third sequence decomposition unit in sequence, so that a second sub-result is obtained.
  8. 8. A computer device, characterized in that it comprises a processor and a memory, in which at least one instruction is stored, which is loaded and executed by the processor to implement the photovoltaic power prediction model training method according to any of claims 1 to 4, or which is loaded and executed by the processor to implement the photovoltaic power prediction model training method according to claim 5.
  9. 9. A computer readable storage medium having stored therein at least one instruction for loading and executing by a processor to implement the photovoltaic power prediction model training method of any of claims 1 to 4, or for loading and executing by a processor to implement the photovoltaic power prediction model training method of claim 5.

Description

Photovoltaic power prediction method and photovoltaic power prediction model training method Technical Field The application relates to the technical field of photovoltaic power, in particular to a photovoltaic power prediction method and a photovoltaic power prediction model training method. Background Photovoltaic power generation has been rapidly developed in recent years due to the advantages of cleanliness, no pollution, flexible application form, safety, reliability and the like. However, the photovoltaic power generation power has obvious intermittent and random fluctuation characteristics, and as the permeability of the photovoltaic power generation in a power grid is continuously increased, great challenges are brought to the real-time dynamic balance of power generation, power transmission and power utilization of a power system, and the safety of the photovoltaic power generation is severely restricted. In the prior art, algorithms such as long-term and short-term memory networks, gradient lifting tree algorithms and the like can be adopted to predict photovoltaic power generation. However, the above method is inferior in accuracy of photovoltaic power generation prediction. Disclosure of Invention The application provides a photovoltaic power prediction method and a photovoltaic power prediction model training method, which improve the accuracy of photovoltaic power prediction. In one aspect, a photovoltaic power prediction method is provided, the method comprising: the method comprises the steps of obtaining a target input sequence, wherein the target input sequence is used for indicating the photovoltaic power generation condition of photovoltaic equipment in corresponding weather in a target time period; Performing sequence decomposition on the target input sequence to obtain an initialization period item and an initialization trend item; Extracting time features of the target input sequence to obtain a first time vector and a second time vector, wherein the first time vector is used for indicating the time stamp of each data of the target input sequence; processing the target input sequence and the first time vector according to an encoder in a photovoltaic power prediction model to obtain a coding result, wherein the encoder comprises an autocorrelation mechanism unit and a sequence decomposition unit which are sequentially connected; Inputting an initialization period item, a second time vector and the coding result into a first branch of a decoder in the photovoltaic power prediction model to obtain a first sub-result output by the decoder, wherein the first branch of the decoder comprises at least one pair of autocorrelation mechanism units and a sequence decomposition unit which are connected in sequence; inputting the initialization trend item into a second branch of the decoder to obtain a second sub-result; and determining a photovoltaic power result based on the fusion result of the first sub-result and the second sub-result. In yet another aspect, a photovoltaic power prediction model training method is provided, the method comprising: The method comprises the steps of obtaining a sample input sequence and a sample label corresponding to the sample input sequence, wherein the sample input sequence is used for indicating the photovoltaic power generation condition of photovoltaic equipment in corresponding weather in a first sample time period; performing sequence decomposition on the sample input sequence to obtain an initialized sample period item and an initialized sample trend item; extracting time features of the sample input sequence to obtain a first sample vector and a second sample vector, wherein the first sample vector is used for indicating the time stamp of each data of the sample input sequence; Processing the sample input sequence and the first sample time vector according to an encoder in a photovoltaic power prediction model to obtain a sample coding result, wherein the encoder comprises an autocorrelation mechanism unit and a sequence decomposition unit which are connected in sequence; inputting an initialized sample period item, a second sample vector and the sample coding result into a first branch of a decoder in the photovoltaic power prediction model to obtain a first sample sub-result output by the decoder, wherein the first branch of the decoder comprises at least one pair of autocorrelation mechanism units and a sequence decomposition unit which are connected in sequence; inputting the initialized sample trend item into a second branch of the decoder to obtain a second sample sub-result; determining a sample photovoltaic power result based on the first and second sample sub-results; and updating the photovoltaic power prediction model based on the sample photovoltaic power result and the sample label to obtain an updated photovoltaic power prediction model. In yet another aspect, there is provided a photovoltaic power prediction apparatus, the apparatus com