A bi-lstm-based heat supply system temperature loss prediction method

By defining the return water temperature in segments and constructing a hierarchical model using a BiLSTM network, the problem of insufficient accuracy in temperature loss prediction in heating systems is solved. This enables precise location of key heat loss sources and high-precision prediction of temperature loss, supporting energy consumption optimization and intelligent control of heating systems.

CN121094187BActive Publication Date: 2026-04-17SHANDONG HETONG INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG HETONG INFORMATION TECH CO LTD
Filing Date
2025-08-13
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing heating system temperature loss prediction technologies rely on the physical parameters of the pipeline network, which are difficult to obtain accurately. The time-series characteristics of multi-source data are distorted, and the influence of flow coupling is ignored, resulting in insufficient prediction accuracy.

Method used

By collecting and segmenting the return water temperature, a hierarchical fusion model is constructed using a BiLSTM network combined with a multi-head attention mechanism. This model mines the spatiotemporal characteristics of the return water temperature, accurately locates key heat loss sources, and fuses data from heat sources and heat exchange stations to output prediction results for time delay and temperature loss.

Benefits of technology

It significantly improves the accuracy of temperature loss prediction in heating systems, enables dynamic optimization and intelligent control of energy consumption, and provides reliable decision support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121094187B_ABST
    Figure CN121094187B_ABST
Patent Text Reader

Abstract

This invention relates to the field of data prediction technology, and more particularly to a method for predicting temperature loss in heating systems based on BiLSTM. The method includes the following steps: S1: Collecting return water temperatures and defining them as initial return water temperature, intermediate return water temperature, and terminal return water temperature; sorting the initial return water temperatures chronologically to obtain an initial return water temperature time series, and obtaining the standardized deviation degree based on the initial return water temperature time series; S2: Sorting the intermediate return water temperatures spatially to obtain an intermediate return water temperature spatial series, and obtaining the intensity and spatial location range of fluctuations throughout the pipeline based on the intermediate return water temperature spatial series. This invention integrates spatiotemporal features to construct a BiLSTM-Attention-TCN hierarchical model, accurately predicting heat loss and delay, breaking through the dependence on physical properties, improving accuracy, realizing the optimization and forward control of energy consumption in heating systems, and supporting intelligent heating decision-making.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data prediction technology, and in particular to a method for predicting temperature loss in heating systems based on BiLSTM. Background Technology

[0002] In recent years, with the advancement of smart city construction, the intelligent transformation of heating systems has accelerated, and optimizing energy efficiency based on IoT technology has become a core development direction. Predictive methods based on massive operational data have significantly improved system control efficiency, reducing energy consumption and ensuring user comfort by predicting network conditions.

[0003] However, existing prediction technologies have obvious shortcomings: First, they rely on the physical parameters of the pipeline network and the properties of the liquid, which are difficult to obtain accurately in actual engineering. Second, the difference in the acquisition frequency of multi-source data (heat source, heat exchange station) leads to the distortion of time series characteristics, and traditional linear interpolation masks sudden fluctuation events. Third, existing methods mostly focus on the analysis of a single temperature series, ignoring the coupling effect of flow on temperature changes, and lack in-depth mining of the spatiotemporal characteristics of return water temperature, resulting in insufficient accuracy in predicting time delay and temperature loss.

[0004] Therefore, it is urgent to build a dynamic prediction model that does not rely on physical parameters. By integrating multi-dimensional operational data, especially the variation pattern of return water temperature in the spatiotemporal dimension, we can break through the bottleneck of prediction accuracy and provide reliable decision support for intelligent control of heating systems. Summary of the Invention

[0005] To overcome the shortcomings of inaccurate heat loss delay prediction, this invention provides a method for predicting temperature loss in heating systems based on BiLSTM.

[0006] The technical implementation of this invention is: a method for predicting temperature loss in a heating system based on BiLSTM, comprising the following steps:

[0007] S1: Collect the return water temperature and define it as initial return water temperature, intermediate return water temperature and final return water temperature; sort the initial return water temperature in chronological order to obtain the initial return water temperature time series, and obtain the standardized deviation based on the initial return water temperature time series;

[0008] S2: Sort the intermediate return water temperatures in spatial order to obtain an intermediate return water temperature spatial sequence; obtain the fluctuation intensity and spatial location range of the entire pipeline based on the intermediate return water temperature spatial sequence; determine the critical heat loss sources and non-critical heat loss sources based on the normalization deviation, the fluctuation intensity and spatial location range of the entire pipeline.

[0009] S3: Based on the critical heat loss sources and the non-critical heat loss sources, and in conjunction with the terminal return water temperature, determine the main sources of temperature loss; based on the main sources of temperature loss, obtain heat source data and heat exchange station data, and obtain a fused dataset based on the heat source data and heat exchange station data;

[0010] S4: Extract features from the fused dataset and obtain a feature matrix; generate event matching pairs based on the feature matrix; construct a hierarchical fusion model based on the event matching pairs, and output time delay prediction results and temperature loss prediction results.

[0011] Preferably, the collection and definition of the return water temperature as initial return water temperature, intermediate return water temperature, and final return water temperature includes:

[0012] Collect the first return water temperature from the user to the heat exchange station, and use the first return water temperature as the initial return water temperature;

[0013] Collect the second return water temperature from the heat exchange station to the heat source, and use the second return water temperature as the intermediate return water temperature;

[0014] The intermediate return water temperature is collected up to the third return water temperature of the heat source, and the third return water temperature is used as the final return water temperature.

[0015] The initial return water temperature refers to the return water temperature before reaching the heat exchange station, the intermediate return water temperature refers to the return water temperature after leaving the heat exchange station, and the final return water temperature refers to the return water temperature upon reaching the heat source.

[0016] Preferably, the step of sorting the initial return water temperatures in chronological order to obtain an initial return water temperature time series, and obtaining the standardized deviation based on the initial return water temperature time series, includes:

[0017] The initial return water temperatures are sorted in chronological order to obtain an initial return water temperature time series.

[0018] Calculate the temperature difference and rate of change of adjacent initial return water temperatures in the time series of the initial return water temperature;

[0019] The temperature difference and the rate of temperature change are traversed using a sliding window. A fixed-size sliding window is moved step by step along the time sequence, moving by one time step each time. All temperature difference data and rate of temperature change data within the window are combined into a feature vector to obtain the traversal result.

[0020] Based on the traversal results, the DBSCAN algorithm is used to cluster the traversal results to obtain the clustering results;

[0021] Based on the clustering results, data samples marked as noise points are identified, and these data samples are used as edge points. The Euclidean distance from the feature vector of each edge point to the nearest core point cluster center is calculated as the deviation value. The deviation values ​​of all edge points are normalized to generate a standardized deviation degree.

[0022] Preferably, the step of sorting the intermediate return water temperatures in spatial order to obtain an intermediate return water temperature spatial sequence, and obtaining the overall fluctuation intensity and spatial location range of the pipeline based on the intermediate return water temperature spatial sequence, includes:

[0023] The intermediate return water temperatures are arranged in order of pipe location to generate an intermediate return water temperature spatial sequence.

[0024] The temperature difference between adjacent positions in the intermediate return water temperature spatial sequence is calculated to form a temperature difference sequence. The standard deviation of the temperature difference sequence is calculated to obtain the standard deviation calculation result, and the standard deviation calculation result is used as the fluctuation intensity of the pipeline throughout the entire process.

[0025] The temperature difference sequence is traversed using a sliding window, the standard deviation of the data in each window is calculated and the corresponding pipe location interval is recorded;

[0026] The average standard deviation of all windows is used as the average volatility intensity, and windows that exceed the preset average volatility intensity threshold are marked as unstable segments.

[0027] The final output includes the overall fluctuation intensity of the pipeline and the spatial location range of the unstable section.

[0028] Preferably, determining critical and non-critical heat loss sources based on the standardized deviation, the intensity of fluctuations throughout the pipeline, and the spatial location range includes:

[0029] Based on the standardized deviation and the fluctuation intensity of the pipeline throughout the pipeline, the correlation is calculated using the Spearman rank correlation coefficient to obtain the correlation calculation result.

[0030] If the correlation calculation result is greater than or equal to a preset correlation threshold, the edge point is removed, and a new spatial location range is calculated. Based on the difference between the spatial location range and the new spatial location range, if the difference is greater than 0, the edge point is determined to be a critical heat loss source; if the difference is less than 0, the edge point is determined to be a non-critical heat loss source.

[0031] If the correlation calculation result is less than the preset correlation threshold, then the edge point is directly determined to be a non-critical heat loss source.

[0032] Preferably, determining the main sources of temperature loss based on the critical heat loss sources and the non-critical heat loss sources, combined with the terminal return water temperature, includes:

[0033] Accumulate the critical temperature loss of all the critical heat loss sources, and simultaneously accumulate the non-critical temperature loss of all the non-critical heat loss sources;

[0034] Calculate the critical temperature loss and the critical difference between the terminal return water temperature, and calculate the non-critical temperature loss and the non-critical difference between the terminal return water temperature;

[0035] If the critical difference is greater than the non-critical difference, then the critical heat loss source is the main source of temperature loss.

[0036] If the critical difference is less than the non-critical difference, then the non-critical heat source is the main source of temperature loss.

[0037] If the critical difference is equal to the non-critical difference, then both the critical heat source and the non-critical heat source are major sources of temperature loss.

[0038] Preferably, the step of acquiring heat source data and heat exchange station data based on the main sources of temperature loss, and obtaining a fused dataset based on the heat source data and heat exchange station data, includes:

[0039] Acquire data on the time of heat source, water supply temperature, flow rate, and the time, primary heating, and primary flow rate of the heat exchange station;

[0040] Outlier detection and removal are performed on heat source data and heat exchange station data, and machine learning algorithms are used to fill in missing values;

[0041] Set a time tolerance window, align the timestamps of the heat source data and the heat exchange station data, and merge the data;

[0042] Abnormal records where the water supply temperature of the heat source data is lower than the primary temperature supply of the heat exchange station data are removed, resulting in a preprocessed fusion dataset.

[0043] Preferably, the step of extracting features and obtaining a feature matrix based on the fused dataset includes:

[0044] Based on the fused dataset, three types of features are extracted: basic features, rate of change features, and lag features. The basic features include time sine and cosine coding, instantaneous energy, and cumulative energy. The rate of change features calculate the multi-scale rate of change of temperature and flow rate of the heat source data. The lag features construct temperature window lag sequences and flow window lag sequences for the heat source data and the heat exchange station data, respectively.

[0045] The feature matrix composed of the basic feature, the rate of change feature, and the hysteresis feature is scaled, and the time delay label and temperature loss label are standardized respectively.

[0046] Preferably, generating event matching pairs based on the feature matrix includes:

[0047] Based on the feature matrix, the temperature range between the heat source data and the heat exchange station data is calculated using a sliding window.

[0048] When the temperature range of the heat source data exceeds the source threshold, it is marked as a source event; when the temperature range of the heat exchange station data exceeds the station threshold, it is marked as a station event.

[0049] Set time delay range constraints; arrange the source events and station events in chronological order to form a source time queue and a station event queue; traverse the source event queue and the station event queue, and match each station event with only one source event to generate event matching pairs.

[0050] Preferably, the step of constructing a hierarchical fusion model based on the event matching pairs and outputting time delay prediction results and temperature loss prediction results includes:

[0051] The shared feature layer captures bidirectional temporal dependencies through a bidirectional long short-term memory network and introduces a multi-head attention mechanism to focus on key nodes;

[0052] The time delay prediction branch uses a temporal convolutional network to extract temporal features, compressing the channel dimension layer by layer.

