Building photovoltaic short-time multi-step rolling prediction method and system

By constructing a feature tensor and feature attention mechanism, combined with multi-scale temporal feature extraction and bidirectional temporal modeling, the problem of non-stationary fluctuations in photovoltaic power caused by shading and local microclimate disturbances in short-term multi-step prediction of building photovoltaic systems is solved, and more stable and accurate prediction results are achieved.

CN123162784APending Publication Date: 2026-11-24XUANCHENG NANTIAN ELECTRIC POWER ENG CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611346439.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

In short-term multi-step power prediction of building photovoltaic systems, the non-stationary fluctuations in photovoltaic power caused by shading and local microclimate disturbances are obvious, and it is difficult to fully characterize different time scales and key historical time series information, which makes it easy for prediction errors to accumulate.

Method used

By acquiring historical operational data and meteorological data of building photovoltaic systems, a feature tensor is constructed that includes basic meteorological characteristics, thermal state of photovoltaic modules, spatial irradiance differences, and periodic time characteristics. The feature attention mechanism is used for weighted processing, and multi-scale temporal feature extraction and bidirectional temporal modeling are performed to form a hidden state sequence. Based on the current prediction step information, the target temporal features are determined to achieve power increment prediction. The input window is continuously updated for rolling prediction.

Benefits of technology

It improves the stability and accuracy of building-integrated photovoltaics (BIPV) short-term multi-step forecasting, reduces overall drift and prediction error accumulation during multi-step rolling forecasting, and enhances the response capability to building shading and local microclimate disturbances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123162784A_ABST
    Figure CN123162784A_ABST
Patent Text Reader

Abstract

This application discloses a short-term, multi-step rolling prediction method and system for building-integrated photovoltaics (BIPV), relating to the field of photovoltaic power prediction technology. The method acquires historical operating data and meteorological data of the BIPV system, and after preprocessing, constructs a feature tensor including basic meteorological characteristics, BIPV module thermal state characteristics, spatial irradiance difference characteristics, periodic time characteristics, and historical BIPV output power. Hidden state sequences are obtained through feature attention, multi-temporal receptive field temporal feature extraction, and bidirectional temporal feature modeling. Target temporal features are determined based on prediction step information, and power increments are predicted. The input window is updated continuously using actual power or the previous predicted power as an anchor point to obtain BIPV power prediction results for multiple future times. This enhances the ability to characterize non-stationary changes caused by building shading and microclimate disturbances, reduces phase lag and error accumulation in multi-step prediction, and improves prediction stability and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of photovoltaic power prediction technology, and in particular to a method and system for short-term multi-step rolling prediction of building photovoltaic power. Background Technology

[0002] With the development of distributed photovoltaic (PV) power generation technology and the continuous expansion of building-integrated photovoltaics (BIPV) applications, PV modules are increasingly being deployed on building rooftops, curtain walls, and facades. BIPV systems can utilize building surface space to collect and utilize solar energy on-site, and their output power predictions can provide a data foundation for building energy management, energy storage charging and discharging control, microgrid scheduling, and grid-connected power management. Since PV power generation is closely related to factors such as solar irradiance, ambient temperature, module temperature, and wind speed, accurately obtaining the future BIPV output power is crucial for improving the operational stability of building energy systems.

[0003] In existing technologies, photovoltaic (PV) power prediction models are typically established using historical PV power data and meteorological data, and statistical analysis models, machine learning models, or neural network models are used to predict future PV output power. However, compared to PV power plants in open areas, building-integrated photovoltaic (BIPV) modules are more susceptible to factors such as shading from surrounding buildings, changes in solar altitude angle, rapid cloud movement, and local temperature and wind field variations, causing PV output power to exhibit significant random fluctuations and non-stationary characteristics at different time periods. When performing short-term multi-step predictions, the power variation characteristics at different time scales and key time-series information from historical data are difficult to fully characterize. Furthermore, as the number of prediction steps increases, biases from previous predictions may propagate to subsequent prediction processes, leading to accumulated biases and untimely tracking of trends, thus affecting the stability and accuracy of BIPV multi-step prediction results.

[0004] Therefore, in building-integrated photovoltaic (BIPV) short-time multi-step power prediction, the significant non-stationary fluctuations in PV power caused by building shading and local microclimate disturbances, the difficulty in fully representing different time scales and key historical time series information, and the easy accumulation of prediction errors in the multi-step prediction process have become urgent problems to be solved. Summary of the Invention

[0005] This application provides a method and system for short-time multi-step rolling prediction of building-integrated photovoltaics (BIPV), aiming to solve the problems in existing technologies for short-time multi-step power prediction of BIPV, such as significant non-stationary fluctuations in BIPV power caused by building shading and local microclimate disturbances, difficulty in fully representing different time scales and key historical time series information, and easy accumulation of prediction errors in the multi-step prediction process.

[0006] In a first aspect, a short-time multi-step rolling prediction method for building-integrated photovoltaics (BIPV) systems is provided, the method comprising: Historical operating data of the building photovoltaic system and meteorological data corresponding to the historical operating data are acquired. The historical operating data includes historical photovoltaic output power and sampling time information. The historical operating data and the meteorological data are preprocessed to obtain first time-series data. A first feature tensor is determined based on the first time series data. The first feature tensor includes basic meteorological features, physical derived features characterizing the thermal state of photovoltaic modules, spatial irradiance difference features, periodic time features, and historical photovoltaic output power. The feature weights corresponding to each input feature in the first feature tensor are determined based on the feature attention mechanism, and the first feature tensor is weighted according to the feature weights to obtain the second feature tensor. Temporal features are extracted from the second feature tensor under different receptive fields to obtain multi-scale temporal features, and bidirectional temporal feature modeling is performed on the multi-scale temporal features to obtain the hidden state sequence. Based on the prediction step information corresponding to the current prediction step, the target temporal features corresponding to the current prediction step are determined from the hidden state sequence; The power increment corresponding to the current prediction step is determined based on the target time series characteristics, and the predicted power corresponding to the current prediction step is determined based on the anchor power and the power increment. The anchor power corresponding to the first prediction step is the actual photovoltaic output power at the end of the current input window, and the anchor power corresponding to any prediction step after the first prediction step is the predicted power corresponding to the previous prediction step. The current input window is updated based on the predicted power corresponding to the current prediction step and the available meteorological data corresponding to the next prediction time, resulting in an updated input window. The prediction of the next prediction step is then performed based on the updated input window until the predicted output power of the building photovoltaic system at multiple future times is obtained.

[0007] Optionally, in the above scheme, the preprocessing of the historical operational data and the meteorological data to obtain the first time-series data includes: The historical operational data and the meteorological data are downsampled according to a preset sampling window to obtain resampled time-series data. Based on the operating range and preset physical constraints of the building photovoltaic system, abnormal power data, abnormal zero value data and outlier data in the resampled time series data are corrected or cleared to obtain cleaned time series data. The short-term missing data in the cleaning time series data is interpolated and completed to obtain the completed time series data. Then, based on the preset irradiation conditions, the effective time period data is selected from the completed time series data to obtain the effective time series data. The effective time-series data is divided into training data, validation data, and test data according to the time sequence, and the normalization parameters are determined based on the training data to obtain the target normalization parameters. The training data, validation data, and test data are normalized based on the target normalization parameters to obtain the first time series data.

[0008] Optionally, in the above scheme, determining the first feature tensor based on the first time-series data includes: Based on the component temperature and ambient temperature in the first time series data, the temperature difference between the component temperature and the ambient temperature is determined, and the physical derived characteristics characterizing the thermal state of the photovoltaic module are obtained. Based on multiple irradiance data corresponding to different spatial locations of the photovoltaic array, the degree of irradiance dispersion between different spatial locations is determined, and the spatial irradiance difference characteristics are obtained. Based on the wind speed and wind direction in the first time series data, mutually orthogonal wind speed components are determined, and the characteristics of the orthogonal wind speed components are obtained. The periodic time feature is obtained by transforming the periodic variable based on the sampling time information. The basic meteorological features, the physical derived features, the spatial irradiance difference features, the wind speed orthogonal component features, the periodic time features, and the historical photovoltaic output power are time-aligned according to the sampling time to obtain a feature vector sequence; The first feature tensor is obtained by performing sliding window processing on the feature vector sequence based on a preset historical sequence length.

