Natural gas pipeline leakage detection method based on novel wavelet basis transform and singular value decomposition in two-dimensional convolutional neural network

By employing a novel wavelet basis transform and singular value decomposition method in a two-dimensional convolutional neural network, the challenges of feature extraction under noise interference and small sample conditions in natural gas pipeline leak detection are solved. This method achieves high-precision leak identification and environmental adaptability, making it suitable for monitoring natural gas pipelines under complex operating conditions.

CN121434847APending Publication Date: 2026-01-30XUZHOU NORMAL UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511520608.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-01-30

AI Technical Summary

Technical Problem

Existing natural gas pipeline leak detection methods struggle to effectively extract leak fault features under conditions of strong noise interference and small sample sizes. Furthermore, traditional hybrid time series models lack the ability to identify complex leak patterns and have weak generalization capabilities.

Method used

A novel wavelet basis transform and singular value decomposition method based on two-dimensional convolutional neural networks is adopted. By using custom wavelet basis transform and singular value decomposition, deep time-frequency features that are resistant to noise interference are extracted. The method is also integrated with two-dimensional convolutional neural networks to mine multi-level spatial patterns of signals. Combined with distribution alignment technology, the transfer adaptability of the model under small sample and high noise conditions is improved.

Benefits of technology

It effectively solves the problem of scarce target data and insufficient labels under small sample conditions, improves the accuracy of leak identification and environmental adaptability, reduces industrial deployment costs, and achieves a fault identification accuracy rate of 97.55%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121434847A_ABST
    Figure CN121434847A_ABST
Patent Text Reader

Abstract

The invention discloses a natural gas pipeline leakage detection method based on novel wavelet basis transformation and singular value decomposition in a two-dimensional convolutional neural network. Firstly, a sound signal collected by a sound wave sensor is converted into a digital signal; secondly, in the data preprocessing stage, singular value decomposition is carried out on the digital signals to effectively eliminate background noise interference, and then batch normalization is carried out on the processed data; then, converting the one-dimensional time sequence signal into a two-dimensional time-frequency image by adopting a self-defined Morlet wavelet basis function; and finally, based on the time-frequency images, constructing and training a 2D-CNN model for fault classification, and presenting a diagnosis result through a confusion matrix and a comparison graph. According to the method, 97.55% of fault recognition accuracy is obtained in a public data set, and compared with other competitive methods, the method shows more excellent noise robustness and classification performance, and has higher accuracy and wide application prospects in pipeline leakage diagnosis in a complex noise environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a natural gas pipeline leak detection method based on a novel wavelet basis transform and singular value decomposition in a two-dimensional convolutional neural network. It is used for noise reduction, feature extraction and intelligent identification of acoustic signals of natural gas pipelines under complex operating conditions, and belongs to the field of natural gas pipeline fault diagnosis technology. Background Technology

[0002] As a clean energy source, natural gas has been widely used in various fields. With the continuous expansion of urban gas pipeline networks, operational safety issues have become increasingly prominent. Among these, the challenges posed by natural gas pipeline leaks are particularly severe, not only causing resource waste and environmental pollution but also posing a serious threat to people's lives and property. Therefore, developing efficient and accurate natural gas leak detection technology has significant theoretical and engineering value, and is crucial for ensuring the safe and stable operation of natural gas systems.

[0003] Traditional leak detection methods mainly include negative pressure wave detection, ultrasonic flow meters, fiber optic sensors, and gas concentration detection. While these conventional methods have shown effectiveness in specific scenarios, they generally suffer from drawbacks such as long detection cycles, high costs, susceptibility to environmental interference, and reliance on manual feature extraction. In recent years, with the development of artificial intelligence (AI) technology, data-driven leak detection systems have received widespread attention. Industry experts have developed various AI-based detection methods using signals collected by different sensors. These methods can effectively identify and classify natural gas leak signals under complex operating conditions. Representative methods include convolutional neural networks (CNN), probabilistic neural networks (PNN), and random forests (RF).

[0004] Impulse Noise Network (PNN) methods have been applied to detect natural gas leaks in urban underground spaces. This method achieves a detection accuracy of 92.50% by extracting feature vectors such as methane concentration and temperature. A natural gas leak early warning classification system based on a random forest model demonstrates a classification accuracy of 88.02% in historical leak events, providing strong support for gas companies' rapid decision-making. Recent research shows that converting acoustic emission signals into spectrograms and employing a simple convolutional neural network architecture can achieve high-precision classification for pipeline condition monitoring. The proposed solution achieves an accuracy of 87.30% while maintaining high computational efficiency, surpassing traditional machine learning methods such as support vector machines and random forests, and also outperforming complex deep learning models such as long short-term memory networks and residual networks. This highlights the application potential of lightweight CNN models in the real-time deployment of industrial pipeline monitoring systems.

