Short-term thermal load prediction method, system and equipment based on time sequence rolling correction and medium
By using a short-term heat load prediction method based on time-series rolling correction, the maximum information coefficient is used to screen feature parameters and construct a dual-model architecture. The method combines reinforcement learning algorithm for weighted fusion, which solves the problems of prediction accuracy and control precision in the heating system and achieves efficient operation of the heating system.
Patent Information
- Application Number
- CN202511531569.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2026-03-03
AI Technical Summary
Existing heating load forecasting methods struggle to balance macro-level trends and real-time fluctuations in load, lack the ability to utilize multiple heating parameters collaboratively, and lack a dynamic weighting correction mechanism, resulting in low forecast accuracy and imprecise system control.
A short-term heat load forecasting method based on time-series rolling correction is adopted. Feature parameters are selected by the maximum information coefficient, and day-ahead macro and inter-day micro forecasting modules are constructed. Reinforcement learning algorithm is used for weighted fusion, and the weights are dynamically adjusted to achieve rolling correction of the forecast values.
It improves the forecasting accuracy and control precision of the heating system, ensuring the economical and stable operation of the heating system and providing accurate day-ahead scheduling and real-time daytime control basis.
Smart Images

Figure CN121599181A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of short-term heating load forecasting technology, and in particular to a short-term heating load forecasting method, system, equipment and medium based on time-series rolling correction. Background Technology
[0002] With the continuous expansion of urban centralized heating, accurate heating load forecasting has become crucial for ensuring energy conservation and economic operation of the system. Short-term heating load forecasting can provide core basis for day-ahead scheduling and real-time adjustment of the heating system, directly affecting energy utilization efficiency and heating quality.
[0003] However, existing forecasting methods still have significant limitations. First, most methods use a single model for direct forecasting, making it difficult to simultaneously consider both the macro-level trend and real-time fluctuations of the load, resulting in limited forecast accuracy. Second, these methods typically only target the heat load value, failing to fully utilize the internal information of key heating parameters such as supply and return water temperatures, thus limiting the model's fine-tuning capabilities. Furthermore, traditional combined forecasting methods often use fixed weights, lacking a mechanism for dynamically adjusting weights based on real-time forecast results, making them prone to getting trapped in local optima and unable to achieve rolling corrections of forecast values, thus failing to meet the dual requirements of complex heating systems for both forecast accuracy and refined control. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a short-term heat load forecasting method, system, device, and medium based on time-series rolling correction to solve the problems of existing forecasting methods being unable to take into account both macro trends and real-time fluctuations, lacking the coordinated utilization of multiple heating parameters, and being difficult to achieve dynamic weight correction.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a short-term heat load forecasting method based on time-series rolling correction, comprising: collecting historical heating data and corresponding meteorological data and preprocessing them to obtain reference data; analyzing the reference data using the maximum information coefficient to obtain macro-prediction module parameters and micro-prediction module parameters respectively; inputting the macro-prediction module parameters and the micro-prediction module parameters into the day-ahead macro-prediction module and the day-ahead micro-prediction module respectively to predict the day-ahead heat load forecast sequence and key heating parameter values, and calculating the day-ahead real-time heat load forecast value using the key heating parameter values; and using a reinforcement learning algorithm to weightedly fuse the predicted values corresponding to the day-ahead heat load forecast sequence with the day-ahead real-time heat load forecast value to output the short-term heat load forecast value.
[0007] As a preferred embodiment of the short-term heat load forecasting method based on time-series rolling correction described in this invention, the step of collecting historical heating data and corresponding meteorological data and performing preprocessing includes: detecting outliers in the historical heating data and corresponding meteorological data using the box plot method, removing the detected outliers to form missing data; filling the missing data using the K-nearest neighbor interpolation method to obtain corrected data; and performing maximum and minimum value normalization processing on the corrected data to normalize all feature parameters in the corrected data to the [0,1] interval to obtain the reference data.
[0008] The beneficial effects of this preferred technical solution are as follows: Outlier detection and removal are achieved through box plotting, eliminating the interference of outlier data points on the prediction process; K-nearest neighbor interpolation is then used to fill in missing data, maintaining the integrity of the dataset; subsequently, maximum-minimum normalization is applied to unify all feature parameters to the [0,1] interval, resolving the problem of inconsistent dimensions among multiple features. These three steps form a complete data preprocessing workflow, improving the regularity and consistency of the data. The combined use of box plotting and K-nearest neighbor interpolation not only handles outliers but also fills in data gaps, while normalization makes feature parameters with different dimensions comparable.
[0009] As a preferred embodiment of the short-term heat load forecasting method based on time-series rolling correction described in this invention, the step of forecasting the day-ahead heat load forecast sequence includes: selecting heat load as the analysis target from the reference data, calculating the maximum information coefficient between the analysis target and the remaining parameters in the reference data one by one, and sorting the calculated maximum information coefficients in descending order to obtain a first set of coefficients; obtaining the top N maximum information coefficients in the first set of coefficients, and obtaining the corresponding parameters in the reference data through the N maximum information coefficients as parameters of the macro-prediction module; inputting the macro-prediction module parameters into a pre-trained day-ahead macro-prediction module for prediction, and outputting the heat load forecast values for the next 24 times of the forecast day, thus constituting the day-ahead heat load forecast sequence.
[0010] The beneficial effects of this preferred technical solution are as follows: by selecting heat load as the analysis target and calculating its maximum information coefficient with each parameter, a feature screening mechanism based on statistical correlation is established; by sorting the maximum information coefficients in descending order and selecting the top N parameters, the correlation between the input features and the prediction target is ensured; by inputting the parameters of the macro-prediction module into the day-ahead macro-prediction module, the direct prediction of the heat load sequence for the next 24 hours is realized; the entire method, through the combination of maximum information coefficient screening and model, constructs a complete calculation process from feature selection to load prediction, ensuring the quality of the input features required for day-ahead prediction, while meeting the needs of day-ahead scheduling for the full-day load prediction sequence.
[0011] As a preferred embodiment of the short-term heat load forecasting method based on time-series rolling correction described in this invention, the step of calculating the daytime real-time heat load forecast includes: selecting key heating parameters as analysis targets from the reference data, calculating the maximum information coefficient between the analysis targets and the remaining parameters in the reference data one by one, and sorting the calculated maximum information coefficients in descending order to obtain a second set of coefficients; obtaining the top M maximum information coefficients in the second set of coefficients, and obtaining the corresponding parameters in the reference data through the M maximum information coefficients as parameters of the micro-prediction module; inputting the micro-prediction module parameters into a pre-trained daytime micro-prediction module to predict multiple key heating parameter forecast values for future times; and indirectly calculating the daytime real-time heat load forecast value based on the predicted values of each key heating parameter through thermodynamic relationships.
[0012] The beneficial effects of this preferred technical solution are as follows: By selecting key heating parameters as analysis targets and calculating the maximum information coefficient, a correlation feature screening mechanism for multiple output parameters is established; by sorting in descending order and selecting the top M parameters to obtain the parameters of the micro-prediction module, the characteristic correlation required for the prediction of each key parameter is ensured; by inputting the parameters of the micro-prediction module into the daytime micro-prediction module, parallel prediction of multiple key parameters is realized; based on thermodynamic calculation formulas, the predicted values of each parameter are converted into heat load values, constructing a complete indirect prediction path from parameter prediction to load calculation; this indirect prediction method transforms the load prediction problem into the prediction of directly measurable heating parameters by utilizing the physical relationships between parameters within the heating system, thus utilizing the predictive capabilities of the model while maintaining the clarity of the physical meaning of the calculation process.
[0013] As a preferred embodiment of the short-term heat load forecasting method based on time-series rolling correction described in this invention, the step of using a reinforcement learning algorithm to weightedly fuse the predicted values corresponding to the daytime heat load forecasting sequence with the daytime real-time heat load forecasting values includes: establishing a target state matrix and an action state matrix respectively, wherein the target state matrix and the action state matrix are represented as follows: ; ; In the formula, S The target state matrix, a The action state matrix, The weights of the current macroeconomic forecasting module are as follows: The weights for the daytime micro-prediction module, The magnitude of the action is given; based on the pre-trained reinforcement learning strategy, the optimal action is selected for the current state, the optimal action is executed and the weight state is updated until the weight state converges, and the final optimal weight is output.
[0014] The beneficial effects of this preferred technical solution are as follows: by establishing a target state matrix with weight values as elements and an action state matrix with adjustment magnitude as elements, the continuous weight allocation problem is transformed into a discrete decision problem; based on a pre-trained reinforcement learning strategy, the optimal action is selected for the current state, and the weight state is updated by executing the action; by repeatedly executing the selection and update steps until the weight state converges, a stable optimal weight allocation scheme is obtained; this reinforcement learning-based weight allocation mechanism establishes a complete decision-making process from state recognition to action execution, guides the weight adjustment process through a pre-trained strategy, avoids the limitations of fixed weight allocation, and provides differentiated weight combinations for different prediction times, thereby achieving the rationality of weight allocation while maintaining the stability of the method.
[0015] As a preferred embodiment of the short-term heat load prediction method based on time-series rolling correction described in this invention, the step of selecting the optimal action for the current state based on a pre-trained reinforcement learning strategy includes: calculating a dynamic threshold. Where T is the current iteration number, and H and K are preset parameters; a random number is generated in the interval [0,1]. d and random number d With dynamic threshold Compare; when random numbers d Less than or equal to dynamic threshold When the action state matrix is selected, the optimal action recommended by the pre-trained reinforcement learning policy is selected; when the random number δ is greater than the dynamic threshold... At that time, an action is randomly selected from the action state matrix.
[0016] The beneficial effects of this preferred technical solution are: by calculating the dynamic threshold Establish a threshold mechanism related to the number of iterations to generate random numbers in the [0,1] interval. d and with dynamic threshold The comparison forms the basis for decision-making; when δ≤θ, the optimal action recommended by the pre-trained reinforcement learning strategy is selected, and when δ>θ, an action is randomly selected from the action state matrix; this mechanism makes the action selection highly random in the early stage of iteration, and gradually shifts to relying on the action recommended by the strategy as the number of iterations increases; by controlling the balance between exploration and utilization through dynamic threshold, the local optimum problem that may be caused by fixed strategies is avoided, and a self-regulating action selection mechanism based on the iterative process is established, providing an effective decision-making method for the weight optimization process.
[0017] As a preferred embodiment of the short-term heat load forecasting method based on time-series rolling correction described in this invention, the step of outputting the short-term heat load forecast value includes: combining the forecast value corresponding to the daytime heat load forecast sequence with the daytime real-time heat load forecast value using the optimal weight, and calculating the final corrected short-term heat load forecast value, as follows: ; In the formula, This is a short-term heat load forecast. This refers to the predicted value at the corresponding time in the day-ahead heat load prediction sequence. This refers to the predicted real-time daytime heat load value at the corresponding time.
[0018] The beneficial effect of this preferred technical solution is that it achieves optimal weighting. and Compared with the day-ahead heat load forecast values and real-time daytime heat load forecast By multiplying and then adding the results, a prediction fusion mechanism based on weighted allocation was established; a linear weighting formula was used. A mathematical combination of two forecast values was implemented, and the contribution of each forecast value to the final result was controlled by weight coefficients. This calculation method directly applies the weight allocation obtained from reinforcement learning to the fusion of forecast values, and constructs a complete calculation path from weight decision to result output. The linear combination method based on weight coefficients ensures the interpretability of the calculation process, so that the final forecast value includes both the macroscopic information of the day-ahead forecast and the microscopic changes of the real-time forecast, forming a load forecast result that comprehensively considers the forecast characteristics of different time scales.
[0019] Secondly, the present invention provides a short-term heat load prediction system based on time-series rolling correction, comprising: Data processing module: used to collect historical heating data and corresponding meteorological data of the heating system and perform preprocessing; Feature parameter filtering module: used to analyze the impact of the reference data on heating through the maximum information coefficient, and filter out macro-prediction module parameters and micro-prediction module parameters; Day-ahead heat load prediction module: used to input the parameters of the macro forecast module into the pre-trained day-ahead macro forecast module to predict the day-ahead heat load prediction sequence; Intraday heat load real-time prediction module: used to input the parameters of the micro-prediction module into the pre-trained intraday micro-prediction module, predict the key heating parameter values, and calculate the intraday real-time heat load prediction value through the key heating parameter values. Short-term heat load correction module: Used to perform weighted fusion of the predicted values in the daytime heat load prediction sequence and the daytime real-time heat load prediction values using a reinforcement learning algorithm, and output short-term heat load prediction values.
[0020] Thirdly, the present invention provides an electronic device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of a short-term heat load prediction method based on time-series rolling correction.
[0021] Fourthly, the present invention provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the short-term heat load prediction method based on time-series rolling correction.
[0022] Compared with existing technologies, the beneficial effects of this invention are as follows: By constructing a dual-model architecture that combines day-ahead macroscopic forecasting and day-to-day microscopic forecasting, the day-ahead macroscopic forecasting module directly predicts the 24-hour heat load sequence, while the day-to-day microscopic forecasting module predicts key heating parameters, thus establishing a forecasting system that takes into account both long-term trends and short-term fluctuations; based on maximum information coefficient analysis, the feature parameters with the highest correlation are selected for heat load and key heating parameters, forming an input feature set for multi-parameter collaborative forecasting, which fully utilizes the physical correlation characteristics of parameters within the heating system; a reinforcement learning algorithm is used to establish a decision-making mechanism with weight values as states and adjustment magnitudes as actions, and a weight allocation scheme that adaptively adjusts according to the forecasting effect is achieved by controlling the balance between exploration and utilization through dynamic threshold control; combined with outlier detection, missing value filling, and normalization in the data preprocessing stage, a complete technical link from data cleaning, feature selection, dual-model forecasting to dynamic fusion is constructed. Through weighted fusion, the macroscopic forecast values and real-time forecast values are combined with optimal weights to form a load forecasting result that comprehensively considers different time scales and multi-parameter characteristics, solving the limitations of traditional methods in terms of forecasting accuracy and system adaptability. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a schematic diagram of the overall process of a short-term heat load prediction method based on time-series rolling correction according to an embodiment of the present invention. Detailed Implementation
[0025] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0026] Example 1, referring to Figure 1 As an embodiment of the present invention, a short-term heat load prediction method based on time-series rolling correction is provided, including steps S100 to S400: S100: Collect historical heating data and corresponding meteorological data, and preprocess them to obtain reference data.
[0027] S200. The reference data is analyzed using the maximum information coefficient to obtain the parameters of the macro-prediction module and the micro-prediction module, respectively.
[0028] S300. Input the parameters of the macro forecast module and the micro forecast module into the daytime macro forecast module and the daytime micro forecast module respectively to predict the daytime heat load forecast sequence and key heating parameter values, and calculate the daytime real-time heat load forecast value through the key heating parameter values.
[0029] S400: The reinforcement learning algorithm is used to weight and fuse the predicted values in the daytime heat load prediction sequence with the real-time heat load prediction values during the daytime to output the short-term heat load prediction values.
[0030] It should be noted that heat load forecasting is a core component of efficient heating system operation. Historical heating data of the heating system is closely related to meteorological data (temperature, humidity, wind speed, etc.) and has time-series characteristics. In actual operation, meteorological conditions change dynamically, historical data is easily affected by noise, and data preprocessing is quite difficult. At the same time, the day-ahead macro trend of heat load differs significantly from the day-to-day micro fluctuation characteristics. Traditional forecasting modules cannot simultaneously meet the accuracy requirements of both, which can easily lead to forecasting errors, thereby affecting the energy utilization rate and heating stability of the heating system. Therefore, accurate forecasting of short-term heat load is crucial.
[0031] Therefore, to address the aforementioned problems of difficulty in preprocessing heat load forecast data, insufficient adaptability of macro and micro models, and low forecast accuracy, the following steps (S100-S400) are used to collect and preprocess historical heating and meteorological data. Macro and micro model parameters are obtained through maximum information coefficient analysis, and daytime macro forecasting and daytime micro forecasting modules are constructed respectively. Then, the forecast results are weighted and fused using a reinforcement learning algorithm to achieve effective processing of heat load data, solve the model adaptability problem caused by differences in macro and micro characteristics, improve the accuracy of short-term heat load forecasting, provide accurate basis for daytime scheduling and daytime real-time control of the heating system, and ensure the economical and stable operation of the heating system.
[0032] Example 2, refer to Figure 1 As an embodiment of the present invention, based on the above embodiment, a short-term heat load prediction method based on time-series rolling correction is provided.
[0033] In this embodiment of the application, the step S100, which involves collecting historical heating data and corresponding meteorological data and performing preprocessing, includes steps A1 to A3: A1. Outlier detection is performed on historical heating data and corresponding meteorological data using the box plot method, and the detected outliers are removed to form missing data. First, an initial sample set is constructed based on the collected historical heating data and meteorological data. In this embodiment, historical heating data and meteorological data of the past 30 days are collected. The historical heating data includes water supply temperature, return water temperature, circulating water flow rate and heat load, while the meteorological data includes weather conditions, ambient temperature, wind speed, humidity and total solar radiation intensity. This initial sample set contains 9 characteristic parameters. Since the daytime micro-prediction module in step S300 needs to output key heating parameter values hourly, in order to ensure the consistency of data on the time scale, this embodiment sets the sampling time interval to 1 hour. Therefore, each feature parameter has a total of 24×30=720 data samples, which together form a data matrix of 9 rows and 720 columns. Then, the box plot method is used to detect outliers in the initial sample set. Specifically, the lower quartile Q1, upper quartile Q3, and interquartile range IQR are calculated for each of the 9 feature parameters. The reasonable value range of each feature parameter is [Q1-1.5×IQR, Q3+1.5×IQR]. Any sample point that exceeds the reasonable value range is judged as an outlier. Finally, all outliers are removed from the initial sample set to form a missing data set containing data gaps.
[0034] A2. Use the K-nearest neighbor interpolation method to fill in the missing data to obtain the corrected data; First, for each sample with a missing value, calculate the Euclidean distance between itself and other samples in the missing data across all nine feature parameter spaces. Select the K nearest neighbors as its nearest neighbors; in this embodiment, K=5, meaning five nearest neighbor samples are selected. Then, for the feature parameter corresponding to the current missing position, calculate a weighted average of the values of these five nearest neighbors on that feature as the imputation estimate for the current missing value. The weights are set to the reciprocal of the corresponding Euclidean distance to ensure that, in the feature space measured by Euclidean distance, closer neighbors contribute more to the imputation value. This process is repeated for all missing data positions to complete the imputation of all missing values, ultimately forming complete, missing-free corrected data.
[0035] A3. Perform maximum and minimum value normalization on the corrected data, normalize each feature parameter in the corrected data to the [0,1] interval, and obtain the reference data. Specifically, the nine feature parameters in step A1 are processed separately: for each feature parameter, the minimum value of that parameter in all 720 samples is calculated. and maximum value Then, for each sample value under each feature parameter, the following transformation is performed: ; In the formula, The value after normalization. The original feature values are used, and at this point, all sample values of each feature parameter are linearly mapped to the interval [0,1], ultimately resulting in reference data with a uniform scale for each feature parameter.
[0036] In an optional implementation, step S100, which involves collecting historical heating data and corresponding meteorological data and performing preprocessing, can also construct an initial dataset containing the past 30 days with a sampling interval of 1 hour. The feature parameters also include nine dimensions: supply water temperature, return water temperature, circulating water flow rate, heat load, weather conditions, ambient temperature, wind speed, humidity, and total solar radiation intensity. During the anomaly detection phase, the isolated forest algorithm is used to independently score each feature parameter, setting an anomaly score threshold of 0.6. Sample points with scores higher than the anomaly score threshold are identified as outliers and removed, forming a missing dataset. To address the missing data problem, a random forest multiple imputation method is used: for each missing feature parameter, a random forest regression model is constructed with itself as the non-target variable, trained using other feature parameters, iteratively generating 5 complete datasets. The average of the imputation results is then used as the final imputation value, forming a corrected dataset. Finally, the Z-score normalization method is used to convert the value of each feature into a distribution with a mean of 0 and a standard deviation of 1, ensuring all feature parameters are on the same scale, thus completing data preprocessing and generating reference data.
[0037] In this embodiment of the application, the step of predicting the day-ahead heat load forecast sequence in step S300 includes B1 to B3: B1. Select heat load as the analysis target from the reference data, calculate the maximum information coefficient between the analysis target and the remaining parameters in the reference data one by one, and sort the calculated maximum information coefficients in descending order to obtain the first set of coefficients. The "heat load" characteristic parameter in the reference data obtained in step A3 is set as the analysis target and denoted as variable G. Then, the remaining eight parameters in the reference data (supply water temperature, return water temperature, circulating water flow rate, weather conditions, ambient temperature, wind speed, humidity, and total solar radiation intensity) are used as characteristic parameters to be evaluated, denoted as P1 to P8 respectively. Next, the maximum information coefficient method is used to calculate the relationship between the analysis target Y and each characteristic parameter P. i The correlation between (i=1,2,...,8) is calculated as follows: For each characteristic parameter (G, P) to be analyzed i ), with characteristic parameter P i The numerical sequence of data is used as the x-axis, and the numerical sequence of the target data G is used as the y-axis. All 720 data sample points are plotted on a two-dimensional plane to form a two-dimensional scatter plot. Then, various grid divisions with different resolutions are performed on the scatter plot (e.g., trying different combinations of rows and columns). For each division scheme, the number of all data sample points falling into each grid cell is counted, thus obtaining the discrete joint distribution of the sample points under the current resolution grid division. Based on this discrete joint distribution, the relationship between the target data G and the characteristic parameter P is calculated. i Given the mutual information value under the current grid partitioning, we iterate through pre-defined grid partitioning schemes to find the optimal partitioning that maximizes the mutual information value. Then, we normalize the mutual information value under the optimal partitioning to obtain a maximum information coefficient between 0 and 1. The larger the maximum information coefficient, the stronger the characteristic parameter P. i The stronger the correlation with the analysis target G, the better; finally, the 8 largest information coefficients are sorted in descending order of size to obtain the first set of coefficients.
[0038] B2. Obtain the N largest information coefficients in the first set of coefficients, and use the N largest information coefficients to obtain the corresponding parameters in the reference data as parameters for the macro forecasting module. First, a feature selection threshold N is set. In this embodiment, N=5. Therefore, the top 5 largest information coefficients are extracted from the first coefficient set obtained in step B1. Each largest information coefficient is calculated with a specific feature parameter P. iBy clearly identifying the correspondences, the characteristic parameters associated with these five maximum information coefficients are directly determined. For example, if these five maximum information coefficients correspond to characteristic parameters P5 (ambient temperature), P8 (total solar radiation intensity), P2 (return water temperature), P3 (circulating water flow rate), and P1 (supply water temperature), it means that these five characteristic parameters are the key influencing factors most strongly correlated with heat load. Ultimately, these five characteristic parameters are determined as parameters for the macroscopic prediction module.
[0039] B3. Input the parameters of the macro forecast module into the pre-trained day-ahead macro forecast module for forecasting, and output the heat load forecast values for the next 24 hours of the forecast day, forming the day-ahead heat load forecast sequence. In this embodiment, the day-ahead macro forecasting module uses a pre-trained XGBoost model. When using the XGBoost model for forecasting, the values of five key parameters—ambient temperature, total solar radiation intensity, return water temperature, circulating water flow rate, and supply water temperature—for the next 24 hours of the forecast day are input into the pre-trained XGBoost model. The XGBoost model will then output hourly heat load forecasts for the next 1 to 24 hours in sequence. These 24 consecutive hourly forecasts are arranged in chronological order and together constitute the final day-ahead heat load forecast sequence.
[0040] In an optional implementation, the predicted daytime heat load sequence obtained in step S300 can also be used to calculate the importance score of each feature parameter to the heat load using the random forest algorithm based on the reference data obtained in step A3: with heat load as the prediction target, a random forest model containing 100 decision trees is constructed. The importance of each feature is quantified by calculating the average reduction in impurity across all trees, and the top 5 features with the highest importance scores (such as ambient temperature, total solar radiation intensity, return water temperature, circulating water flow rate, and supply water temperature) are selected as the key feature set. Subsequently, time series samples are constructed based on the key feature set. The sliding window method is used to reconstruct the time series data of the corresponding key features in the preprocessed reference data into an input sequence containing 6 consecutive time steps, each time step containing the above 5 key features. These time series samples are input into a long short-term memory network for training. The long short-term memory network adopts a single hidden layer structure containing 50 memory units, and the Adam optimizer is used to minimize the mean squared error loss. During the prediction phase, key feature data from the six consecutive hours of the day before the prediction date are input into the trained LSTM model. The LSTM model captures temporal dependencies through its internal memory units and directly outputs hourly heat load predictions for the next 24 hours, forming a complete day-ahead heat load prediction sequence.
[0041] In this embodiment of the application, the step of calculating the predicted real-time daytime heat load in step S300 includes C1 to C4: C1. Select key heating parameters from the reference data as the analysis target, calculate the maximum information coefficient between the analysis target and the remaining parameters in the reference data one by one, and sort the calculated maximum information coefficients in descending order to obtain the second set of coefficients. In this embodiment, the three key heating parameters—supply water temperature, return water temperature, and circulating water flow rate—are taken as analysis targets and denoted as variables, respectively. , and For each analysis target, the remaining parameters in the reference data (including heat load, weather conditions, ambient temperature, wind speed, humidity, and total solar radiation intensity) are used as the feature parameters to be evaluated. Then, the same maximum information coefficient method as in step B1 is used to calculate the correlation between each analysis target and each feature parameter one by one. For each pair of feature parameters, a two-dimensional scatter plot is constructed with the feature parameter as the abscissa and the analysis target as the ordinate. The maximum mutual information value is found by using multiple grid divisions and normalized to obtain the maximum information coefficient between 0 and 1. After completing all calculations, the set of maximum information coefficients corresponding to each analysis target (supply water temperature, return water temperature, and circulating water flow rate) is obtained. The coefficients in each set are arranged in descending order of numerical value to obtain the second set of coefficients.
[0042] C2. Obtain the M largest information coefficients in the second set of coefficients, and use the M largest information coefficients to obtain the corresponding parameters in the reference data as parameters for the micro-prediction module. In this embodiment, considering the requirements for feature precision in real-time daytime prediction, the M-value for supply water temperature is set to 5, the M-value for return water temperature to 4, and the M-value for circulating water flow rate to 6. Then, the top M largest information coefficients are extracted from their respective coefficient sets. Through this correspondence, the feature variables associated with these largest information coefficients are determined. For example, for supply water temperature... The five selected features may include ambient temperature, total solar radiation intensity, heat load, return water temperature, and humidity. Finally, the corresponding micro-prediction module parameters are determined for each of the three key heating parameters.
[0043] C3. Input the parameters of the micro-prediction module into the pre-trained daytime micro-prediction module to predict the predicted values of multiple key heating parameters for future times. In this embodiment, the daytime micro-prediction module employs three independent LSTNet-MA models, corresponding to the prediction of supply water temperature, return water temperature, and circulating water flow rate, respectively. During real-time prediction, the parameter values of each micro-prediction module corresponding to a future time i are input into the corresponding trained LSTNet-MA model. Each LSTNet-MA model outputs the predicted values of key heating parameters at time i, including the predicted supply water temperature. Predicted return water temperature and the predicted value of circulating water flow .
[0044] C4. Based on the predicted values of each key heating parameter, the predicted value of real-time daytime heat load is indirectly calculated through thermodynamic relationships. Based on the principle of energy conservation in thermodynamics, in this embodiment, the predicted real-time daytime heat load is indirectly calculated using the following formula. : in, The value represents the predicted heat load at time i, in kilowatts; C is the specific heat capacity of water, which is 4.187 kJ per kilogram of degree Celsius. Let i be the predicted circulating water flow rate at time i, in tons per hour; and These are the predicted supply water temperature and return water temperature at time i, respectively, in degrees Celsius. The formula is divided by 3600 to convert the energy unit from kilojoules per hour to kilowatts. Through the above calculations, the key heating parameters obtained directly from the forecast are converted into the predicted real-time heat load values during the day.
[0045] In an optional implementation, the daytime real-time heat load prediction calculated in step S300 can also select three key parameters—supply water temperature, return water temperature, and circulating water flow rate—from the reference data in step A3 as direct prediction targets, while retaining heat load and other parameters as feature variables. Three independent prediction models are established using the gradient boosting decision tree algorithm, each employing 50 decision trees with a maximum depth of 6 layers. Overfitting is prevented using an early stopping method. During the prediction phase, the feature parameters at the current moment are input into these three trained gradient boosting decision tree models, which then output the predicted supply water temperature for future moments. Predicted return water temperature and circulating water flow forecast Subsequently, these predicted values are input into a physical information network, which will then process the thermodynamic relationships. As a physical constraint embedded in the network structure, the physical information network contains two fully connected layers with 32 and 16 neurons respectively. Using the ReLU activation function, the prediction results of the decision tree model are improved through end-to-end training and gradient fine-tuning. This ensures that the model maintains both the accuracy of the data-driven model and the physical consistency with the laws of thermodynamics, ultimately outputting a physically constrained and optimized real-time daytime heat load prediction. .
[0046] In this embodiment of the application, step S400, which uses a reinforcement learning algorithm to weight and fuse the predicted values in the daytime heat load prediction sequence with the real-time daytime heat load prediction values, includes steps D1 to D2: D1. Establish the target state matrix and the action state matrix respectively. The target state matrix and the action state matrix are represented as follows: ; ; In the formula, S The target state matrix, a The action state matrix, The weights of the current macroeconomic forecasting module are as follows: The weights for the daytime micro-prediction module, The magnitude of the movement; Establish the target state matrix for the reinforcement learning algorithm S and action state matrix a Target state matrix S It is a row vector containing two weight values, and the action-state matrix. a The weight adjustment operations are defined. In this embodiment, the initial target state matrix S=[0.5,0.5] is set, indicating that the outputs of the daytime macroscopic prediction module and the daytime microscopic prediction module are given equal importance in the initial stage of fusion; the action state matrix a=[+0.05,-0.05] is set, that is, the magnitude of the action. This indicates that in a particular decision-making process, one can choose to... Increase by 0.05 (at the same time) (Reduced by 0.05 accordingly), or... Reduce by 0.05 (at the same time) (Increase by 0.05 accordingly) to dynamically adjust the contribution of the forecast results of the day-ahead macro forecast module and the day-ahead micro forecast module to the final fusion result.
[0047] D2. Based on the pre-trained reinforcement learning strategy, select the optimal action for the current state, execute the optimal action and update the weight state until the weight state converges, and output the final optimal weight. In this embodiment, a weight optimization strategy is constructed using the Q-learning reinforcement learning algorithm. At each decision time t, the system observes the current weight state. A dynamic balancing strategy is employed to select actions from a preset action set. After executing the selected action, the system enters a new state. The system immediately calculates a reward value, which is the negative square of the difference between the fused predicted value and the actual observed value; the smaller the difference, the higher the reward. Through continuous iteration and interaction with the environment, the system accumulates experience and updates its decision-making strategy until the fluctuation range of the weight state is less than 10 over 20 consecutive training cycles. -4 This indicates that the weight state has reached stable convergence. At this point, the weight values of the daytime macro forecast module and the daytime micro forecast module are output as the optimal weights.
[0048] In an optional implementation, step S400, which uses a reinforcement learning algorithm to weight and fuse the predicted values in the daytime heat load forecast sequence with the real-time daytime heat load forecast values, can also construct a state space with four dimensions: in addition to the prediction weights of the daytime macro forecast module, the state space can also be constructed. Prediction weights of the daytime micro-prediction module In addition, the recent average relative error of the day-ahead macro forecasting module and the day-to-day micro forecasting module is also introduced. , As state parameters, they form the state vector. A deep deterministic policy gradient algorithm is employed. The Actor network uses a two-layer fully connected structure, containing 64 and 32 neurons respectively. The Critic network fuses state and action information and then calculates the value function through a three-layer network. The reward function is designed as follows: ,in To merge the predicted values, These are actual observed values. The magnitude of the weight change, and The balancing coefficients are set to 0.8 and 0.2 respectively. In actual deployment, the weights are adjusted every 15 minutes. When the weight changes for 10 consecutive adjustments are all less than 0.01 and the fusion error remains within 5%, the convergence state is considered to be reached, and the optimal weight combination is output. Used for final prediction fusion.
[0049] In this embodiment of the application, the step S400, which involves selecting the optimal action for the current state based on a pre-trained reinforcement learning policy, includes E1~E2: E1, Calculate dynamic threshold , where T is the current iteration number, and H and K are preset parameters; In this embodiment, H is the basic threshold parameter used to control the initial tendency of exploration, set to 0.8, and K is the decay adjustment coefficient, set to 100, whose function is to adjust the dynamic threshold as the number of iterations T increases. Gradually decrease. Through the above design, the dynamic threshold... The value will gradually decrease from the initial value as the learning process progresses, realizing the strategy shift from exploration-oriented in the early stage to utilization-oriented in the later stage.
[0050] E2. Generate a random number δ in the interval [0,1], and then combine the random number δ with the dynamic threshold. The comparison is performed when the random number δ is less than or equal to the dynamic threshold. At that time, the optimal action recommended by the pre-trained reinforcement learning policy is selected from the action-state matrix, when the random number δ is greater than the dynamic threshold. At that time, an action is randomly selected from the action state matrix; First, a number δ is uniformly and randomly generated within the numerical interval [0,1]. Then, the random number δ is compared with a dynamic threshold θ, and the corresponding action is performed to select a branch based on the comparison result: When δ≤θ, the action state matrix defined in step D1 is used directly. In this process, the optimal action recommended by the pre-trained reinforcement learning strategy, which is expected to have the highest long-term reward, is selected and executed. When δ > θ, the action state matrix defined in step D1 is used. Randomly select an action to execute.
[0051] In an optional implementation, the step S400, where the pre-trained reinforcement learning strategy is used to select the optimal action for the current state, can also be achieved by establishing a dynamic exploration mechanism instead of a fixed threshold comparison method. Specifically, the implementation is as follows: First, an exploration probability function guided by prediction error is constructed. ,in This represents the exponential moving average of recent changes in the fusion prediction error. As the prediction error continues to increase, the exploration probability is automatically increased. At each decision point, the value of each action in the action-state matrix defined in step D1 is evaluated using both a real-time updated value evaluation module and a value reference module with a delayed update mechanism. The difference between the two evaluation results is used as a measure of uncertainty. When the difference in evaluation results exceeds a preset threshold of 0.1, actions with higher uncertainty are prioritized for exploration. When the difference in evaluation results converges to below the threshold, the optimal action is selected according to a deterministic strategy. In addition, this exploration mechanism also considers a time decay factor γ=0.95, allowing the exploration probability to decay naturally as the training progresses. In practical applications, the system updates the exploration strategy parameters every 10 training cycles. When the action selection remains consistent for 30 consecutive decisions and the fluctuation range of the value function is less than 0.005, the strategy is considered to have reached a stable state.
[0052] In this embodiment of the application, the step of outputting the short-term heat load forecast value in step S400 includes combining the corresponding forecast value in the daytime heat load forecast sequence with the daytime real-time heat load forecast value with the optimal weight to calculate the final corrected short-term heat load forecast value. The calculation method is as follows: ; In the formula, This is a short-term heat load forecast. These are the predicted values for the corresponding time points in the day-ahead heat load forecast sequence. This represents the predicted real-time daytime heat load for the corresponding time. Extract the predicted value for the target time from the day-ahead heat load forecast sequence output in step B3, and denot it as... Simultaneously, obtain the daytime real-time heat load forecast value output in step C4 at the same time, denoted as... The optimal weight combination obtained through reinforcement learning optimization in step D2 is then used. As fusion coefficients, W1 corresponds to the weights of the daytime macroeconomic forecast module, and W2 corresponds to the weights of the daytime microeconomic forecast module; based on these inputs, according to The short-term heat load forecast for that moment is calculated.
[0053] In summary, by constructing a dual-model architecture that combines day-ahead macroscopic forecasting and day-to-day microscopic forecasting, a forecasting system that considers both long-term trends and short-term fluctuations is established. The day-ahead macroscopic forecasting module directly predicts the 24-hour heat load sequence, while the day-to-day microscopic forecasting module predicts key heating parameters. Based on maximum information coefficient analysis, the feature parameters with the highest correlation are selected for heat load and key heating parameters, forming an input feature set for multi-parameter collaborative forecasting, fully utilizing the physical correlation characteristics of parameters within the heating system. A reinforcement learning algorithm is used to establish a decision-making mechanism with weight values as states and adjustment magnitudes as actions. Dynamic threshold control balances exploration and utilization, achieving an adaptive weight allocation scheme based on forecast performance. Combined with outlier detection, missing value imputation, and normalization in the data preprocessing stage, a complete technical chain is constructed from data cleaning, feature selection, dual-model forecasting to dynamic fusion. Weighted fusion combines macroscopic and real-time forecast values with optimal weights, forming a load forecasting result that comprehensively considers different time scales and multi-parameter characteristics, overcoming the limitations of traditional methods in terms of forecast accuracy and system adaptability.
[0054] Example 3 illustrates a schematic scheme for a short-term heat load forecasting method based on time-series rolling correction. It should be noted that the technical solution of this short-term heat load forecasting system based on time-series rolling correction is based on the same concept as the aforementioned short-term heat load forecasting method based on time-series rolling correction. Details not described in detail in this embodiment can be found in the description of the aforementioned short-term heat load forecasting method based on time-series rolling correction.
[0055] This embodiment also provides a short-term heat load forecasting system based on time-series rolling correction, including: Data processing module: used to collect historical heating data and corresponding meteorological data of the heating system and perform preprocessing; Feature parameter filtering module: used to analyze the impact of reference data on heating through the maximum information coefficient, and to filter out parameters for macro-prediction module and micro-prediction module; Day-ahead heat load forecasting module: This module takes parameters from the macro forecasting module and inputs them into the pre-trained day-ahead macro forecasting module to predict the day-ahead heat load forecasting sequence. Intraday heat load real-time prediction module: Used to input the parameters of the micro-prediction module into the pre-trained intraday micro-prediction module, predict the key heating parameter values, and calculate the intraday real-time heat load prediction value through the key heating parameter values. Short-term heat load correction module: This module uses a reinforcement learning algorithm to weight and fuse the predicted values in the daytime heat load forecast sequence with the real-time daytime heat load forecast values, and outputs short-term heat load forecast values.
[0056] This embodiment also provides an electronic device suitable for short-term heat load forecasting based on time-series rolling correction, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the short-term heat load forecasting method based on time-series rolling correction as proposed in the above embodiment.
[0057] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the short-term heat load prediction method based on time-series rolling correction as proposed in the above embodiments.
[0058] The storage medium proposed in this embodiment and the short-term heat load prediction method based on time-series rolling correction proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0059] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0060] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A short-term heat load forecasting method based on time-series rolling correction, characterized in that, include: Historical heating data and corresponding meteorological data are collected and preprocessed to obtain reference data; By analyzing the reference data using the maximum information coefficient, the parameters of the macro-prediction module and the micro-prediction module are obtained respectively. The parameters of the macro-prediction module and the parameters of the micro-prediction module are respectively input into the daytime macro-prediction module and the daytime micro-prediction module to predict the daytime heat load prediction sequence and key heating parameter values, and the daytime real-time heat load prediction value is calculated through the key heating parameter values. A reinforcement learning algorithm is used to weight and fuse the predicted values in the daytime heat load prediction sequence with the real-time heat load prediction values during the day to output short-term heat load prediction values.
2. The short-term heat load forecasting method based on time-series rolling correction as described in claim 1, characterized in that, The steps for collecting and preprocessing historical heating data and corresponding meteorological data include: Outlier detection was performed on historical heating data and corresponding meteorological data using box plots, and the detected outliers were removed to form missing data. The missing data is filled using the K-nearest neighbor interpolation method to obtain corrected data; The corrected data is subjected to maximum and minimum value normalization processing, and each feature parameter in the corrected data is normalized to the [0,1] interval to obtain the reference data.
3. The short-term heat load forecasting method based on time-series rolling correction as described in claim 2, characterized in that, The steps to obtain the day-ahead heat load forecast sequence include: Select heat load as the analysis target from the reference data, calculate the maximum information coefficient between the analysis target and the remaining parameters in the reference data one by one, and sort the calculated maximum information coefficients in descending order to obtain the first coefficient set; Obtain the N largest information coefficients in the first set of coefficients, and use the N largest information coefficients to obtain the parameters corresponding to the reference data as parameters for the macro forecasting module. The parameters of the macro forecasting module are input into the pre-trained day-ahead macro forecasting module for prediction, and the predicted heat load values for the next 24 hours of the forecast day are output, forming the day-ahead heat load prediction sequence.
4. The short-term heat load forecasting method based on time-series rolling correction as described in claim 3, characterized in that, The steps for calculating the predicted real-time daytime heat load include: Key heating parameters are selected from the reference data as analysis targets. The maximum information coefficient between the analysis targets and the remaining parameters in the reference data is calculated one by one. The calculated maximum information coefficients are then sorted in descending order to obtain a second set of coefficients. Obtain the top M largest information coefficients in the second set of coefficients, and use the M largest information coefficients to obtain the parameters corresponding to the reference data as parameters of the micro-prediction module. By inputting the parameters of the micro-prediction module into the pre-trained daytime micro-prediction module, the predicted values of several key heating parameters for future times are obtained. Based on the predicted values of the key heating parameters, the predicted value of the real-time daytime heat load is indirectly calculated through thermodynamic relationships.
5. The short-term heat load forecasting method based on time-series rolling correction as described in claim 4, characterized in that, The steps of using a reinforcement learning algorithm to weight and fuse the predicted values in the daytime heat load prediction sequence with the real-time daytime heat load prediction values include: A target state matrix and an action state matrix are established respectively, and the target state matrix and the action state matrix are represented as follows: ; ; In the formula, S The target state matrix, a The action state matrix, The weights of the current macroeconomic forecasting module are as follows: The weights for the daytime micro-prediction module, The magnitude of the movement; The pre-trained reinforcement learning strategy selects the optimal action for the current state, executes the optimal action and updates the weight state until the weight state converges, and outputs the final optimal weight.
6. The short-term heat load forecasting method based on time-series rolling correction as described in claim 5, characterized in that, The steps for selecting the optimal action for the current state based on a pre-trained reinforcement learning policy include: Calculate dynamic threshold , where T is the current iteration number, and H and K are preset parameters; Generate a random number in the interval [0,1]. δ and random number δ With dynamic threshold Compare; When the random number δ is less than or equal to the dynamic threshold When the action state matrix is in use, the optimal action recommended by the pre-trained reinforcement learning strategy is selected. When the random number δ is greater than the dynamic threshold At that time, an action is randomly selected from the action state matrix.
7. The short-term heat load forecasting method based on time-series rolling correction as described in claim 6, characterized in that, The steps for generating short-term heat load forecasts include: The final corrected short-term heat load forecast value is calculated by combining the corresponding forecast value in the daytime heat load forecast sequence with the daytime real-time heat load forecast value using the optimal weight. The calculation method is as follows: ; In the formula, This is a short-term heat load forecast. This refers to the predicted value at the corresponding time in the day-ahead heat load prediction sequence. This refers to the predicted real-time daytime heat load value at the corresponding time.
8. A short-term heat load forecasting system based on time-series rolling correction, using the method described in any one of claims 1-7, characterized in that, include: Data processing module: used to collect historical heating data and corresponding meteorological data of the heating system and perform preprocessing; Feature parameter filtering module: used to analyze the impact of the reference data on heating through the maximum information coefficient, and filter out macro-prediction module parameters and micro-prediction module parameters; Day-ahead heat load prediction module: used to input the parameters of the macro forecast module into the pre-trained day-ahead macro forecast module to predict the day-ahead heat load prediction sequence; Intraday heat load real-time prediction module: used to input the parameters of the micro-prediction module into the pre-trained intraday micro-prediction module, predict the key heating parameter values, and calculate the intraday real-time heat load prediction value through the key heating parameter values. Short-term heat load correction module: Used to perform weighted fusion of the predicted values in the daytime heat load prediction sequence and the daytime real-time heat load prediction values using a reinforcement learning algorithm, and output short-term heat load prediction values.
9. An electronic device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the short-term heat load prediction method based on time-series rolling correction as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the short-term heat load forecasting method based on time-series rolling correction as described in any one of claims 1 to 7.