Multi-modal data fused LSTM photovoltaic power generation power prediction method and system

By aligning multi-source time-series data and constructing a cross-regional generalized LSTM model, combined with domain adversarial training and reinforcement learning, the accuracy and adaptability issues of photovoltaic power generation prediction were solved, achieving high-precision photovoltaic power generation prediction and economic optimization.

CN121032279AActive Publication Date: 2025-11-28ZHEJIANG POST & TELECOMM

Patent Information

Application Number
CN202511517722.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2025-11-28
Estimated Expiration
2045-10-23

AI Technical Summary

Technical Problem

Existing photovoltaic power generation forecasting methods rely on single meteorological data, making it difficult to integrate key monitoring parameters, limiting forecast accuracy, resulting in poor cross-regional adaptability, and failing to consider electricity price fluctuations and load demand, thus failing to meet the real-time bidding requirements of the electricity market.

Method used

By aligning multi-source time-series data using a dynamic time warping algorithm, a multi-input channel LSTM prediction model is constructed. Combined with domain adversarial training and dual-reward reinforcement learning strategies, a cross-regional generalized photovoltaic power generation prediction model is generated, and the prediction results are dynamically optimized.

Benefits of technology

It achieves high-precision and highly adaptable photovoltaic power generation prediction, accurately predicts future photovoltaic power generation and optimizes economic benefits, and adapts to the data distribution of photovoltaic power plants in different regions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121032279A_ABST
    Figure CN121032279A_ABST
Patent Text Reader

Abstract

The invention discloses an LSTM photovoltaic generation power prediction method and system fused with multi-modal data, and the method comprises the steps: generating a time-space consistent multi-modal training feature matrix according to historical meteorological data, historical photovoltaic monitoring data and corresponding historical generation power data; based on the multi-modal training feature matrix, constructing a multi-input-channel LSTM prediction model, and outputting a cross-regional generalization pre-training model; according to the real-time meteorological data of the target area, the current photovoltaic monitoring data and the electricity price fluctuation curve, updating the pre-training model on line by adopting a dual reward reinforcement learning strategy, and outputting a dynamically optimized power prediction model; and inputting the meteorological data and the photovoltaic monitoring data at the current moment into the dynamically optimized power prediction model to generate a photovoltaic power generation power prediction sequence in the future preset time. According to the embodiment of the invention, high-precision and high-adaptability photovoltaic power generation power prediction can be realized.
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 technology, and in particular to an LSTM photovoltaic power generation prediction method and system that integrates multimodal data. Background Technology

[0002] As the proportion of photovoltaic (PV) power generation in the energy structure continues to increase, accurate prediction of PV power generation is of great significance for grid dispatch, electricity market trading, and renewable energy consumption. Traditional prediction methods mainly rely on single meteorological data or historical power generation data, making it difficult to effectively integrate key monitoring parameters such as PV panel temperature and surface dust coverage, resulting in limited prediction accuracy. Furthermore, existing LSTM models are not adaptable enough to the differences in data distribution among PV power plants in different regions, exhibiting poor cross-regional generalization ability. In addition, conventional prediction methods do not consider economic factors such as electricity price fluctuations and load demand, failing to meet the real-time bidding requirements of the electricity market. Currently, multimodal data fusion technologies suffer from problems such as inaccurate time alignment and unreasonable feature weight allocation, while dynamic optimization strategies often neglect the balance between prediction accuracy and economic benefits. Summary of the Invention

[0003] The purpose of this invention is to provide an LSTM photovoltaic power generation prediction method and system that integrates multimodal data to overcome the shortcomings of the prior art and achieve high-precision and highly adaptable photovoltaic power generation prediction.

[0004] One embodiment of this application provides an LSTM photovoltaic power generation prediction method that integrates multimodal data, the method comprising: Based on historical meteorological data, historical photovoltaic monitoring data and corresponding historical power generation data, a spatiotemporally consistent multimodal training feature matrix is ​​generated by aligning multi-source time-series data through a dynamic time warping algorithm. The photovoltaic monitoring data includes photovoltaic panel temperature, surface dust coverage, and module attenuation coefficient. Based on the multimodal training feature matrix, a multi-input channel LSTM prediction model is constructed. A temporal convolutional network layer is embedded in the input gate of the LSTM to capture the periodic features of meteorological data. The data distribution of different regions is aligned through domain adversarial training, and a pre-trained model that generalizes across regions is output. Based on real-time meteorological data, current photovoltaic monitoring data and electricity price fluctuation curves of the target area, the pre-trained model is updated online using a dual-reward reinforcement learning strategy. The first reward function is based on the error between the predicted power and the actual value, and the second reward function is based on the matching degree between the economic benefits of power generation and the load demand, outputting a dynamically optimized power prediction model. The current meteorological data and photovoltaic monitoring data are input into the dynamically optimized power prediction model. The feature contribution of different time steps is dynamically weighted through a spatiotemporal attention mechanism to generate a photovoltaic power generation prediction sequence for a future preset time.

[0005] Optionally, based on historical meteorological data, historical photovoltaic monitoring data, and corresponding historical power generation data, a multi-source time-series data is aligned using a dynamic time warping algorithm to generate a spatiotemporally consistent multimodal training feature matrix. The photovoltaic monitoring data includes photovoltaic panel temperature, surface dust coverage, and module degradation coefficient, including: Based on the difference in sampling frequency between meteorological sensors and photovoltaic monitoring equipment, a sliding window adaptive interpolation algorithm is used to align timestamps and generate a raw time series dataset with a unified time reference. The original time series dataset is input into the dynamic time warping module to calculate the optimal time offset of the photovoltaic panel temperature, dust coverage rate and power generation sequence, and generate a phase-aligned time series feature vector. Based on phase-aligned temporal feature vectors, cross-modal correlation weights between meteorological data and monitoring data are extracted through a multimodal feature fusion network to generate a weighted fusion feature matrix; A spatiotemporal smoothing constraint is applied to the weighted fusion feature matrix, and a bidirectional LSTM is used to eliminate abrupt noise points, outputting a dimensionally regular multimodal training feature matrix.

[0006] Optionally, the step of constructing a multi-input channel LSTM prediction model based on the multimodal training feature matrix, embedding a temporal convolutional network layer at the input gate of the LSTM to capture the periodic features of meteorological data, and aligning the data distribution of different regions through domain adversarial training to output a pre-trained model that generalizes across regions includes: The multimodal training feature matrix is ​​split into meteorological channels and monitoring channels according to data type. A temporal convolutional network layer is embedded in the meteorological channel to output a meteorological period tensor containing hourly, daily and weekly periodic features. The meteorological period tensor and the monitoring channel features are concatenated and then input into the LSTM unit. The weight ratio of the two types of features is dynamically adjusted through a gating fusion mechanism to generate a periodically enhanced temporal memory state. A domain adversarial training framework is constructed based on temporal memory states. The gradient reversal layer forces the LSTM hidden layer to output region-independent general features, generating domain-invariant feature vectors. The domain-invariant feature vectors are input into the fully connected prediction layer, and the power prediction loss function and the domain classification loss function are jointly optimized to output a preliminary cross-region generalization model. Knowledge distillation is performed on the preliminary cross-regional generalization model to remove region-specific parameters and output a lightweight pre-trained model.

[0007] Optionally, the pre-trained model is updated online using a dual-reward reinforcement learning strategy based on real-time meteorological data, current photovoltaic monitoring data, and electricity price fluctuation curves of the target area. The first reward function is based on the error between the predicted power and the actual value, and the second reward function is based on the matching degree between the economic benefits of power generation and load demand. The result is a dynamically optimized power prediction model, including: The pre-trained model is loaded as a reinforcement learning policy network, the environmental state is defined as a sliding window feature vector of real-time meteorological-monitoring data, and the action is the power prediction value adjustment amount. A first reward calculation module is constructed to generate a precision reward signal based on the root mean square error between the predicted power and the measured value, and to assign a weight coefficient of 3 times to the recent error. A second reward calculation module is constructed to generate an economic benefit reward signal by combining the matching degree between the electricity price curve and the load demand period, and the reward value is allocated according to the benefit gradient. We design a dual Q-network architecture to learn the Q-value functions of precision reward and economic reward respectively, and generate a comprehensive Q-value through dynamic weighted fusion to guide policy updates. A priority experience replay mechanism is introduced to store historical state-action-reward tuples, and the policy network parameters are periodically sampled and fine-tuned to output a dynamically optimized power prediction model.

[0008] Optionally, the step of inputting current meteorological data and photovoltaic monitoring data into the dynamically optimized power prediction model, and dynamically weighting the feature contribution of different time steps through a spatiotemporal attention mechanism to generate a photovoltaic power generation prediction sequence for a future preset time includes: Real-time meteorological data and photovoltaic monitoring data are input into the dynamically optimized power prediction model. The time series features of the past hour are extracted through a sliding window to generate a standardized input tensor. Deploy a spatiotemporal attention module at the output of the LSTM hidden layer, calculate the attention weights in the time dimension and the feature dimension respectively, and generate a spatiotemporal attention weight matrix. The standardized input tensor is dynamically weighted and fused using a spatiotemporal attention weight matrix to suppress the influence of noisy time-segment features and generate an enhanced spatiotemporal feature vector. The spatiotemporal feature vector is input into the recursive prediction layer, and the power prediction value for the next 24 hours is generated iteratively at 15-minute intervals, outputting a high-precision time series prediction result.

[0009] Another embodiment of this application provides an LSTM photovoltaic power generation prediction system that integrates multimodal data, the system comprising: The alignment module is used to align multi-source time-series data based on historical meteorological data, historical photovoltaic monitoring data and corresponding historical power generation data, and generate a spatiotemporally consistent multimodal training feature matrix through a dynamic time warping algorithm. The photovoltaic monitoring data includes photovoltaic panel temperature, surface dust coverage and module attenuation coefficient. The module is used to construct a multi-input channel LSTM prediction model based on the multimodal training feature matrix, embed a temporal convolutional network layer into the input gate of the LSTM to capture the periodic features of meteorological data, and align the data distribution of different regions through domain adversarial training to output a pre-trained model that generalizes across regions. The optimization module is used to update the pre-trained model online using a dual-reward reinforcement learning strategy based on real-time meteorological data, current photovoltaic monitoring data and electricity price fluctuation curve of the target area. The first reward function is based on the error between the predicted power and the actual value, and the second reward function is based on the matching degree between the economic benefits of power generation and the load demand, and outputs a dynamically optimized power prediction model. The prediction module is used to input the current meteorological data and photovoltaic monitoring data into the dynamically optimized power prediction model, and generate a photovoltaic power generation prediction sequence for the future preset time by dynamically weighting the feature contribution of different time steps through a spatiotemporal attention mechanism.

