A dynamic threshold leakage identification method based on hierarchical time series prediction

By combining hierarchical time series prediction and dynamic thresholding, a hybrid network model was constructed, which solved the adaptability and scope problems of water supply system leakage detection, achieved efficient and real-time leakage identification, reduced costs and improved identification accuracy.

CN122174121APending Publication Date: 2026-06-09TIANJIN HUACHENG WATER SUPPLY ENG TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANJIN HUACHENG WATER SUPPLY ENG TECH CO LTD
Filing Date
2026-04-10
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing methods for detecting leaks in water supply systems are inefficient, costly, and difficult to cover complex pipe networks. They also have limited ability to identify hidden and short-term instantaneous leaks. Traditional methods have poor adaptability and limited detection range.

Method used

A dynamic threshold leakage identification method based on hierarchical time series prediction is adopted. By constructing a hierarchical hybrid network and training it with time series datasets, a dynamic threshold method is combined to identify potential leakage. The upper limit of the interval is used as the boundary of normal water use, and the threshold is dynamically adjusted to identify leakage.

Benefits of technology

It achieves all-time, high-precision, and real-time leakage identification, reduces engineering deployment costs, improves the ability to identify hidden leakage, adapts to the water consumption fluctuation patterns of the water supply system, and reduces water waste and operation and maintenance costs caused by missed detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122174121A_ABST
    Figure CN122174121A_ABST
Patent Text Reader

Abstract

The application discloses a dynamic threshold leakage identification method based on hierarchical time series prediction, and relates to the field of leakage detection of water supply systems. By obtaining water quantity or water meter data of different levels with hour granularity, standard time series data sets are obtained through format conversion, time series completion and data merging processing. The top, middle and bottom sequences are identified. For water types lacking direct monitoring data, a virtual sequence is constructed by using hierarchical aggregation constraint coupled moving average filtering to complete the aggregation constraint matrix. A time series prediction model with hour granularity is constructed based on a hierarchical hybrid network to determine the prediction performance with coefficient of determination and root mean square error. The upper limit of the interval is used as the normal water consumption boundary by using the prediction interval of different confidence levels output by the model. The optimal dynamic threshold proportion is determined by traversing the threshold candidate range. When the actual water quantity exceeds the proportion, it is determined as potential leakage. The accuracy, precision and recall rate are used as evaluation criteria to maximize the recall rate and reduce the missed detection loss.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of leakage detection in water supply systems, and specifically to a dynamic threshold leakage identification method based on hierarchical time series prediction. Background Technology

[0002] Water supply systems are core infrastructure for ensuring residents' lives. However, the leakage rate of my country's water supply network has long been at a high level. Among these, hidden leakage is highly concealed and lasts for a long time, causing not only serious waste of water resources but also increasing the operating costs of the water supply system and even posing safety hazards. Traditional leakage detection methods rely on manual inspections, which are inefficient, costly, and have a large time lag. They are also difficult to cover complex pipe network areas and have limited ability to identify hidden leakage and short-term instantaneous leakage.

[0003] With the development of artificial intelligence technology, data-driven methods are gradually becoming the mainstream for leakage control. For example, CN120708653B discloses a leakage identification method based on a neural network architecture, using pipe vibration audio signals to train a CNN-BiLSTM hybrid neural network model to establish a leakage detection model for a water supply system. However, models based on acoustic monitoring are easily affected by environmental noise, pipe network materials, terrain conditions, and other factors, resulting in limited detection range and difficulty in distinguishing normal water usage fluctuations from leakage signals. Water usage fluctuations in water supply systems exhibit periodicity, and time series prediction methods can capture the temporal patterns of water usage through historical data to achieve more accurate leakage identification. For instance, CN120012328B discloses a leakage detection method combining time-frequency domain analysis, considering the influence of time-domain and frequency-domain signals on water supply pressure, thus improving the accuracy of leakage detection. However, the relationship between pressure and leakage is indirect. Pressure changes caused by leakage can only be monitored through hydraulic transmission in the pipeline network. During the transmission process, it is easily affected by factors such as pipeline structure, terrain elevation differences, and pump station scheduling and regulation. Moreover, the deployment cost of pressure monitoring points is high and the coverage is limited.

