A photovoltaic power generation power prediction method and system

CN122908111APending Publication Date: 2026-10-13CHENGDU UNIV OF INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411417579.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0005]针对现有技术中的上述不足,本发明提供的一种光伏发电功率预测方法及系统,解决了现有模型难以有效捕捉光伏发电功率的高维非线性关系,导致拟合精度不足的问题;传统神经网络模型参数多,训练时间长,容易出现梯度消失或爆炸问题以及单一模型难以满足工程实践中对光伏功率预测的高精度要求的问题

Benefits of technology

[0020]上述进一步方案的有益效果是:本发明中深度残差层DRSN通过整合软阈值机制和注意力机制,实现了对特征的动态选择和增强。这种设计有效地减少了预测模型处理冗余信息的负担,同时加强了对重要特征的关注,从而提高了整体预测精度和预测模型的鲁棒性。通过这种方法,深度残差层DRSN不仅优化了特征提取过程,还增强了预测模型对复杂时间序列数据的适应性和解释能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122908111A_ABST
    Figure CN122908111A_ABST
Patent Text Reader

Abstract

The application provides a photovoltaic power prediction method and system, and belongs to the technical field of photovoltaic power prediction. The method comprises the following steps: obtaining a training data set, and preprocessing the training data; constructing a prediction model, wherein the prediction model comprises an improved bidirectional time convolution network BiTCN, a bidirectional gate recurrent unit BiGRU, a multi-head attention mechanism MutliHeadAttention, and an AR prediction submodel; training the prediction model by using the preprocessed training data set, and obtaining a prediction value of photovoltaic power by using the trained prediction model. The application can better meet the photovoltaic power prediction demand in engineering practice.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of photovoltaic power generation prediction technology, and particularly relates to a photovoltaic power generation prediction method and system. Background Technology

[0002] With the continuous growth of global energy demand, energy depletion and global warming pose significant challenges to humanity. Distributed energy sources such as wind and solar power are developing rapidly worldwide and playing a vital role in power systems. Solar power, in particular, as a renewable energy source, is completely free, accessible, and scalable. However, complex weather factors lead to the randomness and intermittency of solar power generation, which affects the stable operation and management of the power grid and fundamentally threatens its security. Therefore, improving the accuracy of photovoltaic power generation forecasting is of great and far-reaching significance for power grid dispatching, safety, and economic operation in order to reduce the impact of the randomness and intermittency of solar power generation.

[0003] The common TCN (Temporal Convolutional Network) model mainly consists of three core modules: causal convolution, dilated convolution, and residual connections. It combines the advantages of CNNs and RNNs, effectively avoiding the gradient minimization or gradient explosion problems often encountered in recurrent neural networks. It also boasts advantages such as parallel computation, low memory usage, improved network performance, and the ability to capture both long-term and short-term temporal features in the input sequence. Despite TCN's excellent performance, traditional TCN networks only extract forward information and ignore backward information. Therefore, TCN networks are modified to be bidirectional, resulting in the Bidirectional Temporal Convolutional Network (BiTCN). This maintains the feature mapping dimensionality while achieving a larger receptive field with fewer layers. Furthermore, by incorporating the Bidirectional Gated Recurrent Unit (BiGRU), the traditional GRU neuron is divided into forward and backward propagation states, corresponding to updating the hidden state based on historical data and updating the state based on future data, respectively.

[0004] However, existing models struggle to effectively capture the high-dimensional nonlinear relationship of photovoltaic power generation, resulting in insufficient fitting accuracy. Traditional neural network models have many parameters, require long training times, and are prone to gradient vanishing or exploding problems. Furthermore, single models are insufficient to meet the high-precision requirements for photovoltaic power prediction in engineering practice. Summary of the Invention

[0005] To address the aforementioned shortcomings in existing technologies, this invention provides a photovoltaic power generation prediction method and system that solves the problem that existing models are unable to effectively capture the high-dimensional nonlinear relationship of photovoltaic power generation, resulting in insufficient fitting accuracy; traditional neural network models have many parameters, long training time, and are prone to gradient vanishing or exploding problems; and single models are unable to meet the high-precision requirements for photovoltaic power prediction in engineering practice.

[0006] To achieve the above objectives, the technical solution adopted by this invention is: a photovoltaic power generation prediction method, comprising the following steps: S1. Obtain the training dataset and preprocess the training data; S2. Construct a prediction model, which includes an improved bidirectional temporal convolutional network BiTCN, a bidirectional gated recurrent unit BiGRU, a multi-head attention mechanism MutliHeadAttention, and an AR prediction sub-model. S3. Train the prediction model using the preprocessed training dataset, and use the trained prediction model to obtain the predicted value of photovoltaic power generation.