[0010] Another embodiment of this application provides a storage medium storing a computer program, wherein the computer program is configured to execute the method described in any of the preceding claims when running.

[0011] Another embodiment of this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the method described in any of the preceding claims.

[0012] Compared with existing technologies, this invention provides an LSTM photovoltaic power prediction method that integrates multimodal data. Based on historical meteorological data, historical photovoltaic monitoring data, and corresponding historical power generation data, a spatiotemporally consistent multimodal training feature matrix is ​​generated. Based on this multimodal training feature matrix, a multi-input channel LSTM prediction model is constructed, outputting a pre-trained model that generalizes across regions. According to real-time meteorological data, current photovoltaic monitoring data, and electricity price fluctuation curves of the target region, a dual-reward reinforcement learning strategy is used to update the pre-trained model online, outputting a dynamically optimized power prediction model. The current meteorological data and photovoltaic monitoring data are input into the dynamically optimized power prediction model to generate a photovoltaic power prediction sequence for a preset future time, thereby achieving high-precision and highly adaptable photovoltaic power prediction. Attached Figure Description

[0013] Figure 1 A hardware structure block diagram of a computer terminal for an LSTM photovoltaic power generation prediction method that integrates multimodal data, provided in an embodiment of the present invention; Figure 2 A flowchart illustrating an LSTM photovoltaic power generation prediction method that integrates multimodal data, provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an LSTM photovoltaic power generation prediction system that integrates multimodal data, provided in an embodiment of the present invention. Detailed Implementation

[0014] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0015] This invention first provides an LSTM photovoltaic power generation prediction method that integrates multimodal data. This method can be applied to electronic devices, such as computer terminals, specifically ordinary computers.

[0016] The following detailed explanation uses a computer terminal as an example. Figure 1 This is a hardware structure block diagram of a computer terminal for an LSTM photovoltaic power generation prediction method that integrates multimodal data, provided as an embodiment of the present invention. Figure 1 As shown, the computer device includes a processor, memory, and network interface connected via a system bus, wherein the memory may include non-volatile storage media and internal memory.

[0017] Non-volatile storage media can store operating systems and computer programs. These computer programs include program instructions that, when executed, cause the processor to perform any LSTM photovoltaic power prediction method that integrates multimodal data.

[0018] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0019] Internal memory provides an environment for the execution of computer programs in non-volatile storage media. When executed by a processor, the computer program enables the processor to perform any LSTM photovoltaic power prediction method that integrates multimodal data.

[0020] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 1 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0021] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.

[0022] See Figure 2 The present invention provides an LSTM photovoltaic power generation prediction method that integrates multimodal data, which may include the following steps: S201, Based on historical meteorological data, historical photovoltaic monitoring data and corresponding historical power generation data, the multi-source time series data are aligned using a dynamic time warping algorithm to generate a spatiotemporally consistent multimodal training feature matrix, wherein the photovoltaic monitoring data includes photovoltaic panel temperature, surface dust coverage and module attenuation coefficient. Specifically, based on the difference in sampling frequencies between meteorological sensors and photovoltaic monitoring equipment, a sliding window adaptive interpolation algorithm can be used to align timestamps and generate a raw time series dataset with a unified time reference. Photovoltaic monitoring equipment (such as temperature sensors and dust detection cameras) and meteorological sensors (such as anemometers and irradiance meters) typically have different sampling frequencies. For example, photovoltaic panel temperature might be collected every 5 minutes, while wind speed data might be recorded every 10 minutes. The sliding window adaptive interpolation algorithm aims to align multi-source data to a unified time reference (e.g., one data point per minute), eliminating the interference of timestamp differences on model training.

[0023] Sliding window design: Window size setting: Determine the window length based on the highest sampling frequency. For example, if the photovoltaic monitoring data sampling frequency is the highest (5 minutes / time), then set the window length to 5 minutes.

[0024] Dynamic filling strategy: Within each window, if data from a certain sensor is missing (e.g., meteorological data is only available every 10 minutes), linear interpolation or cubic spline interpolation is used to fill the missing time points. For example, within a 5-minute window, if wind speed data is missing at a certain moment, the intermediate value is calculated based on 10-minute data from adjacent windows.

[0025] Outlier filtering: A sliding standard deviation filter is applied to the interpolated data to remove outliers exceeding three times the standard deviation. For example, if the average temperature of photovoltaic panels within a window is 45℃ and the standard deviation is 2℃, then data with temperatures >51℃ or <39℃ are considered outliers and removed.

[0026] Timestamp alignment and resampling: Reference timeline generation: Based on the local time of the photovoltaic power station, create a continuous sequence of timestamps every minute (e.g., 00:00, 00:01, ..., 23:59).

[0027] Multi-source data mapping: Mapping data from various sensors to a baseline time axis using nearest neighbor matching or weighted averaging. For example, if the timestamp of a photovoltaic monitoring data point is 00:03:24, it will be mapped to the baseline time 00:03 and the original value will be recorded.

[0028] Sampling frequency normalization: For low-frequency data (such as dust coverage rate once per hour), forward fill or mean fill is used. For example, if there is no dust data for the current time, the most recent valid value is used.

[0029] Output a unified dataset: Example of data structure: Generate a table containing timestamps, meteorological data (wind speed, irradiance, ambient temperature, etc.), and photovoltaic monitoring data (module temperature, dust coverage, attenuation coefficient, etc.), and store it in CSV or Parquet format.

[0030] Alignment validation: Calculate the missing rate of each column of data (e.g., missing rate of wind speed data <1%) and the time coverage completeness (e.g., coverage of 1440 baseline time points throughout the day >99.5%) to ensure that the dataset can be used for subsequent model training.

[0031] The original time series dataset is input into the dynamic time warping module to calculate the optimal time offset of the photovoltaic panel temperature, dust coverage rate and power generation sequence, and generate a phase-aligned time series feature vector. Even after timestamp alignment, there may be phase delays in the temporal changes of different variables (e.g., a power decrease due to a temperature rise may have a lag of several minutes). Dynamic Time Warping (DTW) finds the optimal time offset relationship between variables by non-linearly aligning temporal data.

[0032] Dynamic Time Warping Algorithm Configuration: Sequence window settings: Limit the maximum time offset range to ±15 minutes (i.e., allow DTW to align sequences within 15 minutes before and after) to prevent excessive distortion of timing relationships.

[0033] Distance metric selection: Euclidean distance is used as the cost function for sequence alignment. For example, the point-to-point distance matrix between the photovoltaic panel temperature sequence and the power generation sequence within the same time period is calculated.

[0034] Path constraints: Apply slope weighting to limit the curvature of the alignment path and avoid unreasonable jumps in alignment. For example, limit the path slope to between [0.5, 2] to ensure smooth timing alignment.

[0035] Variable alignment and phase correction: Key variable selection: For variables that are strongly correlated with power generation, such as photovoltaic panel temperature and dust coverage, DTW alignment was performed with the power series.

[0036] Offset Calculation: The minimum cost alignment path is found using the accumulated cost matrix to determine the time offset for each variable. For example, the photovoltaic panel temperature sequence needs to be shifted forward by 3 minutes, and the dust coverage sequence needs to be shifted backward by 2 minutes.

[0037] Phase alignment operation: Circular shift the original sequence based on the offset. For example, shift the temperature sequence to the right by 3 time steps (one step per minute), filling any gaps with edge values.

[0038] Alignment result verification: Correlation analysis: Calculate the Pearson correlation coefficient between the variables and power generation before and after alignment. For example, the correlation coefficient between temperature and power increased from -0.6 before alignment to -0.8 after alignment.

[0039] Visual inspection: Plot a time-series overlay before and after alignment to observe the synchronicity of peak and trough values. For example, the temperature peak and power trough completely overlap after a 3-minute offset.

[0040] Output feature vector: The phase-aligned sequences of temperature, dust coverage, power, etc. are concatenated according to time steps to generate a multi-dimensional time-series feature vector (e.g., one vector per minute, containing 10 feature dimensions).

[0041] Based on phase-aligned temporal feature vectors, cross-modal correlation weights between meteorological data and monitoring data are extracted through a multimodal feature fusion network to generate a weighted fusion feature matrix; Meteorological data (such as irradiance and wind speed) and photovoltaic monitoring data (such as temperature and dust coverage) have different physical meanings and numerical ranges. Directly concatenating them can lead to a model biased towards high-dimensional features. Multimodal feature fusion networks learn cross-modal association weights through an attention mechanism to achieve adaptive weighted fusion.

[0042] Feature standardization and coding: Normalization: Min-Max Scaling is performed on each feature column to scale the values ​​to the [0,1] range. For example, the irradiance range is 0-1000W / m². 2 Mapped to 0-1, with a temperature range of 20-80℃ mapped to 0-1.

[0043] Modal grouping: Features are divided into meteorological modes (wind speed, irradiance, ambient temperature) and monitoring modes (component temperature, dust coverage, attenuation coefficient), and input into different encoder branches respectively.

[0044] Embedding representation: Each modality branch generates a 128-dimensional feature vector through a fully connected layer. For example, the meteorological modality takes 3-dimensional features as input and outputs a 128-dimensional embedding vector.

[0045] Cross-modal attention mechanism: Attention weight calculation: Bilinear attention is used to calculate the association weight between the meteorological mode and the monitoring mode. The formula is simplified to: Weight = Softmax(Meteorological embedding × Weight matrix × Monitoring embedding^T).

[0046] Dynamic weighted fusion: The monitoring modal features are weighted and summed according to their weights to generate fused features related to the meteorological modality. For example, the weight of the dust coverage feature is increased to 0.9 during periods of high irradiance, while the weight of the attenuation coefficient is reduced to 0.1.

[0047] Residual connection: The original meteorological embedding is added to the fused features to preserve the original information and enhance cross-modal interaction.

[0048] Post-processing of fused features: Dimensionality reduction and regularization: Principal component analysis (PCA) was used to reduce the fused 256-dimensional features to 64-dimensional features, while L2 regularization (regularization coefficient λ=0.01) was applied to prevent overfitting.