[0005] Despite significant progress, acoustic signal-driven natural gas leak detection still faces three major challenges: (1) strong high-frequency background noise interference makes it difficult for traditional filtering methods to effectively preserve leak features; (2) the inherent non-stationary nature of leak signals often leads to the weakening or disappearance of features under complex operating conditions; and (3) insufficient sample size limits the training performance of deep learning models and may cause overfitting. Therefore, it is urgent to integrate noise reduction, feature enhancement, and few-sample adaptation techniques to improve the robustness and generalization ability of the model in real-world engineering environments. Summary of the Invention

[0006] To overcome the shortcomings of existing technologies, this invention provides a natural gas pipeline leakage detection method based on a novel wavelet basis transform and singular value decomposition in a two-dimensional convolutional neural network. This method can solve the problems of not being able to effectively extract leakage fault features with high characterization ability under strong noise interference and small sample conditions, as well as the problems of traditional hybrid time series models having insufficient ability to identify complex leakage patterns and weak generalization.

[0007] To address the aforementioned technical problems, this invention provides a method for detecting natural gas pipeline leaks based on novel wavelet basis transform and singular value decomposition (SVD) in a two-dimensional convolutional neural network. This method extracts noise-resistant deep time-frequency features from the pipeline leak signal through a custom wavelet basis function transform and SVD, and integrates a two-dimensional convolutional neural network to mine multi-level spatial patterns of the signal, constructing a feature set with strong representational capabilities for leak diagnosis. A distribution alignment technique based on SVD is employed to minimize inter-domain differences by adjusting the SVD structure of the signal distribution in noisy and ideal scenarios, thereby improving the model's transfer adaptability under small-sample, high-noise conditions. The method includes the following steps:

[0008] 1) Acoustic signals are collected using acoustic sensors and discretized into digital signals.

[0009] 2) In the data preprocessing stage, singular value decomposition (SVD) is used to denoise the discretized digital signal to eliminate noise interference, and then the denoised data is batch normalized.

[0010] 3) Convert the preprocessed digital signal into a time-frequency graph based on a novel wavelet basis transform, and construct training and testing sample sets.

[0011] 4) A two-dimensional convolutional neural network (2D-CNN) is used to train the time-frequency diagram training sample set obtained in step 3) to construct a digital signal classification model.

[0012] 5) Using the classification model trained in step 4), perform classification tests on the time-frequency map test sample set obtained in step 3).

[0013] 6) Input the target feature sample set into the training model, evaluate and visually demonstrate the performance of the classification model through confusion matrix and classification result comparison chart.

[0014] In step 2), the algorithm uses Singular Value Decomposition (SVD) to reconstruct the low-rank observation matrix, demonstrating several innovative strategies. First, during each iteration, the algorithm performs a correction operation on the matrix:

[0015]

[0016] Where D is the observation matrix; S is the sparse matrix; μ is the regularization parameter; Y is the Lagrange multiplier matrix; and M is the intermediate matrix. Perform economic SVD decomposition:

[0017] M=UΣV T

[0018] Where U∈R mxr , Σ∈R rxr , V∈R nxr Furthermore, only the first few principal components are retained to construct the low-rank matrix L. This is achieved by applying a soft threshold to the singular values, i.e., for each singular value σ... i application:

[0019]

[0020] in It is a threshold singular value, σ i Let represent the i-th singular value. Therefore, the updated singular value matrix effectively eliminates smaller noise components, retaining only the main structural information in the data. The final reconstructed low-rank matrix is:

[0021]

[0022] Where L is the reconstructed low-rank matrix. This strategy, based on singular value thresholding (SVT) operations, greatly improves the accuracy and robustness of low-rank recovery. Secondly, the algorithm introduces a rank adaptive selection mechanism to determine whether the following conditions are met:

[0023]

[0024] Here, svp represents the number of singular values ​​to be retained. This algorithm dynamically determines the number of principal components to retain by assessing the number of singular values ​​to be retained. This strategy avoids the drawback of traditional methods that require manually pre-setting the matrix rank, enhancing the algorithm's adaptability to different data scenarios.