[0053] The temperature loss prediction branch uses a temporal convolutional network in parallel.

[0054] The two branches are connected to a fully connected regression layer, which synchronously outputs the time delay prediction results and the temperature loss prediction results.

[0055] Beneficial Effects: This invention mines the spatiotemporal features of return water temperature, deeply coupling the standardized deviation of the initial return water temperature time series with the spatial fluctuation intensity of the intermediate return water temperature to accurately locate key heat loss sources. Based on multi-source data fusion and dynamic feature engineering, a hierarchical prediction model is constructed. A BiLSTM network is used to bidirectionally capture temporal dependencies, combined with a multi-head attention mechanism to focus on key nodes, and a dual-branch TCN architecture is employed to output the prediction results of time delay and temperature loss respectively. This method breaks through the dependence of traditional models on pipeline physical parameters, significantly improves prediction accuracy, realizes dynamic optimization of heating system energy consumption and forward-moving control commands, and provides reliable decision support for intelligent heating energy efficiency management. Attached Figure Description

[0056] Figure 1 This is a flowchart of a method for predicting temperature loss in a heating system based on BiLSTM according to the present invention.

[0057] Figure 2This is a flowchart of the method for obtaining the degree of standardization deviation of the present invention;

[0058] Figure 3 This is a flowchart of the method for obtaining the intensity and spatial location range of pipeline fluctuations throughout the entire pipeline according to the present invention;

[0059] Figure 4 This is a flowchart of the method for identifying critical and non-critical heat loss sources in this invention.

[0060] Figure 5 This is a flowchart of the method for determining the main sources of temperature loss in this invention;

[0061] Figure 6 Flowchart for constructing a method for merging datasets;

[0062] Figure 7 Flowchart for generating event matching pairs. Detailed Implementation

[0063] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0064] As can be seen from the background technology, traditional heating system temperature loss prediction relies on physical parameters and suffers from time-series distortion of multi-source data, neglecting flow coupling and spatiotemporal feature mining, resulting in insufficient prediction accuracy.

[0065] This invention identifies key heat loss sources by mining the spatiotemporal characteristics of return water temperature and coupling the degree of time series standardization deviation with the intensity of spatial fluctuations. It integrates data from heat sources and heat exchange stations to construct a hierarchical model, uses BiLSTM to capture time series dependencies in both directions and introduces a multi-head attention mechanism, and combines a dual-branch TCN to synchronously output time delay and temperature loss prediction results. This overcomes the limitations of physical property parameters, significantly improves prediction accuracy, and realizes dynamic optimization and intelligent control of heating energy consumption.

[0066] Example 1: A method for predicting temperature loss in a heating system based on BiLSTM, such as... Figure 1 As shown, it includes the following steps:

[0067] S1-1: Collect the return water temperature and define it as the initial return water temperature, intermediate return water temperature and final return water temperature;

[0068] A1: Collect the first return water temperature from the user to the heat exchange station, and use the first return water temperature as the initial return water temperature;

[0069] A2: Collect the second return water temperature from the heat exchange station to the heat source, and use the second return water temperature as the intermediate return water temperature;

[0070] A3: Collect the intermediate return water temperature to the third return water temperature of the heat source, and use the third return water temperature as the final return water temperature;

[0071] A4: The initial return water temperature refers to the return water temperature before reaching the heat exchange station, the intermediate return water temperature refers to the return water temperature after leaving the heat exchange station, and the final return water temperature refers to the return water temperature after reaching the heat source.

[0072] It should be noted that in a heating system, return water temperature refers to the temperature at which circulating water returns to the heat source after completing heat transfer, and its changes directly reflect the heat loss in the pipeline network. However, there are significant differences in actual data collection: the main pipelines from the heat exchange station to the heat source are usually managed uniformly by the heating company, with well-deployed sensors, and the intermediate and terminal return water temperatures are stably obtained; while the branch pipelines from the user end to the heat exchange station involve a large number of scattered buildings, and due to limitations in installation costs, the difficulty of renovating old communities, and equipment maintenance conditions, the initial return water temperature data is often difficult to fully cover, forming monitoring blind spots.

[0073] Based on this constraint, this scheme divides the return water temperature into three segments: the initial return water temperature only covers the data collected from the user end to the heat exchange station; the intermediate return water temperature corresponds to the section from the heat exchange station outlet to the main pipeline network; and the final return water temperature is located at the heat source inlet. For example, a heat exchange station in a certain community receives 20℃ return water (initial), which drops to 18℃ after flowing out through the main pipeline (intermediate), and finally reaches the heat source at 16℃ (final). By defining these segments, the scheme can accommodate the lack of actual data while accurately locating the heat loss characteristics of different sections.

[0074] S1-2: Sort the initial return water temperatures in chronological order to obtain an initial return water temperature time series, and obtain the standardized deviation based on the initial return water temperature time series;

[0075] B1: Sort the initial return water temperatures in chronological order to obtain the initial return water temperature time series;

[0076] B2: Calculate the temperature difference and temperature change rate between adjacent initial return water temperatures in the initial return water temperature time series;

[0077] B3: Use a sliding window to traverse the temperature difference and the temperature change rate. Use a fixed-size sliding window to move gradually along the time sequence, moving one time step at a time. Combine all the temperature difference data and temperature change rate data in the window into a feature vector to obtain the traversal result.

[0078] B4: Based on the traversal results, the DBSCAN algorithm is used to cluster the traversal results to obtain the clustering results;

[0079] B5: Based on the clustering results, identify the data samples marked as noise points, use the data samples as edge points, calculate the Euclidean distance from the feature vector of each edge point to the nearest core point cluster center as the deviation value; normalize the deviation values ​​of all edge points to generate a standardized deviation degree.