[0009] Optionally, in the above scheme, determining the feature weights corresponding to each input feature in the first feature tensor based on the feature attention mechanism, and weighting the first feature tensor according to the feature weights to obtain the second feature tensor, includes: For each input feature in the first feature tensor, set corresponding learnable gating information to obtain a set of gating information; Based on the first feature tensor and the gating information set, the gating value corresponding to each input feature is determined to obtain the gating value set; The set of gated values ​​is subjected to weight normalization to obtain the feature weights corresponding to each input feature; The corresponding input features in the first feature tensor are weighted based on the feature weights to obtain the second feature tensor.

[0010] Optionally, in the above scheme, the step of extracting temporal features from the second feature tensor under different receptive fields to obtain multi-scale temporal features includes: Based on the first time receptive field, temporal features are extracted from the second feature tensor to obtain the first scale temporal features. The first scale temporal features are used to characterize the short-time power changes caused by building shading or changes in irradiance conditions. Based on a second time receptive field larger than the first time receptive field, temporal features are extracted from the second feature tensor to obtain second-scale temporal features. The second-scale temporal features are used to characterize the temporal change trend of irradiance, temperature or wind field over time. The first-scale temporal features and the second-scale temporal features are fused to obtain the multi-scale temporal features.

[0011] Optionally, in the above scheme, the step of extracting temporal features from the second feature tensor based on the first and second temporal receptive fields includes: Temporal convolutional branches corresponding to the first and second temporal receptive fields are constructed respectively to obtain multiple parallel temporal convolutional branches; In each of the parallel temporal convolution branches, the corresponding input data is processed by temporal convolution based on multi-layer causal convolution with progressively increasing dilation coefficients to obtain the branch temporal features corresponding to each of the parallel temporal convolution branches. The output of each causal convolution layer is determined only based on the input data at the current time and before the current time. The temporal features of each branch are normalized and residual connection is processed to obtain stable branch temporal features; The temporal features of each stable branch are fused to obtain the multi-scale temporal features.

[0012] Optionally, in the above scheme, the step of performing bidirectional temporal feature modeling on the multi-scale temporal features to obtain the hidden state sequence includes: The multi-scale temporal features are processed in chronological order using a forward long short-term memory network to obtain a forward hidden state sequence. Based on the reverse long short-term memory network, the multi-scale temporal features are processed in the current input window in the reverse order of time to obtain the reverse hidden state sequence. The data used by the reverse long short-term memory network is limited to the historical data already obtained in the current input window. The forward hidden state sequence and the reverse hidden state sequence are concatenated to obtain a fused hidden state sequence. The fused hidden state sequence is normalized to obtain the hidden state sequence.

[0013] Optionally, in the above scheme, determining the target temporal feature corresponding to the current prediction step from the hidden state sequence based on the prediction step information corresponding to the current prediction step includes: Based on the hidden state sequence, feature mapping is performed to obtain key features and value features; Obtain the terminal hidden state corresponding to the hidden state sequence, and determine the corresponding learnable step query vector according to the current prediction step to obtain the current step query information; The query feature corresponding to the current prediction step is determined based on the end hidden state and the current step query information; Based on the query features and the key features, the attention weights corresponding to multiple attention heads are determined to obtain an attention weight set. The value features are weighted based on the set of attention weights to obtain multiple attention sub-features; Multiple attention sub-features are concatenated and mapped to obtain the target temporal features corresponding to the current prediction step.

[0014] Optionally, in the above scheme, the method further includes determining a target hyperparameter combination for short-term multi-step rolling prediction of building-integrated photovoltaics (BIPV), wherein determining the target hyperparameter combination includes: The hyperparameters to be optimized and the candidate value ranges corresponding to each hyperparameter to be optimized are determined to obtain the hyperparameter search space. Candidate hyperparameter combinations are randomly selected from the hyperparameter search space, and candidate prediction models are constructed based on the candidate hyperparameter combinations. The time series samples are divided into multiple training time windows and verification time windows corresponding to each training time window according to the time sequence, resulting in multiple rolling verification data groups. Each verification time window is located after the corresponding training time window, and the training time windows corresponding to different rolling verification data groups gradually expand along the time axis. The candidate prediction model is trained and validated based on each of the rolling validation data sets to obtain the validation error corresponding to each of the rolling validation data sets, and the comprehensive validation error corresponding to the candidate hyperparameter combination is determined based on each of the validation errors. The comprehensive verification error is compared with the current optimal verification error, and the current optimal verification error and the corresponding current optimal hyperparameter combination are updated according to the comparison result to obtain the parameter update result; If the current iteration count has not reached the preset maximum iteration count, candidate hyperparameter combinations are re-determined from the hyperparameter search space based on the parameter update results, and rolling verification is repeated; if the current iteration count has reached the preset maximum iteration count, the target hyperparameter combination is determined based on the parameter update results. A prediction model for short-term multi-step rolling prediction of building photovoltaics is configured based on the target hyperparameter combination.

[0015] Secondly, a building-integrated photovoltaic (BIPV) short-time multi-step rolling forecasting system, the system comprising: The data processing module is used to acquire historical operating data of the building photovoltaic system and meteorological data corresponding to the historical operating data. The historical operating data includes historical photovoltaic output power and sampling time information. The module preprocesses the historical operating data and the meteorological data to obtain first time-series data. The feature construction module is used to determine a first feature tensor based on the first time series data. The first feature tensor includes basic meteorological features, physical derived features characterizing the thermal state of photovoltaic modules, spatial irradiance difference features, periodic time features, and historical photovoltaic output power. The feature weighting module is used to determine the feature weights corresponding to each input feature in the first feature tensor based on the feature attention mechanism, and to perform weighting processing on the first feature tensor according to the feature weights to obtain the second feature tensor. The multi-scale temporal extraction module is used to extract temporal features from the second feature tensor under different temporal receptive fields to obtain multi-scale temporal features. A bidirectional temporal modeling module is used to perform bidirectional temporal feature modeling on the multi-scale temporal features to obtain a hidden state sequence. The prediction step feature determination module is used to determine the target temporal features corresponding to the current prediction step from the hidden state sequence based on the prediction step information corresponding to the current prediction step; The residual anchoring prediction module is used to determine the power increment corresponding to the current prediction step based on the target time series characteristics, and to determine the prediction power corresponding to the current prediction step based on the anchoring power and the power increment. The anchoring power corresponding to the first prediction step is the actual photovoltaic output power at the end of the current input window, and the anchoring power corresponding to any prediction step after the first prediction step is the prediction power corresponding to the previous prediction step. The rolling forecast module is used to update the current input window based on the predicted power corresponding to the current forecast step and the available meteorological data corresponding to the next forecast time, to obtain an updated input window, and to perform the forecast for the next forecast step based on the updated input window, until the building photovoltaic output power forecast results for multiple future times are obtained.

