A method and system for room temperature discrimination based on time-delay alignment of heating trend and residual constraints

CN122571418APending Publication Date: 2026-08-14BEIJING WARM CURRENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-02
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

这种方式割裂了供水温度等驱动变量与室温响应之间的物理因果关系,极易将因供水温度正常调节引起的室温变化误判为异常,或对由传感器局部发热引起的缓变失真漏判

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122571418A_ABST
    Figure CN122571418A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for room temperature identification based on temperature trend time lag alignment and residual constraints, belonging to the field of smart heating and data processing technology. The invention estimates the optimal time lag of the water supply temperature and room temperature sequences using a normalized cross-correlation function and performs time alignment. Within a sliding time window, it calculates the consistency of the change directions of the two sequences to obtain a trend consistency index. Based on a room temperature estimation model with the aligned water supply temperature as input, it calculates the residual and obtains a long-term drift index through a two-sided cumulative residual monitoring model. A trend-residual-drift collaborative judgment is performed to identify valid data and anomaly types. This invention fully adapts to the large lag characteristics of buildings, has high sensitivity to slowly changing drift, and can distinguish anomaly types while ensuring data identification accuracy, providing reliable data support for precise heating and energy conservation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of smart heating and data processing technology, and in particular relates to a method and system for room temperature identification based on temperature trend time lag alignment and residual constraints. Background Technology

[0002] In centralized heating systems, room temperature data is the core basis for regulating the water supply temperature of heat exchange stations, controlling pipeline valves, and optimizing scheduling. In actual operation, room temperature sensors are susceptible to factors such as electromagnetic interference, sudden changes in ambient temperature and humidity, component aging, local heat source interference, and improper installation location, resulting in abnormal data including random spikes, gradual drift, or constant deviations.

[0003] Existing technologies for validating room temperature data suffer from the following main drawbacks. First, they fail to consider physical linkages, relying solely on fixed threshold filtering. For example, upper and lower limits for room temperature are set, and measurements exceeding these limits are considered abnormal. This approach severs the physical causal relationship between driving variables such as water supply temperature and the room temperature response, easily misjudging room temperature changes caused by normal water supply temperature adjustments as abnormal, or failing to detect slow-varying distortions caused by localized sensor heating. Second, they lack modeling and compensation for transmission delays in the heating network. There is typically a transport delay from adjusting the water supply temperature at the heating station to the user's room temperature response. Existing methods directly perform correlation analysis on the misaligned driving and response sequences, without considering pipeline transmission delays and response delays caused by building heat storage. This leads to temporal misalignment, rendering correlation or trend analysis physically unfounded and severely reducing accuracy. Third, the judgment logic is simplistic, lacking synergistic constraints between physical trends and statistical residuals. Single trend analysis is insufficient for handling normal operating conditions where the system is in a steady state or inertial region. Single statistical residual filtering is insensitive to gradually changing drift trends and cannot accurately distinguish between normal operating condition fluctuations and genuine sensor anomalies, especially lacking the ability to detect gradually changing drift anomalies. Fourth, there is a lack of effective detection methods for gradually changing drift anomalies. Existing technologies commonly use methods based on sliding window statistics, but because the estimation model lacks coupling with the driving variables, the filter adaptively tracks the outlier values ​​after drift, resulting in consistently small residuals and missed detections. Fifth, the anomaly types cannot be distinguished, only outputting a binary conclusion of normal or abnormal, failing to provide effective information for subsequent fault diagnosis and affecting the stability of the control system.

[0004] The aforementioned problems lead to erroneous decisions in heating regulation based on incorrect room temperature data, resulting in energy waste and reduced user thermal comfort. Therefore, there is an urgent need for a collaborative data identification method that can integrate time delay compensation, physical trend constraints, and statistical residual constraints, and effectively detect gradual drift. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention proposes a room temperature discrimination method and system based on temperature supply trend time delay alignment and residual constraints, thereby resolving the issues existing in the prior art.