[0004] Flow-based detection methods can continuously monitor the operational status of pipeline networks, and are particularly effective in detecting slow-developing chronic or hidden leaks. Furthermore, data analysis can enable preliminary location of leak areas. However, the minimum flow method has limitations in its application scenarios, making it difficult to achieve continuous leak monitoring. Fixed threshold methods suffer from poor adaptability and weak anti-interference capabilities. Therefore, the accuracy and robustness of leak identification need improvement. Summary of the Invention

[0005] In view of the problems existing in the prior art, the purpose of this invention is to provide a dynamic threshold leakage identification method based on hierarchical time series prediction, which solves the problems of poor adaptability to water consumption fluctuations in water supply systems and limited detection range of existing leakage detection methods, and realizes leakage identification of water supply systems in all time periods with high accuracy and real time.

[0006] To achieve the above objectives, this invention provides a dynamic threshold leakage identification method based on hierarchical time series prediction, comprising the following steps:

[0007] S1. Data set preparation: Obtain water volume reports or water meter data at different levels of hourly granularity, and process the data to obtain a standard time series dataset.

[0008] S2. Construction of Aggregation Constraint Matrix: Identify the top-level sequence, intermediate sequence and bottom-level sequence. For water use types that lack direct monitoring data, construct a virtual sequence by coupling moving average filtering with hierarchical aggregation constraints and align the time granularity.

[0009] S3, Hierarchical Temporal Prediction: Construct a hierarchical hybrid network and train it using a temporal dataset. At the same time, guide sample coordination through the constructed aggregation constraint matrix to ensure the consistency and accuracy of the prediction.

[0010] S4. Dynamic Threshold Leakage Identification: A time-series prediction model trained based on a hierarchical hybrid network is used to predict intervals. The upper limit of the interval is used as a reasonable boundary for normal water use. Dynamic threshold traversal is performed in the candidate range to determine the optimal threshold. When the actual water volume exceeds the threshold of the upper limit of the predicted interval, it is determined to be a potential leakage.

[0011] Preferably, in step S1, the data preprocessing further includes:

[0012] S101, Format Conversion: Mark values ​​less than or equal to 0 in hourly water volume reports or water meter data as missing values, identify the first outlier using the interquartile range method and mark it as the first suspected loss, mask the first outlier and then periodically fill it, and then restore the first outlier, and record the hourly water volume reports or water meter data in a unified time series format.

[0013] S102, Time Series Completion: Complete the hourly granular time window, mark values ​​with water volume less than 0 as missing values, use the interquartile range method to identify secondary outliers and mark them as secondary suspected leaks, after masking the secondary outliers, perform periodic filling again, then restore the secondary outliers, and mark the intersection with the first outlier described in S101 as suspected leaks.

[0014] S103. Data Merging: Merge the top-level, intermediate, and bottom-level sequences through outer joins and align the time granularity to obtain a standard time series dataset with hourly granularity.

[0015] Preferably, in steps S101 and S102, the periodic filling fills missing values ​​based on the average of the target hour and the target year and month for the past three months; if there is a lack of valid data, the global average of the same hour is used for filling.

[0016] Preferably, in step S3, the hierarchical hybrid network adopts temporal cross-validation, uses Gaussian mixture model loss function for interval prediction training, minimizes continuous hierarchical probability scores through Adam optimizer, and combines early stopping strategy to prevent overfitting.

[0017] Preferably, in step S3, the model training process uses the coefficient of determination and root mean square error as the evaluation criteria for prediction performance.

[0018] Preferably, in step S4, accuracy, precision, and recall are used as the evaluation criteria for missing detection, with the core objective of maximizing recall to reduce water waste and pipeline operation and maintenance costs caused by missed detection.