[0049] Time step concatenation: Concatenate the fused features of each minute in chronological order to generate a time-series feature matrix (e.g., 1440 minutes × 64 dimensions).

[0050] Output format: Stored as a NumPy array or HDF5 file for later use in model training.

[0051] A spatiotemporal smoothing constraint is applied to the weighted fusion feature matrix, and a bidirectional LSTM is used to eliminate abrupt noise points, outputting a dimensionally regular multimodal training feature matrix.

[0052] The fused feature matrix may contain transient noise (such as outliers caused by momentary sensor failures), and data quality needs to be improved through spatiotemporal smoothing constraints and bidirectional sequence modeling (Bi-LSTM).

[0053] Applications of spatiotemporal smoothing constraints: Time-dimensional smoothing: Apply a moving average to each feature column with a window length of 15 minutes (i.e., the average of the current point and the previous 14 points). For example, the value of a feature at 10:00 is the average of the previous 10 minutes up to 10:14.

[0054] Spatial Dimension Smoothing: For monitoring data of multiple photovoltaic modules (such as the temperature of 10 modules in the same array), the mean value within the group at the same time step is calculated to replace the outlier value of a single module. For example, if the temperature of a module deviates from the group mean by ±3℃, the mean value is used instead.

[0055] Constrained loss function: When training the fusion network, a smoothing regularization term is added to penalize drastic changes in feature values ​​at adjacent time steps. For example, the L1 norm of the differences between adjacent features (coefficient 0.05) is added to the loss function.

[0056] Bidirectional LSTM denoising: Network architecture design: Construct a bidirectional LSTM network with 128 hidden units in each direction. The input sequence length is 1440 (minutes of the day), and the output sequence is of the same length.

[0057] Noise point detection: Calculate the LSTM reconstruction error, which is the mean square error (MSE) between the predicted value and the original value. If the error at a certain time step exceeds a threshold (such as 3 times the average error), it is marked as a noise point.

[0058] Noise replacement strategy: Replace noise points with linear interpolation of the preceding and following time steps (the average of the first 5 minutes and the last 5 minutes) to ensure sequence continuity.

[0059] Final feature matrix generation: Dimensional regularization: The 128-dimensional hidden state of the bidirectional LSTM output is mapped to 32 dimensions through a fully connected layer to reduce redundant information.

[0060] Standardization review: Perform Z-Score standardization on the final feature matrix (mean=0, standard deviation=1) to ensure that the different feature dimensions are consistent.

[0061] Data storage: The output is a three-dimensional tensor with the shape of (number of samples × time step × feature dimension). For example, 1000 days of samples correspond to a matrix of 1000×1440×32, and it is stored in TFRecord format to adapt to the TensorFlow training process.

[0062] This method first integrates historical operational data from various sources, including key parameters such as meteorological conditions, photovoltaic module status, and actual power generation. Advanced time-series alignment techniques address the issues of data acquisition delays and frequency discrepancies from multiple sources. Special attention is paid to monitoring indicators that directly affect power generation efficiency, such as photovoltaic panel temperature and dust coverage, ensuring spatiotemporal consistency of data. A high-quality multimodal training dataset is established to eliminate spatiotemporal biases during data acquisition, providing accurate feature inputs that reflect the actual operating status of the photovoltaic system for subsequent model training. By incorporating long-term influencing factors such as module degradation, the model's adaptability to real-world operating conditions such as equipment aging is enhanced.

[0063] S202, Based on the multimodal training feature matrix, a multi-input channel LSTM prediction model is constructed. A temporal convolutional network layer is embedded in the input gate of the LSTM to capture the periodic features of meteorological data. The data distribution of different regions is aligned through domain adversarial training, and a pre-trained model that generalizes across regions is output. Specifically, the multimodal training feature matrix can be split into meteorological channels and monitoring channels according to data type. A temporal convolutional network layer can be embedded in the meteorological channel to output a meteorological period tensor containing hourly, daily, and weekly periodic features. The multimodal training feature matrix contains meteorological data (such as wind speed, irradiance, and ambient temperature) and photovoltaic monitoring data (such as module temperature, dust coverage, and attenuation coefficient). These need to be separated by data type and feature enhancement performed. Temporal Convolutional Networks (TCNs) capture the periodic patterns (such as hourly, daily, and weekly cycles) of meteorological data through dilated convolution.

[0064] Data channel splitting: Meteorological Channel: Extracts meteorological-related features such as wind speed, irradiance, and ambient temperature. For example, the input feature matrix contains 10 dimensions, with the first 3 dimensions being meteorological data.

[0065] Monitoring channels: Extract monitoring features such as component temperature, dust coverage, and attenuation coefficient. For example, the last 7 dimensions are monitoring data.

[0066] Data format conversion: Convert the split data into a 3D tensor (number of samples × time step × feature dimension). For example, the shape of the meteorological channel tensor is 1000 (samples) × 1440 (time steps) × 3 (features).

[0067] Temporal Convolutional Network (TCN) Design: Causal Convolution: Ensures that the convolution kernel only covers the current and historical time steps, avoiding the leakage of future information. For example, the convolution kernel size is set to 3 (covering the previous 2 time steps and the current time step).

[0068] Dilation Rate Settings: Capturing multi-scale periodic features through different dilation rates: Hourly cycle: Expansion rate = 12 (covering a historical window of 12 × 5 minutes = 1 hour).

[0069] Daily cycle: expansion rate = 288 (covering a historical window of 288 × 5 minutes = 24 hours).

[0070] Weekly cycle: Expansion rate = 2016 (covering a historical window of 2016 × 5 minutes = 7 days).

[0071] Residual Connection: Each TCN block contains a residual structure to prevent gradient vanishing. For example, input features are added to the original input after passing through a convolutional layer.

[0072] Periodic feature extraction: Layered stacking: Stack multiple TCN blocks (e.g., 3 layers) to expand the receptive field layer by layer. For example, the first layer has a kernel size of 3 and a dilation rate of 1, the second layer has a dilation rate of 12, and the third layer has a dilation rate of 288.

[0073] Feature stitching: The feature maps output by different expansion rates are stitched together to form a meteorological periodic tensor containing hourly, daily, and weekly cycles. For example, the output tensor shape is 1000×1440×64 (64-dimensional periodic features).

[0074] Output standardization: Layer normalization is applied to the meteorological cycle tensor to eliminate dimensional differences. For example, after normalization, the feature mean is 0 and the standard deviation is 1.

[0075] The meteorological period tensor and the monitoring channel features are concatenated and then input into the LSTM unit. The weight ratio of the two types of features is dynamically adjusted through a gating fusion mechanism to generate a periodically enhanced temporal memory state. The weights of meteorological cycle characteristics (such as daily irradiance variation) and monitoring characteristics (such as dust coverage) on power generation change dynamically over time, and their contributions need to be adaptively adjusted through a gated fusion mechanism.

[0076] Feature assembly and input preparation: Data alignment: Ensure that the time steps of the meteorological cycle tensor (e.g., 1440×64) are aligned with the time steps of the monitoring channel features (e.g., 1440×7). For example, perform forward fill for missing time steps of the monitoring channel.

[0077] The splicing operation splices the meteorological cycle tensor and monitoring features along the feature dimensions to generate combined features (such as 1440×71 dimensions).

[0078] Input standardization: Batch normalization is performed on the combined features, calculating the mean and variance for each batch of samples. For example, each batch of 128 samples is independently normalized.

[0079] Gating fusion mechanism design: Input Gate Extension: A fully connected layer is added to the input gate of the LSTM to generate the weight ratio of meteorological features and monitoring features. For example, the input gate outputs two weight values ​​(meteorological weight α, monitoring weight β), satisfying α + β = 1.

[0080] Dynamic weighted fusion: The meteorological cycle characteristics and monitoring characteristics are weighted and summed according to their respective weights. For example, on a sunny day, the weight of the irradiance characteristic is α=0.8 and the weight of the dust coverage rate is β=0.2; on a cloudy day, α=0.5 and β=0.5.

[0081] Memory State Update: Input the weighted fused features into the LSTM unit to update the cell state and hidden state. For example, the hidden state dimension is set to 128.

[0082] Temporal memory enhancement: Time-step iterative processing: The fused features are processed step-by-step in time-step order (from t=1 to t=1440), preserving long-term dependencies. For example, the hidden state at t=720 (12 noon) contains information from all time periods in the morning.

[0083] Gradient Clipping: Sets a gradient threshold (e.g., 1.0) to prevent gradient explosion during training. For example, when the gradient norm exceeds 1.0, it is scaled proportionally to the threshold.

[0084] Output memory state: Generate periodically enhanced temporal memory states, with a shape of sample number × time step × hidden dimension (e.g., 1000 × 1440 × 128).

[0085] A domain adversarial training framework is constructed based on temporal memory states. The gradient reversal layer forces the LSTM hidden layer to output region-independent general features, generating domain-invariant feature vectors. Differences in the distribution of meteorological and monitoring data in different regions can lead to model overfitting to specific regions (such as rainy areas in the south). Domain-Adversarial Training (DAS) forces the model to learn region-independent general patterns by obfuscating regional features.

[0086] Domain adversarial framework design: Feature Extractor: The LSTM hidden layer acts as a feature extractor, outputting domain-invariant features. For example, the hidden state is a 128-dimensional vector.

[0087] Domain Classifier: Constructs a fully connected network (128-dimensional input, 2-dimensional output) to determine which region (e.g., region A or region B) a feature comes from.

[0088] Gradient Reversal Layer: This layer reverses the gradient of the domain classifier during backpropagation, forcing the feature extractor to generate confusing features for regions that cannot be distinguished. For example, the gradient reversal coefficient λ = 0.1.

[0089] Combat training process: Forward propagation: Input the temporal memory state into the domain classifier and output the predicted probability of the region. For example, the probability of region A is 0.7 and the probability of region B is 0.3.

[0090] Backpropagation: The domain classification loss (such as cross-entropy loss) is calculated, but the gradient is multiplied by -λ and then backpropagated to the feature extractor through a gradient reversal layer. For example, when λ=0.1, the gradient direction is reversed and the intensity is reduced.

[0091] Loss balancing: Set a weight for the domain classification loss (e.g., 0.2) to prevent excessive interference with the training of the main task (power prediction). For example, total loss = power prediction loss + 0.2 × domain classification loss.

