Intelligent leakage detection method and system for water supply network

By employing a multi-scale parallel one-dimensional convolutional architecture and a frequency-domain attention-weighted leak detection method, this paper addresses the issues of time-consuming and labor-intensive manual inspections and low accuracy of existing algorithms in water supply network leak detection. It achieves efficient and robust leak detection, suitable for complex noise scenarios.

CN121188581BActive Publication Date: 2026-04-07GUANGDONG LONGQUAN TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing methods for detecting leaks in water supply networks rely on manual inspections, which are time-consuming and labor-intensive. Furthermore, existing automatic identification algorithms suffer from low accuracy and poor robustness in complex noise environments, are difficult to generalize across devices, have high computational and storage costs, limited model depth, unstable training, and insufficient generalization ability.

Method used

We employ a multi-scale parallel one-dimensional convolutional architecture, frequency domain attention weighting and residual connections, combined with outlier time point suppression and baseline noise filtering to preprocess audio signals, extract multi-scale frequency domain features, and perform feature fusion through frequency domain attention weighting and residual connections for final classification.

Benefits of technology

While ensuring real-time performance and energy efficiency at the edge, it significantly improves the accuracy, robustness, and cross-device generalization ability of water leakage audio detection, reduces computing and storage costs, and enhances the perception ability and anti-interference performance of water leakage sound patterns.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121188581B_ABST
    Figure CN121188581B_ABST
Patent Text Reader

Abstract

The present application relates to intelligent water supply detection technology, and is a kind of water leakage intelligent detection method and system for water supply network.The method comprises the following steps: collecting the audio signal at the valve well position of the water supply network, preprocessing it, and obtaining a one-dimensional frequency spectrum vector after time dimension statistical compression;The one-dimensional frequency spectrum vector is used as an input vector for adaptive feature modeling, and a multi-scale parallel convolution architecture is used to extract features from the input vector to simultaneously capture frequency domain features of different scales and perform splicing and fusion to obtain a cross-scale fused feature vector;Introduce the frequency domain attention module and the residual connection module, and perform frequency domain attention weighting and fusion on the cross-scale fused feature vector to obtain a residual connected feature vector;The residual connected feature vector is classified by a fully connected layer, and the classification result is output.The present application significantly improves the accuracy, robustness and cross-device generalization ability of water leakage audio detection in complex noise scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to intelligent water supply detection technology, specifically to an intelligent method and system for detecting leaks in water supply networks. Background Technology

[0002] Leaks in water supply networks lead to resource waste and pose safety risks. In existing practices for leak detection in water supply networks, a significant proportion of scenarios still rely on manual inspections, involving listening to valve well noise at fixed points or time intervals and judging whether something is abnormal based on experience. This method is time-consuming, labor-intensive, and the judgment results are significantly affected by individual experience and subjective standards, lacking stability and consistency. Furthermore, leak sounds are often persistent and environmentally dependent; manual inspections at fixed time intervals can easily miss critical anomaly detection windows, leading to untimely detection and handling of anomalies.

[0003] With the development of sensors and the Internet of Things, various noise detectors can periodically collect audio signals from valve well locations and upload them to the cloud for automatic identification by algorithms. The sound of water leakage in the audio signal usually exhibits a near-steady-state narrow-band continuous spectrum, with the frequency band mostly concentrated in the low-to-mid frequency range (such as 1–3kHz). The spectrum shape changes due to pipeline network and geological conditions, and it is easily affected by traffic, wind noise, mechanical vibration, and electromagnetic noise. The cost of parameter maintenance and scene migration is high, and the generalization ability is limited.

[0004] In recent years, some researchers have proposed classification methods based on deep learning to automatically identify the aforementioned audio signals. Specifically, the time-domain audio is converted into a two-dimensional spectrogram and input into a two-dimensional neural network (CNN). Two-dimensional convolution is then used for feature extraction and classification. The main steps include:

[0005] (1) Audio preprocessing: Perform noise reduction processing such as bandpass filtering, spectral subtraction or Wiener filtering on the original audio signal to suppress DC drift, power frequency and high frequency spurious components;

[0006] (2) Short-time Fourier transform (STFT): Set a fixed window length and step size, and calculate the time-frequency amplitude spectrum and phase spectrum;

[0007] (3) Synthesizing two-dimensional feature maps: Logarithmic compression and normalization are performed on the amplitude spectrum, and the amplitude spectrum is spliced ​​to form a two-dimensional feature map;

[0008] (4) Classification: The synthesized two-dimensional feature map is used as input, and deep learning methods are used for feature extraction and downsampling. Finally, the binary classification result of whether the pipeline network has leakage or is normal is output through the fully connected layer.

[0009] Automatic recognition algorithms, represented by deep learning-based classification methods, have several drawbacks. First, while they possess strong expressive power by using spectrograms and Mel spectra as inputs, they incur significant computational and storage overhead in water leakage scenarios. Constrained by the real-time performance and power consumption of edge devices, they are highly sensitive to spectrogram texture and device domain offsets, often requiring repeated calibrations for cross-device and cross-regional deployments. Second, single-scale convolutions are insufficient for simultaneously representing long-term steady-state and short-term details, making it difficult to robustly characterize the narrowband steady-state texture and transient interference differences of water leakage sounds. Furthermore, they lack adaptive modeling of frequency band importance, failing to dynamically emphasize and suppress irrelevant frequency bands for the main frequency band of water leakage. Third, the models are limited in depth and lack effective residual information channels, leading to unstable training, insufficient generalization ability, high algorithm costs, and large latency, which are detrimental to real-time applications on edge devices. Summary of the Invention