[0019] Compared with existing technical solutions, a dynamic threshold leakage identification method based on hierarchical time series prediction has the following advantages:

[0020] (1) By constructing a virtual sequence, the problem of prediction consistency under incomplete monitoring scenarios is solved, which effectively overcomes the limitation of incomplete aggregation constraints caused by the lack of direct monitoring data for some water use types in the time series prediction of the water supply system and improves the prediction accuracy.

[0021] (2) By utilizing the interval prediction results output by the time series model, taking the upper limit of the interval as the boundary of normal water use, the dynamic threshold candidate range is traversed to determine its optimal value, adapting to the periodicity of water use fluctuation, and eliminating the omission of traditional methods for hidden leakage that is highly concealed and lasts for a long time.

[0022] (3) By constructing an hourly time-series prediction model and combining it with the dynamic threshold method, the system can accurately monitor leakage at all times without the need for additional equipment deployment. It can complete the detection based on existing water volume / water meter data, which significantly reduces the engineering deployment cost and improves the real-time performance and engineering practicality of leakage identification. Attached Figure Description

[0023] Figure 1 A flowchart illustrating the steps of a dynamic threshold leakage identification method based on hierarchical time series prediction provided by the present invention;

[0024] Figure 2 This is the hierarchical structure of the time series data in the embodiments of the present invention;

[0025] Figure 3 This illustrates the impact of input sequence length on the time series prediction model in this embodiment of the invention.

[0026] Figure 4 This illustrates the impact of output sequence length on the time series prediction model in this embodiment of the invention.

[0027] Figures 5-8This demonstrates the ability of the dynamic threshold method to identify potential leaks under different prediction intervals in this embodiment of the invention. Detailed Implementation

[0028] The following describes embodiments of the present invention through specific examples and in conjunction with the accompanying drawings. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific examples, and various details in this specification can be modified and changed based on different viewpoints and applications without departing from the spirit of the present invention. Typical but non-limiting embodiments of the present invention are as follows:

[0029] Example 1:

[0030] This embodiment specifically provides a dynamic threshold leakage identification method based on hierarchical time series prediction, such as... Figure 1 As shown, the specific steps include:

[0031] S1. Data set preparation: Obtain water volume reports or water meter data at different levels of hourly granularity, and process the data to obtain a standard time series dataset.

[0032] S2. Construction of Aggregation Constraint Matrix: Identify the top-level sequence, intermediate sequence and bottom-level sequence. For water use types that lack direct monitoring data, construct a virtual sequence by coupling moving average filtering with hierarchical aggregation constraints and align the time granularity.

[0033] S3, Hierarchical Temporal Prediction: Construct a hierarchical hybrid network and train it using a temporal dataset. At the same time, guide sample coordination through the constructed aggregation constraint matrix to ensure the consistency and accuracy of the prediction.

[0034] S4. Dynamic Threshold Leakage Identification: A time-series prediction model trained based on a hierarchical hybrid network is used to predict intervals. The upper limit of the interval is used as a reasonable boundary for normal water use. Dynamic threshold traversal is performed in the candidate range to determine the optimal threshold. When the actual water volume exceeds the threshold of the upper limit of the predicted interval, it is determined to be a potential leakage.

[0035] Specifically, in step S1, the data preprocessing further includes:

[0036] S101, Format Conversion: Mark values ​​less than or equal to 0 in hourly water volume reports or water meter data as missing values, identify the first outlier using the interquartile range method and mark it as the first suspected loss, mask the first outlier and then periodically fill it, and then restore the first outlier, and record the hourly water volume reports or water meter data in a unified time series format.

[0037] S102, Time Series Completion: Complete the hourly granular time window, mark values ​​with water volume less than 0 as missing values, use the interquartile range method to identify secondary outliers and mark them as secondary suspected leaks, after masking the secondary outliers, perform periodic filling again, then restore the secondary outliers, and mark the intersection with the first outlier described in S101 as suspected leaks.