[0092] Domain-invariant feature generation: Feature visualization verification: The feature distribution of different regions is visualized through t-SNE (t-Distributed Stochastic Neighbor Embedding) dimensionality reduction. For example, the overlap of features between regions A and B increases significantly after adversarial training.

[0093] Region Confusion Matrix: Calculates the accuracy of the domain classifier, aiming for near-random guessing accuracy (50%). For example, a post-training accuracy drop to 55% indicates that region information has been effectively suppressed.

[0094] Output feature vector: Generates a domain-invariant feature matrix with dimensions of number of samples × time step × 128.

[0095] The domain-invariant feature vectors are input into the fully connected prediction layer, and the power prediction loss function and the domain classification loss function are jointly optimized to output a preliminary cross-region generalization model. In the domain adversarial training framework, the model needs to simultaneously optimize power prediction accuracy and region confusion capability, and balance the two tasks through a joint loss function.

[0096] Fully connected prediction layer design: Network structure: Stack two fully connected layers (128→64→1) to gradually reduce dimensionality to the predicted power generation value. For example, input 128-dimensional features and output a 1-dimensional power value (unit: kW).

[0097] Activation functions: The last layer uses the linear activation function, and the intermediate layers use the ReLU (Rectified Linear Unit) activation function. For example, the ReLU function output = max(0, input).

[0098] Regularization: Apply Dropout (random deactivation ratio 0.2) and L2 regularization (weight decay coefficient 0.001) to prevent overfitting.

[0099] Joint loss function definition: Power prediction loss: Mean squared error (MSE) is used to measure the deviation between the predicted power and the actual power. For example, MSE = Σ(predicted value - actual value). 2 / Number of samples.

[0100] Domain classification loss: Cross-entropy loss is used to measure the accuracy of region classification. For example, cross-entropy = -Σ region label × log(predicted probability).

[0101] Weighted total loss: Total loss = power prediction loss + 0.2 × domain classification loss. For example, if the power prediction loss is 10.5 and the domain classification loss is 0.8, then the total loss = 10.5 + 0.16 = 10.66.

[0102] Model training and validation: Optimizer configuration: Use Adam optimizer (Adaptive Moment Estimation), initial learning rate 0.001, beta1=0.9, beta2=0.999.

[0103] Early Stopping: Monitor the validation set loss and stop training if there is no decrease for 10 consecutive epochs.

[0104] Cross-region validation: Test model performance in unseen regions (such as region C) to ensure that the prediction error is comparable to that in the training regions (regions A and B). For example, the MAE (mean absolute error) for region C is 15kW, while that for region A is 14kW.

[0105] Knowledge distillation is performed on the preliminary cross-regional generalization model to remove region-specific parameters and output a lightweight pre-trained model.

[0106] The initial model may contain redundant parameters (such as overfitting to the noisy features of region A). Knowledge distillation compresses the model through a teacher-student framework, preserving its cross-region generalization ability.

[0107] Teacher-student framework construction: Teacher Model: Generating soft labels using a preliminary cross-region generalization model (1 million parameters). For example, predicting the probability distribution of power (smooth output with temperature parameter T=5).

[0108] Student Model: Design a lightweight LSTM (64 hidden units, 250,000 parameters), with input and output dimensions consistent with the teacher model.

[0109] Distillation Loss: Calculates the Kullback-Leibler Divergence (KL Divergence) between student predictions and teacher soft labels, while optimizing the MSE between student predictions and the true values. For example, total loss = 0.7 × KL Divergence + 0.3 × MSE.

[0110] Region-specific parameter removal: Significance analysis: Gradient weights are used to identify neurons sensitive to region classification. For example, a hidden unit may show significantly higher activation intensity in region A than in region B.

[0111] Pruning: Removing neurons with low significance (such as units with activation intensity <0.1) to compress the model size. For example, pruning from 128 hidden units to 64.

[0112] Quantization: Converts model parameters from 32-bit floating-point numbers to 8-bit integers (INT8), reducing memory usage and computational latency.

[0113] Lightweight model output: Performance validation: Ensure that the prediction accuracy of the student model on the test set is no less than 95% of that of the teacher model. For example, the teacher's MAE is 15kW, and the student's MAE is 15.8kW.

[0114] Cross-regional deployment: The pre-trained model is packaged into the ONNX (Open Neural Network Exchange) format to adapt to different hardware platforms (such as edge computing devices).

[0115] Model documentation: Records the parameter scale, inference speed (e.g., 10ms for a single prediction), and applicable region range after distillation.

[0116] Key technology examples and parameter descriptions Dilated Convolution: Expands the receptive field by sampling at intervals. The parameter "dilation rate" determines the sampling interval (e.g., a dilation rate of 2 means sampling once every 1 point).

[0117] Gradient Reversal Layer: Reverses the sign of the gradient during backpropagation. The parameter "λ" controls the reversal strength (e.g., λ=0.1 means the gradient is scaled to -0.1 times its original value).

[0118] Knowledge Distillation: This method transmits knowledge from the teacher's model through soft labels. The parameter "Temperature T" controls the smoothness of the labels (the higher the T, the smoother the distribution).

[0119] Adam optimizer: Adaptively adjusts the learning rate. The parameter "beta1" controls the first-order moment decay rate, and "beta2" controls the second-order moment decay rate.

[0120] ONNX format: Open neural network exchange format that supports cross-framework model deployment. The parameter "opset_version" specifies the operator set version (e.g., opset_version=13).

[0121] By combining temporal convolutional networks with traditional LSTM, the model retains the advantages of temporal modeling while explicitly extracting diurnal and seasonal cyclical patterns from meteorological data. An adversarial training mechanism is introduced to force the model to learn universal feature representations unaffected by regional differences, enhancing its adaptability to new scenarios and significantly improving the accuracy of capturing meteorological cyclical features. This also addresses the common problem of regional data distribution differences in photovoltaic forecasting. The pre-trained model possesses excellent transfer learning capabilities, enabling rapid adaptation to photovoltaic power plants in different geographical environments.

[0122] S203, based on the real-time meteorological data, current photovoltaic monitoring data and electricity price fluctuation curve of the target area, the pre-trained model is updated online using a dual-reward reinforcement learning strategy. The first reward function is based on the error between the predicted power and the actual value, and the second reward function is based on the matching degree between the economic benefits of power generation and the load demand, outputting a dynamically optimized power prediction model. Specifically, the pre-trained model can be loaded as a reinforcement learning policy network, the environmental state can be defined as a sliding window feature vector of real-time meteorological-monitoring data, and the action can be the adjustment amount of the power prediction value. The pre-trained model (lightweight LSTM) serves as the policy network in reinforcement learning (RL), responsible for generating power prediction adjustments based on real-time environmental conditions. The environmental state is defined as a temporal feature vector containing real-time meteorological data (such as wind speed, irradiance, and ambient temperature) and photovoltaic monitoring data (such as module temperature, dust coverage, and attenuation coefficient), capturing short-term dynamic changes through a sliding window. The action is defined as the adjustment amount to the pre-trained model's original prediction, such as increasing or decreasing the original prediction by a percentage or absolute value.

[0123] Policy network initialization: Model loading: Freeze the LSTM layers of the pre-trained model (parameters cannot be updated), retaining only the fully connected layers as the adjustable part. For example, the LSTM hidden layer parameters are fixed, and the weights of the fully connected layers are set to a trainable state.

[0124] Input adaptation: Define the input layer to receive sliding window data. For example, the input tensor shape is (number of batches, time step, feature dimension), the time step is set to 60 minutes (i.e., data from the past hour), and the feature dimension includes 10 features from meteorological and monitoring data.

[0125] Action Space Design: Actions are defined as continuous adjustment amounts, limited to [-20%, +20%], corresponding to percentage adjustments to the predicted power value. For example, if the original prediction is 100kW, an action of +0.1 indicates an adjustment to 110kW, and an action of -0.05 indicates an adjustment to 95kW.

[0126] Sliding window feature extraction: Window length setting: Based on the time dependence of photovoltaic power changes (such as cloud movement cycle), the window length is set to 60 minutes (i.e., one time step every minute, for a total of 60 steps).

[0127] Real-time data alignment: Aligning meteorological data (e.g., updated every minute) with monitoring data (e.g., updated every 5 minutes) through timestamp matching. For example, missing time steps in monitoring data are filled in using forward fill.

[0128] Standardization: Each feature within the sliding window is individually Z-score standardized (mean = 0, standard deviation = 1) to eliminate dimensional differences. For example, the original irradiance value ranges from 0 to 1000 W / m². 2 It is mapped to the interval [-1.5, 2.3].

[0129] Action execution mechanism: Action generation: The policy network outputs Gaussian distributed parameters (mean μ, standard deviation σ), and exploratory actions are generated through random sampling (e.g., μ=0.05, σ=0.02). For example, a sampling result of +0.08 indicates an 8% upward adjustment of the predicted value.

[0130] Motion constraints: Apply the Tanh activation function to limit the motion range (-1 to 1), then scale it to [-20%, +20%]. For example, a Tanh output of 0.4 corresponds to a scaling adjustment of +8%.

[0131] Action delay handling: Considering the communication delay from the sensor to the control terminal (e.g., an average of 300ms), a historical action buffer is introduced to compensate for the delay effect. For example, the current action is calculated based on the state 300ms ago.

[0132] A first reward calculation module is constructed to generate a precision reward signal based on the root mean square error between the predicted power and the measured value, and to assign a weight coefficient of 3 times to the recent error. The first reward function (Accuracy Reward) is used to measure prediction accuracy. It is based on the root mean square error (RMSE) and emphasizes the importance of recent predictions through time-decayed weighting.

[0133] Root Mean Square Error (RMSE) Calculation: Real-time comparison: The actual power generation (such as the measured value from a smart meter) is acquired every 5 minutes and compared with the adjusted predicted value. For example, the error between the predicted value of 110kW and the measured value of 105kW is 5kW.

[0134] Window Cumulative: Calculates the mean squared error across all time points within a sliding window (e.g., 12 five-minute intervals over the past hour). For example, the sum of the squared error values ​​over the past 12 hours would be 2500 kW. 2 The average value is 208.3 → RMSE = √208.3 ≈ 14.43 kW.

[0135] Normalization: Divide the RMSE by the rated power of the power plant (e.g., 500kW) to obtain the normalized error. For example, 14.43 / 500≈0.0289.