[0007] The beneficial effects of this invention are as follows: This invention aims to solve the technical problems faced by existing photovoltaic power generation prediction models, specifically including: existing models are unable to effectively capture the high-dimensional nonlinear relationship of photovoltaic power generation, resulting in insufficient fitting accuracy; traditional neural network models have many parameters, long training time, and are prone to gradient vanishing or exploding problems; single models are difficult to meet the high accuracy requirements of photovoltaic power prediction in engineering practice. To solve these problems, this invention proposes a photovoltaic power generation prediction method based on a hybrid prediction model combining BiTCN-BiGRU, the multi-head attention mechanism MutliHeadAttention, and an AR sub-model. This invention has the following advantages: 1) By using the improved bidirectional temporal convolutional network BiTCN, a larger receptive field is achieved with fewer layers while maintaining the feature mapping dimension, improving the adaptability and interpretability of the prediction model to complex time series data; 2) The introduction of the multi-head attention mechanism MutliHeadAttention enhances the prediction model's ability to focus on key information in the sequence data, improving prediction accuracy; 3) Combining the linear structure AR sub-model optimizes the model's linear extraction capability, thereby improving the accuracy of the prediction results. The prediction model developed in this invention can effectively improve the accuracy of photovoltaic power generation prediction, so as to better meet the prediction needs in engineering practice.

[0008] Further, step S1 includes the following steps: S101. Obtain the training dataset, which includes meteorological data from ground observations, photovoltaic power generation data, and corresponding time label values; S102. Based on meteorological data and photovoltaic power generation data, interpolate and fill in missing values ​​to complete the preprocessing of training data.

[0009] The beneficial effects of the above-mentioned further solutions are as follows: In the data preprocessing stage, the present invention significantly improves the quality of training data by comprehensively acquiring ground observation data and reasonably filling in missing values. This provides a solid data foundation for subsequent steps (constructing and training prediction models), enabling the prediction models of the improved bidirectional temporal convolutional network BiTCN, bidirectional gated recurrent unit BiGRU, multi-head attention mechanism MutliHeadAttention, and AR sub-model to predict photovoltaic power generation more efficiently and accurately. It brings significant technical effects in the following aspects: (1) By filling in missing values ​​through interpolation, the continuity of data is ensured, and the negative impact of missing data on the training of prediction models is eliminated. At the same time, the overall quality of data is improved, providing a reliable data foundation for the training and prediction of prediction models; (2) High-quality data input enables prediction models to better learn and capture the complex relationship between photovoltaic power generation and meteorological data, improving the prediction accuracy of prediction models.

[0010] Furthermore, step S2 includes the following steps: S201. Construct an improved bidirectional temporal convolutional network, BiTCN; S202. The improved bidirectional temporal convolutional network BiTCN, the multi-head attention mechanism MutliHeadAttention, and the bidirectional gated recurrent unit BiGRU are combined to construct the BiTCN-MutliHeadAttention-BiGRU sub-model. S203. Perform linear weighted fusion processing on the prediction results of the AR sub-model and the BiTCN-MutliHeadAttention-BiGRU sub-model to obtain the predicted value of photovoltaic power generation, thus completing the construction of the prediction model.

[0011] The beneficial effects of the above-mentioned further solutions are as follows: The prediction model constructed by this invention has the following advantages: 1) By using the improved bidirectional temporal convolutional network BiTCN, a larger receptive field is achieved with fewer layers while maintaining the dimension of the feature mapping, thereby improving the adaptability and interpretability of the prediction model to complex time series data; 2) The introduction of the multi-head attention mechanism MutliHeadAttention enhances the prediction model's ability to focus on key information in the sequence data, thereby improving the prediction accuracy; 3) By combining the linear structure AR sub-model, the linear extraction capability of the prediction model is optimized, thereby improving the accuracy of the prediction results.

[0012] Furthermore, the improved bidirectional temporal convolutional network BiTCN is used to extract the time-series features of photovoltaic power generation. The BiGRU (Bidirectional Gateless Loop Unit) is used to divide the original GRU neural unit into a forward propagation state and a backward propagation state. The forward propagation state updates the hidden state based on historical data in the training data; the backward propagation state updates the hidden state based on future data in the training data. The multi-head attention mechanism MutliHeadAttention is used to enhance the capture of dependencies in time series data; The AR prediction submodule is used for prediction. The predicted value of photovoltaic power generation at any given time.

[0013] The beneficial effects of the above-mentioned further solutions are as follows: The improved Bidirectional Temporal Convolutional Network (BiTCN) achieves the following technical advantages: 1) By maintaining the feature mapping dimensionality, the improved BiTCN can achieve a larger receptive field with fewer layers, meaning the prediction model can capture a wider range of time-series features. 2) The improved BiTCN can more effectively handle complex time-series data, improving its sensitivity and adaptability to fluctuations in photovoltaic power generation. 3) Due to the use of fewer layers, the improved BiTCN reduces computational resource consumption and training time, improving overall computational efficiency.

[0014] Furthermore, the improved bidirectional temporal convolutional network BiTCN includes: A bidirectional temporal convolutional layer is used to extract the time-series features of photovoltaic power generation. The Deep Residual Layer (DRSN) integrates a soft thresholding mechanism and an attention mechanism for dynamic selection and enhancement of time series features.

[0015] The beneficial effects of the above-mentioned further solutions are: the present invention modifies the traditional TCN network into a bidirectional one, which achieves a larger receptive field with fewer layers while maintaining the feature mapping dimension. At the same time, the improved residual blocks enable the model to focus more on the extraction of important features, thereby improving the model's ability to capture key features and reducing the interference of redundant features.

[0016] Furthermore, the output of the soft thresholding mechanism and its derivative are expressed as follows:

[0017]

[0018]

[0019] in, This represents the output of the soft thresholding mechanism. x Indicates the input value. This represents the threshold required for the soft thresholding process. This represents the weights obtained after scaling. Indicates global meanization. This represents the time-series features input to the feature layer.

[0020] The beneficial effects of the above-mentioned further scheme are as follows: In this invention, the Deep Residual Layer (DRSN) integrates a soft thresholding mechanism and an attention mechanism to achieve dynamic selection and enhancement of features. This design effectively reduces the burden on the prediction model to process redundant information, while strengthening the focus on important features, thereby improving the overall prediction accuracy and robustness of the prediction model. Through this method, the Deep Residual Layer (DRSN) not only optimizes the feature extraction process but also enhances the adaptability and interpretability of the prediction model to complex time series data.

[0021] Furthermore, the AR sub-model expression is as follows:

[0022] in, Indicates a constant coefficient. Indicates time step The observed values, and Both represent time steps. Indicates random error. This indicates the correlation between the current observation and the observed values.

[0023] Furthermore, step S3 includes the following steps: S301. Acquire photovoltaic power generation data and meteorological data, and divide them into training set, test set and validation set; S302. Train and test the prediction model using the training set and the test set; S303. Validate the tested prediction model using the validation set; S304. Obtain ground-based meteorological observation data and weather forecast data, and use the validated prediction model to obtain the predicted value of photovoltaic power generation.

[0024] Furthermore, the expression for the predicted value of the photovoltaic power generation is as follows:

[0025] in, This indicates a forecast of photovoltaic power generation. and All represent weighting coefficients. This indicates that the AR sub-model is at the current time step. t The predicted value, This indicates that the BiTCN-MutliHeadAttention-BiGRU sub-model is at the current time step. t The predicted value.

[0026] The beneficial effects of the above-mentioned further scheme are: 1) By fusing the linear AR sub-model with the nonlinear BiTCN-MultiHeadAttention-BiGRU sub-model, the advantages of both can be combined to achieve more accurate photovoltaic power generation prediction. The AR sub-model is good at capturing linear relationships in the data and provides stable basic predictions; while the BiTCN-MultiHeadAttention-BiGRU sub-model is good at capturing complex nonlinear features and long- and short-term dependencies, further improving prediction accuracy. 2) By introducing weight coefficients... and This allows for flexible adjustment of the contribution ratios of the two sub-models in different forecasting scenarios. In this way, the forecasting model can dynamically optimize the forecast results based on actual data, ensuring high forecast accuracy and stability under various meteorological conditions and power generation environments.

[0027] This invention provides a photovoltaic power generation prediction system, characterized in that it includes: The first processing module is used to acquire the training dataset and preprocess the training data; The second processing module is used to construct a prediction model, which includes an improved bidirectional temporal convolutional network BiTCN, a bidirectional gated recurrent unit BiGRU, a multi-head attention mechanism MutliHeadAttention, and an AR prediction sub-model. The third processing module is used to train the prediction model using the preprocessed training dataset, and to obtain the predicted value of photovoltaic power generation using the trained prediction model.

[0028] The beneficial effects of this invention are as follows: This invention proposes a photovoltaic power generation prediction method based on a prediction model combining BiTCN-BiGRU, the multi-head attention mechanism MutliHeadAttention, and an AR prediction sub-model. This invention has the following advantages: 1) By using the improved bidirectional temporal convolutional network BiTCN, a larger receptive field is achieved with fewer layers while maintaining the feature mapping dimension, improving the adaptability and interpretability of the prediction model to complex time series data; 2) The introduction of the multi-head attention mechanism MutliHeadAttention enhances the prediction model's ability to focus on key information in the sequence data, improving prediction accuracy; 3) Combining the linear structure of the AR sub-model optimizes the linear extraction capability of the prediction model, thereby improving the accuracy of the prediction results. The prediction model constructed based on this invention can effectively improve the prediction accuracy of photovoltaic power generation, better meeting the prediction needs in engineering practice. Attached Figure Description

[0029] Figure 1 This is a flowchart of the method of the present invention.

[0030] Figure 2 This is a schematic diagram of the system structure of the present invention. Detailed Implementation

[0031] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0032] Example 1 like Figure 1 As shown, this invention provides an improved photovoltaic power generation prediction method, the implementation of which is as follows: S1. Obtain the training dataset and preprocess the training data. The implementation method is as follows: S101. Obtain the training dataset, which includes meteorological data from ground observations, photovoltaic power generation data, and corresponding time label values; S102. Based on meteorological data and photovoltaic power generation data, interpolate and fill in missing values ​​to complete the preprocessing of training data.

[0033] In this embodiment, training datasets such as power generation data and corresponding weather data from photovoltaic power plants are collected and prepared, including ground-observed weather data, photovoltaic power generation capacity, and corresponding time label values.

[0034] In this embodiment, the collected meteorological data and power generation data are used to fill in the missing measurements using an interpolation method.