[0006] In a first aspect, to achieve the above objectives, the present invention provides a room temperature discrimination method based on temperature supply trend time-delay alignment and residual constraints, comprising the following steps: Obtain the water supply temperature sequence as the driving variable and the room temperature sequence as the response variable, and perform preprocessing; Using historical normal operation data, the optimal time delay between the water supply temperature sequence and the room temperature sequence is estimated. Based on the optimal time delay, the room temperature sequence is time-shifted and interpolated to obtain the aligned response sequence. Calculate the consistency of the change direction between the water supply temperature sequence and the aligned response sequence within the sliding time window to obtain a trend consistency index; Based on the room temperature estimation model with the aligned water supply temperature as input, the room temperature estimate is obtained, the residual between the measured value and the room temperature estimate is calculated, and the long-term drift index is obtained through the cumulative residual monitoring model. Perform dual-constraint collaborative judgment: if the trend consistency index meets the preset trend threshold condition, the current sampling point is determined to be valid data; if the trend consistency index does not meet the trend threshold condition, but the residual does not exceed the preset residual threshold and the long-term drift index does not exceed the preset drift threshold, it is determined to be valid data; otherwise, it is determined to be invalid data and the anomaly type is recorded. When the proportion of sampling points that are determined to be invalid data in a continuous preset number of sampling points exceeds a preset proportion threshold, the sensor abnormal state flag is triggered. Output data marked as valid.

[0007] Optionally, the process of estimating the optimal time delay includes: Using historical normal operation data, the cross-correlation coefficients of the water supply temperature sequence and the room temperature sequence under different time lags are calculated by normalized cross-correlation function. The time lag corresponding to the maximum cross-correlation coefficient is taken as the optimal time lag. The upper limit of the search range of the time lag is determined according to the pipeline transportation delay and the building heat storage additional delay. When historical normal operation data is insufficient, the initial time delay is calculated based on the equivalent length of the pipeline network, the average flow velocity of hot water, and the additional time delay of building heat storage.

[0008] Optionally, the process of estimating the optimal time delay also includes: During the online operation phase, every preset update cycle, the optimal time delay is recalculated using the water supply temperature sequence and room temperature sequence data that have been determined to be valid within the most recent preset historical window. When the deviation between the recalculated optimal time delay and the current time delay exceeds the preset allowable deviation, the current time delay is replaced by the recalculated optimal time delay; otherwise, the current time delay remains unchanged.

[0009] Optionally, the process of obtaining trend consistency indicators includes: The length of the sliding time window is set based on the optimal time delay and takes into account the building's thermal inertia; Within the sliding time window, calculate the first-order difference between the water supply temperature sequence and the aligned response sequence; After removing sampling points whose absolute difference values ​​do not exceed a preset dead zone threshold, the number of sampling points with consistent difference signs between the two sequences is counted, and the ratio of this number to the total number of valid sampling points is used as the trend consistency index.

[0010] Optionally, the room temperature estimation model is an autoregressive model with driving variables. The autoregressive model takes the aligned water supply temperature and room temperature at the previous time as inputs, and calculates the current room temperature estimate through autoregressive coefficients, driving response coefficients, and bias terms. The autoregressive coefficients, driving response coefficients, and bias terms are obtained offline using the least squares method based on historical normal operation data.

[0011] Optionally, the process of obtaining long-term drift metrics through a cumulative residual monitoring model includes: Perform a multi-sampling-point moving average on the residuals to obtain smoothed residuals; Based on the smoothed residual and the preset allowable offset, calculate the positive cumulative sum and the negative cumulative sum. When the difference between the cumulative sum of the previous time step and the current smoothed residual and the allowable offset is greater than zero, take that value; otherwise, take zero. When the positive or negative cumulative sum exceeds a preset decision threshold, a long-term drift anomaly is determined, and the cumulative sum is reset to zero.

[0012] Optionally, the process of performing dual-constraint collaborative decision-making also includes: The continuous sampling points are confirmed. Only when a predetermined number of consecutive sampling points are determined to be invalid data by the dual constraint collaboration are the predetermined number of consecutive sampling points marked as invalid data. If a single sampling point is determined to meet the invalid condition but subsequent sampling points do not meet it, the single sampling point is marked as a suspected anomaly.

[0013] Secondly, the present invention also provides a room temperature discrimination system based on heating trend time-delay alignment and residual constraints, for implementing a room temperature discrimination method based on heating trend time-delay alignment and residual constraints, the system comprising: The data acquisition and preprocessing module is used to acquire the water supply temperature sequence as the driving variable and the room temperature sequence as the response variable, and to perform preprocessing. The time-delay alignment module is used to estimate the optimal time delay between the water supply temperature sequence and the room temperature sequence using historical normal operation data, and to perform time shifting and interpolation on the room temperature sequence based on the optimal time delay to obtain the aligned response sequence. The trend analysis module is used to calculate the consistency of the change direction between the water supply temperature sequence and the aligned response sequence within a sliding time window, and to obtain a trend consistency index. The residual and drift calculation module is used to obtain the room temperature estimate based on the room temperature estimation model with the aligned water supply temperature as input, calculate the residual between the measured value and the room temperature estimate, and obtain the long-term drift index through the cumulative residual monitoring model. The dual-constraint collaborative judgment module is used to perform dual-constraint collaborative judgment: if the trend consistency index meets the preset trend threshold condition, the current sampling point is determined to be valid data; if the trend consistency index does not meet the trend threshold condition, but the residual does not exceed the preset residual threshold and the long-term drift index does not exceed the preset drift threshold, it is determined to be valid data; otherwise, it is determined to be invalid data and the anomaly type is recorded. The abnormal state management module is used to trigger a sensor abnormal state flag when the proportion of sampling points judged as invalid data in a continuous preset number of sampling points exceeds a preset proportion threshold. The valid data output module is used to output data that is marked as valid.

