A method and system for predicting indoor temperature based on return water temperature of a central heating system
Patent Information
- Application Number
- CN202611000529.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-07
- Publication Date
- 2026-09-29
AI Technical Summary
[0005]有鉴于此,本发明旨在提出一种基于集中供热系统回水温度的室内温度预测方法和系统,以解决如何在不过度依赖室内温度传感器的前提下,充分利用管网侧易于获取的回水温度、供水温度及室外温度等参数,实现对室内温度的可靠预测的问题
本发明针对集中供热系统中室内温度难以实时获取这一问题,提出了一套完整的间接预测技术路径。其不依赖于大规模部署室内温度传感器,而是利用供热管网侧已普遍安装的回水温度、供水温度及室外温度等易测参数,通过挖掘回水温度与室内温度之间客观存在的热力学耦合关系,实现对室内温度的间接推算。本发明首先解决了回水温度与室内温度之间动态时变滞后关系的量化问题。供热系统中,回水温度的变化需要经过管网输配、末端散热、建筑蓄热等一系列环节才能传导至室内温度,因此两者之间存在显著的相位滞后,且该滞后时长并非固定常数,而是随着供热工况、昼夜交替、用户调节行为等因素发生动态偏移。本发明采用基于秩变换的互相关分析方法,通过对两序列进行一阶差分消除趋势性成分后,将差分值转换为百分比秩序列,再计算秩域互相关函数,从而在不受异常值和非线性单调变换影响的条件下,稳健地识别出最优滞后时长。在此基础上,进一步引入滑动时间窗口,沿时间轴逐段分析滞后时长的局部变化规律,形成对滞后动态特性的完整描述,并据此对模型输入的时间窗宽度进行自适应调整,确保历史观测数据始终与当前有效热延迟对齐。
Smart Images