[0035] S2. Construct a prediction model, which includes an improved bidirectional temporal convolutional network BiTCN, a bidirectional gated recurrent unit BiGRU, a multi-head attention mechanism MutliHeadAttention, and an AR prediction sub-model. The implementation method is as follows: S201. Construct an improved bidirectional temporal convolutional network, BiTCN; S202. The improved bidirectional temporal convolutional network BiTCN, the multi-head attention mechanism MutliHeadAttention, and the bidirectional gated recurrent unit BiGRU are combined to construct the BiTCN-MutliHeadAttention-BiGRU sub-model. S203. Perform linear weighted fusion processing on the prediction results of the AR sub-model and the BiTCN-MutliHeadAttention-BiGRU sub-model to obtain the predicted value of photovoltaic power generation, thus completing the construction of the prediction model.

[0036] The improved bidirectional temporal convolutional network BiTCN is used to extract the time-series features of photovoltaic power generation. The BiGRU (Bidirectional Gateless Loop Unit) is used to divide the original GRU neural unit into a forward propagation state and a backward propagation state. The forward propagation state updates the hidden state based on historical data in the training data; the backward propagation state updates the hidden state based on future data in the training data. The multi-head attention mechanism MutliHeadAttention is used to enhance the capture of dependencies in time series data; The AR prediction submodule is used for prediction. The predicted value of photovoltaic power generation at any given time.

[0037] In this embodiment, the technical effects of combining the improved bidirectional temporal convolutional network BiTCN with the bidirectional gated recurrent unit BiGRU to construct the BiTCN-MutliHeadAttention-BiGRU sub-model are as follows: 1) By combining the improved bidirectional temporal convolutional network BiTCN with the bidirectional gated recurrent unit BiGRU, the hidden state can be updated simultaneously using both forward and backward propagation states, thereby capturing historical and future information in time-series data (historical and future information in training data) more comprehensively. This bidirectional feature processing method enhances the prediction model's ability to capture complex dependencies in time-series data, ensuring that the prediction model can more accurately predict photovoltaic power generation. 2) The multi-head attention mechanism MutliHeadAttention enhances the prediction model's ability to focus on key information in sequence data, and can capture the dependencies of time-series data in parallel in different subspaces. This mechanism makes the prediction model more robust when processing long sequence data, effectively capturing key patterns and features in changes in photovoltaic power generation, and improving prediction accuracy. The prediction results of the AR sub-model and the BiTCN-MultiHeadAttention-BiGRU sub-model are linearly weighted and fused to obtain the predicted value of photovoltaic power generation. This achieves the following technical effect in constructing the prediction model: by combining the advantages of both sub-models, the prediction results can be further optimized. The AR sub-model can capture the linear relationships in the data, providing a stable basic prediction; while the BiTCN-MultiHeadAttention-BiGRU sub-model can capture complex nonlinear features. The combination of the two makes the final prediction result more accurate. This fusion strategy enhances the flexibility and adaptability of the prediction model, enabling it to better cope with various uncertainties and complexities in photovoltaic power generation prediction.

[0038] The improved bidirectional temporal convolutional network BiTCN includes: A bidirectional temporal convolutional layer is used to extract the time-series features of photovoltaic power generation. The Deep Residual Layer (DRSN) integrates a soft thresholding mechanism and an attention mechanism for dynamic selection and enhancement of time series features.

[0039] In this embodiment, the present invention constructs a prediction model based on an improved BiTCN-BiGRU combined with a multi-head attention mechanism (MutliHeadAttention) and an AR sub-model, and uses this prediction model to predict photovoltaic power generation. First, an improved bidirectional temporal convolutional network (BiTCN) is constructed to extract the time-series features of photovoltaic power generation. In the BiTCN, a deep residual network (DRSN) is used to replace the original residual network to improve the model's ability to capture key features and reduce interference from redundant features. Furthermore, a multi-head attention mechanism is introduced, enabling the prediction model to focus on different aspects of information in the sequence in parallel, improving the efficiency of the prediction model in extracting important features from the sequence. Simultaneously, the BiGRU network is combined with the BiTCN to enhance the prediction model's ability to capture long-term dependencies in the photovoltaic power generation sequence. Finally, the prediction results of the AR model and the BiTCN-BiGRU model are linearly weighted and fused to optimize the linear extraction capability of the prediction model and improve the accuracy of the prediction results.

[0040] In this embodiment, a bidirectional temporal convolutional network (BiTCN), a bidirectional gated recurrent unit (BiGRU), an AR sub-model, and a multi-head attention mechanism (MutliHeadAttention) are constructed using deep learning frameworks (such as TensorFlow and PyTorch). This prediction model typically consists of the following parts: (1) Bidirectional temporal convolutional network BiTCN: used to extract time series features of photovoltaic power generation.

[0041] The TCN network mainly consists of three core modules: causal convolution, dilated convolution, and residual connections. It combines the advantages of CNNs and RNNs, effectively avoiding the gradient minimization or gradient explosion problems often encountered in recurrent neural networks. It also boasts advantages such as parallel computation, low memory usage, improved network performance, and the ability to capture both long-term and short-term temporal features in the input sequence. The TCN network emphasizes the temporal causality in time series prediction, and for the previous layer... The value at any given time depends only on the next layer. The value at and before that time. That is, given the output... and the corresponding predicted output sequence Regulations for When making predictions, only the following methods can be used: The sequence prior to time t is expressed as:

[0042] in, Indicates time step t Predicted value at time, This represents the forward propagation process in a neural network. Represents parameters in the network. T Indicates the length of the time series. Indicates time step t Input value at time, Indicates at time step t The predicted value at each time step. The Bidirectional Temporal Convolutional Network (BiTCN) ensures that future data is not leaked into the past. Unlike traditional convolutions, TCN convolutional layers sample at intervals during convolution, skipping a specified stride, thus achieving a larger receptive field and longer temporal dependencies with the same output size. However, since traditional TCN networks only extract forward information and ignore backward information, the traditional TCN network is modified to be bidirectional. This achieves a larger receptive field with fewer layers while maintaining the feature map dimension.

[0043] For a one-dimensional input sequence and a convolution kernel Elements in the sequence The dilated convolution is defined as:

[0044] in, Indicates time step s The convolution output at that point, Indicates the convolution kernel at the th... i The weight of each position, This represents the index in the convolution kernel. express n 3D real space, Indicates the kernel size. Represents the set of real numbers. Indicates the past direction. The dilation factor determines how many zero vectors are inserted between two adjacent convolutional kernels. After each convolutional layer of the input sequence, the dilation factor... The number of network layers increases exponentially. However, as the number of layers increases to a certain extent, gradient decay or even vanishing occurs, and irreversible information loss occurs due to the addition of the non-linear activation function ReLU. Therefore, introducing residual blocks into the Bidirectional Temporal Convolutional Network (BiTCN) can avoid these problems and achieve efficient feature extraction from sequences. Improved residual blocks: Improved residual blocks allow the model to focus more on extracting important features.

[0045] In this embodiment, to reduce the interference of minor redundant features in the sample data on the feature extraction process of the Bidirectional Temporal Convolutional Network (BiTCN), a Deep Residual Layer (DRSN) is used to improve the residual module of the BiTCN. This combines an attention mechanism with a soft thresholding mechanism. After calculating the weights of each input feature, the BiTCN focuses more on important features that significantly impact photovoltaic power, while weakening minor features with weak influence. The Deep Residual Layer (DRSN) is an improved algorithm for residual networks that combines attention and soft thresholding mechanisms to achieve autonomous filtering learning. Compared to traditional wavelet thresholding, it is more efficient and accurate, avoiding the tediousness and blindness of manually setting thresholds, thus reducing the impact of minor redundant features on the network. The original structure of the BiTCN, a standard residual network, consists of two convolutional layers, two batch normalization (BN) layers, two activation functions, and a cross-layer identity connection. Its key feature is the avoidance of convolutional degradation through the use of residual connections. The Deep Residual Layer DRSN structure adds a soft thresholding mechanism and an attention mechanism to the original residual network.

[0046] Soft thresholding is a signal denoising method. Its principle is to set a threshold, setting feature signals whose absolute values ​​are less than the threshold and close to zero to zero, while also shrinking other feature signals relatively towards zero. The output and derivative of soft thresholding are:

[0047]

[0048] In the attention mechanism, the absolute values ​​in the feature layer are first globally averaged (GAP) to reduce the number of weights used in the fully connected (FC) output layer, thereby reducing the possibility of overfitting in deep neural networks. Then, the one-dimensional vector obtained by the globally averaged GAP is input into the FC fully connected layer and scaled to within (0,1) by the sigmoid function. This represents the weights obtained after scaling. The threshold is obtained by multiplying the value of the GAP output by its absolute value, ensuring that the resulting threshold is an integer. This process can be represented as:

[0049] in, This represents the output of the soft thresholding mechanism. x Indicates the input value. This represents the threshold required for the soft thresholding process. This represents the weights obtained after scaling. Indicates global meanization. The input time-series features represent the input to the feature layer. The output after soft thresholding is the extracted time-series feature, which has been de-noising and enhanced to make the prediction model more effective and accurate in capturing patterns and dependencies in time series. These features are then used in subsequent processing and prediction tasks of the prediction model.

[0050] Therefore, a Deep Residual Layer DRSN was adopted to replace the residual network in the BiTCN baseline network to improve the prediction model's ability to capture key features and reduce interference from redundant features. The Deep Residual Layer DRSN achieves dynamic feature selection and enhancement by integrating soft thresholding and attention mechanisms. This design effectively reduces the burden on the prediction model to process redundant information while strengthening the focus on important features, thereby improving overall prediction accuracy and model robustness. Through this approach, the Deep Residual Layer DRSN not only optimizes the feature extraction process but also enhances the model's adaptability and interpretability to complex time series data.

[0051] In this embodiment, to further improve the accuracy of the photovoltaic power prediction model of the present invention, a bidirectional gated loop (BiGRU) is used in the prediction model. The BiGRU divides the traditional GRU neural unit into forward propagation state and backward propagation state, corresponding to updating the hidden state based on historical data in the training data and updating the hidden state based on future data in the training data, respectively. Both the BiGRU and LSTM networks perform well in processing time series tasks; however, compared to LSTM, the BiGRU has a simpler structure and exhibits superior performance in convergence speed, parameter updating, and generalization, effectively capturing the dependencies between time series data. The core structure of the BiGRU consists of two parts: a reset gate and an update gate. The reset gate... Used to control the current time. The amount of information retained from the input, the reset gate allows discarding information irrelevant to the prediction result, when the reset gate... When it approaches 0, Hidden information prior to the specified time will be discarded, and the remaining information will be retained. Information corresponding to the time; conversely, when the door is reset... As the value approaches 1, the neural network unit will treat past information as useful information. (Update gate) Used to control the amount of information retained from past moments, when updating the gate. A value close to 0 indicates that more information from the past has been forgotten, and this is when the gate is updated. When the value approaches 1, it means that more information from the past is remembered.