[0136] Time decay weighted strategy: Exponentially decaying weights: Each time point within the window is assigned a weight w_t = 3 × e^(-λt), where λ is the decay coefficient and t is the interval (in minutes) between the current time point and the current time. For example, if λ = 0.01, the weight at the current time t = 0 is 3 × 1 = 3, and the weight at t = 60 minutes ago is 3 × e^(-0.6) = 3 × 0.5488 ≈ 1.646.

[0137] Weighted RMSE calculation: The weighted error is Σ(w_t × (predicted value - measured value)). 2 For example, a higher weight is given to recent errors, which improves the model's sensitivity to short-term fluctuations.

[0138] Reward mapping: Convert the weighted RMSE into a reward value using the formula R1 = 1 / (1 + RMSE), ensuring that the smaller the error, the greater the reward. For example, RMSE = 14.43 → R1 ≈ 0.0648.

[0139] Real-time calibration mechanism: Dynamic threshold adjustment: Set the maximum tolerance error based on the historical error distribution (such as the 95th percentile). For example, if the historical maximum RMSE is 50kW, then errors exceeding this value are considered abnormal, and the reward is directly set to 0.

[0140] Smoothing: A moving average (window length 5) is applied to the reward signal to suppress instantaneous noise. For example, if the reward suddenly drops by 70% at a certain moment, the fluctuation range is reduced to 20% after smoothing.

[0141] Reward scaling: Linearly scales the reward value to the range of [-1, +1] to facilitate fusion with other reward signals. For example, scaling the original reward of 0.0648 to +0.032 results in a maximum reward of +1.

[0142] A second reward calculation module is constructed to generate an economic benefit reward signal by combining the matching degree between the electricity price curve and the load demand period, and the reward value is allocated according to the benefit gradient. The second reward function (Economic Reward) reflects the degree of matching between power generation revenue and load demand. It needs to be dynamically calculated by combining real-time electricity prices (such as time-of-use pricing, TOU) and load curves (such as peak hours for industrial electricity consumption).

[0143] Electricity price curve integration: Electricity pricing by time of day: Peak (e.g., 10:00-14:00), flat (8:00-10:00, 14:00-22:00), and off-peak (22:00-8:00 the next day) electricity prices are defined according to the grid's time-of-use pricing policy. For example, the peak electricity price is 0.8 yuan / kWh, and the off-peak electricity price is 0.3 yuan / kWh.

[0144] Real-time electricity price mapping: Establish a timestamp-electricity price comparison table to dynamically query the electricity price for the current time period. For example, 12:15 corresponds to a peak electricity price of 0.8 yuan / kWh.

[0145] Electricity price forecasting integration: If an electricity price forecasting model exists (such as an LSTM based on load forecasting), its output value is used as a reference electricity price for future periods.

[0146] Load demand matching degree calculation: Load curve acquisition: Extracting typical load curves for the target area from the power grid dispatching system or historical data. For example, an industrial park has a peak electricity demand of 5000kW from 9:00 to 18:00.

[0147] Matching degree index: The matching degree M is defined as actual power generation / load demand, ranging from 0 to 1. For example, a power generation of 4000kW corresponds to a load demand of 5000kW → M = 0.8.

[0148] Dynamic weighting: Higher weights are assigned to matching during peak electricity price periods. For example, the weight coefficient for M is 2 during peak periods, 1 during off-peak periods, and 0.5 during off-peak periods.

[0149] Economic reward generation: The formula for calculating economic benefit is: Economic benefit E = Power generation × Electricity price × Matching degree weight. For example, if 100kW of electricity is generated and the electricity price is 0.8 yuan / kWh, the matching degree weight is 2 → E = 100 × 0.8 × 2 = 160 yuan.

[0150] Tiered reward allocation: Rewards are divided into tiers based on earnings levels. For example: E < 100 yuan → R² = 0.2; 100≤E<200→R²=0.5; E≥200→R2=1.0.

[0151] Normalization: Scaling R2 to the same range as R1 (e.g., [-1, +1]) ensures that reward signals are comparable. For example, a maximum reward of 300 yuan corresponds to R2=+1, and a minimum reward of 0 yuan corresponds to R2=-1.

[0152] We design a dual Q-network architecture to learn the Q-value functions of precision reward and economic reward respectively, and generate a comprehensive Q-value through dynamic weighted fusion to guide policy updates. The Double Q-Network consists of two independent Q-networks that learn the value functions of the first reward (accuracy) and the second reward (economic benefits) respectively. The Q-values ​​of the two networks are fused through dynamic weights to balance the conflicting objectives of prediction accuracy and economic benefits.

[0153] Q network architecture design: Precision Q-Network (Q1): The input is a state feature vector (e.g., 60 minutes × 10 dimensions), and the output is the expected cumulative precision reward for each action. The network structure is a fully connected layer (64→32→1), and the activation function is ReLU.

[0154] Economic Q-network (Q2): Input the same state, output the expected cumulative economic reward. The structure is the same as above, but the parameters are initialized independently.

[0155] Target Network: Creates delayed-update replica networks for Q1 and Q2 (parameters are synchronized every 1000 steps) to improve training stability.

[0156] Dynamic weighted fusion strategy: Weight Generator: Design a small neural network (input state features, output 2D weight vector [w1, w2]), and ensure w1 + w2 = 1 using Softmax. For example, the network structure is 64→32→2.

[0157] Context-aware weights: The weights are dynamically adjusted based on the current state. For example, during peak electricity price periods, the weights are biased towards economic rewards (w2=0.7, w1=0.3); during off-peak hours at night, the weights are biased towards accuracy (w1=0.8, w2=0.2).

[0158] Overall Q-value calculation: Q_total = w1×Q1 + w2×Q2. For example, Q1=0.6, Q2=0.9, weight [0.3,0.7] → ​​Q_total=0.3×0.6 + 0.7×0.9=0.81.

[0159] Strategy optimization and updates: Loss function definition: Huber loss is used to balance the mean squared error and the absolute error. The formula is: when |Q_target - Q_current| ≤ δ, L = 0.5×(Q_target - Q_current) 2 Otherwise, L = δ×|Q_target - Q_current| - 0.5×δ 2 .

[0160] Where δ is the threshold (e.g., 1.0), Q_target is the overall Q value calculated by the target network, and Q_current is the current network output.

[0161] Gradient backpropagation: Update the parameters of Q1, Q2 and weight generator through the Adam optimizer, with the learning rate set to 0.0001 to prevent overfitting.

[0162] Exploration-Exploitation Balance: Employs an ε-Greedy strategy with an initial ε=0.9 (high exploration), decreasing by 0.1 every 1000 steps, with a minimum ε=0.1. For example, 90% of the actions are random for the first 1000 steps, then the utilization rate is gradually increased.

[0163] A priority experience replay mechanism is introduced to store historical state-action-reward tuples, and the policy network parameters are periodically sampled and fine-tuned to output a dynamically optimized power prediction model.

[0164] Prioritized Experience Replay (PER) improves training efficiency by storing high-value experiences (such as high-reward or high-error samples) and prioritizing their sampling. Periodic Fine-Tuning adjusts model parameters based on the latest data to adapt to environmental changes.

[0165] Experience replay pool construction: Storage structure: Each experience tuple contains a state, an action, a reward, a next state, and a done flag. For example, the state is a 60×10 matrix, and the action is a floating-point number.

[0166] Priority calculation: Priority P = absolute value of Temporal Difference Error (TD) + ε (minimum value prevents zero), TD error = |Q_target - Q_current|. For example, if the TD error of a sample is 0.5, then P = 0.5 + 1e-6 ≈ 0.500001.

[0167] Sampling probability: The probability is proportional to the priority, and the formula is Probability(i)=P(i)^α / ΣP(j)^α, where α controls the priority intensity (e.g., α=0.6).

[0168] Periodic fine-tuning strategy: Fine-tuning frequency: Fine-tuning is initiated after every 500 new empirical tuples are collected, with 200 high-priority samples sampled each time.

[0169] Policy network update: The policy gradient is calculated based on the comprehensive Q value. The formula is gradient ascent Δθ=α×∇θ log(π(a|s))×Q_total, where α is the learning rate (e.g., 0.0003).

[0170] Model stability is guaranteed by applying gradient clipping (threshold 1.0) and soft update of parameters (target network parameter θ'=τθ+(1-τ)θ', τ=0.01).

[0171] Dynamic optimization model output: Online validation: Every hour, the prediction accuracy (e.g., MAE) and economic returns are calculated on the validation set (the latest 10% of data). If the validation fails for three consecutive times, the system will roll back to the previous stable version.

[0172] Model Snapshot: Saves the best model parameters for each day (e.g., based on 24-hour cumulative returns), and supports quick recovery and version comparison.

[0173] Final output: When the training loss converges (e.g., loss fluctuation <1% over 1000 consecutive steps) or reaches the maximum number of steps (e.g., 100,000 steps), output the dynamically optimized power prediction model and deploy it to the real-time prediction system.

[0174] Key technology examples and parameter descriptions RMSE (Root Mean Square Error): The square root of the mean square of the prediction error, with the same unit as the predicted value (e.g., kW). The parameter "decay coefficient λ" controls the decay rate of the time weight (e.g., λ=0.01).

[0175] TD error (Temporal Difference Error): The difference between the target Q-value and the current Q-value, reflecting the learning value of the sample. The parameter "α" adjusts the priority intensity (α=0.6 indicates a medium priority bias).

[0176] Huber loss: a robust loss function, where the parameter “δ” determines the switching threshold between mean squared error and absolute error (δ=1.0).

[0177] The Softmax function converts the output of the weight generator into a probability distribution (summing up to 1). The parameter "temperature T" adjusts the smoothness of the distribution (default T=1).

[0178] Adam Optimizer: Adaptive learning rate optimization algorithm. The parameter "beta1=0.9" controls the first-order moment decay rate, and "beta2=0.999" controls the second-order moment decay rate.

[0179] By designing a dual reward mechanism that balances prediction accuracy and economic utility, the model can not only continuously improve prediction accuracy during online application, but also proactively adapt to real-time electricity price fluctuations and load demand changes in the electricity market. This achieves a balanced optimization of technical performance and economic value, breaking through the limitations of traditional prediction models that only focus on accuracy indicators. By incorporating electricity market dynamics into the optimization objective, the prediction results directly serve to maximize power generation revenue and improve the commercial operation efficiency of photovoltaic power plants.

