Photovoltaic power generation small sample intelligent prediction method based on fusion time and frequency domain channels
By improving the generative adversarial network and time-frequency domain feature fusion methods, the prediction accuracy and robustness issues of photovoltaic power generation under small sample conditions are solved, and efficient intelligent prediction of photovoltaic power generation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENYANG HUASHENG METALLURGICAL TECH & INSTALLATION
- Filing Date
- 2026-03-16
- Publication Date
- 2026-06-26
AI Technical Summary
In photovoltaic power generation, existing methods struggle to effectively extract and fuse time-frequency features under small sample conditions, leading to decreased prediction accuracy and generalization ability. Furthermore, traditional data augmentation methods are unable to accurately characterize the complex distribution characteristics of photovoltaic power generation data.
We employ an improved generative adversarial network for small-sample augmentation, combine temporal and frequency domain channel feature extraction, capture temporal dynamics through multi-layer convolutional networks and bidirectional gated recurrent units, achieve feature fusion using a cross-channel attention mechanism, and perform prediction using an improved multi-layer perceptron.
It significantly improves the accuracy and robustness of photovoltaic power generation forecasting, solves the problem of data scarcity under small sample conditions, and realizes efficient intelligent forecasting of photovoltaic power generation.
Smart Images

Figure CN122292303A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent manufacturing technology, specifically a small-sample intelligent prediction method for photovoltaic power generation based on the fusion of time and frequency domain channels. Background Technology
[0002] Photovoltaic (PV) power generation, as an important renewable energy source, has been widely used in power systems due to its cleanliness and sustainability. However, PV power output is affected by various factors such as irradiance conditions, operating status, and system structure, exhibiting significant randomness, volatility, and nonlinearity. To improve the absorption capacity of PV power and the stability of grid operation, high-precision PV power prediction is crucial. Existing PV power prediction methods encompass mechanistic models, statistical analysis, and artificial intelligence-based approaches. Among these, deep learning models are widely used due to their powerful feature representation capabilities, but their performance is highly dependent on sufficient historical sample data.
[0003] In practical applications, due to the short construction cycle of photovoltaic power plants, limited accumulation of historical operating data, and data gaps, there is often a problem of insufficient training samples, forming a typical small-sample prediction scenario. Under small-sample conditions, deep learning models are prone to overfitting, leading to a decline in prediction accuracy and generalization ability. Existing research often uses traditional data augmentation or model structure optimization to alleviate the small-sample problem, but conventional data augmentation methods are difficult to accurately characterize the complex distribution characteristics of photovoltaic power generation data, and the diversity and authenticity of generated samples are limited, failing to fundamentally improve the model's learning effect. Therefore, how to achieve high-quality training data expansion under small-sample conditions remains one of the key technical challenges in the field of photovoltaic power generation prediction.
[0004] Furthermore, photovoltaic power generation sequences exhibit long-term trends, short-term fluctuations, and periodic information during their temporal evolution, displaying significant multi-scale characteristics. Modeling from a single time domain perspective alone is insufficient to fully extract the implicit frequency domain and joint time-frequency features within the data. Some techniques attempt to incorporate time-frequency analysis methods, but these often employ sequential feature extraction and fusion, resulting in insufficient information coupling and low feature utilization efficiency, thus limiting further improvements in prediction performance. Therefore, there is an urgent need to provide a prediction method capable of parallel modeling of time-domain and frequency-domain features and achieving efficient fusion, in order to effectively improve the accuracy of photovoltaic power generation prediction. Summary of the Invention
[0005] To address the problems existing in the prior art, this invention provides a small-sample intelligent prediction method for photovoltaic power generation based on the fusion of time and frequency domain channels. This method is simple to implement, has low implementation cost, high prediction accuracy, and good robustness. It can solve the problem that traditional methods are insufficient in processing time-frequency characteristics and small samples of time series data, and can provide a reliable and efficient technical solution for intelligent prediction of photovoltaic production.
[0006] To achieve the above objectives, the present invention provides a small-sample intelligent prediction method for photovoltaic power generation based on the fusion of time and frequency domain channels, comprising the following steps; S1: Time series data acquisition and preprocessing; Based on the raw high-dimensional multivariate time series data acquired by sensors, a sample dataset is constructed; S2: Small sample augmentation based on improved generative adversarial networks; the sample dataset is divided into training and test sets, and gated recurrent units combined with attention mechanisms are used to generate sequence latent representations from noise. Temporal continuity is ensured through a supervised network, and Wasserstein adversarial training is used to improve the generation quality; the generator parameters are fixed, and multiple samples are synthesized and merged with the training set to form an expanded training set; S3: Construct an intelligent prediction model for photovoltaic power generation; S31: Construct a time-channel feature extraction module; after projecting the original time-series data into a high-dimensional space, multi-scale local patterns are captured through multi-layer temporal convolutional blocks, and global context dependencies are captured through bidirectional gated recurrent units. Finally, a temporal feature representation that integrates local details and global information is obtained through linear mapping. S32: Construct a frequency channel feature extraction module; perform a fast Fourier transform on the original time series data to obtain the amplitude spectrum and phase spectrum and combine them into spectral features; then, divide the spectrum into multiple frequency bands, extract local features through convolutional coding, and then fuse them through alignment and cross-band convolution to obtain a frequency domain feature representation containing periodic information; S33: Construct a cross-channel feature fusion module; achieve deep interaction between the time domain and frequency domain through a bidirectional cross-attention mechanism; actively aggregate key frequency domain information through time domain features, locate the corresponding important time segments through frequency domain features, and finally splice and fuse the two outputs, and introduce residual connections and layer normalization to obtain a cross-domain fusion feature representation containing time domain dynamic characteristics and frequency domain periodic patterns. S34: Construct a prediction module based on an improved multilayer perceptron; apply multi-head attention to enhance global dependence on cross-domain fusion features, then perform adaptive weighted aggregation on key time steps through learnable attention pooling, and finally map the result to the final prediction result through a multilayer perceptron; S35: Model Training and Parameter Optimization; Based on the extended training set, the Adam optimizer and root mean square error loss function are used for model training and parameter optimization, and finally a smart prediction model for photovoltaic power generation is obtained. S4: Online prediction of photovoltaic power generation; deploying the intelligent prediction model of photovoltaic power generation to the photovoltaic production system, performing online inference prediction on the real-time collected time series data and outputting the prediction results.
[0007] Furthermore, in order to provide a reliable data foundation for subsequent small-sample expansion and intelligent prediction, the process of constructing the sample dataset in S1 is as follows: S11: Deploy sensors at key locations in photovoltaic power generation to collect multi-dimensional physical parameters related to photovoltaic power generation in real time, forming a raw high-dimensional multivariate time-series data matrix. , ,in For the sample size, The time window length, For feature dimensions; S12: Perform preprocessing operations on the original high-dimensional multivariate time series data to obtain the sample dataset.
[0008] Furthermore, to enable the generator to stably synthesize high-quality, high-fidelity, and temporally coherent diverse samples from noise, effectively addressing the data scarcity problem in small-sample scenarios, the small-sample augmentation process based on an improved generative adversarial network in S2 is as follows: S21: Data partitioning; Divide the sample dataset into training and test sets according to a set ratio; S22: Temporal feature extraction; using gated recurrent unit networks to process noisy sequences. Temporal feature extraction is performed to obtain features. As shown in formula (1); (1); S23: Introducing a compressed-stimulated attention module to enhance discrimination capabilities; S23-1: Input features Compression is performed; global average pooling is performed along the time dimension to aggregate the time series information, resulting in aggregated time series information. As shown in formula (2); (2); In the formula, The length of the time window; Features exist Elements of time; S23-2: Perform the excitation operation; use two fully connected layers to capture the nonlinear relationship between channels and generate channel weights. As shown in formula (3); (3); In the formula, It is the sigmoid activation function; It is the ReLU activation function; , These are the weight matrices for the two fully connected layers; S23-3: Feature recalibration; This involves recalibrating the generated channel weights. Element-wise multiplication yields the enhanced feature representation. As shown in formula (4); (4); In the formula, This indicates element-wise multiplication; S23-4: Sequence generation; representation of enhanced features The final generated sequence latent representation is mapped through a linear projection layer. As shown in formula (5); (5); In the formula, The weight matrix of the linear projection layer; For bias terms; S24: Ensure continuity and consistency in the time dimension; introduce a supervised network. The one-step dynamic transition of the potential state is modeled as shown in Equation (6) to ensure the continuity and consistency of the generated potential sequence in the time dimension; (6); In the formula, This is the potential state for the next moment; The potential state at the current moment; S25: Adversarial Learning Evaluation; During the adversarial learning phase, the Wasserstein discriminator D(·) is used to evaluate the generated complete time series. and original input features The authenticity is evaluated; where the discriminator output is a real-valued score rather than a probability, and its goal is to maximize the difference between the scores of the real sample and the generated sample, which is calculated by formula (7). ; (7); In the formula, Represents the true potential time series, This represents the generated potential time series; This indicates a demand for expectation; For hyperparameters; Introducing a gradient penalty term As shown in formula (8), to satisfy the Lipschitz continuity constraint; (8); In the formula, Discriminator about The gradient; Represents the 2-norm; S26: Generator objective function; construct the generator objective function according to formula (9). The model parameters are optimized through alternating adversarial training between the generator and the discriminator. (9); In the formula, To monitor the network ; To balance the hyperparameters; S27: Synthetic data generation; Fixed generator The parameters are sampled from random noise space to generate any number of high-quality synthetic time series data through forward propagation; S28: Construct an extended training set; merge the synthetic time series data with the training set to form an extended training set.
[0009] Furthermore, in order to achieve deep integration of local details and long-term temporal information, and to provide rich and robust temporal feature representations for subsequent cross-modal feature interactions, the process of constructing the temporal channel feature extraction module in S31 is as follows: S31-1: Generate embedding sequences; expand the time series data in the training set. The embedded sequence is obtained by mapping to a high-dimensional feature space through a linear projection layer. As shown in formula (10); (10); In the formula, For embedding weight matrix; For bias terms; S31-2: Feature extraction using dilated temporal convolutional networks; Let The embedded sequence is modeled using a multi-layer dilated temporal convolutional network, as shown in Equation (11); (11); In the formula, For the first Layer output; For the first The temporal convolutional blocks of the layer, the internal structure of each temporal convolutional block is as follows: , and These represent the first and second convolution-normalization-nonlinear transformation operation sequences, respectively. For residual mapping; S31-3: Extracting long-term features using bidirectional gated recurrent units; Based on the output of the multilayer dilated temporal convolutional network, a bidirectional gated recurrent unit is introduced to recursively model the time series, as shown in formula (12); where the bidirectional gated recurrent unit includes a forward GRU and a backward GRU, which are used to capture historical and future context information, respectively. (12); In the formula, This represents the total number of floors. By compressing the bidirectional output to a unified dimension through linear mapping, a temporal feature representation that integrates local details and global dependencies is obtained. As shown in formula (13); (13); In the formula, ; This is the weight matrix; This is a bias term.
[0010] Furthermore, in order to accurately capture the periodic patterns and phase information in different frequency ranges, and to provide the model with a frequency domain feature representation rich in periodic regularity that complements the time domain features, the process of constructing the frequency channel feature extraction module in S32 is as follows: S32-1: Fourier Transform; for time series data in the extended training set. Perform a fast Fourier transform to obtain the amplitude spectrum. and phase spectrum ; S32-2: Amplitude and phase combination; combining the amplitude spectrum and phase spectrum Combine them to form spectral features As shown in formula (14); (14); S32-3: Multi-band coding; dividing the spectrum along the frequency axis into... Each frequency band extracts local features through a convolutional encoder with the same structure. As shown in formula (15); (15); In the formula, ; S32-4: Frequency band fusion; The outputs of each frequency band are length-aligned and then concatenated. A frequency domain feature representation containing periodic information is obtained by fusion through 1×1 convolution. As shown in formula (16); (16); In the formula, .
[0011] Furthermore, to enable each time step to actively sense and fuse key frequency domain periodic information, and to allow frequency domain features to locate their corresponding key time segments, ultimately generating a robust feature representation that deeply integrates dynamic processes and periodic patterns, the process of constructing the cross-channel feature fusion module in S33 is as follows: S33-1: Time-domain to frequency-domain attention; Time-domain features Transform into a query matrix through linear projection As shown in formula (17); at the same time, the frequency domain features Transformed into a bond matrix through two independent linear projections. Sum matrix As shown in formulas (18) and (19) respectively; then, the similarity score between the query matrix and the key matrix is calculated, normalized to the attention weight matrix by softmax, and then the value matrix is weighted and aggregated to obtain the frequency domain attention output matrix. As shown in formula (20); (17); (18); (19); (20); S33-2: Frequency domain characteristics Transform into a query matrix through linear projection As shown in formula (21); at the same time, the time domain features They are converted into bond matrices by linear projection. Sum matrix As shown in formulas (22) and (23) respectively; then, the similarity score between the query matrix and the key matrix is calculated, normalized to the attention weight matrix by softmax, and then the value matrix is weighted and aggregated to obtain the intermediate output matrix. As shown in formula (24); finally, the intermediate output matrix is interpolated. Map back to time axis length The frequency-domain to time-domain attention output matrix is obtained. As shown in formula (25); (twenty one); (twenty two); (twenty three); (twenty four); (25); S33-3: Bidirectional fusion output; first output the two attention paths... and By concatenating along the feature dimension, we obtain Then, through linear projection, Mapping back to a unified dimension The fused features are obtained; subsequently, residual connections are introduced to overlay the original temporal features. To preserve the original information, the final cross-domain fusion feature representation is obtained through a layer-normalized stable training process. As shown in formula (26); (26); In the formula, For the fusion weight matrix; For bias terms; For layer normalization operation Furthermore, in order to accurately extract the most relevant temporal patterns to the prediction target from features rich in time-frequency information, thereby effectively improving prediction accuracy and robustness, the process of constructing a prediction module based on an improved multilayer perceptron in S34 is as follows: S34-1: Multi-head self-attention global modeling; using feature fusion Simultaneously serving as query, key, and value, long-range dependencies within the sequence are captured through multi-head self-attention, and residual connections and layer normalization are introduced to obtain temporal enhanced feature representations. As shown in formula (27); (27); In the formula, This is a bullish self-attention operation; S34-2: Attention pooling; first, a learnable attention network is used for each time step. Generate normalized weights As shown in formula (28), the features are then weighted and converged to obtain the converged global feature vector. As shown in formula (29); (28); (29); In the formula, Temporal Enhancement Feature Representation The Middle Feature vectors at each time step; To score attention, , , These are two different weight matrices. , These are two different bias terms; S34-3: Final prediction output; the converged global feature vector The input is processed by the multilayer perceptron and mapped to the final prediction result. As shown in formula (30); (30); In the formula; , To predict the step size, This specifies the dimension of the output variable.
[0012] Furthermore, in order to achieve real-time and engineered deployment from data acquisition to power prediction, the online prediction and process of photovoltaic power generation in S4 is as follows: S41: Real-time data acquisition; Utilize sensors to acquire real-time data streams of multi-dimensional physical parameters related to photovoltaic power generation in the photovoltaic production system, categorized by time window length. Slide to collect real-time data For real-time data Perform preprocessing operations; S42: Online feature extraction and fusion; using the time channel feature extraction module to extract preprocessed real-time data. Temporal characteristics The frequency channel feature extraction module is used to extract preprocessed real-time data. Frequency domain characteristics Temporal features are fused through a cross-channel feature fusion module. and frequency domain features Obtain cross-domain fusion characteristics ; S43: Incorporating cross-domain integration features Input is used to a prediction module based on an improved multilayer perceptron to obtain real-time prediction results.
[0013] In intelligent time-series forecasting of photovoltaic (PV) power generation, data often exhibits significant multi-scale characteristics and complex time-frequency coupling patterns. However, traditional forecasting methods face two major challenges: first, modeling from a single time domain perspective makes it difficult to fully exploit the implicit frequency domain features and joint time-frequency features in the data; second, time-series data in actual production often suffers from small sample sizes, leading to insufficient model training and limited prediction accuracy. How to effectively extract and fuse time-frequency features under small sample conditions has become a key technical challenge for improving PV power generation forecasting performance. To address this issue, this invention proposes a forecasting framework combining an improved generative adversarial network (GAN) with a parallel neural network that fuses time and frequency domain features. This method significantly improves the accuracy and robustness of time-series forecasting by organically combining four core modules: small-sample augmentation based on improved GAN, time-frequency dual-channel feature extraction, cross-channel attention fusion, and prediction based on improved MLP. First, the use of high-dimensional multivariate time-series data provides rich input samples for subsequent models, helping to comprehensively capture the coupling relationships of multiple factors affecting PV power generation and avoiding the information loss problem caused by single features. Secondly, a gated recurrent unit is used as the generator backbone to effectively capture the temporal dynamics in noisy sequences, ensuring the continuity and authenticity of the generated data in the temporal dimension. By introducing an attention module to adaptively weight the generated features, the generator focuses on key time steps and important feature dimensions, significantly improving the quality of generated samples. A supervised network models the one-step dynamic transition of latent states, forming a mandatory temporal consistency constraint, effectively avoiding temporal jumps or unnatural fluctuations in the generated data. Adversarial training using Wasserstein distance combined with gradient penalty significantly improves training stability, alleviates mode collapse problems, and ensures the diversity of generated samples. Merging the generated high-quality data with the original training set fundamentally solves the data scarcity problem in small-sample scenarios, providing data support for the training of subsequent complex deep models. Therefore, by employing an improved TimeGAN enhanced with an attention mechanism and training it with WGAN-GP (GAN with gradient penalty), high-quality temporal data is generated, effectively expanding the sample size and improving the model's generalization ability. Next, in the feature extraction stage, a dual-channel structure with parallel temporal and frequency domain channels was designed. The temporal channel extracts deep temporal features of the input variables through a multi-layer temporal convolutional network (TCN) and a bidirectional gated recurrent unit (BiGRU), while the frequency domain channel utilizes Fast Fourier Transform (FFT) combined with multi-scale frequency domain convolution to mine the feature patterns of variables in the frequency domain space. Specifically, in the temporal channel feature extraction process, multi-layer temporal convolutional blocks are used to effectively capture multi-scale local patterns ranging from short-term fluctuations to long-term trends through receptive fields of different sizes, achieving a fine characterization of temporal dynamics.The introduction of residual connections alleviates the gradient vanishing problem in deep networks, enabling the construction of deeper temporal convolutional networks and enhancing the model's expressive power. A bidirectional gated recurrent unit is introduced on top of the temporal convolutional network to overcome the limitations of local perspective. Through bidirectional propagation, it effectively captures historical and future contextual information of the sequence, achieving complete modeling of global dependencies. This allows the temporal channel feature extraction module to ultimately output temporal features that fuse local details and global dependencies, providing high-quality temporal dynamic information for subsequent cross-modal fusion. Simultaneously, during frequency channel feature extraction, the signal is converted to the frequency domain using Fast Fourier Transform, which helps to directly reveal the unique daily periodicity and seasonality of photovoltaic power output data—a unique advantage that is difficult to demonstrate through simple time-domain analysis. By simultaneously extracting the amplitude and phase spectra, the full information of the frequency domain is preserved, avoiding information loss caused by using only the power spectrum, and providing a complete frequency domain feature foundation for subsequent fusion. Dividing the spectrum into independent frequency bands and processing them separately with convolutional encoders allows the model to learn specific patterns for different frequency ranges, achieving a refined feature extraction process. By aligning and stitching together and performing cross-band convolution operations, information from various frequency bands is effectively integrated to form a compact and discriminative frequency domain feature representation, fully exploring the periodic patterns of the data. Then, through the design of a bidirectional attention mechanism from the time domain to the frequency domain and from the frequency domain to the time domain, deep interaction between the two heterogeneous feature spaces is achieved, enabling the model to identify which frequency domain components are important to the current time domain and which time segments correspond to key spectral structures. Through attention computation, time domain features are integrated with key frequency domain information, allowing frequency domain features to be located in their time domain, achieving complementary enhancement of features. By introducing residual connections and layer normalization, the stability of the fusion process is ensured, which helps accelerate convergence and ultimately yields a robust feature representation of true time-frequency fusion, providing a rich feature foundation for subsequent prediction. Furthermore, before prediction, multi-head self-attention is used to perform secondary modeling of the global dependencies of the fused features, further strengthening the long-range dependencies between features and improving the expressive power and discriminativeness of the features. A learnable attention network is employed to generate adaptive weights for each time step, enabling the model to automatically focus on the most critical moments in the historical sequence for predicting future power, rather than simply averaging, thus achieving an intelligent information filtering process. A multilayer perceptron maps the converged feature vectors to the prediction results, resulting in a simple and efficient structure that achieves end-to-end learning from historical sequences to future values, avoiding information loss from multi-stage processing. Furthermore, the Adam optimizer combined with the root mean square error loss function effectively guides the model to converge quickly and stably. Finally, the trained intelligent prediction model is deployed to an actual photovoltaic production system, performing online inference and prediction on real-time data streams and outputting results. This meets the real-time requirements of photovoltaic power generation prediction, providing timely decision support for production scheduling and grid stability, demonstrating clear practical value and economic benefits.
[0014] This method is simple to implement, has low implementation cost, high prediction accuracy, and good robustness. It solves the problem that traditional methods are insufficient in processing time-series data with time-frequency characteristics and small samples, and provides a reliable and efficient technical solution for intelligent prediction of photovoltaic production. Attached Figure Description
[0015] Figure 1 This is a flowchart of the present invention; Figure 2 This is a comparison chart of the actual values and predicted values of the model constructed in this invention and the comparative model; Figure 3 This is the time series curve of the prediction error of the model constructed in this invention; Figure 4 This is a histogram of the prediction error distribution of the model constructed in this invention. Detailed Implementation
[0016] The invention will now be further described with reference to the accompanying drawings.
[0017] like Figure 1 As shown, this invention provides a small-sample intelligent prediction method for photovoltaic power generation based on the fusion of time and frequency domain channels, including the following steps; S1: Time series data acquisition and preprocessing; Based on the raw high-dimensional multivariate time series data acquired by sensors, a sample dataset is constructed; S2: Small sample augmentation based on improved Generative Adversarial Networks (GANs); the sample dataset is divided into training and test sets, and gated recurrent units combined with attention mechanisms are used to generate sequence latent representations from noise. Temporal continuity is ensured through a supervised network, and Wasserstein adversarial training is used to improve the generation quality; the generator parameters are fixed, and multiple samples are synthesized and merged with the training set to form an expanded training set; S3: Construct an intelligent prediction model for photovoltaic power generation; S31: Construct a time-channel feature extraction module; after projecting the original time-series data into a high-dimensional space, multi-scale local patterns are captured through multi-layer temporal convolutional blocks, and global context dependencies are captured through bidirectional gated recurrent units. Finally, a temporal feature representation that integrates local details and global information is obtained through linear mapping. S32: Construct a frequency channel feature extraction module; perform a fast Fourier transform on the original time series data to obtain the amplitude spectrum and phase spectrum and combine them into spectral features; then, divide the spectrum into multiple frequency bands, extract local features through convolutional coding, and then fuse them through alignment and cross-band convolution to obtain a frequency domain feature representation containing periodic information; S33: Construct a cross-channel feature fusion module; achieve deep interaction between the time domain and frequency domain through a bidirectional cross-attention mechanism; actively aggregate key frequency domain information through time domain features, locate the corresponding important time segments through frequency domain features, and finally splice and fuse the two outputs, and introduce residual connections and layer normalization to obtain a cross-domain fusion feature representation containing time domain dynamic characteristics and frequency domain periodic patterns. S34: Construct a prediction module based on an improved multilayer perceptron; apply multi-head attention to enhance global dependence on cross-domain fusion features, then perform adaptive weighted aggregation on key time steps through learnable attention pooling, and finally map the result to the final prediction result through a multilayer perceptron; S35: Model Training and Parameter Optimization; Based on the expanded training set, the Adam optimizer and root mean square error (RMSE) loss function are used for model training. The parameters of the entire end-to-end framework are optimized through backpropagation. During the training process, the original test set is periodically used as validation data to input into the model, and its loss and accuracy indicators on unseen samples are calculated to monitor the model's generalization ability. Based on the validation performance, hyperparameters (such as learning rate and number of network layers) are dynamically adjusted or early stopping strategies are implemented to prevent overfitting. After the model's performance on the test set stabilizes and meets the preset threshold, the optimal model parameters are saved, and the intelligent prediction model for photovoltaic power generation is finally obtained. S4: Online prediction of photovoltaic power generation; Deploy the intelligent prediction model of photovoltaic power generation into the photovoltaic production system, perform online inference prediction on the real-time collected time series data, and output the prediction results.
[0018] In order to provide a reliable data foundation for subsequent small-sample expansion and intelligent prediction, the process of constructing the sample dataset in S1 is as follows: S11: Deploy sensors at key locations in photovoltaic power generation to collect multi-dimensional physical parameters related to photovoltaic power generation in real time, forming a raw high-dimensional multivariate time-series data matrix. , ,in For the sample size, The time window length, For feature dimensions; S12: Perform preprocessing operations such as cleaning, outlier handling, and standardization on the original high-dimensional multivariate time series data to eliminate dimensional differences between different sensors, ensure that the data quality meets the requirements of subsequent modeling, and obtain the sample dataset.
[0019] To enable the generator to stably synthesize high-quality, high-fidelity, and temporally coherent diverse samples from noise, effectively addressing the data scarcity problem in small-sample scenarios, S2 divides the sample dataset into training and test sets. A gated recurrent unit network is used to extract temporal features from the noisy sequences, and a compression-activation attention module is introduced. Adaptive weighting of feature channels is achieved through compression operations (global average pooling) and activation operations (nonlinear transformation of fully connected layers), enhancing the model's ability to discriminate key latent dimensions. Based on this, a linear projection layer is used to obtain the final latent representation of the generated sequence. To ensure the continuity and consistency of the generated sequence in the temporal dimension, a supervised network is introduced to model the one-step dynamic transition of the latent state. In the adversarial learning stage, a Wasserstein discriminator is used to evaluate the authenticity of the latent time series, and a gradient penalty term is introduced to satisfy the Lipschitz continuity constraint, thereby stabilizing training and improving the quality of the generated data. Through alternating adversarial training of the generator and discriminator, and with the trained generator parameters fixed, an arbitrary number of high-quality synthetic time series data are sampled from random noise and combined with the training set to form an extended training set. Specifically, the process of small-sample augmentation based on improved generative adversarial networks is as follows: S21: Data partitioning; Divide the sample dataset into training and test sets according to a set ratio; S22: Temporal feature extraction; using gated recurrent unit networks (GRUs) to process noisy sequences. Temporal feature extraction is performed to obtain features. As shown in formula (1); (1); S23: To enhance the model's ability to distinguish different potential feature dimensions, a compressed-excitation attention module is introduced to enhance the discrimination ability; S23-1: Input features Compression is performed; global average pooling is performed along the time dimension to aggregate the time series information, resulting in aggregated time series information. As shown in formula (2); (2); In the formula, The length of the time window; Features exist Elements of time; S23-2: Perform the excitation operation; use two fully connected layers to capture the nonlinear relationship between channels and generate channel weights. As shown in formula (3); (3); In the formula, It is the sigmoid activation function; It is the ReLU activation function; , These are the weight matrices for the two fully connected layers; S23-3: Feature recalibration; This involves recalibrating the generated channel weights. Element-wise multiplication yields the enhanced feature representation. As shown in formula (4); (4); In the formula, This indicates element-wise multiplication; S23-4: Sequence generation; representation of enhanced features The final generated sequence latent representation is mapped through a linear projection layer. As shown in formula (5); (5); In the formula, The weight matrix of the linear projection layer; For bias terms; S24: Ensure continuity and consistency in the time dimension; introduce a supervised network. The one-step dynamic transition of the potential state is modeled as shown in Equation (6) to ensure the continuity and consistency of the generated potential sequence in the time dimension; (6); In the formula, This is the potential state for the next moment; The potential state at the current moment; S25: Adversarial Learning Evaluation; During the adversarial learning phase, the Wasserstein discriminator D(·) is used to evaluate the generated complete time series. and original input features The authenticity is evaluated; where the discriminator output is a real-valued score rather than a probability, and its goal is to maximize the difference between the scores of the real sample and the generated sample, which is calculated by formula (7). ; (7); In the formula, Represents the true potential time series, This represents the generated potential time series; This indicates a demand for expectation; For hyperparameters; Introducing a gradient penalty term As shown in formula (8), to satisfy the Lipschitz continuity constraint; (8); In the formula, Discriminator about The gradient; Represents the 2-norm; S26: Generator objective function; construct the generator objective function according to formula (9). The model parameters are optimized through alternating adversarial training between the generator and the discriminator. (9); In the formula, To monitor the network ; To balance the hyperparameters; S27: Synthetic data generation; Fixed generator The parameters are sampled from random noise space to generate any number of high-quality synthetic time series data through forward propagation; S28: Construct an extended training set; merge the synthetic time series data with the training set to form an extended training set.
[0020] To achieve a deep fusion of local details and long-term temporal information, and to provide rich and robust temporal feature representations for subsequent cross-modal feature interactions, in S31, the original time-series data is mapped to a high-dimensional feature space through linear projection to obtain the embedded sequence. Multi-layer temporal convolutional blocks are used to hierarchically model the embedded sequence. Each convolutional block includes convolution-normalization-nonlinear transformation operations and introduces residual connections to capture local patterns at different time scales. Based on the output of the temporal convolutional network, a bidirectional gated recurrent unit is introduced. Through forward and backward recursion, historical and future contextual information are captured, thereby extracting global long-term dependencies. The output of the bidirectional gated recurrent unit is compressed to a unified dimension through linear mapping, resulting in a temporal feature representation that fuses local details and global dependencies, providing rich temporal dynamic information for subsequent cross-domain interactions. Specifically, the process of constructing the time channel feature extraction module is as follows: S31-1: Generate embedding sequences; expand the time series data in the training set. The embedded sequence is obtained by mapping to a high-dimensional feature space through a linear projection layer. As shown in formula (10); (10); In the formula, For embedding weight matrix; For bias terms; S31-2: Feature extraction using dilated temporal convolutional networks (LuxTCN); Let The embedded sequence is modeled using a multi-layer dilated temporal convolutional network, as shown in Equation (11); (11); In the formula, For the first Layer output; For the first The temporal convolutional blocks of the layer, the internal structure of each temporal convolutional block is as follows: , and These represent the first and second convolution-normalization-nonlinear transformation operation sequences, respectively. For residual mapping; S31-3: Extracting long-term features using a bidirectional gated recurrent unit (BiGRU); Based on the output of the multilayer dilated temporal convolutional network, a bidirectional gated recurrent unit is introduced to recursively model the time series, as shown in formula (12); where the bidirectional gated recurrent unit includes a forward GRU and a backward GRU, which are used to capture historical and future context information, respectively. (12); In the formula, This represents the total number of floors. By compressing the bidirectional output to a unified dimension through linear mapping, a temporal feature representation that integrates local details and global dependencies is obtained. As shown in formula (13); (13); In the formula, ; This is the weight matrix; This is a bias term.
[0021] To accurately capture periodic patterns and phase information across different frequency ranges, and to provide the model with a frequency domain feature representation rich in periodic regularities that complements the time domain features, in S32, a Fast Fourier Transform (FFT) is performed on the original time series data to transform it into Fourier space and extract the amplitude and phase spectra. These two spectra are then combined to form spectral features. The spectrum is then divided along the frequency axis. Each frequency band is divided into several independent frequency bands. Feature extraction is performed on each frequency band through a convolutional encoder to capture patterns in different frequency ranges. The outputs of each frequency band are length-aligned and then concatenated. Cross-frequency band fusion is then performed through convolution to obtain a frequency domain feature representation containing rich information. Specifically, the process of constructing the frequency channel feature extraction module is as follows: S32-1: Fourier Transform; for time series data in the extended training set. Perform a fast Fourier transform to obtain the amplitude spectrum. and phase spectrum ; S32-2: Amplitude and phase combination; combining the amplitude spectrum and phase spectrum Combine them to form spectral features As shown in formula (14); (14); S32-3: Multi-band coding; dividing the spectrum along the frequency axis into... Each frequency band extracts local features through a convolutional encoder with the same structure. As shown in formula (15); (15); In the formula, ; S32-4: Frequency band fusion; The outputs of each frequency band are length-aligned and then concatenated. A frequency domain feature representation containing periodic information is obtained by fusion through 1×1 convolution. As shown in formula (16); (16); In the formula, .
[0022] To enable each time step to actively perceive and fuse key frequency domain periodic information, and to allow frequency domain features to locate their corresponding key time segments, ultimately generating a robust feature representation that deeply integrates dynamic processes and periodic patterns, in step S33, attention calculation is performed using time domain features as queries and frequency domain features as key-value pairs to capture components in the frequency domain information that are important to the time domain, resulting in a time-to-frequency domain attention output. Simultaneously, reverse attention calculation is performed using frequency domain features as queries and time domain features as key-value pairs, and the output length is mapped back to the time axis length through interpolation, resulting in a frequency-to-time domain attention output, thereby identifying key time segments corresponding to the spectral structure. Finally, the two attention outputs are concatenated and linearly fused, and residual connections and layer normalization are introduced to obtain the final fused feature representation that simultaneously contains time-domain dynamic characteristics and frequency-domain periodic patterns. Specifically, the process of constructing the cross-channel feature fusion module is as follows: S33-1: Time-domain to frequency-domain attention; Time-domain features Transform into a query matrix through linear projection As shown in formula (17); at the same time, the frequency domain features Transformed into a bond matrix through two independent linear projections. Sum matrix As shown in formulas (18) and (19) respectively; then, the similarity score between the query matrix and the key matrix is calculated, normalized to the attention weight matrix by softmax, and then the value matrix is weighted and aggregated to obtain the frequency domain attention output matrix. As shown in formula (20); thus, each time step actively extracts periodic information related to itself from the frequency domain features, realizing the active perception and enhancement of frequency domain information by the time domain features; (17); (18); (19); (20); S33-2: Frequency domain characteristics Transform into a query matrix through linear projection As shown in formula (21); at the same time, the time domain features They are converted into bond matrices by linear projection. Sum matrix As shown in formulas (22) and (23) respectively; then, the similarity score between the query matrix and the key matrix is calculated, normalized to the attention weight matrix by softmax, and then the value matrix is weighted and aggregated to obtain the intermediate output matrix. As shown in formula (24); this process enables each frequency component to aggregate information related to itself from the time-domain features, and obtain a representation enhanced by time-domain information; finally, the intermediate output matrix is interpolated. Map back to time axis length To capture key time segments corresponding to the spectral structure, the frequency-to-time domain attention output matrix is obtained. As shown in formula (25); thus, the key time segment information of frequency domain feature localization is transmitted back to each time step, so that each time step can perceive its own importance from the perspective of frequency domain. (twenty one); (twenty two); (twenty three); (twenty four); (25); S33-3: Bidirectional fusion output; first output the two attention paths... and By concatenating along the feature dimension, we obtain Then, through linear projection, Mapping back to a unified dimension The fused features are obtained; subsequently, residual connections are introduced to overlay the original temporal features. To preserve the original information, the final cross-domain fusion feature representation is obtained through a layer-normalized stable training process. As shown in formula (26), this feature simultaneously contains time-domain dynamic features and frequency-domain periodic patterns, as well as the interaction information between the two, providing a rich feature foundation for subsequent prediction tasks. (26); In the formula, For the fusion weight matrix; For bias terms; This is a layer normalization operation.
[0023] To accurately extract the most relevant temporal patterns from features rich in time-frequency information, thereby effectively improving prediction accuracy and robustness, S34 introduces multi-head self-attention on the basis of cross-domain fusion features. Residual connections and layer normalization enhance the global dependency modeling capability of temporal features, resulting in enhanced temporal feature representations. Subsequently, a learnable attention network generates adaptive weights for each time step. After softmax normalization, the time dimensions are weighted and converged to obtain a global feature vector that focuses on key time points. Finally, the converged global feature vector is input into a multilayer perceptron, mapping it to the final prediction result with a specified step size and dimension, achieving end-to-end prediction from historical sequences to future values. Specifically, the process of constructing a prediction module based on an improved multilayer perceptron is as follows: S34-1: Multi-head self-attention global modeling; to further capture long-range dependencies in the temporal dimension, a multi-head self-attention mechanism is used to globally model the sequence; to fuse features Simultaneously serving as query, key, and value, long-range dependencies within the sequence are captured through multi-head self-attention, and residual connections and layer normalization are introduced to obtain temporal enhanced feature representations. As shown in formula (27); (27); In the formula, This is a bullish self-attention operation; S34-2: Attention Pooling Convergence; To fully utilize complete time series information and highlight the impact of key time steps, an attention pooling mechanism is used in the prediction stage to adaptively weight and converge the time dimension; firstly, a learnable attention network is used for each time step. Generate normalized weights As shown in formula (28), the features are then weighted and converged to obtain the converged global feature vector. As shown in formula (29); (28); (29); In the formula, Temporal Enhancement Feature Representation The Middle Feature vectors at each time step; Attention scores are adaptively generated by a two-layer network. , , These are two different weight matrices. , These are two different bias terms; S34-3: Final prediction output; the converged global feature vector The input to the multilayer perceptron (MLP) is mapped to the final prediction result. As shown in formula (30); (30); In the formula; , To predict the step size, This specifies the dimension of the output variable.
[0024] To enable real-time and engineered deployment from data acquisition to power prediction, the online prediction process for photovoltaic power generation in S4 is as follows: S41: Real-time data acquisition; Utilize sensors to acquire real-time data streams of multi-dimensional physical parameters related to photovoltaic power generation in the photovoltaic production system, categorized by time window length. Slide to collect real-time data For real-time data Perform preprocessing operations; S42: Online feature extraction and fusion; using the time channel feature extraction module to extract preprocessed real-time data. Temporal characteristics The frequency channel feature extraction module is used to extract preprocessed real-time data. Frequency domain characteristics Temporal features are fused through a cross-channel feature fusion module. and frequency domain features Obtain cross-domain fusion characteristics ; S43: Incorporating cross-domain integration features Input is used to a prediction module based on an improved multilayer perceptron to obtain real-time prediction results.
[0025] Experimental Analysis: Using actual photovoltaic power generation data, the predictive performance of key indicators of the multi-sensor system is verified through experiments. By comparing with other advanced methods, the performance of this method is further analyzed, and the performance of the model is evaluated using evaluation metrics.
[0026] This invention uses photovoltaic power generation data from a certain region for verification. This dataset comes from the local photovoltaic power generation monitoring system: it is constructed by detecting features at the same time using multiple sensors. The dataset contains four input features and one prediction target.
[0027] The target prediction is the actual temperature of the location. The dataset is divided into training and test sets in a 4:1 ratio. The experiment is implemented using Python 3.8 and the PyTorch framework, with CUDA acceleration. The batch size is set to 256, the base model uses the Adam optimizer, the initial learning rate is set to 1e-3, and the maximum number of training epochs is set to 50.
[0028] To verify the effectiveness of the proposed method, this experiment selects two mainstream deep learning temporal prediction methods, TCN-GRU and iTransformer, as benchmarks for comparison. TCN can extract local features and then use GRU to complete long-term dependencies, improving both accuracy and speed. iTransformer treats each variable as an independent "token" and uses a self-attention mechanism to explicitly model the relationship between variables. Root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²) are used as the benchmarks. 2 The variance (VAR) is used as the evaluation index, as shown in formulas (31), (32), (33) and (34), respectively. (31); (32); (33); (34); In the formula, For the number of samples, To predict the output, For true sampled output, This represents the average value of the actual sampled output. RMSE is more sensitive to larger errors. MAE reflects the average level of prediction error. 2VAR measures how well a model explains data variation. It reflects the degree of volatility in predictions.
[0029] Table 1: Performance Comparison Results of Each Model The experimental results are shown in Table 1. The model proposed in this invention performs well in terms of RMSE, MAE, and R... 2 The proposed model demonstrates significant advantages in both core evaluation metrics (VAR) and outperforms the TCN-BiGRU and iTransformer comparison models. The MAE of the proposed model is 0.70, a 42% reduction compared to the best-performing iTransformer comparison model; the RMSE reaches 1.08, a 35% reduction compared to iTransformer; R... 2 The value is as high as 0.94, which is 9.3% higher than iTransformer. The VAR is 1.12, which is 59.6% lower than iTransformer. This result fully verifies the effectiveness of the small sample intelligent prediction technology scheme that fuses the time channel and frequency domain channel used in this invention.
[0030] From the perspective of indicator characteristics, the significant reduction in RMSE and MAE indicates that the proposed model has stronger robustness and higher prediction accuracy when dealing with outlier and extreme value prediction scenarios. This is mainly due to the invention's use of dual-channel extraction of time series features in both the time and frequency domains. By deeply fusing the features extracted from the time and frequency domains, the model's prediction accuracy is further improved. At the time-frequency feature extraction level, compared with the traditional models in comparison, the proposed model, through parallel time and frequency domain channels, can simultaneously capture the temporal and frequency domain features of the time series, avoiding the omission of key information and thus significantly improving prediction accuracy. Furthermore, compared with traditional models, the proposed model effectively mines the correlation between the frequency domain features of different variables through multi-scale frequency domain convolution operations, further strengthening the model's learning ability and providing core support for high-performance prediction.
[0031] To more intuitively observe the predictive advantages of the proposed model, Figure 2 The comparison shows the time series prediction results of the proposed model and the contrasting model on the test set. Figure 3 The prediction error of the proposed model was analyzed from the perspective of dynamic changes. Figure 4 The statistical characteristics of the prediction error distribution of the proposed model are analyzed. Figure 2As can be seen, the proposed model performs best in tracking the changing trend of actual photovoltaic power generation compared to the comparative models. Compared to traditional models, the proposed model shows a significant advantage in capturing rapid fluctuations and peak changes in actual power generation. From the close fit between the predicted curves of each model and the actual values, it can be observed that the proposed model has the smallest overall prediction error, and the error is controlled within a reasonable range for most of the time period.
[0032] Figure 3 This is a sequence graph showing the prediction error of the proposed algorithm over time. The prediction error generally fluctuates around 0, with larger fluctuations at certain time points, but most errors fluctuate within ±0.2, further confirming the reliability of the proposed model. Figure 4 The histogram shows the distribution of prediction errors. Most prediction errors are concentrated in a small range, with larger errors occurring only in a few cases. In terms of distribution range, the vast majority of prediction errors are controlled between -0.1 and +0.1, with a few exceeding ±0.2. This error distribution characteristic indicates that the proposed model maintains high prediction accuracy in most situations, verifying the model's good reliability and stability.
[0033] Experimental results verify the superior performance of the proposed method in photovoltaic power generation prediction tasks. By fusing features extracted from the time and frequency domains for small-sample prediction, this method successfully solves the technical challenge of prediction accuracy under small-sample conditions in traditional methods, providing an effective technical solution for intelligent prediction. Experimental data show that this method not only outperforms existing state-of-the-art methods in prediction accuracy but also possesses good robustness and practicality.
Claims
1. A small-sample intelligent prediction method for photovoltaic power generation based on the fusion of time and frequency domain channels, characterized in that, Includes the following steps; S1: Time series data acquisition and preprocessing; Based on the raw high-dimensional multivariate time series data acquired by sensors, a sample dataset is constructed; S2: Small-sample augmentation based on improved generative adversarial networks; The sample dataset is divided into training and test sets. Gated recurrent units combined with attention mechanisms are used to generate sequence latent representations from noise. Temporal continuity is ensured through a supervised network, and Wasserstein adversarial training is used to improve the generation quality. The generator parameters are fixed, and multiple samples are synthesized and merged with the training set to form an expanded training set. S3: Construct an intelligent prediction model for photovoltaic power generation; S31: Construct a time-channel feature extraction module; after projecting the original time-series data into a high-dimensional space, multi-scale local patterns are captured through multi-layer temporal convolutional blocks, and global context dependencies are captured through bidirectional gated recurrent units. Finally, a temporal feature representation that integrates local details and global information is obtained through linear mapping. S32: Construct a frequency channel feature extraction module; perform a fast Fourier transform on the original time series data to obtain the amplitude spectrum and phase spectrum and combine them into spectral features; then, divide the spectrum into multiple frequency bands, extract local features through convolutional coding, and then fuse them through alignment and cross-band convolution to obtain a frequency domain feature representation containing periodic information; S33: Construct a cross-channel feature fusion module; achieve deep interaction between the time domain and frequency domain through a bidirectional cross-attention mechanism; The time-domain features actively aggregate key frequency-domain information, the frequency-domain features locate the corresponding important time segments, and finally the two outputs are spliced and fused. Residual connections and layer normalization are introduced to obtain a cross-domain fused feature representation containing time-domain dynamic characteristics and frequency-domain periodic patterns. S34: Construct a prediction module based on an improved multilayer perceptron; apply multi-head attention to enhance global dependence on cross-domain fusion features, then perform adaptive weighted aggregation on key time steps through learnable attention pooling, and finally map the result to the final prediction result through a multilayer perceptron; S35: Model Training and Parameter Optimization; Based on the extended training set, the Adam optimizer and root mean square error loss function are used for model training and parameter optimization, and finally a smart prediction model for photovoltaic power generation is obtained. S4: Online prediction of photovoltaic power generation; deploying the intelligent prediction model of photovoltaic power generation to the photovoltaic production system, performing online inference prediction on the real-time collected time series data and outputting the prediction results.
2. The intelligent prediction method for small-sample photovoltaic power generation based on the fusion of time and frequency domain channels according to claim 1, characterized in that, In S1, the process of constructing the sample dataset is as follows: S11: Deploy sensors at key locations in photovoltaic power generation to collect multi-dimensional physical parameters related to photovoltaic power generation in real time, forming a raw high-dimensional multivariate time-series data matrix. , ,in For the sample size, The time window length, For feature dimensions; S12: Perform preprocessing operations on the original high-dimensional multivariate time series data to obtain the sample dataset.
3. The photovoltaic power generation small-sample intelligent prediction method based on the fusion of time and frequency domain channels according to claim 1, characterized in that, In S2, the few-shot augmentation process based on the improved generative adversarial network is as follows: S21: Data partitioning; Divide the sample dataset into training and test sets according to a set ratio; S22: Temporal feature extraction; Using gated recurrent unit networks to process noisy sequences Temporal feature extraction is performed to obtain features. As shown in formula (1); (1); S23: Introducing a compressed-stimulated attention module to enhance discrimination capabilities; S23-1: Input features Compression is performed; global average pooling is performed along the time dimension to aggregate the time series information, resulting in aggregated time series information. As shown in formula (2); (2); In the formula, The length of the time window; Features exist Elements of time; S23-2: Perform the excitation operation; use two fully connected layers to capture the nonlinear relationship between channels and generate channel weights. As shown in formula (3); (3); In the formula, It is the sigmoid activation function; It is the ReLU activation function; , These are the weight matrices for the two fully connected layers; S23-3: Feature recalibration; Generate channel weights Element-wise multiplication yields the enhanced feature representation. As shown in formula (4); (4); In the formula, This indicates element-wise multiplication; S23-4: Sequence generation; representation of enhanced features The final generated sequence latent representation is mapped through a linear projection layer. As shown in formula (5); (5); In the formula, The weight matrix of the linear projection layer; For bias terms; S24: Ensure continuity and consistency in the time dimension; introduce a supervised network. The one-step dynamic transition of the potential state is modeled as shown in Equation (6) to ensure the continuity and consistency of the generated potential sequence in the time dimension; (6); In the formula, This is the potential state for the next moment; The potential state at the current moment; S25: Adversarial Learning Evaluation; During the adversarial learning phase, the Wasserstein discriminator D(·) is used to evaluate the generated complete time series. and original input features The authenticity is evaluated; where the discriminator output is a real-valued score rather than a probability, and its goal is to maximize the difference between the scores of the real sample and the generated sample, which is calculated by formula (7). ; (7); In the formula, Represents the true potential time series, This represents the generated potential time series; This indicates a demand for expectation; For hyperparameters; Introducing a gradient penalty term As shown in formula (8), to satisfy the Lipschitz continuity constraint; (8); In the formula, Discriminator about The gradient; Represents the 2-norm; S26: Generator objective function; construct the generator objective function according to formula (9). The model parameters are optimized through alternating adversarial training between the generator and the discriminator. (9); In the formula, To monitor the network ; To balance the hyperparameters; S27: Synthetic data generation; Fixed generator The parameters are sampled from random noise space to generate any number of high-quality synthetic time series data through forward propagation; S28: Construct an extended training set; merge the synthetic time series data with the training set to form an extended training set.
4. The intelligent prediction method for small-sample photovoltaic power generation based on the fusion of time and frequency domain channels according to claim 1, characterized in that, In S31, the process of constructing the time channel feature extraction module is as follows: S31-1: Generate embedding sequences; expand the time series data in the training set. The embedded sequence is obtained by mapping to a high-dimensional feature space through a linear projection layer. As shown in formula (10); (10); In the formula, For embedding weight matrix; For bias terms; S31-2: Feature extraction using dilated temporal convolutional networks; Let The embedded sequence is modeled using a multi-layer dilated temporal convolutional network, as shown in Equation (11); (11); In the formula, For the first Layer output; For the first The temporal convolutional blocks of the layer, the internal structure of each temporal convolutional block is as follows: , and These represent the first and second convolution-normalization-nonlinear transformation operation sequences, respectively. For residual mapping; S31-3: Extracting long-term features using bidirectional gated recurrent units; Based on the output of the multilayer dilated temporal convolutional network, a bidirectional gated recurrent unit is introduced to recursively model the time series, as shown in formula (12); where the bidirectional gated recurrent unit includes a forward GRU and a backward GRU, which are used to capture historical and future context information, respectively. (12); In the formula, This represents the total number of floors. By compressing the bidirectional output to a unified dimension through linear mapping, a temporal feature representation that integrates local details and global dependencies is obtained. As shown in formula (13); (13); In the formula, ; This is the weight matrix; This is a bias term.
5. The photovoltaic power generation small-sample intelligent prediction method based on the fusion of time and frequency domain channels according to claim 1, characterized in that, In S32, the process of constructing the frequency channel feature extraction module is as follows: S32-1: Fourier Transform; for time series data in the extended training set. Perform a fast Fourier transform to obtain the amplitude spectrum. and phase spectrum ; S32-2: Amplitude and phase combination; combining the amplitude spectrum and phase spectrum Combine them to form spectral features As shown in formula (14); (14); S32-3: Multi-band coding; Divide the spectrum along the frequency axis into Each frequency band extracts local features through a convolutional encoder with the same structure. As shown in formula (15); (15); In the formula, ; S32-4: Frequency band fusion; The outputs of each frequency band are length-aligned and then concatenated. A frequency domain feature representation containing periodic information is obtained by fusion through 1×1 convolution. As shown in formula (16); (16); In the formula, .
6. The intelligent prediction method for small-sample photovoltaic power generation based on the fusion of time and frequency domain channels according to claim 1, characterized in that, In S33, the process of constructing the cross-channel feature fusion module is as follows: S33-1: Time-domain to frequency-domain attention; Time-domain features Transform into a query matrix through linear projection As shown in formula (17); at the same time, the frequency domain features Transformed into a bond matrix through two independent linear projections. Sum matrix As shown in formulas (18) and (19) respectively; Subsequently, the similarity scores between the query matrix and the key matrix are calculated, normalized to the attention weight matrix using softmax, and then the value matrices are weighted and aggregated to obtain the frequency domain attention output matrix. As shown in formula (20); (17); (18); (19); (20); S33-2: Frequency domain characteristics Transform into a query matrix through linear projection As shown in formula (21); at the same time, the time domain features They are converted into bond matrices by linear projection. Sum matrix As shown in formulas (22) and (23) respectively; Subsequently, the similarity score between the query matrix and the key matrix is calculated, normalized to the attention weight matrix using softmax, and then the value matrix is weighted and aggregated to obtain the intermediate output matrix. As shown in formula (24); finally, the intermediate output matrix is interpolated. Map back to time axis length The frequency-domain to time-domain attention output matrix is obtained. As shown in formula (25); (21); (22); (23); (24); (25); S33-3: Bidirectional fusion output; first output the two attention paths... and By concatenating along the feature dimension, we obtain Then, through linear projection, Mapping back to a unified dimension The fusion characteristics are obtained; Subsequently, residual connections are introduced, and the original temporal features are superimposed. To preserve the original information, the final cross-domain fusion feature representation is obtained through a layer-normalized stable training process. As shown in formula (26); (26); In the formula, For the fusion weight matrix; For bias terms; This is a layer normalization operation.
7. The photovoltaic power generation small-sample intelligent prediction method based on fusion of time and frequency domain channels according to claim 1, characterized in that, In S34, the process of constructing the prediction module based on the improved multilayer perceptron is as follows: S34-1: Multi-head self-attention global modeling; using feature fusion Simultaneously serving as query, key, and value, long-range dependencies within the sequence are captured through multi-head self-attention, and residual connections and layer normalization are introduced to obtain temporal enhanced feature representations. As shown in formula (27); (27); In the formula, This is a bullish self-attention operation; S34-2: Attention pooling; first, a learnable attention network is used for each time step. Generate normalized weights As shown in formula (28), the features are then weighted and converged to obtain the converged global feature vector. As shown in formula (29); (28); (29); In the formula, Temporal Enhancement Feature Representation The Middle Feature vectors at each time step; To score attention, , , These are two different weight matrices. , These are two different bias terms; S34-3: Final prediction output; the converged global feature vector The input is processed by the multilayer perceptron and mapped to the final prediction result. As shown in formula (29); (30); In the formula; , To predict the step size, This specifies the dimension of the output variable.
8. The photovoltaic power generation small-sample intelligent prediction method based on fusion of time and frequency domain channels according to claim 1, characterized in that, In S4, the online prediction and process of photovoltaic power generation is as follows: S41: Real-time data acquisition; Utilize sensors to acquire real-time data streams of multi-dimensional physical parameters related to photovoltaic power generation in the photovoltaic production system, categorized by time window length. Slide to collect real-time data For real-time data Perform preprocessing operations; S42: Online feature extraction and fusion; using the time channel feature extraction module to extract preprocessed real-time data. Temporal characteristics The frequency channel feature extraction module is used to extract preprocessed real-time data. Frequency domain characteristics Temporal features are fused through a cross-channel feature fusion module. and frequency domain features Obtain cross-domain fusion characteristics ; S43: Incorporating cross-domain integration features Input is used to a prediction module based on an improved multilayer perceptron to obtain real-time prediction results.