[0052] In this embodiment, a multi-head attention mechanism, MutliHeadAttention, is used. This mechanism processes multiple attention "heads" in parallel, enabling the prediction model to learn information from different representation subspaces. Each head, when performing self-attention computation, first processes the input sequence... The query is obtained through three different linear transformations. ),key( ) and value ( The matrix is ​​then used to calculate the dot product of the query and the key. Normalization is performed to stabilize the training process; the normalized scores are then processed. The function is transformed into a probability distribution, which is used to perform a weighted summation of the value vectors. Finally, a linear transformation is used to integrate the outputs of different heads to form the final attention output. This mechanism not only enhances the predictive model's ability to capture complex dependencies in sequential data but also improves the diversity and efficiency of information processing. Query ( ),key( ) and value ( )as well as The function expression is as follows:

[0053]

[0054]

[0055]

[0056] in, , , Both represent parameter matrices. It is the dimension of the key vector. Used to scale the size of the dot product.

[0057] In this embodiment, the AR sub-model is the process of performing autoregressive calculations on the data, utilizing... arrive To predict The value at time t is expressed as follows for the AR sub-model:

[0058] in, Indicates a constant coefficient. Indicates time step The observed values, and Both represent time steps. Indicates random error. This indicates the correlation between the current observation and previous observations, that is, how many previous observations the current observation is related to.

[0059] The beneficial effects of the above-mentioned further schemes are as follows: Bidirectional Temporal Convolutional Layer: 1) Bidirectional temporal convolutional layers can simultaneously extract forward and backward features of time series. This bidirectional processing method can capture richer time series dependencies and improve the understanding of photovoltaic power generation fluctuations. While maintaining the feature mapping dimension, a larger receptive field is achieved with fewer layers, which means that the prediction model can process more data in a shorter computation time, improving computational efficiency. 2) Bidirectional temporal convolutional layers enable the prediction model to better adapt to the ever-changing meteorological conditions and photovoltaic power generation characteristics when processing photovoltaic power generation prediction, thereby improving the accuracy and reliability of prediction. Deep Residual Layer (DRSN): 1) The soft thresholding mechanism can dynamically select input features, suppress noise and redundant information, and highlight important features. 2) The multi-head attention mechanism (MutliHeadAttention) can weight important features, making the prediction model pay more attention to these features, improving the effectiveness and accuracy of feature extraction. 3) Through the synergistic effect of the soft thresholding mechanism and the multi-head attention mechanism (MutliHeadAttention), the prediction model can effectively reduce the burden of processing redundant information, improve overall computational efficiency, and enhance the robustness of the prediction model. 4) This design enhances the prediction model's ability to capture key features, improving the interpretability and prediction accuracy of time series data.

[0060] In this embodiment, the AR model prediction result The output of the BiTCN-MutliHeadAttention-BiGRU model The values ​​are combined linearly weighted to obtain the final prediction result. The expression is:

[0061] in, This indicates a forecast of photovoltaic power generation. and All represent weighting coefficients. This indicates that the AR sub-model is at the current time step. t The predicted value, This indicates that the BiTCN-MutliHeadAttention-BiGRU sub-model is at the current time step. t The predicted value, and .

[0062] The prediction model in this invention has linear extraction capability, enabling linear prediction of photovoltaic power generation. It weights and combines the output of the BiTCN-MutliHeadAttention-BiGRU network with the prediction results of the AR sub-model to obtain the final prediction result.

[0063] S3. The prediction model is trained using the preprocessed training dataset, and the predicted value of photovoltaic power generation is obtained using the trained prediction model. The implementation method is as follows: S301. Acquire photovoltaic power generation data and meteorological data, and divide them into training set, test set and validation set; S302. Train and test the prediction model using the training set and the test set; S303. Validate the tested prediction model using the validation set; S303. Obtain ground-based meteorological observation data and weather forecast data, and use the validated prediction model to obtain the predicted value of photovoltaic power generation.