[0180] S204. Input the current meteorological data and photovoltaic monitoring data into the dynamically optimized power prediction model, and generate a photovoltaic power generation prediction sequence for the future preset time by dynamically weighting the feature contribution of different time steps through a spatiotemporal attention mechanism.

[0181] Specifically, real-time meteorological data and photovoltaic monitoring data can be input into the dynamically optimized power prediction model, and the time series features of the past hour can be extracted through a sliding window to generate a standardized input tensor. Real-time meteorological data (such as instantaneous irradiance, wind speed, and ambient temperature) and photovoltaic monitoring data (such as module temperature, dust coverage, and attenuation coefficient) are updated at different frequencies (such as every minute and every 5 minutes). It is necessary to extract feature sequences with a unified time reference through a sliding window and perform standardization processing to ensure that the time series features of the input model are consistent and comparable.

[0182] Sliding window configuration: Window length setting: Based on the short-term fluctuation characteristics of photovoltaic power generation (such as the time scale affected by cloud cover), the window length is set to 1 hour (60 minutes), covering the past 60 time steps (one data point per minute). For example, if the current time is 14:00, the window will cover the data from 13:00 to 14:00.

[0183] Feature alignment strategy: Low-frequency data (such as dust coverage updated every 5 minutes) are filled with linear interpolation to a frequency per minute. For example, dust data at 13:05 is used until 13:06, 13:07, and then until the new data at 13:10 arrives.

[0184] Outlier handling: Apply a sliding median filter (5-minute window) to remove transient noise. For example, if the irradiance suddenly drops to 0 in a minute (sensor malfunction), replace it with the median of the next 5 minutes.

[0185] Standardized processing: Feature-by-feature normalization: Z-Score normalization is performed separately for each feature dimension. The formula is: Normalized value = (Original value - Mean) / Standard deviation. For example, the historical mean of irradiance is 500 W / m². 2 Standard deviation 100W / m 2 Current value: 600W / m 2 After standardization, it becomes (600-500) / 100=1.0.

[0186] Dynamic mean update: The mean and standard deviation are dynamically updated using an exponentially weighted moving average (EWMA) to adapt to changes in data distribution. For example, the new mean = 0.9 × old mean + 0.1 × current value, with a smoothing coefficient α = 0.1.

[0187] Missing value imputation: If data is missing at a certain time step (e.g., due to communication interruption), a bidirectional LSTM is used to predict the missing value. For example, the missing component temperature can be predicted based on data from 10 minutes before and after the missing data.

[0188] Input tensor generation: Temporal dimension integration: Convert 60 minutes of data with 10 features (e.g., 3 meteorological features, 7 monitoring features) into a 3D tensor with the shape (sample count = 1, time step = 60, feature dimension = 10). For example, a single prediction only processes the real-time data of the current power station, with a sample count of 1.

[0189] Format adaptation: Adjust the tensor to the format required by the model input (such as TensorFlow's TF-Tensor or PyTorch's Torch Tensor). For example, use the Float32 data type with a channel-first memory layout (ChannelsLast).

[0190] Caching mechanism: Retain the most recent hour's data in memory to avoid redundant calculations. For example, add a new time step every minute and remove the oldest time step (using a sliding window for continuous updates).

[0191] Deploy a spatiotemporal attention module at the output of the LSTM hidden layer, calculate the attention weights in the time dimension and the feature dimension respectively, and generate a spatiotemporal attention weight matrix. The Spatio-Temporal Attention Module dynamically focuses on key information by independently calculating attention weights in the time dimension (which moments are more important) and the feature dimension (which sensor data are more critical), thereby enhancing the model's sensitivity to important features.

[0192] Time-based attention calculation: Attention input: Temporal features output from the LSTM hidden layer (shape 60×128, assuming 128 hidden units).

[0193] Attention weight generation: Query, Key, and Value Vectors: Hidden features are mapped to a low-dimensional space through three independent fully connected layers (128 to 64 dimensions). For example, the Query vector captures the contextual requirements of the current time step, while the Key vector represents information from historical time steps.

[0194] Similarity calculation: Calculate the dot product between the query and the key at each time step to measure the relevance between time steps. For example, the higher the similarity score between the current time step and a certain historical moment, the stronger the correlation between the two.

[0195] Weight normalization: The Softmax function is applied to the similarity score to generate temporal attention weights (summing to 1). For example, a weight of 0.15 at a certain moment indicates that it contributes 15% of the attention to the current prediction.

[0196] Temporal Feature Enhancement: The weights are summed with the Value vector to generate temporal attention features (shape 60×64). For example, the weights for historical peak power generation periods (such as noon) are significantly higher than those for other periods.

[0197] Feature attention calculation: Feature importance assessment: For each feature dimension (such as irradiance, dust coverage), calculate its importance score to the current prediction task.

[0198] Attention mechanism design: Feature embedding: The original features are mapped to the embedding space through a fully connected layer (10→32 dimensions). For example, the irradiance embedding vector may be associated with a linear variation pattern of power generation.

[0199] Relevance score: Calculates the cosine similarity between the embedded vector and the task objective (power generation). For example, irradiance has the highest similarity score with power, followed by dust coverage.

[0200] Weighting: The scores are Softmax normalized to generate feature attention weights (10-dimensional vectors). For example, irradiance has a weight of 0.35, dust coverage has a weight of 0.25, and the remaining features share the remaining weights.

[0201] Feature weighted fusion: The original features are weighted and summed according to their weights to generate a feature attention vector (shape 60×10). For example, the weight of the irradiance feature during high irradiance periods is increased to 0.5.

[0202] Spatiotemporal weight matrix synthesis: Outer Product: The outer product of temporal attention weights (60-dimensional) and feature attention weights (10-dimensional) is performed to generate a 60×10 spatiotemporal attention matrix. For example, the irradiance at a certain moment (temporal weight 0.2) (feature weight 0.35) corresponds to the matrix element 0.2×0.35=0.07.

[0203] Normalization: Perform row-by-row softmax on the matrix elements to ensure that the sum of the weights in each row (time step) is 1. For example, the sum of the weights of all features at a certain time step is forced to be 1 to avoid weight shift.

[0204] Matrix visualization: A heatmap is used to display the spatiotemporal weight distribution, helping operations and maintenance personnel understand the model's focus. For example, the weight of component temperature features increases significantly during high-temperature periods.

[0205] The standardized input tensor is dynamically weighted and fused using a spatiotemporal attention weight matrix to suppress the influence of noisy time-segment features and generate an enhanced spatiotemporal feature vector. The spatiotemporal attention weight matrix indicates the relative importance of features at different times. Through dynamic weighted fusion, key signals are amplified, the influence of noise or irrelevant features is suppressed, and the signal-to-noise ratio of the input data is improved.

[0206] Weighted fusion process: Element-wise multiplication: The spatiotemporal attention matrix (60×10) is multiplied element-wise with the standardized input tensor (60×10) to generate a weighted feature matrix. For example, if the original irradiance value at a certain moment is 1.2 and the weight is 0.07, the weighted value becomes 1.2×0.07=0.084.

[0207] Feature scaling: Scales the weighted features proportionally to maintain numerical stability. For example, a learnable scaling factor γ (initial value 1.0) can be introduced to adjust the magnitude of the weighted features.

[0208] Residual Connection: This adds weighted features to the original input, preserving basic information. For example, weighted features + original input = enhanced features, preventing over-reliance on attention mechanisms from losing the original data distribution.

[0209] Noise suppression strategies: Low-weight filtering: Set a threshold (e.g., weight < 0.05) to filter out irrelevant features. For example, if the wind speed weight is 0.03 at a certain moment, set it to zero to eliminate interference.

[0210] Moving average smoothing: Applying a moving average with a window length of 5 to the weighted feature sequence to smooth out instantaneous fluctuations. For example, a feature sequence [0.1, 0.2, 0.05, 0.15, 0.3] becomes [0.14, 0.15, 0.16, ...] after smoothing.

[0211] Adversarial training enhancement: Injecting random noise (such as Gaussian noise σ=0.1) during the training phase forces the attention module to learn robust weighting. For example, adding noise to the input tensor and recalculating the weights ensures a stable weight distribution.

[0212] Enhanced Feature Generation: Dimensional compression: Feature dimensions are compressed through fully connected layers (60×10→60×64) to reduce redundant information. For example, 10-dimensional weighted features are mapped to a 64-dimensional high-level semantic space.

[0213] Time step stacking: The enhanced features are spliced ​​along the time dimension to generate a spatiotemporal feature vector of shape 1×60×64 (number of samples × time step × feature dimension).

[0214] Caching and reuse: The enhanced features at the current time step are stored in a cache queue for use in subsequent prediction iterations. For example, when predicting time t+1, some features from time t are reused to reduce redundant computation.

[0215] The spatiotemporal feature vector is input into the recursive prediction layer, and the power prediction value for the next 24 hours is generated iteratively at 15-minute intervals, outputting a high-precision time series prediction result.

[0216] The Recursive Prediction Layer employs an autoregressive approach, using the prediction result from the previous time step as the input for the next time step to progressively generate power values ​​for multiple future time points, ensuring the temporal continuity of the prediction sequence.

[0217] Recursive prediction mechanism: Initial state setup: Input the enhanced spatiotemporal feature vector (60×64) into the LSTM unit to initialize the hidden state and cell state. For example, the hidden state dimension is 128 and the cell state dimension is 128.

[0218] Single-step prediction process: Feature input: The feature vector at the current time step (e.g., t=60) is input into the LSTM unit, and the hidden state is output.

[0219] Power Prediction: The hidden state generates the current power prediction value (e.g., 150kW) through a fully connected layer (128→1).

[0220] State Transmission: Transmit the hidden state and cell state to the next time step as the initial state.

[0221] Input Update: Use the current forecast value as part of the input for the next time step (e.g., electricity price data still needs to be updated in real time).

[0222] Multi-step iteration: Repeat the above steps to generate a power sequence of 96 time points (24 hours × 4) at 15-minute intervals (i.e., predict once every 15 minutes). For example, the first step predicts the power at 14:15, and the last step predicts the power at 14:00 the next day.

[0223] Error accumulation suppression: Hybrid Input Strategy: During the recursive process, the predicted values ​​are gradually replaced with the actual values ​​(if any) as input to reduce error propagation. For example, the predicted values ​​are used for the first hour, and then the actual values ​​are updated every 15 minutes (Scheduled Sampling).