[0080] It should be noted that, as Figure 2 As shown, in a heating system, time series analysis of the initial return water temperature needs to capture abnormal fluctuation characteristics. First, the collected temperatures from the user end to the heat exchange station are sorted by time to form a sequence (B1). The temperature difference and rate of change between adjacent time points are calculated to quantify local dynamics (B2). Due to data sparsity, a fixed small-step sliding window is used to traverse all sequences: for example, the window covers 10 time points, moving 1 step at a time. The temperature difference and rate of change within the window are combined into a feature vector, such as [Δt1, Δt2, Δr1, Δr2], which represents the overall pattern of temperature change within that time period (B3).

[0081] Subsequently, the DBSCAN algorithm was used for clustering: the neighborhood radius ε = 0.5 (based on the standardized Euclidean distance of the feature vector), and the minimum number of samples minPts = 5, were set to divide the feature vector into core points, boundary points, and noise points (B4). Data samples marked as noise points are edge points, representing abnormal operating conditions that significantly deviate from the mainstream pattern, such as a sudden leak in a pipeline in an old residential area causing a sharp increase in temperature difference. The Euclidean distance from the feature vector of each edge point to the nearest core point cluster center was calculated. For example, the temperature difference data [1.2, 0.8] and the temperature change rate [0.5, -0.3] within the window are combined to form the feature vector [1.2, 0.8, 0.5, -0.3]. Its Euclidean distance to the cluster center [0.4, 0.6, 0.1, 0.2] is 1.25. This is converted into a standardized deviation in the range of 0-1 through min-max normalization (B5). The closer this value is to 1, the more significant the abnormal heat loss during that period.

[0082] For example, the feature vector of the initial return water temperature in a certain community within the window of 09:00-09:05 is [2.1, 1.8] (the normal cluster center is [0.3, 0.2]). The calculated deviation value is 1.86, and the normalized deviation is 0.92, indicating that there is a high risk of heat loss during this period.

[0083] S2-1: Sort the intermediate return water temperatures in spatial order to obtain an intermediate return water temperature spatial sequence, and obtain the fluctuation intensity and spatial location range of the entire pipeline based on the intermediate return water temperature spatial sequence.

[0084] C1: Arrange the intermediate return water temperatures according to the order of the pipe positions to generate an intermediate return water temperature spatial sequence;

[0085] C2: Calculate the temperature difference between adjacent positions in the intermediate return water temperature spatial sequence to form a temperature difference sequence, calculate the standard deviation of the temperature difference sequence, obtain the standard deviation calculation result, and use the standard deviation calculation result as the fluctuation intensity of the pipeline throughout the entire process;

[0086] C3: Use a sliding window to traverse the temperature difference sequence, calculate the standard deviation of the data in each window, and record the corresponding pipe location interval;

[0087] C4: Use the average standard deviation of all windows as the average fluctuation intensity, and mark windows that exceed the preset average fluctuation intensity threshold as unstable segments;

[0088] C5: The final output is the intensity of the fluctuation throughout the pipeline and the spatial location range of the unstable section.

[0089] It should be noted that, as Figure 3 As shown, in a heating network, the variation in intermediate return water temperature along the pipeline reflects the dynamic process of water mixing and heat transfer. When return water from multiple user branches converges into the main pipeline, the water temperature differences between branches are significant near the heat exchange station outlet because the water flow has not yet been fully mixed, resulting in large temperature differences between adjacent measuring points. As the pipeline extends, the water flow gradually becomes more uniform, and the temperature difference tends to be more gradual. To quantify this spatial characteristic, the measuring points are arranged in order of distance from the heat exchange station to form a spatial sequence (C1), and the temperature difference between adjacent locations is calculated to form a difference sequence (C2). The standard deviation of this sequence is the overall fluctuation intensity of the pipeline; the larger the value, the more uneven the overall temperature distribution (C2).

[0090] Further analysis of local fluctuations is conducted using a sliding window: for example, a window covers five consecutive measuring points, the standard deviation of the temperature difference within each window is calculated, and the corresponding pipe section location is recorded (C3). If the standard deviation of a certain window reaches 1.5℃ (the preset threshold is 1.2℃), significantly higher than the average fluctuation intensity of 0.8℃, then that section is marked as an unstable section (C4). For example, if the standard deviation of a window at a distance of 2.5-3.0 km in a pipeline is 1.5℃, it indicates that there is insulation layer damage or flow imbalance in that section (C5).

[0091] S2-2: Based on the aforementioned standardization deviation, the intensity of fluctuations throughout the pipeline, and the spatial location range, determine the critical heat loss sources and non-critical heat loss sources;

[0092] D1: Based on the standardized deviation and the fluctuation intensity of the pipeline throughout the pipeline, the correlation is calculated using the Spearman rank correlation coefficient to obtain the correlation calculation result;

[0093] D2: If the correlation calculation result is greater than or equal to the preset correlation threshold, the edge point is removed, and a new spatial location range is calculated. Based on the difference between the spatial location range and the new spatial location range, if the difference is greater than 0, the edge point is determined to be a critical heat loss source; if the difference is less than 0, the edge point is determined to be a non-critical heat loss source.

[0094] It should be noted that, as Figure 4 As shown, if the correlation calculation result is greater than or equal to the preset correlation threshold, the edge point is removed and the spatial location range is recalculated; the original spatial location range is compared with the new spatial location range: if the new range is smaller than the original range (i.e., the difference > 0), the edge point is determined to be a critical heat loss source; if the new range is greater than or equal to the original range (i.e., the difference ≤ 0), the edge point is determined to be a non-critical heat loss source.

[0095] D3: If the correlation calculation result is less than the preset correlation threshold, then the edge point is directly determined to be a non-critical heat loss source.

[0096] It should be noted that in the heat loss analysis of heating systems, critical heat loss sources refer to anomalies that have a dominant impact on the overall temperature drop, such as pipe leaks or insulation failures; non-critical heat loss sources are secondary fluctuation sources, such as normal heat dissipation sections. The degree of standardized deviation reflects the temporal anomaly intensity of the initial return water temperature, while the fluctuation intensity throughout the pipeline characterizes the spatial temperature instability of the intermediate return water network. The correlation between the two is assessed using the Spearman rank correlation coefficient, as shown in the following formula: ;in, For relevance, The difference in rank between two variables. The number of samples is represented by 1. The closer the correlation coefficient is to 1, the stronger the synchronicity between temporal anomalies and spatial fluctuations.