[0025] Batch normalization (BN) is a commonly used technique in deep learning to accelerate neural network training, improve model stability, and alleviate the vanishing or exploding gradient problem. In deep neural networks, increasing the number of layers causes the distribution of model parameters to continuously change during training, i.e., internal covariate drift, leading to changes in the input distribution of each layer, slowing down the learning speed, and even making convergence difficult. To fix the input distribution of each layer and make it more stable, so as to accelerate convergence and improve training performance with a larger learning rate, all data must be batch normalized after denoising the digital signal using SVD. For a batch of input data X = {x...} (1) ,x (2) ,...,x (m) The core BN processing flow is as follows:

[0026] (1) Calculate the mean and variance:

[0027]

[0028] Where μ B This represents the average value of the current batch of inputs; The variance of the current batch input is represented by m; m is the number of samples in the batch; x (i) This represents the input value of the i-th sample in a certain feature dimension of this layer; i is the index of the sample in the batch, from 1 to m; B refers to the label of the current batch, used to distinguish different batches in training.

[0029] (2) Normalization process:

[0030]

[0031] in represents the standardized value of the i-th sample; ∈ is a minimal constant introduced to avoid division by zero.

[0032] (3) Scaling and translation (learnable parameters):

[0033]

[0034] γ and β are trainable parameters used to recover the expressive power of the model.

[0035] Batch normalization offers significant advantages in deep neural network training. First, it accelerates model convergence by reducing the variation in input distribution across layers, allowing for higher learning rates and more stable training. Second, it improves training stability and mitigates vanishing or exploding gradients. Furthermore, it has a similar effect to regularization, reducing reliance on methods like Dropout and simplifying model design. Finally, it reduces the model's sensitivity to weight initialization, maintaining good training performance even with suboptimal parameter initialization. In summary, batch normalization improves training efficiency and enhances model robustness and generalization ability.

[0036] In step 3), the custom Morlet wavelet basis function is defined. The expression is:

[0037]

[0038] Where t is the time variable, and σ = 1 / 2πf b It is the standard deviation of the Gaussian window; f c The center frequency; f b Here is the bandwidth parameter. To enhance the response to non-stationary components, a zero-mean correction is introduced and normalized:

[0039]

[0040] in It is a wavelet function that has undergone zero-mean correction; it is the original wavelet. The average value within the defined domain. It is a normalized wavelet function.

[0041] The complex structure of the custom Morlet wavelet consists of a real part and an imaginary part—the real part is the modulated Gaussian function, and the imaginary part constitutes the phase information, exhibiting good symmetry and controllability.

[0042] In step 4), the Convolutional Neural Network (CNN) is a deep learning architecture widely used in image processing, computer vision, and other fields. Its core idea is to simulate the biological visual system, using local receptive fields to identify data features. Typically, a CNN structure includes convolutional layers, activation functions, pooling layers, fully connected layers, and an output layer. Through convolution and pooling operations, the CNN extracts features from the input data layer by layer, ultimately achieving classification or regression analysis through the fully connected layers. It can automatically extract local features from data such as images and performs excellently in tasks such as image recognition. Therefore, this paper focuses on the basic framework of a two-dimensional convolutional neural network and conducts in-depth research on the task of detecting leaks in natural gas pipelines.

[0043] In step 5), a trained two-dimensional convolutional neural network (2D-CNN) is used to train and test the time-frequency graph. The classification performance is visualized through a confusion matrix and a comparison of classification results. This method has been validated on publicly available experimental datasets, achieving a fault identification accuracy of 97.55%. Compared to competing methods, this study demonstrates superior performance and has broad application potential.

[0044] The beneficial effects of this invention are as follows: This invention proposes a natural gas pipeline leak detection method based on novel wavelet basis transform and singular value decomposition in a two-dimensional convolutional neural network. This method introduces cross-domain signal data from noisy and ideal scenarios to assist in the diagnostic task, effectively solving the problems of scarce target data and insufficient labels under small sample conditions. By extracting deep time-frequency features through customized wavelet transform and fusing SVD denoising features with CNN spatial pattern features, a feature set with strong leak discrimination capability is constructed. Using singular value distribution similarity as a transferability criterion, source domains with high matching degrees are selected for transfer, significantly reducing the risk of "negative transfer." By reconstructing the signal distribution structure through SVD decomposition, the inter-domain distribution alignment between noisy and ideal scenarios is achieved, reducing the feature distribution differences under complex noise interference and improving leak identification accuracy. This method can enhance the environmental adaptability of pipeline leak diagnosis under small sample and high-noise conditions, and its computational efficiency is superior to traditional hybrid models, reducing industrial deployment costs. Attached Figure Description

[0045] Figure 1 The accompanying drawings, which are part of the abstract of this invention, illustrate the algorithm flow of the method.