[0224] Dynamic correction mechanism: External weather forecast data (such as future cloud cover prediction) is introduced to correct the model input. For example, if the forecast shows rain in the next 2 hours, the irradiance input value is forcibly reduced.

[0225] Ensemble prediction: Multiple model instances (with different initialization parameters) are run in parallel, and the average of the prediction results is taken as the final output to reduce variance. For example, if the predicted values ​​of 5 models are 148kW, 152kW, 150kW, 149kW, and 151kW, the final output is 150kW.

[0226] Post-processing and output of results: Numerical truncation: Limits the predicted value to the physical limits of the power plant (e.g., 0 to 500kW of rated power). For example, if the model predicts -10kW, it is forcibly corrected to 0kW.

[0227] Smoothing: Apply a Savitzky-Golay filter (window length 7, polynomial order 2) to the predicted sequence to eliminate high-frequency fluctuations. For example, smooth [150, 155, 148, 160, 145] to [153, 152, 151, 150, 149].

[0228] Formatted output: Converts the predicted sequence to JSON or CSV format, including timestamp and power value fields. For example: {"timestamp": "2023-10-01 14:15:00", "power_kW": 150.2}, {"timestamp": "2023-10-01 14:30:00", "power_kW": 152.7}, ...

[0229] Visual interface: Displays the predicted curve (line graph) on the monitoring screen, overlaying the actual value curve and the historical curve for the same period, supporting interactive analysis by maintenance personnel.

[0230] Key technology examples and parameter descriptions Sliding Window: The window length is 60 minutes (time step 60), and it slides once per minute. The parameter "window length" determines the coverage of historical information.

[0231] Z-Score standardization: The mean μ and standard deviation σ are dynamically updated, and the parameter "smoothing coefficient α=0.1" controls the rate of weight decay of historical data.

[0232] Spatiotemporal attention module: Number of time attention heads = 4, number of feature attention heads = 2, the parameter "number of heads" determines the number of parallel computing paths.

[0233] Recursive prediction layer: 96 autoregressive steps (24 hours × 4), the parameter "step size" determines the prediction time granularity (15 minutes).

[0234] Savitzky-Golay filter: window length 7, polynomial order 2, the parameter "window length" affects the smoothness (the longer the window, the smoother the filter).

[0235] In the final prediction stage, a spatiotemporal attention mechanism is introduced to automatically identify and strengthen the influence weights of key periods and key features, effectively suppressing the negative impact of interference factors such as abnormal weather or equipment failure on the prediction results, improving the robustness of the prediction, and significantly improving the stability and interpretability of the prediction results through dynamic feature weighting. This enables the model to maintain reliable output when facing complex weather changes or equipment status fluctuations, providing highly reliable power generation predictions for power grid dispatch.

[0236] As can be seen, a spatiotemporally consistent multimodal training feature matrix is ​​generated based on historical meteorological data, historical photovoltaic monitoring data, and corresponding historical power generation data. Based on this multimodal training feature matrix, a multi-input channel LSTM prediction model is constructed, outputting a pre-trained model that generalizes across regions. According to the real-time meteorological data of the target region, current photovoltaic monitoring data, and electricity price fluctuation curves, a dual-reward reinforcement learning strategy is used to update the pre-trained model online, outputting a dynamically optimized power prediction model. The current meteorological data and photovoltaic monitoring data are input into the dynamically optimized power prediction model to generate a photovoltaic power generation prediction sequence for a preset future time, thus achieving high-precision and highly adaptive photovoltaic power generation prediction.

[0237] Another embodiment of the present invention provides an LSTM photovoltaic power generation prediction system that integrates multimodal data, see [link to relevant documentation]. Figure 3 The system may include: Alignment module 301 is used to align multi-source time series data based on historical meteorological data, historical photovoltaic monitoring data and corresponding historical power generation data, and generate a spatiotemporally consistent multimodal training feature matrix through a dynamic time warping algorithm. The photovoltaic monitoring data includes photovoltaic panel temperature, surface dust coverage and component attenuation coefficient. The construction module 302 is used to construct a multi-input channel LSTM prediction model based on the multimodal training feature matrix, embed a temporal convolutional network layer into the input gate of the LSTM to capture the periodic features of meteorological data, and align the data distribution of different regions through domain adversarial training to output a pre-trained model that generalizes across regions. The optimization module 303 is used to update the pre-trained model online using a dual-reward reinforcement learning strategy based on real-time meteorological data, current photovoltaic monitoring data and electricity price fluctuation curve of the target area. The first reward function is based on the error between the predicted power and the actual value, and the second reward function is based on the matching degree between the economic benefits of power generation and the load demand, and outputs a dynamically optimized power prediction model. The prediction module 304 is used to input the current meteorological data and photovoltaic monitoring data into the dynamically optimized power prediction model, and generate a photovoltaic power generation prediction sequence for the future preset time by dynamically weighting the feature contribution of different time steps through a spatiotemporal attention mechanism.

[0238] As can be seen, a spatiotemporally consistent multimodal training feature matrix is ​​generated based on historical meteorological data, historical photovoltaic monitoring data, and corresponding historical power generation data. Based on this multimodal training feature matrix, a multi-input channel LSTM prediction model is constructed, outputting a pre-trained model that generalizes across regions. According to the real-time meteorological data of the target region, current photovoltaic monitoring data, and electricity price fluctuation curves, a dual-reward reinforcement learning strategy is used to update the pre-trained model online, outputting a dynamically optimized power prediction model. The current meteorological data and photovoltaic monitoring data are input into the dynamically optimized power prediction model to generate a photovoltaic power generation prediction sequence for a preset future time, thus achieving high-precision and highly adaptive photovoltaic power generation prediction.

[0239] This invention also provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

[0240] Specifically, in this embodiment, the storage medium can be configured to store a computer program for performing the following steps: S201, Based on historical meteorological data, historical photovoltaic monitoring data and corresponding historical power generation data, the multi-source time series data are aligned using a dynamic time warping algorithm to generate a spatiotemporally consistent multimodal training feature matrix, wherein the photovoltaic monitoring data includes photovoltaic panel temperature, surface dust coverage and module attenuation coefficient. S202, Based on the multimodal training feature matrix, a multi-input channel LSTM prediction model is constructed. A temporal convolutional network layer is embedded in the input gate of the LSTM to capture the periodic features of meteorological data. The data distribution of different regions is aligned through domain adversarial training, and a pre-trained model that generalizes across regions is output. S203, based on the real-time meteorological data, current photovoltaic monitoring data and electricity price fluctuation curve of the target area, the pre-trained model is updated online using a dual-reward reinforcement learning strategy. The first reward function is based on the error between the predicted power and the actual value, and the second reward function is based on the matching degree between the economic benefits of power generation and the load demand, outputting a dynamically optimized power prediction model. S204. Input the current meteorological data and photovoltaic monitoring data into the dynamically optimized power prediction model, and generate a photovoltaic power generation prediction sequence for the future preset time by dynamically weighting the feature contribution of different time steps through a spatiotemporal attention mechanism.

[0241] As can be seen, a spatiotemporally consistent multimodal training feature matrix is ​​generated based on historical meteorological data, historical photovoltaic monitoring data, and corresponding historical power generation data. Based on this multimodal training feature matrix, a multi-input channel LSTM prediction model is constructed, outputting a pre-trained model that generalizes across regions. According to the real-time meteorological data of the target region, current photovoltaic monitoring data, and electricity price fluctuation curves, a dual-reward reinforcement learning strategy is used to update the pre-trained model online, outputting a dynamically optimized power prediction model. The current meteorological data and photovoltaic monitoring data are input into the dynamically optimized power prediction model to generate a photovoltaic power generation prediction sequence for a preset future time, thus achieving high-precision and highly adaptive photovoltaic power generation prediction.

[0242] This invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0243] Specifically, the aforementioned electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the aforementioned processor, and the input / output device is connected to the aforementioned processor.

[0244] Specifically, in this embodiment, the processor can be configured to perform the following steps via a computer program: S201, Based on historical meteorological data, historical photovoltaic monitoring data and corresponding historical power generation data, the multi-source time series data are aligned using a dynamic time warping algorithm to generate a spatiotemporally consistent multimodal training feature matrix, wherein the photovoltaic monitoring data includes photovoltaic panel temperature, surface dust coverage and module attenuation coefficient. S202, Based on the multimodal training feature matrix, a multi-input channel LSTM prediction model is constructed. A temporal convolutional network layer is embedded in the input gate of the LSTM to capture the periodic features of meteorological data. The data distribution of different regions is aligned through domain adversarial training, and a pre-trained model that generalizes across regions is output. S203, based on the real-time meteorological data, current photovoltaic monitoring data and electricity price fluctuation curve of the target area, the pre-trained model is updated online using a dual-reward reinforcement learning strategy. The first reward function is based on the error between the predicted power and the actual value, and the second reward function is based on the matching degree between the economic benefits of power generation and the load demand, outputting a dynamically optimized power prediction model. S204. Input the current meteorological data and photovoltaic monitoring data into the dynamically optimized power prediction model, and generate a photovoltaic power generation prediction sequence for the future preset time by dynamically weighting the feature contribution of different time steps through a spatiotemporal attention mechanism.

[0245] As can be seen, a spatiotemporally consistent multimodal training feature matrix is ​​generated based on historical meteorological data, historical photovoltaic monitoring data, and corresponding historical power generation data. Based on this multimodal training feature matrix, a multi-input channel LSTM prediction model is constructed, outputting a pre-trained model that generalizes across regions. According to the real-time meteorological data of the target region, current photovoltaic monitoring data, and electricity price fluctuation curves, a dual-reward reinforcement learning strategy is used to update the pre-trained model online, outputting a dynamically optimized power prediction model. The current meteorological data and photovoltaic monitoring data are input into the dynamically optimized power prediction model to generate a photovoltaic power generation prediction sequence for a preset future time, thus achieving high-precision and highly adaptive photovoltaic power generation prediction.

[0246] The above description, based on the embodiments shown in the figures, details the structure, features, and effects of the present invention. The above description is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified to have equivalent changes, that do not exceed the spirit covered by the specification and figures, should be within the protection scope of the present invention.

Claims