[0016] Compared with the prior art, this application has at least the following beneficial effects: This application, based on further analysis and research of existing technical problems, recognizes that existing technologies in short-term multi-step power prediction of building-integrated photovoltaics (BIPV) suffer from significant non-stationary fluctuations in PV power caused by building shading and local microclimate disturbances, difficulty in fully representing different time scales and key historical time-series information, and the easy accumulation of prediction errors during multi-step prediction. This application addresses these issues by acquiring and preprocessing historical operating data and corresponding meteorological data of BIPV systems. Based on this, a first feature tensor is constructed, including basic meteorological characteristics, physical derived characteristics representing the thermal state of PV modules, spatial irradiance difference characteristics, periodic time characteristics, and historical PV output power. This allows the impact of building shading, local microclimate changes, and the thermal state of PV modules on output power to be represented by corresponding time-series features. Furthermore, a feature attention mechanism is used to adaptively weight different input features, highlighting information highly correlated with current PV power changes. Time-series feature extraction under different time-sensory fields takes into account both short-term power abrupt changes and longer-term trends. Finally, bidirectional time-series feature modeling is used to form... This approach incorporates a hidden state sequence containing the relationships between preceding and subsequent states within a historical window, thereby enhancing the characterization of non-stationary changes in building-integrated photovoltaics (BIPV) and temporal patterns across different time scales. Based on this, target temporal characteristics are determined from the hidden state sequence according to the prediction step information corresponding to the current prediction step. This allows different prediction steps to utilize relevant historical temporal information for the prediction distance and predict the power increment relative to the anchored power based on the target temporal characteristics. The first prediction step uses the actual PV output power at the end of the current input window as the anchor point, while subsequent prediction steps use the predicted power of the previous prediction step as the anchor point. Simultaneously, the input window is continuously updated using the current predicted power and available meteorological data corresponding to the next prediction time. This transforms future absolute power prediction into incremental rolling prediction around adjacent power states, enabling continuous updates to the prediction results with the latest prediction state and meteorological information. This reduces overall drift, phase lag, and the accumulation of prediction errors during multi-step rolling prediction, improving the stability and accuracy of short-term multi-step BIPV prediction under conditions of building shading, local microclimate disturbances, and non-stationary power fluctuations. Attached Figure Description

[0017] Figure 1 A schematic flowchart of a building-integrated photovoltaics short-time multi-step rolling prediction method provided in one embodiment of this application; Figure 2 A schematic diagram of the process of a residual-driven TCN-BiLSTM-Attention building photovoltaic short-time multi-step prediction method provided in one embodiment of this application; Figure 3 This is a schematic diagram of a feature construction process provided in one embodiment of this application; Figure 4 A framework diagram of a building-integrated photovoltaics short-time multi-step rolling prediction model provided in one embodiment of this application; Figure 5 This is a flowchart illustrating the joint execution of wide-space random optimization and TS-CV rolling cross-validation in one embodiment of this application. Figure 6 A graph showing the correlation analysis results of building photovoltaic output provided in one embodiment of this application; Figure 7 A temporal feature information gain quantization evaluation graph based on an XGBoost tree model provided in one embodiment of this application; Figure 8 This is a temporal attention heatmap corresponding to different rolling prediction schemes provided in one embodiment of this application; Figure 9 A comprehensive visualization analysis chart of model prediction results provided in one embodiment of this application; Figure 10 A comparative chart of the overall performance of different prediction models provided in one embodiment of this application; Figure 11 This is a sample diagram of extreme microclimate disturbances and non-stationary fluctuations provided in one embodiment of this application; Figure 12 This application provides a local trajectory tracking analysis diagram for complex working conditions as an embodiment of the present application; Figure 13 This is a schematic diagram of the structure of a building photovoltaic short-time multi-step rolling prediction system provided in one embodiment of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0019] In one embodiment, such as Figures 1 to 4 As shown, a short-term, multi-step rolling forecasting method for building-integrated photovoltaics (BIPV) is provided. The forecasting device first acquires historical operating data of the BIPV system and corresponding meteorological data. Historical operating data includes historical BIPV output power and sampling time information, and in specific implementations, may also include information related to the BIPV system's operating status, such as inverter operating status. Meteorological data may include the array's average irradiance, irradiance data corresponding to multiple irradiance measurement points located at different positions on the BIPV array, ambient temperature, module temperature, wind speed, and wind direction, and may also include data reflecting the local microclimate of the building, such as humidity and cloud cover. The above data can originate from field sensors, inverter data acquisition units, building energy management systems, or meteorological data sources connected to the forecasting device.

[0020] The predictive equipment preprocesses historical operational and meteorological data to form first time-series data that is continuous in sampling time and whose dimensions are suitable for model processing. Specifically, it sequentially performs downsampling, outlier handling, short-term missing data completion, effective time period selection, time-order division of training, validation, and test data, and normalization processing. Downsampling is used to reduce the original high-frequency noise; outlier handling is used to exclude data that does not meet the physical operating range of the building photovoltaic system; effective time period selection is used to reduce the impact of continuous zero-power data at night on subsequent time-series modeling; and normalization parameters are determined only from the training data, with the same normalization mapping rules applied to the validation and test data.

[0021] like Figure 3 As shown, after obtaining the first time-series data, the prediction device determines the basic meteorological characteristics, physical derivative characteristics characterizing the thermal state of photovoltaic modules, spatial irradiance difference characteristics, periodic time characteristics, and historical photovoltaic output power from the first time-series data, and aligns the various characteristics according to the sampling time to form the first feature tensor. Among them, the basic meteorological characteristics are used to describe the external operating environment of the building photovoltaic system; the physical derivative characteristics characterizing the thermal state of photovoltaic modules are used to describe the heat storage and heat dissipation state of the modules and building surfaces; the spatial irradiance difference characteristics are used to describe the irradiance differences between different spatial locations of the photovoltaic array caused by cloud movement, building shading, or local shadows; and the periodic time characteristics are used to describe periodic time information such as hours and months.

[0022] After obtaining the first feature tensor, the prediction device determines the feature weights corresponding to each input feature in the first feature tensor through a feature attention mechanism, and uses the feature weights to weight the corresponding input features to obtain the second feature tensor. This allows input features that are significantly related to changes in photovoltaic output power under the current operating state to obtain relatively high feature weights, and reduces the impact of low-contribution features and measurement noise on the subsequent time-series feature extraction process.

[0023] The prediction device further extracts temporal features from the second feature tensor under different receptive fields. Specifically, this can be achieved through... Figure 4 The multi-scale temporal convolutional structure shown extracts local variation features within a short time range and trend variation features within a relatively long time range, respectively. It then fuses the temporal features obtained from different temporal receptive fields to obtain multi-scale temporal features. The smaller temporal receptive field is mainly used to respond to rapid power changes caused by rapid cloud edge movement and local building shadows sweeping across the photovoltaic array, while the larger temporal receptive field is used to extract the power change trends corresponding to the slow evolution of variables such as irradiance, module temperature, and wind speed over time.

[0024] The prediction device further performs bidirectional temporal feature modeling on multi-scale temporal features to obtain the hidden state sequence. Bidirectional temporal feature modeling is limited to the currently obtained historical input window; one direction extracts temporal dependencies in chronological order, while the other direction extracts temporal dependencies in reverse chronological order within the same historical input window, thereby obtaining the correlation information between different time positions within the historical window. The data used for reverse processing are all historical data obtained at the current prediction time; real data after the prediction time is not used.

[0025] For the current prediction step in a multi-step prediction process, the prediction device determines the target temporal features corresponding to the current prediction step from the hidden state sequence based on the prediction step information. Specifically, the hidden state sequence can be used to establish historical information for attention retrieval, and combined with the hidden state corresponding to the end of the current input window and the step information corresponding to the current prediction step, information retrieval conditions corresponding to the current prediction step can be formed, so that different prediction steps can select different key historical information from the same historical input window.

[0026] After obtaining the target time-series features corresponding to the current prediction step, the prediction device determines the power increment corresponding to the current prediction step based on the target time-series features, rather than directly mapping the target time-series features to the absolute power at a future time. For the first prediction step, using the actual photovoltaic output power Pt at the end of the current input window as the anchor power, we obtain:

[0027] For any prediction step from the second prediction step to the Lpred prediction step, the prediction power obtained from the previous prediction step is used as the anchoring power corresponding to the current prediction step, resulting in:

[0028] Where Lpred represents the number of prediction steps that need to be continuously output, and ΔP or ΔPt+j represents the power change of the corresponding prediction step relative to its anchor power.

[0029] After each prediction step is completed, the prediction device writes the predicted power for the current prediction step and the available meteorological data for the next prediction time into the current input window, and deletes the oldest data in the current input window, moving the input window forward along the time axis to obtain an updated input window. The prediction device uses the updated input window as the data basis for the next prediction step, and re-executes the corresponding feature processing and prediction process until a preset number of prediction steps are completed, thereby obtaining the predicted building photovoltaic output power results for multiple future times.