[0097] The preset correlation threshold (e.g., 0.7) is set based on historical data statistics. When the correlation is greater than or equal to the threshold, it indicates that the edge points simultaneously disturb the spatiotemporal characteristics. In this case, the edge points need to be removed and the spatial location range recalculated: if the difference between the old and new ranges is greater than 0 (e.g., the original range shrinks from 5.2km to 4.8km, the difference is -0.4km), it indicates that the point causes the unstable section to expand and should be identified as a critical heat loss source; otherwise, if the difference is less than 0, it is a non-critical source. If the correlation is less than the threshold, it is directly classified as a non-critical source.

[0098] Example: The standardized deviation of a certain edge point is 0.92, the correlation is 0.75 (>threshold 0.7), and the unstable section shrinks by 0.4km after removal. The difference is negative, so it is determined to be a non-critical heat loss source.

[0099] S3-1: Based on the critical heat loss sources and the non-critical heat loss sources, and in conjunction with the terminal return water temperature, determine the main sources of temperature loss;

[0100] E1: Accumulate the critical temperature loss of all the critical heat loss sources, and simultaneously accumulate the non-critical temperature loss of all the non-critical heat loss sources;

[0101] It should be noted that the temperature loss corresponding to all key heat loss sources is summed up (i.e., the degree of standardization deviation × the rate of temperature change).

[0102] E2: Calculate the critical difference between the critical temperature loss and the terminal return water temperature, and calculate the non-critical temperature loss and the non-critical difference between the terminal return water temperature;

[0103] E3: If the critical difference is greater than the non-critical difference, then the critical heat loss source is the main source of temperature loss;

[0104] E4: If the critical difference is less than the non-critical difference, then the non-critical heat source is the main source of temperature loss;

[0105] E5: If the critical difference is equal to the non-critical difference, then both the critical heat source and the non-critical heat source are major sources of temperature loss.

[0106] It should be noted that, as Figure 5 As shown, in the heat loss analysis of the heating system, the terminal return water temperature serves as the final result of the system's accumulated heat loss, and its value directly reflects the total energy loss level. Based on this temperature, an evaluation benchmark can be established: the total critical temperature loss is obtained by summing the temperature losses from all critical heat loss sources (such as pipe leaks), and the total non-critical temperature loss from non-critical heat loss sources (such as normal heat dissipation sections) is also summed.

[0107] The critical difference refers to the difference between the total critical temperature loss and the end-point return water temperature, characterizing the additional temperature drop caused by the anomaly. The non-critical difference is the difference between the total non-critical loss and the end-point temperature, reflecting the temperature drop magnitude of conventional heat dissipation. By comparing the two: if the critical difference is larger (e.g., critical difference 4.2℃ > non-critical difference 2.5℃), it indicates that abnormal leakage is the dominant loss; if the non-critical difference is larger, uniform heat dissipation is the main factor; when they are equal, their contributions are comparable.

[0108] For example, in a pipeline network, the cumulative heat loss from a critical heat source is 4℃, corresponding to an initial theoretical temperature of 20℃ when the terminal temperature is 16℃, resulting in a critical difference of 4℃. The cumulative loss from non-critical sources is 18.5℃, with a non-critical difference of 2.5℃. Since 4℃ > 2.5℃, the critical heat loss source is determined to be the main source of loss. This method uses the terminal temperature as an anchor point to quantify the contribution of different loss sources, providing a basis for precise control.

[0109] It should be further explained that, in this embodiment 1, the traditional heating temperature loss prediction relies on physical parameters and ignores spatiotemporal characteristics, and proposes a data-driven solution. First, the return water temperature is divided according to the actual monitoring conditions: initial section (from user to heat exchange station), intermediate section (main pipe at the outlet of heat exchange station), and terminal section (heat source inlet), to accommodate missing user-end data.

[0110] Anomalies in the initial section are identified through time-series analysis: temperature difference and rate of change are calculated, and edge points are identified through sliding window feature extraction and DBSCAN clustering to generate standardized deviations that quantify the time-dimensional thermal loss risk. Spatially, the positions of the intermediate pipe sections are sorted, and the standard deviation of adjacent temperature difference sequences is calculated to obtain the overall fluctuation intensity. This is then combined with sliding window analysis to locate unstable sections.

[0111] Based on spatiotemporal characteristic coupling analysis: Spearman correlation coefficient is used to assess the correlation between the degree of standardized deviation and the intensity of fluctuations throughout the process. Threshold determination and spatial range variation are used to distinguish between critical heat loss sources (dominant anomalies) and non-critical heat loss sources (conventional heat dissipation sections). Finally, combined with the terminal return water temperature, the two types of losses are accumulated and the difference with the terminal temperature is calculated. By comparing the difference, the main source of loss is determined, achieving accurate attribution of heat loss independent of physical property parameters.

[0112] Example 2, based on the main sources of temperature loss identified in Example 1, obtains data from heat sources and heat exchange stations, constructs a fused dataset, and performs subsequent predictions, referencing... Figure 6 and Figure 7 The specific implementation is as follows:

[0113] S3-2: Based on the main sources of temperature loss, obtain heat source data and heat exchange station data, and obtain a fused dataset based on the heat source data and heat exchange station data;

[0114] F1: Obtain data on the time of heat source acquisition, water supply temperature, flow rate, and the time, primary heating, and primary flow rate of the heat exchange station;

[0115] F2: Perform outlier detection and removal on heat source data and heat exchange station data, and use machine learning algorithms to fill in missing values;

[0116] F3: Set the time tolerance window, align the timestamps of the heat source data and the heat exchange station data, and merge the data;