[0010] This invention provides a method and system for intelligent leakage detection in water supply networks. It performs multi-scale adaptive modeling based on the persistence and stability characteristics of leakage sound patterns. While ensuring real-time performance and energy efficiency at the edge, it significantly improves the accuracy, robustness, and cross-device generalization ability of leakage audio detection in complex noise scenarios. It solves the problems of false alarms and missed alarms caused by complex urban noise, equipment differences, and environmental changes in intelligent leakage audio detection scenarios in water supply networks.

[0011] On one hand, embodiments of the present invention provide a smart leakage detection method for water supply networks, comprising the following steps:

[0012] S1. Collect audio signals at the valve well locations of the water supply network, preprocess the audio signals, and obtain a one-dimensional spectrum vector after statistical compression of the time dimension.

[0013] S2. The one-dimensional spectrum vector that has been statistically compressed in the time dimension is used as the input vector to perform adaptive feature modeling. In the constructed model, a multi-scale parallel convolutional architecture is used to extract features from the input vector to capture frequency domain features at different scales at the same time. The frequency domain features at different scales are then spliced ​​and fused to obtain a cross-scale fused feature vector.

[0014] S3. Introduce a frequency domain attention module and a residual connection module into the constructed model, and perform frequency domain attention weighting and fusion on the cross-scale fused feature vector to obtain the residual connection feature vector.

[0015] S4. Classify the feature vectors after residual connection through a fully connected layer and output the classification results.

[0016] Preferably, step S1 includes the following steps:

[0017] S11. Based on the frame-level energy intensity sequence of the audio signal, outlier detection is performed on the audio signal to identify abnormal high-energy frames and abnormal low-energy frames, and weight attenuation processing is applied to the abnormal high-energy frames and abnormal low-energy frames.

[0018] S12. Perform a short-time Fourier transform on the audio signal after outlier detection to convert the audio signal from the time domain to the frequency domain and obtain a one-dimensional spectrum vector of the audio signal.

[0019] S13. Using the fundamental frequency characteristics accumulated by the audio signal acquisition unit under normal operating conditions as a reference, perform baseline subtraction and threshold suppression on the current spectrum of the audio signal to filter out the background noise that has existed in the one-dimensional spectrum vector for a long time and is unrelated to water leakage, and obtain the suppressed spectrum.

[0020] S14. For the suppressed spectrum, calculate the average amplitude of each frame, and perform logarithmic transformation and normalization to achieve statistical compression of the time dimension of the one-dimensional spectrum vector.

[0021] Preferably, step S2 includes:

[0022] S21. Frequency domain features are extracted from the input vector using a multi-scale parallel convolutional architecture to obtain frequency domain features at different scales.

[0023] S22. Concatenate the frequency domain features of different scales along the channel dimension, and then perform cross-scale feature interaction through fusion convolution to obtain the cross-scale fused feature vector.

[0024] Furthermore, the multi-scale parallel convolutional architecture in step S21 has three convolutional branches of different scales, each dedicated to frequency domain feature extraction at different scales; the large kernel convolutional branch is used to capture the wideband features of the one-dimensional spectrum vector, the medium kernel convolutional branch is used to capture the medium-band features of the one-dimensional spectrum vector, and the small kernel convolutional branch is used to capture the local frequency band detail features of the one-dimensional spectrum vector.

[0025] Preferably, step S3 includes:

[0026] S31. Introduce a frequency domain attention module to generate attention weights in the frequency domain direction, and perform element-wise multiplication with the feature vector after cross-scale fusion to obtain the attention-weighted feature vector.

[0027] S32. Add the attention-weighted feature vector to the cross-scale fusion feature vector to form a residual learning path and obtain the feature vector after residual connection.

[0028] The resulting residual learning path is as follows: ;

[0029] in, The feature vector after residual connection; The feature vector after attention weighting; This is a point convolution operation used for dimension matching and feature transformation; This represents the feature vector after cross-scale fusion; + indicates element-wise addition.

[0030] On the other hand, embodiments of the present invention also provide a smart leak detection system for water supply networks, implemented using the above-mentioned smart leak detection method, the detection system comprising the following units:

[0031] The acquisition unit is used to acquire audio signals from the valve well locations in the water supply network.

[0032] The preprocessing unit is used to preprocess the audio signal to obtain a one-dimensional spectrum vector after statistical compression in the time dimension.

[0033] The feature modeling unit takes a one-dimensional spectrum vector that has been statistically compressed in the time dimension as the input vector and performs adaptive feature modeling. In the constructed model, a multi-scale parallel convolutional architecture is used to extract features from the input vector to capture frequency domain features at different scales at the same time. The frequency domain features at different scales are then spliced ​​and fused to obtain a cross-scale fused feature vector.

[0034] The attention residual connection unit includes a frequency domain attention module and a residual connection module, which is used to perform frequency domain attention weighting and fusion on the cross-scale fused feature vector to obtain the residual connection feature vector;

[0035] The classification unit is used to classify the feature vectors after residual connection through a fully connected layer and output the classification result.

[0036] The present invention has the following advantages and effects compared with the prior art:

[0037] 1. Compared with existing technologies such as one-dimensional convolution with a single branch and single scale or two-dimensional convolution with a two-dimensional spectrum, this invention performs multi-scale adaptive modeling for the persistence and stability characteristics of water leakage sound patterns. While ensuring real-time performance and energy efficiency at the edge, it significantly improves the accuracy, robustness and cross-device generalization ability of water leakage audio detection in complex noise scenarios, and achieves higher accuracy and stability in complex noise scenarios. Multi-scale convolution and frequency domain attention also significantly improve the perception of the main water leakage texture and can suppress environmental noise.

[0038] 2. This invention innovatively compresses traditional audio signals into a one-dimensional spectral vector and uses it as model input. Leakage monitoring devices acquire audio signals of a certain duration intermittently at regular intervals. In most cases, this audio segment is approximately stationary in the time dimension; if leakage exists, it manifests as a continuous, stable spectral characteristic rather than a sudden change. Therefore, the fine-grained dynamics of the time axis are not key identification information. This invention statistically compresses the audio signal in the time dimension to obtain a one-dimensional spectral vector, effectively highlighting the continuous spectral characteristics of the leakage sound pattern (i.e., a stable leakage main frequency texture). This design, which simplifies the time dimension to form a one-dimensional input feature map, significantly reduces computational complexity and storage overhead, and also suppresses the interference of transient factors such as mechanical vibration on the detection results. It reduces computational and storage costs while ensuring recognition accuracy, facilitating real-time operation at the device level.

[0039] 3. This invention employs a multi-scale parallel one-dimensional convolutional branch structure oriented towards the spectral vector of leaking audio. Specifically, it is a one-dimensional convolutional architecture with three parallel convolutional branches: a large kernel, a medium kernel, and a small kernel. This achieves multi-scale feature extraction in the frequency dimension. The large kernel convolutional branch structure is used to establish a large receptive field, capturing the broadband continuous spectrum features and cross-frequency correlations of the leaking sound pattern. The medium kernel convolutional branch structure is used to extract structural features in the medium frequency range, balancing global and local information representation. The small kernel convolutional branch structure is used to capture fine-grained local frequency domain features and spectral peak details. The three convolutional branch structures achieve cross-scale feature interaction through channel-dimensional concatenation and fusion convolution, forming a collaborative working mechanism for multi-scale perception and feature fusion. This effectively solves the problem that single-scale convolution cannot simultaneously capture broadband steady-state and local details.

[0040] 4. This invention designs a frequency domain attention weighting mechanism, which can adaptively identify and enhance key features in the main frequency range of leakage, while suppressing interference from irrelevant frequency bands such as environmental noise and equipment background noise. This invention combines the attention weighting mechanism with multi-scale feature extraction, significantly improving the model's ability to perceive the main texture of leakage and its anti-interference performance.

[0041] 5. This invention achieves a more balanced approach to training and usage costs, while still primarily using one-dimensional convolution. The number of parameters and latency are lower than comparable two-dimensional models, facilitating real-time applications at edge computing. It also excels in generalization and maintainability. Residual fusion enhances robustness across devices and scenarios, and the training and storage units allow new samples to be quickly converted into performance gains, shortening update cycles and reducing maintenance costs. Regarding input format and anti-interference, it employs one-dimensional vector compression of the time dimension, highlighting persistent leakage patterns and mitigating the impact of transient factors such as mechanical vibration. Furthermore, outlier suppression and baseline noise filtering significantly improve the signal-to-noise ratio and robustness. Attached Figure Description

[0042] Figure 1This is a flowchart of a smart leak detection method for water supply networks in an embodiment of the present invention;

[0043] Figure 2 A flowchart for preprocessing audio signals;

[0044] Figure 3 This is a schematic diagram of the amplitude waveform of the audio signal after outlier suppression.

[0045] Figure 4 This is a schematic diagram comparing the waveforms of a frequency domain audio signal before and after baseline noise filtering.

[0046] Figure 5 This is a schematic diagram of the waveform after normalization of the audio signal.

[0047] Figure 6 This is a framework diagram of a smart leak detection system for water supply networks in an embodiment of the present invention. Detailed Implementation

[0048] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.

[0049] Example

[0050] This embodiment proposes an intelligent leak detection method for water supply networks in the context of audio-based intelligent leak detection for water supply network monitoring. Addressing the issues of false alarms and missed alarms caused by complex urban noise, equipment differences, and environmental changes, the method employs techniques based on multi-scale parallel one-dimensional convolution, frequency domain attention weighting, and residual fusion. Combined with preprocessing methods such as outlier suppression and baseline noise filtering, it performs multi-scale adaptive modeling of the one-dimensional spectral vector in the 0-4kHz effective frequency band, achieving highly robust leak identification with low latency and low computational overhead.

[0051] like Figure 1 As shown, the intelligent leakage detection method for water supply networks in this embodiment includes the following steps:

[0052] S1. Collect audio signals from the valve well locations in the water supply network, preprocess the audio signals, and obtain a one-dimensional spectrum vector after statistical compression of the time dimension.

[0053] The sensor acquisition unit acquires the audio signal at the valve well location. During the audio signal preprocessing, outlier time point suppression and baseline noise filtering are performed to improve the robustness of the audio signal data. The time-domain signal is mapped to the frequency domain through short-time Fourier transform (STFT), and the effective channel information of 0–4kHz is extracted. After logarithmic transformation using the log function, it is normalized to improve numerical stability and cross-device consistency.

[0054] In this embodiment, see Figure 2 Step S1 includes the following steps:

[0055] S11. Outlier Suppression: Based on the frame-level energy intensity sequence of the audio signal, outlier detection is performed on the audio signal to identify a small number of abnormal high-energy frames and abnormal low-energy frames, and weight attenuation processing is performed on them to avoid the impact of transient shocks on the overall spectrum statistics.

[0056] Before time-dimensional statistical compression, this step involves outlier detection and weight attenuation or smoothing of the frame-level energy intensity sequence. The purpose of this step is to identify and suppress abnormally high and low energy frames caused by non-steady-state factors such as mechanical vibration and transient impacts, preventing these transient interferences from affecting the accuracy of the overall spectral statistics. The outlier detection process includes the following steps:

[0057] (1) Calculate the average energy intensity of each frame of the audio signal: ;

[0058] in, Let be the average energy intensity of the audio signal at time frame τ; This represents the total number of frequency sampling points. For the first The frequency of each frequency sampling point; For frequency The amplitude value of the filtered audio signal at time frame τ; This represents the summation of amplitude values ​​corresponding to all frequency points; This is the normalization factor used to calculate the average value.

[0059] (2) Calculate the Z-score standard deviation of the average energy intensity of the audio signal in order to perform outlier detection: ;

[0060] in, The Z-score standard deviation at time frame τ is used to measure the degree of deviation of the energy at time frame τ from the overall distribution. The average energy intensity across all time frames; The standard deviation of energy intensity across all time frames; The deviation between the current frame's energy and the mean; For standardization, the deviation is converted into a standard score.

[0061] (3) Compare the Z-Score standard deviation with the outlier detection threshold to identify outliers in the audio signal:

[0062] ;

[0063] in, This is the outlier identifier for time frame τ. A value of 1 indicates that the corresponding time frame τ is an outlier, and a value of 0 indicates that the corresponding time frame τ is a normal frame. This represents the absolute value of the standard deviation of the Z-Score. The outlier detection threshold is typically set to 2.5 or 3.0.

[0064] (4) Mark the time frame containing the outlier as an outlier frame and perform weight decay processing on the outlier frame:

[0065] ;

[0066] in, 0.3 is the weight coefficient for time frame τ, used to reduce the weight of outlier frames; 0.3 is the weight attenuation coefficient for outlier frames, reducing the contribution of outlier frames to 30%; 1.0 is the weight coefficient for normal frames, maintaining the full contribution of normal frames.

[0067] By employing a weight decay strategy, the contribution of outlier frames is reduced to 30%, which preserves some information while significantly reducing the impact of abnormal frames. Figure 3 As shown. After applying weighted attenuation, the suppressed spectrum is obtained:

[0068] ;

[0069] in, The suppressed spectral amplitude is obtained after outlier weight attenuation processing; The weighting coefficients for time frame τ; The original filtered spectrum amplitude; This indicates element-wise multiplication.

[0070] S12. Perform a short-time Fourier transform (STFT) on the audio signal after outlier detection to convert the audio signal from the time domain to the frequency domain and obtain a one-dimensional spectrum vector of the audio signal.

[0071] The specific process is as follows:

[0072] (1) First, for the audio signal Perform a short-time Fourier transform:

[0073] ;

[0074] in, These are complex coefficients in the time-frequency domain, representing the frequency. The complex value at time frame τ; The input is a time-domain audio signal; It is a window function used to extract a segment of the signal at time frame τ; This is the time offset, indicating the current time frame position in the analysis; For frequency variables, it represents the frequency components being analyzed; The imaginary unit; This is a complex exponential function used to convert time-domain signals to the frequency domain. In this embodiment, a Hamming window is used with a window length of n_fft=1024 and hop_length=256 to ensure a balance between time-domain resolution and frequency resolution.

[0075] (2) Calculate the amplitude spectrum of the audio signal based on the results of the short-time Fourier transform:

[0076] ;

[0077] in, The amplitude spectrum represents the frequency. and the audio signal strength at time frame τ; For complex numbers The real part; For complex numbers The imaginary part; This is the square root operation, used to calculate the modulus of a complex number.

[0078] (3) Filter the effective frequency band information of 0–4 kHz in the amplitude spectrum to obtain the filtered amplitude spectrum as a one-dimensional spectrum vector: ;

[0079] in, The filtered amplitude spectrum retains only the data in the effective frequency band of 0-4000 Hz; As an indicator function, when the frequency The value is 1 when it is in the range of [0, 4000], and 0 otherwise, and is used to implement frequency band filtering.

[0080] S13. Baseline noise filtering: Using the fundamental frequency characteristics accumulated over a long period of time by the audio signal acquisition unit under normal operating conditions as a reference, baseline subtraction and threshold suppression are performed on the current spectrum of the audio signal to filter out the long-term noise in the one-dimensional spectrum vector that is unrelated to water leakage, and obtain the suppressed spectrum.

[0081] See Figure 4 The current spectrum of the audio signal undergoes baseline subtraction and threshold suppression to filter out persistent background noise unrelated to leakage. This step aims to utilize the fundamental frequency characteristics accumulated over time by the audio signal acquisition unit located at the valve well under normal operating conditions as a reference to perform baseline subtraction and threshold suppression on the current spectrum, thereby highlighting the unique spectral characteristics of leakage and improving the signal-to-noise ratio.

[0082] This step specifically includes:

[0083] (1) Calculate the baseline spectrum of the one-dimensional spectral vector: ;

[0084] in, For the current frequency The baseline spectral value at the current frequency represents the one-dimensional spectral vector under historical normal operating conditions. The noise level at that location; Percentile function; This is a percentile parameter, which can be preferably set to 20%. A one-dimensional spectrum vector at the current frequency The amplitude value at that point; It is a set of one-dimensional spectrum vectors under normal historical operating conditions.

[0085] Using the 20th percentile as a baseline can effectively capture the noise floor component in the one-dimensional spectrum vector under normal operating conditions, while avoiding the influence of extreme values.

[0086] (2) Subtract the baseline spectrum from the one-dimensional spectrum vector: ;

[0087] in, For a one-dimensional spectrum vector at the current frequency The amplitude after baseline subtraction at the location; A one-dimensional spectrum vector at the current frequency The amplitude value at that point; A one-dimensional spectrum vector at the current frequency Baseline spectral values ​​at; A one-dimensional spectrum vector at the current frequency The difference between the amplitude value and the baseline spectrum value at that point; To find the maximum value function, ensure the result is non-negative.

[0088] The baseline subtraction operation compares the current spectrum with the historical baseline, retains the portion of the one-dimensional spectrum vector that exceeds the baseline spectrum, and eliminates long-standing background noise components.

[0089] (3) Apply adaptive thresholding to further suppress the noise floor component of the one-dimensional spectral vector:

[0090] ;

[0091] in, A one-dimensional spectrum vector at the current frequency The final filtered amplitude; For a one-dimensional spectrum vector at the current frequency The amplitude after baseline subtraction at the location; This is the threshold coefficient, which can preferably be set to 1.2; An adaptive threshold value; A one-dimensional spectral vector at frequency The baseline spectral value at that location.

[0092] The adaptive threshold strategy requires that the current spectrum must significantly exceed the baseline (more than 20%) to be considered a valid signal, which further suppresses weak signals close to the noise floor level in the one-dimensional spectrum vector and highlights the characteristics of the main frequency band of leakage.

[0093] S14. For the suppressed spectrum, calculate the average amplitude of each frame, and perform logarithmic transformation and normalization to achieve statistical compression of the time dimension of the one-dimensional spectrum vector.

[0094] In this embodiment, the specific steps include:

[0095] (1) For the suppressed spectrum, i.e., the suppressed one-dimensional spectrum vector, the average amplitude of each frame is calculated using the following formula:

[0096] ;

[0097] in, For the suppressed spectrum at the current frequency The average amplitude at the current frequency represents the suppressed spectrum. The average energy over the entire time window; This represents the total number of time frames. This represents summing over all time frames; For the suppressed spectrum at the current frequency And the amplitude value at time frame τ; This is a normalization factor used to calculate the average value. This statistical compression method can highlight persistent spectral characteristics while suppressing transient interference.

[0098] (2) Perform logarithmic transformation and normalization on the average amplitude of each frame.

[0099] The logarithmic transformation is as follows: ;

[0100] in, For the suppressed spectrum at the current frequency The magnitude after logarithmic transformation at the point; It is the natural logarithm function; To smooth the addition of 1 and avoid taking the logarithm of zero; For the suppressed spectrum at the current frequency The average amplitude at that location.

[0101] The normalization process is as follows: ;

[0102] in, For the suppressed spectrum at the current frequency The normalized amplitude at the point has a value range of [0,1]. The maximum value of the logarithmic amplitude of the suppressed spectrum across all frequency points; To normalize the maximum value, the amplitude is scaled to the [0, 1] interval. The normalized waveform is as follows. Figure 5 As shown.

[0103] The logarithmic transformation in this step compresses the dynamic range of the spectrum vector, making the differences between low-frequency and high-frequency components more pronounced; the normalization process ensures that the feature vectors of different audio signal samples have the same numerical range, improving the model's generalization ability. The final result is a statistically compressed one-dimensional spectrum vector:

[0104] ;

[0105] Where N is the number of frequency points in the range of 0–4 kHz.

[0106] S2. Feature Modeling: The one-dimensional spectrum vector that has been statistically compressed in the time dimension is used as the input vector for adaptive feature modeling. In the constructed model, a multi-scale parallel convolutional architecture is used to extract features from the input vector to capture frequency domain features at different scales at the same time. The frequency domain features at different scales are spliced ​​and fused to obtain a cross-scale fused feature vector, thereby achieving a comprehensive representation of the sound of water leakage.

[0107] The input vector for feature modeling is a one-dimensional spectrum vector that has undergone statistical compression along the time dimension:

[0108] ;

[0109] in, The one-dimensional spectrum vector, statistically compressed over time, serves as the input feature of the model. For the suppressed spectrum at frequency The normalized amplitude at the point; N frequency samples are taken within the effective frequency band of 0-4 kHz; N is the total number of frequency sampling points.

[0110] In this embodiment, the feature modeling steps include:

[0111] S21. Frequency domain features are extracted from the input vector using a multi-scale parallel convolutional architecture to obtain frequency domain features at different scales.

[0112] In this embodiment, the multi-scale parallel convolutional architecture has three convolutional branches of different scales, each of which is specifically responsible for extracting frequency domain features at different scales. The large kernel convolutional branch is used to capture the wideband features of the one-dimensional spectrum vector, the medium kernel convolutional branch is used to capture the medium-band features of the one-dimensional spectrum vector, and the small kernel convolutional branch is used to capture the local frequency band detail features of the one-dimensional spectrum vector.

[0113] The large-kernel convolution branch uses a larger convolution kernel, resulting in a larger receptive field and the ability to capture frequency correlations over a wide bandwidth. This design is particularly suitable for detecting the broadband characteristics of water leakage sounds in the 1-3kHz main frequency band, as well as the correlations between different frequency components. The frequency domain features extracted by the large-kernel convolution branch are as follows:

[0114] ;

[0115] in, Feature vectors extracted from large kernel convolution branches; This is a large-kernel one-dimensional convolution operation; The input is a one-dimensional spectrum vector; the convolution kernel size is... It has a wide range of frequency correlations covered by a sensing field and can identify the broadband steady-state characteristics of water leakage sounds.

[0116] The mid-kernel convolution branch uses a medium-sized convolution kernel, enabling it to capture local features within a mid-frequency band. This design is suitable for detecting mid-scale variations and transition features of leak sounds within a specific frequency band. The frequency domain features extracted by the mid-kernel convolution branch are:

[0117] ;

[0118] in, The feature vector extracted from the kernel convolution branch; This is a one-dimensional convolution operation with a central kernel. The input is a one-dimensional spectrum vector; the convolution kernel size is... It can identify the frequency domain structure and transition features at medium scales.

[0119] The small kernel convolution branch uses a smaller convolution kernel, resulting in a finer receptive field and the ability to capture detailed features in local frequency bands. This design is suitable for detecting subtle spectral variations and local features of leak sounds. The frequency domain features extracted by the small kernel convolution branch are:

[0120] ;

[0121] in, The feature vector extracted from the small kernel convolution branch; This is a small-kernel one-dimensional convolution operation; The input is a one-dimensional spectrum vector; the convolution kernel size is... It can identify fine-grained frequency domain detail features and local texture features.

[0122] S22. Feature concatenation and fusion: Frequency domain features of different scales are concatenated along the channel dimension, and then cross-scale feature interaction is performed through fusion convolution to obtain a cross-scale fused feature vector.

[0123] The frequency domain features output from the three convolutional branches are concatenated along the channel dimension, and then cross-scale feature interaction is performed through fusion convolution:

[0124] ;

[0125] in, This is the feature vector obtained by concatenating the frequency domain features output from the three convolutional branches; , , These are the feature vectors extracted from the large kernel convolution branch, the medium kernel convolution branch, and the small kernel convolution branch, respectively.

[0126] ;

[0127] in, The fused feature vector; To merge convolution operations; This is the concatenated feature vector. Fusion convolution can learn the interaction relationships between features at different scales, achieve cross-scale feature integration, and improve the model's ability to recognize complex frequency domain patterns.

[0128] S3. Further, a frequency domain attention module and a residual connection module are introduced into the constructed model to perform frequency domain attention weighting and fusion on the cross-scale fusion feature vector obtained in step S2 to obtain the residual connection feature vector.

[0129] The implementation process of this step includes the following steps:

[0130] S31. Introduce a frequency domain attention module to generate attention weights in the frequency domain direction, and perform element-wise multiplication with the feature vector after cross-scale fusion to obtain the attention-weighted feature vector, so as to dynamically highlight the main frequency band features of water leakage and suppress irrelevant frequency bands.

[0131] The purpose of this step is to enable the model to adaptively focus on the frequency domain features most important for leak detection, thereby improving the accuracy and robustness of the detection.

[0132] The frequency domain attention module employs the SE module (Squeeze-and-Excitation), which first obtains global frequency domain statistics through global average pooling.

[0133] ;

[0134] in, This is the frequency domain attention weight vector; The Sigmoid activation function compresses the output to the [0, 1] interval; It is a fully connected layer that learns a global representation of frequency domain features; For global average pooling, calculate the global average value for each channel; This represents the fused feature vector. Global average pooling can capture global information of the audio signal across the entire frequency domain, providing global contextual information for the generation of attention weights.

[0135] The generated attention weights are applied to the cross-scale fused feature vector: ;

[0136] in, The feature vector after attention weighting; The feature vector after cross-scale fusion; This is the frequency domain attention weight vector; This is an element-wise multiplication operation. The attention mechanism can dynamically adjust the weights based on the importance of the input features, making the model pay more attention to the features of the main leakage frequency band while suppressing interference from other frequency bands.

[0137] S32. Residual Connection: The attention-weighted feature vector is added to the cross-scale fused feature vector to form a residual learning path, and the feature vector after residual connection is obtained.

[0138] To improve training stability and convey deeper information, residual connections are added to alleviate the vanishing gradient problem and enhance the model's generalization ability. The purpose of this step is to enable the model to better learn complex frequency domain feature mapping relationships through a residual learning mechanism.

[0139] The resulting residual learning path is as follows: ;

[0140] in, The feature vector after residual connection; The feature vector after attention weighting; This is a point convolution operation (kernel size is 1), used for dimension matching and feature transformation; This represents the feature vector after cross-scale fusion; + indicates element-wise addition.

[0141] Residual connections can alleviate the vanishing gradient problem in deep networks, enabling models to train deeper network structures while preserving original feature information and improving the model's expressive power.

[0142] In steps S2-S3 above, feature modeling employs a multi-scale parallel convolutional branch architecture: the large-kernel convolutional branch has a larger receptive field in the frequency dimension, capable of capturing wide-band features and large-scale frequency correlations; the medium-kernel convolutional branch captures features in the medium-frequency range; and the small-kernel convolutional branch captures detailed features in local frequency bands. The outputs of the three parallel convolutional branches at different scales are concatenated along the channel dimension and then subjected to a fusion convolution to interact and compress cross-scale features, obtaining a cross-scale fused feature vector. Subsequently, a frequency domain attention module is introduced to generate attention weights in the frequency domain direction, which are then applied point-by-point to the cross-scale fused feature vector, dynamically emphasizing the main frequency band features of the leakage and effectively suppressing irrelevant frequency bands. Furthermore, to improve training stability and the transmission of deep information, residual connections are added to the attention-weighted fusion path to alleviate gradient vanishing and enhance generalization ability.

[0143] S4. Classification Output: The feature vectors after residual connection are classified through a fully connected layer, and the classification results are output.

[0144] In this embodiment, the binary classification probability output vector is first calculated, specifically as follows:

[0145] ;

[0146] in, The binary classification probability output vector can be represented as [P(normal), P(leaking)]; The Softmax activation function converts the output into a probability distribution. This is a fully connected layer, indicating that the final feature mapping is performed; To perform the flattening operation, the multidimensional feature vector is converted into a one-dimensional feature vector; This represents the feature vector after residual concatenation. The Softmax function ensures that the sum of the output probabilities is 1, facilitating subsequent decision-making and threshold setting.

[0147] Then, the final classification decision is output based on the binary classification probability output vector, specifically:

[0148] ;

[0149] in, This is the final classification decision result; The probability of leakage in the binary classification probability output vector; The preset decision threshold can be set to 0.5.

[0150] This classification output design enables the model to output clear binary classification results, facilitating automated decision-making in practical applications.

[0151] Furthermore, this embodiment also provides a smart leakage detection system for water supply networks. The system acquires audio signals from valve well locations within the water supply network via a data acquisition unit. These signals are then fed into a preprocessing unit for frequency domain normalization and standardization. The preprocessing unit outputs a one-dimensional spectral vector, which is then fed into a feature modeling unit for multi-scale parallel convolution. Subsequently, the vector is weighted and directly connected to the information flow within an attention and residual fusion unit. The fused features are then fed into a classification unit to output the leakage probability and category determination. Further, the feature modeling unit can trigger full or incremental training based on newly labeled data and store the updated model parameters for later model inference.

[0152] This embodiment presents a smart leak detection system for a water supply network, implemented using the aforementioned smart leak detection method, such as... Figure 6 Specifically, it includes the following units:

[0153] The acquisition unit is used to acquire audio signals from the valve well locations in the water supply network.

[0154] The preprocessing unit is used to preprocess the audio signal to obtain a one-dimensional spectrum vector after statistical compression in the time dimension.

[0155] The feature modeling unit takes a one-dimensional spectrum vector that has been statistically compressed in the time dimension as the input vector and performs adaptive feature modeling. In the constructed model, a multi-scale parallel convolutional architecture is used to extract features from the input vector to capture frequency domain features at different scales at the same time. The frequency domain features at different scales are then spliced ​​and fused to obtain a cross-scale fused feature vector.

[0156] The attention residual connection unit includes a frequency domain attention module and a residual connection module, which is used to perform frequency domain attention weighting and fusion on the cross-scale fused feature vector to obtain the residual connection feature vector;

[0157] The classification unit is used to classify the feature vectors after residual connection through a fully connected layer and output the classification result.

[0158] For a detailed description of the implementation process of each of the above units, please refer to steps S1-S4 described above.

[0159] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. A smart leakage detection method for water supply networks, characterized in that, Includes the following steps: S1. Collect audio signals at the valve well locations of the water supply network, preprocess the audio signals, and obtain a one-dimensional spectrum vector after statistical compression of the time dimension. S2. The one-dimensional spectrum vector that has been statistically compressed in the time dimension is used as the input vector to perform adaptive feature modeling. In the constructed model, a multi-scale parallel convolutional architecture is used to extract features from the input vector to capture frequency domain features at different scales at the same time. The frequency domain features at different scales are then spliced ​​and fused to obtain a cross-scale fused feature vector. S3. Introduce a frequency domain attention module and a residual connection module into the constructed model, and perform frequency domain attention weighting and fusion on the cross-scale fused feature vector to obtain the residual connection feature vector. S4. Classify the feature vectors after residual connection through a fully connected layer and output the classification results; Step S1 includes the following steps: S11. Based on the frame-level energy intensity sequence of the audio signal, outlier detection is performed on the audio signal to identify abnormal high-energy frames and abnormal low-energy frames, and weight attenuation processing is applied to the abnormal high-energy frames and abnormal low-energy frames. S12. Perform a short-time Fourier transform on the audio signal after outlier detection to convert the audio signal from the time domain to the frequency domain and obtain a one-dimensional spectrum vector of the audio signal. S13. Using the fundamental frequency characteristics accumulated by the audio signal acquisition unit under normal operating conditions as a reference, perform baseline subtraction and threshold suppression on the current spectrum of the audio signal to filter out the background noise that has existed in the one-dimensional spectrum vector for a long time and is unrelated to water leakage, and obtain the suppressed spectrum. S14. For the suppressed spectrum, calculate the average amplitude of each frame, and perform logarithmic transformation and normalization to achieve statistical compression of the time dimension of the one-dimensional spectrum vector.

2. The intelligent leakage detection method according to claim 1, characterized in that, Step S11 includes: (1) Calculate the average energy intensity of each frame of the audio signal; (2) Calculate the standard deviation of the Z-score of the average energy intensity of the audio signal; (3) Compare the Z-Score standard deviation with the outlier detection threshold to identify outliers in the audio signal; (4) Mark the time frame where the outlier point is located as the outlier frame, perform weight attenuation processing on the outlier frame, and obtain the suppressed spectrum.

3. The intelligent leakage detection method according to claim 1, characterized in that, Step S12 includes: (1) Perform a short-time Fourier transform on the audio signal; (2) Calculate the amplitude spectrum of the audio signal based on the results of the short-time Fourier transform; (3) Filter the effective frequency band information in the amplitude spectrum to obtain the filtered amplitude spectrum as a one-dimensional spectrum vector.

4. The intelligent leakage detection method according to claim 1, characterized in that, Step S13 includes: (1) Calculate the baseline spectrum of the one-dimensional spectrum vector to obtain the one-dimensional spectrum vector at the current frequency under historical normal operating conditions. The noise level at that location; (2) Remove the baseline spectrum from the one-dimensional spectrum vector and retain the part of the one-dimensional spectrum vector that exceeds the baseline spectrum to eliminate the long-standing background noise component; (3) Apply adaptive thresholding to further suppress the noise floor component of the one-dimensional spectral vector: ; in, A one-dimensional spectrum vector at the current frequency The final filtered amplitude; For a one-dimensional spectrum vector at the current frequency The amplitude after baseline subtraction at the location; This is the threshold coefficient; An adaptive threshold value; A one-dimensional spectrum vector at the current frequency The baseline spectral value at that location.

5. The intelligent leakage detection method according to claim 1, characterized in that, Step S14 includes: (1) Calculate the average amplitude of each frame for the suppressed spectrum: ; in, For the suppressed spectrum at the current frequency The average amplitude at the current frequency represents the suppressed spectrum. The average energy over the entire time window; This represents the total number of time frames. This represents summing over all time frames; For the suppressed spectrum at the current frequency And the amplitude value at time frame τ; This is the normalization factor used to calculate the average value; (2) Perform logarithmic transformation and normalization on the average amplitude of each frame; The logarithmic transformation is as follows: ; in, For the suppressed spectrum at the current frequency The magnitude after logarithmic transformation at the point; It is the natural logarithm function; Add 1 for smoothing; Normalization is performed as follows: ; in, For the suppressed spectrum at the current frequency The normalized amplitude at the point; The maximum value of the logarithmic amplitude of the suppressed spectrum across all frequency points; To normalize the maximum value, the amplitude is scaled to the [0, 1] interval.

6. The intelligent leakage detection method according to claim 1, characterized in that, Step S2 includes: S21. Frequency domain features are extracted from the input vector using a multi-scale parallel convolutional architecture to obtain frequency domain features at different scales. S22. Concatenate the frequency domain features of different scales along the channel dimension, and then perform cross-scale feature interaction through fusion convolution to obtain the cross-scale fused feature vector.

7. The intelligent leakage detection method according to claim 6, characterized in that, The multi-scale parallel convolutional architecture in step S21 has three convolutional branches of different scales, each dedicated to extracting frequency domain features at different scales; the large kernel convolutional branch is used to capture the wideband features of the one-dimensional spectrum vector, the medium kernel convolutional branch is used to capture the medium-band features of the one-dimensional spectrum vector, and the small kernel convolutional branch is used to capture the local frequency band detail features of the one-dimensional spectrum vector.

8. The intelligent leakage detection method according to claim 1, characterized in that, Step S3 includes: S31. Introduce a frequency domain attention module to generate attention weights in the frequency domain direction, and perform element-wise multiplication with the feature vector after cross-scale fusion to obtain the attention-weighted feature vector. S32. Add the attention-weighted feature vector to the cross-scale fusion feature vector to form a residual learning path and obtain the feature vector after residual connection. The resulting residual learning path is as follows: ; in, The feature vector after residual connection; The feature vector after attention weighting; This is a point convolution operation used for dimension matching and feature transformation; This represents the feature vector after cross-scale fusion; + indicates element-wise addition.

9. A smart leakage detection system for water supply networks, characterized in that, The intelligent leakage detection method according to any one of claims 1-8 is used, and the detection system includes the following units: The acquisition unit is used to acquire audio signals from the valve well locations in the water supply network. The preprocessing unit is used to preprocess the audio signal to obtain a one-dimensional spectrum vector after statistical compression in the time dimension. The feature modeling unit takes a one-dimensional spectrum vector that has been statistically compressed in the time dimension as the input vector and performs adaptive feature modeling. In the constructed model, a multi-scale parallel convolutional architecture is used to extract features from the input vector to capture frequency domain features at different scales at the same time. The frequency domain features at different scales are then spliced ​​and fused to obtain a cross-scale fused feature vector. The attention residual connection unit includes a frequency domain attention module and a residual connection module, which is used to perform frequency domain attention weighting and fusion on the cross-scale fused feature vector to obtain the residual connection feature vector; The classification unit is used to classify the feature vectors after residual connection through a fully connected layer and output the classification result.

Citation Information

Patent Citations

  • Speech enhancement method, electronic device, program product, and storage medium

    WO2023102930A1