[0030] In one specific experimental approach, the sampling interval for the original running data is 1 minute. After 5 minutes of resampling, nighttime data filtering, and outlier sample processing, the effective daytime samples are obtained. Various rolling prediction tasks can be set according to the prediction duration, such as predicting the next 5 minutes using data from the past 1 hour, predicting the next 15 minutes using data from the past 2 hours, predicting the next 30 minutes using data from the past 3 hours, and predicting the next 1 hour using data from the past 3 hours. Figure 9 The model training process, local transient prediction results, overall fitting of predicted power and true power, and changes in relative error at different prediction steps are shown. Figure 10 The performance of the adopted model is compared with that of Support Vector Regression, Random Forest, XGBoost, Backpropagation Neural Network, Transformer, GRU, LSTM, and CNN-LSTM. In the multi-step prediction experiment over the next 30 minutes, the model's coefficient of determination R² reached 0.9114, the relative root mean square error RRMSE was 33.06%, and the relative mean absolute error RMAE was 16.54%. Figure 11 The study presents a complex microclimate disturbance sample exhibiting characteristics such as a precipitous drop, rapid recovery, and multiple local fluctuations. Figure 12 The coefficient of determination R² in the local test segment shown reaches 0.8709.

[0031] Through the above processing, the ability to express building shading and local microclimate conditions is enhanced by utilizing the physical derived characteristics and spatial irradiance difference characteristics that characterize the thermal state of photovoltaic modules. Then, effective information at different time scales and historical locations is extracted through feature weighting, multi-time sensing field temporal feature extraction, and bidirectional temporal feature modeling. The corresponding target temporal features are dynamically determined according to the current prediction step. Furthermore, the power change at adjacent time moments is predicted using the current actual power or the predicted power of the previous prediction step as the anchor point, and the input window is updated continuously. This can improve the response capability to non-stationary power changes of building photovoltaics, reduce the overall drift, phase lag and prediction error accumulation in the multi-step rolling process, and improve the stability and accuracy of short-time multi-step prediction.

[0032] Based on the above methods, when preprocessing historical operational data and meteorological data, the forecasting equipment first downsamples the raw data according to a preset sampling window. For example, for historical operational data and meteorological data with a sampling interval of 1 minute, a 5-minute window can be used for mean downsampling to obtain resampled time-series data. Downsampling can reduce the impact of high-frequency random noise while retaining minute-level power changes caused by rapid cloud movement and local building obstruction.

[0033] After obtaining the resampled time-series data, the prediction equipment cleans the data according to the operating range of the building-integrated photovoltaic (BIPV) system and preset physical constraints. For negative power data in the historical PV output power, it can be corrected to zero; for data exceeding the inverter's rated operating range, or data that can be determined to be caused by communication anomalies, the corresponding data can be set to null; for abnormal zero values ​​and outlier data that significantly deviate from the normal variation range of adjacent time periods, correction or nulling can also be performed, thus obtaining cleaned time-series data. The comparison chart of the effects of BIPV time-series downsampling and physical rule cleaning before and after shows the changes in the original high-frequency power sequence after downsampling and physical rule cleaning.

[0034] For short-term missing segments in the cleaned time-series data, the prediction device performs time interpolation to complete the data adjacent to the missing positions according to time sequence, forming complete time-series data. After completing the short-term missing data, data from the photovoltaic system during its effective power generation period are selected based on preset irradiance conditions. For example, invalid samples at night can be filtered out based on a preset irradiance threshold, thereby reducing the impact of long-term continuous zero-power states at night on the state update and attention weight learning process of the cyclic time-series model, and forming effective time-series data.

[0035] The prediction device divides the valid time-series data into training, validation, and test data in chronological order, without randomly shuffling the temporal relationships between the data. Normalization parameters are determined solely based on the training data, and the same set of normalization parameters obtained from the training data is applied to all three data sets. The normalization process uses the following method:

[0036] Where xnorm is the normalized feature value, x is the original input value, and xmin and xmax are the minimum and maximum values ​​of the corresponding feature in the training data, respectively. The first time-series data is formed after the above normalization process. Since the validation and test data do not participate in the determination of xmin and xmax, future information from the validation or testing phases can be avoided from being fed back into the model training process.

[0037] Through the above processing, the impact of high-frequency noise is reduced by downsampling, and interference from erroneous sampling, communication anomalies, and outlier data is reduced by physical operating range and anomaly rules. Furthermore, the continuity and effectiveness of time series data are improved by missing data completion and effective time period filtering. At the same time, the normalization parameters are determined only based on training data. Thus, stable first time series data can be formed while maintaining the true chronological relationship of the time series, reducing the impact of invalid samples and data leakage on the subsequent building photovoltaic short-term multi-step rolling prediction results.

[0038] like Figure 3As shown, after obtaining the first time-series data, the prediction device constructs a first feature tensor based on the first time-series data. The first feature tensor is not composed only of the original meteorological variables, but also includes basic meteorological characteristics, physical derived characteristics characterizing the thermal state of photovoltaic modules, spatial irradiance difference characteristics, wind speed orthogonal component characteristics, periodic time characteristics, and historical photovoltaic output power.

[0039] For the physical derivative characteristics characterizing the thermal state of photovoltaic modules, the prediction device acquires the module temperature Tmod,t and the ambient temperature Tamb,t at the same sampling time, and determines the panel temperature difference PATDt:

[0040] PATDt is used to characterize the heat storage and dissipation states of photovoltaic modules and corresponding building surfaces, and reflects the combined effects of irradiance input, ambient temperature, and convective heat transfer on the module's operating temperature. For photovoltaic systems on building roofs, curtain walls, or facades, the heat accumulation and dissipation states of different building surfaces will affect the module's output. Therefore, using the temperature difference between the panels as a physical derivative feature characterizing the thermal state of photovoltaic modules can supplement the thermal state information missing when only ambient temperature is used.

[0041] To assess spatial irradiance differences, the prediction device acquires irradiance data Gi,t from N irradiance sensors located at different positions within the photovoltaic array at the same sampling time, and determines the dispersion of irradiance at different positions. The standard deviation of spatial irradiance is expressed as:

[0042] Where Gi,t represents the irradiance of the i-th irradiance sensor at time t. t represents the average irradiance of the array at time t, and N represents the number of irradiance sensors involved in the calculation. The larger the standard deviation of spatial irradiance, the more significant the difference in irradiance conditions between different locations of the photovoltaic array, which can reflect the spatially uneven irradiance caused by cloud movement, building shading, and local shadows.

[0043] For wind speed and direction, the prediction device converts wind speed v and wind direction θ into two mutually orthogonal wind speed components:

[0044] By converting wind speed and wind direction into orthogonal components of wind speed, numerical abrupt changes in wind direction angle at the boundaries of 0 degrees and 360 degrees can be avoided, thus maintaining continuity of adjacent physical wind directions in the numerical space.

[0045] For sampling time information, the prediction device converts periodic variables such as hourly and monthly information into periodic time features. The periodic time features are:

[0046] Here, T represents the period of the corresponding time variable. By using sine and cosine encoding, the time information at the beginning and end of a period can be kept continuous in the feature space, reducing non-physical numerical jumps at the boundaries of day-night or seasonal periods.

[0047] After completing the above feature calculations, the prediction equipment performs time alignment on historical photovoltaic output power, array average irradiance, ambient temperature, module temperature, panel temperature difference, spatial irradiance standard deviation, wind speed orthogonal component, and periodic time features according to the sampling time. Different features corresponding to the same sampling time are combined to form a feature vector, thereby obtaining a feature vector sequence.

[0048] Furthermore, the prediction device performs sliding window processing on the feature vector sequence with a preset input sequence length Lseq. When the t-th sampling time is taken as the end of the current input window, its temporal feature matrix is ​​expressed as:

[0049] Where Lseq represents the length of the input sequence, and Xt represents the temporal feature matrix formed with the t-th sampling time as the end of the window. For model training samples, a historical sequence of length Lseq can be truncated as the input window, and the actual photovoltaic output power of the next Lpred consecutive times after the input window can be truncated as the prediction label. The first feature tensor dimension formed by the input window can include the number of samples, the length of the historical sequence, and the number of input features.