1. A method for predicting photovoltaic power generation by fusing multimodal data using LSTM, characterized in that, The method includes: Based on historical meteorological data, historical photovoltaic monitoring data and corresponding historical power generation data, a spatiotemporally consistent multimodal training feature matrix is ​​generated by aligning multi-source time-series data through a dynamic time warping algorithm. The photovoltaic monitoring data includes photovoltaic panel temperature, surface dust coverage, and module attenuation coefficient. Based on the multimodal training feature matrix, a multi-input channel LSTM prediction model is constructed. A temporal convolutional network layer is embedded in the input gate of the LSTM to capture the periodic features of meteorological data. The data distribution of different regions is aligned through domain adversarial training, and a pre-trained model that generalizes across regions is output. Based on real-time meteorological data, current photovoltaic monitoring data and electricity price fluctuation curves of the target area, the pre-trained model is updated online using a dual-reward reinforcement learning strategy. The first reward function is based on the error between the predicted power and the actual value, and the second reward function is based on the matching degree between the economic benefits of power generation and the load demand, outputting a dynamically optimized power prediction model. The current meteorological data and photovoltaic monitoring data are input into the dynamically optimized power prediction model. The feature contribution of different time steps is dynamically weighted through a spatiotemporal attention mechanism to generate a photovoltaic power generation prediction sequence for a future preset time.

2. The method according to claim 1, characterized in that, The process involves aligning multi-source time-series data using historical meteorological data, historical photovoltaic monitoring data, and corresponding historical power generation data through a dynamic time warping algorithm to generate a spatiotemporally consistent multimodal training feature matrix. The photovoltaic monitoring data includes photovoltaic panel temperature, surface dust coverage, and module attenuation coefficient, among other things. Based on the difference in sampling frequency between meteorological sensors and photovoltaic monitoring equipment, a sliding window adaptive interpolation algorithm is used to align timestamps and generate a raw time series dataset with a unified time reference. The original time series dataset is input into the dynamic time warping module to calculate the optimal time offset of the photovoltaic panel temperature, dust coverage rate and power generation sequence, and generate a phase-aligned time series feature vector. Based on phase-aligned temporal feature vectors, cross-modal correlation weights between meteorological data and monitoring data are extracted through a multimodal feature fusion network to generate a weighted fusion feature matrix; A spatiotemporal smoothing constraint is applied to the weighted fusion feature matrix, and a bidirectional LSTM is used to eliminate abrupt noise points, outputting a dimensionally regular multimodal training feature matrix.

3. The method according to claim 2, characterized in that, The process involves constructing a multi-input channel LSTM prediction model based on the multimodal training feature matrix, embedding a temporal convolutional network layer at the input gate of the LSTM to capture the periodic features of meteorological data, and aligning the data distribution across different regions through domain adversarial training to output a pre-trained model that generalizes across regions. The multimodal training feature matrix is ​​split into meteorological channels and monitoring channels according to data type. A temporal convolutional network layer is embedded in the meteorological channel to output a meteorological period tensor containing hourly, daily and weekly periodic features. The meteorological period tensor and the monitoring channel features are concatenated and then input into the LSTM unit. The weight ratio of the two types of features is dynamically adjusted through a gating fusion mechanism to generate a periodically enhanced temporal memory state. A domain adversarial training framework is constructed based on temporal memory states. The gradient reversal layer forces the LSTM hidden layer to output region-independent general features, generating domain-invariant feature vectors. The domain-invariant feature vectors are input into the fully connected prediction layer, and the power prediction loss function and the domain classification loss function are jointly optimized to output a preliminary cross-region generalization model. Knowledge distillation is performed on the preliminary cross-regional generalization model to remove region-specific parameters and output a lightweight pre-trained model.

4. The method according to claim 3, characterized in that, The pre-trained model is updated online using a dual-reward reinforcement learning strategy based on real-time meteorological data, current photovoltaic monitoring data, and electricity price fluctuation curves for the target area. The first reward function is based on the error between the predicted power and the actual value, and the second reward function is based on the matching degree between the economic benefits of power generation and load demand. The result is a dynamically optimized power prediction model, including: The pre-trained model is loaded as a reinforcement learning policy network, the environmental state is defined as a sliding window feature vector of real-time meteorological-monitoring data, and the action is the power prediction value adjustment amount. A first reward calculation module is constructed to generate a precision reward signal based on the root mean square error between the predicted power and the measured value, and to assign a weight coefficient of 3 times to the recent error. A second reward calculation module is constructed to generate an economic benefit reward signal by combining the matching degree between the electricity price curve and the load demand period, and the reward value is allocated according to the benefit gradient. We design a dual Q-network architecture to learn the Q-value functions of precision reward and economic reward respectively, and generate a comprehensive Q-value through dynamic weighted fusion to guide policy updates. A priority experience replay mechanism is introduced to store historical state-action-reward tuples, and the policy network parameters are periodically sampled and fine-tuned to output a dynamically optimized power prediction model.

5. The method according to claim 4, characterized in that, The process involves inputting current meteorological data and photovoltaic monitoring data into the dynamically optimized power prediction model, dynamically weighting the feature contribution at different time steps using a spatiotemporal attention mechanism, and generating a photovoltaic power generation prediction sequence for a preset future time, including: Real-time meteorological data and photovoltaic monitoring data are input into the dynamically optimized power prediction model. The time series features of the past hour are extracted through a sliding window to generate a standardized input tensor. Deploy a spatiotemporal attention module at the output of the LSTM hidden layer, calculate the attention weights in the time dimension and the feature dimension respectively, and generate a spatiotemporal attention weight matrix. The standardized input tensor is dynamically weighted and fused using a spatiotemporal attention weight matrix to suppress the influence of noisy time-segment features and generate an enhanced spatiotemporal feature vector. The spatiotemporal feature vector is input into the recursive prediction layer, and the power prediction value for the next 24 hours is generated iteratively at 15-minute intervals, outputting a high-precision time series prediction result.

6. An LSTM photovoltaic power generation prediction system integrating multimodal data, characterized in that, The system includes: The alignment module is used to align multi-source time-series data based on historical meteorological data, historical photovoltaic monitoring data and corresponding historical power generation data, and generate a spatiotemporally consistent multimodal training feature matrix through a dynamic time warping algorithm. The photovoltaic monitoring data includes photovoltaic panel temperature, surface dust coverage and module attenuation coefficient. The module is used to construct a multi-input channel LSTM prediction model based on the multimodal training feature matrix, embed a temporal convolutional network layer into the input gate of the LSTM to capture the periodic features of meteorological data, and align the data distribution of different regions through domain adversarial training to output a pre-trained model that generalizes across regions. The optimization module is used to update the pre-trained model online using a dual-reward reinforcement learning strategy based on real-time meteorological data, current photovoltaic monitoring data and electricity price fluctuation curve of the target area. The first reward function is based on the error between the predicted power and the actual value, and the second reward function is based on the matching degree between the economic benefits of power generation and the load demand, and outputs a dynamically optimized power prediction model. The prediction module is used to input the current meteorological data and photovoltaic monitoring data into the dynamically optimized power prediction model, and generate a photovoltaic power generation prediction sequence for the future preset time by dynamically weighting the feature contribution of different time steps through a spatiotemporal attention mechanism.

7. The system according to claim 6, characterized in that, The process involves aligning multi-source time-series data using historical meteorological data, historical photovoltaic monitoring data, and corresponding historical power generation data through a dynamic time warping algorithm to generate a spatiotemporally consistent multimodal training feature matrix. The photovoltaic monitoring data includes photovoltaic panel temperature, surface dust coverage, and module attenuation coefficient, among other things. Based on the difference in sampling frequency between meteorological sensors and photovoltaic monitoring equipment, a sliding window adaptive interpolation algorithm is used to align timestamps and generate a raw time series dataset with a unified time reference. The original time series dataset is input into the dynamic time warping module to calculate the optimal time offset of the photovoltaic panel temperature, dust coverage rate and power generation sequence, and generate a phase-aligned time series feature vector. Based on phase-aligned temporal feature vectors, cross-modal correlation weights between meteorological data and monitoring data are extracted through a multimodal feature fusion network to generate a weighted fusion feature matrix; A spatiotemporal smoothing constraint is applied to the weighted fusion feature matrix, and a bidirectional LSTM is used to eliminate abrupt noise points, outputting a dimensionally regular multimodal training feature matrix.

8. The system according to claim 7, characterized in that, The process involves constructing a multi-input channel LSTM prediction model based on the multimodal training feature matrix, embedding a temporal convolutional network layer at the input gate of the LSTM to capture the periodic features of meteorological data, and aligning the data distribution across different regions through domain adversarial training to output a pre-trained model that generalizes across regions. The multimodal training feature matrix is ​​split into meteorological channels and monitoring channels according to data type. A temporal convolutional network layer is embedded in the meteorological channel to output a meteorological period tensor containing hourly, daily and weekly periodic features. The meteorological period tensor and the monitoring channel features are concatenated and then input into the LSTM unit. The weight ratio of the two types of features is dynamically adjusted through a gating fusion mechanism to generate a periodically enhanced temporal memory state. A domain adversarial training framework is constructed based on temporal memory states. The gradient reversal layer forces the LSTM hidden layer to output region-independent general features, generating domain-invariant feature vectors. The domain-invariant feature vectors are input into the fully connected prediction layer, and the power prediction loss function and the domain classification loss function are jointly optimized to output a preliminary cross-region generalization model. Knowledge distillation is performed on the preliminary cross-regional generalization model to remove region-specific parameters and output a lightweight pre-trained model.

9. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method of any one of claims 1-5 when it is run.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method of any one of claims 1-5.

Citation Information

Patent Citations

  • Ultra-short-term photovoltaic power prediction method based on small-scale weather classification and adaptive window

    CN119026731A

  • Ultra-short-term photovoltaic power combined prediction method based on multivariate meteorological data

    CN120767787A

  • Real time predicting system for energy management system using machine learning

    KR101761686B1

  • Beam climber friction monitoring system

    KR1020220015949A

  • Systems and methods for sepsis detection and monitoring

    US20210052218A1

Cited By

  • Method and device for predicting health state of migration across hydroelectric generating set

    CN121256611A

  • A health state prediction method and device for cross hydroelectric generator migration

    CN121256611B

  • Deep learning electric vehicle load prediction method combined with future information guidance

    CN121684156A

  • Photovoltaic output smooth regulation and control method, system, equipment and medium

    CN121689302A

  • Oil and gas block evaluation method and system based on two-factor model, and storage medium

    CN121958916A