Photovoltaic power multi-step prediction method and system based on multi-view feature extraction and multi-task learning
By employing multi-view feature extraction and multi-task learning methods, and integrating feature information using multiple neural networks and attention mechanisms, the problem of insufficient photovoltaic power prediction accuracy is solved, achieving more efficient multi-step prediction and supporting the stable operation of the power grid.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HOHAI UNIV
- Filing Date
- 2024-05-08
- Publication Date
- 2026-05-29
AI Technical Summary
Existing photovoltaic power prediction methods do not fully extract features from historical data and ignore the correlation between multi-step prediction values, resulting in insufficient prediction accuracy and affecting the safe and stable operation of the power grid.
We employ a multi-perspective feature extraction and multi-task learning approach, utilizing long short-term memory neural networks, multilayer perceptrons, and convolutional neural networks to extract features from temporal, global, and local perspectives. We then integrate features and train the model using a lightweight attention mechanism and an improved dynamic weight averaging method to enhance prediction accuracy.
It significantly improves the accuracy and overall performance of multi-step photovoltaic power prediction, ensuring the safe and stable operation of the power grid, and has good operating efficiency and engineering practical value.
Smart Images

Figure CN118364228B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic power generation technology, specifically to a method and system for multi-step prediction of photovoltaic power based on multi-view feature extraction and multi-task learning. Background Technology
[0002] Solar energy has garnered widespread international attention due to its wide distribution, ease of extraction, high energy efficiency, and lack of pollution, becoming one of the main directions for renewable energy research and development. Photovoltaic power generation, with its advantages of being noiseless, pollution-free, not limited by geographical location, and having a short construction period, has become the most effective way to utilize solar energy.
[0003] Because photovoltaic (PV) power generation is affected by meteorological factors such as sunshine, cloud cover, and temperature, its power output is intermittent and fluctuates. Therefore, when PV power is connected to the grid, it can impact the safe and stable operation of the power grid, severely limiting its large-scale application. Thus, accurate prediction of PV power generation is essential.
[0004] Photovoltaic power forecasting can be categorized into single-step forecasting and multi-step forecasting based on the forecasting step size. Compared to single-step forecasting, multi-step forecasting can provide power forecasts for multiple future time points, reflecting power change trends and fluctuations over a future period, and thus offering greater guidance for grid dispatch optimization. Existing photovoltaic power forecasting methods suffer from insufficient historical data feature extraction and neglect of the correlation between multi-step forecast values, leading to inadequate forecast accuracy. Improvements are necessary to enhance forecast accuracy. Summary of the Invention
[0005] Purpose of the invention: The purpose of this invention is to provide a multi-step photovoltaic power prediction method and system based on multi-view feature extraction and multi-task learning, which can improve the accuracy of ultra-short-term photovoltaic power prediction.
[0006] Technical Solution: To achieve the above-mentioned objectives, this invention proposes a multi-step photovoltaic power prediction method based on multi-view feature extraction and multi-task learning, comprising the following steps:
[0007] The raw historical photovoltaic power data is preprocessed, including outlier handling, missing value imputation, and data normalization.
[0008] Based on the preprocessed data, multiple expert feature networks are used to extract features from three perspectives: time series, global, and local, to obtain rich and comprehensive feature information. The expert feature networks include long short-term memory neural networks, multilayer perceptrons, and convolutional neural networks.
[0009] The multi-step photovoltaic prediction task is transformed into multiple single-step photovoltaic prediction sub-tasks. The features extracted by each expert feature network are used as the input of the sub-tasks, and the feature information between the sub-tasks is integrated through a lightweight attention mechanism.
[0010] For the attention mechanism features of each subtask, an expert subnetwork is used to deepen the learning of the features to obtain the multi-step prediction results of photovoltaic power. The expert subnetwork adopts a multilayer perceptron.
[0011] Calculate the sub-task loss function, apply the improved dynamic weight averaging method to adaptively and dynamically adjust the loss weights of each sub-task, and train the model.
[0012] By using a trained model and inputting historical photovoltaic power sequences, multi-step predictions of photovoltaic power for the future period can be obtained.
[0013] Furthermore, the convolutional neural network processing in the expert feature network includes: using a TimeDistributed layer to map the data of each time point in the historical photovoltaic power sequence to a high-dimensional space in parallel, and then using a convolutional neural network to perform deep local feature extraction on the mapped feature map, thereby obtaining key local feature information. The definition of the convolutional neural network is as follows:
[0014] h (l) =f (l) (w (l) *h (l-1) +b (l) )
[0015] Where * represents the convolution operation, w (l) b represents the weights of the l-th convolutional layer. (l) f is the bias of the l-th convolutional layer. (l) h is the activation function of the l-th convolutional layer. (l) h (l-1) These are the outputs of the l-th and (l-1)-th convolutional layers, respectively.
[0016] Furthermore, the feature information is integrated among the sub-tasks through a lightweight attention mechanism, including:
[0017] The feature information extracted by the expert feature network is stacked, and a channel dimension is added to construct a two-dimensional feature map:
[0018] β j (y1,…,y T =Stack[f1(y1,…,y T ),…,f i (y1,…,y T )]
[0019] Among them, fi (·) represents the i-th expert feature network, (y1,…,y T ) represents the historical photovoltaic power sequence, and Stack[·] represents the stacking operation;
[0020] Dimensionality reduction of the two-dimensional feature map is achieved using 1D global average pooling, and the required expert feature network weights are obtained through fully connected layers and the Softmax function.
[0021] W j =Softmax(w*Gap(β) j (y1,…,y T ))+b)
[0022] Where Gap[·] is a 1D global average pooling operation, W j Let w be the feature weight matrix of the j-th expert subnetwork, and w and b be the weights and biases of the fully connected layer.
[0023] This leads to the input of the expert subnetwork for each single-step prediction task:
[0024] F j =Matual(W j ,β j (y1,…,y T ))
[0025] Where, Matual is the matrix multiplication operation, F j This represents the feature information of the j-th expert subnetwork.
[0026] Furthermore, during model training, all model parameter updates are based on the multi-task total loss. The multi-task total loss corresponding to the t-th model parameter update is represented by the losses of each subtask. λ is the loss for the k-th subtask. k Here is the loss weight corresponding to the k-th subtask. The loss for each subtask is the difference between the predicted value and the actual value, as shown below:
[0027]
[0028] The improved dynamic weight averaging method adaptively adjusts the corresponding loss weights based on the convergence speed and learning depth of each sub-task. The loss weight formula is as follows:
[0029]
[0030]
[0031] in, Let be the loss of the k-th subtask at different times; ρ1 and ρ2 are the convergence rate and learning depth, respectively; α1 and α2 are the relative weights of the convergence rate and learning depth, respectively; λ k T represents the loss weight corresponding to the k-th subtask, T is the temperature coefficient used to adjust the degree of difference in loss weights among different subtasks, and K is the coefficient factor to ensure that the sum of the weights is K, so that the weights are scaled under the same standard.
[0032] This invention also provides a photovoltaic power multi-step prediction system based on multi-view feature extraction and multi-task learning, comprising:
[0033] The data preprocessing module preprocesses the raw historical photovoltaic power data, including outlier handling, missing value imputation, and data normalization.
[0034] The feature extraction module, based on the preprocessed data, uses multiple expert feature networks to extract features from three perspectives: temporal, global, and local, to obtain rich and comprehensive feature information. The expert feature networks include long short-term memory neural networks, multilayer perceptrons, and convolutional neural networks.
[0035] The multi-step to single-step conversion module transforms the multi-step photovoltaic prediction task into multiple single-step photovoltaic prediction sub-tasks. The features extracted by each expert feature network are used as inputs to the sub-tasks, and the feature information between the sub-tasks is integrated through a lightweight attention mechanism.
[0036] The prediction result acquisition module uses an expert sub-network to deepen the learning of the attention mechanism features of each sub-task to obtain the multi-step prediction result of photovoltaic power. The expert sub-network adopts a multilayer perceptron.
[0037] The model training module calculates the loss function of each subtask, applies an improved dynamic weight averaging method to adaptively and dynamically adjust the loss weights of each subtask, and trains the model.
[0038] The model application module uses a trained model and inputs historical photovoltaic power sequences to obtain multi-step prediction results of photovoltaic power for the future period.
[0039] The present invention also provides a computer device, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the steps of the photovoltaic power multi-step prediction method based on multi-view feature extraction and multi-task learning as described above.
[0040] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the photovoltaic power multi-step prediction method based on multi-view feature extraction and multi-task learning as described above.
[0041] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:
[0042] (1) The feature extraction method based on multiple perspectives can extract the time-series features, global features and local features in the photovoltaic power sequence, thereby helping the prediction model to improve accuracy.
[0043] (2) The multi-step prediction method based on multi-task learning significantly improves the overall performance of multi-step prediction by utilizing the correlation between multi-step photovoltaic power.
[0044] (3) The multi-task learning method based on attention mechanism and expert network enables the expert sub-network corresponding to each sub-task to better select features by utilizing the interrelationship between expert feature networks, thereby improving the overall prediction accuracy of multi-step prediction. In addition, the lightweight structural design ensures that the prediction model has good operating efficiency.
[0045] (4) The improved dynamic weight averaging method can give fuller play to the advantages of multi-task learning, guide the model to learn more comprehensive information, and further improve the prediction accuracy. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of the photovoltaic power prediction method of the present invention;
[0047] Figure 2 This is a schematic diagram of the local feature extraction method used in this invention;
[0048] Figure 3 This is a schematic diagram of the multi-task learning method proposed in this invention;
[0049] Figure 4 This is a schematic diagram of the lightweight attention mechanism proposed in this invention;
[0050] Figure 5 This is a schematic diagram of the prediction result fitting using the proposed method in an embodiment of the present invention. Figure 1 ;
[0051] Figure 6 This is a schematic diagram of the prediction result fitting using the proposed method in an embodiment of the present invention. Figure 2 . Detailed Implementation
[0052] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0053] Reference Figure 1 This invention proposes a multi-step photovoltaic power prediction method based on multi-view feature extraction and multi-task learning, comprising the following steps:
[0054] Step 1: Data preprocessing, including outlier handling, missing value imputation, and data normalization;
[0055] Step 2: Use Long Short-Term Memory Neural Network, Multilayer Perceptron, and Convolutional Neural Network to extract features from temporal, global, and local perspectives respectively, to obtain rich and comprehensive feature information;
[0056] Step 3: Treat the multi-step photovoltaic prediction task as multiple single-step photovoltaic prediction sub-tasks, and integrate feature information through a lightweight attention mechanism for each sub-task;
[0057] Step 4: Each subtask uses an expert subnetwork to deepen the learning of features through a multilayer perceptron to obtain multi-step prediction results of photovoltaic power for a future time period (e.g., 4 hours).
[0058] Step 5: During model training, the improved dynamic weight averaging method is applied to adaptively and dynamically adjust the loss weights of each subtask.
[0059] Specifically, in this embodiment of the invention, data preprocessing is performed in step 1 using the following method.
[0060] Data points with historical power values less than 0 were removed; missing values were filled using linear interpolation; and the data was processed using max-min normalization.
[0061]
[0062] Where x is the original data, x * These are preprocessed values; to verify the practical engineering value of this invention, historical data with a time granularity of 20 minutes are selected through a filtering operation.
[0063] The main purpose of step 2 is to utilize Long Short-Term Memory (LSTM), Multilayer Perceptron (MLP), and Convolutional Neural Network (CNN) to extract features from temporal, global, and local perspectives, respectively, to obtain rich and comprehensive feature information. This will help the prediction model better understand and process photovoltaic power sequence data. The specific implementation steps are as follows:
[0064] LSTM is used to extract temporal features with long-term dependencies. The definition of Long Short-Term Memory (LSTM) neural network is as follows:
[0065] i t =σ(W xi x t +W hih t-1 +b i )
[0066] f t =σ(W xf x t +W hf h t-1 +b f )
[0067]
[0068] g t =σ(W xg x t +W hg h t-1 +b g )
[0069]
[0070] Where, x t h t c t Let i represent the input value, output value, and cell state of the LSTM at time t, respectively; t f t g t These are the input gate, forget gate, and output gate, used to control the flow of information; W xi W hi b i W xf W hf b f W xc W hc b c W xg W hg b g All represent learnable parameters, enabling the network to effectively process sequence data and possess the ability to remember long-term dependencies; σ(·) is the activation function. It represents the Hadamardi (or Hadama) stack.
[0071] like Figure 2 As shown, key local features are extracted by combining a TimeDistributed layer with a CNN. First, a TimeDistributed layer is used in parallel to map the data of each time point in the historical photovoltaic power sequence to a high-dimensional space, increasing the feature dimension of the original data and enriching the expression of feature information. Second, based on the powerful local feature extraction capability of CNN, deep local feature extraction is performed on the mapped feature map to obtain key local feature information. The definition of CNN is as follows:
[0072] h(l) =f (l) (w (l) *h (l-1) +b (l) )
[0073] Where * represents the convolution operation, w (l) b represents the weights of the l-th convolutional layer. (l) f is the bias of the l-th convolutional layer. (l) h is the activation function of the l-th convolutional layer. (l) h (l-1) These are the outputs of the l-th and (l-1)-th convolutional layers, respectively.
[0074] Furthermore, the perceptrons of a multilayer perceptron (MLP) can receive feature information from all perceptrons in the previous layer, ensuring the comprehensiveness of the feature information. The structure of multiple hidden layers allows the MLP to acquire multi-level global feature information while deepening the features layer by layer. Therefore, using historical photovoltaic power data as input to the MLP can further acquire multi-level global features.
[0075] Multi-step photovoltaic power prediction aims to achieve photovoltaic power output at multiple future moments, which is equivalent to a multi-output task. This problem can be solved using multi-task learning principles. Therefore, in step 3 of this invention, the multi-step photovoltaic prediction task is treated as multiple single-step photovoltaic prediction sub-tasks. Each sub-task integrates feature information through a lightweight attention mechanism, specifically including:
[0076] First, the multi-view feature extraction proposed in step 2 serves as the expert feature network in the proposed method, fully extracting features from historical data. Second, it utilizes, for example... Figure 4 The lightweight attention mechanism shown integrates feature information. Finally, to fully leverage the advantages of multi-view features, each prediction subtask has an expert subnetwork for further in-depth learning of the feature information. The implementation process is as follows:
[0077] Stack the three types of feature information from step 2, add channel dimensions, and construct a two-dimensional feature map:
[0078] β j (y1,…,y T =Stack[f1(y1,…,y T ),…,f i (y1,…,y T )]
[0079] Among them, f i (·) represents the expert feature network, where the input to each expert feature network is a historical photovoltaic power sequence (y1,…,y). T ) represents the historical photovoltaic power sequence, and Stack[·] represents the stacking operation;
[0080] One-dimensional global average pooling is used to reduce the dimensionality of the two-dimensional feature map, which can reduce the complexity of the feature fusion module while preserving important feature information. The required expert feature network weights are obtained through fully connected layers and the Softmax function.
[0081] W j =Softmax(w*Gap(β) j (y1,…,y T ))+b)
[0082] Where Gap[·] is a 1D global average pooling operation, W j Let w be the weight matrix of the j-th expert subnetwork, and w and b be the weights and biases of the fully connected layer.
[0083] Therefore, the input to each single-step prediction task expert subnetwork can be obtained:
[0084] F j =Matual(W j ,β j (y1,…,y T ))
[0085] Where, Matual is the matrix multiplication operation, F j The j-th expert subnetwork contains feature information. The proposed attention fusion module does not follow the correlation calculation process of traditional attention mechanisms, thus it has fewer parameters and lower computational complexity, achieving a lightweight effect.
[0086] In step 4 of this invention, an expert sub-network is used to further deepen the learning of the feature information, resulting in a multi-step prediction of photovoltaic power for the next 4 hours, such as... Figure 3 As shown. The expert sub-network refers to the feature deepening learning network corresponding to each output. This invention uses an MLP network to perform targeted deepening learning on the feature information output by the expert feature network, improving the performance of each prediction task. The outputs of multiple sub-tasks represent predictions for multiple future time points.
[0087] In step 5 of this invention, an improved dynamic weight averaging method is used to adaptively and dynamically adjust the loss weights of each sub-task, so as to fully realize the advantages of multi-task learning and improve the overall performance of photovoltaic power multi-step prediction. During model training, the model parameters are updated based on the total multi-task loss. The total multi-task loss corresponding to the t-th model parameter update can be represented by the loss of each sub-task. λ is the loss for the k-th subtask. k Here is the loss weight corresponding to the k-th subtask. The loss for each subtask is the difference between the predicted value and the actual value, as shown below:
[0088]
[0089] Therefore, the specific process of improving the dynamic weighted averaging method can be expressed as follows:
[0090]
[0091]
[0092] Where ρ1 and ρ2 represent the convergence speed and learning depth, respectively, and α1 and α2 represent the relative weights of the convergence speed and learning depth. T is a temperature coefficient used to adjust the degree of difference in loss weights for different subtasks; K is a coefficient factor to ensure that the sum of the weights is K, i.e., the weights are scaled under the same standard. The improved dynamic weight averaging method can effectively help the model avoid getting trapped in local optima, bringing the possibility of further improvement in overall performance.
[0093] Finally, by inputting the historical photovoltaic power sequence into the trained model, the multi-step prediction results of photovoltaic power can be obtained.
[0094] To verify the performance of the method proposed in this invention, the following experiments were conducted in this embodiment. The dataset used was collected and compiled by the Environmental Assessment and Optimization Group at Stanford University. This dataset contains historical photovoltaic power data for three years (2017-2019). After data preprocessing, 27,682 samples were available for training and testing. Multi-step prediction of photovoltaic power in the region was performed based on the above method. The model performance was evaluated using quantitative error metrics. Two error analysis metrics were used in this embodiment: Mean Error Percentage (MAE) and Root Mean Square Error (RMSE), defined as follows:
[0095]
[0096]
[0097] Where N represents the total number of test samples, y i and Let represent the predicted value and the actual value of the i-th sample, respectively.
[0098] First, this invention compares the model prediction results under different feature extraction methods. Figure 5 and Figure 6The paper presents photovoltaic (PV) power prediction curves obtained 4 hours in advance based on different feature extraction methods, demonstrating that the proposed method (LSTM+MLP+CNN) achieves more accurate multi-step PV power prediction. Secondly, to further evaluate the prediction performance of the model, this invention is compared with traditional multi-step prediction methods, namely, multi-output methods, direct methods, recursive methods, and Seq2seq methods. Tables 1 and 2 show the prediction errors of each method for multi-step PV power prediction, where S1, S2, S3, S4, and S5 represent the multi-output method, direct method, recursive method, Seq2seq method, and the multi-task learning method proposed in this invention, respectively. The results show that the multi-task learning method based on this invention has superior overall performance compared to the other four traditional multi-step prediction methods, exhibiting a significant performance advantage and more accurate prediction results.
[0099] Table 1 Comparison of RMSE of different multi-step prediction methods
[0100]
[0101]
[0102] Table 2 Comparison of MAE for Different Multi-Step Prediction Strategies
[0103]
[0104] In summary, firstly, long short-term memory neural networks, multilayer perceptrons, and convolutional neural networks are used to extract features from temporal, global, and local perspectives, respectively, yielding rich and comprehensive feature information. Then, the multi-step photovoltaic (PV) prediction task is transformed into multiple single-step PV prediction sub-tasks. A multi-task learning strategy is used to achieve multi-step PV power prediction, fully utilizing the correlation between multi-step PV power to improve the overall prediction performance. Specifically, a multi-task learning model based on an attention mechanism and expert networks is proposed. The lightweight attention mechanism, which integrates multiple information sources, effectively improves the ability of each sub-task to utilize multi-perspective feature information. Simultaneously, the proposed improved dynamic weight averaging method is applied to adaptively and dynamically adjust the loss weights, further improving prediction accuracy. Experimental results demonstrate that this invention can improve the accuracy of multi-step PV power prediction, providing support for the safe and stable operation of the power grid and possessing certain engineering practical value.
[0105] Based on the same technical concept as the method embodiments, the present invention also provides a photovoltaic power multi-step prediction system based on multi-view feature extraction and multi-task learning, including:
[0106] The data preprocessing module preprocesses the raw historical photovoltaic power data, including outlier handling, missing value imputation, and data normalization.
[0107] The feature extraction module, based on the preprocessed data, uses multiple expert feature networks to extract features from three perspectives: temporal, global, and local, to obtain rich and comprehensive feature information. The expert feature networks include long short-term memory neural networks, multilayer perceptrons, and convolutional neural networks.
[0108] The multi-step to single-step conversion module transforms the multi-step photovoltaic prediction task into multiple single-step photovoltaic prediction sub-tasks. The features extracted by each expert feature network are used as inputs to the sub-tasks, and the feature information between the sub-tasks is integrated through a lightweight attention mechanism.
[0109] The prediction result acquisition module uses an expert sub-network to deepen the learning of the attention mechanism features of each sub-task to obtain the multi-step prediction result of photovoltaic power. The expert sub-network adopts a multilayer perceptron.
[0110] The model training module calculates the loss function of each subtask, applies an improved dynamic weight averaging method to adaptively and dynamically adjust the loss weights of each subtask, and trains the model.
[0111] The model application module uses a trained model and inputs historical photovoltaic power sequences to obtain multi-step prediction results of photovoltaic power for the future period.
[0112] It should be understood that the photovoltaic power multi-step prediction system based on multi-view feature extraction and multi-task learning in the embodiments of the present invention can realize all the technical solutions in the above method embodiments. The functions of each functional module can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can be referred to the relevant descriptions in the above embodiments, which will not be repeated here.
[0113] The present invention also provides a computer device, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the steps of the photovoltaic power multi-step prediction method based on multi-view feature extraction and multi-task learning as described above.
[0114] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the photovoltaic power multi-step prediction method based on multi-view feature extraction and multi-task learning as described above.
[0115] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus (systems), computer devices, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0116] This invention is described with reference to a flowchart of a method according to embodiments of the invention. It should be understood that each step in the flowchart and combinations thereof can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1 A device for a function specified in one or more processes.
[0117] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 The function specified in one or more processes.
[0118] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 Steps of a specified function in one or more processes.
Claims
1. A multi-step photovoltaic power prediction method based on multi-view feature extraction and multi-task learning, characterized in that, Includes the following steps: The raw historical photovoltaic power data is preprocessed, including outlier handling, missing value imputation, and data normalization. Based on the preprocessed data, multiple expert feature networks are used to extract features from three perspectives: time series, global, and local, to obtain rich and comprehensive feature information. The expert feature networks include long short-term memory neural networks, multilayer perceptrons, and convolutional neural networks. The multi-step photovoltaic prediction task is transformed into multiple single-step photovoltaic prediction subtasks. Features extracted by each expert feature network are used as input to the subtasks. A lightweight attention mechanism is used to integrate feature information between the subtasks, including stacking the feature information extracted by the expert feature network, adding channel dimensions, and constructing a two-dimensional feature map. ,in, For the i-th expert feature network, (y1,…,y) T (This refers to) the historical photovoltaic power sequence. For stacking operations; dimensionality reduction of the two-dimensional feature map is achieved using 1D global average pooling, and the required expert feature network weights are obtained through fully connected layers and the Softmax function: ,in, This is a 1D global average pooling operation. Let w be the feature weight matrix of the j-th expert subnetwork, and b be the weights and biases of the fully connected layer; thus, the input of each single-step prediction task expert subnetwork is obtained: ,in, This is a matrix multiplication operation. This refers to the feature information of the j-th expert subnetwork. For the attention mechanism features of each subtask, an expert subnetwork is used to deepen the learning of the features to obtain the multi-step prediction results of photovoltaic power. The expert subnetwork adopts a multilayer perceptron. Calculate the sub-task loss function, apply the improved dynamic weight averaging method to adaptively and dynamically adjust the loss weights of each sub-task, and train the model. By using a trained model and inputting historical photovoltaic power sequences, multi-step predictions of photovoltaic power for the future period can be obtained.
2. The method according to claim 1, characterized in that, Data preprocessing includes: Data points with historical power values less than 0 were removed; missing values were filled using linear interpolation; and the data was processed using max-min normalization. in, The original data, These are preprocessed values.
3. The method according to claim 1, characterized in that, The convolutional neural network processing in the expert feature network includes: using a TimeDistributed layer to map the data of each time point in the historical photovoltaic power sequence to a high-dimensional space in parallel; then using a convolutional neural network to perform deep local feature extraction on the mapped feature map, thereby obtaining key local feature information. The definition of the convolutional neural network is as follows: in, This represents the convolution operation. For the first The weights of each convolutional layer For the first The bias of the convolutional layers, For the first Activation functions of convolutional layers, , The first Layer and first The output of the convolutional layer.
4. The method according to claim 1, characterized in that, During model training, all model parameter updates are based on the total loss across multiple tasks. The total multi-task loss after each model parameter update is represented by the loss of each sub-task. For the first The loss of each sub-task For the first The loss weights corresponding to each sub-task are as follows: The loss for each sub-task is the difference between the predicted value and the actual value. 。 5. The method according to claim 4, characterized in that, The improved dynamic weight averaging method adaptively adjusts the corresponding loss weights based on the convergence speed and learning depth of each subtask.
6. The method according to claim 5, characterized in that, The formula for loss weighting is as follows: in, For different times Loss of individual tasks; , These represent convergence speed and learning depth, respectively. , These are the relative weights of convergence speed and learning depth, respectively. For the first The loss weights corresponding to each sub-task This is a temperature coefficient used to adjust the degree of difference in loss weights between different subtasks; The coefficients are factors, ensuring that the sum of the weights is... This allows the weights to be scaled under the same standard.
7. A photovoltaic power multi-step prediction system based on multi-view feature extraction and multi-task learning, characterized in that, include: The data preprocessing module preprocesses the raw historical photovoltaic power data, including outlier handling, missing value imputation, and data normalization. The feature extraction module, based on the preprocessed data, uses multiple expert feature networks to extract features from three perspectives: temporal, global, and local, to obtain rich and comprehensive feature information. The expert feature networks include long short-term memory neural networks, multilayer perceptrons, and convolutional neural networks. The multi-step to single-step conversion module transforms the multi-step photovoltaic prediction task into multiple single-step photovoltaic prediction sub-tasks. Features extracted by each expert feature network are used as input to the sub-tasks. The sub-tasks integrate feature information through a lightweight attention mechanism, including: stacking the feature information extracted by the expert feature network, adding channel dimensions, and constructing a two-dimensional feature map. ,in, For the i-th expert feature network, (y1,…,y) T (This refers to) the historical photovoltaic power sequence. For stacking operations; dimensionality reduction of the two-dimensional feature map is achieved using 1D global average pooling, and the required expert feature network weights are obtained through fully connected layers and the Softmax function: ,in, This is a 1D global average pooling operation. Let w be the feature weight matrix of the j-th expert subnetwork, and b be the weights and biases of the fully connected layer; thus, the input of each single-step prediction task expert subnetwork is obtained: ,in, This is a matrix multiplication operation. This refers to the feature information of the j-th expert subnetwork. The prediction result acquisition module uses an expert sub-network to deepen the learning of the attention mechanism features of each sub-task to obtain the multi-step prediction result of photovoltaic power. The expert sub-network adopts a multilayer perceptron. The model training module calculates the loss function of each subtask, applies an improved dynamic weight averaging method to adaptively and dynamically adjust the loss weights of each subtask, and trains the model. The model application module uses a trained model and inputs historical photovoltaic power sequences to obtain multi-step prediction results of photovoltaic power for the future period.
8. A computer device, characterized in that, include: One or more processors; Memory; as well as One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the steps of the photovoltaic power multi-step prediction method based on multi-view feature extraction and multi-task learning as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the photovoltaic power multi-step prediction method based on multi-view feature extraction and multi-task learning as described in any one of claims 1-6.