[0038] S103. Data Merging: Merge the top-level, intermediate, and bottom-level sequences through outer joins and align the time granularity to obtain a standard time series dataset with hourly granularity.

[0039] Specifically, in steps S101 and S102, the periodic filling fills missing values ​​based on the average of the target hour and the target year and month for the past three months. If there is a lack of valid data, the global average of the same hour is used for filling.

[0040] Specifically, in step S3, the hierarchical hybrid network adopts temporal cross-validation, uses Gaussian mixture model loss function for interval prediction training, minimizes continuous hierarchical probability scores through Adam optimizer, and combines early stopping strategy to prevent overfitting.

[0041] Specifically, in step S3, the model training process uses the coefficient of determination (R²). 2 ) and root mean square error (RMSE) are used as evaluation criteria for prediction performance;

[0042] Specifically, in step S4, accuracy, precision, and recall are used as evaluation criteria for missing detection, with the core objective of maximizing recall to reduce water waste and pipeline operation and maintenance costs caused by missed detection.

[0043] Tests were conducted using data from a residential community's water supply system. The hierarchical structure of the time-series data is as follows: Figure 2 As shown in the figure, the total water volume is the top-level sequence, including the secondary water supply volume and the non-secondary water supply volume. The secondary water supply volume, as the intermediate sequence, includes the water volume in the middle and high zones of the secondary water supply. The bottom-level sequence includes the water volume in the middle, high, and non-secondary water supply volumes, where the non-secondary water supply volume is a virtual sequence. The prediction performance of the model trained using hourly granular data is shown in Table 1. The impact of different basic model structures and different harmonic strategies on the model performance was compared simultaneously. The results show that the MinTraceOLS strategy based on NHITS achieved the best results, with R... 2 The values ​​range from 0.88 to 0.95, and the RMSE ranges from 0.09 to 0.12 m. 3NHITS is a model based on a multilayer perceptron architecture. Its multi-scale decomposition and attention mechanism can effectively extract short-term fluctuation characteristics and potential temporal patterns from hourly water volume data. Simultaneously, the HINT framework can achieve consistency constraints on the predicted values ​​of each sequence level through aggregation matrices, and reduce prediction bias by optimizing the probability prediction distribution through guided harmonics and techniques. The impact of input sequence length on model performance is as follows... Figure 3 As shown, the input windows (168, 240, 336) correspond to 7 days, 10 days, and 14 days of historical data, respectively. When the input window is 168, the model performs better. This is because 7 days (168 hours) of historical data is sufficient to fully cover the daily water usage rhythm (such as the periodic fluctuations of morning peak, evening peak, and nighttime low) and the weekly differences (the differentiation of water usage patterns between weekdays and weekends), which can provide the model with the core information to accurately capture short-term fluctuations. Figure 4 The study points out that increasing the length of the output sequence did not have a positive impact on model performance, which is essentially due to the cumulative effect of random disturbances in short-term water volume prediction. When the output window expanded from 4 hours to 12 hours and then 24 hours, the influence of random factors accumulated, leading to a gradual amplification of prediction errors, but the model performance remained stable. Because the model's distribution fitting ability was optimized through hierarchical constraints within the HINT framework and GMM probabilistic prediction, this error amplification effect was effectively controlled, preventing a sharp decline in performance and maintaining similar prediction performance across different output lengths.

[0044] The dynamic threshold leakage identification method based on interval prediction was investigated to examine the impact of different confidence levels on the leakage identification performance under different threshold candidate ranges. Figures 5-8 As shown, when the threshold coefficient reaches 0.6, the accuracy of identifying potential leaks in all confidence intervals is above 0.9. This result benefits from the improved prediction accuracy of water volume hierarchy prediction brought about by the consistency constraint of virtual sequence completion. When the threshold coefficient reaches above 0.8, precision and recall are basically balanced, with recall consistently remaining around 0.9. Recall measures the proportion of true leaks identified by the model out of the total number of true leaks, reflecting the ability to avoid missed detections. Missed detections lead to continuous water leakage in the pipeline network, causing water waste and economic losses, which are fatal errors, and their cost is far higher than that of false detections. Therefore, the method proposed in this invention has a high degree of adaptability to water usage fluctuations and differences in monitoring dimensions, fully meeting the actual needs of engineering projects, and providing an efficient and reliable technical solution for water supply system leakage management.