[0064] In this embodiment, the technical effects of data partitioning are as follows: 1) Dividing the data into training, testing, and validation sets ensures the consistency and independence of data during the training, testing, and validation of the prediction model, avoids data leakage, and improves the reliability and robustness of the prediction model. 2) Evaluating the performance of the prediction model through an independent validation set allows for a more accurate measurement of the model's generalization ability, ensuring the model's performance on unseen data. 3) Partitioning the dataset allows for cross-validation and tuning during prediction model training. Through multiple training and evaluations, the optimal prediction model parameters can be found, improving the prediction accuracy. 4) Using testing and validation sets allows for the timely detection of overfitting or underfitting issues in the prediction model. By adjusting the prediction model architecture and training strategies, the performance of the prediction model can be optimized. The technical effects of prediction model training and testing are as follows: 1) Using the training set for prediction model training allows for the full exploration of potential patterns and features in photovoltaic power generation data and meteorological data, constructing an efficient prediction model. 2) The prediction model can continuously learn and optimize during training, gradually improving its ability to capture data patterns and its prediction accuracy. 3) Evaluating the trained prediction model using a test set allows for an objective measurement of its actual predictive ability, identifying its strengths and weaknesses. 4) The evaluation results from the test set enable timely adjustments to the prediction model parameters and training strategies, further optimizing its performance. Technical effects of prediction model validation: 1) Validating the tested prediction model using a validation set comprehensively assesses its performance on different datasets, ensuring good generalization ability. 2) The validation set evaluation results help determine if the prediction model suffers from overfitting or underfitting; adjusting the model structure and parameters improves its generalization performance. 3) The validation set evaluation checks the stability of the prediction model under different time periods and meteorological conditions, ensuring its reliability and stability in practical applications. 4) Validation results provide crucial information for subsequent improvement and optimization of the prediction model, enhancing the overall performance and practicality of the prediction system. Technical effects in practical applications: 1) By acquiring ground-based meteorological observation data and weather forecast data, combined with the validated prediction model, real-time prediction of photovoltaic power generation can be achieved, providing accurate power generation estimates. 2) Real-time forecast results can help photovoltaic power plants optimize their operation strategies, improve power generation efficiency and economic benefits. 3) Accurate photovoltaic power generation forecast results can provide strong support for power dispatch and energy management, helping decision-makers formulate scientific and reasonable dispatch plans and energy allocation strategies. 4) Forecast results can provide early warnings of potential power generation anomalies, enabling effective countermeasures and ensuring the stability and reliability of power supply.

[0065] In this embodiment, photovoltaic power generation data and corresponding weather data are read, ensuring time correspondence. The data is divided according to the time dimension in a ratio of 7:1.5:1.5, forming training, testing, and validation sets respectively. This division ensures the independence of data during the development and evaluation of the prediction model, thereby effectively evaluating the generalization ability of the prediction model. The prediction model is trained using the training dataset, and the loss function is minimized by adjusting the parameters. During training, the prediction model uses training set samples to adjust parameters to optimize prediction model performance.

[0066] In this embodiment, a validation dataset is used to evaluate the performance of the prediction model, typically using metrics such as mean squared error (MSE), mean absolute error (MAE), root mean square error (RMSE), and correlation coefficient (R).

[0067] In this embodiment, once the prediction model has been trained and validated, it can be applied to short-term photovoltaic power generation forecasting tasks. The prediction model extracts spatiotemporal features from input meteorological data from ground observations and numerical weather prediction data to enhance prediction accuracy. During training, the prediction model is built and trained using a deep learning framework, ensuring the time-point matching of ground and upper-air data. The prediction model combines the advantages of deep learning in time series modeling and multivariate data fusion, fully utilizing contextual information and spatiotemporal dependencies, thus performing excellently in short-term photovoltaic power generation forecasting tasks. Although training the prediction model requires a large amount of data, once trained, it can be widely applied to various photovoltaic power generation forecasting tasks with significant results. Its powerful predictive capabilities and accuracy make it an important tool in the field of photovoltaic power generation forecasting, providing reliable predictive support for power system dispatching and decision-making, and is of great significance to the safe and economical operation of the power system.

[0068] In this embodiment, the present invention combines a bidirectional temporal convolutional network (BiTCN) and a multi-head attention mechanism to enable the prediction model to extract features more comprehensively and enhance its focus on key information, thereby improving the accuracy of photovoltaic power generation prediction. 1) The introduction of a residual network and a deep residual layer (DRSN), employing residual connections and a soft thresholding mechanism, effectively avoids gradient vanishing and gradient explosion, which is beneficial for training deep networks. The BiTCN reduces the number of convolutional layers, while the multi-head attention mechanism allows the prediction model to focus on different aspects of information, thus reducing computational load. 2) The improved residual block uses the GELU activation function, making the model smoother and improving generalization ability. 3) The AR sub-model is fused with the deep learning model, utilizing the linear extraction capability of the AR sub-model to optimize the linear extraction capability of the prediction model. 4) The bidirectional gated recurrent unit (BiGRU) can handle scenarios with incomplete information, improving the prediction model's ability when information is incomplete. It can flexibly select input variables based on correlation analysis, making the prediction model more targeted.

[0069] Example 2 like Figure 2 As shown, the present invention provides a photovoltaic power generation prediction system for implementing Embodiment 1, comprising: The first processing module is used to acquire the training dataset and preprocess the training data; The second processing module is used to construct a prediction model, which includes an improved bidirectional temporal convolutional network BiTCN, a bidirectional gated recurrent unit BiGRU, a multi-head attention mechanism MutliHeadAttention, and an AR prediction sub-model. The third processing module is used to train the prediction model using the preprocessed training dataset, and to obtain the predicted value of photovoltaic power generation using the trained prediction model.

[0070] like Figure 2 The photovoltaic power generation prediction system provided in the embodiment shown can execute the technical solution shown in Embodiment 1 above. Its implementation principle and beneficial effects are similar, and will not be repeated here.

