Photovoltaic power generation power prediction method and device, electronic equipment and storage medium
Through the frequency information determination module, encoding module and timing modeling module, photovoltaic power generation data are processed, and the power prediction model is constructed, which solves the problem of inaccurate photovoltaic power generation power prediction and realizes accurate prediction of future power generation power.
Patent Information
- Application Number
- CN202510539278.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-08-08
AI Technical Summary
The photovoltaic power prediction method in the prior art lacks effective extraction of time series data, resulting in inaccurate prediction.
The frequency information determination module, encoding module and timing modeling module are used to process the photovoltaic power generation data, extract frequency information, encode and timing characteristics, and build a power prediction model to achieve accurate prediction.
It improves the accuracy of photovoltaic power generation prediction and can more accurately capture the changing trend of photovoltaic system output over time.
Smart Images

Figure CN120448830A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic power generation, and in particular to a method, device, electronic equipment and storage medium for predicting photovoltaic power generation. Background Art
[0002] With the widespread use of renewable energy, photovoltaic power generation, as an important component, has gradually increased its proportion in the energy structure. Accurately predicting photovoltaic power generation at future times is beneficial to the scheduling of power resources.
[0003] Among related methods, forecasting methods typically rely on simple statistical analysis or basic time series models, which fail to fully account for the complex dynamic characteristics of the data. Furthermore, as the scale of photovoltaic systems continues to expand, how to effectively utilize large amounts of historical data for accurate forecasting has become a pressing issue. Summary of the Invention
[0004] The present invention provides a photovoltaic power prediction method, device, electronic device and storage medium to solve the problem of inaccurate prediction caused by the lack of effective extraction of time series data in photovoltaic power prediction in related technologies.
[0005] According to one aspect of the present invention, a method for predicting photovoltaic power generation is provided, comprising:
[0006] Acquire a plurality of photovoltaic power generation data at a first moment, and determine a power prediction model corresponding to the photovoltaic power generation data, wherein the photovoltaic power generation data at least includes photovoltaic power generation; the power prediction model includes a frequency information determination module, an encoding module, and a time series modeling module; the frequency information determination module is used to extract frequency information of the photovoltaic power generation data, the encoding module is used to encode the frequency information according to a time step; and the time series modeling module is used to determine a time series feature of the encoding feature output by the encoding module;
[0007] The photovoltaic power generation data at the plurality of first moments are input into the power prediction model to obtain a predicted value of photovoltaic power generation at a second moment, wherein the second moment is later than the first moment.
[0008] According to another aspect of the present invention, there is provided a device for predicting photovoltaic power generation, comprising:
[0009] an acquisition module, configured to acquire a plurality of photovoltaic power generation data at a first moment and determine a power prediction model corresponding to the photovoltaic power generation data, wherein the photovoltaic power generation data includes at least photovoltaic power generation; the power prediction model includes a frequency information determination module, an encoding module, and a time series modeling module; the frequency information determination module is configured to extract frequency information of the photovoltaic power generation data; the encoding module is configured to encode the frequency information according to a time step; and the time series modeling module is configured to determine a time series feature of the encoding feature output by the encoding module;
[0010] The predicted value determination module is used to input the photovoltaic power generation data at multiple first moments into the power prediction model to obtain a predicted value of photovoltaic power generation at a second moment, wherein the second moment is later than the first moment.
[0011] According to another aspect of the present invention, an electronic device is provided, comprising:
[0012] at least one processor; and
[0013] a memory communicatively connected to the at least one processor; wherein,
[0014] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the photovoltaic power prediction method according to any embodiment of the present invention.
[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the photovoltaic power prediction method according to any embodiment of the present invention when executed.
[0016] The technical solution of the embodiment of the present invention first obtains photovoltaic power generation data at multiple first moments and determines a power prediction model corresponding to the photovoltaic power generation data. Since the photovoltaic power generation data at least includes photovoltaic power generation; the power prediction model includes a frequency information determination module, an encoding module and a time series modeling module; the frequency information determination module is used to extract the frequency information of the photovoltaic power generation data, and the encoding module is used to encode the frequency information according to the time step; the time series modeling module is used to determine the time series characteristics of the encoding characteristics output by the encoding module, which can provide sufficient data support and tools for the prediction of photovoltaic power generation; then, the photovoltaic power generation data at multiple first moments are input into the power prediction model to obtain a predicted value of the photovoltaic power generation at a second moment. Since the second moment is later than the first moment, accurate prediction of the photovoltaic power generation at future moments can be achieved, which solves the problem of inaccurate prediction caused by the lack of effective extraction of time series data in the photovoltaic power generation prediction in the related art, and can more accurately capture the changing trend of the photovoltaic system output over time, thereby improving the accuracy of the prediction of future power generation.
[0017] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 This is a flow chart of a photovoltaic power prediction method provided according to the first embodiment of the present invention;
[0020] Figure 2 This is a flow chart of a photovoltaic power prediction method provided according to the second embodiment of the present invention;
[0021] Figure 3 2 is a schematic structural diagram of a photovoltaic power prediction device provided according to a third embodiment of the present invention;
[0022] Figure 4 It is a structural diagram of an electronic device for implementing the photovoltaic power generation power prediction method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0026] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0027] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0028] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0029] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0030] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0031] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0032] Example 1
[0033] Figure 1 A flowchart of a photovoltaic power generation power prediction method is provided for the first embodiment of the present invention. This embodiment is applicable to the case of extracting time series features from photovoltaic power generation data to predict future photovoltaic power generation power. The method can be executed by a photovoltaic power generation power prediction device, which can be implemented in the form of hardware and / or software. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server, etc.
[0034] like Figure 1 As shown, the method may specifically include:
[0035] S110. Acquire photovoltaic power generation data at multiple first moments, and determine a power prediction model corresponding to the photovoltaic power generation data, wherein the photovoltaic power generation data at least includes photovoltaic power generation power; the power prediction model includes a frequency information determination module, an encoding module, and a time series modeling module; the frequency information determination module is used to extract the frequency information of the photovoltaic power generation data, and the encoding module is used to encode the frequency information according to a time step; the time series modeling module is used to determine the time series characteristics of the encoding characteristics output by the encoding module.
[0036] The photovoltaic power generation data can be understood as data related to the power output of a photovoltaic power station, used to analyze and predict the performance of a photovoltaic system. The photovoltaic power generation refers to the amount of electrical energy output generated by a photovoltaic system at a specific point in time or within a time period. Photovoltaic power generation is a key indicator of photovoltaic system performance and a core parameter that needs to be predicted in a power prediction model. The power prediction model can be understood as a mathematical or statistical model that predicts future photovoltaic power generation based on historical data and other factors. This power prediction model can help photovoltaic systems more accurately estimate future power supply conditions, thereby improving grid efficiency and stability. The first moment can be understood as the set of historical data time nodes required by the power prediction model for prediction. As the input time window of the power prediction model, a continuous time series of points (for example, one sampling point every 15 minutes over a two-hour period) can be selected to capture the dynamic characteristics of power generation changes. The second moment can be understood as the future target time point to be predicted, which, together with the first moment set, forms the input-output relationship of the time series prediction task. The second moment is a future time point or time period relative to the first moment. The second moment can also be used to evaluate the accuracy of the power prediction model by comparing the difference between the predicted value and the actual value for model validation. The frequency information determination module can be understood as a component of the power prediction model, which is used to extract frequency information from photovoltaic power generation data. The encoding module can be understood as being used to encode the frequency information according to a time step. The time step can be understood as the minimum time unit processed by the power prediction model, and its resolution (such as 5 minutes or 15 minutes, etc.) must match the inertial time constant of the photovoltaic system. The time step determines the length of the input sequence and the prediction step size in the sliding window mechanism. The time series modeling module can be understood as a component that captures the time-varying pattern of the encoded features output by the encoding module.
[0037] On the basis of the above method, optionally, the obtaining of multiple photovoltaic power generation data at the first moment includes: obtaining multiple photovoltaic power generation data at the first moment through sensors of a photovoltaic power station; or, transmitting the photovoltaic power generation data on the power equipment to a central server through wireless communication technology to obtain photovoltaic power generation data; or, in response to a data upload operation, obtaining the uploaded photovoltaic power generation data; or, pulling data from a preset photovoltaic power generation database to obtain the photovoltaic power generation data, etc., which are not specifically limited here.
[0038] By adopting this technical solution, photovoltaic power generation data at multiple first moments can be flexibly collected through various methods such as direct acquisition by sensors, wireless transmission to a central server, responding to data upload operations, or pulling from a database. This not only improves the convenience and flexibility of data acquisition, but also ensures the real-time and accuracy of the data, providing reliable data support for subsequent accurate prediction and analysis.
[0039] S120: Input the photovoltaic power generation data at the multiple first moments into the power prediction model to obtain a predicted value of photovoltaic power generation at a second moment, wherein the second moment is later than the first moment.
[0040] The predicted value may be understood as a prediction result output by a power prediction model, which is an estimated value of photovoltaic power generation at a second moment based on a plurality of photovoltaic power generation data at a first moment and the power prediction model.
[0041] The technical solution of the embodiment of the present invention first obtains photovoltaic power generation data at multiple first moments and determines a power prediction model corresponding to the photovoltaic power generation data. Since the photovoltaic power generation data at least includes photovoltaic power generation; the power prediction model includes a frequency information determination module, an encoding module and a time series modeling module; the frequency information determination module is used to extract the frequency information of the photovoltaic power generation data, and the encoding module is used to encode the frequency information according to the time step; the time series modeling module is used to determine the time series characteristics of the encoding characteristics output by the encoding module, which can provide sufficient data support and tools for the prediction of photovoltaic power generation; then, the photovoltaic power generation data at multiple first moments are input into the power prediction model to obtain a predicted value of the photovoltaic power generation at a second moment. Since the second moment is later than the first moment, accurate prediction of the photovoltaic power generation at future moments can be achieved, which solves the problem of inaccurate prediction caused by the lack of effective extraction of time series data in the photovoltaic power generation prediction in the related art, and can more accurately capture the changing trend of the photovoltaic system output over time, thereby improving the accuracy of the prediction of future power generation.
[0042] Example 2
[0043] Figure 2A flowchart of a photovoltaic power prediction method provided in Example 2 of the present invention. This embodiment, based on the above embodiments, further refines how to input the photovoltaic power generation data at the first moment into the power prediction model to obtain the predicted value of the photovoltaic power generation power at the second moment. Optionally, the power prediction model further includes a prediction module; the step of inputting the photovoltaic power generation data at the first moment into the power prediction model to obtain a predicted value of the photovoltaic power generation at the second moment includes: inputting the photovoltaic power generation data at the first moment into the frequency information determination module to determine frequency information of multiple frequency modes corresponding to the photovoltaic power generation data through the frequency information determination module; inputting the multiple frequency information into the encoding module to encode the input time step according to a trigonometric function to obtain a first encoding feature, mapping the frequency information into a second encoding feature corresponding to the first encoding feature, and adding the first encoding feature and the second encoding feature to obtain power encoding features corresponding to the frequency information of the multiple frequency modes; wherein the first encoding feature and the second encoding feature have the same dimension; inputting the multiple power encoding features into the time series modeling module to extract the first time series feature of each power encoding feature through the time series modeling module, and determining the second time series feature corresponding to each power encoding feature according to the first time series feature; and inputting the multiple second time series features into the prediction module to obtain a predicted value of the photovoltaic power generation at the second moment. For a specific implementation, please refer to the description of this embodiment. Among them, technical features that are the same or similar to those in the aforementioned embodiments are not repeated here.
[0044] like Figure 2 As shown, the method may specifically include:
[0045] S210. Acquire photovoltaic power generation data at multiple first moments, and determine a power prediction model corresponding to the photovoltaic power generation data, wherein the photovoltaic power generation data at least includes photovoltaic power generation power; the power prediction model includes a frequency information determination module, an encoding module, and a time series modeling module; the frequency information determination module is used to extract the frequency information of the photovoltaic power generation data, and the encoding module is used to encode the frequency information according to a time step; the time series modeling module is used to determine the time series characteristics of the encoding characteristics output by the encoding module, and the power prediction model also includes a prediction module.
[0046] S220: Input the photovoltaic power generation powers at the multiple first moments into the frequency information determination module, so as to determine frequency information of multiple frequency modes corresponding to the photovoltaic power generation data through the frequency information determination module.
[0047] The prediction module can be understood as part of a power prediction model, used to generate a predicted value of photovoltaic power generation at a second moment based on input features. The frequency mode can be understood as the different frequency components contained in the photovoltaic power generation, which can characterize different periodic variation characteristics. The frequency mode can be used to help identify and separate the variation patterns on different time scales in the photovoltaic system power generation data. The frequency information can be understood as a collection of different frequencies contained in the photovoltaic power generation data, used to describe the variation characteristics of the photovoltaic power generation data on different time scales.
[0048] On the basis of the above scheme, optionally, the frequency information determination module further includes a modal decomposition unit and an aggregation unit; the inputting of the multiple photovoltaic power generation powers at the first moments into the frequency information determination module to determine the frequency information of multiple frequency modes corresponding to the photovoltaic power generation data through the frequency information determination module includes: inputting the photovoltaic power generation power into the modal decomposition unit to perform modal decomposition on the photovoltaic power generation data through the modal decomposition unit to obtain multiple intrinsic modal functions; inputting the multiple intrinsic modal functions and the photovoltaic power generation power into the aggregation unit to aggregate the photovoltaic power generation data according to the modal function through the aggregation unit to obtain frequency information of multiple frequency modes corresponding to the photovoltaic power generation data.
[0049] Among them, the modal decomposition unit can be understood as a component in the frequency information determination module, which is used to decompose the complex signal into multiple intrinsic mode functions (IMFs). By performing modal decomposition on the photovoltaic power generation data, the change characteristics on different time scales can be separated, which is convenient for subsequent processing and analysis. The aggregation unit can be understood as another component in the frequency information determination module, which is responsible for recombining the intrinsic mode functions obtained by modal decomposition to form information with a specific frequency mode. The intrinsic mode function can be understood as the basic frequency component generated by the modal decomposition process, and each IMF represents a frequency component in the photovoltaic power generation data.
[0050] An optional implementation method receives photovoltaic power generation data, which includes photovoltaic power generation. The input photovoltaic power generation will be used to extract intrinsic mode functions (IMFs) based on morphological empirical mode decomposition (MEMD), preliminarily separate high-frequency and low-frequency modes, analyze the preliminarily decomposed IMFs, identify modes with similar frequencies, and then aggregate modes with the same frequency and reconstruct them into new intermediate components. The reconstructed components are further decomposed to refine the frequency separation. After multiple rounds of decomposition and reconstruction, the final frequency information C is generated. k , ensuring that modes of the same frequency are aggregated into the same component
[0051]
[0052] Where X represents photovoltaic power generation, C k represents the frequency information of the kth frequency component, and R represents the residual term.
[0053] This technical solution decomposes photovoltaic power data through a modal decomposition unit to obtain multiple intrinsic modal functions. The modal functions are then combined with the photovoltaic power data through an aggregation unit to extract frequency information of multiple frequency modes. This process effectively separates the different time scale features in the photovoltaic data, which not only enhances the model's ability to capture complex dynamic changes, but also improves prediction accuracy and stability.
[0054] S230. Input the multiple frequency information into the encoding module, so that the encoding module encodes the input time step according to a trigonometric function to obtain a first encoding feature, map the frequency information into a second encoding feature corresponding to the first encoding feature, and add the first encoding feature and the second encoding feature to obtain power encoding features corresponding to the frequency information of multiple frequency modes; wherein the first encoding feature and the second encoding feature have the same dimension.
[0055] Among them, the first coding feature can be understood as a coding feature obtained based on trigonometric function coding. The first coding feature encodes the time step through a specific mathematical transformation (such as using sine or cosine function, etc.), so that the time information can be represented in different dimensions. The second coding feature can be understood as another set of coding features corresponding to the first coding feature, which can be directly mapped from the frequency information. The second coding feature supplements the information of the first coding feature by directly mapping the frequency information to the coding space, thereby enhancing the power prediction model's capture of frequency information. The power coding feature can be understood as the result of combining the first coding feature and the second coding feature, representing the coding features under multiple frequency modes. By combining the two coding features, the power coding feature can comprehensively describe the time and frequency characteristics of photovoltaic power generation data, and provide input for subsequent time series modeling.
[0056] In an optional implementation, the encoding module transforms each frequency information C through a learnable linear transformation (LinearTransformation) k Mapped to the high-dimensional feature space, the positional encoding (PE) based on the sine and cosine functions is used to assign a unique identifier to each time step to obtain the first encoded feature.
[0057] The specific calculation method of position encoding PE is:
[0058]
[0059] In the above formula, PE represents the first encoded feature, t represents the time step, i represents the index of the embedding dimension, and d represents the total embedding dimension. The total embedding dimension represents the dimension size used when converting photovoltaic power generation data into a matrix representation.
[0060] Power encoding feature E k is the sum of the embedding layer mapping output and the positional encoding, i.e.:
[0061] E k =Linear(C k )+PE;
[0062] Where, E k Represents power coding features, Linear(C k ) represents the second encoding feature, and PE represents the first encoding feature.
[0063] S240: Input the plurality of power coding features into the timing modeling module, extract the first timing feature of each power coding feature through the timing modeling module, and determine the second timing feature corresponding to each power coding feature according to the first timing feature.
[0064] The first time series feature can be understood as a time series feature extracted from the power coding feature, which is used to represent the temporal dynamic variation pattern contained in each power coding feature. The second time series feature can be understood as a high-level time series feature obtained by further processing the first time series feature. The second time series feature can be used to represent the long-range dependence and dynamic time series characteristics of photovoltaic power generation.
[0065] On the basis of the above scheme, optionally, the time series modeling module includes an activation function unit, a splicing unit, a first time series feature determination unit, a feedforward feature determination unit and a second time series feature determination unit; the inputting of the multiple power coding features into the time series modeling module to extract the first time series feature in the coding feature through the time series modeling module, and determining the second time series feature according to the first time series feature, includes: inputting the multiple power coding features into the activation function unit in the time series modeling module to determine the weight matrix of each power coding feature based on linear transformation through the activation function unit, and determining the probability distribution feature of each power coding feature according to the weight matrix; inputting the multiple power coding features into the activation function unit in the time series modeling module to extract the first time series feature in the coding feature through the time series modeling module, and determining the second time series feature according to the first time series feature. The probability distribution feature of the rate coding feature is input into the splicing unit, and the multiple probability distribution features are spliced by the splicing unit to obtain splicing feature data; the splicing feature data is input into the first time series feature determination unit, so that the first time series feature is determined by the first time series feature determination unit according to the splicing feature data and the photovoltaic power generation data; the first time series feature is input into the feedforward feature determination unit, so that the feedforward feature determination unit determines the feedforward feature according to the first time series feature; the feedforward feature is input into the second time series feature determination unit, so that the second time series feature is determined by the second time series feature determination unit according to the feedforward feature and the first time series feature.
[0066] The activation function unit can be understood as part of the time series modeling module, used to determine the weight matrix for each power-coded feature based on a linear transformation, and to use the weight matrix to determine the probability distribution characteristics of each feature. The splicing unit can be understood as part of the time series modeling module, used to combine multiple probability distribution features into a larger feature representation. The splicing unit generates spliced feature data by splicing different probability distribution features, providing a more comprehensive data representation for subsequent steps and facilitating the extraction of richer time series features. The first time series feature determination unit can be understood as a unit component that extracts preliminary time series features from the spliced spliced feature data. The feedforward feature determination unit can be understood as a unit component that calculates the feedforward features based on the first time series features, aiming to capture direct correlations in the data. The second time series feature determination unit can be understood as a unit component responsible for determining the final time series features based on the feedforward features and the first time series features. The weight matrix can be understood as a set of parameters that adjust the importance of input features. By adjusting the weight matrix, the impact of different power-coded features on the final output can be controlled. The probability distribution characteristics can be understood as statistical characteristics of the different possible values of the power-coded features and their likelihood of occurrence. The concatenated feature data can be understood as a feature representation formed by concatenating multiple different probability distribution features. This provides a data structure containing more dimensional information, facilitating a more comprehensive analysis of data characteristics by subsequent algorithms. The feedforward feature can be understood as a feature calculated based on the first time series feature, used to capture direct correlations.
[0067] An optional implementation method is to encode the power feature E k As input. For each time step of the input, the power encoding feature E k , the corresponding Query, Key and Value weight matrices are obtained through linear transformation:
[0068] E k =Input;
[0069] Q=E k W Q , K=E k W K , V=E k W V ;
[0070] Among them, W Q , W K , W V is a learnable weight matrix; Q, K, and V represent the weight matrices of Query, Key, and Value, respectively.
[0071] The self-attention score is calculated by the scaled dot product between the Query and Keys matrices:
[0072]
[0073] Where QK T It is a (t, t) matrix, which represents the attention score of each time step t to other time steps, T represents transpose, d k is the dimension of each attention head, The purpose is to make the back propagation gradient more stable.
[0074] By obtaining probability distribution features, we can capture long-range dependencies in the sequence:
[0075]
[0076] After the splicing unit, splicing:
[0077] MultiHead Output=Concat(head1,...,head H )W O
[0078] Among them, W O The dimension is hd v ×d model , and each head h =Attention(Q h , K h , V h ); h represents the number of attention heads, d v Denotes the vector dimension of each attention head, d model Indicates the same dimension of input and output. h , K h , V h Represents the weight matrix of Query, Key and Value of the h-th attention head.
[0079] The output of the splicing unit is residually connected to X and then normalized by the layer:
[0080] Z=LayerNorm(X+MultiHead Output);
[0081] Wherein, Z represents the first time series feature.
[0082] Layer normalization formula:
[0083]
[0084] Where μ, σ 2are the mean and variance of the input feature x, γ and β are learnable scaling and offset parameters, and ∈ is a minimum value of 1e-5 to prevent the denominator from being zero.
[0085] The first time series feature is input into the feedforward feature determination unit to obtain the feedforward feature FFN(Z).
[0086] FFN(Z) and the normalized Z are again subjected to residual connection and layer normalization to obtain the second temporal feature T k :
[0087] T k =LayerNorm(Z+FFN(Z));
[0088] Among them, T k It represents the second time series feature corresponding to the k-th power coding feature frequency information, where the second time series feature includes the long-range dependency and dynamic time series features in the sequence.
[0089] By adopting this technical solution, the activation function unit is first used to perform linear transformation and probability distribution feature extraction on the power coding features. Then the splicing unit integrates the probability distribution features into a more comprehensive data representation. The first time series feature determination unit identifies the first time series feature based on the spliced feature data combined with the photovoltaic power generation data. The feedforward feature determination unit further refines these features to capture direct correlations. Finally, the second time series feature determination unit combines the feedforward feature with the first time series feature to generate the second time series feature, which significantly improves the power prediction model's ability to capture the complex time dynamics in photovoltaic power generation data and enhances the prediction accuracy and stability.
[0090] On the basis of the above scheme, optionally, the feedforward feature determination unit includes a feedforward network, and the feedforward network is divided into two layers; the feedforward feature determination unit determines the feedforward feature according to the first time series feature, including: inputting the first time series feature into the first layer feedforward network, so as to determine the first feedforward feature through the first layer feedforward network according to the first time series feature, the first weight matrix and the first bias vector of the first layer of the feedforward network; inputting the first feedforward feature into the second layer feedforward network, so as to determine the feedforward feature through the second layer feedforward network according to the first feedforward feature, the second weight matrix and the second bias vector of the second layer of the feedforward network.
[0091] The feedforward network can be understood as a neural network architecture in which data flows from front to back without feedback connections, and is used to extract feedforward features from the first time series features. The first feedforward network layer can be understood as the first layer in the feedforward network, responsible for preliminary processing of the input first time series features. The second feedforward network layer can be understood as the second layer in the feedforward network, performing further processing based on the first feedforward features output by the first layer. The first weight matrix can be understood as a set of parameters used in the first feedforward network layer to adjust the importance of the first input time series features. By multiplying the first weight matrix with the first time series features, the first weight matrix determines the degree of influence of each input first time series feature on the final output. The first bias vector can be understood as a constant term added to the output of the first feedforward network layer, helping the feedforward network adapt to different data distributions. The first bias vector allows the feedforward network to produce non-zero outputs even when the input is zero. The first feedforward features can be understood as intermediate feature representations obtained after the first feedforward network layer processes the first time series features. The first weight matrix and the first bias vector are responsible for expanding the input first time series features to a high-dimensional space and enhancing the nonlinear expression capability of the network. The second weight matrix can be understood as a set of parameters used in the second-layer feedforward network to further adjust the first feedforward features. The second bias vector can be understood as a constant term added to the output of the second-layer feedforward network. The second bias vector is similar to the role of the first bias vector, but acts on the second layer to ensure that the feedforward network can better fit the data and enhance its ability to express complex patterns. The second weight matrix and the second bias vector are used to map the high-dimensional first feedforward features back to the dimension of the first time series features to ensure the coherence of the network structure.
[0092] In an optional implementation, the feedforward network FFN is processed as follows:
[0093] FFN(Z)=max(0,Z*W1+b1)W2+b2;
[0094] Among them, W1 and b1 serve as the weight matrix and bias vector of the first fully connected layer of the feedforward network, and W2 and b2 serve as the weight matrix and bias vector of the second feedforward network. W1 and b1 are responsible for expanding the input features to high-dimensional space and enhancing the nonlinear expression ability of the network. W2 and b2 are responsible for mapping high-dimensional features back to the original dimension to ensure the coherence of the network structure.
[0095] By adopting this technical solution, the first time series feature is processed by a two-layer feedforward network in the feedforward feature determination unit. The first layer of the network uses the weight matrix and bias vector to generate the first feedforward feature, and the second layer further refines the first feedforward feature to capture deeper patterns, thereby enhancing the power prediction model's ability to understand the intrinsic structure of photovoltaic power generation data, significantly improving the depth and accuracy of feature extraction, and thus improving the accuracy and reliability of the final prediction.
[0096] S250: Input the plurality of second time series features into the prediction module to obtain a predicted value of photovoltaic power generation at a second moment, wherein the second moment is later than the first moment.
[0097] Based on the above scheme, optionally, the prediction module includes a multi-head attention unit, a fusion unit and a prediction unit; the inputting of the second time series feature into the prediction module to obtain the predicted value of the photovoltaic power generation power at the second moment includes: inputting the second time series feature into the multi-head attention unit in the prediction module to obtain the attention feature; inputting the attention feature and the photovoltaic power generation data into the fusion unit in the prediction module to obtain fusion feature data; inputting the fusion feature data into the prediction unit in the prediction module to obtain the predicted value of the photovoltaic power generation power.
[0098] Among them, the multi-head attention unit can be understood as a component of the prediction module, which is used to focus on different parts of the input when processing the second time series feature. Each "head" of the multi-head attention unit can focus on different features or time points, and can more comprehensively understand the second time series feature of the input. The attention feature can be understood as the feature representation obtained after processing by the multi-head attention unit, which is used to highlight the important features in the second time series feature. The fused feature data can be understood as a comprehensive feature representation generated by the fusion unit, which includes attention features and photovoltaic power generation data information. By merging two different types of information, attention features and photovoltaic power generation data, the fused feature data can simultaneously reflect the temporal dynamic characteristics of photovoltaic power generation data and its inherent correlation, providing strong support for the accurate prediction of photovoltaic power generation power.
[0099] An optional implementation method uses a multi-head attention unit, takes all second temporal features T as input, calculates attention weights across components, and implements feature integration, which can enhance the power prediction model's ability to comprehensively understand multi-scale features.
[0100] Cross-component attention calculation formula:
[0101] F = MultiHead(T, T, T);
[0102] Where T = [T1, T2, ..., Tk ] is the attention feature obtained by concatenating the temporal features of all components.
[0103] Take the attention features F and X output by the multi-head attention unit as input. Project X to the same dimension as the attention feature F through linear transformation:
[0104] C proj =Linear(X);
[0105] Among them, Linear(·) is a learnable linear transformation layer.
[0106] Combine the attention features with C proj Add together to get the fusion feature data representation F enhanced :
[0107] F enhanced =F+C proj ;
[0108] The detailed information of photovoltaic power generation is integrated into the fusion feature data through residual connection, enhancing the richness and expressiveness of feature representation.
[0109] By adopting this technical solution, the multi-head attention unit in the prediction module processes the second time series features, extracts the attention features, and the fusion unit combines the attention features with the photovoltaic power generation data to generate fused feature data. Finally, the prediction unit makes an accurate prediction based on the fused feature data, which strengthens the power prediction model's attention to important information and integrates the advantages of multiple data sources, thereby improving the accuracy and reliability of photovoltaic power generation prediction.
[0110] On the basis of the above scheme, optionally, the photovoltaic power generation data also includes meteorological data; the power prediction model also includes a perception module and an attention module; the inputting the second time series feature into the prediction module to obtain the predicted value of the photovoltaic power generation power at the second moment includes: inputting the meteorological data into the perception module to determine the perception characteristics of the meteorological data through the perception module; inputting the perception characteristics into the attention module to determine the meteorological attention weight of the perception characteristics according to the perception characteristics through the attention module; inputting the second time series feature, the meteorological data and the meteorological attention weight into the prediction module to obtain the predicted value of the photovoltaic power generation power at the second moment.
[0111] The meteorological data can be understood as data on various weather conditions that affect photovoltaic power generation efficiency, including but not limited to parameters such as irradiance, ambient temperature, and cloud cover. Meteorological data affects the energy conversion efficiency of photovoltaic panels, thereby affecting photovoltaic power generation. The perception features can be understood as feature representations extracted from meteorological data by the perception module. The perception module can be understood as a component unit that processes input meteorological data and extracts effective features that facilitate subsequent processing. The perception features capture key patterns and trends in meteorological data, enabling the power prediction model to better understand the impact of the external weather environment on photovoltaic power generation, thereby improving prediction accuracy. The attention module can be understood as a module that determines meteorological attention weights based on the perception features, allowing the power prediction model to focus more on the meteorological factors that have the greatest impact on photovoltaic power generation prediction, thereby optimizing prediction results. The meteorological attention weights can be understood as weights assigned to each perception feature based on the importance of the meteorological data. The meteorological attention weights determine which meteorological factors (such as cloud cover or solar radiation intensity during a specific time period) are most critical to the final power generation prediction, ensuring that the power prediction model considers these meteorological factors when making predictions.
[0112] In an optional implementation, the prediction module is mainly composed of a multi-layer perceptron (MLP), and each fully connected layer is followed by an activation function (ReLU) and regularization operations such as Dropout to enhance the expression and generalization capabilities of the model. enhanced (No meteorological data) is input into the MLP, and after multiple layers of nonlinear transformation, the predicted value of photovoltaic power generation is output.
[0113]
[0114] An optional implementation method is to convert the meteorological data X weather Input into another multi-layer perceptron to obtain the intermediate representation of meteorological features:
[0115] h weather =MLP weather (X weather );
[0116] The meteorological attention weight of the meteorological feature is calculated by the SoftMax function to indicate the contribution of each meteorological feature to the prediction:
[0117] w=SoftMax(MLP attention (h weather ));
[0118] Among them, MLP attention It is a multi-layer perceptron used to calculate weather attention weights.
[0119] The fused feature data is added to the weighted meteorological features and then input into the multi-layer perceptron to generate the final prediction value:
[0120]
[0121] Among them, MLP fin5l It is the final multi-layer perceptron used to map the fused feature data to the prediction results.
[0122] By adopting this technical solution, the power prediction model not only utilizes the time dynamic characteristics of photovoltaic power generation data at the first moment, but also combines real-time meteorological data. By sensing and weighting the meteorological data, the accuracy and reliability of the power prediction model are improved.
[0123] The technical solution of the embodiment of the present invention utilizes a frequency information determination module to extract frequency information of multiple frequency modes, and then uses a trigonometric function through an encoding module to encode the time step and generate a first encoding feature and a second encoding feature. The two encoding features are added together to form a power encoding feature. The time series modeling module further extracts a first time series feature reflecting changes at different time scales from the power encoding feature, and determines a higher-level second time series feature based on this. Finally, the prediction module uses the second time series feature to predict photovoltaic power generation power, significantly improving the ability to capture the complex dynamic characteristics of photovoltaic data, greatly improving the prediction accuracy and reliability, and providing strong support for power dispatching.
[0124] Example 3
[0125] Figure 3 This is a schematic diagram of the structure of a photovoltaic power prediction device provided by the third embodiment of the present invention. Figure 3 As shown, the device includes: an acquisition module 310 and a prediction value determination module 320.
[0126] An acquisition module 310 is used to acquire photovoltaic power generation data at multiple first moments and determine a power prediction model corresponding to the photovoltaic power generation data, wherein the photovoltaic power generation data at least includes photovoltaic power generation power; the power prediction model includes a frequency information determination module, an encoding module and a time series modeling module; the frequency information determination module is used to extract the frequency information of the photovoltaic power generation data, and the encoding module is used to encode the frequency information according to the time step; the time series modeling module is used to determine the time series characteristics of the encoding characteristics output by the encoding module; a prediction value determination module 320 is used to input the photovoltaic power generation data at multiple first moments into the power prediction model to obtain a predicted value of the photovoltaic power generation power at a second moment, wherein the second moment is later than the first moment.
[0127] The technical solution of the embodiment of the present invention is as follows: first, the photovoltaic power generation data at a plurality of first moments are acquired by the acquisition module 310, and a power prediction model corresponding to the photovoltaic power generation data is determined. Since the photovoltaic power generation data at least includes photovoltaic power generation; the power prediction model includes a frequency information determination module, an encoding module, and a time series modeling module; the frequency information determination module is used to extract the frequency information of the photovoltaic power generation data, and the encoding module is used to encode the frequency information according to a time step; the time series modeling module is used to determine the time series characteristics of the encoding characteristics output by the encoding module, which can provide sufficient data support and tools for the prediction of photovoltaic power generation; then, the photovoltaic power generation data at the plurality of first moments are input into the power prediction model by the prediction value determination module 320 to obtain a predicted value of the photovoltaic power generation at a second moment. Since the second moment is later than the first moment, an accurate prediction of the photovoltaic power generation at a future moment can be achieved, which solves the problem of inaccurate prediction caused by the lack of effective extraction of time series data in the photovoltaic power generation prediction in the related art, and can more accurately capture the changing trend of the photovoltaic system output over time, thereby improving the accuracy of the prediction of future power generation.
[0128] Based on the above scheme, optionally, the power prediction model further includes a prediction module; the prediction value determination module includes: a frequency information determination submodule, a power coding feature determination submodule, a second timing feature determination submodule and a prediction submodule. The frequency information determination submodule is configured to input the photovoltaic power generation powers at the multiple first moments into the frequency information determination module, so that the frequency information determination module determines frequency information of multiple frequency modes corresponding to the photovoltaic power generation data. The power coding feature determination submodule is configured to input the multiple frequency information into the encoding module, so that the encoding module encodes the input time step according to a trigonometric function to obtain a first coding feature, maps the frequency information into a second coding feature corresponding to the first coding feature, and adds the first coding feature and the second coding feature to obtain power coding features corresponding to the frequency information of the multiple frequency modes; wherein the first coding feature and the second coding feature have the same dimension. The second time series feature determination submodule is configured to input the multiple power coding features into the time series modeling module, so that the time series modeling module extracts the first time series feature from each power coding feature, and determines the second time series feature corresponding to each power coding feature based on the first time series feature. The prediction submodule is configured to input the multiple second time series features into the prediction module to obtain a predicted value of the photovoltaic power generation power at the second moment.
[0129] Based on the above scheme, optionally, the time series modeling module includes an activation function unit, a splicing unit, a first time series feature determination unit, a feedforward feature determination unit and a second time series feature determination unit; the second time series feature determination submodule includes: a probability distribution feature determination unit, a splicing feature data determination unit, a third time series feature determination unit, a second feedforward feature determination unit and a fourth time series feature determination unit. Among them, the probability distribution feature determination unit is used to input multiple power coding features into the activation function unit in the time series modeling module, so as to determine the weight matrix of each power coding feature based on linear transformation through the activation function unit, and determine the probability distribution feature of each power coding feature according to the weight matrix; the splicing feature data determination unit is used to input the probability distribution features of multiple power coding features into the splicing unit, and splice multiple probability distribution features through the splicing unit to obtain splicing feature data; the third time series feature determination unit is used to input the splicing feature data into the first time series feature determination unit, so as to determine the first time series feature according to the splicing feature data and the photovoltaic power generation data through the first time series feature determination unit; the second feedforward feature determination unit is used to input the first time series feature into the feedforward feature determination unit, so as to determine the feedforward feature according to the first time series feature through the feedforward feature determination unit; the fourth time series feature determination unit is used to input the feedforward feature into the second time series feature determination unit, so as to determine the second time series feature according to the feedforward feature and the first time series feature through the second time series feature determination unit.
[0130] On the basis of the above scheme, optionally, the feedforward feature determination unit includes a feedforward network, which is divided into two layers; the second feedforward feature determination unit is specifically used to: input the first time series feature into the first layer feedforward network, so as to determine the first feedforward feature through the first layer feedforward network according to the first time series feature, the first weight matrix and the first bias vector of the first layer of the feedforward network; input the first feedforward feature into the second layer feedforward network, so as to determine the feedforward feature through the second layer feedforward network according to the first feedforward feature, the second weight matrix and the second bias vector of the second layer of the feedforward network.
[0131] Based on the above solution, optionally, the photovoltaic power generation data also includes meteorological data; the power prediction model also includes a perception module and an attention module; the prediction submodule includes: a perception feature determination unit, a meteorological attention weight determination unit, and a first prediction unit. The perception feature determination unit is used to input the meteorological data into the perception module to determine the perception feature of the meteorological data through the perception module; the meteorological attention weight determination unit is used to input the perception feature into the attention module to determine the meteorological attention weight of the perception feature based on the perception feature through the attention module; the first prediction unit is used to input the second time series feature, the meteorological data, and the meteorological attention weight into the prediction module to obtain the predicted value of the photovoltaic power generation at the second moment.
[0132] Based on the above solution, optionally, the prediction module includes a multi-head attention unit, a fusion unit, and a prediction unit; the prediction submodule includes: an attention feature determination unit, a fusion feature data determination unit, and a second prediction unit. The attention feature determination unit is configured to input the second time series feature into the multi-head attention unit in the prediction module to obtain an attention feature; the fusion feature data determination unit is configured to input the attention feature and the photovoltaic power generation data into the fusion unit in the prediction module to obtain fusion feature data; and the second prediction unit is configured to input the fusion feature data into the prediction unit in the prediction module to obtain a predicted value of photovoltaic power generation power.
[0133] Based on the above solution, optionally, the frequency information determination module further includes a modal decomposition unit and an aggregation unit; and the frequency information determination submodule includes an intrinsic modal function determination unit and a frequency information determination unit. The intrinsic modal function determination unit is configured to input the photovoltaic power generation power into the modal decomposition unit, so that the modal decomposition unit performs modal decomposition on the photovoltaic power generation data to obtain a plurality of intrinsic modal functions; and the frequency information determination unit is configured to input the plurality of intrinsic modal functions and the photovoltaic power generation power into the aggregation unit, so that the aggregation unit aggregates the photovoltaic power generation data according to the modal functions to obtain frequency information of a plurality of frequency modes corresponding to the photovoltaic power generation data.
[0134] The photovoltaic power generation prediction device provided in the embodiment of the present invention can execute the photovoltaic power generation prediction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0135] Example 4
[0136] Figure 4A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0137] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0138] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0139] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any other suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for predicting photovoltaic power generation.
[0140] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product that includes a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication unit 19, or installed from the storage unit 18, or installed from the ROM 12. When the computer program is executed by the processor 11, the above-mentioned functions defined in the method of the embodiment of the present invention are performed.
[0141] In some embodiments, a method for predicting photovoltaic power generation can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method for predicting photovoltaic power generation described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to execute a method for predicting photovoltaic power generation through any other appropriate means (e.g., by means of firmware).
[0142] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips or systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0143] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0144] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0145] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0146] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0147] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0148] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0149] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for predicting photovoltaic power generation, characterized in that: include: Acquire a plurality of photovoltaic power generation data at a first moment, and determine a power prediction model corresponding to the photovoltaic power generation data, wherein the photovoltaic power generation data at least includes photovoltaic power generation; the power prediction model includes a frequency information determination module, an encoding module, and a time series modeling module; the frequency information determination module is used to extract frequency information of the photovoltaic power generation data, the encoding module is used to encode the frequency information according to a time step; and the time series modeling module is used to determine a time series feature of the encoding feature output by the encoding module; The photovoltaic power generation data at the plurality of first moments are input into the power prediction model to obtain a predicted value of photovoltaic power generation at a second moment, wherein the second moment is later than the first moment.
2. The method according to claim 1, characterized in that The power prediction model further includes a prediction module; the step of inputting the plurality of photovoltaic power generation data at the first moment into the power prediction model to obtain a predicted value of photovoltaic power generation at the second moment includes: Inputting the photovoltaic power generation powers at the plurality of first moments into the frequency information determination module, so as to determine frequency information of a plurality of frequency modes corresponding to the photovoltaic power generation data through the frequency information determination module; Inputting the plurality of frequency information into the encoding module, encoding the input time step according to a trigonometric function by the encoding module to obtain a first encoding feature, mapping the frequency information into a second encoding feature corresponding to the first encoding feature, and adding the first encoding feature and the second encoding feature to obtain power encoding features corresponding to the frequency information of the plurality of frequency modes; wherein the first encoding feature and the second encoding feature have the same dimension; Inputting the plurality of power coding features into the time series modeling module, extracting a first time series feature from each of the power coding features through the time series modeling module, and determining the second time series feature corresponding to each of the power coding features according to the first time series feature; A plurality of the second time series features are input into the prediction module to obtain a predicted value of photovoltaic power generation at a second moment.
3. The method according to claim 2, characterized in that The time series modeling module includes an activation function unit, a splicing unit, a first time series feature determination unit, a feedforward feature determination unit, and a second time series feature determination unit; inputting the plurality of power coding features into the time series modeling module to extract a first time series feature from the coding features through the time series modeling module, and determining the second time series feature based on the first time series feature, including: Inputting the plurality of power coding features into an activation function unit in the time series modeling module, determining a weight matrix for each power coding feature based on a linear transformation through the activation function unit, and determining a probability distribution feature for each power coding feature according to the weight matrix; Inputting the probability distribution features of the plurality of power coding features into the splicing unit, and splicing the plurality of probability distribution features by the splicing unit to obtain splicing feature data; Inputting the splicing feature data into the first time series feature determination unit, so that the first time series feature determination unit determines a first time series feature according to the splicing feature data and the photovoltaic power generation data; Inputting the first time series feature into the feedforward feature determination unit, so that the feedforward feature determination unit determines a feedforward feature according to the first time series feature; The feedforward feature is input into the second time series feature determination unit, so that the second time series feature is determined by the second time series feature determination unit according to the feedforward feature and the first time series feature.
4. The method according to claim 3, characterized in that The feedforward feature determination unit includes a feedforward network, and the feedforward network is divided into two layers; determining the feedforward feature according to the first time series feature by the feedforward feature determination unit includes: Inputting the first time series feature into a first-layer feedforward network to determine a first feedforward feature through the first-layer feedforward network according to the first time series feature, a first weight matrix of the first layer of the feedforward network, and a first bias vector; The first feedforward feature is input into a second-layer feedforward network to determine a feedforward feature through the second-layer feedforward network according to the first feedforward feature, a second weight matrix and a second bias vector of the second layer of the feedforward network.
5. The method according to claim 2, characterized in that The photovoltaic power generation data also includes meteorological data; the power prediction model also includes a perception module and an attention module; the inputting the second time series feature into the prediction module to obtain a predicted value of photovoltaic power generation at a second moment includes: Inputting the meteorological data into the perception module to determine the perception characteristics of the meteorological data through the perception module; Inputting the perception feature into the attention module, so as to determine, by the attention module, a meteorological attention weight of the perception feature according to the perception feature; The second time series feature, the meteorological data and the meteorological attention weight are input into the prediction module to obtain a predicted value of the photovoltaic power generation power at the second moment.
6. The method according to claim 2, characterized in that The prediction module includes a multi-head attention unit, a fusion unit, and a prediction unit; the second time series feature is input into the prediction module to obtain a predicted value of photovoltaic power generation at the second moment, including: Inputting the second time series feature into the multi-head attention unit in the prediction module to obtain an attention feature; Inputting the attention feature and the photovoltaic power generation data into the fusion unit in the prediction module to obtain fusion feature data; The fused feature data is input into the prediction unit in the prediction module to obtain a predicted value of photovoltaic power generation.
7. The method according to claim 2, characterized in that The frequency information determination module further includes a modal decomposition unit and an aggregation unit; the photovoltaic power generation powers at the plurality of first moments are input into the frequency information determination module to determine frequency information of a plurality of frequency modes corresponding to the photovoltaic power generation data through the frequency information determination module, including: Inputting the photovoltaic power generation power into the modal decomposition unit, so as to perform modal decomposition on the photovoltaic power generation data through the modal decomposition unit to obtain a plurality of intrinsic modal functions; The plurality of intrinsic modal functions and the photovoltaic power generation power are input into the aggregation unit, so that the aggregation unit aggregates the photovoltaic power generation data according to the modal functions to obtain frequency information of a plurality of frequency modes corresponding to the photovoltaic power generation data.
8. A photovoltaic power generation prediction device, characterized in that: include: an acquisition module, configured to acquire a plurality of photovoltaic power generation data at a first moment and determine a power prediction model corresponding to the photovoltaic power generation data, wherein the photovoltaic power generation data includes at least photovoltaic power generation; the power prediction model includes a frequency information determination module, an encoding module, and a time series modeling module; the frequency information determination module is configured to extract frequency information of the photovoltaic power generation data; the encoding module is configured to encode the frequency information according to a time step; and the time series modeling module is configured to determine a time series feature of the encoding feature output by the encoding module; The predicted value determination module is used to input the photovoltaic power generation data at multiple first moments into the power prediction model to obtain a predicted value of photovoltaic power generation at a second moment, wherein the second moment is later than the first moment.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can perform the photovoltaic power prediction method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the photovoltaic power prediction method according to any one of claims 1 to 7 when executed.
Citation Information
Cited By
Photovoltaic power short-term multi-step prediction method for enhancing feature extraction through FECAM-SERTCN
CN120855335A