[0045] The above preferred embodiments are only used to illustrate the technical solutions and effects of the present invention, and are not intended to limit the present invention. Any person skilled in the art can make modifications and changes to the above embodiments in form and detail without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention should be as set forth in the claims.

[0046] Table 1

[0047]

Claims

1. A dynamic threshold leakage identification method based on hierarchical time series prediction, characterized in that, Includes the following steps: S1. Data set preparation: Obtain water volume reports or water meter data at different levels of hourly granularity, and process the data to obtain a standard time series dataset. S2. Construction of Aggregation Constraint Matrix: Identify the top-level sequence, intermediate sequence and bottom-level sequence. For water use types that lack direct monitoring data, construct a virtual sequence by coupling moving average filtering with hierarchical aggregation constraints and align the time granularity. S3, Hierarchical Temporal Prediction: Construct a hierarchical hybrid network and train it using a temporal dataset. At the same time, guide sample coordination through the constructed aggregation constraint matrix to ensure the consistency and accuracy of the prediction. S4. Dynamic Threshold Leakage Identification: A time-series prediction model trained based on a hierarchical hybrid network is used to predict intervals. The upper limit of the interval is used as a reasonable boundary for normal water use. Dynamic threshold traversal is performed in the candidate range to determine the optimal threshold. When the actual water volume exceeds the threshold of the upper limit of the predicted interval, it is determined to be a potential leakage.

2. The dynamic threshold leakage identification method based on hierarchical time series prediction according to claim 1, characterized in that, In step S1, the data preprocessing further includes: S101, Format Conversion: Mark values ​​less than or equal to 0 in hourly water volume reports or water meter data as missing values, identify the first outlier using the interquartile range method and mark it as the first suspected loss, mask the first outlier and then periodically fill it, and then restore the first outlier, and record the hourly water volume reports or water meter data in a unified time series format. S102, Time Series Completion: Complete the hourly granular time window, mark values ​​with water volume less than 0 as missing values, use the interquartile range method to identify secondary outliers and mark them as secondary suspected leaks, after masking the secondary outliers, perform periodic filling again, then restore the secondary outliers, and mark the intersection with the first outlier described in S101 as suspected leaks. S103. Data Merging: Merge the top-level, intermediate, and bottom-level sequences through outer joins and align the time granularity to obtain a standard time series dataset with hourly granularity.

3. The dynamic threshold leakage identification method based on hierarchical time series prediction according to claim 2, characterized in that, In steps S101 and S102, the periodic filling fills missing values ​​based on the average of the target hour and the target year and month for the past three months. If there is a lack of valid data, the global average of the same hour is used for filling.

4. The dynamic threshold leakage identification method based on hierarchical time series prediction according to claim 3, characterized in that, In step S3, the hierarchical hybrid network adopts temporal cross-validation, uses Gaussian mixture model loss function for interval prediction training, minimizes continuous hierarchical probability scores through Adam optimizer, and combines early stopping strategy to prevent overfitting.

5. The dynamic threshold leakage identification method based on hierarchical time series prediction according to claim 4, characterized in that, In step S3, the model training process uses the coefficient of determination and root mean square error as the evaluation criteria for prediction performance.

6. The dynamic threshold leakage identification method based on hierarchical time series prediction according to claim 5, characterized in that, In step S4, accuracy, precision, and recall are used as evaluation criteria for missing detection, with the core objective of maximizing recall to reduce water waste and pipeline operation and maintenance costs caused by missed detection.