[0050] Figure 6 The correlation analysis results between building-integrated photovoltaic (BIPV) output and different input characteristics are presented. In the sample shown, PV output power has a high correlation with irradiance, and also shows a significant correlation with the temperature difference between the panels and the standard deviation of spatial irradiance. Figure 7 The information gain quantization results based on the XGBoost tree model further illustrate the differences in the contribution of different input features to the prediction task. Irradiance is the main basic feature, while artificially constructed features such as plate temperature difference provide additional state information.

[0051] Through the above processing, in addition to basic meteorological information and historical photovoltaic output power, the thermal state of photovoltaic modules, the spatial irradiance non-uniformity state, the continuous wind direction state, and the periodic time state are further constructed. This makes the first feature tensor simultaneously include external environmental information, module thermal state information, spatial difference information corresponding to local shading and cloud movement, and periodic time information. This can improve the ability of input data in complex building environments to express the real power change mechanism and provide more sufficient input information for subsequent feature selection and multi-scale time series modeling.

[0052] After obtaining the first feature tensor, the prediction device determines the feature weights corresponding to each input feature based on a feature attention mechanism. Specifically, learnable gating information that is updated together with the model training process can be set for different input features in the first feature tensor, thereby obtaining a set of gating information corresponding to each input feature.

[0053] The prediction device inputs the input features from the first feature tensor along with the corresponding learnable gating information into the feature attention layer. The feature attention layer then generates soft gating values ​​for each input feature, resulting in a set of gating values. These gating values ​​describe the relative contribution of each input feature to the subsequent prediction process under the current input window state. Because the gating information can be updated during model training, the model can adjust the degree of influence of each input feature based on the correspondence between different operating states and photovoltaic power changes in the training samples.

[0054] The prediction device performs weight normalization on the set of gated values, converting the gated values ​​corresponding to each input feature into feature weights that can be used for feature weighting. Subsequently, each feature weight is weighted with the corresponding input feature in the first feature tensor to form the second feature tensor. For example... Figure 4 As shown, the first feature tensor is passed through the feature attention layer to obtain soft-gated weights, and then the purified feature matrix is ​​formed by gating multiplication. The purified feature matrix is ​​used as the input for the subsequent multi-scale temporal feature extraction process.

[0055] In practical operation, when changes in irradiance within the current input window dominate the changes in photovoltaic power, the features corresponding to irradiance can be given higher weights. When partial shading by buildings or cloud movement causes significant spatial irradiance unevenness, the influence of spatial irradiance difference features can be increased. When there is a significant correlation between the thermal state of the photovoltaic modules and power changes, the physical derivative features characterizing the thermal state of the photovoltaic modules can be given corresponding weights. These weight changes are determined by the trained feature attention mechanism based on the current input data, without the need for fixed feature weights.

[0056] Figure 6 and Figure 7 The correlation analysis and time-series feature information gain quantification results show that the contribution of each input feature to the prediction of building photovoltaic power varies. Therefore, by using learnable gating information to dynamically weight different input features, the model can retain basic meteorological information while utilizing physical derived features and spatial difference information.

[0057] Through the above processing, the feature weights of each input feature are dynamically determined based on the current input window using learnable gating information, and the feature weights are used to form a second feature tensor. This can highlight the input information that contributes significantly to the current photovoltaic power change before entering time series modeling, and reduce the influence of low-contribution variables and measurement noise, thereby improving the effectiveness and stability of subsequent multi-scale time series feature extraction.

[0058] like Figure 4 As shown, after obtaining the second feature tensor, the prediction device uses multiple temporal feature extraction paths with different temporal receptive fields to process the second feature tensor.

[0059] Specifically, the prediction device first extracts temporal features from the second feature tensor based on a first temporal receptive field to form first-scale temporal features. The first temporal receptive field is set to a relatively small time range, giving the corresponding temporal feature extraction structure strong local responsiveness. Therefore, the first-scale temporal features are mainly used to describe rapid power changes occurring within a short time range. In one specific implementation, the kernel size of the first temporal convolution branch can be set to 3 to enhance the response to phenomena such as cloud edge movement, building shadows sweeping across the array, and sudden changes in local irradiance.

[0060] The prediction device also extracts temporal features from the second feature tensor based on the second temporal receptive field, forming a second-scale temporal feature. The second temporal receptive field is larger than the first temporal receptive field. In one specific embodiment, the kernel size of the second temporal convolution branch can be set to 5, enabling the corresponding branch to extract the trends of irradiance change, component temperature evolution, and wind speed change over a relatively long time range, thereby forming the second-scale temporal feature.

[0061] Because short-duration abrupt changes and relatively slow trend changes may occur simultaneously within the same building-integrated photovoltaic (BIPV) operating period, the predictive equipment fuses first-scale and second-scale time-series features. This allows subsequent models to simultaneously obtain change information at different time scales, forming multi-scale time-series features. Figure 4 In the model structure shown, different receptive field convolutional branches process the same purified feature matrix in parallel, and after the branch processing is completed, they merge to form multi-scale temporal features for subsequent bidirectional temporal feature modeling.

[0062] Through the above processing, the relatively small first time receptive field is used to extract short-term abrupt changes caused by factors such as building shading and cloud movement, while the relatively large second time receptive field is used to extract longer time-series trends corresponding to changes in irradiance, module temperature, and wind field. By fusing the time-series information at the two scales, the problem that a single time receptive field cannot simultaneously represent rapid disturbances and slow trends can be reduced, and the model's ability to express time-series features when facing complex non-stationary building photovoltaic power sequences can be improved.

[0063] In the above-mentioned multi-scale temporal feature extraction process, the prediction device establishes corresponding temporal convolutional branches for the first and second temporal receptive fields, respectively. Each temporal convolutional branch takes the second feature tensor as input and uses different kernel sizes to form multiple parallel temporal convolutional branches. In a specific implementation, a small receptive field branch with a kernel size of 3 and a large receptive field branch with a kernel size of 5 can be used.

[0064] Multiple layers of dilated causal convolutions are set within each parallel temporal convolution branch. These dilated causal convolutions use only data from the current time position and prior to it during convolution computation, excluding data from the time position after the current time position, thus preserving the causal relationship in the temporal prediction process. The dilation coefficients of the multiple layers of dilated causal convolutions are set in an incremental manner. In one specific implementation, the dilation coefficients can be set sequentially to 1, 2, and 4 to progressively expand the temporal perception range without significantly increasing the number of network parameters.

[0065] Each parallel temporal convolutional branch processes the second feature tensor to obtain the corresponding branch temporal features. Layer normalization can be applied to these branch temporal features to reduce the impact of changes in hidden feature distribution across different training batches or time windows on model training. Simultaneously, residual connections are established within convolutional branches or at their output positions to allow input information to be passed across some convolutional processing layers to subsequent layers, thereby mitigating the gradient decay problem during training of deep temporal convolutional structures.

[0066] After completing layer normalization and residual connection processing, stable branch temporal features are obtained. Then, the stable branch temporal features corresponding to different receptive fields are fused to form multi-scale temporal features, and the multi-scale temporal features are sent to the subsequent bidirectional temporal feature modeling structure.

[0067] Through the above processing, the dilated causal convolution with progressively increasing dilation coefficients can expand the coverage of historical information while maintaining the causality of the time series. Parallel branches formed by different convolution kernel sizes can extract change patterns at different time scales. Furthermore, layer normalization and residual connections are used to improve the stability of the hidden feature distribution and the model training process. Thus, the ability to extract complex time series information of building photovoltaics can be enhanced without excessively increasing the number of parameters.

[0068] After obtaining multi-scale temporal features, the prediction device uses a bidirectional long short-term memory network to model the bidirectional temporal features. For example... Figure 4 As shown, the bidirectional long short-term memory network includes a forward long short-term memory network and a reverse long short-term memory network.

[0069] The prediction device first inputs the multi-scale temporal features corresponding to the current input window into the forward long short-term memory network in chronological order. The forward long short-term memory network gradually propagates the hidden states from the earlier historical moments of the current input window to the end of the window, thereby obtaining the forward hidden states corresponding to multiple time positions and forming a sequence of forward hidden states.

