A leakage anomaly detection method and system for a tap water pipeline
Patent Information
- Application Number
- CN202610913137.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-24
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2046-06-24
AI Technical Summary
现有技术中,通用型光谱残差异常检测算法主要面向通用时序数据设计,缺乏对供水管网压力、流量、声学等多源传感数据的场景化适配,面对管道微小漏损产生的微弱异常信号时,检测灵敏度与识别精度显著不足
[0017]根据本申请实施例的一种自来水管道的漏损异常检测方法、系统,至少具有如下有益效果:通过获取水压、流量、声学多源时序数据并进行显著性图谱处理,将信号转化为突出异常、抑制背景的显著性图,实现了对供水管网多源传感数据的场景化适配,显著增强了微小漏损特征的检测灵敏度。基于此,采用滑动窗口对各显著性图进行异常分数统计,并根据各个时刻的水压异常分数、流量异常分数和声学异常分数,确定触发异常信号的多个异常传感器,平滑了随机扰动,保证了异常判定的时间连续性和稳定性。在判漏时,采用水压异常信号与流量异常信号、或水压异常信号与声学异常信号在同一时段同时触发的联合判定规则,利用真实漏损跨物理场同步响应的特性,排除了用水高峰、阀门操作等单一因素导致的虚假报警,传感器互为验证,大幅降低了误报率和漏检率。确认漏损后,进一步利用各异常传感器对应的显著性衰减趋势,结合传感器沿管道的已知布设距离,依据信号衰减规律自动圈定目标漏损区间,该定位方式依靠已有传感器,弥补了传统方法只能报警、无法提供位置信息的不足,显著缩小了现场排查范围,缩短了抢修响应时间。
Smart Images