[0046] Figure 2 The original signal sample of this invention

[0047] Figure 3 The sample of this invention after denoising using singular value decomposition technique.

[0048] Figure 4 Four different two-dimensional time-frequency graph conversion techniques of the present invention

[0049] Figure 5 The diagram shows the convolutional neural network model of this invention.

[0050] Figure 6 A comparison chart showing the classification results of the four time-frequency conversion techniques of this invention.

[0051] Figure 7 This is a comparison chart of confusion matrices for different network models of the present invention. Detailed Implementation

[0052] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0053] Example:

[0054] like Figure 1 As shown in the figure, the natural gas pipeline leak detection method based on a novel wavelet basis transform and singular value decomposition in a two-dimensional convolutional neural network in this embodiment includes the following steps:

[0055] 1) Acoustic signals are acquired using acoustic sensors and discretized into digital signals. The original signal samples are as follows: Figure 2 As shown.

[0056] 2) In the data preprocessing stage, Singular Value Decomposition (SVD) is used to denoise the discretized digital signal to eliminate noise interference. Subsequently, batch normalization is performed on the denoised data. The samples after SVD denoising are as follows: Figure 3 As shown.

[0057] Step 2) of the algorithm uses Singular Value Decomposition (SVD) to reconstruct the low-rank observation matrix, demonstrating several innovative strategies. First, during each iteration, the algorithm performs a correction operation on the matrix:

[0058]

[0059] Where D is the observation matrix; S is the sparse matrix; μ is the regularization parameter; Y is the Lagrange multiplier matrix; and M is the intermediate matrix. Perform economic SVD decomposition:

[0060] M=UΣV T

[0061] Where U∈R mxr , Σ∈R rxr , V∈R nxr Furthermore, only the first few principal components are retained to construct the low-rank matrix L. This is achieved by applying a soft threshold to the singular values, i.e., for each singular value σ... i application:

[0062]

[0063] in It is a threshold singular value, σ i Let represent the i-th singular value. Therefore, the updated singular value matrix effectively eliminates smaller noise components, retaining only the main structural information in the data. The final reconstructed low-rank matrix is:

[0064]

[0065] Where L is the reconstructed low-rank matrix. This strategy, based on singular value thresholding (SVT) operations, greatly improves the accuracy and robustness of low-rank recovery. Secondly, the algorithm introduces a rank adaptive selection mechanism to determine whether the following conditions are met:

[0066]

[0067] Here, svp represents the number of singular values ​​to be retained. This algorithm dynamically determines the number of principal components to retain by assessing the number of singular values ​​to be retained. This strategy avoids the drawback of traditional methods that require manually pre-setting the matrix rank, enhancing the algorithm's adaptability to different data scenarios.

[0068] Batch normalization (BN) is a commonly used technique in deep learning to accelerate neural network training, improve model stability, and alleviate the vanishing or exploding gradient problem. In deep neural networks, increasing the number of layers causes the distribution of model parameters to continuously change during training, i.e., internal covariate drift, leading to changes in the input distribution of each layer, slowing down the learning speed, and even making convergence difficult. To fix the input distribution of each layer and make it more stable, so as to accelerate convergence and improve training performance with a larger learning rate, all data must be batch normalized after denoising the digital signal using SVD. For a batch of input data X = {x...} (1) ,x (2) ,...,x (m) The core BN processing flow is as follows:

[0069] (1) Calculate the mean and variance:

[0070]

[0071] Where μ B This represents the average value of the current batch of inputs; The variance of the current batch input is represented by m; m is the number of samples in the batch; x (i) This represents the input value of the i-th sample in a certain feature dimension of this layer; i is the index of the sample in the batch, from 1 to m; B refers to the label of the current batch, used to distinguish different batches in training.

[0072] (2) Normalization process:

[0073]

[0074] in represents the standardized value of the i-th sample; ∈ is a minimal constant introduced to avoid division by zero.

[0075] (3) Scaling and translation (learnable parameters):

[0076]

[0077] γ and β are trainable parameters used to recover the expressive power of the model.

[0078] Batch normalization offers significant advantages in deep neural network training. First, it accelerates model convergence by reducing the variation in input distribution across layers, allowing for higher learning rates and more stable training. Second, it improves training stability and mitigates vanishing or exploding gradients. Furthermore, it has a similar effect to regularization, reducing reliance on methods like Dropout and simplifying model design. Finally, it reduces the model's sensitivity to weight initialization, maintaining good training performance even with suboptimal parameter initialization. In summary, batch normalization improves training efficiency and enhances model robustness and generalization ability.

[0079] 3) The preprocessed digital signal is converted into a time-frequency graph based on a novel wavelet basis transform. Four different two-dimensional time-frequency graph conversion techniques are shown in the diagrams below. Figure 4 As shown, construct the training sample set and the test sample set.

[0080] Step 3) Define the Morlet wavelet basis function The expression is:

[0081]

[0082] Where t is the time variable, and σ = 1 / 2πf b It is the standard deviation of the Gaussian window; f c The center frequency; f b Here is the bandwidth parameter. To enhance the response to non-stationary components, a zero-mean correction is introduced and normalized:

[0083]

[0084] in It is a wavelet function that has undergone zero-mean correction; it is the original wavelet. The average value within the defined domain. It is a normalized wavelet function.

[0085] The complex structure of the custom Morlet wavelet consists of a real part and an imaginary part—the real part is the modulated Gaussian function, and the imaginary part constitutes the phase information, exhibiting good symmetry and controllability.

[0086] 4) A two-dimensional convolutional neural network (2D-CNN) is used to train the time-frequency diagram training sample set obtained in step 3), thereby constructing a digital signal classification model. The convolutional neural network model is as follows: Figure 5 As shown.

[0087] Step 4) describes the Convolutional Neural Network (CNN), a deep learning architecture widely used in image processing, computer vision, and other fields. Its core idea is to simulate the biological visual system, using local receptive fields to identify data features. Typically, a CNN structure includes convolutional layers, activation functions, pooling layers, fully connected layers, and an output layer. Through convolution and pooling operations, the CNN extracts features from the input data layer by layer, ultimately achieving classification or regression analysis through fully connected layers. It can automatically extract local features from data such as images and performs excellently in tasks such as image recognition. Therefore, this paper focuses on the basic framework of a two-dimensional convolutional neural network and conducts in-depth research on the task of detecting leaks in natural gas pipelines.

[0088] Considering the impact of convolutional kernel size on the model's fault diagnosis results, this study uses the accuracy on the test dataset as the evaluation metric. We designed a two-dimensional CNN network model with the same number of convolutional layers but different convolutional kernel sizes. Given that this research task only involves a relatively simple fault classification problem, a shallow network architecture is sufficient to achieve effective feature extraction. Using deeper convolutional layers may lead to overfitting risks, especially when the amount of data is limited. Therefore, a two-layer convolutional structure is perfectly adequate for the purposes of this study. The proposed method employs two sets of convolutional layers with kernel sizes of {(3,3)} and (5,5)}, and compares them with combinations of {(3,3), (3,3)}, {(5,5), (5,5)}, {(7,7), (7,7)}, {(3,3), (7,7)}, and {(5,5), (7,7)}. The fault diagnosis accuracy rates, as shown in Table 1, are 92.16%, 93.63%, 75.49%, 93.63%, 85.78%, and 97.55%, respectively. This model consists of multiple convolutional layers, pooling layers, and fully connected layers, enabling the extraction of multi-level features from the input data to ultimately complete the classification task.

[0089] Table 1 Comparison of Convolution Kernel Sizes

[0090]

[0091] The structural parameters of the designed two-dimensional convolutional neural network (2D-CNN) model are shown in Table 2. This model consists of multiple convolutional layers, pooling layers, and fully connected layers, used to extract multi-level features from the input data and complete the final classification task.

[0092] Table 2. Structural parameters of the 2D Convolutional Neural Network (2D-CNN) model

[0093]

[0094] This network structure maintains low computational complexity while possessing powerful feature extraction and representation capabilities, making it suitable for handling complex image data tasks. The parameter settings for the training process of the two-dimensional convolutional neural network are detailed in Table 3.

[0095] Table 3. Parameters of the 2D Convolutional Neural Network (2D-CNN) model training process

[0096]

[0097] 5) Using the classification model trained in step 4), perform classification tests on the time-frequency map test sample set obtained in step 3).

[0098] In step 5), a pre-trained two-dimensional convolutional neural network (2D-CNN) is used to train and test the time-frequency graph. The classification performance is visualized through a confusion matrix and a comparison of classification results. This method was validated on a publicly available experimental dataset, achieving a fault identification accuracy of 97.55%. Compared to competing methods, this study demonstrates superior performance and has broad application potential.

[0099] 6) Input the target feature sample set into the training model, and evaluate and visually demonstrate the performance of the classification model through confusion matrix and classification result comparison chart. A comparison chart of classification results for four time-frequency conversion techniques is shown below. Figure 6 As shown in the figure, the confusion matrix comparison diagram of different network models is as follows: Figure 7 As shown.