[0070] Simultaneously, within the current input window, the prediction device inputs multi-scale temporal features into the inverse long short-term memory network in the reverse chronological order. Hidden states are then passed from the end of the window to the beginning, resulting in an inverse hidden state sequence. It's important to note that the data processed by the inverse long short-term memory network all originates from the current input window—that is, historical operational and meteorological data acquired at the current prediction time. It does not use actual photovoltaic output power or actual meteorological data acquired after the current prediction time. Therefore, this reverse processing does not introduce future real data into the current prediction process.

[0071] For the same time position in the current input window, the prediction device concatenates the corresponding forward hidden state and reverse hidden state to obtain a fused hidden state that simultaneously contains information from two time processing directions, and the fused hidden state sequence is composed of the fused hidden states at each time position.

[0072] Subsequently, layer normalization is performed on the fused hidden state sequence to stabilize the numerical distribution of hidden states at different time points, resulting in a hidden state sequence. This hidden state sequence is then sent to the attention processing procedure related to subsequent prediction steps, where it is used to select hidden information that is highly relevant to the current prediction step from the entire historical input window.

[0073] Through the above processing, the forward long short-term memory network can extract the state evolution relationship of historical data from early to late, and the reverse long short-term memory network can supplement the historical context relationship from the end of the window to the beginning within the obtained historical input window. By fusing the forward and reverse hidden states, a hidden state sequence containing more complete historical dependency information is formed, while not introducing real information after the prediction time. This improves the ability to express long-distance historical dependencies in complex building photovoltaic time series changes.

[0074] After obtaining the hidden state sequence, the prediction device determines the target temporal features based on the prediction step information corresponding to the current prediction step. For example... Figure 4As shown, the hidden state sequence first undergoes feature mapping to form key features and corresponding value features. Key features describe the information available for retrieval from each hidden state in the historical input window, while value features carry the hidden information that is weighted and summarized after attention processing.

[0075] The prediction device further acquires the terminal hidden states in the hidden state sequence. The terminal hidden states correspond to the historical states of the current input window closest to the prediction start position and can be used to characterize the comprehensive temporal state near the current prediction start point.

[0076] For different prediction steps in multi-step prediction, the prediction device is configured with learnable step query vectors. Based on the current prediction step, a learnable step query vector corresponding to that step is selected to form the current step query information. The end hidden state of the hidden state sequence is then combined with the current step query information to obtain the query feature corresponding to the current prediction step. Therefore, even if multiple prediction steps use the same historical input window, their query features can change depending on the prediction step.

[0077] The prediction device performs attention relevance calculations based on query features and key features, obtaining attention weights for multiple attention heads. Each attention head can evaluate the correlation between the current query features and the historical hidden states within different feature representation spaces. Subsequently, the value features are weighted using the attention weights corresponding to each attention head to obtain multiple attention sub-features.

[0078] After processing each attention head, the multiple attention sub-features are concatenated, and a linear mapping is performed on the concatenation result to obtain the target temporal feature corresponding to the current prediction step. This target temporal feature serves as the input for subsequent power increment prediction.

[0079] Figure 8 Temporal attention heatmaps are presented for various rolling prediction tasks, including schemes A, B, C, and D. Under different historical window lengths and prediction steps, each prediction step forms a corresponding attention weight distribution. Figure 8 As shown in the sample, the focus positions of different prediction steps are not completely consistent, and the time positions of the input window that are close to the current prediction time can form relatively high attention weights. This indicates that by introducing prediction step information, the degree of attention to historical time positions can be adjusted according to the current prediction distance.

[0080] By combining the learnable step query vector corresponding to the current prediction step with the hidden state at the end of the input window through the above processing, different prediction steps form different query conditions, and the corresponding historical key information is dynamically selected from the same hidden state sequence accordingly. This avoids all future prediction steps using the same historical information aggregation results, enabling the target temporal features to adapt to different prediction distances and improving the temporal information matching ability of different prediction steps in short-term multi-step prediction.

[0081] like Figure 5 As shown, when configuring the building photovoltaic short-time multi-step rolling prediction model, the prediction device uses a combination of wide-space stochastic optimization and rolling origin time series cross-validation to determine the target hyperparameter combination.

[0082] First, determine the hyperparameters to be optimized and the candidate value ranges for each hyperparameter, thus establishing a hyperparameter search space. The hyperparameters to be optimized can include at least one of the following: hidden layer dimension, number of bidirectional long short-term memory (BSSM) network layers, convolutional kernel size, Dropout ratio, learning rate, weight decay coefficient, and number of attention heads. For different hyperparameters, discrete candidate sets, continuous value ranges, or preset candidate ranges can be set. Simultaneously, model structure constraints that different hyperparameters must satisfy can be set. For example, in the case where a multi-head attention structure directly processes the output of the BSSM network, the hidden feature dimension should satisfy a structural relationship that is divisible by the number of attention heads.

[0083] After completing the hyperparameter search space setup, initialize the current optimal verification error and the number of iterations. The current optimal verification error can be initialized to a preset large value or positive infinity, the current number of iterations is initialized to zero, and the maximum number of iterations is preset.

[0084] In each round of optimization, the prediction device randomly samples candidate hyperparameter combinations from the hyperparameter search space. Candidate hyperparameter combinations that do not meet the preset model structure constraints can be eliminated and resampled. A candidate prediction model is then instantiated based on candidate hyperparameter combinations that satisfy the structural constraints.

[0085] For the current candidate prediction model, multiple rolling validation datasets are established according to the temporal order of the original time series samples. Taking three-fold rolling origin time series cross-validation as an example, the following can be formed sequentially: a first training time window and a first validation time window, a second training time window and a second validation time window, and a third training time window and a third validation time window. Each validation time window is strictly located after the corresponding training time window, and the training time window is gradually expanded as the number of validation folds increases. Data that has not yet entered the current training time window and validation time window remains unused.

[0086] To further reduce information leakage caused by sliding window samples crossing the training and validation regions, a preset isolation length can be set between the training and validation time windows. Alternatively, the training and validation intervals corresponding to each fold can be determined first according to the original timeline, and then time-series sliding windows can be constructed within the training and validation intervals respectively, while deleting samples that cross the boundaries of the training and validation intervals.

[0087] For each rolling validation dataset, a candidate prediction model is trained using training data within the corresponding training time window, and then validated using validation data located after the training time window. This yields the mean squared error of validation for that rolling validation dataset. After validating multiple rolling validation datasets, the mean squared errors of each validation dataset are averaged to form the comprehensive validation error corresponding to the current candidate hyperparameter combination.

[0088] The prediction device compares the current comprehensive verification error with the previously recorded current best verification error. When the current comprehensive verification error is less than the current best verification error, the current comprehensive verification error is updated to the new current best verification error, and the current candidate hyperparameter combination is saved as the current best hyperparameter combination. When the current comprehensive verification error is not less than the previously recorded current best verification error, the original current best verification error and the current best hyperparameter combination are retained, thus obtaining the parameter update result for this round.

[0089] After completing one round of candidate hyperparameter combination evaluation, the current iteration number is updated, and it is determined whether the current iteration number has reached the preset maximum iteration number. If the preset maximum iteration number has not been reached, candidate hyperparameter combinations are randomly obtained again from the hyperparameter search space, and the candidate model construction, rolling origin time series cross-validation, comprehensive validation error calculation, and optimal hyperparameter combination update process are repeated. After reaching the preset maximum iteration number, the currently saved optimal hyperparameter combination is used as the target hyperparameter combination, and a prediction model for short-term multi-step rolling prediction of building photovoltaics is configured based on the target hyperparameter combination.

[0090] In a specific experimental approach, the maximum number of iterations can be set to 15. In each round, a set of candidate hyperparameter combinations that satisfy the model structure constraints is randomly generated, and three-fold rolling origin time series cross-validation is performed. The average value of the three-fold validation mean square error is used to evaluate the current candidate hyperparameter combination. After 15 rounds of optimization, the hyperparameter combination with the smallest average validation mean square error is output.