[0014] Thirdly, the present invention also provides a computer terminal device, comprising: One or more processors; A memory, coupled to the processor, for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the steps of the room temperature discrimination method based on the time lag alignment and residual constraints of the first aspect described above.

[0015] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the steps of the room temperature discrimination method based on temperature supply trend time delay alignment and residual constraints in the first aspect described above.

[0016] Compared with the prior art, the present invention has the following advantages and technical effects: This invention provides a room temperature identification method based on time-delay alignment of supply water temperature and residual constraints. Time-delay alignment eliminates the phase misalignment between the supply water temperature and room temperature sequences, ensuring that trend analysis and residual calculation are based on strict time alignment, thus accurately reflecting the physical linkage. A room temperature estimation model with driving variables is employed, introducing the aligned supply water temperature as input. This allows the estimated value to reflect the physical coupling between the driving force and the response, significantly improving the sensitivity of the residual to gradual drift. Through a dual-constraint collaborative judgment mechanism combining trend consistency analysis and residual drift monitoring, valid data can be quickly confirmed when trends are highly consistent, while anomalies can be captured using statistical constraints when trends deviate. This method has the ability to detect random spikes, short-term residual anomalies, and gradual drift. This invention fully adapts to the large time-delay characteristics caused by building heat storage, avoiding misjudgments due to insufficient time-delay estimation. It can also distinguish anomaly types, providing a basis for subsequent fault diagnosis and precise operation and maintenance, ensuring the stable operation of the heating control system from the source. Attached Figure Description

[0017] 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 illustrating a room temperature discrimination method based on heating trend time delay alignment and residual constraints according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the dual-constraint collaborative decision-making logic in an embodiment of the present invention; Figure 3 This is a schematic diagram of a room temperature discrimination system based on temperature supply trend time delay alignment and residual constraint according to an embodiment of the present invention. Detailed Implementation

[0018] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0019] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0020] Example 1 like Figure 1 As shown, this embodiment provides a room temperature discrimination method based on temperature supply trend time lag alignment and residual constraints, including: Obtain the water supply temperature sequence as the driving variable and the room temperature sequence as the response variable, and perform preprocessing; Using historical normal operation data, the optimal time delay between the water supply temperature sequence and the room temperature sequence is estimated. Based on the optimal time delay, the room temperature sequence is time-shifted and interpolated to obtain the aligned response sequence. Calculate the consistency of the change direction between the water supply temperature sequence and the aligned response sequence within the sliding time window to obtain a trend consistency index; Based on the room temperature estimation model with the aligned water supply temperature as input, the room temperature estimate is obtained, the residual between the measured value and the room temperature estimate is calculated, and the long-term drift index is obtained through the cumulative residual monitoring model. Perform dual-constraint collaborative judgment: if the trend consistency index meets the preset trend threshold condition, the current sampling point is determined to be valid data; if the trend consistency index does not meet the trend threshold condition, but the residual does not exceed the preset residual threshold and the long-term drift index does not exceed the preset drift threshold, it is determined to be valid data; otherwise, it is determined to be invalid data and the anomaly type is recorded. When the proportion of sampling points that are determined to be invalid data in a continuous preset number of sampling points exceeds a preset proportion threshold, the sensor abnormal state flag is triggered. Output data marked as valid.

[0021] Example 1 is applied to a centralized heating community system, where the heat exchange station supplies heat to multiple buildings. It is known that the building envelope of this community has significant heat storage capacity, and the response time of room temperature to changes in supply water temperature is typically between 1.5 and 2.5 hours. The specific implementation steps are as follows: Further, step 1: Data acquisition and preprocessing A secondary-side water supply temperature sensor with an accuracy of ±0.1℃ was installed at the heat exchange station in a centralized heating community. Data was collected and uploaded via the PLC control cabinet of the heat exchange station. A socket-type room temperature sensor with an accuracy of ±0.2℃ was installed on the interior wall of a typical user's living room, 1.5 meters above the ground. Data was uploaded to the smart heating platform via NB-IoT signals, with a sampling period Ts=60 seconds. The resulting driving variable sequence—water supply temperature—was obtained after data collection. and response variable sequence—room temperature .