[0117] F4: Remove abnormal records where the water supply temperature of the heat source data is lower than the primary temperature supply of the heat exchange station data, and form a preprocessed fusion dataset.

[0118] It should be noted that, as Figure 6As shown, due to the requirement of thermodynamic principles that the temperature of the heat source water supply must be higher than the primary temperature supplied by the heat exchange station, records with physical contradictions where the temperature of the heat source water supply is less than or equal to the primary temperature supplied by the heat exchange station are eliminated.

[0119] It should be noted that, based on the identification of the main sources of temperature loss in Example 1, Example 2 acquires data from heat sources and heat exchange stations because the main sources of loss reveal core abnormal areas in the pipeline network (such as leak sections corresponding to key heat loss sources). This step makes the data acquisition and preprocessing process targeted, ensuring that the fused dataset accurately represents the identified heat loss dynamics, thereby establishing a reliable input for subsequent positive energy transfer prediction and forming a closed-loop logic from anomaly attribution to regulation verification.

[0120] It should be noted that directly obtaining raw data from heat sources and heat exchange stations has significant drawbacks in predicting temperature loss in heating systems: differences in the acquisition frequency of multi-source data lead to time axis deviations, and traditional linear interpolation can mask sudden flow fluctuations (such as sudden changes in pipeline pressure) when reconstructing time series, resulting in feature distortion and control lag. Therefore, systematic preprocessing of heat source timestamps, water supply temperature, flow data, heat exchange station timestamps, primary temperature supply, and primary flow data is necessary—these parameters collectively determine the dynamics of energy transfer. Outlier detection and removal are performed to eliminate sensor fault interference, and a random forest machine learning algorithm is used to fill in missing values ​​to ensure data integrity. A 5-minute time tolerance window is set to align the dual-source timestamps before merging the data to resolve the issue of equipment clock asynchrony. Finally, records with physical inconsistencies, such as heat source water supply temperatures being lower than the primary temperature supply of the heat exchange station, are removed to form a fused dataset. This dataset represents the cleaned multi-source spatiotemporal alignment information, providing a high-quality input foundation for subsequent feature engineering.

[0121] S4-1: Extract features from the fused dataset and obtain a feature matrix;

[0122] G1: Based on the fused dataset, three types of features are extracted: basic features, rate of change features, and lag features. The basic features include time sine and cosine coding, instantaneous energy, and cumulative energy. The rate of change features calculate the multi-scale rate of change of temperature and flow rate of the heat source data. The lag features construct the temperature window lag sequence and flow window lag sequence of the heat source data and the heat exchange station data, respectively.

[0123] G2: The feature matrix composed of the basic feature, the rate of change feature, and the hysteresis feature is scaled, and the time delay label and temperature loss label are standardized respectively.