[0091] Figure 9 The training loss and validation error changes in the data are used to reflect the convergence of the determined model during the training and validation process; Figure 10The performance comparison results of the different models shown indicate that the prediction model with the target hyperparameter combination configuration achieves a higher coefficient of determination and reduces the relative prediction error on the experimental data shown.

[0092] Through the above processing, candidate hyperparameter combinations are obtained by random sampling within a wider hyperparameter search range, which can reduce the computational burden caused by exhaustively searching all hyperparameter combinations. At the same time, by evaluating candidate hyperparameter combinations through rolling origin time series cross-validation with the validation time window strictly located after the training time window, the original temporal order of building photovoltaic time series samples can be maintained, and the risk of future data entering the training process can be reduced. This improves the reliability of the target hyperparameter combination selection results and the generalization ability of the prediction model under different time stages and complex weather conditions.

[0093] like Figure 13 As shown in the embodiments of this application, a building photovoltaic (PV) short-time multi-step rolling prediction system is also provided. The system can be installed on a building energy management platform, a building PV inverter edge computing terminal, a microgrid energy management platform, or a cloud prediction server, and includes a data processing module, a feature construction module, a feature weighting module, a multi-scale time series extraction module, a bidirectional time series modeling module, a prediction step feature determination module, a residual anchoring prediction module, and a rolling prediction module. Figure 13 The functional modules in the system structure shown are configured according to the following data processing relationships.

[0094] The data processing module is used to acquire historical operating data of the building-integrated photovoltaic (BIPV) system and corresponding meteorological data. Historical operating data includes historical PV output power and sampling time information, while meteorological data may include irradiance, ambient temperature, module temperature, wind speed, wind direction, and other available building microclimate data. The data processing module also performs downsampling, outlier cleaning, missing data completion, effective time period filtering, dataset time-series partitioning, and normalization processing, and outputs the first time-series data.

[0095] The feature construction module receives the first time-series data output by the data processing module, and determines the physical derived features characterizing the thermal state of the photovoltaic module based on the component temperature and ambient temperature. It determines the spatial irradiance difference features based on multiple irradiance data corresponding to different spatial locations, determines the wind speed orthogonal component features based on wind speed and wind direction, and determines the periodic time features based on sampling time information. Then, it aligns the above features with the basic meteorological features and historical photovoltaic output power according to the sampling time, and forms the first feature tensor through the historical sliding window.

[0096] The feature weighting module receives the first feature tensor and determines the feature weights corresponding to different input features through the feature attention mechanism. It then uses the feature weights to weight the corresponding input features in the first feature tensor and outputs the second feature tensor.

[0097] The multi-scale temporal extraction module receives the second feature tensor and uses temporal convolutional branches corresponding to different temporal receptive fields to extract short-term local mutation features and trend features over a relatively long time range, respectively. The temporal features corresponding to different branches are then fused to output multi-scale temporal features. Each temporal convolutional branch can be further configured with dilated causal convolution, layer normalization, and residual connections.

[0098] The bidirectional temporal modeling module receives multi-scale temporal features and uses a forward long short-term memory network and a backward long short-term memory network to obtain forward hidden state sequences and backward hidden state sequences, respectively. These sequences are then concatenated and normalized to form the hidden state sequence. The backward long short-term memory network only processes historical data already obtained in the current input window.

[0099] The prediction step feature determination module receives the hidden state sequence, obtains key features and value features based on the hidden state sequence, and determines the query features by combining the terminal hidden state and the learnable step query vector corresponding to the current prediction step. Multiple attention sub-features are obtained through multi-head attention processing. After concatenating and mapping the multiple attention sub-features, the target temporal features corresponding to the current prediction step are output.

[0100] The residual anchoring prediction module receives the target time-series features, maps these features to the power increment corresponding to the current prediction step, and obtains the predicted power corresponding to the current prediction step based on the current anchoring power and the power increment. The first prediction step uses the actual photovoltaic output power at the end of the current input window as the anchoring power, and each subsequent prediction step uses the predicted power corresponding to the previous prediction step as the current anchoring power.

[0101] The rolling forecast module receives the predicted power for the current forecast step from the residual anchoring forecast module, and updates the current input window by combining it with the available meteorological data for the next forecast time. It then deletes the earliest data in the current input window to form an updated input window. The updated input window then re-enters the corresponding data processing link to execute the next forecast step, until the predicted building-integrated photovoltaic (BIPV) output power for multiple future times within the preset forecast time domain is obtained.

[0102] The modules can exchange first time series data, first feature tensor, second feature tensor, multi-scale time series features, hidden state sequence, target time series features, power increment and predicted power through the data bus, shared storage area or corresponding software interface inside the prediction device, so that the processing results can be used as the data basis for subsequent processing.

[0103] Through the modular structure described above, the data processing module and feature construction module can form time-series inputs suitable for complex operating scenarios of building photovoltaics. The feature weighting module and multi-scale time-series extraction module can filter effective input information and take into account both rapid disturbances and long-term change trends. The bidirectional time-series modeling module and prediction step feature determination module can utilize corresponding historical time-series information according to different prediction steps. The residual anchoring prediction module and rolling prediction module continuously form multi-step prediction results by predicting power changes and anchoring power. Thus, the stability of short-term multi-step prediction of building photovoltaics can be improved under conditions of building shading, local microclimate disturbances and rapid weather changes, and the accumulation of prediction errors generated during the rolling prediction process can be reduced.

[0104] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A building photovoltaic short-term multi-step rolling prediction method, characterized in that, The method includes: Historical operating data of the building photovoltaic system and meteorological data corresponding to the historical operating data are acquired. The historical operating data includes historical photovoltaic output power and sampling time information. The historical operating data and the meteorological data are preprocessed to obtain first time-series data. A first feature tensor is determined based on the first time series data. The first feature tensor includes basic meteorological features, physical derived features characterizing the thermal state of photovoltaic modules, spatial irradiance difference features, periodic time features, and historical photovoltaic output power. The feature weights corresponding to each input feature in the first feature tensor are determined based on the feature attention mechanism, and the first feature tensor is weighted according to the feature weights to obtain the second feature tensor. Temporal features are extracted from the second feature tensor under different receptive fields to obtain multi-scale temporal features, and bidirectional temporal feature modeling is performed on the multi-scale temporal features to obtain the hidden state sequence. Based on the prediction step information corresponding to the current prediction step, the target temporal features corresponding to the current prediction step are determined from the hidden state sequence; The power increment corresponding to the current prediction step is determined based on the target time series characteristics, and the predicted power corresponding to the current prediction step is determined based on the anchor power and the power increment. The anchor power corresponding to the first prediction step is the actual photovoltaic output power at the end of the current input window, and the anchor power corresponding to any prediction step after the first prediction step is the predicted power corresponding to the previous prediction step. The current input window is updated based on the predicted power corresponding to the current prediction step and the available meteorological data corresponding to the next prediction time, resulting in an updated input window. The prediction of the next prediction step is then performed based on the updated input window until the predicted output power of the building photovoltaic system at multiple future times is obtained.

2. The building photovoltaic short-term multi-step rolling prediction method according to claim 1, characterized in that, The preprocessing of the historical operational data and the meteorological data to obtain the first time-series data includes: The historical operational data and the meteorological data are downsampled according to a preset sampling window to obtain resampled time-series data. Based on the operating range and preset physical constraints of the building photovoltaic system, abnormal power data, abnormal zero value data and outlier data in the resampled time series data are corrected or cleared to obtain cleaned time series data. The short-term missing data in the cleaning time series data is interpolated and completed to obtain the completed time series data. Then, based on the preset irradiation conditions, the effective time period data is selected from the completed time series data to obtain the effective time series data. The effective time-series data is divided into training data, validation data, and test data according to the time sequence, and the normalization parameters are determined based on the training data to obtain the target normalization parameters. The training data, validation data, and test data are normalized based on the target normalization parameters to obtain the first time series data.