[0071] In this embodiment, the functional units can be divided according to the photovoltaic power generation prediction method. For example, each function can be divided into its own functional units, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this invention is illustrative and represents only a logical division; in actual implementation, other division methods may be used.

[0072] In this embodiment, the photovoltaic power generation prediction system, in order to realize the principle and beneficial effects of the photovoltaic power generation prediction method, includes hardware structures and / or software modules corresponding to the execution of various functions. Those skilled in the art should readily recognize that, in conjunction with the illustrative units and algorithm steps described in the embodiments disclosed in this invention, the present invention can be implemented in hardware and / or a combination of hardware and computer software. Whether a function is executed by hardware or computer software depends on the specific application and design constraints of the technical solution. Different methods can be used to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

Claims

1. A method for predicting photovoltaic power generation, characterized in that, Includes the following steps: S1. Obtain the training dataset and preprocess the training data; S2. Construct a prediction model, which includes an improved bidirectional temporal convolutional network BiTCN, a bidirectional gated recurrent unit BiGRU, a multi-head attention mechanism MutliHeadAttention, and an AR prediction sub-model. S3. Train the prediction model using the preprocessed training dataset, and use the trained prediction model to obtain the predicted value of photovoltaic power generation.

2. The photovoltaic power generation prediction method according to claim 1, characterized in that, S1 includes the following steps: S101. Obtain the training dataset, which includes meteorological data from ground observations, photovoltaic power generation data, and corresponding time label values; S102. Based on meteorological data and photovoltaic power generation data, interpolate and fill in missing values ​​to complete the preprocessing of training data.

3. The photovoltaic power generation prediction method according to claim 1, characterized in that, Step S2 includes the following steps: S201. Construct an improved bidirectional temporal convolutional network, BiTCN; S202. The improved bidirectional temporal convolutional network BiTCN, the multi-head attention mechanism MutliHeadAttention, and the bidirectional gated recurrent unit BiGRU are combined to construct the BiTCN-MutliHeadAttention-BiGRU sub-model. S203. Perform linear weighted fusion processing on the prediction results of the AR sub-model and the BiTCN-MutliHeadAttention-BiGRU sub-model to obtain the predicted value of photovoltaic power generation, thus completing the construction of the prediction model.

4. The photovoltaic power generation prediction method according to claim 3, characterized in that, The improved bidirectional temporal convolutional network BiTCN is used to extract the time-series features of photovoltaic power generation. The BiGRU (Bidirectional Gateless Loop Unit) is used to divide the original GRU neural unit into a forward transmission state and a reverse transmission state. The forward transmission state updates the hidden state based on historical data in the training data. The reverse transmission state updates the hidden state based on future data in the training data; The multi-head attention mechanism MutliHeadAttention is used to enhance the capture of dependencies in time series data; The AR prediction submodule is used for prediction. The predicted value of photovoltaic power generation at any given time.

5. The photovoltaic power generation prediction method according to claim 4, characterized in that, The improved bidirectional temporal convolutional network BiTCN includes: A bidirectional temporal convolutional layer is used to extract the time-series features of photovoltaic power generation. The Deep Residual Layer (DRSN) integrates a soft thresholding mechanism and an attention mechanism for dynamic selection and enhancement of time series features.

6. The photovoltaic power generation prediction method according to claim 5, characterized in that, The output of the soft thresholding mechanism and its derivative are expressed as follows: in, This represents the output of the soft thresholding mechanism. x Indicates the input value. This represents the threshold required for the soft thresholding process. This represents the weights obtained after scaling. Indicates global meanization. This represents the time-series features input to the feature layer.

7. The photovoltaic power generation prediction method according to claim 4, characterized in that, The expression for the AR prediction submodule is as follows: in, Indicates a constant coefficient. Indicates time step The observed values, and Both represent time steps. Indicates random error. This indicates the correlation between the current observation and the observed values.

8. The photovoltaic power generation prediction method according to claim 2, characterized in that, Step S3 includes the following steps: S301. Acquire photovoltaic power generation data and meteorological data, and divide them into training set, test set and validation set; S302. Train and test the prediction model using the training set and the test set; S303. Validate the tested prediction model using the validation set; S304. Obtain ground-based meteorological observation data and weather forecast data, and use the validated prediction model to obtain the predicted value of photovoltaic power generation.

9. The photovoltaic power generation prediction method according to claim 8, characterized in that, The expression for the predicted value of photovoltaic power generation is as follows: in, This indicates a forecast of photovoltaic power generation. and All represent weighting coefficients. This indicates that the AR sub-model is at the current time step. t The predicted value, This indicates that the BiTCN-MutliHeadAttention-BiGRU sub-model is at the current time step. t The predicted value.

10. A photovoltaic power generation prediction system implementing the improved photovoltaic power generation prediction method according to any one of claims 1-9, characterized in that, include: The first processing module is used to acquire the training dataset and preprocess the training data; The second processing module is used to construct a prediction model, which includes an improved bidirectional temporal convolutional network BiTCN, a bidirectional gated recurrent unit BiGRU, a multi-head attention mechanism MutliHeadAttention, and an AR prediction sub-model. The third processing module is used to train the prediction model using the preprocessed training dataset, and to obtain the predicted value of photovoltaic power generation using the trained prediction model.