[0124] It should be noted that during the feature extraction stage, three types of features are constructed based on the fused dataset to comprehensively characterize the dynamics of the heating system. Among the basic features, time sine and cosine coding converts timestamps into periodic signals, as shown in the formula: and It captures intraday heating patterns; instantaneous energy is calculated as the product of heat source supply water temperature and flow rate, reflecting real-time thermal power; cumulative energy statistics are the sum of instantaneous energy over 24 hours, characterizing continuous energy consumption patterns. The rate of change characteristic calculates the rate of change of heat source temperature and flow rate on 6 / 12 / 24-hour scales, using the following formula: The dynamic response at multiple scales is quantified. Lag features are used to construct a 24-hour window sequence of temperature and flow rate of the heat source and heat exchange station, preserving historical state dependencies. The feature matrix is ​​scaled using RobustScaler, and outlier effects are eliminated by subtracting the median and dividing by the interquartile range. Time delay and temperature loss labels are standardized separately, using the following formula: ( The mean, (where the standard deviation is 1), so that the data follows a standard normal distribution, which accelerates model convergence and improves regression accuracy.

[0125] S4-2: Generate event matching pairs based on the feature matrix;

[0126] H1: Based on the feature matrix, the temperature range between the heat source data and the heat exchange station data is calculated using a sliding window.

[0127] H2: When the temperature range of the heat source data exceeds the source threshold, it is marked as a source event; when the temperature range of the heat exchange station data exceeds the station threshold, it is marked as a station event.

[0128] H3: Set time delay range constraints; arrange the source events and station events in chronological order to form a source time queue and a station event queue; traverse the source event queue and the station event queue, and match each station event with only one source event to generate an event matching pair.

[0129] It should be noted that, as Figure 7As shown, in heating system prediction, event matching pairs are used to correlate sudden temperature fluctuation events at the heat source and heat exchange station ends. Based on the feature matrix, a fixed-duration sliding window (e.g., 2 hours) is used to calculate the range (the difference between the highest and lowest temperatures within the window) between the heat source supply water temperature and the primary supply temperature of the heat exchange station. The temperature range calculation quantifies the intensity of short-term temperature fluctuations. When the heat source data range exceeds a preset source-end threshold, it is marked as a source event, characterizing a sudden anomaly in the heat source supply water; when the heat exchange station data range exceeds a station-end threshold, it is marked as a station event, reflecting a sudden temperature change at the heat exchange station receiving end. A time delay range constraint (e.g., 1 minute to 2 hours) is set to limit the reasonable propagation time between events. After forming a source event queue and a station event queue by timestamp, the two queues are traversed sequentially: each station event is matched only with the nearest source event within the time window to avoid duplicate associations. For example, if a heat source experiences a range of 3.5℃ (threshold 2.0℃) at 10:05, it is marked as a source event; 15 minutes later, if a heat exchange station experiences a range of 2.8℃ (threshold 1.8℃), it is marked as a station event. If the time difference between the two events is within the delay constraint, a matching pair is generated, representing the complete event chain of heat fluctuations from the heat source to the heat exchange station.

[0130] It should be noted that the source-end threshold setting is based on the statistical distribution of historical heat source supply water temperature ranges. The average value plus twice the standard deviation is calculated as the threshold to capture significant abnormal fluctuations at the heat source end. The station-end threshold setting is based on the analysis of historical data on the primary supply temperature range of the heat exchange station. The 95th percentile within the rolling window is taken as the threshold to ensure the identification of sudden temperature events at the heat exchange station end.

[0131] S4-3: Based on the event matching pairs, construct a hierarchical fusion model and output the time delay prediction results and temperature loss prediction results.

[0132] I1: The shared feature layer captures bidirectional temporal dependencies through a bidirectional long short-term memory network and introduces a multi-head attention mechanism to focus on key nodes;

[0133] I2: The time delay prediction branch uses a temporal convolutional network to extract temporal features, and the channel dimension is compressed layer by layer;

[0134] I3: The temperature loss prediction branch uses a temporal convolutional network in parallel;

[0135] I4: The two branches are connected to a fully connected regression layer, which synchronously outputs the time delay prediction results and the temperature loss prediction results.

[0136] It should be noted that in the hierarchical fusion model for predicting temperature loss in heating systems, the input data consists of event matching pairs (i.e., spatiotemporal correlation data of abrupt temperature difference events between the heat source and the heat exchange station). The model first processes the data through a shared feature layer: a bidirectional long short-term memory (BiLSTM) network scans the event sequence in both directions to capture the bidirectional temporal dependencies of temperature fluctuations in the heating system (such as the propagation delay from the heat source to the user and the inverse influence of user load feedback); simultaneously, a multi-head attention mechanism is introduced to automatically weight key event nodes, enhancing the ability to identify sudden heat loss signals. The model then adopts a dual-branch structure: the time delay prediction branch uses a temporal convolutional network to compress the channel dimension layer by layer, extracting abstract temporal features of the event propagation path; the temperature loss prediction branch uses a temporal convolutional network of the same structure in parallel, focusing on the feature expression of temperature decay patterns. Finally, the two branches are connected to fully connected regression layers, synchronously outputting numerical prediction results—the time delay prediction result reflects the transmission time of thermal disturbances in the pipeline network, and the temperature loss prediction result quantifies the loss of heat energy during transmission.

[0137] This design unifies the learning of the dynamic essential features of the system through a shared layer, while a dual-branch structure specifically decouples the two types of prediction tasks. Multi-layered dilated convolutions in the temporal convolutional network expand the receptive field, accurately modeling long-range dependencies; the combination of an attention mechanism and a bidirectional recurrent network ensures sensitive capture of key event nodes. During training, a multi-task loss function is jointly optimized, enabling the model to synchronously learn the intrinsic physical relationship between latency and loss. The accuracy of the final output stems from the high-quality input provided by the event matching mechanism based on spatiotemporal feature fusion. The hierarchical architecture fully exploits the temporal patterns of heat transfer and energy decay characteristics of the heating system, thus overcoming the limitations of traditional single-sequence prediction.

[0138] It should be noted that Example 1 accurately located the anomaly point (critical heat loss source) in the pipeline network through spatiotemporal analysis of return water temperature, solving the problem of heat loss attribution under conditions of missing user-end data; Example 2, based on this location result, focuses on the forward energy transfer process from the heat source to the heat exchange station, predicting time delay and temperature loss. The two form a closed loop: the diagnostic results of Example 1 guide Example 2 to acquire multi-source data in a targeted manner, while the prediction results of Example 2 can verify the location accuracy of Example 1 and provide a quantitative basis for dynamic control. This bidirectional coupling design not only compensates for the limitations of a single data stream but also improves the reliability of system decision-making through model cross-validation.

[0139] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A BiLSTM-based heat supply system temperature loss prediction method, characterized in that, Includes the following steps: S1: Collect the return water temperature and define it as initial return water temperature, intermediate return water temperature and final return water temperature; sort the initial return water temperature in chronological order to obtain the initial return water temperature time series, and obtain the standardized deviation based on the initial return water temperature time series; S2: Sort the intermediate return water temperatures in spatial order to obtain an intermediate return water temperature spatial sequence; obtain the fluctuation intensity and spatial location range of the entire pipeline based on the intermediate return water temperature spatial sequence; determine the critical heat loss source and non-critical heat loss source based on the normalization deviation, the fluctuation intensity and spatial location range of the entire pipeline. S3: Based on the critical heat loss sources and the non-critical heat loss sources, and in conjunction with the terminal return water temperature, determine the main sources of temperature loss; based on the main sources of temperature loss, obtain heat source data and heat exchange station data, and obtain a fused dataset based on the heat source data and heat exchange station data; S4: Extract features from the fused dataset and obtain a feature matrix; Generating event matching pairs based on the feature matrix includes: calculating the temperature range of the heat source data and the heat exchange station data using a sliding window based on the feature matrix; marking a source event when the temperature range of the heat source data exceeds a source threshold, and marking a station event when the temperature range of the heat exchange station data exceeds a station threshold; setting time delay range constraints; arranging the source events and station events in chronological order to form a source time queue and a station event queue; traversing the source event queue and the station event queue, with each station event matching only one source event to generate event matching pairs; constructing a hierarchical fusion model based on the event matching pairs, and outputting time delay prediction results and temperature loss prediction results, including: a shared feature layer capturing bidirectional temporal dependencies through a bidirectional long short-term memory network and introducing a multi-head attention mechanism to focus on key nodes; the time delay prediction branch using a temporal convolutional network to extract temporal features, with channel dimensions compressed layer by layer; the temperature loss prediction branch using a temporal convolutional network in parallel; and connecting fully connected regression layers at the ends of the two branches to synchronously output time delay prediction results and temperature loss prediction results.

2. The method for predicting temperature loss in a heating system based on BiLSTM as described in claim 1, characterized in that, The collected return water temperature is defined as initial return water temperature, intermediate return water temperature, and final return water temperature, including: Collect the first return water temperature from the user to the heat exchange station, and use the first return water temperature as the initial return water temperature; Collect the second return water temperature from the heat exchange station to the heat source, and use the second return water temperature as the intermediate return water temperature; The intermediate return water temperature is collected up to the third return water temperature of the heat source, and the third return water temperature is used as the final return water temperature. The initial return water temperature refers to the return water temperature before reaching the heat exchange station, the intermediate return water temperature refers to the return water temperature after leaving the heat exchange station, and the final return water temperature refers to the return water temperature upon reaching the heat source.

3. The method for predicting temperature loss in a heating system based on BiLSTM as described in claim 1, characterized in that, The initial return water temperatures are sorted chronologically to obtain an initial return water temperature time series. The standardized deviation is then determined based on this initial return water temperature time series, including: The initial return water temperatures are sorted in chronological order to obtain an initial return water temperature time series. Calculate the temperature difference and rate of change of adjacent initial return water temperatures in the time series of the initial return water temperature; The temperature difference and the rate of temperature change are traversed using a sliding window. A fixed-size sliding window is moved step by step along the time sequence, moving by one time step each time. All temperature difference data and rate of temperature change data within the window are combined into a feature vector to obtain the traversal result. Based on the traversal results, the DBSCAN algorithm is used to cluster the traversal results to obtain the clustering results; Based on the clustering results, data samples marked as noise points are identified, and these data samples are used as edge points. The Euclidean distance from the feature vector of each edge point to the nearest core point cluster center is calculated as the deviation value. The deviation values ​​of all edge points are normalized to generate a standardized deviation degree.

4. The method for predicting temperature loss in a heating system based on BiLSTM as described in claim 1, characterized in that, The intermediate return water temperatures are sorted spatially to obtain a spatial sequence of intermediate return water temperatures. Based on this spatial sequence, the overall fluctuation intensity and spatial location range of the pipeline are obtained, including: The intermediate return water temperatures are arranged in order of pipe location to generate an intermediate return water temperature spatial sequence. The temperature difference between adjacent positions in the intermediate return water temperature spatial sequence is calculated to form a temperature difference sequence. The standard deviation of the temperature difference sequence is calculated to obtain the standard deviation calculation result, and the standard deviation calculation result is used as the fluctuation intensity of the pipeline throughout the entire process. The temperature difference sequence is traversed using a sliding window, the standard deviation of the data in each window is calculated and the corresponding pipe location interval is recorded; The average standard deviation of all windows is used as the average volatility intensity, and windows that exceed the preset average volatility intensity threshold are marked as unstable segments. The final output includes the overall fluctuation intensity of the pipeline and the spatial location range of the unstable section.

5. A method for predicting temperature loss in a heating system based on BiLSTM as described in claim 1, characterized in that, The determination of critical and non-critical heat loss sources based on the standardized deviation, the intensity of fluctuations throughout the pipeline, and the spatial location range includes: Based on the standardized deviation and the fluctuation intensity of the pipeline throughout the pipeline, the correlation is calculated using the Spearman rank correlation coefficient to obtain the correlation calculation result. If the correlation calculation result is greater than or equal to a preset correlation threshold, edge points are removed, and a new spatial location range is calculated. Based on the difference between the spatial location range and the new spatial location range, if the difference is greater than 0, the edge point is determined to be a critical heat loss source; if the difference is less than 0, the edge point is determined to be a non-critical heat loss source. If the correlation calculation result is less than the preset correlation threshold, then the edge point is directly determined as a non-critical heat loss source.

6. The method for predicting temperature loss in a heating system based on BiLSTM according to claim 1, characterized in that, The determination of the main sources of temperature loss based on the critical heat loss sources and the non-critical heat loss sources, combined with the terminal return water temperature, includes: Accumulate the critical temperature loss of all the critical heat loss sources, and simultaneously accumulate the non-critical temperature loss of all the non-critical heat loss sources; Calculate the critical temperature loss and the critical difference between the terminal return water temperature, and calculate the non-critical temperature loss and the non-critical difference between the terminal return water temperature; If the critical difference is greater than the non-critical difference, then the critical heat loss source is the main source of temperature loss. If the critical difference is less than the non-critical difference, then the non-critical heat source is the main source of temperature loss. If the critical difference is equal to the non-critical difference, then both the critical heat source and the non-critical heat source are major sources of temperature loss.

7. A method for predicting temperature loss in a heating system based on BiLSTM as described in claim 1, characterized in that, The step of acquiring heat source data and heat exchange station data based on the main sources of temperature loss, and obtaining a fused dataset based on the heat source data and heat exchange station data, includes: Acquire data on the time of heat source, water supply temperature, flow rate, and the time, primary heating, and primary flow rate of the heat exchange station; Outlier detection and removal are performed on heat source data and heat exchange station data, and machine learning algorithms are used to fill in missing values; Set a time tolerance window, align the timestamps of the heat source data and the heat exchange station data, and merge the data; Abnormal records where the water supply temperature of the heat source data is lower than the primary temperature supply of the heat exchange station data are removed, resulting in a preprocessed fusion dataset.

8. A method for predicting temperature loss in a heating system based on BiLSTM as described in claim 1, characterized in that, The step of extracting features and obtaining a feature matrix based on the fused dataset includes: Based on the fused dataset, three types of features are extracted: basic features, rate of change features, and lag features. The basic features include time sine and cosine coding, instantaneous energy, and cumulative energy. The rate of change features calculate the multi-scale rate of change of temperature and flow rate of the heat source data. The lag features construct temperature window lag sequences and flow window lag sequences for the heat source data and the heat exchange station data, respectively. The feature matrix composed of the basic feature, the rate of change feature, and the hysteresis feature is scaled, and the time delay label and temperature loss label are standardized respectively.

Citation Information

Patent Citations

  • Heat exchange station control method and system based on indoor temperature separation technology

    CN115289520A

  • Method and device for calculating time delay and temperature loss of heat supply system and medium

    CN117010126A