Gas pipeline gas leakage detection method and device based on deep learning

Through a deep learning method, a convolutional neural network with audio data preprocessing and feature fusion is used to realize non-contact and high-precision detection of gas pipeline leakage, solving the problems of low accuracy and high equipment cost in high noise environments in traditional detection methods, and is suitable for high frequency movement detection in rail transit.

CN120506607APending Publication Date: 2025-08-19JIANGSU NINGHE INTELLIGENT TRANSPORTATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510555948.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The traditional air leakage detection method of gas pipeline is low in accuracy in high noise environments, sensor detection has blind spots in monitoring and high equipment costs, which cannot meet the needs of mobile detection in medium and high frequency and high precision in rail transit.

Method used

Using a deep learning-based method, the non-contact detection of gas pipeline leakage is achieved through audio data preprocessing, feature extraction and fusion, using convolutional neural networks to realize contactless detection of gas pipeline leakage, including audio data acquisition, noise reduction, preprocessing, frequency domain and Mel spectrogram calculation, as well as feature fusion and classification.

Benefits of technology

It realizes high-precision air leakage detection in high-noise environments, solves the problems of low accuracy and high equipment cost of traditional methods, and realizes non-contact, high-precision mobile detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120506607A_ABST
    Figure CN120506607A_ABST
Patent Text Reader

Abstract

The invention provides a gas pipeline leakage detection method and device based on deep learning, and the method comprises the steps: collecting audio data from a gas pipeline, and carrying out the preprocessing, including noise reduction, pre-emphasis and normalization, of the collected audio data; according to the preprocessed audio data, calculating a corresponding normalized frequency domain graph and a Mel spectrogram; and inputting the frequency domain graph and the Mel spectrogram into a pre-constructed and trained pipeline air leakage identification model, and outputting a judgment result about whether air leakage exists or not. According to the invention, non-contact and high-precision mobile detection of gas leakage of the gas pipeline can be realized, and the detection safety and reliability are high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automatic pipeline leakage detection, and in particular to a method and device for detecting gas pipeline leakage based on deep learning. Background Art

[0002] With the rapid growth of urban rail transit operating mileage, the conflict between train safety maintenance needs and limited manual inspection capabilities has become increasingly prominent. Traditional manual inspection methods are no longer able to meet the high-frequency, high-precision inspection requirements, prompting the rail transit operation and maintenance sector to accelerate the development of intelligent inspection technologies. Rail transit inspection robots have emerged as a response to this need, and are gradually experimenting with manual safety inspections. Subway safety inspections encompass a wide range of tasks, particularly those related to train pneumatic systems. As the power source for critical functions such as braking and door control, the integrity of the pneumatic system directly impacts train safety. Therefore, deploying efficient and reliable automated leak detection technology on inspection robots has become an urgent industry need.

[0003] Traditional leak detection methods primarily include manual visual inspection, sensor detection, and ultrasonic testing, but they all have shortcomings. Traditional manual methods are subject to subjective judgment bias. In ambient noise levels exceeding 85dB, the human ear's accuracy in identifying the acoustic signature of leaks below 0.2MPa is less than 45%. Pressure sensor solutions have blind spots, with a single sensor only able to cover a 3-meter pipe section and unable to pinpoint the leak. Furthermore, ultrasonic detection technology is limited by specialized hardware, resulting in high unit prices and the need for specialized personnel to perform spectrum analysis, making it unsuitable for mobile detection in rail transit scenarios. Summary of the Invention

[0004] Technical purpose: In response to the above technical problems, the present invention proposes a method and device for detecting air pipeline leakage based on deep learning, which can realize non-contact, high-precision mobile detection of air pipeline leakage with high detection safety and reliability.

[0005] Technical solution: To achieve the above technical objectives, the present invention adopts the following technical solution:

[0006] A deep learning-based air pipeline leakage detection method comprises the following steps:

[0007] S1. Collect audio data from the airway and perform preprocessing including noise reduction, pre-emphasis, and normalization on the collected audio data;

[0008] S2. Calculate the corresponding normalized frequency domain graph and Mel-spectrogram based on the preprocessed audio data;

[0009] S3. Input the frequency domain image and the Mel-spectrogram image into a pre-built and trained pipeline leakage recognition model, and output a judgment result of whether there is leakage;

[0010] The pipeline leakage identification model includes:

[0011] There are two feature extraction networks, which input the frequency domain image and the Mel spectrum image respectively, and extract the Mel spectrum features and time domain features respectively;

[0012] Feature fusion module, used to fuse the features extracted by the two basic feature extraction networks;

[0013] The backbone network inputs the information after feature fusion and extracts high-level features;

[0014] The classification network is equipped with a fully connected layer and an activation function, which is used to map the high-level features extracted by the backbone network to the category space. The pipeline leakage identification network is continuously optimized through cross-entropy loss and back propagation, and the final classification of whether the gas pipeline is leaking is output.

[0015] Preferably, in step S1, audio data of a preset duration is used.

[0016] Preferably, in step S2, the amplitude spectrum of short-time Fourier transform is used as the frequency domain graph.

[0017] Preferably, in step S3, the feature extraction network includes a 3*3 convolution layer, a BN normalization layer, an activation function LeakReLU layer, a 3*3DS convolution layer, and a 5*5DS convolution layer arranged in sequence.

[0018] Preferably, in step S3, the feature fusion module specifically performs the following steps:

[0019] Input the frequency domain graph feature F1 and Mel spectrum graph feature F2 extracted by the feature extraction network;

[0020] Each feature is spliced or fused, input into a gating module, and the gating coefficient g is calculated:

[0021] g=σ(W·[F1;F2]+b)

[0022] Among them, [F1; F2] represents the concatenation of features, W is the weight matrix, b is the bias term, and σ is the sigmoid function, whose output range is between 0 and 1;

[0023] Use the calculated gating coefficient to perform weighted fusion of each feature:

[0024] F fused =g⊙F1+(1-g)⊙F2

[0025] Among them, ⊙ represents the element-by-element multiplication operation, and the gating coefficient g can dynamically adjust the contribution ratio of the two-way features to the final fusion result.

[0026] Preferably, in step S3, the backbone network is composed of a stack of multiple convolutional layers, activation functions and pooling layers, and the classification network is composed of convolutional layers and fully connected layers.

[0027] A deep learning-based air pipeline leakage detection device, comprising:

[0028] The audio data acquisition and preprocessing module is used to collect audio data from the airway and perform preprocessing on the collected audio data, including noise reduction, pre-emphasis and normalization;

[0029] The frequency domain graph and Mel-spectrogram processing module is used to calculate the corresponding normalized frequency domain graph and Mel-spectrogram based on the pre-processed audio data;

[0030] The pipeline leakage identification model is used to input the frequency domain image and the Mel spectrum image and output a judgment result of whether there is a leak. The pipeline leakage identification model includes:

[0031] There are two feature extraction networks, which input the frequency domain image and the Mel spectrum image respectively, and extract the Mel spectrum features and time domain features respectively;

[0032] Feature fusion module, used to fuse the features extracted by the two basic feature extraction networks;

[0033] The backbone network inputs the information after feature fusion and extracts high-level features;

[0034] The classification network is equipped with a fully connected layer and an activation function, which is used to map the high-level features extracted by the backbone network to the category space. The pipeline leakage identification network is continuously optimized through cross-entropy loss and back propagation, and the final classification of whether the gas pipeline is leaking is output.

[0035] Beneficial effects: Due to the adoption of the above technical solution, the present invention has the following beneficial effects:

[0036] By integrating audio analysis with deep learning technology, the present invention innovatively adopts the Mel-spectrum conversion method to visualize the acoustic features and then input them into the convolutional neural network. This solves the technical bottleneck of traditional acoustic detection, which is severely interfered by environmental noise and has high cost of specialized equipment, and realizes non-contact, high-precision mobile detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a software process execution flow chart;

[0038] Figure 2 This is the pipeline leakage identification network structure diagram;

[0039] Figure 3 It is the structural diagram of the feature extraction network;

[0040] Figure 4 It is the structural diagram of the feature fusion module;

[0041] Figure 5 This is an example of a Mel-spectrogram;

[0042] Figure 6 An example of a frequency domain plot is shown below. DETAILED DESCRIPTION

[0043] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0044] The purpose of the present invention is to provide a gas leakage detection method based on deep learning technology, which uses deep learning technology to perform spectrum analysis on the collected audio signals to realize the gas leakage detection function. During the actual data collection process, the microphone carried by the robot will record a 10s audio data. First, the collected audio data is pre-processed by noise reduction and other pre-processing, and then the Mel spectrum map and frequency domain map of the audio are calculated respectively, and the images are sent to the neural network respectively. The network first extracts basic features through the front feature extraction network, and then fuses the features through the gating network. After that, the data is sent to the backbone network for deeper feature extraction, and finally the extracted information is sent to the classification network to judge whether there is a gas leak. It is implemented specifically according to the following steps:

[0045] Step 1: Audio data preprocessing: The collected audio data first needs to undergo noise reduction, pre-emphasis, and normalization to reduce the impact of noise and other factors on the data. Then, the preprocessed audio data is processed to obtain frequency domain images and Mel-spectrograms respectively.

[0046] Step 2: Basic feature extraction and fusion: The frequency domain image and the Mel-spectrogram image are fed into two independent pre-feature extraction modules, which are responsible for extracting the feature information of the Mel-spectrogram and the frequency domain image respectively. The extracted feature layers are then fused through a gating network.

[0047] Step 3: High-level feature extraction: After feature fusion, the information has integrated preliminary features from multiple channels. This information is input into the backbone network, and the hierarchical structure of the deep neural network is used to gradually extract higher-level and more discriminative features.

[0048] Step 4, Classification Module: The classification module uses fully connected layers and activation functions to map the high-level features extracted by the backbone network to the category space, continuously optimizes the model through cross-entropy loss and back propagation, and combines dropout and regularization measures to prevent overfitting, thereby achieving accurate and efficient final classification judgment.

[0049] Step 1: Audio data preprocessing specifically includes:

[0050] Step 1.1: During its actual inspection, the rail transit inspection robot collects audio signals at pre-set map points, capturing 10 seconds of audio data. After obtaining the audio data, it passes through a preprocessing module to generate a normalized Mel-spectrogram and a frequency domain image. Both images are resized to 192 x 192 to ensure they meet network input requirements.

[0051] (1) Calculation of Mel-spectrogram:

[0052] Short-time Fourier transform (STFT):

[0053] After dividing the audio signal x(t) into frames, apply STFT to each frame to calculate its spectrum:

[0054]

[0055] Where: M is the length of the window function, w(n) is the window function, n is the frame index, and ω is the angular frequency

[0056] (2) Power spectrum calculation:

[0057] Compute the power spectrum of each frame:

[0058] P(n,k)=|X(n,k)| 2

[0059] Where k represents the frequency index.

[0060] (3) Mel scale conversion:

[0061] Convert the frequency f to the Mel scale:

[0062]

[0063] (4) Mel filter bank mapping:

[0064] Using a set of triangular filters H m (k) Perform weighted summation of the power spectrum to obtain the Mel spectrum:

[0065]

[0066] (5) Normalization processing:

[0067] Normalize the Mel-spectrogram to the range [0,1]:

[0068]

[0069] (6) Generation of frequency domain graph:

[0070] Directly use the STFT amplitude spectrum as the frequency domain graph:

[0071] F(n,k)=|X(n,k)|

[0072] Mel-spectrogram and frequency domain diagrams, for example Figure 5 and Figure 6 shown.

[0073] Step 2: Basic feature extraction specifically includes:

[0074] Step 2.1: Send the Mel-spectrogram and frequency domain graph obtained in step 1.1 into two independent feature extraction networks respectively. First, perform two convolution operations to increase the dimension, and then pass them through two DW convolution layers to obtain the corresponding features.