Figure CN122433025B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of pipeline measurement technology, and in particular to a method and system for detecting leakage anomalies in tap water pipelines. Background Technology
[0002] Leakage detection in water supply networks is a core challenge in the field of smart water management. Existing technologies primarily employ general-purpose spectral residual anomaly detection algorithms designed for general time-series data, lacking scenario-specific adaptation to multi-source sensor data such as pressure, flow, and acoustics in water supply networks. When faced with weak anomaly signals generated by minor leaks in the pipeline, their detection sensitivity and recognition accuracy are significantly insufficient. Furthermore, existing methods often employ univariate time-series detection strategies, failing to fuse spatiotemporal features from multi-sensor data. They are easily affected by fluctuations in normal operating conditions such as environmental noise, peak residential water usage, and valve opening and closing adjustments, resulting in persistently high false alarm and false negative rates, making it difficult to meet the reliability requirements of actual water supply network operation.
[0003] In addition, traditional time-series anomaly detection methods can only output a qualitative judgment on whether an anomaly exists. They do not have the ability to assist in locating the leakage range based on the distribution of anomaly responses from multiple sensors and the physical attenuation law of signals. Anomaly confirmation still relies on manual inspection and investigation along the line, which has a large investigation scope and low emergency response efficiency. Summary of the Invention
[0004] The purpose of this application is to at least solve one of the technical problems existing in the prior art, and to provide a method and system for detecting leakage anomalies in tap water pipelines. By jointly judging leakage through multi-source saliency maps and using attenuation trends to locate the leakage range, the detection accuracy of pipeline leakage is improved, and the leakage area can be determined without additional hardware.
[0005] To achieve the above objectives, a first aspect of this application proposes a method for detecting abnormal leakage in tap water pipes, comprising: Acquire water pressure time-series data, flow time-series data, and acoustic time-series data from the tap water pipeline; Significance mapping was performed on the water pressure time series data, flow rate time series data, and acoustic time series data to obtain the water pressure significance map, flow rate significance map, and acoustic significance map of the tap water pipeline. Anomaly scores were statistically analyzed for water pressure significance maps, flow rate significance maps, and acoustic significance maps using a sliding window, resulting in anomaly scores for water pressure, flow rate, and acoustic sound at multiple time points. Based on the water pressure anomaly score, flow rate anomaly score, and acoustic anomaly score at each time point, multiple abnormal sensors that trigger abnormal signals are identified; the types of abnormal signals include water pressure type, flow rate type, or acoustic type. If abnormal signals of water pressure type and abnormal signals of flow rate type are triggered at the same time, or if abnormal signals of water pressure type and abnormal signals of acoustic type are triggered at the same time, it is determined that there is a leak in the tap water pipe; If a leak occurs in the water supply pipe, the target leakage range of the water supply pipe is determined based on the significance decay trends of the water pressure significance map, flow significance map, and acoustic significance map, as well as the relative distance between each abnormal sensor.
[0006] Furthermore, in some embodiments, saliency mapping is performed on the water pressure time-series data, flow rate time-series data, and acoustic time-series data to obtain water pressure saliency maps, flow rate saliency maps, and acoustic saliency maps for the tap water pipeline, including: Data preprocessing was performed on water pressure time series data, flow rate time series data, and acoustic time series data to obtain multiple water pressure time series data blocks, multiple flow rate time series data blocks, and multiple acoustic time series data blocks; Discrete Fourier transform processing is performed on each water pressure time series data block, each flow rate time series data block, and each acoustic time series data block to obtain water pressure frequency domain sequence, flow rate frequency domain sequence, and acoustic frequency domain sequence; Frequency domain significance analysis was performed on the water pressure frequency domain sequence, flow rate frequency domain sequence, and acoustic frequency domain sequence to obtain the water pressure significance sequence, flow rate significance sequence, and acoustic significance sequence. Inverse discrete Fourier transform was performed on the water pressure significance sequence, flow rate significance sequence, and acoustic significance sequence to obtain the water pressure significance map, flow rate significance map, and acoustic significance map of the tap water pipeline.
[0007] Furthermore, in some embodiments, frequency domain significance analysis is performed on the water pressure frequency domain sequence, flow rate frequency domain sequence, and acoustic frequency domain sequence to obtain water pressure significance sequence, flow rate significance sequence, and acoustic significance sequence, including: Logarithmically transforming the amplitude values of the water pressure frequency domain sequence, flow rate frequency domain sequence, and acoustic frequency domain sequence yields the original amplitude spectra of the water pressure, flow rate, and acoustic frequencies. Based on the Gaussian kernel filtering algorithm, the original amplitude spectra of water pressure, flow rate, and acoustics are smoothed and filtered to obtain the background amplitude spectra of water pressure, flow rate, and acoustics. Spectral residual calculations were performed on the background amplitude spectrum and the original amplitude spectrum of water pressure to obtain the water pressure significance sequence. Spectral residual calculations were performed on the background amplitude spectrum and the original amplitude spectrum of the flow rate to determine the significance sequence of the flow rate. The acoustic saliency sequence is determined by performing spectral residual calculations on the acoustic background amplitude spectrum and the original acoustic amplitude spectrum.
[0008] Furthermore, in some embodiments, the water pressure time-series data, flow rate time-series data, and acoustic time-series data are preprocessed to obtain multiple water pressure time-series data blocks, multiple flow rate time-series data blocks, and multiple acoustic time-series data blocks, including: Missing values were filled in the water pressure time series data, flow rate time series data, and acoustic time series data to obtain the water pressure time series filled data, flow rate time series filled data, and acoustic time series filled data. Based on the principle of three standard deviations, jump points that obviously exceed the preset range are removed from the flow time series complete data, flow time series complete data and acoustic time series complete data to obtain normal water pressure time series data, normal flow time series data and normal acoustic time series data. Low-pass filtering is performed on the normal water pressure time series data and the normal flow time series data to obtain filtered water pressure time series data and filtered flow time series data. Wavelet denoising is performed on the acoustic time series normal data to obtain acoustic time series filtered data; The water pressure time-series filtered data, flow rate time-series filtered data, and acoustic time-series filtered data are normalized to obtain the water pressure time-series target data, flow rate time-series target data, and acoustic time-series target data. By using a sliding window, the water pressure time series target data, flow rate time series target data, and acoustic time series target data are processed into time series blocks to obtain multiple water pressure time series data blocks, multiple flow rate time series data blocks, and multiple acoustic time series data blocks.
[0009] Furthermore, in some embodiments, anomaly scores are statistically analyzed on the water pressure significance map, flow rate significance map, and acoustic significance map using a sliding window to obtain water pressure anomaly scores, flow rate anomaly scores, and acoustic anomaly scores at multiple time points, including: For the water pressure significance map, flow rate significance map, and acoustic significance map, a sliding window of preset time length is used to slide along the time axis sequentially. The statistics of all significant values in each sliding window are extracted and used as the anomaly score corresponding to the center time of the sliding window, so as to obtain the water pressure anomaly score, flow rate anomaly score, and acoustic anomaly score at multiple times.
[0010] Furthermore, in some embodiments, multiple abnormal sensors that trigger abnormal signals are determined based on the water pressure abnormality score, flow rate abnormality score, and acoustic abnormality score at various times, including: If the water pressure anomaly scores at multiple consecutive times exceed the preset water pressure threshold, an anomaly signal of the water pressure type will be triggered, and the water pressure sensor that generated the water pressure anomaly score will be identified as an anomaly sensor. If the abnormal flow scores at multiple consecutive times exceed the preset flow threshold, an abnormal signal of the flow type will be triggered and the flow sensor that generated the abnormal flow score will be identified as an abnormal sensor. If the acoustic anomaly scores at multiple consecutive times exceed the preset acoustic threshold, an anomaly signal of the acoustic type is triggered, and the acoustic sensor that generated the acoustic anomaly score is identified as an anomaly sensor.
[0011] Furthermore, in some embodiments, the target leakage range of the water pipe is determined based on the significance decay trends of the water pressure significance map, flow rate significance map, and acoustic significance map, as well as the relative distances between various abnormal sensors, including: The anomalous significance intensity of each anomalous sensor in the corresponding water pressure significance map, flow rate significance map, and acoustic significance map is extracted respectively. The anomalous sensors of the same type are sorted from high to low according to the anomalous significance intensity to obtain the water pressure anomalous sensor sequence, flow rate anomalous sensor sequence, and acoustic anomalous sensor sequence. Based on the water pressure anomaly sensor sequence, flow anomaly sensor sequence, and acoustic anomaly sensor sequence, the water pressure anomaly attenuation trend, flow anomaly attenuation trend, and acoustic anomaly attenuation trend corresponding to each anomaly sensor are determined. Based on the abnormal attenuation trend of water pressure and the relative distance between multiple abnormal sensors used to measure water pressure, the first leakage range of the tap water pipeline at the water pressure measurement angle is determined. Based on the abnormal flow rate attenuation trend and the relative distance between multiple abnormal sensors used to measure flow rate, the second leakage range of the water supply pipeline at the flow rate measurement angle is determined. Based on the acoustic anomaly attenuation trend and the relative distance between multiple anomaly sensors used to measure acoustics, the third leakage interval of the water pipe at the acoustic measurement angle is determined. Based on the first, second, and third leakage intervals, the target leakage interval of the water supply pipeline is determined.
[0012] Furthermore, in some embodiments, after determining the target leakage range of the water pipe based on the significance decay trends of the water pressure significance map, flow rate significance map, and acoustic significance map, as well as the relative distances between various abnormal sensors, the method further includes: The alarm signal is triggered, and the water pressure significance map, flow rate significance map, acoustic significance map, target leakage range, and sensor number of each abnormal sensor are uploaded to the cloud server. Receive the optimization parameters returned by the cloud server, and adaptively update the preset water pressure threshold, preset flow threshold, preset acoustic threshold, Gaussian kernel parameter in the Gaussian kernel filtering algorithm, and window parameter of the sliding window according to the optimization parameters; The optimization parameters are obtained by inputting the water pressure significance map, flow rate significance map, acoustic significance map, target leakage range, and sensor number of each abnormal sensor into the detection optimization model for optimization processing by the cloud server.
[0013] To achieve the above objectives, a second aspect of this application provides a leakage anomaly detection system for tap water pipes, comprising: The sensor acquisition module is used to acquire water pressure time-series data, flow time-series data, and acoustic time-series data from the tap water pipeline; The edge computing module performs saliency mapping on water pressure time-series data, flow rate time-series data, and acoustic time-series data to obtain water pressure saliency maps, flow rate saliency maps, and acoustic saliency maps for the tap water pipeline. It then uses a sliding window to perform anomaly score statistics on these maps, obtaining water pressure anomaly scores, flow rate anomaly scores, and acoustic anomaly scores at multiple time points. Based on these scores, it identifies multiple anomaly sensors that trigger abnormal signals. The types of abnormal signals include water pressure type, flow rate type, and acoustic type. The edge computing module is also used to determine if a water pressure-type abnormal signal and a flow-type abnormal signal are triggered at the same time, or if a water pressure-type abnormal signal and an acoustic-type abnormal signal are triggered at the same time, then a leak has occurred in the water supply pipe. If a leak has occurred in the water supply pipe, the target leakage range of the water supply pipe is determined based on the significance decay trends of the water pressure significance map, flow rate significance map, and acoustic significance map, as well as the relative distance between each abnormal sensor.
[0014] Furthermore, in some embodiments, the leakage anomaly detection system also includes a cloud service module; The edge computing module is also used to trigger alarm signals and upload water pressure significance map, flow rate significance map, acoustic significance map, target leakage range, and sensor number of each abnormal sensor to the cloud service module; The cloud service module is used to input water pressure significance map, flow rate significance map, acoustic significance map, target leakage range, and sensor number of each abnormal sensor into the detection optimization model for optimization processing, obtain optimization parameters, and return the optimization parameters to the edge computing module; The edge computing module is also used to receive optimization parameters and adaptively update the preset water pressure threshold, preset flow threshold, preset acoustic threshold, Gaussian kernel parameters in the Gaussian kernel filtering algorithm, and window parameters of the sliding window based on the optimization parameters.
[0015] To achieve the above objectives, a third aspect of the present application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method for detecting leakage anomalies in a tap water pipe as described in the first aspect of the present application.
[0016] To achieve the above objectives, a fourth aspect of the present application provides a storage medium, which is a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the method for detecting leakage anomalies in a tap water pipe as described in the first aspect of the present application.
[0017] According to an embodiment of this application, a method and system for detecting leaks in a water supply pipeline has at least the following beneficial effects: By acquiring multi-source time-series data of water pressure, flow rate, and acoustic signals and performing saliency map processing, the signals are transformed into saliency maps that highlight anomalies and suppress background noise. This achieves scenario-based adaptation to multi-source sensor data of the water supply network, significantly enhancing the detection sensitivity of minute leak features. Based on this, a sliding window is used to perform anomaly score statistics on each saliency map, and multiple anomaly sensors that trigger anomaly signals are determined based on the water pressure anomaly score, flow rate anomaly score, and acoustic anomaly score at each time point. This smooths out random disturbances and ensures the temporal continuity and stability of anomaly determination. When determining leaks, a joint determination rule is adopted where water pressure anomaly signals and flow rate anomaly signals, or water pressure anomaly signals and acoustic anomaly signals, are triggered simultaneously in the same time period. Utilizing the characteristic of synchronous response of real leaks across physical fields, false alarms caused by single factors such as peak water usage or valve operation are eliminated. Sensors mutually verify each other, significantly reducing the false alarm rate and missed detection rate. After confirming the leakage, the significant attenuation trend of each abnormal sensor is further utilized. Combined with the known deployment distance of the sensors along the pipeline, the target leakage area is automatically delineated based on the signal attenuation law. This positioning method relies on existing sensors, which makes up for the shortcomings of traditional methods that can only alarm but cannot provide location information. It significantly reduces the scope of on-site investigation and shortens the emergency response time.
[0018] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description and the accompanying drawings. Attached Figure Description
[0019] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.
[0020] The present application will be further described below with reference to the accompanying drawings and embodiments; Figure 1 This is an optional flowchart of a method for detecting leakage anomalies in a tap water pipeline provided in an embodiment of this application; Figure 2 This is provided by the embodiments of this application. Figure 1 An optional flowchart for step S102; Figure 3 This is provided by the embodiments of this application. Figure 2 An optional flowchart in step S203; Figure 4 This is provided by the embodiments of this application. Figure 2 An optional flowchart for step S201; Figure 5 This is provided by the embodiments of this application. Figure 1 An optional flowchart for step S103; Figure 6 This is provided by the embodiments of this application. Figure 1 An optional flowchart for step S104; Figure 7 This is an optional flowchart provided in the embodiments of this application after determining the target leakage range of the tap water pipeline; Figure 8 This is an optional flowchart of a leakage anomaly detection system for tap water pipes provided in an embodiment of this application; Figure 9 This is a schematic diagram of an optional hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0021] This section will describe in detail the specific embodiments of this application. Preferred embodiments of this application are shown in the accompanying drawings. The purpose of the drawings is to supplement the textual description with graphics, so that people can intuitively and vividly understand each technical feature and the overall technical solution of this application, but they should not be construed as limiting the scope of protection of this application.
[0022] In the description of this application, the use of "first" and "second" is for the purpose of distinguishing technical features only and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features or the order of the indicated technical features. It should be understood that such use of data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0023] In the description of this application, unless otherwise expressly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.
[0024] Leakage detection in water supply networks is a core challenge in the field of smart water management. Existing technologies, general-purpose spectral residual anomaly detection algorithms (such as Microsoft Anomaly Detector) are primarily designed for general time-series data, lacking scenario-specific adaptation to multi-source sensor data such as pressure, flow, and acoustics in water supply networks. When faced with weak anomaly signals generated by minor leaks in the pipeline, their detection sensitivity and recognition accuracy are significantly insufficient. Furthermore, existing methods often employ univariate time-series detection strategies, failing to fuse spatiotemporal features from multi-sensor data. They are easily affected by fluctuations in normal operating conditions such as environmental noise, peak residential water usage, and valve opening and closing adjustments, resulting in persistently high false alarm and false negative rates, making it difficult to meet the reliability requirements of actual water supply network operation.
[0025] Furthermore, traditional time-series anomaly detection methods can only output a qualitative judgment on the existence of anomalies, lacking the ability to assist in locating leakage intervals based on the distribution of anomaly responses from multiple sensors and the physical attenuation laws of signals. Anomaly confirmation still relies on manual inspections along the pipeline, resulting in a large inspection area and low emergency response efficiency. Moreover, the model parameters of existing spectral residual detection models are usually fixed, unable to adaptively adjust according to differences in pipe diameter, burial depth, pipe material, and operating conditions, severely limiting their generalization ability and stability in complex real-world pipe network environments. In addition, most general solutions are heavily reliant on centralized cloud deployment, failing to optimize algorithms for lightweighting and edge computing adaptation. This makes it difficult to achieve real-time, offline, low-latency leakage detection and early warning on water edge nodes with limited computing power, hindering the engineering application of smart water systems.
[0026] Based on this, this application provides a method and system for detecting leaks in tap water pipelines. By jointly identifying leaks using multi-source saliency maps and locating the leak area using attenuation trends, the detection accuracy of pipeline leaks is improved, and the leak area can be determined without additional hardware.
[0027] Therefore, the embodiments of this application will be further described below with reference to the accompanying drawings.
[0028] Reference Figure 1 As shown, Figure 1 This is an optional flowchart of a method for detecting leakage anomalies in a tap water pipeline provided in this application embodiment. The method may include, but is not limited to, steps S101 to S106.
[0029] Step S101: Obtain water pressure time-series data, flow time-series data, and acoustic time-series data from the tap water pipeline.
[0030] Specifically, pressure sensors, flow sensors, and acoustic sensors are installed along the water supply pipeline. Pressure sensors are installed at pipe joints, valves, fire hydrants, and branch pipe interfaces; flow sensors are installed at zone metering inlets, main pipes, and key branch pipes; and acoustic sensors are installed on the outer wall of the pipes or at valves. A data acquisition module converts the analog signals collected by each sensor into digital signals and samples them at a fixed frequency of 1 to 5 times per second for pressure and flow signals, and 5 to 10 times per second for acoustic signals, to obtain water pressure time-series data (P1, P2, P3, …, P…). n Traffic time series data (F1, F2, F3, …, F) n ) and acoustic time series data (A1, A2, A3, …, A n ), where n is a time point.
[0031] Step S102: Perform saliency mapping on the water pressure time series data, flow rate time series data, and acoustic time series data to obtain the water pressure saliency map, flow rate saliency map, and acoustic saliency map of the tap water pipeline.
[0032] Specifically, frequency domain transformations are performed on water pressure time series data, flow rate time series data, and acoustic time series data respectively. The amplitude information after transformation is extracted and background smoothing estimation is performed. A saliency map is constructed based on the difference between the original amplitude information and the background amplitude information to obtain water pressure saliency map, flow rate saliency map, and acoustic saliency map.
[0033] It should be noted that the water pressure saliency map is a time-domain sequence obtained by processing water pressure time-series data through saliency mapping, reflecting the degree to which the water pressure signal deviates from the normal background at different times. The flow rate saliency map is a time-domain sequence obtained by processing flow rate time-series data through saliency mapping, reflecting the degree to which the flow rate signal deviates from the normal background at different times. The acoustic saliency map is a time-domain sequence obtained by processing acoustic time-series data through saliency mapping, reflecting the degree to which the acoustic signal deviates from the normal background at different times. In each of these saliency maps, a higher significance value indicates a greater likelihood of an anomaly in the corresponding sensor signal at that time.
[0034] Step S103: Perform anomaly score statistics on the water pressure significance map, flow rate significance map, and acoustic significance map using a sliding window to obtain the water pressure anomaly score, flow rate anomaly score, and acoustic anomaly score at multiple time points.
[0035] Specifically, for the water pressure significance map, a sliding window with a preset time span is set, and this sliding window moves gradually along the time axis of the water pressure significance map with a fixed step size. At each window position, all significance values within the time interval covered by the current window are extracted, and statistical characteristics of these significance values are calculated, such as the arithmetic mean of all significance values within the window. The calculated average is used as the water pressure anomaly score corresponding to the center time of that window. After the sliding window traverses all time intervals of the water pressure significance map, a sequence of water pressure anomaly scores corresponding to each time point is obtained. Next, using the same sliding window configuration and statistical method, the flow rate significance map is processed to obtain a flow rate anomaly score sequence; the acoustic significance map is processed to obtain an acoustic anomaly score sequence.
[0036] Step S104: Based on the water pressure anomaly score, flow rate anomaly score, and acoustic anomaly score at each time point, determine the multiple anomaly sensors that trigger the anomaly signal.
[0037] The types of abnormal signals include water pressure type, flow type, or acoustic type.
[0038] Specifically, based on the temporal distribution characteristics of water pressure anomaly fraction, flow rate anomaly fraction, and acoustic anomaly fraction at each moment, a comprehensive judgment is made as to whether the monitoring signals corresponding to each sensor show continuous anomalies. Multiple sensors whose monitoring signals show continuous anomalies are identified as abnormal sensors that trigger abnormal signals. Step S105: If abnormal signals of water pressure type and abnormal signals of flow rate type are triggered at the same time, or abnormal signals of water pressure type and abnormal signals of acoustic type are triggered at the same time, then it is determined that there is a leak in the tap water pipe.
[0039] Specifically, a preset time window is set to determine whether abnormal signals occur simultaneously. When a water pressure anomaly signal is triggered, a preset time window is formed by extending forward and backward from the trigger time. The system checks whether any flow or acoustic anomaly signals are triggered within this time window. If a flow anomaly signal is detected within the time window, meaning the water pressure and flow anomalies occur simultaneously, a leak in the water supply pipe is determined. Similarly, if an acoustic anomaly signal is detected within the time window, also indicating a leak, this method is based on the following physical laws: When a pipe experiences a real leak, the outward flow of water at the leak point causes a pressure drop within the pipe, and this pressure drop fluctuation propagates upstream and downstream along the pipe and is captured by the water pressure sensor; simultaneously, abnormal water flow at the leak point causes deviations in the measurements of upstream and downstream flow sensors; furthermore, the high-speed jet of water at the leak point, through friction and impact with the pipe wall, generates continuous acoustic vibrations, which are detected by the acoustic sensor. Water pressure, flow rate, and acoustic signals exhibit a synchronous response across physical fields when leakage occurs. However, routine operating disturbances such as peak water usage and valve opening / closing typically only cause instantaneous fluctuations in a single physical quantity, and do not lead to synchronous anomalies in water pressure and flow rate, or water pressure and acoustic signals, within the same timeframe. Therefore, joint leak detection through the synchronous triggering of abnormal water pressure signals and abnormal flow rate signals, or abnormal water pressure signals and abnormal acoustic signals, can effectively eliminate false alarms caused by environmental interference from a single sensor, reducing the false alarm rate.
[0040] Step S106: If a leak occurs in the water supply pipe, the target leakage range of the water supply pipe is determined based on the significance decay trends of the water pressure significance map, flow rate significance map, and acoustic significance map, as well as the relative distance between each abnormal sensor.
[0041] Specifically, once a leak in the water pipe is determined, the significance values of each abnormal sensor's location over time are extracted from the water pressure significance map, flow rate significance map, and acoustic significance map. Based on these sequences, the significance decay trend of each abnormal sensor is determined. The decay trend is as follows: sensors closer to the leak point capture stronger abnormal signals, corresponding to higher significance values in the significance map and slower decay over time; sensors farther from the leak point capture weaker abnormal signals, lower significance values, and decay faster.
[0042] Based on the above pattern, for multiple abnormal sensors of the same type, they are sorted according to the magnitude of their significance values at the time of leakage triggering. The abnormal sensor with the highest significance value is determined to be the sensor closest to the leakage point. Taking this sensor as the center, at least one adjacent abnormal sensor of the same type is selected. Based on the known pipe distance between the two sensors and the attenuation difference of their significance values, the relative distance between the leakage point and each abnormal sensor is estimated, and a pipe interval covering the leakage point is initially delineated.
[0043] If there are at least two acoustic anomaly sensors that trigger acoustic anomaly signals, and there is a identifiable reception time difference between the two acoustic anomaly signals, then the distance difference from the leak point to the two acoustic anomaly sensors is calculated by combining the propagation speed of sound waves in the tap water pipe and the reception time difference. The distance difference is then used to correct the initially delineated pipe section, further narrowing down the leak location range, and obtaining the target leak range.
[0044] In a specific embodiment of steps S101 to S106, by acquiring multi-source time-series data of water pressure, flow rate, and acoustic signals and performing saliency map processing, the signals are transformed into saliency maps that highlight anomalies and suppress background noise. This achieves scenario-based adaptation of multi-source sensor data from the water supply network, significantly enhancing the detection sensitivity of minute leakage features. Based on this, a sliding window is used to perform anomaly score statistics on each saliency map, and multiple abnormal sensors that trigger abnormal signals are determined according to the water pressure anomaly score, flow rate anomaly score, and acoustic anomaly score at each time point. This smooths out random disturbances and ensures the temporal continuity and stability of anomaly determination. When determining leaks, a joint determination rule is adopted where water pressure anomaly signals and flow rate anomaly signals, or water pressure anomaly signals and acoustic anomaly signals, are triggered simultaneously in the same time period. Utilizing the characteristic of real leakage synchronous response across physical fields, false alarms caused by single factors such as peak water usage or valve operation are eliminated. Sensors mutually verify each other, significantly reducing the false alarm rate and missed detection rate. After confirming the leakage, the significant attenuation trend of each abnormal sensor is further utilized. Combined with the known deployment distance of the sensors along the pipeline, the target leakage area is automatically delineated based on the signal attenuation law. This positioning method relies on existing sensors, which makes up for the shortcomings of traditional methods that can only alarm but cannot provide location information. It significantly reduces the scope of on-site investigation and shortens the emergency response time.
[0045] Among them, reference Figure 2 As shown, Figure 2 This is provided by the embodiments of this application. Figure 1 An optional flowchart for step S102, the method may include, but is not limited to, steps S201 to S204.
[0046] Step S201: Perform data preprocessing on water pressure time series data, flow rate time series data and acoustic time series data to obtain multiple water pressure time series data blocks, multiple flow rate time series data blocks and multiple acoustic time series data blocks.
[0047] Specifically, after performing denoising, missing value imputation, and normalization on the water pressure time series data, flow rate time series data, and acoustic time series data in sequence, a fixed-time-length window is used to slide along the time axis with a preset step size to divide the continuous time series data into multiple time series data blocks of the same length with partial overlap between adjacent windows, resulting in multiple water pressure time series data blocks, multiple flow rate time series data blocks, and multiple acoustic time series data blocks.
[0048] Step S202: Perform Discrete Fourier Transform on each water pressure time series data block, each flow rate time series data block, and each acoustic time series data block to obtain the water pressure frequency domain sequence, the flow rate frequency domain sequence, and the acoustic frequency domain sequence.
[0049] Specifically, a water pressure time-series data block, a flow rate time-series data block, and an acoustic time-series data block are taken sequentially. A Discrete Fourier Transform (DFT) is performed on each time-series data block to convert the time-domain sequence of signal amplitude values into a frequency-domain sequence of complex numbers. This complex sequence contains the amplitude and phase information of the signal at each frequency component. After performing the DFT on all water pressure time-series data blocks, the corresponding frequency-domain complex sequences are arranged in time order to form the water pressure frequency domain sequence. The same processing is performed on all flow rate time-series data blocks and all acoustic time-series data blocks, yielding the corresponding flow rate frequency domain sequence and acoustic frequency domain sequence.
[0050] Step S203: Perform frequency domain significance analysis on the water pressure frequency domain sequence, flow rate frequency domain sequence and acoustic frequency domain sequence to obtain the water pressure significance sequence, flow rate significance sequence and acoustic significance sequence.
[0051] Specifically, amplitude information is extracted from the water pressure frequency domain sequence, flow rate frequency domain sequence, and acoustic frequency domain sequence, respectively. The amplitude information is then subjected to background smoothing estimation to obtain the amplitude background. The difference between the original amplitude information and the amplitude background is taken as the frequency domain saliency component. The frequency domain saliency component is then converted into a time domain sequence through time domain recovery, resulting in the water pressure saliency sequence, flow rate saliency sequence, and acoustic saliency sequence.
[0052] Step S204: Perform inverse discrete Fourier transform on the water pressure significance sequence, flow rate significance sequence, and acoustic significance sequence to obtain the water pressure significance map, flow rate significance map, and acoustic significance map of the tap water pipeline.
[0053] Specifically, an inverse discrete Fourier transform (IFT) is performed on the water pressure spectral residual sequence to recover the residual signal in the frequency domain into a time-series sequence of significance values. This sequence of significance values is the water pressure significance map, where the value at each moment represents the degree to which the water pressure signal deviates from the normal background. Similarly, an IFT is performed on the flow rate spectral residual sequence to obtain the flow rate significance map; and an IFT is performed on the acoustic spectral residual sequence to obtain the acoustic significance map.
[0054] In a specific embodiment of steps S201 to S204, after preprocessing the three types of raw time-series data (water pressure, flow rate, and acoustics) through denoising, missing value imputation, and normalization, the data is divided into time-series blocks according to a fixed window length and step size. This effectively eliminates random noise and dimensional differences in the data, providing regular and comparable input data for subsequent frequency domain transformation. A Discrete Fourier Transform is performed on each time-series data block to convert the time-domain signal to the frequency domain. This separates the weak abnormal frequency components caused by pipeline leakage from the time-domain background, presenting them as amplitude anomalies in the frequency domain. Based on this, frequency domain saliency analysis is performed. By extracting the logarithmic amplitude spectrum and performing background smoothing estimation, the stable background components that slowly change with frequency in the original amplitude spectrum are stripped away, retaining only the significant frequency components that deviate from the background. Continuous background noise and periodic fluctuation interference under normal operating conditions are significantly suppressed, and the signal-to-noise ratio of the leakage signal is significantly improved. The saliency map generated after being restored to the time domain by inverse discrete Fourier transform shows a significant increase in amplitude at the time of leakage, while it remains stable at a low level during non-leakage periods. This provides a highly sensitive and interference-resistant input basis for subsequent sliding window anomaly score statistics and multi-sensor joint leakage detection.
[0055] Reference Figure 3 As shown, Figure 3 This is provided by the embodiments of this application. Figure 2 An optional flowchart in step S203, the method may include, but is not limited to, steps S301 to S305.
[0056] Step S301: Logarithmically calculate the amplitude values of the water pressure frequency domain sequence, flow rate frequency domain sequence, and acoustic frequency domain sequence to obtain the original amplitude spectra of the water pressure, flow rate, and acoustic frequencies.
[0057] Specifically, the water pressure frequency domain sequence consists of multiple frequency domain complex sequences arranged in chronological order. Each frequency domain complex sequence contains the complex representation of the signal at each frequency component, with the modulus of the complex number corresponding to the amplitude of that frequency component. For each frequency domain complex sequence in the water pressure frequency domain sequence, the modulus of the complex number of each frequency component is calculated one by one to obtain the amplitude spectrum corresponding to that data block. Then, the logarithm of each amplitude value in the amplitude spectrum is taken with the natural constant as the base to form the original water pressure amplitude spectrum. The same operation is performed on the flow rate frequency domain sequence and the acoustic frequency domain sequence to obtain the original flow rate amplitude spectrum and the original acoustic amplitude spectrum, respectively. Through logarithmic transformation, the amplitude differences that originally spanned multiple orders of magnitude in the amplitude spectrum are compressed to a smaller range, allowing the small amplitude components of weak leakage signals in the low-frequency band to be compared with the large amplitude components under normal operating conditions on a uniform scale, avoiding the small amplitude anomalies being submerged in subsequent background estimation and residual calculation.
[0058] Step S302: Based on the Gaussian kernel filtering algorithm, smooth the original amplitude spectrum of water pressure, the original amplitude spectrum of flow rate, and the original amplitude spectrum of acoustic sound to obtain the background amplitude spectrum of water pressure, the background amplitude spectrum of flow rate, and the background amplitude spectrum of acoustic sound.
[0059] Specifically, the Gaussian kernel filtering algorithm is used to estimate the slowly varying background components of a signal along the frequency dimension from the original amplitude spectrum. Taking the original amplitude spectrum of water pressure as an example, the original amplitude spectrum of water pressure is a function of frequency, reflecting the logarithmic amplitude of the signal at each frequency component. A one-dimensional Gaussian kernel function is convolved with the original amplitude spectrum of water pressure along the frequency axis. The scale parameter of the Gaussian kernel determines the smoothness, and the weight coefficients within the kernel follow a Gaussian distribution, with the largest weight at the center and gradually decreasing towards both sides. During the convolution process, the background amplitude value at each frequency point is obtained by Gaussian weighted averaging of the original amplitude values of that frequency point and its neighboring frequency points. After this filtering process, sharp fluctuations caused by random noise or local fluctuations in the original amplitude spectrum of water pressure are smoothed and suppressed, while the overall trend of slowly varying with frequency is preserved, forming the water pressure background amplitude spectrum. The same convolution operation is applied to the original amplitude spectra of flow rate and acoustic signal to obtain the corresponding background amplitude spectra of flow rate and acoustic signal. The background amplitude spectrum represents the frequency domain reference response of the corresponding signal under normal operating conditions, providing a dynamic reference basis for subsequent extraction of anomalous components deviating from the reference through spectral residuals.
[0060] Step S303: Perform spectral residual calculation on the background amplitude spectrum and the original amplitude spectrum of water pressure to obtain the water pressure significance sequence.
[0061] Specifically, for the original and background amplitude spectra of water pressure at each moment in the water pressure frequency domain sequence, a difference operation is performed point-by-point along the frequency dimension. The logarithm of the corresponding frequency point in the background amplitude spectrum is subtracted from the logarithm of each frequency point in the original water pressure amplitude spectrum to obtain the spectral residual value at each frequency point. The spectral residual values of all frequency points at a given moment constitute the spectral residual spectrum at that moment. The spectral residual spectra at each moment are arranged sequentially in chronological order to form the water pressure spectral residual sequence, which is the water pressure significance sequence. The spectral residual operation removes the normal components consistent with the stable background reference in the original amplitude spectrum, retaining only the abnormal frequency components that deviate from the background reference. Under normal operating conditions, the difference approaches zero, while the abnormal frequency components caused by leakage are prominently retained in the form of positive residuals, thus achieving the enhancement of abnormal signals and the suppression of normal background.
[0062] Step S304: Perform spectral residual calculation on the background amplitude spectrum and the original amplitude spectrum of the flow rate to determine the significance sequence of the flow rate.
[0063] Specifically, for the original flow amplitude spectrum and the background flow amplitude spectrum at each time point in the flow frequency domain sequence, a difference operation is performed on a frequency-by-frequency basis. The logarithmic value of the corresponding frequency point in the background flow amplitude spectrum is subtracted from the logarithmic value of each frequency point in the original flow amplitude spectrum to obtain the spectral residual value at each frequency point. The spectral residual values of all frequency points at a given time point constitute the spectral residual spectrum at that time point. The spectral residual spectra at each time point are arranged sequentially in chronological order to form the flow spectral residual sequence, which is the flow significance sequence.
[0064] Step S305: Perform spectral residual calculations on the acoustic background amplitude spectrum and the original acoustic amplitude spectrum to determine the acoustic saliency sequence.
[0065] Specifically, for the original acoustic amplitude spectrum and the background acoustic amplitude spectrum at each moment in the acoustic frequency domain sequence, a difference operation is performed point-by-point along the frequency dimension. The logarithmic value of the corresponding frequency point in the acoustic background amplitude spectrum is subtracted from the logarithmic value of each frequency point in the original acoustic amplitude spectrum to obtain the spectral residual value at each frequency point. The spectral residual values of all frequency points at that moment constitute the spectral residual spectrum at that moment. The spectral residual spectra at each moment are arranged sequentially in chronological order to form the acoustic spectral residual sequence, which is the acoustic saliency sequence.
[0066] In a specific embodiment of steps S301 to S305, logarithmically calculated amplitude values are obtained from the water pressure frequency domain sequence, flow rate frequency domain sequence, and acoustic frequency domain sequence. This compresses the amplitude differences spanning multiple orders of magnitude in the original amplitude spectrum into a smaller numerical range, ensuring that the low-amplitude frequency components representing minor leaks are not overwhelmed by the large-amplitude components under normal operating conditions during subsequent processing, thus guaranteeing the identifiability of weak anomalies. Then, Gaussian kernel filtering is used to smooth each original amplitude spectrum. A Gaussian weighted average is used to extract the local mean trend of the signal along the frequency axis, generating a background amplitude spectrum that dynamically matches the current signal characteristics. This background amplitude spectrum can adaptively adjust to the slow changes in the pipeline network's operating status, providing a real-time dynamic frequency domain reference for anomaly detection. Next, spectral residual operations were performed on the water pressure and flow signals respectively. The background amplitude spectrum was subtracted from the original amplitude spectrum, and the normal frequency domain components that were consistent with the stable background reference were stripped from the signal. The background noise and periodic fluctuations under normal operating conditions were significantly suppressed, and the residual sequence approached zero. The abnormal frequency components caused by leakage, due to their deviation from the background reference, were prominently retained in the form of significant positive residuals. Thus, selective enhancement of leakage signals and effective suppression of interference under normal operating conditions were achieved at the frequency domain level. This provided a high signal-to-noise ratio and high sensitivity input basis for subsequent inverse Fourier transform recovery of saliency map and multi-sensor joint leakage detection.
[0067] In one possible embodiment, refer to Figure 4 As shown, Figure 4 This is provided by the embodiments of this application. Figure 2 An optional flowchart for step S201, the method may include, but is not limited to, steps S401 to S406.
[0068] Step S401: Complete the missing values of the water pressure time series data, flow rate time series data and acoustic time series data to obtain the water pressure time series completed data, flow rate time series completed data and acoustic time series completed data.
[0069] Specifically, missing value detection is performed on the water pressure time-series data, flow rate time-series data, and acoustic time-series data to identify continuous data gaps caused by factors such as momentary sensor disconnection, communication packet loss, or momentary failure of the acquisition module. For each detected missing position, linear interpolation or forward imputation is used to fill in the gaps. That is, the two nearest valid data points before and after the missing position are used as a reference, and the estimated value of the missing time is calculated according to the time interval ratio and then filled in. After all missing positions are filled, continuous and uninterrupted water pressure time-series data, flow rate time-series data, and acoustic time-series data are formed.
[0070] Step S402: Based on the principle of three standard deviations, remove jump points that are significantly outside the preset range from the flow time series complete data, flow time series complete data and acoustic time series complete data to obtain normal water pressure time series data, normal flow time series data and normal acoustic time series data.
[0071] Specifically, taking water pressure time-series completed data as an example, the arithmetic mean and standard deviation of the data are first calculated. The upper and lower bounds of the normal value range are defined as the mean plus or minus three times the standard deviation. Each data point in the water pressure time-series completed data is iterated through. If the value of a data point exceeds the upper or lower bound of the normal value range, that point is identified as an outlier and removed. The resulting gaps are then filled using linear interpolation or forward padding. The same processing is performed on the flow rate time-series completed data and the acoustic time-series completed data, resulting in normal water pressure time-series data, normal flow rate time-series data, and normal acoustic time-series data.
[0072] Step S403: Perform low-pass filtering on the normal water pressure time series data and the normal flow time series data to obtain the filtered water pressure time series data and the filtered flow time series data.
[0073] Specifically, low-pass filtering is used to further suppress residual high-frequency random noise in the normal water pressure and flow time series data. A cutoff frequency is set, and a finite impulse response (FIR) low-pass filter is used to filter the normal water pressure and flow time series data respectively. Fluctuations in the signal with frequencies higher than the cutoff frequency are attenuated, while retaining the effective low-frequency signals that reflect the true changes in pipeline pressure and flow, thus obtaining the filtered water pressure and flow time series data.
[0074] Step S404: Perform wavelet denoising on the acoustic time series normal data to obtain acoustic time series filtered data.
[0075] Specifically, wavelet denoising is used to suppress background noise while preserving transient impulse components and broadband frequency characteristics caused by leakage in the acoustic signal. Multi-level wavelet decomposition is performed on the acoustic time-series normal data, decomposing the signal into wavelet coefficients at different scales. Thresholds are set based on the statistical characteristics of the wavelet coefficients at each level; wavelet coefficients with amplitudes below the threshold are considered noise components and are either zeroed out or contracted, while coefficients with amplitudes above the threshold are retained as valid signal components. Wavelet reconstruction is then performed using the processed wavelet coefficients to recover the acoustic time-series filtered data.
[0076] Step S405: Normalize the water pressure time-series filtered data, flow rate time-series filtered data, and acoustic time-series filtered data to obtain the water pressure time-series target data, flow rate time-series target data, and acoustic time-series target data.
[0077] In a specific embodiment, the normalization process employs a maximum-minimum normalization method. Taking water pressure time-series filtered data as an example, the maximum and minimum values are extracted from the data. A linear mapping operation is then performed on each data point in the sequence, proportionally mapping the original values to a preset uniform numerical range, ensuring that all values fall within the same dimensional range. The same normalization operation is performed on flow rate time-series filtered data and acoustic time-series filtered data, resulting in target water pressure time-series data, target flow rate time-series data, and target acoustic time-series data, thereby eliminating the influence of different physical dimensions and numerical magnitudes on subsequent frequency domain transformations and significance analyses.
[0078] Step S406: Using a sliding window, perform time-series block processing on the water pressure time-series target data, flow rate time-series target data, and acoustic time-series target data to obtain multiple water pressure time-series data blocks, multiple flow rate time-series data blocks, and multiple acoustic time-series data blocks.
[0079] Specifically, a fixed-length window and a fixed sliding step size are set. The window starts from the beginning of the target water pressure time series data and slides sequentially along the time axis according to the set sliding step size. Each time the window reaches a new position, all data points within the time interval covered by the current window are extracted to form a water pressure time series data block. There is partial data overlap between adjacent windows because the sliding step size is less than the window length. After the window traverses the entire time interval, multiple water pressure time series data blocks are obtained. Using the same window length and sliding step size, the same sliding truncation operation is performed on the target flow and acoustic time series data, resulting in multiple flow and acoustic time series data blocks for subsequent discrete Fourier transform processing.
[0080] In one possible embodiment, anomaly scores are statistically analyzed for water pressure significance maps, flow rate significance maps, and acoustic significance maps using a sliding window. This yields anomaly scores for water pressure, flow rate, and acoustic measurements at multiple time points. The process includes: for each of the water pressure, flow rate, and acoustic significance maps, a sliding window of a preset time length is sequentially slid along the time axis. A statistical measure of all significant values within each sliding window is extracted, and this statistical measure is used as the anomaly score corresponding to the center time of the sliding window. This results in anomaly scores for water pressure, flow rate, and acoustic measurements at multiple time points. The statistical measure is calculated by dividing the difference between the current significant value and the mean significant value within the window by the standard deviation of the significant values within the window.
[0081] Specifically, taking a water pressure significance map as an example, a sliding window with a preset time span is set, and the window slides along the time axis of the water pressure significance map with a fixed step size. Each time the window slides to a new position, all significance values within the time interval covered by the current window are extracted. The arithmetic mean of these significance values is calculated as the mean within the window, and the standard deviation of these significance values is calculated as the standard deviation within the window. For the significance value corresponding to the center time of the current window, the mean within the window is subtracted from the significance value, and then divided by the standard deviation within the window. The resulting ratio is the water pressure anomaly score for that time moment, calculated as: the anomaly score equals the difference between the current significance value and the mean within the window divided by the standard deviation within the window. This anomaly score reflects the degree of deviation of the current significance value from the local statistical distribution within the window; a higher score indicates that the significance value at that time is more significantly higher than the local background level. After the sliding window traverses the entire time interval of the water pressure significance map, a sequence of water pressure anomaly scores corresponding to each time moment is obtained. Using the same window configuration and statistical method, the above operations were performed on the flow significance map and the acoustic significance map respectively to obtain the flow anomaly score sequence and the acoustic anomaly score sequence.
[0082] In a specific embodiment of steps S401 to S406, after sequentially performing missing value interpolation, outlier removal, branch denoising, normalization, and sliding window block processing on the water pressure, flow rate, and acoustic time-series data, data gaps caused by sensor disconnection or communication packet loss are repaired, transient outliers deviating from the normal range are cleared, and high-frequency random noise and background interference are effectively suppressed. Simultaneously, wavelet denoising is used for the acoustic signal to protect the transient impact characteristics caused by leakage, achieving differentiated adaptation of noise suppression for different physical signals. Normalization unifies multi-source data to the same numerical scale, eliminating differences in physical dimensions and orders of magnitude, making water pressure, flow rate, and acoustic signals comparable. Sliding window block processing, while ensuring local resolution of time-frequency analysis, maintains signal continuity through data overlap between adjacent windows, providing a regular, continuous, and high-quality data foundation for subsequent frequency domain transformation and significance analysis.
[0083] Reference Figure 5 As shown, Figure 5 This is provided by the embodiments of this application. Figure 1 An optional flowchart for step S103, the method may include, but is not limited to, steps S501 to S502.
[0084] Step S501: If the water pressure anomaly scores at multiple consecutive times exceed the preset water pressure threshold, then trigger an anomaly signal of the water pressure type and identify the water pressure sensor that generated the water pressure anomaly scores as an anomaly sensor.
[0085] It should be noted that the preset water pressure threshold is not a fixed value set manually, but rather adaptively determined based on the statistical distribution characteristics of all water pressure anomaly scores during historical normal operating periods. Specifically, a historical period confirmed to be leak-free is selected, and the quantiles of water pressure anomaly scores at all times within that period are calculated. The values corresponding to the 99.5% to 99.9% quantiles are used as the preset water pressure threshold. During actual testing, if the water pressure anomaly score exceeds this preset threshold for multiple consecutive times, it indicates that the water pressure signal has experienced abnormal fluctuations that continuously deviate from the normal statistical range. This triggers a water pressure anomaly signal, and the water pressure sensor that generated the anomaly score is marked as an abnormal sensor.
[0086] Step S502: If the abnormal flow scores at multiple consecutive times exceed the preset flow threshold, an abnormal signal of the flow type is triggered and the flow sensor that generated the abnormal flow score is identified as an abnormal sensor.
[0087] Specifically, the preset flow threshold is also adaptively determined based on the statistical distribution of all flow anomaly scores during historical normal operating periods. A historical period confirmed to be without leakage is selected, and the 99.5% to 99.9% quantiles of flow anomaly scores at all times within this period are calculated. The obtained values are used as the preset flow threshold. During actual detection, if the flow anomaly score exceeds the preset flow threshold for multiple consecutive times, it indicates that the flow signal has experienced abnormal fluctuations that continuously deviate from the normal statistical range. In this case, a flow anomaly signal is triggered, and the flow sensor that generated the flow anomaly score is marked as an abnormal sensor.
[0088] Step S503: If the acoustic anomaly scores at multiple consecutive times exceed the preset acoustic threshold, then an abnormal signal belonging to the acoustic type is triggered and the acoustic sensor that generates the acoustic anomaly score is identified as an abnormal sensor.
[0089] Specifically, the preset acoustic threshold is determined in the same way as described above, taking the 99.5% to 99.9% percentile of the acoustic anomaly score during historical normal periods as the adaptive threshold. If the acoustic anomaly score exceeds the preset acoustic threshold for multiple consecutive moments, it indicates that the acoustic signal has experienced abnormal fluctuations that continuously deviate from the normal statistical range. In this case, an acoustic anomaly signal is triggered, and the acoustic sensor that generated the acoustic anomaly score is marked as an abnormal sensor.
[0090] Reference Figure 6 As shown, Figure 6 This is provided by the embodiments of this application. Figure 1 An optional flowchart for step S104, the method may include, but is not limited to, steps S601 to S606.
[0091] Step S601: Extract the anomalous significance intensity of each anomalous sensor in the corresponding water pressure significance map, flow rate significance map, and acoustic significance map, and sort the anomalous sensors of the same type from high to low according to the anomalous significance intensity to obtain the water pressure anomalous sensor sequence, flow rate anomalous sensor sequence, and acoustic anomalous sensor sequence.
[0092] Specifically, at the moment a leak is detected in the water pipe, the significance value corresponding to each water pressure sensor that has triggered an anomaly signal is extracted from the water pressure significance map at that moment. This significance value is the anomaly significance intensity of that sensor. All water pressure sensors that have triggered anomaly signals are sorted from high to low anomaly significance intensity to form a water pressure anomaly sensor sequence. The earlier a sensor ranks in the sequence, the closer its monitoring location is to the leak point. Using the same method, the anomaly significance intensity of each flow anomaly sensor and each acoustic anomaly sensor is extracted from the flow significance map and acoustic anomaly sensor map respectively, and sorted to obtain the corresponding flow anomaly sensor sequence and acoustic anomaly sensor sequence.
[0093] Step S602: Based on the water pressure anomaly sensor sequence, flow anomaly sensor sequence, and acoustic anomaly sensor sequence, determine the water pressure anomaly attenuation trend, flow anomaly attenuation trend, and acoustic anomaly attenuation trend corresponding to each anomaly sensor.
[0094] Specifically, for each anomalous sensor in the water pressure anomaly sensor sequence, the sequence of significant value changes of that sensor within each time interval before and after the leakage triggering moment is extracted from the water pressure saliency map. The decay trend is quantified based on the slope or rate of decrease of this sequence. If a particular anomalous sensor has a high significance value at the leakage triggering moment and then decays slowly, it indicates that the sensor is close to the leakage point; if the significance value is low and decays rapidly, it indicates that the sensor is far from the leakage point. The same operation is performed on each sensor in the flow anomaly sensor sequence and the acoustic anomaly sensor sequence to determine the corresponding flow anomaly decay trend and acoustic anomaly decay trend.
[0095] Step S603: Based on the abnormal water pressure attenuation trend and the relative distance between multiple abnormal sensors used to measure water pressure, determine the first leakage range of the tap water pipe at the water pressure measurement angle.
[0096] Specifically, from the sequence of water pressure anomaly sensors, the first water pressure sensor with the highest anomaly significance (i.e., the slowest attenuation) and the second water pressure sensor with the second highest anomaly significance (i.e., relatively fast attenuation) are selected, and their known installation distances along the pipeline are obtained. Based on the physical law of water pressure anomaly signal attenuation with distance along the pipeline, the difference in significance values of the first and second water pressure sensors at the moment of leakage triggering is compared. Combined with the pipeline distance between them, the relative distance from the leakage point to the first water pressure sensor is estimated, and the first leakage interval along the pipeline direction is delineated using this relative distance as a reference.
[0097] Step S604: Based on the abnormal flow rate attenuation trend and the relative distance between multiple abnormal sensors used to measure flow rate, determine the second leakage range of the water pipe at the flow rate measurement angle.
[0098] Specifically, the first flow sensor with the highest anomaly intensity and the second highest anomaly intensity are selected from the flow anomaly sensor sequence, and their known installation distances along the pipeline are obtained. Based on the physical law that the flow anomaly signal attenuates with distance along the pipeline, the difference in significance values between the two at the leakage trigger moment is compared. Combined with the pipeline distance between them, the relative distance from the leakage point to the first flow sensor is estimated, and the second leakage interval along the pipeline direction is delineated using this relative distance as a reference.
[0099] Step S605: Based on the acoustic anomaly attenuation trend and the relative distance between multiple anomaly sensors used to measure acoustics, determine the third leakage interval of the water pipe at the acoustic measurement angle.
[0100] Specifically, the first acoustic sensor with the highest anomalous intensity and the second highest intensity are selected from the acoustic anomaly sensor sequence, and their known deployment distances along the pipeline are obtained. Based on the physical law that acoustic anomaly signals attenuate with distance along the pipeline, the difference in significance values between the two sensors at the moment of leakage triggering is compared, and the relative distance from the leakage point to the first acoustic sensor is estimated by combining the pipeline distance between them. If there are at least two sensors in the acoustic anomaly sensor sequence and there is a identifiable time difference between their reception of the leakage acoustic signal, the distance difference from the leakage point to the two sensors is further calculated by combining the propagation speed of sound in the pipeline and the time difference, and the aforementioned distance estimation result is corrected. The third leakage interval along the pipeline direction is defined by the corrected result.
[0101] Step S606: Determine the target leakage range of the water supply pipeline based on the first leakage range, the second leakage range, and the third leakage range.
[0102] Specifically, the first leakage range based on water pressure attenuation, the second leakage range based on flow rate attenuation, and the third leakage range based on acoustic attenuation are comprehensively compared. The overlapping area of the three ranges in the pipeline space is the core leakage area with the highest reliability. If there is a clear overlap between the three ranges, the overlapping segment is taken as the target leakage range. If a certain range deviates significantly from the other two ranges, the two ranges with high consistency are used as the benchmark, and the overlap between the two is taken as the target leakage range. If the three ranges are highly dispersed, the range corresponding to the sensor with the highest anomaly significance intensity is used as the main basis, and the distribution range of the other two ranges is comprehensively considered to delineate a target leakage range that balances coverage integrity and positioning accuracy.
[0103] In a specific embodiment of steps S601 to S606, the abnormal significance intensity of each abnormal sensor at the moment of leakage triggering is extracted from the water pressure significance map, flow rate significance map, and acoustic significance map, and sorted according to intensity. This quantifies the response differences of multiple sensors to the same leakage event into a comparable significance sequence, clarifying the spatial relationship between each sensor and the leakage point. Then, based on the significance value change sequence of each sensor before and after the leakage triggering moment, the abnormal attenuation trends of water pressure, flow rate, and acoustic sensors are determined. The attenuation rate quantifies the signal attenuation law with distance, providing a dynamic basis for subsequent distance estimation. Next, using the differences in attenuation trends of the three types of abnormal sensors (water pressure, flow rate, and acoustic sensors) and the known deployment distances between sensors, the relative position of the leakage point is independently estimated from three physical quantity dimensions, and their respective leakage intervals are delineated, achieving cross-location of the same leakage point by multiple source signals. The water pressure signal exhibits a pressure drop gradient distribution along the pipeline propagation direction, the flow signal reflects the flow difference between upstream and downstream of the leak point, and the acoustic signal has time difference and attenuation characteristics along the pipe wall. The three types of signals complement each other in terms of spatial constraints. The intervals delineated by each signal are cross-verified from multiple angles, so that the target leak interval obtained by the final fusion has higher positioning reliability and spatial convergence, significantly narrowing the on-site investigation range and providing accurate regional guidance for rapid repair.
[0104] Reference Figure 7 As shown, Figure 7 This is an optional flowchart provided in the embodiments of this application after determining the target leakage range of the tap water pipeline. The method may include, but is not limited to, steps S701 to S702.
[0105] Step S701: Trigger the alarm signal and upload the water pressure significance map, flow rate significance map, acoustic significance map, target leakage range, and sensor number of each abnormal sensor to the cloud server.
[0106] Specifically, once a leak in the water supply pipe is detected and the target leak area is determined, the processor immediately triggers a local alarm signal and simultaneously uploads relevant data about the leak event to the cloud server via a wireless communication module. The uploaded data includes: water pressure significance maps, flow rate significance maps, and acoustic significance maps generated during the detection process; the target leak area; and the sensor numbers of each abnormal sensor that triggered the abnormal signal. After the above data is uploaded to the cloud server, it is verified through on-site manual inspection or historical data analysis. Sample data confirmed as genuine leaks are then included in the cloud training dataset for the cloud server to iteratively optimize and train the detection model.
[0107] Step S702: Receive the optimization parameters returned by the cloud server, and adaptively update the preset water pressure threshold, preset flow threshold, preset acoustic threshold, Gaussian kernel parameter in the Gaussian kernel filtering algorithm, and window parameter of the sliding window according to the optimization parameters.
[0108] The optimization parameters are obtained by inputting the water pressure significance map, flow rate significance map, acoustic significance map, target leakage range, and sensor number of each abnormal sensor into the detection optimization model for optimization processing by the cloud server.
[0109] Specifically, after accumulating a certain number of confirmed leakage sample data, the cloud server initiates model optimization training according to a preset cycle or triggering conditions. It iteratively optimizes preset water pressure thresholds, preset flow thresholds, preset acoustic thresholds, the Gaussian kernel scale parameter in the Gaussian kernel filtering algorithm, and the window length and sliding step size of the sliding window using the updated training set, obtaining optimized parameters. After receiving one or more sets of optimized parameters from the cloud server, the processor replaces the corresponding parameter configurations stored locally with the optimized parameter versions, completing the adaptive update. The updated preset water pressure thresholds, preset flow thresholds, and preset acoustic thresholds are directly applied to subsequent abnormal signal triggering judgments. The updated Gaussian kernel parameters are applied to subsequent smoothing filtering of the original amplitude spectrum, and the updated window parameters are applied to subsequent sliding window abnormality score statistics and time-series block processing. This enables the edge computing device to continuously adapt to changes in pipeline network conditions even when operating offline, achieving adaptive evolution of the detection model.
[0110] In a specific embodiment of steps S701 to S702, by uploading the water pressure significance map, flow rate significance map, acoustic significance map, target leakage range, and abnormal sensor number generated after leakage is determined to the cloud server, the complete detection process data of each leakage event is accumulated in the cloud. This provides an incremental dataset containing real leakage samples and sensor response features for subsequent model training, breaking the limitation of isolated data from a single edge node. Then, by receiving parameters issued by the cloud based on cumulative sample iterative optimization, the preset water pressure threshold, preset flow rate threshold, preset acoustic threshold, Gaussian kernel parameters, and sliding window parameters are adaptively updated. This allows edge devices deployed in different pipe network environments to dynamically optimize their detection configuration without manual intervention. The thresholds are adaptively adjusted based on historical anomaly fraction quantiles, and the filter kernel size and window length are continuously optimized according to changes in operating conditions. The detection model no longer relies on initial fixed parameters and can gradually improve its sensitivity to identifying minor leaks and its ability to suppress interference from complex operating conditions as running data accumulates, achieving continuous evolution of detection performance and scene adaptation.
[0111] In summary, this application constructs a spectral residual temporal anomaly detection system specifically designed for water supply pipeline leakage detection. It performs modal preprocessing and frequency domain saliency analysis on multi-source signals from the pipeline network, including pressure, flow, and acoustic sources. Unlike general-purpose anomaly detection algorithms, this system effectively adapts to the multi-physical field sensor data characteristics of water supply networks, significantly improving the sensitivity to even minor leakage signals. In the leak detection stage, a joint decision rule based on pressure, flow, and acoustic multi-source data is adopted. Leak confirmation is achieved through the correlation triggering of multi-modal anomaly signals within the same time period. The synchronous response of real leaks across physical fields eliminates false alarms caused by environmental noise or fluctuations in normal operating conditions, significantly reducing both false alarm and false negative rates. After leak confirmation, the system uses the attenuation law of multi-sensor anomaly intensity and the time difference of anomaly signals to assist in leak area location. This eliminates the need for additional hardware to determine the leak location, overcoming the limitation of traditional anomaly detection methods that only provide alarms without location information. This significantly narrows the on-site investigation scope and improves emergency response efficiency.
[0112] Meanwhile, this application designs an adaptive parameter mechanism for non-stationary operating conditions in pipeline networks, including dynamic adjustment methods for sliding window size, Gaussian filter kernel size, and outlier quantile thresholds. This enables the detection model to automatically optimize parameter configurations based on differences in pipe diameter, burial depth, pipe material, and water usage fluctuations, improving its applicability and generalization ability in complex real-world pipeline network environments. At the engineering implementation level, a lightweight spectral residual calculation architecture is designed for water edge gateways, enabling offline, real-time leakage detection on low-computing-power embedded devices. It can independently complete the entire process from signal acquisition to alarm output without relying on the cloud. Based on this, a closed-loop system architecture combining real-time edge detection and cloud-based model iterative optimization continuously updates algorithm parameters using historical normal data and verified leakage data, and distributes these updates to edge devices. This achieves long-term adaptive operation of the detection model, allowing the system to continuously improve detection performance as operational data accumulates after deployment, meeting the comprehensive needs of smart water systems for real-time monitoring, precise location, and engineering implementation of water supply network leaks.
[0113] Furthermore, refer to Figure 8 As shown, Figure 8 This is an optional flowchart of a water pipe leakage anomaly detection system 800 provided in this application embodiment. The water pipe leakage anomaly detection system 800 includes: The sensor acquisition module 810 is used to acquire water pressure time-series data, flow time-series data and acoustic time-series data of the tap water pipeline; The edge computing module 820 is used to perform saliency mapping on water pressure time-series data, flow rate time-series data, and acoustic time-series data to obtain water pressure saliency maps, flow rate saliency maps, and acoustic saliency maps for the tap water pipeline. It then uses a sliding window to perform anomaly score statistics on the water pressure saliency maps, flow rate saliency maps, and acoustic saliency maps to obtain water pressure anomaly scores, flow rate anomaly scores, and acoustic anomaly scores at multiple time points. Based on these scores, it identifies multiple anomaly sensors that trigger anomaly signals. The types of anomaly signals include water pressure type, flow rate type, and acoustic type. The edge computing module 820 is also used to determine if a water pressure type abnormal signal and a flow type abnormal signal are triggered at the same time, or if a water pressure type abnormal signal and an acoustic type abnormal signal are triggered at the same time, then the water pipe is leaking; if the water pipe is leaking, the target leakage range of the water pipe is determined based on the significance decay trend of the water pressure significance map, flow significance map and acoustic significance map and the relative distance between each abnormal sensor.
[0114] Furthermore, the leakage anomaly detection system 800 also includes a cloud service module 830; The edge computing module 820 is also used to trigger alarm signals and upload water pressure significance map, flow significance map, acoustic significance map, target leakage range and sensor number of each abnormal sensor to cloud service module 830; The cloud service module 830 is used to input the water pressure significance map, flow rate significance map, acoustic significance map, target leakage range, and sensor number of each abnormal sensor into the detection optimization model for optimization processing, obtain optimization parameters, and return the optimization parameters to the edge computing module 820; The edge computing module 820 is also used to receive optimization parameters and adaptively update the preset water pressure threshold, preset flow threshold, preset acoustic threshold, Gaussian kernel parameters in the Gaussian kernel filtering algorithm, and window parameters of the sliding window based on the optimization parameters.
[0115] It should be noted that the 800 water supply pipeline leakage anomaly detection system is conceptually consistent with the aforementioned water supply pipeline leakage anomaly detection method. By acquiring multi-source time-series data of water pressure, flow rate, and acoustic signals and performing saliency map processing, the signals are transformed into saliency maps that highlight anomalies and suppress background noise. This achieves scenario-based adaptation to multi-source sensor data of the water supply network, significantly enhancing the detection sensitivity of minute leakage features. Based on this, a sliding window is used to statistically analyze the anomaly scores of each saliency map. Based on the water pressure anomaly score, flow rate anomaly score, and acoustic anomaly score at each time point, multiple anomaly sensors that trigger the anomaly signal are determined, smoothing out random disturbances and ensuring the temporal continuity and stability of anomaly judgment. When judging leaks, a joint judgment rule is adopted where water pressure anomaly signals and flow rate anomaly signals, or water pressure anomaly signals and acoustic anomaly signals, are triggered simultaneously at the same time. Utilizing the characteristic of real leakage synchronous response across physical fields, false alarms caused by single factors such as peak water usage or valve operation are eliminated. Sensors mutually verify each other, significantly reducing the false alarm rate and missed detection rate. After confirming the leakage, the significant attenuation trend of each abnormal sensor is further utilized. Combined with the known deployment distance of the sensors along the pipeline, the target leakage area is automatically delineated based on the signal attenuation law. This positioning method relies on existing sensors, which makes up for the shortcomings of traditional methods that can only alarm but cannot provide location information. It significantly reduces the scope of on-site investigation and shortens the emergency response time.
[0116] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method for detecting leaks in water pipes. This electronic device can be any smart terminal, including mobile phones, tablets, and in-vehicle computers.
[0117] Please see Figure 9 , Figure 9 This is a schematic diagram of an optional hardware structure of an electronic device provided in an embodiment of this application. The electronic device includes: The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the method for detecting leakage anomalies in tap water pipes provided in this application embodiment. The memory 902 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 902 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and called and executed by the processor 901. This application provides a method for detecting leaks in water pipes. The input / output interface 903 is used to implement information input and output; The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904); The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.
[0118] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, provides a method for detecting leaks and anomalies in water pipes.
[0119] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0120] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0121] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0122] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0123] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0124] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0125] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0126] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0127] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0128] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0129] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0130] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for detecting abnormal leakage in tap water pipes, characterized in that, include: Acquire water pressure time-series data, flow time-series data, and acoustic time-series data from the tap water pipeline; The water pressure time series data, the flow rate time series data, and the acoustic time series data are processed by saliency mapping to obtain the water pressure saliency map, flow rate saliency map, and acoustic saliency map of the tap water pipeline. Anomaly scores were statistically analyzed for the water pressure significance map, the flow rate significance map, and the acoustic significance map using a sliding window to obtain water pressure anomaly scores, flow rate anomaly scores, and acoustic anomaly scores at multiple time points. Based on the water pressure anomaly score, flow rate anomaly score, and acoustic anomaly score at each time point, multiple abnormal sensors that trigger abnormal signals are identified; the types of abnormal signals include water pressure type, flow rate type, or acoustic type. If abnormal signals of water pressure type and abnormal signals of flow rate type are triggered at the same time, or if abnormal signals of water pressure type and abnormal signals of acoustic type are triggered at the same time, then it is determined that the tap water pipe has leaked. If the water pipe leaks, the target leakage range of the water pipe is determined based on the significance decay trend of the water pressure significance map, the flow significance map and the acoustic significance map, as well as the relative distance between each of the abnormal sensors. The step of performing saliency mapping on the water pressure time-series data, the flow rate time-series data, and the acoustic time-series data to obtain the water pressure saliency map, flow rate saliency map, and acoustic saliency map of the tap water pipeline includes: Missing values are filled in the water pressure time series data, the flow rate time series data and the acoustic time series data to obtain water pressure time series filled data, flow rate time series filled data and acoustic time series filled data; Based on the principle of three standard deviations, jump points that obviously exceed the preset range are removed from the flow time series complete data, the flow time series complete data and the acoustic time series complete data to obtain normal water pressure time series data, normal flow time series data and normal acoustic time series data; The normal water pressure time series data and the normal flow rate time series data are subjected to low-pass filtering to obtain filtered water pressure time series data and filtered flow rate time series data. Wavelet denoising processing is performed on the acoustic time-series normal data to obtain acoustic time-series filtered data. The water pressure time-series filtered data, the flow rate time-series filtered data, and the acoustic time-series filtered data are subjected to maximum and minimum value normalization processing to obtain water pressure time-series target data, flow rate time-series target data, and acoustic time-series target data. By using a sliding window, the water pressure time-series target data, the flow rate time-series target data, and the acoustic time-series target data are processed into time-series blocks to obtain multiple water pressure time-series data blocks, multiple flow rate time-series data blocks, and multiple acoustic time-series data blocks. Discrete Fourier transform processing is performed on each of the water pressure time-series data blocks, each of the flow rate time-series data blocks, and each of the acoustic time-series data blocks to obtain water pressure frequency domain sequence, flow rate frequency domain sequence, and acoustic frequency domain sequence; The amplitude values of the water pressure frequency domain sequence, the flow rate frequency domain sequence, and the acoustic frequency domain sequence are obtained by logarithmically transforming them to obtain the original amplitude spectra of the water pressure, the flow rate, and the acoustic frequency domain sequences. Based on the Gaussian kernel filtering algorithm, the original amplitude spectrum of water pressure, the original amplitude spectrum of flow rate, and the original amplitude spectrum of acoustic sound are smoothed and filtered to obtain the background amplitude spectrum of water pressure, the background amplitude spectrum of flow rate, and the background amplitude spectrum of acoustic sound. Perform spectral residual calculations on the background amplitude spectrum and the original amplitude spectrum of water pressure to obtain a water pressure saliency sequence; Perform spectral residual calculations on the background amplitude spectrum and the original amplitude spectrum of the flow rate to determine the flow rate significance sequence; Perform spectral residual calculations on the acoustic background amplitude spectrum and the original acoustic amplitude spectrum to determine the acoustic saliency sequence; The inverse discrete Fourier transform is performed on the water pressure significance sequence, the flow rate significance sequence, and the acoustic significance sequence to obtain the water pressure significance map, flow rate significance map, and acoustic significance map of the tap water pipeline.
2. The leakage anomaly detection method according to claim 1, characterized in that, The method involves using a sliding window to statistically analyze the anomaly scores of the water pressure significance map, the flow rate significance map, and the acoustic significance map, obtaining anomaly scores for water pressure, flow rate, and acoustic sound at multiple time points, including: For the water pressure significance map, the flow rate significance map, and the acoustic significance map, a sliding window of a preset time length is used to slide sequentially along the time axis. The statistics of all significant values in each sliding window are extracted and the statistics are used as the anomaly score corresponding to the center time of the sliding window, so as to obtain the water pressure anomaly score, flow rate anomaly score, and acoustic anomaly score at multiple times.
3. The leakage anomaly detection method according to claim 1, characterized in that, The method for determining multiple abnormal sensors that trigger abnormal signals based on the water pressure abnormality fraction, flow rate abnormality fraction, and acoustic abnormality fraction at each time moment includes: If the water pressure anomaly scores at multiple consecutive times exceed the preset water pressure threshold, an anomaly signal of the water pressure type is triggered, and the water pressure sensor that generated the water pressure anomaly scores is identified as an anomaly sensor. If the abnormal flow scores at multiple consecutive times exceed the preset flow threshold, an abnormal signal of the flow type is triggered and the flow sensor that generated the abnormal flow scores is identified as an abnormal sensor. If the acoustic anomaly scores at multiple consecutive times exceed a preset acoustic threshold, an anomaly signal of the acoustic type is triggered, and the acoustic sensor that generated the acoustic anomaly score is identified as an anomaly sensor.
4. The leakage anomaly detection method according to claim 1, characterized in that, The step of determining the target leakage range of the tap water pipeline based on the significance decay trends of the water pressure significance map, the flow rate significance map, and the acoustic significance map, as well as the relative distances between the various abnormal sensors, includes: The anomalous significance intensity of each of the anomalous sensors in the corresponding water pressure significance map, flow rate significance map, and acoustic significance map is extracted respectively. The anomalous sensors of the same type are sorted from high to low according to the anomalous significance intensity to obtain the water pressure anomalous sensor sequence, the flow rate anomalous sensor sequence, and the acoustic anomalous sensor sequence. Based on the water pressure anomaly sensor sequence, the flow rate anomaly sensor sequence, and the acoustic anomaly sensor sequence, determine the water pressure anomaly attenuation trend, flow rate anomaly attenuation trend, and acoustic anomaly attenuation trend corresponding to each anomaly sensor. Based on the abnormal water pressure attenuation trend and the relative distance between multiple abnormal sensors used to measure water pressure, the first leakage range of the tap water pipe at the water pressure measurement angle is determined. Based on the abnormal flow rate attenuation trend and the relative distance between multiple abnormal sensors used to measure flow rate, the second leakage range of the tap water pipe at the flow rate measurement angle is determined. Based on the acoustic anomaly attenuation trend and the relative distance between multiple anomaly sensors used to measure acoustics, the third leakage range of the tap water pipe at the acoustic measurement angle is determined. The target leakage range of the water pipe is determined based on the first leakage range, the second leakage range, and the third leakage range.
5. The leakage anomaly detection method according to claim 1, characterized in that, After determining the target leakage range of the tap water pipeline based on the significance decay trends of the water pressure significance map, the flow rate significance map, and the acoustic significance map, as well as the relative distances between the various abnormal sensors, the method further includes: An alarm signal is triggered, and the water pressure significance map, the flow rate significance map, the acoustic significance map, the target leakage range, and the sensor numbers of each of the abnormal sensors are uploaded to the cloud server. The system receives optimization parameters returned by the cloud server and adaptively updates the preset water pressure threshold, preset flow rate threshold, preset acoustic threshold, Gaussian kernel parameter in the Gaussian kernel filtering algorithm, and window parameter of the sliding window based on the optimization parameters. The optimization parameters are obtained by the cloud server by inputting the water pressure significance map, the flow rate significance map, the acoustic significance map, the target leakage range, and the sensor numbers of each abnormal sensor into the detection optimization model for optimization processing.
6. A system for detecting abnormal leakage in water supply pipes, characterized in that, include: The sensor acquisition module is used to acquire water pressure time-series data, flow time-series data, and acoustic time-series data from the tap water pipeline; An edge computing module is used to perform saliency mapping on the water pressure time-series data, the flow rate time-series data, and the acoustic time-series data to obtain water pressure saliency maps, flow rate saliency maps, and acoustic saliency maps of the tap water pipeline. Anomaly scores are then statistically analyzed on the water pressure saliency maps, the flow rate saliency maps, and the acoustic saliency maps using a sliding window to obtain water pressure anomaly scores, flow rate anomaly scores, and acoustic anomaly scores at multiple time points. Based on the water pressure anomaly scores, flow rate anomaly scores, and acoustic anomaly scores at each time point, multiple anomaly sensors that trigger anomaly signals are determined. The types of anomaly signals include water pressure type, flow rate type, and acoustic type. The edge computing module is further configured to determine that the water pipe is leaking if an abnormal signal of water pressure type and an abnormal signal of flow rate type are triggered at the same time, or if an abnormal signal of water pressure type and an abnormal signal of acoustic type are triggered at the same time; if the water pipe is leaking, the module determines the target leakage range of the water pipe based on the significance decay trends of the water pressure significance map, the flow rate significance map, and the acoustic significance map, as well as the relative distance between each of the abnormal sensors. Further, the step of performing saliency mapping on the water pressure time-series data, the flow rate time-series data, and the acoustic time-series data to obtain the water pressure saliency map, flow rate saliency map, and acoustic saliency map of the tap water pipeline includes: Missing values are filled in the water pressure time series data, the flow rate time series data and the acoustic time series data to obtain water pressure time series filled data, flow rate time series filled data and acoustic time series filled data; Based on the principle of three standard deviations, jump points that obviously exceed the preset range are removed from the flow time series complete data, the flow time series complete data and the acoustic time series complete data to obtain normal water pressure time series data, normal flow time series data and normal acoustic time series data; The normal water pressure time series data and the normal flow rate time series data are subjected to low-pass filtering to obtain filtered water pressure time series data and filtered flow rate time series data. Wavelet denoising processing is performed on the acoustic time-series normal data to obtain acoustic time-series filtered data. The water pressure time-series filtered data, the flow rate time-series filtered data, and the acoustic time-series filtered data are normalized to obtain water pressure time-series target data, flow rate time-series target data, and acoustic time-series target data. By using a sliding window, the water pressure time-series target data, the flow rate time-series target data, and the acoustic time-series target data are processed into time-series blocks to obtain multiple water pressure time-series data blocks, multiple flow rate time-series data blocks, and multiple acoustic time-series data blocks. Discrete Fourier transform processing is performed on each of the water pressure time-series data blocks, each of the flow rate time-series data blocks, and each of the acoustic time-series data blocks to obtain water pressure frequency domain sequence, flow rate frequency domain sequence, and acoustic frequency domain sequence; The amplitude values of the water pressure frequency domain sequence, the flow rate frequency domain sequence, and the acoustic frequency domain sequence are obtained by logarithmically transforming them to obtain the original amplitude spectra of the water pressure, the flow rate, and the acoustic frequency domain sequences. Based on the Gaussian kernel filtering algorithm, the original amplitude spectrum of water pressure, the original amplitude spectrum of flow rate, and the original amplitude spectrum of acoustic sound are smoothed and filtered to obtain the background amplitude spectrum of water pressure, the background amplitude spectrum of flow rate, and the background amplitude spectrum of acoustic sound. Perform spectral residual calculations on the background amplitude spectrum of water pressure and the original amplitude spectrum of water pressure to obtain a water pressure saliency sequence; Perform spectral residual calculations on the background amplitude spectrum and the original amplitude spectrum of the flow rate to determine the flow rate significance sequence; Perform spectral residual calculations on the acoustic background amplitude spectrum and the original acoustic amplitude spectrum to determine the acoustic saliency sequence; The inverse discrete Fourier transform is performed on the water pressure significance sequence, the flow rate significance sequence, and the acoustic significance sequence to obtain the water pressure significance map, flow rate significance map, and acoustic significance map of the tap water pipeline.
7. The leakage anomaly detection system according to claim 6, characterized in that, The leakage anomaly detection system also includes a cloud service module; The edge computing module is also used to trigger alarm signals and upload the water pressure significance map, the flow rate significance map, the acoustic significance map, the target leakage range, and the sensor numbers of each of the abnormal sensors to the cloud service module. The cloud service module is used to input the water pressure significance map, the flow rate significance map, the acoustic significance map, the target leakage range, and the sensor number of each of the abnormal sensors into the detection optimization model for optimization processing, obtain optimization parameters, and return the optimization parameters to the edge computing module; The edge computing module is also used to receive the optimization parameters and adaptively update the preset water pressure threshold, preset flow rate threshold, preset acoustic threshold, Gaussian kernel parameters in the Gaussian kernel filtering algorithm, and window parameters of the sliding window according to the optimization parameters.
Citation Information
Patent Citations
Underground water supply pipeline health grade assessment and risk prediction method
CN121229833A
GIS intelligent positioning and monitoring system of railway station rain sewage intelligent well lid
CN121977768A