[0100] This study employed a variety of methods for comparison, including no denoising, SGolayFilt denoising, and 2D correlation denoising, to process natural gas pipeline signals (with or without denoising). These signals were then transformed into 2D feature maps using a novel wavelet basis. The generated dataset was fed into a 2D convolutional neural network (2D-CNN) model for training, and the classification performance of the four denoising methods for twelve fault types was compared. Experimental results (as shown in Table 4) demonstrate that the accuracy of robust singular value decomposition denoising (97.55%) is significantly higher than that of no denoising (63.73%), SGolayFilt denoising (66.18%), and 2D correlation denoising (65.20%).

[0101] Table 4 Performance results of different noise reduction methods

[0102]

[0103] This study employs Fourier transform, backpropagation transform, and Gram angle field transform to convert natural gas pipeline signals into two-dimensional time-frequency images. The datasets generated by these methods were used to train a 2D-CNN model, and the classification performance of the four transform techniques was evaluated under twelve fault types. Experimental results (as shown in Table 5) demonstrate that the proposed new wavelet basis transform achieves an accuracy of 97.55%, significantly outperforming Fourier transform (77.94%), backpropagation transform (77.45%), and Gram angle field transform (79.41%). This confirms the robustness of the proposed new wavelet basis transform in natural gas pipeline fault detection.

[0104] Table 5 Performance evaluation of different two-dimensional time-frequency image transformation methods

[0105]

[0106] Singular value decomposition (SVD) combined with a novel wavelet basis transform was used to convert natural gas pipeline signals into two-dimensional feature maps. The generated training dataset was then fed into CNN_SVM, CNN_LSTM, CNN_BiGRU, and 2D-CNN models for training, and the classification performance of these four models for twelve types of faults was compared. Experimental results (as shown in Table 6) indicate that the 2D-CNN model outperforms the CNN_SVM model (87.25%), CNN_LSTM model (82.84%), and CNN_BiGRU model (80.39%) with an accuracy of 97.55%.

[0107] Table 6 Performance of different network models

[0108]

[0109] Experimental analysis shows that algorithm design plays a decisive role in acoustic gas pipeline leak detection. First, in a two-dimensional convolutional neural network architecture, optimizing the kernel size enhances feature extraction capabilities. Combinations of kernels with different scales (such as a combination of small and medium-sized kernels) outperform single-size configurations. Hierarchical kernel size design can capture multi-scale temporal features, while excessively large kernels can lead to information loss in shallow networks. Second, denoising methods affect the robustness of classification models. Denoising techniques based on singular value decomposition (SVD) have significant advantages, separating noise and preserving key features. Effective noise suppression is a prerequisite for reliable leak detection. Third, novel wavelet-based time-frequency representation methods are superior to traditional methods (such as Fourier transform), providing adaptive resolution in the joint time-frequency domain and enhancing leak features. Finally, model architecture comparison shows that two-dimensional convolutional neural networks are superior, achieving clear class distinctions. Temporally dependent models suffer from inter-class confusion; the temporal dependency of this task can be captured through spatial hierarchical structures. In summary, a high-performance gas leak identification framework was constructed by combining singular value decomposition for noise reduction, wavelet time-frequency mapping, and a two-dimensional convolutional neural network with optimized kernel size, achieving excellent results on balanced datasets. Future research should focus on the adaptability and scalability of this method in real-world non-equilibrium scenarios and under changing environmental conditions.

[0110] This invention innovatively employs wavelet basis transform and singular value decomposition (SVD) techniques. First, in the acoustic signal feature extraction stage, the acoustic signals collected by the acoustic sensor are converted into digital signals. Second, in the data preprocessing stage, singular value decomposition is performed on the digital signals to eliminate noise interference, followed by batch normalization of the processed data. Next, a custom Morlet wavelet basis function is used to transform the data into a two-dimensional time-frequency image. Finally, a 2D-CNN model is trained and tested based on the time-frequency image, and the classification results are presented through a confusion matrix and a comparison image.

[0111] In summary, this invention proposes a natural gas pipeline leakage fault diagnosis method based on a two-dimensional convolutional neural network (2D-CNN). By integrating a newly designed wavelet basis transform and singular value decomposition (SVD) technique, it exhibits significant advantages in data preprocessing, feature extraction, and model construction. Compared with traditional Fourier transform, backpropagation transform, and Gram angle field transform methods, this method has superior classification performance; simultaneously, SVD can effectively eliminate noise and enhance the model's fault tolerance under complex background signals. At the model level, 2D-CNN outperforms the hybrid model integrating SVM, long short-term memory networks, and bidirectional gated recurrent units in terms of temporal feature learning and generalization capabilities. Overall, this method constructs a complete diagnostic process from signal denoising and customized transform function design to neural network optimization, demonstrating good practicality and engineering deployability. It is particularly suitable for natural gas pipeline monitoring scenarios with limited sample data and severe noise interference, and has significant practical application value. Furthermore, through systematic comparative experiments, this paper provides a technical path and data support for the integration of signal processing and deep learning models, demonstrating broad potential for widespread application.

[0112] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention also intends to include these modifications and variations.

Claims

1. A natural gas pipeline leakage detection method based on a new wavelet basis transformation and singular value decomposition in a two-dimensional convolutional neural network, characterized in that, Comprising the following steps: 1) Collect acoustic signals with acoustic sensors and discretize them into digital signals. 2) In the data preprocessing stage, singular value decomposition (SVD) is used to denoise the discretized digital signals to eliminate noise interference, and then batch normalization is performed on the denoised data. 3) Convert the preprocessed digital signals into time-frequency graphs based on a new wavelet basis transformation to construct training and test sample sets. 4) Train the time-frequency graph training sample set obtained in step 3) using a two-dimensional convolutional neural network (2D-CNN) to build a digital signal classification model. 5) Use the classification model trained in step 4) to classify the time-frequency graph test sample set obtained in step 3). 6) Input the target feature sample set into the trained model and evaluate and visually display the performance of the classification model through the confusion matrix and classification result comparison chart.

2. The method according to claim 1, wherein the method is characterized by: The algorithm in step 2) uses singular value decomposition (SVD) to reconstruct the low-rank observation matrix, embodying multiple innovative strategies. First, in each iteration process, the algorithm performs a modification operation on the matrix: where D is the observation matrix; S is the sparse matrix; μ is the regularization parameter; Y is the Lagrange multiplier matrix; and M is the intermediate matrix. Perform economic SVD decomposition: M = UΣV T where U ∈ R mxr ,∑ ∈ R rxr , V ∈ R nxr , and only the first few principal components are retained to construct the low-rank matrix L. By soft thresholding the singular values, i.e., applying to each singular value σ i Applications: wherein is a threshold singular value, σ i represents the i-th singular value. Thus the updated singular value matrix can effectively eliminate the smaller noise components and only retain the main structural information in the data. The final reconstructed low-rank matrix is: where L is the reconstructed low-rank matrix. This strategy is based on singular value threshold (SVT) operation, which greatly improves the accuracy and robustness of low-rank recovery. Second, a rank adaptive selection mechanism is introduced in the algorithm to determine whether the following condition is met: where svp is the number of singular values to be retained. This algorithm dynamically determines the number of principal components to be retained by judging the number of singular values to be retained. This strategy avoids the need for manual presetting of matrix rank in traditional methods, enhancing the adaptability of the algorithm in different data scenarios.

3. The method according to claim 1, wherein the method is characterized by: The expression of the custom Morlet wavelet base function in the step 3) is: where t is the time variable, σ = 1 / 2πf b is the standard deviation of the Gaussian window; f c is the center frequency; f b is the bandwidth parameter. To enhance the responsiveness to non-stationary components, a zero-mean correction is introduced and normalized: wherein is the wavelet function after zero mean correction, is the original wavelet is the average value over the domain of definition, is the normalized wavelet function. The complex structure of the custom Morlet wavelet consists of a real part and an imaginary part—the real part is a modulated Gaussian function, and the imaginary part constitutes the phase information, with good symmetry and controllability.

4. The method according to claim 1, wherein the method is characterized by: The convolutional neural network (CNN) in step 4) is a deep learning architecture widely used in image processing, computer vision, and other fields. Its core idea is to simulate the biological visual system to recognize data features with local receptive fields. Typically, a CNN structure contains convolution layers, activation functions, pooling layers, fully connected layers, and output layers. Through convolution and pooling operations, CNN extracts input data features layer by layer, and finally realizes classification or regression analysis through fully connected layers. It can automatically extract local features from images and other data, and performs well in image recognition tasks. Therefore, this paper focuses on the two-dimensional convolutional neural network (2D-CNN) basic framework and conducts in-depth research on natural gas pipeline leakage detection tasks.

5. The method according to claim 1, wherein the method is characterized by: In step 5), the trained two-dimensional convolutional neural network (2D-CNN) is used to train and test the time-frequency graph, and the classification performance is visualized through the confusion matrix and classification result comparison chart. This method is verified on public experimental data sets, with a fault recognition accuracy of 97.55%. Compared with competing methods, this research shows superior performance and has wide application potential.

