CN116050627A - Photovoltaic power prediction method and photovoltaic power prediction model training method - Google Patents

Photovoltaic power prediction method and photovoltaic power prediction model training method Download PDF

Info

Publication number
CN116050627A
CN116050627A CN202310074262.1A CN202310074262A CN116050627A CN 116050627 A CN116050627 A CN 116050627A CN 202310074262 A CN202310074262 A CN 202310074262A CN 116050627 A CN116050627 A CN 116050627A
Authority
CN
China
Prior art keywords
sample
photovoltaic power
sequence
result
input sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310074262.1A
Other languages
Chinese (zh)
Inventor
蒋文
费远宇
曾维波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goodwe Technologies Co Ltd
Original Assignee
Goodwe Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goodwe Technologies Co Ltd filed Critical Goodwe Technologies Co Ltd
Priority to CN202310074262.1A priority Critical patent/CN116050627A/en
Publication of CN116050627A publication Critical patent/CN116050627A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Marketing (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Development Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Supply And Distribution Of Alternating Current (AREA)

Abstract

The application relates to a photovoltaic power prediction method, in particular to the technical field of photovoltaic power. The method comprises the following steps: acquiring a target input sequence; performing sequence decomposition on a 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; processing the target input sequence and the first time vector according to an encoder in the 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 a photovoltaic power result based on the fusion result of the first sub-result and the second sub-result. The photovoltaic power result predicted based on the scheme has higher accuracy.

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:
acquiring a target input sequence; the target input sequence is used for indicating the photovoltaic power generation condition of the photovoltaic equipment in the 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 characteristics of the target input sequence to obtain a first time vector and a second time vector; the first time vector is used for indicating the time stamp of each data of the target input sequence; the second time vector is used for indicating a time stamp of data of a designated interval 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; the encoder comprises an autocorrelation mechanism unit and a sequence decomposition unit which are connected in sequence;
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; the first branch in 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:
Acquiring a sample input sequence and a sample label corresponding to the sample input sequence; the sample input sequence is used for indicating the photovoltaic power generation condition of the photovoltaic equipment in the corresponding weather in the first sample time period; the sample is marked as the photovoltaic power generation condition of a second sample time period after the 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 characteristics of the sample input sequence to obtain a first sample vector and a second sample vector; the first sample vector is used for indicating the time stamp of each data of the sample input sequence; the second sample vector is used for indicating a timestamp of data of a specified interval 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; 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; the first branch in 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; obtaining 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 comprising:
the input sequence acquisition module is used for acquiring a target input sequence; the target input sequence is used for indicating the photovoltaic power generation condition of the photovoltaic equipment in the 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; the first time vector is used for indicating the time stamp of each data of the target input sequence; the second time vector is used for indicating a time stamp of data of a designated interval of the target input sequence;
The encoding module is used for processing the target input sequence and the first time vector according to an encoder in the photovoltaic power prediction model to obtain an encoding result; the encoder comprises an autocorrelation mechanism unit and a sequence decomposition unit which are connected in sequence;
the decoding module is used for 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; the first branch in 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 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.
In a possible implementation manner, the sequence decomposition module is configured to perform an 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.
In a possible implementation manner, the time extraction module is further configured to perform feature extraction on a timestamp of each data of the target input sequence, so as to obtain timestamp data corresponding to each data respectively; the timestamp data is used for indicating at least one time position; 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.
In a possible implementation manner, the input sequence acquisition module is further configured to acquire target power generation data and target weather data; the target power generation data is used for indicating the photovoltaic power generation condition of the photovoltaic equipment in a target time period; the target weather data is used for indicating weather conditions in a target time period;
acquiring historical forecast radiation and historical actual measurement radiation; the historical forecast irradiance is used to indicate an expected irradiance over a target time period; the historical measured irradiance is used to indicate the actual irradiance during 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.
In one possible implementation, the photovoltaic power prediction model is an Autoformer model; the decoding module is further 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;
And 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.
In one possible implementation manner, the decoding module is further configured to input the initialization trend term into a second branch of the decoder, and sequentially fuse the initialization trend term with the first sub-trend term decomposed by the first sequence decomposition unit, the second sub-trend term decomposed by the second sequence decomposition unit, and the third sub-trend term decomposed by the third sequence decomposition unit, to obtain a second sub-result.
In yet another aspect, a photovoltaic power prediction model training apparatus is provided, the apparatus comprising:
the sample acquisition module is used for acquiring a sample input sequence and a sample label corresponding to the sample input sequence; the sample input sequence is used for indicating the photovoltaic power generation condition of the photovoltaic equipment in the corresponding weather in the first sample time period; the sample is marked as the photovoltaic power generation condition of a second sample time period after the 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 characteristics of the sample input sequence to obtain a first sample vector and a second sample vector; the first sample vector is used for indicating the time stamp of each data of the sample input sequence; the second sample vector is used for indicating a timestamp of data of a specified interval 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 the photovoltaic power prediction model to obtain a sample coding result; the encoder comprises an autocorrelation mechanism unit and a sequence decomposition unit which are connected in sequence;
the sample decoding module is used for 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 result output by the decoder; the first branch in 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; obtaining a second sample sub-result;
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;
And 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.
In yet another aspect, a computer device is provided that includes a processor and a memory having at least one instruction stored therein that is loaded and executed by the processor to implement the photovoltaic power prediction method or photovoltaic power prediction model training method described above.
In yet another aspect, a computer readable storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement the above-described photovoltaic power prediction method or photovoltaic power prediction model training method is provided.
In yet another aspect, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium and executes the computer instructions to cause the computer device to perform a photovoltaic power prediction method or a photovoltaic power prediction model training method.
The technical scheme that this application provided can include following beneficial effect:
in order to realize photovoltaic power prediction, the computer equipment can acquire photovoltaic power generation conditions of the photovoltaic equipment in a target time period under corresponding weather from historical power generation data, convert the photovoltaic power generation conditions into a target input sequence, and then perform sequence decomposition on the target input sequence to obtain an initialization period item and an initialization trend item; the computer equipment extracts time characteristics of the target input sequence to obtain a first time vector related to the time stamp of each data of the target input sequence and a second time vector related to the time stamp of the data of the designated interval of the target input sequence; processing the target input sequence and the first time vector corresponding to the whole target input sequence through an autocorrelation mechanism unit and a sequence decomposition unit in the encoder, and extracting corresponding features to form a coding result; the computer equipment inputs the initialization period item, the second time vector and the coding result output by the coder into the decoder, the first sub-result is obtained by processing an autocorrelation mechanism unit, a sequence decomposition unit and the like in the decoder, at the moment, the first sub-result continuously eliminates the trend item through the autocorrelation mechanism unit and the sequence decomposition unit in the process of extracting the characteristics, and finally the first sub-result is fused with the second sub-result obtained by inputting the initialization trend item into the second branch of the decoder, so as to determine the photovoltaic power result. According to the scheme, the integral time characteristic of the target input sequence and the time characteristic of a specific part are fully considered, the periodic item is gradually subjected to purification operation in the encoder and the decoder and then fused with the trend item, so that the first sub-result and the second sub-result can more accurately represent the period and trend of photovoltaic power generation in future time, therefore, the fusion result can be obtained by fusing the first sub-result and the second sub-result obtained after the photovoltaic power prediction model is processed, and the photovoltaic power result obtained based on the fusion result has higher accuracy; the photovoltaic power prediction model can greatly reduce the complexity of calculation and improve the prediction efficiency of photovoltaic power generation prediction on the premise of ensuring the prediction precision.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram illustrating a structure of a photovoltaic power prediction system according to an exemplary embodiment.
Fig. 2 is a flow chart illustrating a photovoltaic power prediction method according to an exemplary embodiment.
FIG. 3 is a flowchart illustrating a photovoltaic power prediction model training method, according to an exemplary embodiment.
Fig. 4 is a flow chart illustrating a photovoltaic power prediction method according to an exemplary embodiment.
FIG. 5 illustrates a flow chart of input data processing for model input according to an embodiment of the present application.
Fig. 6 shows a schematic structural diagram of a photovoltaic power prediction model according to an embodiment of the present application.
Fig. 7 is a block diagram illustrating a structure of a photovoltaic power predicting apparatus according to an exemplary embodiment.
Fig. 8 is a block diagram illustrating a structure of a photovoltaic power prediction model training apparatus according to an exemplary embodiment.
Fig. 9 shows a block diagram of a computer device according to an exemplary embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made apparent and fully in view of the accompanying drawings, in which some, but not all embodiments of the invention are shown. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It should be understood that, in the embodiments of the present application, the "indication" may be a direct indication, an indirect indication, or an indication having an association relationship. For example, a indicates B, which may mean that a indicates B directly, e.g., B may be obtained by a; it may also indicate that a indicates B indirectly, e.g. a indicates C, B may be obtained by C; it may also be indicated that there is an association between a and B.
In the description of the embodiments of the present application, the term "corresponding" may indicate that there is a direct correspondence or an indirect correspondence between the two, or may indicate that there is an association between the two, or may indicate a relationship between the two and the indicated, configured, or the like.
In the embodiment of the present application, the "predefining" may be implemented by pre-storing corresponding codes, tables or other manners that may be used to indicate relevant information in devices (including, for example, terminal devices and network devices), and the specific implementation of the present application is not limited.
Fig. 1 is a schematic diagram illustrating a structure of a photovoltaic power prediction system according to an exemplary embodiment. The photovoltaic power prediction system includes a data processing device 110 and a current collection device 120.
Optionally, the current collecting device 120 includes a data memory, and when the current collecting device collects the target current, the current data may be stored in the data memory after the target current data is obtained. For example, the current collection device may be a current sensor, a current collector, and a current collection current.
Alternatively, the data processing device 110 may be a computer device with high computing power, and the data processing device is configured to analyze the collected target current data, so as to obtain characteristics of the target current data.
Alternatively, the data processing device 110 may be a terminal device with current analysis software installed, and when the terminal device receives an instruction for analyzing current data, the terminal device may read corresponding current data from a data memory in the current collecting device 120 and analyze the current data, so as to obtain the characteristics of the target current data.
Optionally, the target current data may be historical photovoltaic power generation data in a certain period of time, and the terminal device may process the target current data through a photovoltaic power prediction model to predict a power generation condition of the photovoltaic device in a future period of time.
Alternatively, the data processing device 110 may also be a server with current analysis software installed, and the current collecting device may be a terminal device, where after the terminal device collects the target current data, the target current data may be transmitted to the server to complete the prediction of the power generation condition of the photovoltaic device in the future time period.
Alternatively, the data processing device 110 and the current collecting device 120 may be connected in a communication manner through a wired or wireless network.
Optionally, the server may be a server cluster or a distributed system formed by a plurality of physical servers, and may also be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and technical computing services such as big data and artificial intelligence platforms.
Optionally, the system may further include a management device, where the management device is configured to manage the system (e.g., manage a connection state between each module and the server, etc.), where the management device is connected to the server through a communication network. Optionally, the communication network is a wired network or a wireless network.
Alternatively, the wireless network or wired network described above uses standard communication techniques and/or protocols. The network is typically the internet, but may be any other network including, but not limited to, a local area network, a metropolitan area network, a wide area network, a mobile, a limited or wireless network, a private network, or any combination of virtual private networks. In some embodiments, techniques and/or formats including hypertext markup language, extensible markup language, and the like are used to represent data exchanged over a network. All or some of the links may also be encrypted using conventional encryption techniques such as secure socket layer, transport layer security, virtual private network, internet protocol security, etc. In other embodiments, custom and/or dedicated data communication techniques may also be used in place of or in addition to the data communication techniques described above.
Fig. 2 is a flow chart illustrating a photovoltaic power prediction method according to an exemplary embodiment. The method is performed by a computer device, which may be a data processing device 110 as shown in fig. 1. As shown in fig. 2, the photovoltaic power prediction method may include the steps of:
step 201, a target input sequence is acquired.
The target input sequence is used for indicating photovoltaic power generation conditions of the photovoltaic equipment in corresponding weather in a target time period.
When it is desired to predict the power generation of the photovoltaic device in a future period (e.g., 72 hours), the computer device may first obtain the power generation of the photovoltaic device in the corresponding weather and generate the target input sequence in the target period (e.g., 48 hours).
That is, in the embodiment of the present application, the target input sequence includes photovoltaic power generation data in a target period of time, weather data corresponding to the photovoltaic power generation data, and the like.
In one possible implementation, target power generation data and target weather data are obtained; the target power generation data is used for indicating the photovoltaic power generation condition of the photovoltaic equipment in a target time period; the target weather data is used for indicating weather conditions in a target time period;
acquiring historical forecast radiation and historical actual measurement radiation; the historical forecast irradiance is used to indicate the predicted irradiance over a target time period; the historical measured irradiance is used to indicate the actual irradiance during 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.
In the embodiment of the application, when the photovoltaic power prediction model is used for processing the target power generation data and the target weather data so as to predict the power generation condition of the photovoltaic equipment for a period of time in the future, the photovoltaic power prediction model inputs the power generation data and the weather data, and the photovoltaic power prediction model should correspondingly output the power generation data and the weather data for a period of time in the future. That is, in the photovoltaic power prediction model in the embodiment of the present application, prediction of future weather data can be actually realized in addition to prediction of power generation data. In practice, therefore, the relationship between weather forecast data and generated power is considered during the processing of the photovoltaic power prediction model.
Therefore, in the embodiment of the application, the irradiance error, the target power generation data and the target weather data can be spliced into a target input sequence, that is, the irradiance error is characterized in the target input sequence. The irradiance error is defined as the difference between the predicted irradiance (i.e., the historical predicted irradiance) and the actual irradiance (i.e., the historical measured irradiance), and reflects whether a weather jump has occurred within a certain period of time, and the irradiance fluctuation when photoelectric conversion is performed in the weather jump environment.
If the irradiance errors are spliced into the target input sequence, the photovoltaic power prediction model performs data processing on the target input sequence, so that the influence on photovoltaic power generation in severe environments such as rainy and snowy weather can be considered when the prediction process of the photovoltaic power generation condition in a future period is realized, the accuracy of the prediction of the photovoltaic power generation in the severe weather is improved, and the immunity and the robustness of the photovoltaic power prediction model are improved.
Step 202, performing sequence decomposition on the target input sequence to obtain an initialization period item and an initialization trend item.
After the target input sequence is obtained, the target input sequence can be subjected to sequence decomposition, for example, an initialization period item in the target input sequence can be obtained through an average pooling operation; at this time, the error between the target input sequence and the initialization period term is the initialization trend term.
Step 203, extracting time features of the target input sequence to obtain a first time vector and a second time vector; the first time vector is used for indicating the time stamp of each data of the target input sequence; the second time vector is used to indicate a timestamp of data for a specified interval of the target input sequence.
In the embodiment of the application, the time feature extraction can be further performed on the target input sequence, and the time stamp of each data in the target input sequence is extracted as the first time vector, and at this time, the first time vector characterizes the overall time feature of the target input sequence. And meanwhile, the time stamp extraction can be carried out on the data of the appointed section of the target input sequence, and the extracted second time vector characterizes the integral time characteristic of the target input sequence.
Optionally, the specified interval may be set in a customized manner as required, for example, the specified interval may be an end specified bit of the target input sequence, where the extracted second time vector characterizes a time feature of the latest data of the photovoltaic device.
And 204, processing the target input sequence and the first time vector according to an encoder in the photovoltaic power prediction model to obtain a coding result.
The encoder comprises an autocorrelation mechanism unit and a sequence decomposition unit which are connected in sequence.
After the target input sequence and the first time vector are obtained, the target input sequence and the first time vector can be subjected to coding processing, and the coded result is input into an encoder in a photovoltaic power prediction model for processing, so that a coding result is obtained.
In an embodiment of the present application, the encoder includes an autocorrelation mechanism unit and a sequence decomposition unit connected in sequence.
Step 205, 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; the first branch in the decoder comprises at least one pair of autocorrelation mechanism units connected in sequence and a sequence decomposition unit.
That is, in the embodiment of the present application, the decoder includes at least two processing branches, where the first branch is configured to process the initialization period term, the second time vector, and the encoding result, so as to obtain a first sub-result output by the decoder.
And since the first branch comprises at least one pair of autocorrelation mechanism units and a sequence decomposition unit which are connected in sequence. After the characteristic extraction based on the autocorrelation mechanism is carried out through the autocorrelation mechanism unit each time, the period item and the trend item are decomposed through the sequence decomposition unit, and after a plurality of operations, the first sub-result finally obtained has more accurate period item characteristics.
Step 206, inputting the initialization trend term into the second branch of the decoder to obtain a second sub-result.
Optionally, in the second branch of the decoder, the trend term decomposed by the sequence decomposition unit in the first branch may be spliced with the initialization trend term, so as to finally obtain a second sub-result.
In this step, the second sub-result represents the extracted trend term feature.
Step 207, determining a photovoltaic power result based on the fusion result of the first sub-result and the second sub-result.
After the first sub-result and the second sub-result are fused, the fusion result can represent the change trend of the photovoltaic power in a period of time in the future, and also can represent the periodic item change of the photovoltaic power along with factors such as illumination time in a short time, so that each data in the fusion result can represent the photovoltaic power result of each time point in the period of time in the future, namely the photovoltaic power generation condition in the period of time in the future.
In summary, in order to realize photovoltaic power prediction, the computer device may obtain photovoltaic power generation conditions of the photovoltaic device in the corresponding weather in the target time period from the historical power generation data, convert the photovoltaic power generation conditions into the target input sequence, and then perform sequence decomposition on the target input sequence by the computer device to obtain an initialization period item and an initialization trend item; the computer equipment extracts time characteristics of the target input sequence to obtain a first time vector related to the time stamp of each data of the target input sequence and a second time vector related to the time stamp of the data of the designated interval of the target input sequence; processing the target input sequence and the first time vector corresponding to the whole target input sequence through an autocorrelation mechanism unit and a sequence decomposition unit in the encoder, and extracting corresponding features to form a coding result; the computer equipment inputs the initialization period item, the second time vector and the coding result output by the coder into the decoder, the first sub-result is obtained by processing an autocorrelation mechanism unit, a sequence decomposition unit and the like in the decoder, at the moment, the first sub-result continuously eliminates the trend item through the autocorrelation mechanism unit and the sequence decomposition unit in the process of extracting the characteristics, and finally the first sub-result is fused with the second sub-result obtained by inputting the initialization trend item into the second branch of the decoder, so as to determine the photovoltaic power result. According to the scheme, the integral time characteristic of the target input sequence and the time characteristic of a specific part are fully considered, the periodic item is gradually subjected to purification operation in the encoder and the decoder and then fused with the trend item, so that the first sub-result and the second sub-result can more accurately represent the period and trend of photovoltaic power generation in future time, therefore, the fusion result can be obtained by fusing the first sub-result and the second sub-result obtained after the photovoltaic power prediction model is processed, and the photovoltaic power result obtained based on the fusion result has higher accuracy; the photovoltaic power prediction model can greatly reduce the complexity of calculation and improve the prediction efficiency of photovoltaic power generation prediction on the premise of ensuring the prediction precision.
FIG. 3 is a flowchart illustrating a photovoltaic power prediction model training method, according to an exemplary embodiment. The method is performed by a computer device, which may be a data processing device 110 as shown in fig. 1. As shown in fig. 3, the photovoltaic power prediction model training method may include the following steps:
step 301, obtaining a sample input sequence and a sample label corresponding to the sample input sequence; the sample input sequence is used for indicating the photovoltaic power generation condition of the photovoltaic equipment in the corresponding weather in the first sample time period; the sample is marked as photovoltaic power generation condition of a second sample period after the first sample period.
In one possible implementation, sample power generation data is obtained along with sample weather data; the target power generation data is used for indicating the photovoltaic power generation condition of the photovoltaic equipment in the first sample time period; the sample weather data is for indicating weather conditions during a first sample period of time;
obtaining sample forecast radiation and sample actual measurement radiation; the sample forecast irradiance is used to indicate the predicted irradiance during the first sample period; the sample measured irradiance is used to indicate the actual irradiance during the first sample period;
Generating a sample irradiance error according to the difference between the sample forecast irradiation and the sample actual measurement irradiation;
the sample input sequence is generated from the sample power generation data, the sample weather data, and the sample irradiance error.
The sample input sequence is obtained in a similar manner to that of the target input sequence shown in fig. 2, and will not be described here.
Step 302, performing sequence decomposition on the sample input sequence to obtain an initialized sample period item and an initialized sample trend item.
Step 303, extracting time features of the sample input sequence to obtain a first sample vector and a second sample vector; the first sample vector is used to indicate a timestamp of each data of the sample input sequence; the second sample vector is used to indicate a timestamp of data for a specified interval of the sample input sequence.
Step 304, 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; the encoder comprises an autocorrelation mechanism unit and a sequence decomposition unit which are connected in sequence.
Step 305, inputting the initialized sample period item, the 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; the first branch in the decoder comprises at least one pair of autocorrelation mechanism units connected in sequence and a sequence decomposition unit.
Step 306, inputting the initialized sample trend item into a second branch of the decoder; a second sample sub-result is obtained.
Step 307, determining a sample photovoltaic power result based on the first sample sub-result and the second sample sub-result.
And step 308, 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 training process of the photovoltaic power prediction model is similar to the steps of the photovoltaic power prediction scheme shown in fig. 2, and will not be described in detail in the embodiment of the present application.
In summary, in order to realize photovoltaic power prediction, the computer device may obtain photovoltaic power generation conditions of the photovoltaic device in the corresponding weather in the target time period from the historical power generation data, convert the photovoltaic power generation conditions into the target input sequence, and then perform sequence decomposition on the target input sequence by the computer device to obtain an initialization period item and an initialization trend item; the computer equipment extracts time characteristics of the target input sequence to obtain a first time vector related to the time stamp of each data of the target input sequence and a second time vector related to the time stamp of the data of the designated interval of the target input sequence; processing the target input sequence and the first time vector corresponding to the whole target input sequence through an autocorrelation mechanism unit and a sequence decomposition unit in the encoder, and extracting corresponding features to form a coding result; the computer equipment inputs the initialization period item, the second time vector and the coding result output by the coder into the decoder, the first sub-result is obtained by processing an autocorrelation mechanism unit, a sequence decomposition unit and the like in the decoder, at the moment, the first sub-result continuously eliminates the trend item through the autocorrelation mechanism unit and the sequence decomposition unit in the process of extracting the characteristics, and finally the first sub-result is fused with the second sub-result obtained by inputting the initialization trend item into the second branch of the decoder, so as to determine the photovoltaic power result. According to the scheme, the integral time characteristic of the target input sequence and the time characteristic of a specific part are fully considered, the periodic item is gradually subjected to purification operation in the encoder and the decoder and then fused with the trend item, so that the first sub-result and the second sub-result can more accurately represent the period and trend of photovoltaic power generation in future time, therefore, the fusion result can be obtained by fusing the first sub-result and the second sub-result obtained after the photovoltaic power prediction model is processed, and the photovoltaic power result obtained based on the fusion result has higher accuracy; the photovoltaic power prediction model can greatly reduce the complexity of calculation and improve the prediction efficiency of photovoltaic power generation prediction on the premise of ensuring the prediction precision.
Fig. 4 is a flow chart illustrating a photovoltaic power prediction method according to an exemplary embodiment. The method is performed by a computer device, which may be a data processing device 110 as shown in fig. 1. As shown in fig. 4, the photovoltaic power prediction method may include the steps of:
step 401, a target input sequence is acquired.
Referring to fig. 5, a flow chart of input data processing for model input according to an embodiment of the present application is shown. As shown in fig. 5, in the embodiment of the present application, the computer device may randomly extract a time sequence from the historical time data, and take the input sequence length seq_len as 96, the tag sequence label_len as 48, and the sequence length pred_len to be predicted as 288. Wherein the tag sequence is part of the input sequence and is used primarily to assist the encoder in predicting the subsequent sequence required. N is the size of each batch fed into the model, and M is the number of weather features.
Optionally, the target input sequence may also be obtained according to the target power generation data, the target weather data, and the irradiance error, and the detailed description will be omitted herein with reference to the embodiment shown in fig. 2.
Optionally, in the embodiment of the present application, each data in the target input sequence is normalized data, where the normalization process is that all data x are normalized by means of a mean and a standard deviation std of the data obtained by statistics over a period of time i Normalization is performed, and the normalization formula is as follows:
Figure BDA0004065653340000161
step 402, performing an average pooling operation on the target input sequence to obtain an initialization trend item.
Step 403, generating the initialization period item based on the difference between the target input sequence and the initialization trend item.
After the computer device obtains the target input sequence, the sequence decomposition may be performed on the target input sequence, that is, seq_x (N, 96, m), to obtain a trend term (N, 96, m) and a period term (N, 96, m).
Alternatively, the principle of sequence decomposition is as follows:
based on the idea of moving average, the sequence can be decomposed into a trend term and a period term, the chronicity and the periodicity of the sequence are reflected respectively, the period term is smoothed, and the trend term is highlighted:
X t =AvgPool(Padding(X))
X s =X-X t
wherein X is a hidden variable to be decomposed, X t 、X s Trend terms and period terms, respectively.
Further, the computer device takes the (N, 48, m) part of the last label_len length of the period item and splices with the 0 tensor (N, 288, m) with the length pred_len to obtain the tensor with the size (N, 336, m). And (3) splicing the (N, 48, M) part of the final label_len length of the trend item with the mean tensor with the size of (N, 288, M) calculated by the seq_x, and finishing the period item initialization and the trend item initialization.
And step 404, extracting features of the time stamp of each data of the target input sequence to obtain time stamp data corresponding to each data.
The timestamp data is for indicating at least one time location; the time position includes a number of minutes in the current hour, a number of hours of the current day, a number of days of the current week, a number of days of the current month, a number of days of the current year.
Step 405, generating the first time vector according to the timestamp data corresponding to each data of the target input sequence.
Step 406, generating the second time vector according to the timestamp information corresponding to the data of the designated time interval of the target input sequence.
In the embodiment of the present application, the specified time interval may be timestamp information corresponding to data with a specified number of bits at the end of the target input sequence.
In one possible implementation, as shown in fig. 5, the last label_len data (i.e., the data of the designated time interval) of the target input sequence seq_x is selected in the computer device, and is spliced with the 0 sequence with the length pred_len to form seq_y as the input sequence of the decoder. Simultaneously, the time features of the seq_x and the seq_y are subjected to feature extraction in minute units: the current time stamp is calculated respectively, and the time feature vectors seq_x_mark and seq_y_mark (namely the first time vector and the second time vector) are obtained respectively corresponding to the minutes in the current hour, the hours in the current day, the days in the current week, the days in the current month and the days in the current year.
Step 407, processing the target input sequence and the first time vector according to an encoder in the photovoltaic power prediction model to obtain a coding result; the encoder comprises an autocorrelation mechanism unit and a sequence decomposition unit which are connected in sequence.
In the embodiment of the present application, the photovoltaic power prediction model may be a trained Autoformer model, and the training process of the Autoformer model is similar to the application process of the model described in the embodiment of the present application, so that a detailed description is omitted.
Referring to fig. 6, a schematic structural diagram of a photovoltaic power prediction model according to an embodiment of the present application is shown. As shown in fig. 6, the computer device may input tensors (N, 96,512) obtained by encoding the seq_x (N, 96, m) and the seq_x_mark (N, 96,5) into the encoder, and the tensors are respectively connected through the autocorrelation mechanism unit, the sequence decomposition unit, the feed forward network, the sequence decomposition unit and the two shortcuts, and repeated for multiple times, to finally obtain an output enc_out of (N, 96,512).
Step 408, the initialization period term and the second time vector are input into the first branch of the decoder to be processed by the first autocorrelation mechanism unit and the first sequence decomposition unit to obtain an intermediate vector.
As shown in fig. 6, the computer device inputs the tensor (N, 336,512) obtained by encoding the initialization period term (N, 336, m) and the seq_y_mark (N, 336,5) into the first branch of the decoder, and processes the tensor by the first autocorrelation mechanism unit and the first sequence decomposition unit to obtain an intermediate vector, where the intermediate vector can be used as the query of the next autocorrelation mechanism unit (i.e., the second autocorrelation mechanism unit), and the key and the value are taken from the output (i.e., the encoding result) enc_out of the encoder.
Step 409, the intermediate vector and the encoding result are sequentially processed by a second autocorrelation mechanism unit, a second sequence decomposition unit, a first feedforward neural network and a third sequence decomposition unit, so as to obtain a first sub-result.
When the intermediate vector and the coding result are processed by the second autocorrelation mechanism unit, the second sequence decomposition unit, the first feedforward neural network and the third sequence decomposition unit respectively, a first sub-result can be obtained, and in this step, the autocorrelation mechanism uses the periodic property of the sequences to aggregate sub-sequences with similar processes in different periods for the period term, so that the first sub-result contains more accurate period term characteristics.
Step 410, 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 decomposed by the first sequence decomposition unit, the second sub trend item decomposed by the second sequence decomposition unit, and the third sub trend item decomposed by the third sequence decomposition unit to obtain a second sub result.
When the first sequence decomposition unit, the second sequence decomposition unit and the third sequence decomposition unit in the first branch perform sequence decomposition, corresponding trend items (namely, a first sub-trend item, a second sub-trend item and a third sub-trend item) are generated in addition to the period items, at this time, in the second branch, the first sub-trend item and the second sub-trend item can be sequentially fused with the initialization period item, that is, in the decoder, a cumulative mode is used, trend information is gradually extracted from predicted hidden variables, and at this time, the second sub-result contains more accurate trend item features.
In step 411, a photovoltaic power result is determined based on the fusion result of the first sub-result and the second sub-result.
The fusion result of the first sub-result and the second sub-result, that is, the last dimension (N, 288,1) of the last pred_len length of the output dec_out of the decoder, the computer equipment performs inverse normalization processing on the result, and outputs power prediction values of 288 points to be predicted, wherein the power prediction values of 288 points represent the power prediction situation of each time point in a future period.
In summary, in order to realize photovoltaic power prediction, the computer device may obtain photovoltaic power generation conditions of the photovoltaic device in the corresponding weather in the target time period from the historical power generation data, convert the photovoltaic power generation conditions into the target input sequence, and then perform sequence decomposition on the target input sequence by the computer device to obtain an initialization period item and an initialization trend item; the computer equipment extracts time characteristics of the target input sequence to obtain a first time vector related to the time stamp of each data of the target input sequence and a second time vector related to the time stamp of the data of the designated interval of the target input sequence; processing the target input sequence and the first time vector corresponding to the whole target input sequence through an autocorrelation mechanism unit and a sequence decomposition unit in the encoder, and extracting corresponding features to form a coding result; the computer equipment inputs the initialization period item, the second time vector and the coding result output by the coder into the decoder, the first sub-result is obtained by processing an autocorrelation mechanism unit, a sequence decomposition unit and the like in the decoder, at the moment, the first sub-result continuously eliminates the trend item through the autocorrelation mechanism unit and the sequence decomposition unit in the process of extracting the characteristics, and finally the first sub-result is fused with the second sub-result obtained by inputting the initialization trend item into the second branch of the decoder, so as to determine the photovoltaic power result. According to the scheme, the integral time characteristic of the target input sequence and the time characteristic of a specific part are fully considered, the periodic item is gradually subjected to purification operation in the encoder and the decoder and then fused with the trend item, so that the first sub-result and the second sub-result can more accurately represent the period and trend of photovoltaic power generation in future time, therefore, the fusion result can be obtained by fusing the first sub-result and the second sub-result obtained after the photovoltaic power prediction model is processed, and the photovoltaic power result obtained based on the fusion result has higher accuracy; the photovoltaic power prediction model can greatly reduce the complexity of calculation and improve the prediction efficiency of photovoltaic power generation prediction on the premise of ensuring the prediction precision.
Fig. 7 is a block diagram illustrating a structure of a photovoltaic power predicting apparatus according to an exemplary embodiment. The photovoltaic power prediction apparatus includes:
an input sequence acquisition module 701, configured to acquire a target input sequence; the target input sequence is used for indicating the photovoltaic power generation condition of the photovoltaic equipment in the corresponding weather in a target time period;
the sequence decomposition module 702 is configured to perform sequence decomposition on the target input sequence to obtain an initialization period term and an initialization trend term;
a time extraction module 703, configured to perform time feature extraction on the target input sequence, so as to obtain a first time vector and a second time vector; the first time vector is used for indicating the time stamp of each data of the target input sequence; the second time vector is used for indicating a time stamp of data of a designated interval of the target input sequence;
the encoding module 704 is configured to process the target input sequence and the first time vector according to an encoder in a photovoltaic power prediction model, so as to obtain an encoding result; the encoder comprises an autocorrelation mechanism unit and a sequence decomposition unit which are connected in sequence;
the decoding module 705 is configured to input an initialization period term, a second time vector, and the encoding result into a first branch of a decoder in the photovoltaic power prediction model, and obtain a first sub-result output by the decoder; the first branch in 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;
The power prediction module 706 is configured to determine a photovoltaic power result based on a fusion result of the first sub-result and the second sub-result.
In a possible implementation manner, the sequence decomposition module is configured to perform an 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.
In a possible implementation manner, the time extraction module is further configured to perform feature extraction on a timestamp of each data of the target input sequence, so as to obtain timestamp data corresponding to each data respectively; the timestamp data is used for indicating at least one time position; 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.
In one possible implementation, the photovoltaic power prediction model is an Autoformer model; the decoding module is further 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;
And 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.
In one possible implementation manner, the decoding module is further configured to input the initialization trend term into a second branch of the decoder, and sequentially fuse the initialization trend term with the first sub-trend term decomposed by the first sequence decomposition unit, the second sub-trend term decomposed by the second sequence decomposition unit, and the third sub-trend term decomposed by the third sequence decomposition unit, to obtain a second sub-result.
In summary, in order to realize photovoltaic power prediction, the computer device may obtain photovoltaic power generation conditions of the photovoltaic device in the corresponding weather in the target time period from the historical power generation data, convert the photovoltaic power generation conditions into the target input sequence, and then perform sequence decomposition on the target input sequence by the computer device to obtain an initialization period item and an initialization trend item; the computer equipment extracts time characteristics of the target input sequence to obtain a first time vector related to the time stamp of each data of the target input sequence and a second time vector related to the time stamp of the data of the designated interval of the target input sequence; processing the target input sequence and the first time vector corresponding to the whole target input sequence through an autocorrelation mechanism unit and a sequence decomposition unit in the encoder, and extracting corresponding features to form a coding result; the computer equipment inputs the initialization period item, the second time vector and the coding result output by the coder into the decoder, the first sub-result is obtained by processing an autocorrelation mechanism unit, a sequence decomposition unit and the like in the decoder, at the moment, the first sub-result continuously eliminates the trend item through the autocorrelation mechanism unit and the sequence decomposition unit in the process of extracting the characteristics, and finally the first sub-result is fused with the second sub-result obtained by inputting the initialization trend item into the second branch of the decoder, so as to determine the photovoltaic power result. According to the scheme, the integral time characteristic of the target input sequence and the time characteristic of a specific part are fully considered, the periodic item is gradually subjected to purification operation in the encoder and the decoder and then fused with the trend item, so that the first sub-result and the second sub-result can more accurately represent the period and trend of photovoltaic power generation in future time, therefore, the fusion result can be obtained by fusing the first sub-result and the second sub-result obtained after the photovoltaic power prediction model is processed, and the photovoltaic power result obtained based on the fusion result has higher accuracy; the photovoltaic power prediction model can greatly reduce the complexity of calculation and improve the prediction efficiency of photovoltaic power generation prediction on the premise of ensuring the prediction precision.
Fig. 8 is a block diagram illustrating a structure of a photovoltaic power prediction model training apparatus according to an exemplary embodiment. The photovoltaic power prediction apparatus includes:
the sample acquisition module 801 is configured to acquire a sample input sequence and a sample label corresponding to the sample input sequence; the sample input sequence is used for indicating the photovoltaic power generation condition of the photovoltaic equipment in the corresponding weather in the first sample time period; the sample is marked as the photovoltaic power generation condition of a second sample time period after the first sample time period;
a sample sequence decomposition module 802, configured to perform sequence decomposition on the sample input sequence to obtain an initialized sample period term and an initialized sample trend term;
a sample time extraction module 803, configured to perform time feature extraction on the sample input sequence, so as to obtain a first sample vector and a second sample vector; the first sample vector is used for indicating the time stamp of each data of the sample input sequence; the second sample vector is used for indicating a timestamp of data of a specified interval of the sample input sequence;
the sample coding module 804 is configured to process the sample input sequence and the first sample time vector according to an encoder in a photovoltaic power prediction model, so as to obtain a sample coding result; the encoder comprises an autocorrelation mechanism unit and a sequence decomposition unit which are connected in sequence;
A sample decoding module 805, configured to input an initialized sample period term, a second sample vector, and the sample encoding result into a first branch of a decoder in the photovoltaic power prediction model, and obtain a first sample sub-result output by the decoder; the first branch in 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; obtaining a second sample sub-result;
a sample prediction module 806 for determining a sample photovoltaic power result based on the first and second sample sub-results;
and a model updating module 807, configured to update the photovoltaic power prediction model based on the sample photovoltaic power result and the sample label, and obtain an updated photovoltaic power prediction model.
In summary, in order to realize photovoltaic power prediction, the computer device may obtain photovoltaic power generation conditions of the photovoltaic device in the corresponding weather in the target time period from the historical power generation data, convert the photovoltaic power generation conditions into the target input sequence, and then perform sequence decomposition on the target input sequence by the computer device to obtain an initialization period item and an initialization trend item; the computer equipment extracts time characteristics of the target input sequence to obtain a first time vector related to the time stamp of each data of the target input sequence and a second time vector related to the time stamp of the data of the designated interval of the target input sequence; processing the target input sequence and the first time vector corresponding to the whole target input sequence through an autocorrelation mechanism unit and a sequence decomposition unit in the encoder, and extracting corresponding features to form a coding result; the computer equipment inputs the initialization period item, the second time vector and the coding result output by the coder into the decoder, the first sub-result is obtained by processing an autocorrelation mechanism unit, a sequence decomposition unit and the like in the decoder, at the moment, the first sub-result continuously eliminates the trend item through the autocorrelation mechanism unit and the sequence decomposition unit in the process of extracting the characteristics, and finally the first sub-result is fused with the second sub-result obtained by inputting the initialization trend item into the second branch of the decoder, so as to determine the photovoltaic power result. According to the scheme, the integral time characteristic of the target input sequence and the time characteristic of a specific part are fully considered, the periodic item is gradually subjected to purification operation in the encoder and the decoder and then fused with the trend item, so that the first sub-result and the second sub-result can more accurately represent the period and trend of photovoltaic power generation in future time, therefore, the fusion result can be obtained by fusing the first sub-result and the second sub-result obtained after the photovoltaic power prediction model is processed, and the photovoltaic power result obtained based on the fusion result has higher accuracy; the photovoltaic power prediction model can greatly reduce the complexity of calculation and improve the prediction efficiency of photovoltaic power generation prediction on the premise of ensuring the prediction precision.
Fig. 9 shows a block diagram of a computer device 900 according to an exemplary embodiment of the present application. The computer device may be implemented as a server in the above-described aspects of the present application. The computer apparatus 900 includes a central processing unit (Central Processing Unit, CPU) 901, a system Memory 904 including a random access Memory (Random Access Memory, RAM) 902 and a Read-Only Memory (ROM) 903, and a system bus 905 connecting the system Memory 904 and the central processing unit 901. The computer device 900 also includes a mass storage device 906 for storing an operating system 909, application programs 910, and other program modules 911.
The mass storage device 906 is connected to the central processing unit 901 through a mass storage controller (not shown) connected to the system bus 905. The mass storage device 906 and its associated computer-readable media provide non-volatile storage for the computer device 900. That is, the mass storage device 906 may include a computer readable medium (not shown) such as a hard disk or a compact disk-Only (CD-ROM) drive.
The computer readable medium may include computer storage media and communication media without loss of generality. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, erasable programmable read-Only register (Erasable Programmable Read Only Memory, EPROM), electrically erasable programmable read-Only Memory (EEPROM) flash Memory or other solid state Memory technology, CD-ROM, digital versatile disks (Digital Versatile Disc, DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer storage medium is not limited to the one described above. The system memory 904 and mass storage 906 described above may be collectively referred to as memory.
According to various embodiments of the disclosure, the computer device 900 may also operate by being connected to a remote computer on a network, such as the Internet. I.e., the computer device 900 may be connected to the network 908 via a network interface unit 907 coupled to the system bus 905, or alternatively, the network interface unit 907 may be used to connect to other types of networks or remote computer systems (not shown).
The memory further comprises at least one computer program stored in the memory, and the central processing unit 901 implements all or part of the steps of the method shown in the above embodiments by executing the at least one computer program.
In an exemplary embodiment, a computer readable storage medium is also provided for storing at least one computer program that is loaded and executed by a processor to implement all or part of the steps of the above method. For example, the computer readable storage medium may be Read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), compact disc Read-Only Memory (CD-ROM), magnetic tape, floppy disk, optical data storage device, and the like.
In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium and executes the computer instructions to cause the computer device to perform all or part of the steps of the method shown in any of the embodiments of fig. 2 or 3 described above.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the present application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method of photovoltaic power prediction, the method comprising:
acquiring a target input sequence; the target input sequence is used for indicating the photovoltaic power generation condition of the photovoltaic equipment in the 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 characteristics of the target input sequence to obtain a first time vector and a second time vector; the first time vector is used for indicating the time stamp of each data of the target input sequence; the second time vector is used for indicating a time stamp of data of a designated interval 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; the encoder comprises an autocorrelation mechanism unit and a sequence decomposition unit which are connected in sequence;
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; the first branch in 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.
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. 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:
performing feature extraction on the time stamp of each data of the target input sequence to obtain time stamp data corresponding to each data respectively; the timestamp data is used for indicating at least one time position; 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. The method of claim 1, wherein the obtaining the target input sequence comprises:
acquiring target power generation data and target weather data; the target power generation data is used for indicating the photovoltaic power generation condition of the photovoltaic equipment in a target time period; the target weather data is used for indicating weather conditions in a target time period;
acquiring historical forecast radiation and historical actual measurement radiation; the historical forecast irradiance is used to indicate an expected irradiance over a target time period; the historical measured irradiance is used to indicate the actual irradiance during 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. The method of any one of claims 1 to 4, wherein the photovoltaic power prediction model is an Autoformer model;
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.
6. A method for training a photovoltaic power prediction model, the method comprising:
Acquiring a sample input sequence and a sample label corresponding to the sample input sequence; the sample input sequence is used for indicating the photovoltaic power generation condition of the photovoltaic equipment in the corresponding weather in the first sample time period; the sample is marked as the photovoltaic power generation condition of a second sample time period after the 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 characteristics of the sample input sequence to obtain a first sample vector and a second sample vector; the first sample vector is used for indicating the time stamp of each data of the sample input sequence; the second sample vector is used for indicating a timestamp of data of a specified interval 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; 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; the first branch in 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; obtaining 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.
7. A photovoltaic power generation apparatus, the apparatus comprising:
the input sequence acquisition module is used for acquiring a target input sequence; the target input sequence is used for indicating the photovoltaic power generation condition of the photovoltaic equipment in the 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; the first time vector is used for indicating the time stamp of each data of the target input sequence; the second time vector is used for indicating a time stamp of data of a designated interval of the target input sequence;
The encoding module is used for processing the target input sequence and the first time vector according to an encoder in the photovoltaic power prediction model to obtain an encoding result; the encoder comprises an autocorrelation mechanism unit and a sequence decomposition unit which are connected in sequence;
the decoding module is used for 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; the first branch in 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 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.
8. A photovoltaic power predictive model training apparatus, the apparatus comprising:
the sample acquisition module is used for acquiring a sample input sequence and a sample label corresponding to the sample input sequence; the sample input sequence is used for indicating the photovoltaic power generation condition of the photovoltaic equipment in the corresponding weather in the first sample time period; the sample is marked as the photovoltaic power generation condition of a second sample time period after the 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 characteristics of the sample input sequence to obtain a first sample vector and a second sample vector; the first sample vector is used for indicating the time stamp of each data of the sample input sequence; the second sample vector is used for indicating a timestamp of data of a specified interval 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 the photovoltaic power prediction model to obtain a sample coding result; the encoder comprises an autocorrelation mechanism unit and a sequence decomposition unit which are connected in sequence;
the sample decoding module is used for 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 result output by the decoder; the first branch in 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; obtaining a second sample sub-result;
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;
and 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.
9. A computer device comprising a processor and a memory having stored therein at least one instruction that is loaded and executed by the processor to implement the photovoltaic power prediction method of any of claims 1 to 5; alternatively, the at least one instruction is loaded and executed by the processor to implement the photovoltaic power prediction model training method of claim 6.
10. A computer readable storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement the photovoltaic power prediction method of any of claims 1 to 5; alternatively, the at least one instruction is loaded and executed by a processor to implement the photovoltaic power prediction model training method of claim 6.
CN202310074262.1A 2023-01-30 2023-01-30 Photovoltaic power prediction method and photovoltaic power prediction model training method Pending CN116050627A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310074262.1A CN116050627A (en) 2023-01-30 2023-01-30 Photovoltaic power prediction method and photovoltaic power prediction model training method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310074262.1A CN116050627A (en) 2023-01-30 2023-01-30 Photovoltaic power prediction method and photovoltaic power prediction model training method

Publications (1)

Publication Number Publication Date
CN116050627A true CN116050627A (en) 2023-05-02

Family

ID=86133010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310074262.1A Pending CN116050627A (en) 2023-01-30 2023-01-30 Photovoltaic power prediction method and photovoltaic power prediction model training method

Country Status (1)

Country Link
CN (1) CN116050627A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116384593A (en) * 2023-06-01 2023-07-04 深圳市国电科技通信有限公司 Distributed photovoltaic output prediction method and device, electronic equipment and medium
CN117239737A (en) * 2023-11-09 2023-12-15 福建时代星云科技有限公司 Photovoltaic power generation amount prediction method and terminal
CN118094486A (en) * 2024-04-26 2024-05-28 湖南慧明谦数字能源技术有限公司 Full scene time sequence decomposition-based photovoltaic power generation power prediction method and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116384593A (en) * 2023-06-01 2023-07-04 深圳市国电科技通信有限公司 Distributed photovoltaic output prediction method and device, electronic equipment and medium
CN116384593B (en) * 2023-06-01 2023-08-18 深圳市国电科技通信有限公司 Distributed photovoltaic output prediction method and device, electronic equipment and medium
CN117239737A (en) * 2023-11-09 2023-12-15 福建时代星云科技有限公司 Photovoltaic power generation amount prediction method and terminal
CN117239737B (en) * 2023-11-09 2024-01-26 福建时代星云科技有限公司 Photovoltaic power generation amount prediction method and terminal
CN118094486A (en) * 2024-04-26 2024-05-28 湖南慧明谦数字能源技术有限公司 Full scene time sequence decomposition-based photovoltaic power generation power prediction method and system
CN118094486B (en) * 2024-04-26 2024-07-05 湖南慧明谦数字能源技术有限公司 Full scene time sequence decomposition-based photovoltaic power generation power prediction method and system

Similar Documents

Publication Publication Date Title
CN116050627A (en) Photovoltaic power prediction method and photovoltaic power prediction model training method
CN111370122B (en) Time sequence data risk prediction method and system based on knowledge guidance and application thereof
CN112712209B (en) Reservoir warehousing flow prediction method and device, computer equipment and storage medium
CN114239718B (en) High-precision long-term time sequence prediction method based on multi-element time sequence data analysis
CN113822418A (en) Wind power plant power prediction method, system, device and storage medium
CN117063820A (en) Intelligent garden monitoring platform based on big data and method thereof
CN112070322A (en) High-voltage cable line running state prediction method based on long-short term memory network
CN112257263A (en) Equipment residual life prediction system based on self-attention mechanism
WO2020228568A1 (en) Method for training power generation amount prediction model of photovoltaic power station, power generation amount prediction method and device of photovoltaic power station, training system, prediction system and storage medium
CN116014722A (en) Sub-solar photovoltaic power generation prediction method and system based on seasonal decomposition and convolution network
CN115660233A (en) Photovoltaic power prediction method and device, electronic equipment and storage medium
CN115081597A (en) Method, system, equipment and medium for performing carbon check by using electricity based on machine learning
CN117477551A (en) Photovoltaic power generation power prediction method and system based on domain knowledge embedded model
CN115713044B (en) Method and device for analyzing residual life of electromechanical equipment under multi-condition switching
CN117154680A (en) Wind power prediction method based on non-stationary transducer model
CN112509644A (en) Molecular optimization method, system, terminal equipment and readable storage medium
CN117374913A (en) Wave energy prediction method and device based on STL decomposition and multilayer seq2seq model
CN115564115A (en) Wind power plant power prediction method and related equipment
CN116131255A (en) Method and device for predicting future power generation capacity of power station based on time sequence conceptual drift
CN115017250A (en) Sparse track data recovery system and method based on deep learning
CN115826092A (en) Multi-meteorological-element prediction method and system based on information self-attention model
CN112201314B (en) Method and device for extracting molecular fingerprint and calculating correlation based on molecular fingerprint
CN109213800A (en) A kind of tobacco insect pest situation forecasting system and method
CN113962432A (en) Wind power prediction method and system integrating three-dimensional convolution and light-weight convolution threshold unit
CN112787882A (en) Internet of things edge traffic prediction method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination