Leakage detection method based on convolutional neural network and pipeline attribute fusion
Through the leak loss detection method of convolutional neural network combined with pipeline attributes, the problem of low accuracy in the existing technology of leak loss detection in complex environments is solved, efficient and accurate leak loss detection is achieved, and computing costs and resource consumption are reduced.
Patent Information
- Application Number
- CN202510406581.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-07-04
AI Technical Summary
The existing leak detection methods are not very accurate in complex environments and fail to make full use of the physical properties of the pipeline, resulting in insufficient detection efficiency and accuracy.
The leakage loss detection method of convolutional neural network combined with pipeline attributes is adopted. By collecting audio signals and pipeline attributes, the convolutional neural network model is used for leakage loss detection, including time-frequency feature extraction, pipe material and pipe diameter feature encoding, and these features are fused in the model for classification.
It improves the accuracy and efficiency of leakage detection, and can efficiently and accurately detect pipeline leakage in various environments, reducing calculation costs and resource consumption.
Smart Images

Figure CN120251916A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of water services, and in particular, to a leakage detection method based on the fusion of convolutional neural network and pipeline attributes. Background Art
[0002] With the popularization of the water supply system, the problem of pipeline leakage has become increasingly serious, especially in areas where the urbanization process is advancing rapidly. Traditional leakage detection methods, such as manual inspection, acoustic detection, and pressure monitoring, although they can detect the existence of pipeline leakage, have many limitations:
[0003] 1. Manual inspection has high costs, low efficiency, and it is difficult to achieve real-time monitoring; 2. Acoustic detection is greatly affected by background noise in complex environments and it is difficult to accurately identify the leakage location; 3. Pressure monitoring may lead to misjudgment due to the interference of external factors. Therefore, how to use advanced technologies to improve the efficiency and accuracy of leakage detection has become an urgent problem to be solved.
[0004] In recent years, the technology of using audio signals for leakage detection has begun to be widely applied. Audio signals can reflect the dynamic characteristics of fluid flow in pipelines. Pipeline leakage is usually accompanied by the generation of noise, and these noise signals contain rich leakage information. Based on this, scholars and engineers have tried to judge whether there is leakage by analyzing the audio signals generated by pipelines. The current main audio signal processing methods include time-domain analysis, frequency-domain analysis, and time-frequency domain analysis, combined with traditional machine learning algorithms for classification, so as to realize the judgment of whether the pipeline leaks through audio signals.
[0005] However, the existing audio signal detection technologies still have multiple deficiencies. First of all, the existing technologies perform poorly in the case of noise interference. Especially in complex environments, there are often other noise sources around pipelines, such as traffic noise, mechanical equipment noise, etc. These background noises will significantly affect the accuracy of leakage detection. Although audio signals can be processed through technologies such as filtering and noise reduction, the effects of these methods are often not satisfactory, especially in environments with high noise.
[0006] Secondly, most of the existing technologies rely on manual feature extraction, that is, the leakage is identified by manually analyzing the spectrum, amplitude and other features of audio signals. The limitation of this method is that manual feature extraction depends on expert experience, and the audio signal features in different pipeline environments may vary greatly. The manually designed features often cannot cover all leakage situations, resulting in low accuracy of leakage identification.
[0007] In addition, the prior art often ignores the physical properties of pipelines (such as pipe diameter, pipe material, etc.), and these information have important influences on the type and location of leakage. Different materials and calibers of pipelines will affect the water flow characteristics, thus having different influences on the leakage signals. The existing audio detection methods usually only consider the audio signals themselves and fail to make full use of these external factors, so they perform unstably in diverse pipeline environments. Summary of the Invention
[0008] The object of the present invention is to overcome the deficiencies in the above background technology and provide a leakage detection method based on the fusion of convolutional neural network and pipeline attributes, which should be able to efficiently and accurately detect pipeline leakage in various environments.
[0009] The technical solution of the present invention is as follows:
[0010] A leakage detection method based on the fusion of convolutional neural network and pipeline attributes, comprising the following steps:
[0011] Step 1, collect audio signals and pipeline attributes: collect the audio signals of the pipeline water flow through sensors; detect pipeline attributes;
[0012] Step 2, preprocess the audio signals: preprocess the sampling time and sampling rate of the audio signals;
[0013] Step 3, extract feature vectors: extract time-frequency feature vectors, pipe material feature vectors and pipe diameter feature vectors;
[0014] Step 4, pipeline leakage detection: input the features into a convolutional neural network model for classification to obtain the pipeline leakage state.
[0015] In the said Step 1, an underwater microphone or an underwater acoustic sensor is installed inside the pipeline to collect audio signals, or a contact vibration sensor or a patch microphone is installed on the outer wall of the pipeline to collect audio signals.
[0016] In the said Step 1, the pipeline attributes include pipe material and pipe diameter.
[0017] The preprocessing of the sampling time is to unify the duration of the audio signal to 5 seconds; the preprocessing of the sampling rate is to set the sampling rate of the audio signal to 8 kHz.
[0018] The extraction of the time-frequency feature vectors is to obtain a spectrogram after performing time-frequency feature extraction on the audio signals by using the short-time Fourier transform; the extraction of the pipe material feature vectors is to encode the pipe material into binary; the extraction of the pipe diameter feature vectors is to normalize the pipe diameter.
[0019] The convolutional neural network model includes an input layer, four convolutional layers, a max pooling layer, an attribute fusion layer, a fully connected layer, and an output layer connected in sequence.
[0020] In the convolutional neural network model, after the time-frequency feature vector is processed by four convolutional layers and a max-pooling layer, it is concatenated with the pipe material feature vector and the pipe diameter feature vector in the attribute fusion layer, and then passes through a fully connected layer and an output layer to obtain the pipeline leakage classification result.
[0021] The training of the convolutional neural network model includes: using the Adam optimization algorithm to adjust the network weights to ensure that the trained model has high-precision classification ability. When the probability of "leakage" exceeds the set threshold, the leakage state of the pipeline is determined to be "leakage", otherwise it is "normal"; the trained model is evaluated on an independent test set, and the model after 500 epochs of training is selected for testing.
[0022] The beneficial effects of the present invention are:
[0023] By combining a convolutional neural network model (CNN) with the physical attribute information of the pipeline (pipe diameter and material), the present invention proposes a new leakage detection method, which effectively improves the detection accuracy, solves the problems of noise interference and limitations in feature extraction, makes full use of pipeline attributes, and can efficiently and accurately detect pipeline leakage in various environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 is a flowchart of the present invention.
[0025] Figure 2 is an architecture diagram of the convolutional neural network model of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0026] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0027] The leakage detection method based on convolutional neural network and pipeline attribute fusion proposed by the present invention mainly aims to improve the accuracy and efficiency of leakage detection through audio signal analysis and auxiliary information (pipe material, pipe diameter).
[0028] As Figure 1 shown, the leakage detection method based on convolutional neural network and pipeline attribute fusion includes the following steps:
[0029] Step 1, collect audio signals and pipeline attributes
[0030] Collect the noise signal generated by the water flow in the pipeline through a sensor, and the noise signal is the audio signal.
[0031] Install the sensor at a position where the noise generated by the water flow can be maximally captured. The sensor can be installed outside the pipeline or inside the pipeline.
[0032] When installed inside the pipeline: Usually, an underwater microphone or an underwater acoustic sensor is used and installed at a fixed position inside the pipeline (such as at the pipeline joint). This method has high sensitivity, but the pipeline needs to be modified and the waterproofness needs to be ensured.
[0033] When installed outside the pipeline: Usually, a contact vibration sensor or a patch microphone is used and directly attached to the outer wall of the pipeline. This is suitable for scenarios where the pipeline does not need to be modified, but the collected signal may be greatly interfered by external noise.
[0034] The collected audio signal is used for subsequent preprocessing. The sampling rate and sampling time of the audio signal are adjusted according to the situation of the pipeline. The sampling rate is higher than 8 kHz and the sampling time is greater than 5 seconds to ensure that enough noise details are captured for subsequent leakage detection.
[0035] Detect the pipeline properties, including the pipe material and pipe diameter.
[0036] Step 2: Preprocess the audio signal
[0037] Preprocess the audio signal, including preprocessing the sampling time and the sampling rate, to provide a standardized data input for subsequent feature extraction.
[0038] Sampling time preprocessing: Perform duration cropping or padding on the audio signal. Audio signals of different lengths will be uniformly cropped to a length of 5 seconds to ensure data format consistency.
[0039] Sampling rate preprocessing: For audio signals with a sampling rate higher than 8 kHz, first filter out the frequency components higher than half of the target sampling rate through a low-pass anti-aliasing filter to avoid spectral aliasing, and then resample the audio signal to unify the sampling rate to 8 kHz.
[0040] Step 3: Extract feature vectors
[0041] Extracting feature vectors includes extracting time-frequency feature vectors, pipe material feature vectors, and pipe diameter feature vectors.
[0042] Extracting time-frequency feature vectors includes: Performing time-frequency feature extraction on the audio signal using the short-time Fourier transform (STFT) to obtain a spectrogram, that is, a time-frequency feature vector, which can effectively capture the frequency components in the audio signal and helps to distinguish leakage signals from normal pipeline signals.
[0043] Extracting the pipe feature vector includes: encoding the pipe material as a binary feature. The pipe materials are divided into 10 common materials such as galvanized steel, steel, cast iron, ductile iron, PE, PVC, PPR, etc. Each material is encoded as an independent binary feature using one-hot encoding. For example, the encoding of galvanized steel is [1,0,0,0,0,0,0,0,0,0]. If the pipe does not belong to the above 10 materials, a full-zero encoding is assigned.
[0044] Extracting the pipe diameter feature vector includes: normalizing the pipe diameter to the interval [0,1] through Min-Max normalization, and the unit of the pipe diameter is centimeter.
[0045] Step 4: Pipeline leakage detection
[0046] The present invention uses a convolutional neural network model (CNN) to classify the pipeline leakage state. The convolutional neural network model consists of multiple convolutional layers and max pooling layers, and can automatically extract key features related to the leakage state or normal state from the feature vectors obtained by processing in the above steps.
[0047] The convolutional neural network model includes an input layer, four convolutional layers, a max pooling layer, an attribute fusion layer, a fully connected layer, and an output layer connected in sequence. Among them:
[0048] The input layer contains the spectral features of the audio signal and the pipeline attribute information, namely the time-frequency feature vector, the pipe material feature vector, and the pipe diameter feature vector.
[0049] Four different convolutional layers capture the time-frequency features at different levels of the audio signal (time-frequency feature vector) through sliding filters. The first convolutional layer: 1 input channel, 8 output channels, and a convolutional kernel of 5×5. The second convolutional layer: 8 input channels, 16 output channels, and a convolutional kernel of 3×3. The third convolutional layer: 16 input channels, 32 output channels, and a convolutional kernel of 3×3. The fourth convolutional layer: 32 input channels, 64 output channels, and a convolutional kernel of 3×3.
[0050] The max pooling layer reduces the dimension and computational amount of the audio signal (time-frequency feature vector) through a dimensionality reduction operation and retains the main features, improving the computational efficiency and robustness of the model. The max pooling layer uses the max pooling method.
[0051] The attribute fusion layer concatenates the pipe feature vector, the pipe diameter feature vector, and the time-frequency feature vector output by the max pooling layer into a new feature vector. The purpose is to combine the time-frequency features of the audio signal with the pipe attributes, enabling the model to consider the impact of pipe attributes on the leakage state during classification. For example, the data format of the time-frequency feature vector output by the max pooling layer is [3.27, 4.36, 2.78, ……, 5.89], the data format of the pipe feature vector is [1, 0, 0, 0, 0, 0, 0, 0, 0, 0], and the data format of the pipe diameter feature vector is [0.79]. After horizontally concatenating the time-frequency feature vector, the pipe feature vector, and the pipe diameter feature vector, the new feature vector obtained is [3.27, 4.36, 2.78, ……, 5.89, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0.79]
[0052] The fully connected layer further learns the global features and generates high-level feature representations.
[0053] The output layer processes the output of the last layer through the softmax activation function to generate two types of probability distributions (normal and leakage), thereby realizing the discrimination of the water pipe leakage state and finally obtaining the classification result.
[0054] Therefore, if the convolutional neural network model detects a leakage signal, it outputs the result of "leakage". If the convolutional neural network model does not detect a leakage signal, it indicates a normal state, outputs "normal", and conducts routine monitoring.
[0055] The training process of the convolutional neural network model is as follows:
[0056] The method described in Steps 1, 2, and 3 is used to collect and preprocess the audio signal, and extract the time-frequency feature vector, the pipe feature vector, and the pipe diameter feature vector as the training set, test set, and validation set for model training.
[0057] The samples of the leakage state and the normal state are labeled, and the model is trained.
[0058] The names of the training audio signal files are in the format of "pipe material - pipe diameter - whether there is leakage", for example, "galvanized steel - 15 - leak.wav", which is used for labeling information. When loading the data, the corresponding audio annotation information is automatically extracted according to the file name.
[0059] The Adam optimization algorithm is used to adjust the network weights to ensure that the trained model has high-precision classification ability and can be applied in practice. When the "leakage" probability exceeds the set threshold, the leakage state of the pipeline is determined as "leakage", otherwise it is "normal".
[0060] The model finally outputs a probability distribution, such as [0.37, 0.63]. The two numbers represent the probabilities of leakage and normal conditions respectively, and the sum of the two is 1. Generally, the one with the greater probability is selected as the final output label. However, if you want to reduce false alarms in leakage cases, you can adjust the threshold. Set that when the probability distribution of leakage is greater than 80%, it is determined that there is leakage.
[0061] Evaluate the trained model on an independent test set. Select the model after 500 training epochs for testing. The final test results are shown in Table 1:
[0062] Table 1
[0063]
[0064] The experimental results show that under the condition of 5000 test data, the accuracy of the convolutional neural network model reaches 0.96, and the recall rate reaches 0.94, both of which are significantly better than the traditional CNN model. At the same time, the average inference time remains consistent. That is, without reducing the detection efficiency (the same single inference time), this model can provide better leakage detection results.
[0065] The advantages of the present invention are as follows:
[0066] 1. Reduce manual intervention and improve the automation level
[0067] Through the automated audio analysis and classification process, the present invention reduces the dependence on manual judgment. Traditional leakage detection methods usually rely on manual analysis and empirical judgment, while the present invention can detect the pipeline leakage status in real time and accurately through automated classification based on deep learning, greatly improving the automation level of leakage detection, reducing labor costs and the possibility of human errors.
[0068] 2. Improve the accuracy and efficiency of leakage detection
[0069] By combining audio signals with pipeline material and pipe diameter information, the present invention uses a convolutional neural network model (CNN) to classify the pipeline leakage status. Compared with simply relying on audio signals, adding pipeline material and pipe diameter information can provide more context information, significantly improving the accuracy and reliability of leakage detection. Since the acoustic characteristics of leakage may vary under different pipeline materials and pipe diameters, integrating these auxiliary information can help the model better adapt to different pipeline environments, thus improving the accuracy and generalization ability of leakage detection.
[0070] 3. Reduce the computing cost and improve the computing efficiency
[0071] The present invention can automatically extract key information from input data through a convolutional neural network model (CNN). In the design of the convolutional layer and the pooling layer, the role of the pooling layer is to perform dimensionality reduction on the data, reducing the dimensionality and computational amount of the data. Through this method, while ensuring the performance of the model, the consumption of computing resources can be effectively reduced, and the computational efficiency of the detection process can be improved. This enables the present invention to adapt to large-scale real-time monitoring requirements and is particularly suitable for large-scale pipeline leakage detection tasks in industrial environments.
[0072] Preferred embodiments of the present invention are shown in the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in this specification. On the contrary, these embodiments are provided to make the understanding of the disclosure of the present invention more thorough and comprehensive.
Claims
1. A leakage detection method based on convolutional neural network and pipeline attribute fusion, comprising the following steps: Step 1, collect audio signals and pipeline attributes: collect the audio signals of the pipeline water flow through sensors; Detect pipeline attributes; Step 2, preprocess the audio signals: preprocess the sampling time and sampling rate of the audio signals; Step 3, extract feature vectors: extract time-frequency feature vectors, pipe material feature vectors and pipe diameter feature vectors; Step 4, pipeline leakage detection: input the features into a convolutional neural network model for classification to obtain the pipeline leakage state.
2. The leakage detection method based on the fusion of convolutional neural network and pipeline attributes according to claim 1, characterized in that: In the said Step 1, an underwater microphone or an underwater acoustic sensor is installed inside the pipeline to collect audio signals, or a contact vibration sensor or a patch microphone is installed on the outer wall of the pipeline to collect audio signals.
3. The leak detection method based on convolutional neural network and pipeline attribute fusion according to claim 2, characterized in that: In the said Step 1, the pipeline attributes include pipe material and pipe diameter.
4. The leakage detection method based on the fusion of convolutional neural network and pipeline attributes according to claim 3, characterized in that: The preprocessing of the sampling time is to unify the duration of the audio signal to 5 seconds; the preprocessing of the sampling rate is to set the sampling rate of the audio signal to 8 kHz.
5. The leakage detection method based on convolutional neural network and pipeline attribute fusion according to claim 4, characterized in that: The extraction of the time-frequency feature vector is to obtain a spectrogram after performing time-frequency feature extraction on the audio signal by using the short-time Fourier transform; the extraction of the pipe material feature vector is to encode the pipe material into binary; the extraction of the pipe diameter feature vector is to normalize the pipe diameter.
6. The leak detection method based on the fusion of convolutional neural network and pipeline attributes according to claim 5, characterized in that: The convolutional neural network model includes an input layer, four convolutional layers, a max pooling layer, an attribute fusion layer, a fully connected layer, and an output layer connected in sequence.
7. The leak detection method based on convolutional neural network and pipeline attribute fusion according to claim 6, characterized in that: In the convolutional neural network model, after the time-frequency feature vector is processed by four convolutional layers and the max pooling layer, it is concatenated with the pipe material feature vector and the pipe diameter feature vector in the attribute fusion layer, and then passes through the fully connected layer and the output layer to obtain the pipeline leakage classification result.
8. The leakage detection method based on convolutional neural network and pipeline attribute fusion according to claim 7, characterized in that: The training of the convolutional neural network model includes: using the Adam optimization algorithm to adjust the network weights to ensure that the trained model has a high-precision classification ability. When the "leakage" probability exceeds the set threshold, the leakage state of the pipeline is determined as "leakage", otherwise it is "normal"; evaluate the trained model on an independent test set, and select the model after 500 rounds of Epoch training for testing.