An interpretable photovoltaic power ultra-short-term prediction method and system
By constructing the spatiotemporal feature fusion network STF2Net and the improved Hippo Optimization Algorithm EHOA, combined with interpretability analysis methods, the problem of multi-source feature fusion and hyperparameter optimization in ultra-short-term photovoltaic power prediction was solved, achieving high-precision and transparent prediction results and supporting real-time scheduling of photovoltaic power plants.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LANZHOU UNIVERSITY OF TECHNOLOGY
- Filing Date
- 2026-06-17
- Publication Date
- 2026-07-14
Smart Images

Figure CN122393923A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic power generation prediction technology, and more specifically to an interpretable method and system for ultra-short-term photovoltaic power prediction. Background Technology
[0002] Driven by the global goals of decarbonizing and promoting sustainable development in the energy system, the transformation of the energy structure to be dominated by renewable energy is accelerating. Photovoltaic power generation, as a clean and sustainable energy form, is seeing its share in the energy mix continue to rise. However, because the output power of photovoltaic power generation is significantly affected by meteorological conditions such as sunlight intensity and ambient temperature, its output characteristics exhibit obvious intermittency and volatility. This unstable power output characteristic not only poses greater challenges to the power system in terms of operation scheduling, power balance, and safe and stable control, but also places higher demands on the reliable operation of the system under a high proportion of photovoltaic grid connection. Therefore, developing high-precision photovoltaic power prediction technology has become a key research direction for improving the operating efficiency of the power system and promoting the consumption of renewable energy.
[0003] Photovoltaic power forecasting can be categorized by time scale into ultra-short-term forecasting (15 minutes to 4 hours), short-term forecasting (4 hours to 3 days), medium-term forecasting (3 days to 1 month), and long-term forecasting (more than 1 month). Ultra-short-term forecasting primarily focuses on intraday operation optimization and real-time dispatching of power systems, and its results directly impact system operation decisions. Currently, research methods for ultra-short-term forecasting mainly include physical methods, statistical methods, and data-driven approaches.
[0004] The physical method is based on the physical conversion mechanism of photovoltaic power generation and meteorological principles to construct a predictive model. Its core is to systematically calculate the theoretical output of the photovoltaic system by quantifying the physical relationship between solar irradiance, photovoltaic module characteristics, and environmental factors. This method has clear physical meaning and good interpretability, but it relies on a large amount of high-precision field data. The acquisition cost of this data is high, and some key parameters are difficult to measure accurately in real time, which significantly limits its feasibility in practical applications.
[0005] Statistical methods, based on statistical principles, extract periodic and trend-like patterns from time-series data such as historical power and meteorological factors through mathematical analysis. This allows for the establishment of a statistical mapping relationship between input variables and output power for prediction. Compared to physical methods, statistical methods are more intuitive and simpler; however, their inherent linear assumptions limit their ability to capture complex nonlinear relationships in multivariate input time series.
[0006] The core advantage of data-driven methods lies in their ability to directly learn the implicit mapping relationship between meteorological factors, spatiotemporal characteristics, and output power from massive historical data through powerful automatic feature extraction and complex nonlinear modeling, without relying on precise power plant physical parameters or complex numerical weather simulation processes. Based on this characteristic, this method provides a new technical path for photovoltaic power prediction by constructing a multi-level feature learning architecture, effectively mining and characterizing the deep temporal and spatial dependencies affecting photovoltaic output. Among them, methods such as Convolutional Neural Networks (CNN), Long Short-Term Memory (LSTM), and Attention Mechanisms are widely used in photovoltaic power prediction research due to their excellent performance in handling spatiotemporal sequences and feature correlations. However, a single model often struggles to simultaneously address the modeling needs of local feature extraction and global temporal dependencies. Therefore, hybrid architectures combining multiple models have become the main development trend in prediction research.
[0007] In the current research, hybrid models significantly improve the performance of photovoltaic power prediction by integrating the advantages of different architectures. Furthermore, systematic hyperparameter optimization is considered a key approach to unlocking the model's potential. Hyperparameters, as crucial configurations for the model's learning process and generalization ability, directly impact prediction accuracy and robustness when set appropriately. Early hyperparameter optimization relied primarily on manual configuration based on researchers' experience, but this method is inefficient and lacks reproducibility. To overcome this limitation, automated methods such as grid search and random search have been introduced, improving the standardization of the optimization process through systematic parameter sampling. However, these methods still exhibit insufficient computational efficiency when dealing with high-dimensional parameter spaces. Therefore, researchers have turned to metaheuristic optimization algorithms, which, by simulating natural phenomena or swarm intelligence, can efficiently explore complex hyperparameter spaces within acceptable computational costs.
[0008] Therefore, there is currently a lack of a photovoltaic power ultra-short-term prediction method that can effectively integrate multi-source spatiotemporal features, adaptively optimize model hyperparameters, and has interpretability. Summary of the Invention
[0009] To achieve the above objectives, the present invention adopts the following technical solution:
[0010] In a first aspect, embodiments of the present invention provide an interpretable method for ultra-short-term photovoltaic power prediction, comprising the following steps: S1. Obtain historical power data and corresponding meteorological data of photovoltaic power plants, and obtain a dataset after preprocessing; S2. Construct a spatiotemporal feature fusion network STF2Net, which includes parallel spatial and temporal branches; wherein, the spatial branch includes a dynamic feature selection module and a feature fusion module, and the temporal branch includes two BisLSTMs; S3. Train the spatiotemporal feature fusion network STF2Net based on the dataset, and use the improved hippo optimization algorithm EHOA to adaptively optimize the hyperparameters of STF2Net to obtain the optimal hyperparameter combination; wherein, the EHOA initializes the population through sinusoidal perturbation Logistic chaotic mapping, updates the position of male hippos using an adaptive decreasing weight strategy, and updates the position of predators using a multi-source collaborative predator update mechanism. S4. Obtain real-time meteorological data for the time to be predicted and input it into the trained STF2Net to obtain the ultra-short-term photovoltaic power prediction results. S5. The predictive results are analyzed for interpretability using Pearson correlation coefficient (PCC) and Shapley additive interpretation (SHAP) to quantify the contribution of each input feature to the predictive results.
[0011] In a second aspect, embodiments of the present invention provide an interpretable photovoltaic power ultra-short-term prediction system, which applies the method described in the first aspect embodiment. The system includes: The data preprocessing module is used to acquire historical power data and corresponding meteorological data of photovoltaic power plants, and obtain the dataset after preprocessing. The model building module is used to build the spatiotemporal feature fusion network STF2Net, which includes parallel spatial and temporal branches; wherein, the spatial branch includes a dynamic feature selection module and a feature fusion module, and the temporal branch includes two BisLSTMs; The model training module is used to train the spatiotemporal feature fusion network STF2Net based on the dataset, and to adaptively optimize the hyperparameters of STF2Net using the improved hippo optimization algorithm EHOA to obtain the optimal hyperparameter combination. Specifically, EHOA initializes the population through sinusoidal perturbation Logistic chaotic mapping, updates the position of male hippos using an adaptive decreasing weight strategy, and updates the position of predators using a multi-source collaborative predator update mechanism. The prediction module is used to obtain real-time meteorological data for the time to be predicted and input it into the trained STF2Net to obtain ultra-short-term photovoltaic power prediction results. The interpretability analysis module is used to perform interpretability analysis on the prediction results using Pearson correlation coefficient (PCC) and Shapley additive interpretation (SHAP).
[0012] This invention proposes an interpretable STF2Net model based on EHOA, and uses ultra-short-term photovoltaic power generation data as the research object to comprehensively verify the model's prediction accuracy, robustness, and interpretability, providing an efficient and interpretable technical solution for photovoltaic power prediction. The beneficial effects include at least: (1) Design a spatio-temporal feature fusion network (STF2Net). The network adopts a dual-branch parallel architecture to extract and fuse multi-source features from the spatial and temporal dimensions respectively. The spatial branch captures multi-scale features through a dynamic feature selection module and a feature fusion module, while the temporal branch uses a bidirectional scalar long short-term memory network (BisLSTM) to mine long-term dependencies in the sequence.
[0013] (2) To address the problem that the Hippopotamus Optimization Algorithm (HOA) is prone to getting trapped in local optima and has limited global exploration capabilities when solving complex optimization problems, this invention makes improvements in three aspects. First, a sinusoidal perturbation Logistic chaotic mapping is used to improve the uneven initial spatial distribution of the original Hippopotamus Optimization Algorithm. Second, an adaptive decreasing weight strategy is introduced to enable the algorithm to maintain strong exploration capabilities in the early stages of iteration and enhance local exploration accuracy in the later stages. Finally, a predator position update strategy based on multi-source collaboration is introduced to help the population escape local optima.
[0014] (3) Given the presence of missing and outlier values in the original meteorological and photovoltaic power data, directly using these data for prediction would affect the accuracy of the results. Therefore, this invention first removes data with zero power output when photovoltaic power generation is not at night, and then uses outlier detection (RSD) on the remaining data. Simultaneously, for missing values, this invention uses linear interpolation to fill in the missing values to ensure the integrity and accuracy of the data.
[0015] (4) To enhance the interpretability of the model, this invention uses the Pearson Correlation Coefficient (PCC) to perform linear correlation analysis on the input features and power, identifying key influencing factors. Based on this, Shapley Additive Explanations (SHAP) are further introduced to quantify the global contribution and local specific impact of each feature from the model's internal mechanisms. This dual validation method makes the prediction results physically interpretable, significantly improving the model's credibility and transparency in practical applications. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0017] Figure 1 This is a flowchart of the interpretable photovoltaic power ultra-short-term prediction method provided in the embodiments of the present invention.
[0018] Figure 2 This is a diagram of the STF2Net model structure provided in the embodiments of the present invention.
[0019] Figure 3 This is a structural diagram of the dynamic feature selection module provided in an embodiment of the present invention.
[0020] Figure 4 This is a structural diagram of the multi-head attention mechanism provided in an embodiment of the present invention.
[0021] Figure 5 This is a structural diagram of the feature fusion module provided in an embodiment of the present invention.
[0022] Figure 6 This is a diagram of the sLSTM structure provided in an embodiment of the present invention.
[0023] Figure 7 This is a diagram of the BisLSTM structure provided in an embodiment of the present invention.
[0024] Figure 8 The following is the EHOA algorithm flow provided in the embodiments of the present invention.
[0025] Figure 9 This is the overall flowchart of EHOA-STF2Net provided in the embodiments of the present invention.
[0026] Figure 10a This is a convergence curve diagram of the F1-F4 optimization algorithm provided in the embodiments of the present invention.
[0027] Figure 10b This is a convergence curve of the F5-F8 optimization algorithm provided in this embodiment of the invention.
[0028] Figure 11a This is a comparison chart of the ablation experiment predictions for the next 12 hours provided in this embodiment of the invention.
[0029] Figure 11b This is an enlarged view of part A in the comparison chart of ablation experiments predicting the next 12 hours provided in this embodiment of the invention.
[0030] Figure 12 This is a comparison chart of the predictions for the next 12 hours from the mainstream models provided in this embodiment of the invention.
[0031] Figure 13 This is an enlarged view of section B in the comparison chart of the mainstream models' predictions for the next 12 hours provided in this embodiment of the invention.
[0032] Figure 14 This is a heatmap of the Pearson correlation coefficient provided in an embodiment of the present invention.
[0033] Figure 15 The SHAP bar chart and swarm diagram provided in the embodiments of the present invention. Detailed Implementation
[0034] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0035] Example 1: like Figure 1 As shown in the figure, this invention discloses an interpretable method for ultra-short-term photovoltaic power prediction, comprising the following steps: S1. Obtain historical power data and corresponding meteorological data of photovoltaic power plants, and obtain a dataset after preprocessing. The preprocessing includes at least: removing power data with zero power at night from the historical power data; using the rolling standard deviation method to detect and remove outliers in the remaining data; using the linear interpolation method to fill in the missing values generated after outlier removal; and normalizing the filled data to improve data quality and the stability of model training.
[0036] S2. Construct a spatiotemporal feature fusion network STF2Net, which includes parallel spatial and temporal branches. The spatial branch includes a dynamic feature selection module and a feature fusion module, and the temporal branch includes two BisLSTMs. The spatial branch is used to extract and fuse multi-scale spatial features, and the temporal branch is used to capture bidirectional long-term dependencies in the sequence. The two are processed in parallel and then fused to achieve deep integration of spatiotemporal features.
[0037] S3. The spatiotemporal feature fusion network STF2Net is trained based on the dataset, and the hyperparameters of STF2Net are adaptively optimized using the improved hippo optimization algorithm EHOA to obtain the optimal hyperparameter combination. EHOA initializes the population using a sinusoidal perturbation logistic chaotic mapping, updates the position of male hippos using an adaptive decreasing weight strategy, and updates the predator position using a multi-source collaborative predator update mechanism. Through the above three improvement strategies, EHOA improves the uniformity of the initial population distribution, balances the global exploration and local exploitation capabilities, and enhances the ability to escape local optima, thereby efficiently searching for the hyperparameter combination that optimizes the model's prediction performance.
[0038] S4. Obtain real-time meteorological data for the time to be predicted and input it into the trained STF2Net to obtain the ultra-short-term photovoltaic power prediction results. The training process uses optimized learning rate, batch size and number of multi-head attention heads, so that the model is better than the unoptimized network in terms of convergence speed and prediction accuracy.
[0039] S5. The Pearson correlation coefficient (PCC) and Shapley additive interpretation (SHAP) are used to perform interpretability analysis on the prediction results, quantifying the contribution of each input feature to the prediction results. Among them, PCC is used to reveal the linear correlation between features and power, and SHAP is used to quantify the global and local marginal contributions of features. Together, they verify the consistency between the model prediction mechanism and the physical laws of photovoltaic power generation, and improve the credibility and transparency of the prediction results.
[0040] This invention achieves deep decoupling and efficient fusion of spatiotemporal features through the parallel dual-branch architecture of STF2Net, significantly improving the accuracy and stability of ultra-short-term photovoltaic power prediction. An improved Hippo optimization algorithm is used to adaptively optimize hyperparameters, effectively avoiding the blindness of manual parameter tuning, resulting in faster model convergence and lower prediction errors. Preprocessing operations such as removing zero values at night, anomaly detection, and linear interpolation significantly improve data quality and enhance the model's generalization robustness. Combining Pearson correlation coefficient and SHAP interpretation methods, the physical consistency between input features and prediction results is revealed from the dual perspectives of linear correlation and nonlinear marginal contribution, giving the prediction process good interpretability and credibility, and providing transparent and reliable technical support for real-time scheduling of photovoltaic power plants and safe grid operation.
[0041] The following is a detailed description of the interpretable photovoltaic power ultra-short-term prediction method of the present invention: I. Spatio-Temporal Feature Fusion Network (STF2-Net) Model: The STF2Net model consists of a spatial branch and a temporal branch. The spatial branch includes a dynamic feature selection module and a feature fusion module, used to capture and fuse multi-scale features. The temporal branch utilizes two BisLSTMs to capture long-term dependencies and contextual features. The STF2Net model structure diagram is shown below. Figure 2 As shown, the processed data is first fed into the spatial and temporal branches in parallel. The spatial branch captures multi-scale features through a dynamic feature selection module, and then the extracted features are efficiently integrated through a feature fusion module. The temporal branch uses a bidirectional scalar long-term memory network to capture the long-term dependencies of the time series. Finally, the two branches are output through a fully connected layer.
[0042] 1. Spatial branching: The spatial branch includes a dynamic feature selection module and a feature fusion module. The dynamic feature selection module dynamically captures multi-scale features, while the feature fusion module performs deep feature fusion and enhancement.
[0043] (1) Dynamic feature selection module: To address the non-stationary nature of photovoltaic power series by mining multi-scale features, this module designs a mechanism for collaboratively extracting local fluctuations and global dependencies. This mechanism combines the advantages of convolution in multi-scale modeling with the global information aggregation capabilities of attention mechanisms, ultimately achieving efficient representation of complex time series patterns. The module structure diagram is shown below. Figure 3 As shown.
[0044] In the feature extraction module, a one-dimensional convolutional layer with a kernel of 9 is first used to extract local features from the photovoltaic input sequence to capture broader contextual information and avoid the loss of long-term dependencies in the sequence due to limited receptive fields in early network layers. Then, max pooling is used to downsample, effectively suppressing noise and reducing model computational complexity. Subsequently, the features are fed into a three-parallel branch structure. Each branch first integrates and reduces the dimensionality of the feature channels using a 1×1 convolution; then, dilated convolutions with kernels of 3, 5, and 7 are used respectively to extract multi-scale contextual information under different receptive fields. The relevant formulas are as follows: ; ; ; ; ; ; Where x is a meteorological characteristic, (i=1,2,…12) represents the output feature of the i-th operation layer, where i is the index of the output feature, and MaxPool is the max pooling algorithm. It is a convolution operation with kernel j.
[0045] Based on this, the present invention introduces a multi-head attention mechanism, such as... Figure 4 As shown, the outputs of the three branches will be... , and These are mapped to the query (Q), key (K), and value (V) in attention computation, respectively. This mechanism uses multiple parallel attention heads to map features to different subspaces, thereby simultaneously learning multiple dependency patterns. Each head dynamically calculates attention weights based on the similarity between the query and key, and uses these weights to weight and fuse the value vectors, ultimately integrating the outputs of all attention heads. The relevant formulas for the multi-head attention mechanism are as follows: ; ; ; ; Where k is the dimension of the key matrix, It is a function for calculating the attention mechanism. It is the number of hidden units. 'h' represents the dimension of the attention heads, where 'h' is the number of heads in a multi-head attention system. , and These are trainable linear transformation matrices. , and These are the query matrix, key matrix, and value matrix corresponding to the i-th head number, respectively. It is the output mapping matrix. It is the final multi-head attention fusion feature. It is the output of the i-th attention head, T is the matrix transpose, concat(.) is the concatenation operation, i is the index of the number of attention heads, and Softmax(.) is the normalized exponential function.
[0046] (2) Feature fusion module: In the dynamic feature selection module, while the parallel structure of the multi-head attention mechanism enhances the model's expressive power, it also introduces the dual limitations of information dispersion and channel isolation. To address this, this invention further designs a feature fusion module, which combines local convolutional fusion with global pooling aggregation to achieve efficient integration of attention features, thereby promoting information flow and enhancing semantic representation.
[0047] The feature fusion module structure diagram is as follows: Figure 5As shown, in the feature fusion module, firstly, a convolution with a kernel of 1 is used to perform channel compression and linear fusion on the output features of the multi-head attention mechanism to enhance the compactness of the features and improve their non-linear expressive power. Based on this, to alleviate the gradient decay and information degradation problems that may occur in deep feature fusion, this invention further introduces a residual block structure. This structure constructs feature reuse paths through cross-layer connections, promoting effective gradient propagation while achieving progressive fusion of multi-scale features. Within the residual block, two convolutions and batch normalization operations improve training stability and feature extraction capabilities. Finally, global average pooling is used to compress the features to extract global statistical features while significantly reducing the number of model parameters. The relevant formulas are as follows: ; ; ; ; ; Where ReLU is the activation function, BN is batch normalization, and globalAveragePool is global average pooling.
[0048] 2. Time Branches: The time branch consists of two BisLSTMs.
[0049] To improve the efficiency of parameter updates in long sequence prediction tasks, Scalar LSTM (sLSTM) introduces exponential gating techniques to enhance the model's stability and accuracy when processing long sequences, such as... Figure 6 As shown. This method introduces exponential activation functions into the input and forget gates, enabling the network to perform dynamic parameter updates more effectively, thereby better capturing feature dependencies in long sequences. Furthermore, sLSTM incorporates a novel storage hybrid mechanism that integrates normalization and stabilization techniques, further mitigating the vanishing and exploding gradient problems and improving the robustness of model training. The following formula describes the update rule of sLSTM: ; ; ; ; ; ; ; in, These are the current cell state parameters. These are the cell state parameters from the previous moment. , , and These represent the states of cell input, input gate, forget gate, and output gate, respectively. , , and These are the linear outputs of the cell input, input gate, forget gate, and output gate, respectively. and These are the current hidden state and the current candidate hidden state, respectively. , , and These are the weight matrices corresponding to cell input, input gate, forget gate, and output gate, respectively. , , and These correspond to the hidden state. And the recurrent weights between cell input, input gate, forget gate and output gate, , , and These are the biases corresponding to the unit input, input gate, forget gate, and output gate, respectively. It is the activation function for the hidden state. It is a normalized state that preserves the product of the input gate and all future forget gates. It is the normalized state of the previous moment. It is the sigmoid activation function, and t is the time index.
[0050] Since the exponential activation function may cause overflow or outliers, additional states are introduced. To stabilize the output of the gate structure, the corresponding calculation formula is shown below: ; ; ; in, It is the additional state at time t. It represents the additional state at time t-1, and the max function is the maximum value function. and They are respectively by Stable input gate and forget gate.
[0051] However, sLSTM can only utilize forward temporal dependencies and cannot capture contextual features of future time steps. Therefore, this invention proposes BisLSTM, such as... Figure 7 As shown, BisLSTM achieves bidirectional dynamic modeling of the input sequence by simultaneously introducing forward and backward sLSTM layers, thereby fully capturing the long-term dependencies of the photovoltaic power sequence. Specifically, the forward sLSTM layer processes the input sequence in chronological order, while the backward sLSTM layer processes it in reverse order, generating corresponding hidden state sequences. Finally, by fusing the forward and backward hidden states, a comprehensive temporal representation containing both past and future information is formed.
[0052] The relevant formulas for BisLSTM are as follows: ; ; ; in, It is the hidden state of history at time t. It is the hidden state at time t. It is the hidden state of history at time t-1. It is the hidden state at time t-1. It is the hidden state obtained by concatenating the historical hidden state and the future hidden state at time t. It is a forward sLSTM unit function. It is the inverse sLSTM unit function. It is the input feature vector at time t.
[0053] II. Improved Hippopotamus Optimization Algorithm (EHOA): The Hippopotamus Optimization Algorithm (HOA) is a novel metaheuristic optimization algorithm inspired by the behavior of hippos in their natural environment. Its core idea is to simulate the cooperative and individual adaptive behavior of hippo groups and to approximate the optimal solution by iteratively updating the individual positions.
[0054] However, in the original hippo optimization algorithm, the initial random population distribution is uneven, the male hippo position update relies excessively on the current optimal solution, the exploration ability is insufficient, and the predator position randomness is insufficient, making it unsuitable for the search requirements of complex problems. To enhance the original hippo optimization algorithm, this invention proposes the following improvements, such as... Figure 8As shown in the figure, on the left side of the figure is the iterative search and optimization process of the Hippopotamus algorithm, which intuitively presents the position update logic of the algorithm: the central blue hippopotamus is the hippopotamus leader, representing the optimal individual of the current population and the core reference for population position update; the yellow hippopotamus below is the predator, which affects the position update of the female hippopotamus through a multi-source collaborative strategy; the hippopotamuses of different colors around correspond to the male and female individuals in the population. Through behavior logics such as "leading" and "escaping", combined with the three core improvement strategies of this invention, the population evolution is completed, and finally the global optimal solution is searched. This figure and the pseudocode process confirm each other, completely reflecting the improved design and execution logic of the EHOA algorithm, and providing clear algorithm support for the efficient and global optimization of the hyperparameters of the STF2Net model.
[0055] On the right side is the overall implementation flowchart, and the specific execution process is as follows: First, input the algorithm parameters, including the population size N, the dimension m of the optimization problem, and the maximum number of iterations T, and initialize the hippopotamus population using the sine perturbation Logistic chaotic mapping proposed in this invention to improve the problem of uneven distribution of the initial population and enhance population diversity; then enter the main loop of iterative search and optimization. Under the condition that the number of iterations t < T, first update the position of the hippopotamus leader according to the objective function value, and then complete the population position update in three stages: In the first stage, traverse the male hippopotamus individuals in the first half of the population (i = 1:N / 2), and use the adaptive decreasing weight strategy to calculate and update the individual positions to balance the global exploration and local development capabilities of the algorithm; in the second stage, traverse the female hippopotamus individuals in the second half of the population (i = 1 + N / 2:N), and use the multi-source collaborative predator update strategy to generate the predator position, and calculate and update the individual positions based on this to help the population jump out of the local optimum; in the third stage, traverse all N hippopotamus individuals to complete the global position correction; in each iteration, synchronously save the best candidate solution found so far until the iteration reaches the maximum number of times T, and finally output the optimal solution corresponding to the objective function, that is, the optimal hyperparameter combination of the STF2Net model.
[0056] (1)Sine perturbation Logistic chaotic mapping The original Hippopotamus optimization algorithm uses a random initialization method to generate the initial population. This method is prone to uneven distribution of individuals in the search space, reducing population diversity, and thus affecting the global search ability and convergence speed of the algorithm. To improve the distribution characteristics of the initial population, the sine perturbation Logistic chaotic mapping is introduced for initialization. Its mathematical formula is as follows: ; In the formula, n is the current iteration number, is the state value of the (n + 1)th time, is the state value of the nth time, is the control parameter, is the sine perturbation coefficient, Pi is the mathematical constant of a circle, and sin(.) is the sine function.
[0057] (2) Adaptive decreasing weight strategy In the original algorithm, the male hippopotamus's position update often relies excessively on the current optimal solution, causing it to rapidly converge to a local optimum in the early stages of iteration, thus weakening its ability to explore other regions of the solution space. To address this, this invention introduces an adaptive decreasing weight strategy. This strategy maintains a large weight in the early stages of iteration, allowing the current position to dominate the update process, and enhances global exploration capabilities in conjunction with a perturbation term. As iterations progress, the weight gradually decreases, and the algorithm gradually shifts towards relying on population guidance information for a more refined search. Through this mechanism, the adaptive decreasing weight effectively balances global exploration and local exploitation, alleviating the premature convergence problem, and thus improving the overall solution accuracy and efficiency of the algorithm. The update formula is as follows: ; ; in, It is the position vector of a male hippopotamus. Let be the positional component of the i-th male hippopotamus in the j-th dimension, where i is the index of the number of hippos and j is the dimension index. It is the weight of the hippopotamus's leadership position. It is a random number between 0 and 1. , It is the component of the i-th hippopotamus at the j-th dimension. These are adaptive decreasing weights; a=0.9 and b=0.2 are coefficients. t is the maximum number of iterations, and t is the current number of iterations.
[0058] (3) Multi-source collaborative predator renewal mechanism The original predator position generation mechanism uses a fixed mathematical model and fixed parameter settings, which cannot be correlated with state information such as the number of iterations and population diversity, lacking adaptive adjustment capabilities. Furthermore, this mechanism relies solely on the current optimal individual and a random vector, lacking effective utilization of population distribution information. When the optimal individual gets trapped in a local optimum, the predator position is also limited, making it difficult to guide the population out of local optima. To address these issues, this invention reconstructs the predator position generation mechanism. The new predator position is jointly determined by the hippopotamus position, the hippopotamus leader position, and a random vector, each assigned a linear decay coefficient. This ensures the predator's influence remains strong in the early stages of iteration to promote global exploration, while gradually weakening in later stages to reduce interference with the convergence process. This change improves the adaptability and diversity of predator behavior, ultimately enhancing the algorithm's robustness and convergence accuracy when handling complex optimization problems. The updated formula is as follows: ; ; in, It is the predator's position vector. j It is the predator position component in the j-th dimension, where j is the dimension index. It is a random vector between 0 and 1. and These are the coefficients of the hippopotamus positional component and the hippopotamus leader positional component, respectively. c=0.5 and d=0.3 are the correlation coefficients.
[0059] To further illustrate the technical effects of this invention, the prediction performance is analyzed below through specific examples and corresponding evaluation indicators: This invention uses a photovoltaic power station in northern China as the research object. Meteorological inputs include temperature, solar azimuth angle, solar zenith angle, cloud cover, dew point temperature, diffuse horizontal irradiance (DHI), direct normal irradiance (DNI), global horizontal irradiance (GHI), global tilted irradiance (GTI), tracking tilted irradiance (TTI), atmospheric precipitable water, humidity, snow depth, surface air pressure, wind direction, and wind speed. Data coverage extends from January 1, 2019 to December 31, 2019, with 15-minute intervals.
[0060] Because the output power of photovoltaic power plants is limited by solar irradiance conditions, their theoretical output power is zero at night when there is a lack of effective irradiance input. Such zero-power data is difficult to characterize the actual mapping relationship between meteorological factors and power generation output. Therefore, in the data preprocessing stage, this invention first removes all samples with zero output power, retaining only the power data during the daytime period for subsequent analysis.
[0061] In real-world operating environments, photovoltaic power acquisition data inevitably contains noise and abnormal fluctuations due to factors such as sensor accuracy, communication errors, and external disturbances. If left untreated, these will affect the generalization performance of the prediction model. Therefore, this invention introduces the Rolling Standard Deviation (RSD) method to detect and remove outliers.
[0062] The relevant formulas are as follows: ; In the formula, N=7 is the length of the sliding time window. The average value of the feature values within the window. This characterizes the degree of feature dispersion, where i is the index of the data within the window. This represents the i-th data point within the sliding window.
[0063] After outlier removal, discrete missing points will remain in the original time series. To ensure the continuity of the time series and provide complete input for subsequent time series prediction models, this invention further imputes the missing data. Considering that photovoltaic output power typically exhibits strong continuity over short timescales, this invention employs a linear interpolation method to reconstruct the missing values. This method uses a linear transition based on adjacent valid data points, minimizing interference with the original data distribution characteristics while maintaining sequence continuity.
[0064] ; In the formula, and They are located in time and ( < Two adjacent valid data points, It is a missing moment ( < < The power value of ).
[0065] After data cleaning and imputation, all valid data were divided into training and test sets in a 7:3 ratio. Improving data quality laid a more reliable foundation for model training, thereby enhancing model stability and the accuracy of final predictions.
[0066] To evaluate the experimental results of this invention, mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination (R²) were selected as performance evaluation indicators, and the specific formulas are as follows: ; ; ; Where i is the sample index. Let be the true value of the photovoltaic power of the i-th sample. Let be the predicted value of the photovoltaic power for the i-th sample. This represents the average of the actual photovoltaic power values. This represents the number of samples.
[0067] The following section provides a further explanation of EHOA-STF2Net in conjunction with the interpretability prediction framework of this invention.
[0068] 1. STF2Net model hyperparameter optimization: To address the hyperparameter tuning problem in STF2Net, this invention uses EHOA to dynamically optimize hyperparameter combinations, which improves the efficiency and performance of intelligent search during STF2Net training. Table 1 shows the pseudocode for hyperparameter optimization using EHOA.
[0069] Table 1: EHOA-STF2Net Pseudocode
[0070] 2. Interpretability analysis: Due to the inherent "black box" nature of deep learning models, their prediction process is difficult to interpret intuitively, which limits their application in the stable operation of photovoltaic systems to some extent. To improve the interpretability of the model, this invention conducts research from two dimensions: data statistical relationships and model learning behavior, aiming to systematically verify the interpretability of the proposed model.
[0071] (1) Pearson correlation coefficient: To quantify the linear correlation between input characteristics and photovoltaic power output, this invention employs the Pearson Correlation Coefficient (PCC) for correlation analysis. It is defined as the ratio of the product of the covariance and standard deviation of two variables, calculated as follows: ; in, and Let represent the sample values of the i-th feature and the power, respectively, where i is the sample index. and These are the sample means of the features and the power, respectively, where n is the sample size. .
[0072] (2) SHAP (SHapley Additive exPlanations): To further explain the prediction mechanism of deep learning models, this invention employs the SHAP (SHapley Additive exPlanations) framework based on cooperative game theory for post-hoc attribution analysis. SHAP values quantify the contribution of each feature in a specific prediction sample; its core lies in calculating the mean marginal contribution of that feature when added to all possible feature subsets, thereby ensuring the fairness and consistency of contribution allocation.
[0073] The relevant formulas are as follows: ; In the formula, This represents the mean of all samples. Let be the SHAP value of the i-th feature, reflecting the contribution of this feature to the prediction result of the current sample, and M be the feature summary. This represents the predicted output value of the STF2Net model for the input feature vector x.
[0074] 3. Power prediction process: like Figure 9 As shown, rolling standard deviation analysis is first performed on historical photovoltaic (PV) data and meteorological observation data to eliminate outliers. Simultaneously, missing values are filled using linear interpolation to restore the continuity of the time series. Then, each input variable is normalized to maintain the same units and improve the stability of model training, thereby generating a normalized PV time series that can be directly used for modeling. The test set is then input into EHOA-STF2Net to capture long-term dependencies in the time series for accurate PV power prediction. EHOA is used to automatically select the hyperparameter combination that achieves the best overall performance for STF2Net, enabling the model to maintain strong generalization ability.
[0075] Furthermore, this invention provides interpretability analysis at the prediction result level. On one hand, SHAP is used to quantify the marginal contribution of each input feature in the model prediction, revealing the promoting or inhibiting effects of different meteorological variables on the prediction results through positive and negative SHAP values. On the other hand, the Pearson correlation coefficient is used to measure the degree of linear correlation between input features and photovoltaic power, providing statistical support for the verification of SHAP analysis results. Through the global and local interpretation of SHAP, and the statistical support of the correlation coefficient, the sensitivity and dependence of the model on different features can be fully revealed, thereby improving the transparency and credibility of the prediction model.
[0076] The following is an analysis of the EHOA experiment: 1. Comparative experiment with other metaheuristic algorithms To evaluate the performance of EHOA in high-dimensional optimization problems, it was compared with the Hippo Optimizer, Grey Wolf Optimizer (GWO), and Beluga Whale Optimization (BWO) algorithms. To ensure accuracy and fairness, the experimental parameters were uniformly set: optimization problem dimension m=30, maximum number of iterations T=500, and population size N=30. Eight standard test functions were used in the experiment, as shown in Table 2. F1-F4 are unimodal functions, mainly used to evaluate the convergence speed and accuracy of the algorithms; F5-F8 are multimodal functions, used to test the algorithms' ability to escape local optima and perform global search. Under the same experimental environment and parameter conditions, each algorithm was run 30 times, and the average results were used for performance comparison analysis to ensure the stability and reliability of the experimental results.
[0077] Table 2: Test Functions
[0078] Based on the experimental results of each algorithm on the test function, as shown in Table 3 and Figures 10a-10b As shown, EHOA exhibits superior convergence on both unimodal and multimodal test functions. On functions F1, F3, F6, and F8, EHOA converges to the theoretical optimum. F1 and F3 converge first with very few iterations, significantly outperforming other algorithms. On function F6, EHOA's convergence curve declines most steeply, while other algorithms stagnate in local optima earlier. In function F8, EHOA shows the fastest convergence decline compared to the GWO algorithm, reaching convergence quickly. For function F7, although all algorithms achieve the same final convergence accuracy, EHOA's convergence curve reaches a plateau earliest, demonstrating its fastest convergence speed. Furthermore, on functions F2, F4, and F5, EHOA demonstrates higher convergence accuracy, with its convergence curve maintaining a smooth downward trend and continuously approaching a better solution in the later stages of iteration, while the curves of other algorithms tend to flatten out and fall into local optima earlier. Overall, EHOA consistently outperformed other algorithms across all test functions, demonstrating the effectiveness of its improvement strategy and superior overall performance.
[0079] Table 3: Performance Comparison of Optimization Algorithms
[0080] The following is an experimental analysis of the spatiotemporal feature fusion network: 1. Ablation experiment: This invention's ablation experiments systematically deconstruct and reconstruct the various modules of the STF2Net model, deeply exploring the impact of different module combinations on photovoltaic power prediction performance, thereby verifying the necessity and effectiveness of each module design. All experiments maintained consistent parameter settings: a learning rate of 10. -3 The MiniBatchSize is 64, the hidden layer dimensions of the two BisLSTM layers are set to 32 and 64 respectively, and MAE, RMSE and R² are used as evaluation metrics.
[0081] As shown in Table 4, Proposed is the method proposed in this invention, Spatio1 is the feature removal and recombination module, Spatio2 is the dynamic feature removal module; Temporal1, Temporal2 and Temporal3 replace BisLSTM with sLSTM, LSTM and BiLSTM respectively; Spatio retains only the spatial branch, and Temporal retains only the temporal branch.
[0082] Table 4 Comparison of ablation test performance
[0083] In the ablation experiment of the spatial branch, the complete spatial branch Spatio (RMSE = 2.52 × 10⁻⁶) was... -2 MAE = 2.32 × 10 -2 The model demonstrated excellent spatial feature extraction capabilities (R²=99.02%). However, when the integrity of the modules was compromised, the model performance showed significant divergence. This comparative result fully demonstrates that the feature reorganization module plays a crucial role in improving feature representation capabilities, and also reveals a significant synergistic enhancement effect between the feature extraction and reorganization modules. That is, the performance improvement generated when the two modules work together far exceeds the simple summation when they work independently.
[0084] The superiority of the BisLSTM architecture is strongly demonstrated in the time branching validation. Experiments show that Temporal1 using sLSTM, Temporal2 using LSTM, and Temporal3 using BiLSTM all exhibit performance degradation. In particular, the R² scores of Temporal2 and Temporal3 are more than 15% lower than the model proposed in this invention. This significant difference highlights the unique advantage of BisLSTM in capturing complex time-dependent patterns, indicating that its design can more effectively model the deep temporal characteristics in photovoltaic power sequences.
[0085] The branch fusion experiment further reveals the design value of the model architecture. Using spatial branches alone (RMSE = 2.52 × 10⁻⁶) -2 MAE = 2.32 × 10 -2 (R²=99.02%) or time branch (RMSE=1.34×10) -2 MAE = 1.00 × 10 -2 Neither the model with R²=99.72% nor the model with RMSE=1.19×10⁻⁶ can achieve the same results as the model proposed in this invention. -2 MAE = 0.92 × 10 -2 The performance level (R²=99.78%) is demonstrated. This result fully proves that the deep integration of spatial feature extraction and temporal dynamic modeling has an indispensable synergistic effect on improving the performance of photovoltaic power prediction.
[0086] Figure 11a The results shown further validate the above conclusions. In the comparison chart of photovoltaic power predictions over the next 12 hours, the prediction curve of the model proposed in this invention is closest to the actual value and significantly better than other comparison models, indicating that the model can effectively integrate spatiotemporal features to improve long-term prediction accuracy. Figure 11bThis is a magnified view of its local area, which shows that even within a small time frame, the predicted values of the proposed method closely follow the fluctuation trend of the true values, and its error range is much lower than that of other models, highlighting its powerful ability to capture instantaneous dynamic features.
[0087] 2. Hyperparameter selection analysis Due to the complexity of deep neural network structures and the large number of hyperparameters, hyperparameter optimization is difficult to achieve using traditional grid search or random search methods. Therefore, this invention employs an automated hyperparameter optimization strategy, focusing on tuning the learning rate, batch size, and the number of attention heads in the multi-head attention mechanism. The learning rate determines the step size and convergence of parameter updates, the batch size guides the accuracy of gradient estimation and training stability, and the number of attention heads controls the model's ability to represent the feature subspace. These three factors collectively influence the convergence state and volatility during model training. Therefore, this invention selects the learning rate, batch size, and the number of multi-head attention heads as the optimized variables. Furthermore, by defining the search space and applying the optimization algorithm, the optimal hyperparameter configurations shown in Table 5 were obtained.
[0088] Table 5 Optimization Range of Model Training Parameters
[0089] Analysis results show that a larger learning rate helps accelerate the gradient descent process, thereby improving model convergence efficiency; a smaller batch size enhances the model's generalization ability and provides richer gradient information; and a larger number of attention heads effectively improves feature representation ability and temporal pattern capture performance. Therefore, the EHOA optimization algorithm can effectively find optimal solutions in high-dimensional and complex hyperparameter spaces, providing the model with an optimal configuration superior to human experience.
[0090] 3. Comparative analysis with other mainstream models To systematically verify the performance advantages of the proposed model, this invention employs comparative experiments using multiple mainstream prediction models. To ensure the fairness and comparability of the experimental results, a total of five experiments were conducted, and the average value was used for comparative analysis. Furthermore, a unified hyperparameter setting was adopted to eliminate the interference of training randomness on the experimental conclusions.
[0091] Table 6 shows a performance comparison of the mainstream comparison models. First, the Self-CNN model (RMSE = 4.82 × 10⁻⁶) -2 MAE = 4.06 × 10 -2 The low RMSE (R²=96.41%), relying solely on spatial feature extraction, indicates that simple spatial modeling has limited capabilities when dealing with photovoltaic power data that possesses both spatiotemporal characteristics, making it difficult to capture its dynamic evolution patterns. Secondly, the sLSTM-Attention model, by introducing a scalar long short-term memory network and an attention mechanism, reduces the RMSE to 2.61×10⁻⁶.-2 MAE decreased to 2.17×10 -2 The R² was improved to 98.95%, demonstrating the key role of time series modeling in improving prediction accuracy.
[0092] Furthermore, the CNN-sLSTM-Attention model adopts a "space-time" sequential architecture, integrating the spatial feature extraction capabilities of CNN with the temporal modeling mechanism of sLSTM-Attention. At RMSE = 1.28 × 10⁻⁶, the model achieves a high performance. -2 MAE = 1.12 × 10 -2 The proposed model demonstrates excellent performance in both R²=99.75%, validating the absolute necessity of spatiotemporal joint modeling. Building upon this, the proposed model comprehensively surpasses existing state-of-the-art benchmarks. Specifically, the proposed model reduces the RMSE from 1.28 × 10⁻⁶ to 99.75%. -2 Further reduced to 1.19×10 -2 , MAE consists of 1.12×10 -2 Significantly reduced to 0.92×10 -2 Meanwhile, R² improved to 99.78%. Additionally, the CNN-xLSTM-ECA model, which also integrates xLSTM and attention mechanisms, achieved a performance (RMSE = 1.42 × 10⁻⁶). -2 MAE = 1.22 × 10 -2 Even with an R² of 99.69%, the success rate is still lower than that of the method in this invention. This result further confirms the unique advantages of the dual-branch parallel architecture used in this study in terms of information preservation and feature fusion. Figure 12 The results visually demonstrate the differences in prediction performance among the various models. During the 12-hour prediction period, the prediction curves of the proposed model remained highly consistent with the actual values. The CNN-sLSTM-Attention model performed second best, while models such as self-CNN, sLSTM-Attention, and CNN-xLSTM-ECA showed significant deviations at different times. Figure 13 yes Figure 12 The magnified view further reveals the dynamic response characteristics of each model at subtle time scales. Within this range, the true value exhibits a fluctuating change of first decreasing and then increasing. The prediction curve of the proposed model almost completely overlaps with the true value, accurately capturing the amplitude and phase of the fluctuation. Although CNN-sLSTM-Attention can follow the changing trend, it has slight amplitude error and response delay. The other models all show varying degrees of tracking distortion, especially significant deviations at the turning points of change.
[0093] Table 6: Performance Comparison of Mainstream Models
[0094] 4. Analysis of the interpretability of model predictions To verify the rationality and physical consistency of the proposed model's feature learning in photovoltaic power prediction, this invention uses Pearson correlation coefficient heatmaps, SHAP beehive plots, and bar charts to systematically reveal whether the model captures the physical laws governing photovoltaic power changes, thereby verifying its interpretability and reliability.
[0095] Figure 14 This is a Pearson correlation coefficient heatmap. The graph shows a significant positive correlation between photovoltaic power and Direct Normal Irradiance (DNI), Global Horizontal Irradiance (GHI), Global Tilted Irradiance (GTI), and Tracking Tilted Irradiance (TTI), indicating that radiation intensity is the primary driver of photovoltaic output, consistent with the physical law that photoelectric conversion efficiency increases with increasing incident irradiance. Simultaneously, power shows a significant negative correlation with cloud cover and solar zenith angle, revealing the inhibitory effect of shading and increased incident angle on effective irradiance energy. Furthermore, temperature shows a moderate positive correlation with power, suggesting that rising temperatures may promote photovoltaic module output within a certain temperature range, but this trend is much weaker than that of the irradiance factor. The linear correlation between variables such as humidity and wind speed is weak, indicating that their effects are more likely manifested through nonlinear coupling processes.
[0096] Figure 15 The results, presented as SHAP histograms and swarm plots, show that radiation-related features such as Global Horizontal Irradiance (GHI), Direct Normal Irradiance (DNI), Diffuse Horizontal Irradiance (DHI), Global Tilt Irradiance (GTI), and Tracking Tilt Irradiance (TTI) are the features contributing the most to the model, consistent with the high correlation obtained from Pearson analysis. Temperature, cloud cover, and solar zenith angle show positive or negative contributions in SHAP, respectively, and their directionality is completely consistent with the Pearson correlation, reflecting the consistency of physical laws. Although features such as humidity and wind speed have weak linear correlations, they exhibit obvious nonlinear influence patterns in the SHAP swarm plot, indicating that the model has learned a more complex interaction between them and power.
[0097] In summary, the Pearson correlation coefficient reveals the linear relationship between characteristics and photovoltaic power, while SHAP further provides a model-based explanation of global and local nonlinear effects. Together, they verify that irradiance is the dominant factor, temperature and cloud cover are secondary factors, and other meteorological variables contribute only to a limited extent. This fully demonstrates the consistency between the model prediction mechanism and the physical laws of photovoltaic power generation, and improves the interpretability and reliability of the model prediction results.
[0098] Example 2: Based on the same inventive concept, embodiments of the present invention also provide an interpretable photovoltaic power ultra-short-term prediction system, the system comprising: The data preprocessing module is used to acquire historical power data and corresponding meteorological data of photovoltaic power plants, and obtain the dataset after preprocessing. The model building module is used to build the spatiotemporal feature fusion network STF2Net, which includes parallel spatial and temporal branches; wherein, the spatial branch includes a dynamic feature selection module and a feature fusion module, and the temporal branch includes two BisLSTMs; The model training module is used to train the spatiotemporal feature fusion network STF2Net based on the dataset, and to adaptively optimize the hyperparameters of STF2Net using the improved hippo optimization algorithm EHOA to obtain the optimal hyperparameter combination. Specifically, EHOA initializes the population through sinusoidal perturbation logistic chaotic mapping, updates the position of male hippos using an adaptive decreasing weight strategy, and updates the position of female hippos using a multi-source collaborative predator update mechanism. The prediction module is used to obtain real-time meteorological data for the time to be predicted and input it into the trained STF2Net to obtain ultra-short-term photovoltaic power prediction results. The interpretability analysis module is used to perform interpretability analysis on the prediction results using Pearson correlation coefficient (PCC) and Shapley additive interpretation (SHAP).
[0099] Since these systems and the principles underlying the problems they address are similar to the aforementioned interpretable ultra-short-term photovoltaic power prediction method, the implementation of this system can be found in the implementation of the aforementioned method, and the repetitions will not be repeated.
[0100] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.
[0101] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined in this invention may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An interpretable method for ultra-short-term photovoltaic power prediction, characterized in that, Includes the following steps: S1. Obtain historical power data and corresponding meteorological data of photovoltaic power plants, and obtain a dataset after preprocessing; S2. Construct a spatiotemporal feature fusion network STF2Net, which includes parallel spatial and temporal branches; wherein, the spatial branch includes a dynamic feature selection module and a feature fusion module, and the temporal branch includes two BisLSTMs; S3. Train the spatiotemporal feature fusion network STF2Net based on the dataset, and use the improved hippo optimization algorithm EHOA to adaptively optimize the hyperparameters of STF2Net to obtain the optimal hyperparameter combination; wherein, the EHOA initializes the population through sinusoidal perturbation Logistic chaotic mapping, updates the position of male hippos using an adaptive decreasing weight strategy, and updates the position of predators using a multi-source collaborative predator update mechanism. S4. Obtain real-time meteorological data for the time to be predicted and input it into the trained STF2Net to obtain the ultra-short-term photovoltaic power prediction results. S5. The predictive results are analyzed for interpretability using Pearson correlation coefficient (PCC) and Shapley additive interpretation (SHAP) to quantify the contribution of each input feature to the predictive results.
2. The method as described in claim 1, characterized in that, The preprocessing includes: Remove power data that was zero at night from historical power data; The rolling standard deviation method was used to detect and remove outliers in the remaining data; Linear interpolation is used to fill in the missing values generated after outlier removal; Normalize the filled data.
3. The method as described in claim 1, characterized in that, In step S2, the dynamic feature selection module first extracts local features through a one-dimensional convolutional layer and max pooling operation, then extracts multi-scale contextual information through dilated convolution with different kernels via three parallel branches, and finally captures global dependencies through a multi-head attention mechanism.
4. The method as described in claim 1, characterized in that, In step S2, the feature fusion module first performs channel compression and linear fusion on the output of the multi-head attention mechanism through 1×1 convolution, and then uses the residual block structure to perform feature reuse and progressive fusion. Finally, it extracts global statistical features through global average pooling.
5. The method as described in claim 1, characterized in that, In step S2, the time branch includes two BisLSTMs, which simultaneously introduce forward scalar LSTM layers and backward scalar LSTM layers to achieve bidirectional dynamic modeling of the input sequence. The forward scalar LSTM layer processes the input sequence in chronological order, while the backward scalar LSTM layer processes the input sequence in reverse order. Finally, the hidden states generated by the two layers are concatenated to form a comprehensive temporal representation containing past and future information.
6. The method as described in claim 1, characterized in that, In step S3, the improved Hippo Optimization Algorithm (EHOA) is used to adaptively optimize the hyperparameters of STF2Net, wherein the hyperparameters include the learning rate, batch size, and the number of heads in the multi-head attention mechanism.
7. The method as described in claim 1, characterized in that, In step S3, the sinusoidal perturbation Logistic chaotic mapping formula is as follows: ; In the formula, n is the current iteration number. It is the state value of the (n+1)th iteration. It is the state value of the nth iteration. For control parameters, The coefficient is a sinusoidal disturbance. Pi is the mathematical constant of a circle, and sin(.) is the sine function.
8. The method as described in claim 1, characterized in that, In step S3, the adaptive decreasing weight strategy decreases the weight coefficient as the number of iterations increases, and the update formula is as follows: ; ; in, It is the position vector of a male hippopotamus. Let be the positional component of the i-th male hippopotamus in the j-th dimension, where i is the index of the number of hippos and j is the dimension index. It is the weight of the hippopotamus's leadership position. It is a random number between 0 and 1. , It is the position component of the i-th hippopotamus in the j-th dimension. These are adaptive decreasing weights; a=0.9 and b=0.2 are coefficients. t is the maximum number of iterations, and t is the current number of iterations.
9. The method as described in claim 1, characterized in that, In step S3, the predator update mechanism based on multi-source collaboration determines the predator's new position by considering the hippopotamus position, the hippopotamus leader position, and a random vector. Each of these factors is assigned a weight coefficient that decreases linearly with the number of iterations, as shown in the formula: ; ; Where Predator is the predator's position vector. It is the predator position component in the j-th dimension, where j is the dimension index. It is a random vector between 0 and 1. and These are the coefficients of the hippopotamus positional component and the hippopotamus leader positional component, respectively. c=0.5 and d=0.3 are the correlation coefficients.
10. An interpretable photovoltaic power ultra-short-term prediction system, characterized in that, The system comprises: The data preprocessing module is used to acquire historical power data and corresponding meteorological data of photovoltaic power plants, and obtain the dataset after preprocessing. The model building module is used to build the spatiotemporal feature fusion network STF2Net, which includes parallel spatial and temporal branches; wherein, the spatial branch includes a dynamic feature selection module and a feature fusion module, and the temporal branch includes two BisLSTMs; The model training module is used to train the spatiotemporal feature fusion network STF2Net based on the dataset, and to adaptively optimize the hyperparameters of STF2Net using the improved hippo optimization algorithm EHOA to obtain the optimal hyperparameter combination. Specifically, EHOA initializes the population through sinusoidal perturbation Logistic chaotic mapping, updates the position of male hippos using an adaptive decreasing weight strategy, and updates the position of predators using a multi-source collaborative predator update mechanism. The prediction module is used to obtain real-time meteorological data for the time to be predicted and input it into the trained STF2Net to obtain ultra-short-term photovoltaic power prediction results. The interpretability analysis module is used to perform interpretability analysis on the prediction results using Pearson correlation coefficient (PCC) and Shapley additive interpretation (SHAP).