6. The method according to claim 2, wherein the method is characterized by: Batch Normalization (BN) is a common technique in deep learning, which is used to accelerate the training of neural networks, improve the stability of the model, and alleviate the problem of gradient vanishing or explosion. In deep neural networks, the increase in the number of layers will cause the model parameters to change continuously during training, i.e., internal covariate shift, which will change the input distribution of each layer and slow down the learning speed or even make it difficult to converge. In order to fix the input distribution of each layer and make it more stable, so as to accelerate the convergence with a larger learning rate and improve the training effect, all data after SVD digital signal denoising need to be processed by batch normalization. For a batch of input data X = {x (1) ,x (2) ,...,x (m)}, the core processing flow of BN is as follows: (1) Calculate the mean and variance: where μ B represents the average of the current batch input; represents the variance of the current batch input; m is the number of samples in the batch; x (i) represents the input value of the i-th sample in a certain feature dimension of the layer; i is the index of the sample in the batch, from 1 to m; B refers to the current batch label, used to distinguish different batches in training. (2) Normalization processing: wherein denotes the normalized value of the i-th sample; ∈ is a very small constant introduced to avoid division by zero. (3) Scaling and shifting (learnable parameters): where γ and β are trainable parameters to recover the expressiveness of the model. Batch normalization has significant advantages in deep neural network training. First, it can accelerate model convergence, because normalization reduces the variability of the input distribution of each layer, allowing higher learning rates and stable training. Second, it helps to improve training stability and alleviate the gradient vanishing or exploding phenomenon. In addition, it has a similar regularization effect, reducing the dependence on methods such as Dropout and simplifying model structure design. Finally, it reduces the sensitivity of the model to weight initialization, and can maintain good training performance even when the parameter initialization is not ideal. In summary, batch normalization improves training efficiency, enhances model robustness and generalization ability.

7. The method according to claim 4, wherein the method is characterized by: Considering the influence of the convolution kernel size on the model fault diagnosis results, the accuracy of the test data set was selected as the evaluation index. We designed a two-dimensional CNN network model with the same number of convolution layers but different convolution kernel sizes. Since this study only involves relatively simple fault classification problems, a shallow network architecture is sufficient to achieve effective feature extraction. Using deeper convolution layers may cause overfitting risk, especially when the data volume is limited. Therefore, a two-layer convolution structure is fully sufficient for the purpose of this study. The method proposed in this paper uses two groups of convolution kernel sizes of {(3, 3), (5, 5)} for convolution layers, and compares them with {(3, 3), (3, 3)}, {(5, 5), (5, 5)}, {(7, 7), (7, 7)}, {(3, 3), (7, 7)} and {(5, 5), (7, 7)} combinations, with fault diagnosis accuracy of 92.16%, 93.63%, 75.49%, 93.63%, 85.78% and 97.55%, respectively. The model consists of multiple convolution layers, pooling layers and fully connected layers, which can extract multi-level features from the input data and finally complete the classification task.

8. The method according to claim 5, wherein the method is characterized by: Experimental analysis shows that algorithm design plays a decisive role in the task of acoustic gas pipeline leak detection. Firstly, in the two-dimensional convolutional neural network architecture, optimizing the size of the convolution kernel can enhance the feature extraction ability. Different scale convolution kernel combinations (such as small and medium kernel matching) perform better than single size configuration. Hierarchical kernel size design can capture multi-scale time series features. Too large convolution kernel will cause information loss in shallow network. Secondly, the noise reduction method affects the robustness of the classification model. The noise reduction technology based on singular value decomposition has obvious advantages, which can separate noise and retain key features. Effective noise suppression is the premise of reliable leak discrimination. Thirdly, the time-frequency representation method of new wavelet basis is better than traditional methods (such as Fourier transform), which can provide adaptive resolution in the joint time-frequency domain and enhance the leakage features. Finally, the comparison of model architecture shows that the two-dimensional convolutional neural network is better, which can realize clear class distinction. The model relying on time series has the problem of inter-class confusion. The time series dependence of this task can be captured through spatial hierarchical structure. In summary, combined with singular value decomposition noise reduction, wavelet time-frequency mapping and two-dimensional convolutional neural network with optimized kernel size, a high-performance gas leak identification framework is constructed, which has excellent results on balanced data sets. Future research needs to focus on the adaptability and scalability of this method in real non-balanced scenarios and environmental changes.

Citation Information

Cited By

  • Training-free neural architecture evaluation method based on singular value distribution entropy

    CN122133703A