Figure CN122834898A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of smart heating, and in particular relates to a method for predicting indoor temperature based on the return water temperature of a centralized heating system. Background Technology
[0002] Central heating is a crucial urban infrastructure for ensuring residents' basic living needs, and the operational quality of the heating system directly impacts user comfort and urban energy consumption. In practice, heating companies can readily obtain hydraulic parameters such as supply and return water temperature, flow rate, and pressure from the primary and secondary pipe networks. However, indoor temperature, the ultimate indicator for evaluating heating effectiveness, is difficult to collect on a large scale and in real-time due to factors such as high sensor deployment costs, limited communication transmission conditions, and user privacy requirements. This data gap not only deprives heating regulation of direct feedback but also easily leads to excessive fluctuations in room temperature, decreased user thermal comfort, and ultimately, unnecessary energy waste. Currently, most intelligent control solutions in the heating industry focus on the following areas: First, supply water temperature regulation based on climate compensation algorithms, which involves pre-setting target values for supply water temperature based on outdoor temperature change curves; second, heating load prediction based on outdoor meteorological parameters or historical load data to guide heat generation planning on the heat source side; and third, closed-loop control strategies for supply and return water temperatures, which maintain the temperature difference between the secondary network supply and return water within a set range by adjusting valve opening or circulation pump frequency. While these methods achieve energy-saving operation to some extent, they fail to establish a direct mapping relationship between return water temperature and indoor temperature, thus making it impossible to obtain accurate room temperature data when indoor temperature sensors are lacking. Once sensors are insufficiently deployed or malfunction, the heating system loses effective end-point feedback and can only rely on empirical rules for extensive regulation, easily leading to problems such as control lag, fluctuating room temperature, and energy waste.
[0003] Furthermore, even attempting to infer indoor temperature using return water temperature faces several inherent technical challenges. First, the relationship between return water temperature and indoor temperature is not a simple synchronous correspondence, but rather exhibits a dynamic, time-varying lag. Due to the hydraulic transport delay of the pipe network, the thermal inertia of the building envelope, and changes in day-night heating strategies, the lag duration is not fixed, making it difficult for traditional fixed-delay models to accurately describe this time-shifted matching relationship. Second, the heat transfer process in the heating system exhibits significant nonlinear characteristics, such as radiative heat transfer, convective heat transfer, and the dynamic response of the heat storage body. Traditional time-series analysis methods, such as autoregressive moving average models and exponential smoothing, cannot effectively characterize this complex nonlinear dynamic behavior. Third, the actual collected pipe network data often suffers from varying degrees of missing data and noise interference, such as sensor drift, communication packet loss, and abnormal operating conditions. These factors significantly reduce the robustness of the prediction model, making it difficult for existing methods to achieve high-precision and stable room temperature prediction in engineering applications.
[0004] In summary, how to reliably predict indoor temperature by making full use of readily available parameters such as return water temperature, supply water temperature, and outdoor temperature from the pipeline network without over-reliance on indoor temperature sensors has become a key technical challenge that urgently needs to be addressed in the field of centralized heating system operation and control. Summary of the Invention
[0005] In view of this, the present invention aims to propose an indoor temperature prediction method and system based on the return water temperature of a centralized heating system, in order to solve the problem of how to make full use of parameters such as return water temperature, supply water temperature and outdoor temperature that are easily obtained from the pipeline network side without over-relying on indoor temperature sensors, so as to achieve reliable prediction of indoor temperature.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: an indoor temperature prediction method based on the return water temperature of a centralized heating system, the method comprising: Step S1: Obtain hourly time-series operation data of the centralized heating system. The time-series operation data includes synchronously sampled measured return water temperature sequence, supply water temperature sequence, outdoor temperature sequence, and indoor temperature calibration value sequence. Step S2: Preprocess the time-series running data to obtain the analysis dataset; Step S3: Perform first-order difference on the pre-processed return water temperature sequence and indoor temperature calibration value sequence to obtain two difference sequences. Arrange the elements in each difference sequence according to their numerical values and assign them a ranking in the sequence. Then divide the ranking by the sequence length to convert it into a percentage order column with values between zero and one. Within the preset lag step search range, calculate the rank domain cross-correlation coefficient of the two percentage order columns under different lag step lengths. Take the lag step length corresponding to the absolute value of the rank domain cross-correlation coefficient reaching the maximum value as the benchmark lag time. Move along the time axis with a fixed-length sliding window at a fixed step length. Repeat the above rank transformation and rank domain cross-correlation coefficient calculation in each window to obtain the local optimal lag value corresponding to each window, forming a dynamic fluctuation distribution of lag time changing with time. Step S4: Using the baseline lag duration as the time window width, extract continuous multi-step historical observations of return water temperature and related operating parameters from the analysis dataset, and construct a three-dimensional time-series input tensor with dimensions of sample number multiplied by time window width multiplied by feature dimension; integrate physical relationship-guided interactive features on the feature dimension; Step S5: Input the three-dimensional temporal input tensor into the trained GRU-Attention prediction model and output the indoor temperature prediction value at the current time or future time.
[0007] Furthermore, a preferred method is proposed, wherein in step S3, the percentage order column is calculated as follows: the elements in each difference sequence are sorted in ascending order of value to obtain the ranking number of each element, and then the ranking number is divided by the total effective length of the sequence, and the resulting ratio is the percentage order column value corresponding to the element.
[0008] Furthermore, a preferred method is proposed, wherein in step S3, the rank-domain cross-correlation coefficient is calculated as follows: for a given lag step size k, the ratio of the product of the covariance and the standard deviation of the two percentage order series after being misaligned by k time steps is calculated, and the lag step size search range is 0 to 24 time steps; when the absolute value of the rank-domain cross-correlation coefficient is within a certain lag step size... When the value reaches its maximum, determine The baseline lag time.
[0009] Furthermore, a preferred method is proposed, wherein in step S3, the length of the sliding window is the number of time steps corresponding to 7 to 14 days, and the step size is the number of time steps corresponding to 12 to 24 hours; when the dynamic fluctuation distribution indicates that the lag time has shifted with the heating conditions, the benchmark lag time is updated by rolling the locally optimal lag value obtained from the most recent sliding window, so that the historical observation window in the three-dimensional time series input tensor is always aligned with the current effective thermal delay of the return water temperature to the indoor temperature.
[0010] Furthermore, a preferred method is proposed, wherein step S4 further includes: calculating the Pearson correlation coefficients between the parameters in the dataset and generating a correlation coefficient matrix; selecting parameters whose absolute values of the Pearson correlation coefficients with the return water temperature sequence or the indoor temperature calibration value sequence are not less than 0.3 and retaining them as the initial feature set; and removing redundant parameters whose absolute values of the correlation coefficients with the return water temperature sequence are less than 0.15.
[0011] Furthermore, a preferred approach is proposed, wherein the GRU-Attention prediction model has a feature splicing and fusion structure on the input side: the original measured features, the first difference of return water temperature, the first difference of supply water temperature, the first difference of indoor temperature, the first difference of supply and return water temperature difference, and the interaction features guided by the physical relationship are spliced along the feature dimension and then fed into the GRU layer. The hidden state sequence of the GRU layer is calculated by the Attention layer for the attention weights at each time step and then weighted and summed, and finally mapped to scalar prediction values by the fully connected layer. The GRU layer is set to two layers, with the first layer having 64 to 128 hidden units and the second layer having 32 to 64 hidden units. The output hidden state sequence of the two GRU layers is sent to the Attention layer. The Attention layer calculates an attention score for the hidden state at each time step. The attention score is obtained by adding a tanh activation function to a fully connected layer, and then normalized to a weight by softmax. The weighted sum of the hidden states at each time step is used as the weighted context vector and fed into the fully connected layer. The fully connected layer is set to two layers. The first layer has 8 to 16 neurons connected to an activation function, and the second layer is a single-neuron output layer that outputs the predicted indoor temperature value.
[0012] Furthermore, a preferred method is proposed, wherein the sampling interval of the time-series running data is 60 minutes, the data obtained in step S1 covers at least one complete heating season, and the total amount of data is not less than 1000 effective time steps; the method for obtaining the indoor temperature calibration value sequence is as follows: a small number of indoor temperature sensors are deployed in a sparse manner within the area under the jurisdiction of the heating system, and the true value of indoor temperature is collected only within a certain calibration period to construct supervised training samples. After the calibration period ends, the sensors are removed or maintained at the minimum number. In the pure inference stage, the indoor temperature prediction value is continuously output by the trained GRU-Attention prediction model based solely on the return water temperature, supply water temperature and outdoor temperature on the pipeline side.
[0013] Based on the same inventive concept, this invention also proposes an indoor temperature prediction system based on the return water temperature of a centralized heating system, the system comprising: The data acquisition unit is used to acquire hourly time-series operational data of the centralized heating system. The preprocessing unit is used to preprocess the time-series running data to obtain the analysis dataset; The dynamic lag relationship determination unit performs first-order difference on the pre-processed return water temperature sequence and the indoor temperature calibration value sequence to obtain two difference sequences. The elements in each difference sequence are arranged according to their numerical values and assigned a ranking in the sequence. The ranking is then divided by the sequence length to transform it into a percentage order column with values between zero and one. Within a preset lag step search range, the rank domain cross-correlation coefficients of the two percentage order columns are calculated one by one under different lag step lengths. The lag step length corresponding to the absolute value of the rank domain cross-correlation coefficient reaching the maximum value is taken as the benchmark lag time. The unit moves along the time axis with a fixed-length sliding window at a fixed step length. The above rank transformation and rank domain cross-correlation coefficient calculation are repeated in each window to obtain the local optimal lag value corresponding to each window, forming a dynamic fluctuation distribution of lag time as it changes over time. The data interaction unit is used to extract continuous multi-step historical observations of return water temperature and related operating parameters from the analysis dataset, using the benchmark lag time as the time window width, and construct a three-dimensional time series input tensor with the dimension being the number of samples multiplied by the time window width multiplied by the feature dimension; and to fuse physical relationship-guided interaction features on the feature dimension. The prediction unit is used to input the three-dimensional time-series input tensor into the trained GRU-Attention prediction model and output the indoor temperature prediction value at the current time or future time.
[0014] Based on the same inventive concept, the present invention also proposes a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes an indoor temperature prediction method based on the return water temperature of a centralized heating system as described in any of the preceding claims.
[0015] Based on the same inventive concept, the present invention also proposes a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of any of the above-described methods for predicting indoor temperature based on the return water temperature of a centralized heating system.
[0016] Compared with the prior art, the beneficial effects of the present invention are: This invention addresses the challenge of obtaining real-time indoor temperature data in centralized heating systems by proposing a comprehensive indirect prediction technology. Instead of relying on large-scale deployment of indoor temperature sensors, it utilizes readily measurable parameters already installed on the heating network, such as return water temperature, supply water temperature, and outdoor temperature. By exploring the objectively existing thermodynamic coupling relationship between return water temperature and indoor temperature, it achieves indirect estimation of indoor temperature. This invention first solves the problem of quantifying the dynamic time-varying lag relationship between return water temperature and indoor temperature. In heating systems, changes in return water temperature require a series of steps, including network distribution, terminal heat dissipation, and building heat storage, before reaching the indoor temperature. Therefore, there is a significant phase lag between the two, and this lag is not a fixed constant but dynamically shifts with factors such as heating conditions, day-night cycles, and user adjustment behaviors. This invention employs a rank-transform-based cross-correlation analysis method. After eliminating trend components by performing first-order differencing on the two sequences, the difference values are converted into percentage order columns, and then the rank-domain cross-correlation function is calculated. This robustly identifies the optimal lag duration without being affected by outliers or nonlinear monotonic transformations. Based on this, a sliding time window is further introduced to analyze the local variation of lag duration segment by segment along the time axis, forming a complete description of the lag dynamic characteristics. Accordingly, the width of the time window input to the model is adaptively adjusted to ensure that historical observation data is always aligned with the current effective thermal delay.
[0017] This invention introduces a feature interaction mechanism guided by physical relationships at the input of the prediction model. A model driven solely by time-series data is prone to overfitting to surface data patterns, resulting in significant prediction biases when heating conditions fluctuate. Therefore, this invention, based on the original measured features, explicitly calculates combined features with clear thermodynamic meanings, such as the supply and return water temperature difference, the difference between the return water temperature and the outdoor temperature, the indoor and outdoor temperature difference, and their temporal accumulation within the lag window. These combined features are then concatenated and fused with the original features and first-order difference features before being fed into the subsequent deep learning network. This allows the model to directly utilize physical laws to constrain the feature space during the learning process, enhancing its ability to model the nonlinear heat transfer process of the heating system. Finally, a prediction framework combining gated recurrent units and a self-attention mechanism is employed. The gated recurrent unit effectively captures long-term temporal dependencies, suitable for the cumulative impact of historical operating conditions on the current room temperature in the heating system; the self-attention mechanism automatically selects the key moments that contribute most to the current prediction across multiple lag time steps, assigning them higher weights, thereby improving the model's adaptability to lag structures. The synergy between the two enables the model to handle long sequences while focusing on the most informative time segments.
[0018] This invention significantly reduces the hardware deployment and maintenance costs for indoor temperature acquisition. Traditional solutions require the installation of temperature sensors in each heat user or representative room, along with supporting communication equipment and power supply maintenance, which represents a huge investment for large heating areas. This invention only requires collecting existing parameters such as return water temperature and supply water temperature on the heating network side, supplemented by a very small number of indoor temperature sensors to obtain supervisory signals during a short calibration phase. After the model training is completed, it can operate independently without indoor sensors, fundamentally reducing the number of sensors and maintenance workload.
[0019] This invention significantly improves the accuracy and stability of indoor temperature prediction. Experimental results show that the prediction model constructed in this invention is significantly better than the comparative schemes based on bidirectional long short-term memory networks or temporal convolutional networks in terms of root mean square error and mean absolute error. Moreover, the prediction results have lower dispersion, indicating that the model not only has high accuracy but also good generalization performance and can maintain stable prediction performance under different operating conditions.
[0020] This invention has the ability to effectively compensate for missing indoor temperature data. When the indoor temperature sensor stops working due to malfunction, communication interruption, or user privacy protection requirements, this invention can continuously output a reliable room temperature estimate based on real-time data from the pipeline network, filling the data gap and ensuring that the heating control system does not fall into a state of blind adjustment due to the loss of feedback signals.
[0021] This invention exhibits excellent cross-community migration and generalization capabilities. The model trained by this invention can be directly reused or requires only minor adjustments to achieve satisfactory prediction results between different communities under the same heating company's jurisdiction, or between different zones within the same community, avoiding the high cost of separate modeling for each heating area. Attached Figure Description
[0022] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a flowchart of an indoor temperature prediction method based on the return water temperature of a centralized heating system, as described in this invention. Figure 2 This is a schematic diagram of the GRU-Attention prediction model structure described in this invention; Figure 3 This is a flowchart illustrating the dataset partitioning and model training process described in this invention. Detailed Implementation
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present invention can be combined with each other, and the described embodiments are only some embodiments of the present invention, not all embodiments.
[0024] Implementation Method 1: This implementation method addresses the problem of how to reliably predict indoor temperature by fully utilizing readily available parameters such as return water temperature, supply water temperature, and outdoor temperature from the pipeline network without over-reliance on indoor temperature sensors. It proposes an indoor temperature prediction method based on the return water temperature of a centralized heating system. The method includes: Step S1: Obtain hourly time-series operation data of the centralized heating system. The time-series operation data includes synchronously sampled measured return water temperature sequence, supply water temperature sequence, outdoor temperature sequence, and indoor temperature calibration value sequence. Step S2: Preprocess the time-series running data to obtain the analysis dataset; Step S3: Perform first-order difference on the pre-processed return water temperature sequence and indoor temperature calibration value sequence to obtain two difference sequences. Arrange the elements in each difference sequence according to their numerical values and assign them a ranking in the sequence. Then divide the ranking by the sequence length to convert it into a percentage order column with values between zero and one. Within the preset lag step search range, calculate the rank domain cross-correlation coefficient of the two percentage order columns under different lag step lengths. Take the lag step length corresponding to the absolute value of the rank domain cross-correlation coefficient reaching the maximum value as the benchmark lag time. Move along the time axis with a fixed-length sliding window at a fixed step length. Repeat the above rank transformation and rank domain cross-correlation coefficient calculation in each window to obtain the local optimal lag value corresponding to each window, forming a dynamic fluctuation distribution of lag time changing with time. Step S4: Using the baseline lag duration as the time window width, extract continuous multi-step historical observations of return water temperature and related operating parameters from the analysis dataset, and construct a three-dimensional time-series input tensor with dimensions of sample number multiplied by time window width multiplied by feature dimension; integrate physical relationship-guided interactive features on the feature dimension; Step S5: Input the three-dimensional temporal input tensor into the trained GRU-Attention prediction model and output the indoor temperature prediction value at the current time or future time.
[0025] In step S2 of this embodiment, the preprocessing includes missing value imputation, outlier identification and correction based on statistical criteria, and wavelet denoising. The missing value imputation is as follows: linear interpolation is used to fill small gaps in the time series whose consecutive missing length does not exceed a preset threshold, and random forest regression is used to fill consecutive missing segments that exceed the preset threshold; the outlier identification and correction based on statistical criteria is as follows: the mean and standard deviation of each parameter sequence are calculated, and sampling points that deviate from the mean by more than three times the standard deviation are identified as outliers and replaced with the mean or median of the effective values before and after that point; the wavelet denoising process uses the db2 wavelet basis to perform multi-layer wavelet decomposition on each parameter sequence, filters out high-frequency noise subbands, and then reconstructs the sequence.
[0026] In step S3 of this embodiment, the percentage order column is calculated as follows: sort the elements in each difference sequence in ascending order of value to obtain the ranking number of each element, and then divide the ranking number by the total effective length of the sequence. The resulting ratio is the percentage order column value corresponding to that element.
[0027] Furthermore, in step S3, the rank-domain cross-correlation coefficient is calculated as follows: for a given lag step size k, the ratio of the product of the covariance and the standard deviation of the two percentage order series after a misalignment of k time steps is calculated, where the lag step size search range is 0 to 24 time steps; when the absolute value of the rank-domain cross-correlation coefficient is within a certain lag step size... When the value reaches its maximum, determine The baseline lag time.
[0028] Furthermore, in step S3, the length of the sliding window is the number of time steps corresponding to 7 to 14 days, and the step size is the number of time steps corresponding to 12 to 24 hours. When the dynamic fluctuation distribution indicates that the lag time has shifted with the heating conditions, the benchmark lag time is updated by rolling the locally optimal lag value obtained from the most recent sliding window, so that the historical observation window in the three-dimensional time series input tensor is always aligned with the current effective thermal delay of the return water temperature to the indoor temperature.
[0029] In this embodiment, step S4 further includes: calculating the Pearson correlation coefficient between each parameter in the dataset and generating a correlation coefficient matrix; selecting parameters whose absolute value of the Pearson correlation coefficient with the return water temperature sequence or the indoor temperature calibration value sequence is not less than 0.3 and retaining them as the initial feature set; and removing redundant parameters whose absolute value of the correlation coefficient with the return water temperature sequence is less than 0.15 and do not constitute a direct causal relationship for heat transfer in a physical sense.
[0030] In this embodiment, the GRU-Attention prediction model has a feature splicing and fusion structure on the input side: the original measured features, the first difference of return water temperature, the first difference of supply water temperature, the first difference of indoor temperature, the first difference of supply and return water temperature difference, and the interaction features guided by the physical relationship are spliced along the feature dimension and sent to the GRU layer. The hidden state sequence of the GRU layer is calculated by the Attention layer for the attention weights of each time step and then weighted and summed, and finally mapped to the scalar prediction value by the fully connected layer. The GRU layer is set to two layers, with the first layer having 64 to 128 hidden units and the second layer having 32 to 64 hidden units. The output hidden state sequence of the two GRU layers is sent to the Attention layer. The Attention layer calculates an attention score for the hidden state at each time step. The attention score is obtained by adding a tanh activation function to a fully connected layer, and then normalized to a weight by softmax. The weighted sum of the hidden states at each time step is used as the weighted context vector and fed into the fully connected layer. The fully connected layer is set to two layers. The first layer has 8 to 16 neurons connected to an activation function, and the second layer is a single-neuron output layer that outputs the predicted indoor temperature value.
[0031] The GRU-Attention prediction model uses mean squared error as the loss function and employs the Adam optimizer for parameter optimization. The analysis dataset is divided into a training set (60% to 80%), a validation set (10% to 20%), and a test set (10% to 20%) in chronological order. During training, the loss is monitored on the validation set to prevent overfitting. After training, the accuracy is evaluated on the test set using mean absolute error and root mean square error. Model weight parameters that meet the accuracy requirements are saved.
[0032] In this embodiment, the sampling interval of the time-series running data is 60 minutes, and the data obtained in step S1 covers at least one complete heating season, with a total data volume of no less than 1000 effective time steps. The method for obtaining the indoor temperature calibration value sequence is as follows: a small number of indoor temperature sensors are deployed in a sparse manner within the area under the jurisdiction of the heating system, and the true indoor temperature value is collected only within a certain calibration period to construct supervised training samples. After the calibration period ends, the sensors are removed or maintained at the minimum number. In the pure inference stage, the indoor temperature prediction value is continuously output by the trained GRU-Attention prediction model, which relies solely on the return water temperature, supply water temperature and outdoor temperature of the pipeline side.
[0033] Implementation Method 2, see below Figures 1 to 3This embodiment describes a complete implementation of the indoor temperature prediction method based on the return water temperature of a centralized heating system described in Embodiment 1, including: Step 1: Data Acquisition and Raw Dataset Construction. Information regarding return water temperature, supply water temperature, outdoor temperature, and indoor temperature in the heating system is collected hourly and sorted chronologically to form the raw time-series dataset.
[0034] Step 2: Standardize and preprocess the original time series dataset to obtain the analysis dataset. The method includes: using linear interpolation for continuous small-range missing data in the time series, and using random forest interpolation to complete data in complex missing scenarios; using the 3σ principle to identify and correct outliers in the data to reduce the impact of abnormal fluctuations on model training; and using db2 wavelet decomposition to denoise the time series to reduce the impact of acquisition noise on model stability.
[0035] Step 3: Quantify the dynamic lag relationship between return water temperature and indoor temperature. The method includes: using a cross-correlation function based on rank transform theory to measure the time-shift matching degree between return water temperature and indoor temperature, and introducing a sliding time window to analyze the dynamic change law of lag time, thereby verifying and determining the lag parameters suitable for the heating system.
[0036] The specific steps are as follows: (1) Return water temperature sequence, indoor temperature sequence is , Where N is the length of the dataset being analyzed, N≥1000; The measured value of the return water temperature at time t; Let t be the measured indoor temperature at time t.
[0037] (2) Perform first-order difference processing to obtain a stationary sequence: , .in , These are the first-order difference stationary sequences of return water temperature and indoor temperature, respectively.
[0038] (3) Perform percentage-rank transformation on the difference stationary sequence: , The arithmetic mean of a rank-transformed sequence: , .in express Ranking in the return water temperature series ; express Ranking in the return water temperature series .
[0039] (4) Calculate the first-order difference CCF after rank transformation ( ), where k is the lag time, and the search range is 0-24 time steps:
[0040] in, Let be the percentage-rank transformed value of the first-order difference sequence of the return water temperature at time t, with a value range of [0,1]. is the arithmetic mean of the rank-transformed sequence of return water temperature, N is the total length of the dataset being analyzed, k is the lag order of indoor temperature relative to return water temperature, and the search range is 0~24. Let be the percentage-rank transformed value of the first-order difference sequence of indoor temperature at t+k, with a value range of [0,1]. This is the arithmetic mean of the rank-transformed sequence of indoor temperatures.
[0041] By calculating different lags k, when At that time, the cross-correlation function value reaches its maximum, thus determining... The typical global lag time is used as a baseline parameter for subsequent modeling, illustrating that the optimal lag time between return water temperature and indoor temperature is... .
[0042] (5) To verify the time-varying characteristics of the lag in the heating system, a sliding time window is introduced to dynamically analyze the lag relationship: the length is defined as... L A sliding window, moving along the time axis in steps. s Move and capture a series of local data subsequences. Repeat steps (2)-(4) for each subsequence within a window to obtain the local optimal lag time within that window. By analyzing the local lag sequence, it can be found that the lag time is affected by building thermal inertia, user adjustment behavior and pipeline conditions, and fluctuates dynamically within the range of 0-24 hours.
[0043] Step 4: Establish a prediction model for return water temperature and indoor temperature, including: feature selection and temporal tensor construction; Attention self-attention mechanism construction; and construction of a GRU-Attention room temperature prediction model.
[0044] The specific steps are as follows: (1) Feature selection and temporal tensor construction: First, the collected time-series parameters of the heating system are used as initial candidate features. Pearson correlation coefficients are calculated between parameters in the preprocessed hourly dataset to generate a correlation coefficient heatmap, which quantitatively characterizes the linear correlation strength between parameters. Then, parameters with moderate or higher correlation to the core variables, return water temperature and indoor temperature, are selected based on the correlation coefficient heatmap. Features with weak correlation, high collinearity, or no physical meaning are eliminated. Next, based on the core features, auxiliary variables that can reflect the dynamic process of heating are added, including difference and combination features: a. First-order difference of return water temperature, which can reflect the rate of change of return water temperature; b. First-order difference of supply water temperature, which can reflect the intensity of supply water regulation; c. First-order difference of indoor temperature, which can reflect the speed of room temperature fluctuation; d. First-order difference of supply and return water temperature difference, which characterizes heat dissipation and heating efficiency. A three-dimensional temporal input tensor with the tensor dimension of sample number × lag time × feature dimension is constructed.
[0045] (2) Attention self-attention mechanism construction: lag time Input time series features Calculate attention score: in Normalization yields The input temporal features are then weighted and summed to obtain the final Attention output vector. This involves fusing characteristic information about the lag time between return water temperature and indoor temperature. The lag time; , indicating the first The input feature at each time lag is a A 1 / 2 real vector; weight matrix Bias term , Indicates the first Attention score at each lag moment Indicates the first Attention score at each lag moment.
[0046] (3) Constructing a GRU-Attention Room Temperature Prediction Model: The heating system has both dynamic lag characteristics and nonlinear heat transfer processes. Room temperature changes are affected by time-series cumulative factors such as historical heating conditions and ambient temperature. The heat transfer correlation of various parameters is complex and there is no fixed linear change law. The model needs to have excellent long-term dependency capture and key feature screening capabilities. Conventional GRU combined with the Attention self-attention mechanism only relies on data for fitting. The purely data-driven mode can only learn the surface data change trend, which is difficult to fit the actual heating operation mechanism. When the operating conditions fluctuate dynamically, fitting bias is easy to occur, and the model generalization performance is weak. To this end, this invention introduces an improved design on the original network architecture, abandons the pure data-driven modeling method, and adds a feature interaction layer guided by physical relationships in the early stage of inputting the original time-series features into the model.
[0047] In the initial stage of inputting the original time-series features into the model, a physical relationship-guided feature interaction layer is added. This layer, combined with the objective mechanism of heating heat transfer, explicitly calculates combined interaction features with practical thermodynamic meaning. These features include the supply and return water temperature difference, the return water temperature and outdoor temperature difference, the indoor and outdoor temperature difference, and the cumulative time-series values of various temperature differences. The physical interaction features generated by this layer are then combined and merged with the original measured features and time-series difference features to form complete model input data, improving the model's ability to model the nonlinear heat transfer process of heating.
[0048] A complete room temperature prediction model is constructed based on the fusion feature that incorporates prior physical information. The input layer reads historical time-series data of the heating system, and then sets up two layers of GRU network with 64-128 hidden units, an Attention layer, and two fully connected output layers to achieve indoor temperature prediction.
[0049] A GRU-Attention room temperature prediction model is initialized, and the mean squared error is determined as the model loss function. The Adam optimizer is used to optimize the model parameters to capture the prediction of indoor temperature by the return water temperature. The analysis dataset is divided into training, validation, and test sets according to a preset ratio (60%-80% training set, 10%-20% validation set, and 10%-20% test set). The training set is used as the input for iterative training of the room temperature prediction model. During iterative training, the model parameters are optimized based on backpropagation of the loss function, while the validation set is used to monitor the model for overfitting. After iterative training, the training effect of the trained room temperature prediction model is verified based on the test set. The model prediction accuracy is evaluated by indicators such as mean absolute error and root mean square error. If the accuracy does not meet the preset requirements, the model structure or training parameters are adjusted and retrained. The optimal model weight parameters are saved to complete the model construction and predict indoor temperature.
[0050] To verify the effectiveness of the proposed GRU_Attention room temperature prediction model, a comparative experiment was conducted with Bi-LSTM-Attention and TCN-Attention. The experimental results are as follows:
[0051] Experimental data show that the GRU-Attention model architecture constructed in this invention significantly outperforms the comparative models Bi-LSTM-Attention and TCN-Attention in terms of RMSE, MAE, and other metrics. Specifically, the three error metrics RMSE=0.027±0.005, MSE=0.001±0.0003, and MAE=0.021±0.003 are all at their minimum values, and their standard deviations are much lower than those of other models. This proves that: 1) the combination of the Attention mechanism and the recurrent neural network (GRU) produces a good synergistic effect; 2) GRU has certain advantages over Bi-LSTM and TCN in modeling this task, with higher prediction accuracy and better generalization.
[0052] The method proposed in this invention has also been verified in a residential community: Example 1: Prediction of room temperature in the central area of a single cell: Hourly data (4200 records) of the entire heating season were collected from the central area of a residential community. The data collection frequency was 60 minutes, with k0=18 steps. The input data dimension of the GRU-Attention input layer was (None, 18, 8), with 128 units. Two GRU networks were used: GRU_128 and GRU_64. An Attention-GRU layer was set up, and the hidden states output by the GRU_64 layer were weighted. Two fully connected layers were used: Dense_16 and Output_Dense. The data was divided into three sets: 70% for training, 15% for validation, and 15% for testing. Experimental results showed that RMSE≤0.04, MAE, MSE, and Bias<0.03℃, R²≥0.85, indicating high prediction accuracy.
[0053] Example 2, prediction across zones within the same cell: For the low zone and high zone of the same cell, the optimal structure of Example 1 is reused; the prediction result is R²≥0.87, and the cross-zone accuracy is stable.
[0054] Example 3, Cross-cell generalization prediction: For the low, medium and high zones of another independent heating cell; transfer the trained model; the prediction result is R²≥0.70, which has good cross-cell generalization ability.
[0055] Implementation Method 3: This implementation method proposes an indoor temperature prediction system based on the return water temperature of a centralized heating system. The system includes: The data acquisition unit is used to acquire hourly time-series operational data of the centralized heating system. The preprocessing unit is used to preprocess the time-series running data to obtain the analysis dataset; The dynamic lag relationship determination unit performs first-order difference on the pre-processed return water temperature sequence and the indoor temperature calibration value sequence to obtain two difference sequences. The elements in each difference sequence are arranged according to their numerical values and assigned a ranking in the sequence. The ranking is then divided by the sequence length to transform it into a percentage order column with values between zero and one. Within a preset lag step search range, the rank domain cross-correlation coefficients of the two percentage order columns are calculated one by one under different lag step lengths. The lag step length corresponding to the absolute value of the rank domain cross-correlation coefficient reaching the maximum value is taken as the benchmark lag time. The unit moves along the time axis with a fixed-length sliding window at a fixed step length. The above rank transformation and rank domain cross-correlation coefficient calculation are repeated in each window to obtain the local optimal lag value corresponding to each window, forming a dynamic fluctuation distribution of lag time as it changes over time. The data interaction unit is used to extract continuous multi-step historical observations of return water temperature and related operating parameters from the analysis dataset, using the benchmark lag time as the time window width, and construct a three-dimensional time series input tensor with the dimension being the number of samples multiplied by the time window width multiplied by the feature dimension; and to fuse physical relationship-guided interaction features on the feature dimension. The prediction unit is used to input the three-dimensional time-series input tensor into the trained GRU-Attention prediction model and output the indoor temperature prediction value at the current time or future time.
[0056] Implementation Method 4: This implementation method proposes a computer device, including a memory and a processor. The memory stores a computer program. When the processor runs the computer program stored in the memory, the processor executes an indoor temperature prediction method based on the return water temperature of a centralized heating system, as described in any one of Implementation Methods 1 to 2.
[0057] Implementation Method 5: This implementation method proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of an indoor temperature prediction method based on the return water temperature of a centralized heating system, as described in any one of Implementation Methods 1 to 2.
[0058] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0059] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0060] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0061] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure and not to limit its protection scope. Although this disclosure has been described in detail with reference to the above embodiments, those skilled in the art should understand that after reading this disclosure, they can still make various changes, modifications or equivalent substitutions to the specific implementation of the invention, but these changes, modifications or equivalent substitutions are all within the protection scope of the pending claims.
Claims
1. A method for predicting indoor temperature based on the return water temperature of a centralized heating system, characterized in that, The method includes: Step S1: Obtain hourly time-series operation data of the centralized heating system. The time-series operation data includes synchronously sampled measured return water temperature sequence, supply water temperature sequence, outdoor temperature sequence, and indoor temperature calibration value sequence. Step S2: Preprocess the time-series running data to obtain the analysis dataset; Step S3: Perform first-order difference on the pre-processed return water temperature sequence and indoor temperature calibration value sequence to obtain two difference sequences. Arrange the elements in each difference sequence according to their numerical values and assign them a ranking in the sequence. Then divide the ranking by the sequence length to convert it into a percentage order column with values between zero and one. Within the preset lag step search range, calculate the rank domain cross-correlation coefficient of the two percentage order columns under different lag step lengths. Take the lag step length corresponding to the absolute value of the rank domain cross-correlation coefficient reaching the maximum value as the benchmark lag time. Move along the time axis with a fixed-length sliding window at a fixed step length. Repeat the above rank transformation and rank domain cross-correlation coefficient calculation in each window to obtain the local optimal lag value corresponding to each window, forming a dynamic fluctuation distribution of lag time changing with time. Step S4: Using the baseline lag duration as the time window width, extract continuous multi-step historical observations of return water temperature and related operating parameters from the analysis dataset, and construct a three-dimensional time-series input tensor with dimensions of sample number multiplied by time window width multiplied by feature dimension; integrate physical relationship-guided interactive features on the feature dimension; Step S5: Input the three-dimensional temporal input tensor into the trained GRU-Attention prediction model and output the indoor temperature prediction value at the current time or future time.
2. The method for predicting indoor temperature based on the return water temperature of a centralized heating system according to claim 1, characterized in that, In step S3, the percentage order column is calculated as follows: sort the elements in each difference sequence in ascending order of value to obtain the ranking number of each element, and then divide the ranking number by the total effective length of the sequence. The resulting ratio is the percentage order column value corresponding to that element.
3. The method for predicting indoor temperature based on the return water temperature of a centralized heating system according to claim 1, characterized in that, In step S3, the rank-domain cross-correlation coefficient is calculated as follows: for a given lag step size k, the ratio of the product of the covariance and the standard deviation of the two percentage order series after being misaligned by k time steps is calculated. The lag step size search range is 0 to 24 time steps. When the absolute value of the rank-domain cross-correlation coefficient is within a certain lag step size... When the value reaches its maximum, determine The baseline lag time.
4. The method for predicting indoor temperature based on the return water temperature of a centralized heating system according to claim 1, characterized in that, In step S3, the length of the sliding window is the number of time steps corresponding to 7 to 14 days, and the step size is the number of time steps corresponding to 12 to 24 hours. When the dynamic fluctuation distribution indicates that the lag time has shifted with the heating conditions, the benchmark lag time is updated by rolling the local optimal lag value obtained from the most recent sliding window, so that the historical observation window in the three-dimensional time series input tensor is always aligned with the current effective thermal delay of the return water temperature to the indoor temperature.
5. The method for predicting indoor temperature based on the return water temperature of a centralized heating system according to claim 1, characterized in that, Step S4 further includes: calculating the Pearson correlation coefficients between parameters in the dataset and generating a correlation coefficient matrix; selecting parameters whose absolute values of the Pearson correlation coefficients with the return water temperature sequence or the indoor temperature calibration value sequence are not less than 0.3 and retaining them as the initial feature set; and removing redundant parameters whose absolute values of the correlation coefficients with the return water temperature sequence are less than 0.
15.
6. The method for predicting indoor temperature based on the return water temperature of a centralized heating system according to claim 1, characterized in that, The GRU-Attention prediction model has a feature splicing and fusion structure on the input side: the original measured features, the first difference of return water temperature, the first difference of supply water temperature, the first difference of indoor temperature, the first difference of supply and return water temperature difference, and the interaction features guided by the physical relationship are spliced along the feature dimension and then fed into the GRU layer. The hidden state sequence of the GRU layer is calculated by the Attention layer for the attention weights at each time step and then weighted and summed, and finally mapped to scalar prediction values by the fully connected layer. The GRU layer is set to two layers, with the first layer having 64 to 128 hidden units and the second layer having 32 to 64 hidden units. The output hidden state sequence of the two GRU layers is sent to the Attention layer. The Attention layer calculates an attention score for the hidden state at each time step. The attention score is obtained by adding a tanh activation function to a fully connected layer, and then normalized to a weight by softmax. The weighted sum of the hidden states at each time step is used as the weighted context vector and fed into the fully connected layer. The fully connected layer is set to two layers. The first layer has 8 to 16 neurons connected to an activation function, and the second layer is a single-neuron output layer that outputs the predicted indoor temperature value.
7. The method for predicting indoor temperature based on the return water temperature of a centralized heating system according to claim 1, characterized in that, The sampling interval for the time-series running data is 60 minutes. The data obtained in step S1 covers at least one complete heating season, and the total amount of data is no less than 1,000 valid time steps. The method for obtaining the indoor temperature calibration value sequence is as follows: a small number of indoor temperature sensors are deployed in a sparse manner within the area under the jurisdiction of the heating system. The true value of indoor temperature is collected only within a certain calibration period to construct supervised training samples. After the calibration period ends, the sensors are removed or maintained at the minimum number. In the pure inference stage, the indoor temperature prediction value is continuously output by the GRU-Attention prediction model that has been trained, which relies only on the return water temperature, supply water temperature and outdoor temperature of the pipeline side.
8. An indoor temperature prediction system based on the return water temperature of a centralized heating system, characterized in that, The system includes: The data acquisition unit is used to acquire hourly time-series operational data of the centralized heating system. The preprocessing unit is used to preprocess the time-series running data to obtain the analysis dataset; The dynamic lag relationship determination unit performs first-order difference on the pre-processed return water temperature sequence and the indoor temperature calibration value sequence to obtain two difference sequences. The elements in each difference sequence are arranged according to their numerical values and assigned a ranking in the sequence. The ranking is then divided by the sequence length to transform it into a percentage order column with values between zero and one. Within a preset lag step search range, the rank domain cross-correlation coefficients of the two percentage order columns are calculated one by one under different lag step lengths. The lag step length corresponding to the absolute value of the rank domain cross-correlation coefficient reaching the maximum value is taken as the benchmark lag time. The unit moves along the time axis with a fixed-length sliding window at a fixed step length. The above rank transformation and rank domain cross-correlation coefficient calculation are repeated in each window to obtain the local optimal lag value corresponding to each window, forming a dynamic fluctuation distribution of lag time as it changes over time. The data interaction unit is used to extract continuous multi-step historical observations of return water temperature and related operating parameters from the analysis dataset, using the benchmark lag time as the time window width, and construct a three-dimensional time series input tensor with the dimension being the number of samples multiplied by the time window width multiplied by the feature dimension; and to fuse physical relationship-guided interaction features on the feature dimension. The prediction unit is used to input the three-dimensional time-series input tensor into the trained GRU-Attention prediction model and output the indoor temperature prediction value at the current time or future time.
9. A computer device, characterized in that: The system includes a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes an indoor temperature prediction method based on the return water temperature of a centralized heating system as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of a method for predicting indoor temperature based on the return water temperature of a centralized heating system as claimed in any one of claims 1-7.