3. The building photovoltaic short-term multi-step rolling prediction method according to claim 1, characterized in that, The step of determining the first feature tensor based on the first time-series data includes: Based on the component temperature and ambient temperature in the first time series data, the temperature difference between the component temperature and the ambient temperature is determined, and the physical derived characteristics characterizing the thermal state of the photovoltaic module are obtained. Based on multiple irradiance data corresponding to different spatial locations of the photovoltaic array, the degree of irradiance dispersion between different spatial locations is determined, and the spatial irradiance difference characteristics are obtained. Based on the wind speed and wind direction in the first time series data, mutually orthogonal wind speed components are determined, and the characteristics of the orthogonal wind speed components are obtained. The periodic time feature is obtained by transforming the periodic variable based on the sampling time information. The basic meteorological features, the physical derived features, the spatial irradiance difference features, the wind speed orthogonal component features, the periodic time features, and the historical photovoltaic output power are time-aligned according to the sampling time to obtain a feature vector sequence; The first feature tensor is obtained by performing sliding window processing on the feature vector sequence based on a preset historical sequence length.

4. The building photovoltaic short-term multi-step rolling prediction method according to claim 1, characterized in that, The step of determining the feature weights corresponding to each input feature in the first feature tensor based on the feature attention mechanism, and then weighting the first feature tensor according to the feature weights to obtain the second feature tensor, includes: For each input feature in the first feature tensor, set corresponding learnable gating information to obtain a set of gating information; Based on the first feature tensor and the gating information set, the gating value corresponding to each input feature is determined to obtain the gating value set; The set of gated values ​​is subjected to weight normalization to obtain the feature weights corresponding to each input feature; The corresponding input features in the first feature tensor are weighted based on the feature weights to obtain the second feature tensor.

5. The building photovoltaic short-term multi-step rolling prediction method according to claim 1, characterized in that, The step of extracting temporal features from the second feature tensor under different receptive fields at different times yields multi-scale temporal features, including: Based on the first time receptive field, temporal features are extracted from the second feature tensor to obtain the first scale temporal features. The first scale temporal features are used to characterize the short-time power changes caused by building shading or changes in irradiance conditions. Based on a second time receptive field larger than the first time receptive field, temporal features are extracted from the second feature tensor to obtain second-scale temporal features. The second-scale temporal features are used to characterize the temporal change trend of irradiance, temperature or wind field over time. The first-scale temporal features and the second-scale temporal features are fused to obtain the multi-scale temporal features.

6. The building-integrated photovoltaics short-time multi-step rolling prediction method according to claim 5, characterized in that, The temporal feature extraction of the second feature tensor based on the first and second temporal receptive fields includes: Temporal convolutional branches corresponding to the first and second temporal receptive fields are constructed respectively to obtain multiple parallel temporal convolutional branches; In each of the parallel temporal convolution branches, the corresponding input data is processed by temporal convolution based on multi-layer causal convolution with progressively increasing dilation coefficients to obtain the branch temporal features corresponding to each of the parallel temporal convolution branches. The output of each causal convolution layer is determined only based on the input data at the current time and before the current time. The temporal features of each branch are normalized and residual connection is processed to obtain stable branch temporal features; The temporal features of each stable branch are fused to obtain the multi-scale temporal features.

7. The building-integrated photovoltaics short-time multi-step rolling prediction method according to claim 1, characterized in that, The step of performing bidirectional temporal feature modeling on the multi-scale temporal features to obtain the hidden state sequence includes: Based on the positive long short-term memory network, the multi-scale temporal features are processed in chronological order to obtain the positive hidden state sequence; Based on the reverse long short-term memory network, the multi-scale temporal features are processed in the current input window in the reverse order of time to obtain the reverse hidden state sequence. The data used by the reverse long short-term memory network is limited to the historical data already obtained in the current input window. The forward hidden state sequence and the reverse hidden state sequence are concatenated to obtain a fused hidden state sequence. The fused hidden state sequence is normalized to obtain the hidden state sequence.

8. The building-integrated photovoltaics short-time multi-step rolling prediction method according to claim 7, characterized in that, The step of determining the target temporal feature corresponding to the current prediction step from the hidden state sequence based on the prediction step information corresponding to the current prediction step includes: Based on the hidden state sequence, feature mapping is performed to obtain key features and value features; Obtain the terminal hidden state corresponding to the hidden state sequence, and determine the corresponding learnable step query vector according to the current prediction step to obtain the current step query information; The query feature corresponding to the current prediction step is determined based on the end hidden state and the current step query information; Based on the query features and the key features, the attention weights corresponding to multiple attention heads are determined to obtain an attention weight set. The value features are weighted based on the set of attention weights to obtain multiple attention sub-features; Multiple attention sub-features are concatenated and mapped to obtain the target temporal features corresponding to the current prediction step.

9. The building-integrated photovoltaics short-time multi-step rolling prediction method according to claim 1, characterized in that, The method further includes determining a target hyperparameter combination for short-time multi-step rolling prediction of building-integrated photovoltaics (BIPV), wherein determining the target hyperparameter combination includes: The hyperparameters to be optimized and the candidate value ranges corresponding to each hyperparameter to be optimized are determined to obtain the hyperparameter search space. Candidate hyperparameter combinations are randomly selected from the hyperparameter search space, and candidate prediction models are constructed based on the candidate hyperparameter combinations. The time series samples are divided into multiple training time windows and verification time windows corresponding to each training time window according to the time sequence, resulting in multiple rolling verification data groups. Each verification time window is located after the corresponding training time window, and the training time windows corresponding to different rolling verification data groups gradually expand along the time axis. The candidate prediction model is trained and validated based on each of the rolling validation data sets to obtain the validation error corresponding to each of the rolling validation data sets, and the comprehensive validation error corresponding to the candidate hyperparameter combination is determined based on each of the validation errors. The comprehensive verification error is compared with the current optimal verification error, and the current optimal verification error and the corresponding current optimal hyperparameter combination are updated according to the comparison result to obtain the parameter update result; If the current iteration count has not reached the preset maximum iteration count, candidate hyperparameter combinations are re-determined from the hyperparameter search space based on the parameter update results, and rolling verification is repeated; if the current iteration count has reached the preset maximum iteration count, the target hyperparameter combination is determined based on the parameter update results. A prediction model for short-term multi-step rolling prediction of building photovoltaics is configured based on the target hyperparameter combination.

10. A building-integrated photovoltaic (BIPV) short-time multi-step rolling forecasting system, characterized in that, The system includes: The data processing module is used to acquire historical operating data of the building photovoltaic system and meteorological data corresponding to the historical operating data. The historical operating data includes historical photovoltaic output power and sampling time information. The module preprocesses the historical operating data and the meteorological data to obtain first time-series data. The feature construction module is used to determine a first feature tensor based on the first time series data. The first feature tensor includes basic meteorological features, physical derived features characterizing the thermal state of photovoltaic modules, spatial irradiance difference features, periodic time features, and historical photovoltaic output power. The feature weighting module is used to determine the feature weights corresponding to each input feature in the first feature tensor based on the feature attention mechanism, and to perform weighting processing on the first feature tensor according to the feature weights to obtain the second feature tensor. The multi-scale temporal extraction module is used to extract temporal features from the second feature tensor under different temporal receptive fields to obtain multi-scale temporal features. A bidirectional temporal modeling module is used to perform bidirectional temporal feature modeling on the multi-scale temporal features to obtain a hidden state sequence. The prediction step feature determination module is used to determine the target temporal features corresponding to the current prediction step from the hidden state sequence based on the prediction step information corresponding to the current prediction step; The residual anchoring prediction module is used to determine the power increment corresponding to the current prediction step based on the target time series characteristics, and to determine the prediction power corresponding to the current prediction step based on the anchoring power and the power increment. The anchoring power corresponding to the first prediction step is the actual photovoltaic output power at the end of the current input window, and the anchoring power corresponding to any prediction step after the first prediction step is the prediction power corresponding to the previous prediction step. The rolling forecast module is used to update the current input window based on the predicted power corresponding to the current forecast step and the available meteorological data corresponding to the next forecast time, to obtain an updated input window, and to perform the forecast for the next forecast step based on the updated input window, until the building photovoltaic output power forecast results for multiple future times are obtained.