[0075] Step 2.2: The Mel spectrum features and time domain feature information obtained in step 2.1 are fed into the gated network for feature fusion. The core of this is to allow the network to independently determine the contribution of each input feature. The specific steps are as follows:

[0076] Step 2.21, feature extraction: extract the frequency domain features F1 and Mel spectrum features F2 respectively;

[0077] Step 2.22, gating coefficient calculation: The features of each channel are spliced or fused in other forms and input into a gating module, which usually consists of a fully connected layer or a convolutional layer. The gating coefficient g is calculated using the sigmoid activation function:

[0078] g=σ(W·[F1;F2]+b)

[0079] Among them, [F1; F2] represents the concatenation of features, W is the weight matrix, b is the bias term, and σ is the sigmoid function, whose output range is between 0 and 1;

[0080] Step 2.23, feature weighted fusion: Use the calculated gating coefficient to perform weighted fusion on each feature. For example, for two features, the fusion can be performed as follows:

[0081] F fused =g⊙F1+(1-g)⊙F2

[0082] Among them, ⊙ represents the element-by-element multiplication operation, and the gating coefficient g can dynamically adjust the contribution ratio of the two-way features to the final fusion result;

[0083] Step 2.24, Adaptive Update:

[0084] Since the gating coefficients are continuously updated through back propagation during the network training process, the network can adaptively adjust the fusion weights of different features according to the different input data, thereby improving the overall recognition or classification effect.

[0085] Step 3: High-level feature extraction specifically includes:

[0086] Step 3.1. The backbone network is usually composed of multiple convolutional layers, activation functions, and pooling layers stacked together. Each layer performs a nonlinear transformation on the input features, thereby capturing more complex patterns and details in the input data. As the number of network layers increases, the level of feature abstraction continues to increase, enabling the network to extract global semantic information from local details. During the feature extraction process, the backbone network not only gradually compresses the spatial dimensions of the input features (through the pooling layer), but also integrates local information through convolution operations to construct global contextual relationships. At the same time, operations such as batch normalization and residual connections are used to alleviate the gradient vanishing problem in deep network training, and promote efficient information transmission and network convergence, thereby improving the robustness and accuracy of the overall model.

[0087] Step 4: Classification network:

[0088] Step 4.1: Following the backbone network, the classification network primarily maps the high-level features extracted by the backbone network to specific category labels, achieving the final classification decision. The feature map obtained in Step 3.1 is fed into the classification network, which consists of convolutional and fully connected layers. The features output by the backbone network are further processed and nonlinearly transformed. The processed features are normalized using functions such as the softmax activation function, mapped to the probability distribution or score of the target category, and the final classification result is output, enabling the judgment of specific tasks such as leak status.

[0089] The present invention also proposes a gas pipeline leakage detection device based on deep learning, comprising:

[0090] The audio data acquisition and preprocessing module is used to collect audio data from the airway and perform preprocessing on the collected audio data, including noise reduction, pre-emphasis and normalization;

[0091] The frequency domain graph and Mel-spectrogram processing module is used to calculate the corresponding normalized frequency domain graph and Mel-spectrogram based on the pre-processed audio data;

[0092] The pipeline leakage identification model is used to input the frequency domain image and the Mel spectrum image and output a judgment result of whether there is a leak. The pipeline leakage identification model includes:

[0093] There are two feature extraction networks, which input the frequency domain image and the Mel spectrum image respectively, and extract the Mel spectrum features and time domain features respectively;

[0094] Feature fusion module, used to fuse the features extracted by the two basic feature extraction networks;

[0095] The backbone network inputs the information after feature fusion and extracts high-level features;

[0096] The classification network is equipped with a fully connected layer and an activation function, which is used to map the high-level features extracted by the backbone network to the category space. The pipeline leakage identification network is continuously optimized through cross-entropy loss and back propagation, and the final classification of whether the gas pipeline is leaking is output.

[0097] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any form, and any technical solutions obtained by equivalent replacement or equivalent transformation fall within the scope of protection of the present invention.

Claims

1. A deep learning-based air pipeline leakage detection method, characterized in that: Including steps: S1. Collect audio data from the airway and perform preprocessing including noise reduction, pre-emphasis, and normalization on the collected audio data; S2. Calculate the corresponding normalized frequency domain graph and Mel-spectrogram based on the preprocessed audio data; S3. Input the frequency domain image and the Mel-spectrogram image into a pre-built and trained pipeline leakage recognition model, and output a judgment result of whether there is leakage; The pipeline leakage identification model includes: There are two feature extraction networks, which input the frequency domain image and the Mel spectrum image respectively, and extract the Mel spectrum features and time domain features respectively; Feature fusion module, used to fuse the features extracted by the two basic feature extraction networks; The backbone network inputs the information after feature fusion and extracts high-level features; The classification network is equipped with a fully connected layer and an activation function, which is used to map the high-level features extracted by the backbone network to the category space. The pipeline leakage identification network is continuously optimized through cross-entropy loss and back propagation, and the final classification of whether the gas pipeline is leaking is output.

2. The deep learning-based air pipeline leakage detection method according to claim 1, characterized in that: In step S1, audio data of a preset duration is used.

3. The deep learning-based air pipeline leakage detection method according to claim 1, characterized in that: In step S2, the amplitude spectrum of the short-time Fourier transform is used as the frequency domain graph.

4. The deep learning-based air pipeline leakage detection method according to claim 1, characterized in that: In step S3, the feature extraction network includes a 3*3 convolution layer, a BN normalization layer, an activation function LeakReLU layer, a 3*3DS convolution layer, and a 5*5DS convolution layer arranged in sequence.

5. The deep learning-based air pipeline leakage detection method according to claim 1, characterized in that: In step S3, the feature fusion module specifically performs the following steps: Input the frequency domain graph feature F1 and Mel spectrum graph feature F2 extracted by the feature extraction network; Each feature is spliced or fused, input into a gating module, and the gating coefficient g is calculated: g=σ(W·[F1;F2]+b) Among them, [F1; F2] represents the concatenation of features, W is the weight matrix, b is the bias term, and σ is the sigmoid function, whose output range is between 0 and 1; Use the calculated gating coefficient to perform weighted fusion of each feature: F fused =g⊙F1+(1-g)⊙F2 Among them, ⊙ represents the element-by-element multiplication operation, and the gating coefficient g can dynamically adjust the contribution ratio of the two-way features to the final fusion result.

6. The deep learning-based air pipeline leakage detection method according to claim 1, characterized in that: In step S3, the backbone network is composed of a stack of multiple convolutional layers, activation functions and pooling layers, and the classification network is composed of convolutional layers and fully connected layers.

7. A deep learning-based air pipeline leakage detection device, characterized in that: include: The audio data acquisition and preprocessing module is used to collect audio data from the airway and perform preprocessing on the collected audio data, including noise reduction, pre-emphasis and normalization; The frequency domain graph and Mel-spectrogram processing module is used to calculate the corresponding normalized frequency domain graph and Mel-spectrogram based on the pre-processed audio data; The pipeline leakage identification model is used to input the frequency domain image and the Mel spectrum image and output a judgment result of whether there is a leak. The pipeline leakage identification model includes: There are two feature extraction networks, which input the frequency domain image and the Mel spectrum image respectively, and extract the Mel spectrum features and time domain features respectively; Feature fusion module, used to fuse the features extracted by the two basic feature extraction networks; The backbone network inputs the information after feature fusion and extracts high-level features; The classification network is equipped with a fully connected layer and an activation function, which is used to map the high-level features extracted by the backbone network to the category space. The pipeline leakage identification network is continuously optimized through cross-entropy loss and back propagation, and the final classification of whether the gas pipeline is leaking is output.

Citation Information

Cited By

  • Hydrogen-doped natural gas pipeline leakage detection method and system based on multi-task Mamba-CNN

    CN120932683A