[0022] Preprocessing includes: missing values ​​are filled using linear interpolation, with no more than 5 consecutive missing sampling points; water supply temperature Values ​​exceeding the physically reasonable range (0℃~60℃) should be discarded and marked; room temperature. Values ​​exceeding the physically reasonable range (0℃~50℃) were discarded and marked. The room temperature data were standardized using the water supply temperature collection timestamp as a benchmark.

[0023] Furthermore, the process of estimating the optimal time delay includes: Using historical normal operation data, the cross-correlation coefficients of the water supply temperature sequence and the room temperature sequence under different time lags are calculated by normalized cross-correlation function. The time lag corresponding to the maximum cross-correlation coefficient is taken as the optimal time lag. The upper limit of the search range of the time lag is determined according to the pipeline transportation delay and the building heat storage additional delay. When historical normal operation data is insufficient, the initial time delay is calculated based on the equivalent length of the pipeline network, the average flow velocity of hot water, and the additional time delay of building heat storage.

[0024] Furthermore, the process of estimating the optimal time delay also includes: During the online operation phase, every preset update cycle, the optimal time delay is recalculated using the water supply temperature sequence and room temperature sequence data that have been determined to be valid within the most recent preset historical window. When the deviation between the recalculated optimal time delay and the current time delay exceeds the preset allowable deviation, the current time delay is replaced by the recalculated optimal time delay; otherwise, the current time delay remains unchanged.

[0025] Specifically, the implementation process of this embodiment includes: Step 2: Time Delay Estimation and Adaptive Time Alignment (a) Cold start initialization When the system was first launched, there was insufficient historical normal operation data, so an empirical formula was used to determine the initial time delay: ; in, The initial time delay during the system's cold start phase is given by L, which is the equivalent length of the pipeline from the heating station to a typical user. In this embodiment, L = 1.8 km; v is the average flow velocity of hot water in the pipeline, which is taken as v = 1.2 km / h. Add time delay to building heat storage, take =45min. Calculated .

[0026] (b) Time-delay search calculation After the cumulative normal operating data reaches Tmin=72 hours, the water supply temperature of the driving sequence is calculated using the normalized cross-correlation function. With response sequence at room temperature Calculate the optimal time delay: ; in, When the time lag is d, the water supply temperature and room temperature The cross-correlation coefficient ranges from -1 to 1. The closer it is to 1, the higher the water supply temperature. and room temperature The stronger the linear correlation is at a lag of d minutes; This is the value of the driving sequence at time t. In this example, typically... . For the response sequence at room temperature The average of the water supply temperature for the series (the average of all X(t)); The average room temperature of the sequence (the average of all Y(t+d)); Let Y be the value of the time series Y at time (t+d) (e.g., the secondary network water supply temperature at time t+d, where d is the lag time); where d is the time lag search variable, the search range is d∈[0,240]min, and the search step size is 1min. The maximum value corresponding to d As the optimal time delay τ: ; Where τ is the current optimal time delay of the system, in minutes; Let be a mathematical operator, representing the variable d that makes the function in the latter expression reach its maximum value; When the time lag is d, the water supply temperature and room temperature The cross-correlation coefficient.

[0027] In this embodiment, τ is calculated to be 125 min.

[0028] Based on this time delay, the response sequence is time-shifted and linearly interpolated to obtain the aligned room temperature response sequence Y'(t).

[0029] (c) Online adaptive update During online operation, the system updates every ΔT update =7 days, in the recent W τ =Recalculate the optimal time delay τ within a 168-hour historical window new If |τ new -τ|>τ tol =15min, then with τ new Replace the current τ; otherwise, leave it unchanged. Where ΔT update: For time-delay adaptive update period, W τ The duration of the historical data window used to calculate the optimal time delay, τ new The new optimal time delay, calculated after online update, is expressed in minutes.

[0030] Furthermore, the process of obtaining trend consistency indicators includes: The length of the sliding time window is set based on the optimal time delay and takes into account the building's thermal inertia; Within the sliding time window, calculate the first-order difference between the water supply temperature sequence and the aligned response sequence; After removing sampling points whose absolute difference values ​​do not exceed a preset dead zone threshold, the number of sampling points with consistent difference signs between the two sequences is counted, and the ratio of this number to the total number of valid sampling points is used as the trend consistency index.

[0031] Specifically, the implementation process of this embodiment includes: Step 3: Trend Consistency Analysis To ensure the sliding window length fully covers a complete response cycle, based on the maximum time delay and building thermal inertia, the sliding time window length M = 240 (corresponding to 240 minutes) is set, and the dead zone temperature threshold is determined. =0.1℃. For the current time t, extract the most recent 240 points of X and Y′ within the window. Calculate the first-order differences of the driving sequence and the aligned response sequence respectively: ΔX(t) = X(t) - X(t-1); ΔY′(t)=Y′(t)-Y′(t-1); Where ΔX(t) is the first difference of the water supply temperature sequence at time t; ΔY′(t) is the first difference of the aligned room temperature sequence at time t.

[0032] Sampling points whose absolute values ​​of both sides do not exceed the dead zone threshold are excluded, only when |ΔX|> And |ΔY′| Only when the sign of ΔX and ΔY' is consistent is the point considered a valid change point. The number of valid points within the statistics window where ΔX and ΔY' have the same sign is counted. Calculate the trend consistency index : ; in, This represents the total number of valid statistical points after deducting dead zones. ∈[0,1], the larger the value, the better the consistency of the driver-response trend.

[0033] Furthermore, the room temperature estimation model is an autoregressive model with driving variables. The autoregressive model takes the aligned water supply temperature and room temperature at the previous time as inputs, and calculates the current room temperature estimate through autoregressive coefficients, driving response coefficients, and bias terms. The autoregressive coefficients, driving response coefficients, and bias terms are obtained offline using the least squares method based on historical normal operation data.

[0034] Furthermore, the process of obtaining long-term drift indicators through the cumulative residual monitoring model includes: Perform a multi-sampling-point moving average on the residuals to obtain smoothed residuals; Based on the smoothed residual and the preset allowable offset, calculate the positive cumulative sum and the negative cumulative sum. When the difference between the cumulative sum of the previous time step and the current smoothed residual and the allowable offset is greater than zero, take that value; otherwise, take zero. When the positive or negative cumulative sum exceeds a preset decision threshold, a long-term drift anomaly is determined, and the cumulative sum is reset to zero.

[0035] Specifically, the implementation process of this embodiment includes: Step 4: Room temperature estimation and residual-drift calculation based on driving variables (a) Room temperature estimation model based on driving variables A real-time estimation of room temperature is performed using an autoregressive model with driving variables (ARX model): ; in, This is an estimate of the room temperature. t is the water supply temperature after time-delay alignment at time t-1; a is the room temperature autoregressive coefficient, reflecting the building's heat storage inertia; b is the driving response coefficient, reflecting the driving intensity of the water supply temperature on the room temperature; c is the bias term, reflecting static heat loss such as heat dissipation from the building envelope.

[0036] The model parameters {a, b, c} were obtained offline using historical normal operation data via the least squares method. In this embodiment, the identification results are a=0.82, b=0.14, and c=2.1.

[0037] The core feature of this model is the introduction of aligned water supply temperature. As input variables, make the estimated value It reflects the physical relationship between water supply temperature and room temperature, and unlike existing methods that rely solely on historical room temperature values ​​for recursive filtering, the residuals are significantly more sensitive to slowly changing drift.

[0038] (b) Short-run residual calculation Calculate the instantaneous absolute residual e(t) between the measured room temperature at time t and the model estimate: ; To reduce the impact of random fluctuations, the residuals are subjected to... =Smoothed residual at time t after 5-point moving average smoothing: ; Where ē(t) is the smoothed residual at time t after multi-point moving average smoothing; Ne is the number of sampling points used in the residual smoothing moving average. (c) Long-term drift monitoring based on accumulated residuals (CUSUM): The two-sided cumulative residual control chart (CUSUM) method is used to detect slowly varying drift: Positive cumulative sum: S h (t)=max[0,S h (t-1)+ -K]; Negative cumulative sum: S l (t)=max[0,S l (t-1)- -K]; Among them, S h (t) represents the sum of positive cumulative residuals at time t, used to monitor the positive drift of room temperature; S l (t) is the cumulative negative residual of CUSUM at time t, used to monitor the negative drift of room temperature; ē(t) is the smoothed residual at time t after multi-point moving average smoothing; K is the reference value (allowable offset), K=0.15℃; H is the decision threshold, H=1.2℃.

[0039] When S h (t)>H or S l When (t)>H, a long-term drift anomaly is determined, the cumulative sum is randomly reset to 0, and monitoring restarts.

[0040] Compared with existing methods that use linear regression trend strength (|k| value), the CUSUM method has higher sensitivity for detecting slowly varying drifts and has a more rigorous statistical theoretical basis.

[0041] Furthermore, the process of performing dual-constraint collaborative decision-making also includes: The continuous sampling points are confirmed. Only when a predetermined number of consecutive sampling points are determined to be invalid data by the dual constraint collaboration are the predetermined number of consecutive sampling points marked as invalid data. If a single sampling point is determined to meet the invalid condition but subsequent sampling points do not meet it, the single sampling point is marked as a suspected anomaly.

[0042] Specifically, the implementation process of this embodiment includes: Step 5: Dual-constraint collaborative determination like Figure 2 As shown, the decision logic is as follows: Initial thresholds were set based on statistical analysis of the system's historical normal operating periods. The 5th percentile of the statistical trend consistency index TC(t) was 0.65, and the 95th percentile of the smoothed residual e was 0.5℃. A judgment was performed for each sampling point: (1) Determination of trend consistency: If TC(t) ≥ 0.65, the current sampling point is determined to be valid data, and the anomaly type is marked as "no anomaly".

[0043] (2) Residual-drift joint determination: If TC(t) < 0.65, then further checks are needed: If |ē(t)| < 0.5, and Sh(t) ≤ H or Sl(t) ≤ He(t), then the data is considered valid and recorded as "trend fluctuation".

[0044] If |ē(t)|>0.5, and e(t)>0.5℃ and the cumulative residual does not exceed the limit, then it is determined to be invalid data and recorded as "short-term residual abnormality"; If S h (t)>H or S l If (t)>H, it is determined to be invalid data and "long-term drift anomaly" is recorded; If both residual and cumulative residual exceed the limit, then "multiple anomalies" are recorded.

[0045] Step S6: Continuous anomaly monitoring and sensor status marking Set the observation window K = 60 sampling points (corresponding to 60 minutes), and the alarm threshold P for the percentage of invalid data within the continuous observation window. th =0.6.

[0046] When the number of invalid data points exceeds K×P in K consecutive sampling points. th When the number of sensors reaches 36, an abnormal sensor status flag is triggered, and an alarm signal is sent to the operation and maintenance platform.

[0047] After a sensor is marked as abnormal, the number of consecutive valid sampling points N required to subsequently remove the abnormality marker from the sensor is as follows: reset If all 10 sampling points are determined to be valid data, the abnormality marker will be automatically removed.

[0048] Step S7: Output valid data The room temperature data Y will be deemed valid. valid(t) Output to: Heat exchange station water supply temperature setpoint optimization and adjustment module; Historical database storage is used for subsequent analysis and model training.

[0049] This embodiment was continuously operated for a period of time during the heating season in the above-mentioned heating community, and the verification results are shown in Table 1.

[0050] Table 1 Compared with the single threshold method (accuracy 82.5%) and the single residual method (accuracy 88.3%), the overall accuracy of this embodiment is improved to 96.8%.

[0051] like Figure 3As shown, based on the same general inventive concept, this invention also provides a room temperature discrimination system based on heating trend time-delay alignment and residual constraints. The room temperature discrimination system based on heating trend time-delay alignment and residual constraints provided by this invention will be described below. The room temperature discrimination system based on heating trend time-delay alignment and residual constraints described below can be referred to in correspondence with the room temperature discrimination method based on heating trend time-delay alignment and residual constraints described above. The system includes: The data acquisition and preprocessing module is used to acquire the water supply temperature sequence as the driving variable and the room temperature sequence as the response variable, and to perform preprocessing. The time-delay alignment module is used to estimate the optimal time delay between the water supply temperature sequence and the room temperature sequence using historical normal operation data, and to perform time shifting and interpolation on the room temperature sequence based on the optimal time delay to obtain the aligned response sequence. The trend analysis module is used to calculate the consistency of the change direction between the water supply temperature sequence and the aligned response sequence within a sliding time window, and to obtain a trend consistency index. The residual and drift calculation module is used to obtain the room temperature estimate based on the room temperature estimation model with the aligned water supply temperature as input, calculate the residual between the measured value and the room temperature estimate, and obtain the long-term drift index through the cumulative residual monitoring model. The dual-constraint collaborative judgment module is used to perform dual-constraint collaborative judgment: if the trend consistency index meets the preset trend threshold condition, the current sampling point is determined to be valid data; if the trend consistency index does not meet the trend threshold condition, but the residual does not exceed the preset residual threshold and the long-term drift index does not exceed the preset drift threshold, it is determined to be valid data; otherwise, it is determined to be invalid data and the anomaly type is recorded. The abnormal state management module is used to trigger a sensor abnormal state flag when the proportion of sampling points judged as invalid data in a continuous preset number of sampling points exceeds a preset proportion threshold. The valid data output module is used to output data that is marked as valid.

[0052] In this embodiment, a computer terminal device is provided, including: One or more processors; A memory, coupled to the processor, for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the steps of the above-described room temperature discrimination method based on temperature supply trend time lag alignment and residual constraints.

[0053] In this embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the above-described room temperature discrimination method based on temperature supply trend time delay alignment and residual constraints.

[0054] Example 2 Based on Example 1, step S5 adds a fault tolerance mechanism: the number of consecutive invalid sampling points N required for single-point anomaly fault tolerance confirmation. tol Only when both sampling points meet the invalidation criteria is the data ultimately marked as invalid; if a single sampling point meets the invalidation criteria, it is only marked as "suspected anomaly" and needs to wait for confirmation from the next sampling point. This mechanism effectively reduces single-point false alarms caused by occasional factors such as transient electromagnetic interference, further reducing the false alarm rate to 1.8%.

[0055] Example 3 Based on Example 1, step S6 introduces multi-sensor collaborative verification: when a sensor is marked as abnormal, the room temperature data of that sensor is automatically compared with the data of other normally operating sensors in the same heat exchange station. If the correlation coefficient between the data of that sensor and other sensors is lower than the correlation coefficient judgment threshold r for multi-sensor collaborative verification... th If the correlation coefficient is 0.5, it is confirmed that the sensor itself is faulty; if the correlation coefficient is normal but the trend consistency index is consistently low, it is used to help determine that the local environment is abnormal (such as a user opening a window, a local heat source, etc.), providing more accurate fault location information for operation and maintenance.

[0056] Example 4 Based on Example 1, the room temperature estimation model parameters {a,b,c} in step S4 are updated in real time using the online recursive least squares (RLS) method with a forgetting factor λ=0.995, so that the model parameters adaptively track the changes in building thermal characteristics at different stages of the heating season (early cold period, severe cold period, and late cold period), further improving the estimation accuracy and the sensitivity of residual abnormality detection.

[0057] This invention provides a room temperature identification method and system based on time-delay alignment of heating trend and residual constraints. By eliminating phase misalignment between the water supply temperature and room temperature sequences through time-delay alignment, trend analysis and residual calculation are established on a strictly time-aligned basis, ensuring accurate reflection of physical linkages. A room temperature estimation model with driving variables is adopted, introducing the aligned water supply temperature as input, enabling the estimated value to reflect the physical coupling between the driving force and the response, significantly improving the sensitivity of the residual to slow-varying drift. Through a dual-constraint collaborative judgment mechanism combining trend consistency analysis and residual drift monitoring, valid data can be quickly confirmed when trends are highly consistent, and anomalies can be captured using statistical constraints when trends deviate. It has the ability to detect random spikes, short-term residual anomalies, and slow-varying drift. This invention fully adapts to the large time-delay characteristics caused by building heat storage, avoiding misjudgments due to insufficient time-delay estimation, and can distinguish anomaly types, providing a basis for subsequent fault diagnosis and precise operation and maintenance, ensuring the stable operation of the heating control system from the source.

[0058] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A room temperature discrimination method based on temperature supply trend time-delay alignment and residual constraints, characterized in that, Includes the following steps: Obtain the water supply temperature sequence as the driving variable and the room temperature sequence as the response variable, and perform preprocessing; Using historical normal operation data, the optimal time delay between the water supply temperature sequence and the room temperature sequence is estimated. Based on the optimal time delay, the room temperature sequence is time-shifted and interpolated to obtain the aligned response sequence. Calculate the consistency of the change direction between the water supply temperature sequence and the aligned response sequence within the sliding time window to obtain a trend consistency index; Based on the room temperature estimation model with the aligned water supply temperature as input, the room temperature estimate is obtained, the residual between the measured value and the room temperature estimate is calculated, and the long-term drift index is obtained through the cumulative residual monitoring model. Perform dual-constraint collaborative judgment: if the trend consistency index meets the preset trend threshold condition, the current sampling point is determined to be valid data; if the trend consistency index does not meet the trend threshold condition, but the residual does not exceed the preset residual threshold and the long-term drift index does not exceed the preset drift threshold, it is determined to be valid data; otherwise, it is determined to be invalid data and the anomaly type is recorded. When the proportion of sampling points that are determined to be invalid data in a continuous preset number of sampling points exceeds a preset proportion threshold, the sensor abnormal state flag is triggered. Output data marked as valid.

2. The method according to claim 1, characterized in that, The process of estimating the optimal time delay includes: Using historical normal operation data, the cross-correlation coefficients of the water supply temperature sequence and the room temperature sequence under different time lags are calculated by normalized cross-correlation function. The time lag corresponding to the maximum cross-correlation coefficient is taken as the optimal time lag. The upper limit of the search range of the time lag is determined according to the pipeline transportation delay and the building heat storage additional delay. When historical normal operation data is insufficient, the initial time delay is calculated based on the equivalent length of the pipeline network, the average flow velocity of hot water, and the additional time delay of building heat storage.

3. The method according to claim 2, characterized in that, The process of estimating the optimal time delay also includes: During the online operation phase, every preset update cycle, the optimal time delay is recalculated using the water supply temperature sequence and room temperature sequence data that have been determined to be valid within the most recent preset historical window. When the deviation between the recalculated optimal time delay and the current time delay exceeds the preset allowable deviation, the current time delay is replaced by the recalculated optimal time delay; otherwise, the current time delay remains unchanged.

4. The method according to claim 1, characterized in that, The process of obtaining trend consistency indicators includes: The length of the sliding time window is set based on the optimal time delay and takes into account the building's thermal inertia; Within the sliding time window, calculate the first-order difference between the water supply temperature sequence and the aligned response sequence; After removing sampling points whose absolute difference values ​​do not exceed a preset dead zone threshold, the number of sampling points with consistent difference signs between the two sequences is counted, and the ratio of this number to the total number of valid sampling points is used as the trend consistency index.

5. The method according to claim 1, characterized in that, The room temperature estimation model is an autoregressive model with driving variables. The autoregressive model takes the aligned water supply temperature and room temperature at the previous time as inputs, and calculates the current room temperature estimate through autoregressive coefficients, driving response coefficients, and bias terms. The autoregressive coefficients, driving response coefficients, and bias terms are obtained offline using the least squares method based on historical normal operation data.

6. The method according to claim 1, characterized in that, The process of obtaining long-term drift indicators through the cumulative residual monitoring model includes: Perform a multi-sampling-point moving average on the residuals to obtain smoothed residuals; Based on the smoothed residual and the preset allowable offset, calculate the positive cumulative sum and the negative cumulative sum. When the difference between the cumulative sum of the previous time step and the current smoothed residual and the allowable offset is greater than zero, take that value; otherwise, take zero. When the positive or negative cumulative sum exceeds a preset decision threshold, a long-term drift anomaly is determined, and the cumulative sum is reset to zero.

7. The method according to claim 1, characterized in that, The process of performing dual-constraint collaborative decision-making also includes: The continuous sampling points are confirmed. Only when a predetermined number of consecutive sampling points are determined to be invalid data by the dual constraint collaboration are the predetermined number of consecutive sampling points marked as invalid data. If a single sampling point is determined to meet the invalid condition but subsequent sampling points do not meet it, the single sampling point is marked as a suspected anomaly.

8. A room temperature discrimination system based on temperature supply trend time-delay alignment and residual constraints, characterized in that, The system for implementing the method of any one of claims 1-7 comprises: The data acquisition and preprocessing module is used to acquire the water supply temperature sequence as the driving variable and the room temperature sequence as the response variable, and to perform preprocessing. The time-delay alignment module is used to estimate the optimal time delay between the water supply temperature sequence and the room temperature sequence using historical normal operation data, and to perform time shifting and interpolation on the room temperature sequence based on the optimal time delay to obtain the aligned response sequence. The trend analysis module is used to calculate the consistency of the change direction between the water supply temperature sequence and the aligned response sequence within a sliding time window, and to obtain a trend consistency index. The residual and drift calculation module is used to obtain the room temperature estimate based on the room temperature estimation model with the aligned water supply temperature as input, calculate the residual between the measured value and the room temperature estimate, and obtain the long-term drift index through the cumulative residual monitoring model. The dual-constraint collaborative judgment module is used to perform dual-constraint collaborative judgment: if the trend consistency index meets the preset trend threshold condition, the current sampling point is determined to be valid data; if the trend consistency index does not meet the trend threshold condition, but the residual does not exceed the preset residual threshold and the long-term drift index does not exceed the preset drift threshold, it is determined to be valid data; otherwise, it is determined to be invalid data and the anomaly type is recorded. The abnormal state management module is used to trigger a sensor abnormal state flag when the proportion of sampling points judged as invalid data in a continuous preset number of sampling points exceeds a preset proportion threshold. The valid data output module is used to output data that is marked as valid.

9. A computer terminal device, characterized in that, include: One or more processors; A memory, coupled to the processor, for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors perform the steps of the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-7.