Improved leak detection method for oil and gas pipeline cyber-physical fusion system based on 1D CNN
By using an improved 1DCNN-TSNE-SVM model, the problems of feature extraction relying on expert experience and insufficient accuracy in traditional pipeline leak detection methods are solved, and high-precision real-time leak detection of oil and gas pipelines is achieved.
Patent Information
- Application Number
- CN202310394623.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-13
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2043-04-13
AI Technical Summary
Existing pipeline leak detection methods require manual extraction of time-frequency domain features using expert experience, which is not accurate enough and results in information loss, making it difficult to achieve real-time, high-precision leak detection.
An improved 1DCNN-TSNE-SVM model is adopted. Pipeline data is obtained through the oil and gas pipeline cyber-physical fusion system. A one-dimensional convolutional neural network is constructed, and a support vector machine with TSNE algorithm for feature dimensionality reduction and particle swarm optimization is used for classification to achieve automatic feature extraction and accurate leak detection.
It improves the accuracy and real-time performance of pipeline leak detection, reduces economic losses, and enables rapid response to pipeline anomalies.
Smart Images

Figure CN116659767B_ABST
Abstract
Description
Technical fields:
[0001] This invention relates to the fields of deep learning and pipeline leak detection technology, specifically to a leak detection method for an oil and gas pipeline cyber-physical fusion system based on 1DCNN-TSNE-SVM. Background technology:
[0002] Oil and gas pipelines are a crucial method for transporting large volumes of oil and gas over long distances, and monitoring technology for their operation is essential for ensuring their safe operation. However, current pipeline monitoring technologies, due to various limitations, cannot effectively provide real-time monitoring for gathering and transmission pipelines. With the deep integration of information technology and industrialization, introducing cyber-physical systems (CPS) into oil and gas pipeline leak detection could not only detect leaks in real time and accurately pinpoint their locations, thus preventing rampant oil theft, industrial material losses, and resource waste, but also safeguard people's lives and property, bringing significant economic and social benefits.
[0003] With the rapid development of deep learning in recent years, some scholars have begun to use deep learning algorithms for pipeline leak detection. Compared with traditional 2DCNN technology, 1DCNN technology learns directly from the original waveform of the signal, without the need to use time-frequency analysis (such as short-time Fourier transform) to convert it into a two-dimensional spectrum, thus avoiding the problem of loss of useful information in the irreversible conversion from 1D to 2D. Summary of the Invention:
[0004] The purpose of this invention is to improve the 1DCNN-based leak detection method for oil and gas pipeline cyber-physical fusion systems. This improved 1DCNN-based leak detection method for oil and gas pipeline cyber-physical fusion systems is used to solve the problems of traditional pipeline leak detection methods that require manual extraction of time and frequency domain features based on expert experience and have insufficient accuracy.
[0005] The technical solution adopted by this invention to solve its technical problem is as follows: This improved 1DCNN-based oil and gas pipeline cyber-physical fusion system leak detection method includes the following steps:
[0006] Step 1: Acquire oil and gas pipeline data through the acoustic sensor in the oil and gas pipeline cyber-physical fusion system and upload it to the cloud of the oil and gas pipeline cyber-physical fusion system. The oil and gas pipeline cyber-physical fusion system uses the acoustic sensor unit in the intelligent perception layer to obtain the acoustic signal parameters of the pipeline operation in real time, and transmits them to the cloud of the oil and gas pipeline cyber-physical fusion system through the signal transmission unit in the information transmission layer for backup, so that they can be called up at any time.
[0007] Step 2: Construct a one-dimensional convolutional neural network (1DCNN) pipeline leak detection model by adjusting the network structure and parameters;
[0008] Step 3: Construct a 1DCNN-TSNE-SVM model, extract features from each layer of the 1DCNN network and fuse the features, reduce the dimensionality of the model using the TSNE algorithm, and use the support vector machine (SVM) classifier optimized by the particle swarm optimization (PSO) algorithm for classification and recognition.
[0009] Step 4: Download various pipeline signals from the cloud of the oil and gas pipeline cyber-physical fusion system to construct training and test samples. Input the training samples into the constructed 1DCNN-TSNE-SVM model for training, and use the test samples to test the model's generalization performance. Monitor pipeline anomalies in real time, and input real-time oil and gas pipeline data into the trained model to quickly detect leaks.
[0010] The 1DCNN pipeline leak detection model network structure in the above scheme includes an input layer, two one-dimensional convolutional layers, two one-dimensional pooling layers, a flattening layer, two fully connected layers, and a Softmax layer. The convolutional layers use one-dimensional convolutional layers for the one-dimensional signal of the pipeline. Through training, a set of optimal convolutional kernels that satisfy the minimum loss function are obtained, and automatic feature extraction is achieved by using the convolutional kernels.
[0011] X = [x1, x2, ..., x s ] T As the input signal, it is passed to the input layer, where X∈R s×d Represented as a time series signal, where T denotes transpose, s is the number of signal groups, and x s Let s be the s-th group of signals in X, and d be the signal length;
[0012] The time series signal is passed through a one-dimensional convolutional layer for one-dimensional convolution operation:
[0013]
[0014] f(x)=max(x,0) (2)
[0015] Where: * represents a one-dimensional convolution operation; Indicates that the convolution kernel W c j The generated j-th feature map, j∈[1,n] c ], n c This indicates the number of convolutional kernels; each kernel corresponds to a feature map, and they are connected in parallel to form a convolutional layer; convolutional kernel It is represented as a weight matrix, where m is the kernel size and b is the bias; f(x) is the activation function used to nonlinearize the data after one-dimensional convolution; ReLU activation function is selected to accelerate model convergence and enhance the sparse representation of the model;
[0016] The pooling layer uses a one-dimensional max pooling layer. The max pooling method extracts the maximum value within a neighboring region, halves the length of the time series signal, extracts the most important features in the convolution result, and also reduces the dimensionality of the output.
[0017]
[0018] In the formula
[0019] The flattening layer concatenates the outputs of the previous pooling layer into a one-dimensional row vector; the fully connected layer is consistent with the traditional neural network structure and consists of multiple hidden layers; the classifier uses the normalized exponential function Softmax classifier, which transforms the input into a probability distribution with a sum of 1 and outputs it to the output layer.
[0020] In the above scheme, feature fusion is performed by extracting the output features of each hidden layer of the 1DCNN network. Specifically, features from the first pooling layer, the flattening layer, and the first fully connected layer are extracted and fused in a concatenated manner. The feature fusion vector F is represented as...
[0021] F = [X] 1 ,X 2 ,X 3 (4)
[0022] Where: X represents the input feature vector of each hidden layer;
[0023] The 1DCNN-TSNE-SVM model uses the TSNE algorithm to reduce the dimensionality of the feature fusion vector F and select the most representative signal features.
[0024] The 1DCNN-TSNE-SVM model uses an SVM classifier optimized by the PSO algorithm to replace the output layer of the CNN to achieve pipeline leak detection. When processing linearly inseparable data, the SVM transforms it from a low-dimensional feature space to a high-dimensional space and constructs an optimal hyperplane through a kernel function to make it linearly separable. The PSO algorithm is used to optimize the parameter combination c and g of the SVM to improve the classification accuracy of the SVM.
[0025] The aforementioned scheme's cyber-physical fusion system for oil and gas pipelines consists of three parts: an intelligent sensing layer, an information transmission layer, and an analysis and application layer. The intelligent sensing layer comprises hardware such as data acquisition nodes, data fusion nodes, and communication modules. The information transmission layer utilizes existing public or private networks to transmit data from the intelligent sensing layer of the oil and gas pipeline network, completing the tasks of pipeline data acquisition and remote data transmission. The analysis and application layer processes data, extracts data features, and identifies operating conditions through algorithms, thereby enabling real-time monitoring of pipeline operating conditions.
[0026] In the above scheme, acoustic signals from natural gas pipelines under normal and leakage conditions are downloaded from the cloud of the oil and gas pipeline cyber-physical fusion system. 1180 sets of each type are collected, for a total of 2360 sets. The number of sampling points for each set is 784. The two types of acoustic signals are divided into training samples and test samples in a 4:1 ratio. The constructed training samples are input into the 1DCNN-TSNE-SVM model for training. The test samples are used to test the recognition accuracy of the 1DCNN-TSNE-SVM model under actual conditions, enabling real-time monitoring of pipeline anomalies. The detection speed and accuracy are tested using real-time transmitted signals.
[0027] Beneficial effects:
[0028] 1. This invention introduces deep learning concepts into pipeline leak detection technology. By using a 1DCNN network, it can adaptively extract pipeline signal features, avoiding the need for manual extraction of time and frequency domain features based on expert experience in traditional pipeline leak detection methods. Secondly, by fusing the outputs of each hidden layer as fusion features, it addresses the problem that when using a 1DCNN model for classification, only the features mapped by the last fully connected layer are fed into the classifier, which can miss some signal features and affect recognition accuracy. Simultaneously, to prevent redundant information in the fused feature vector, which increases computational load and reduces system real-time performance, the TSNE algorithm is used to reduce the dimensionality of the features, selecting the most representative signal features. Finally, these features are input into an SVM, which has better linear classification capabilities and a more reliable output evaluation mechanism than CNN, for classification. This allows for accurate detection of pipeline leaks and timely alarms, reducing economic losses.
[0029] 2. This invention establishes a 1DCNN-TSNE-SVM pipeline leak detection model, which monitors pipeline anomalies in real time, inputs real-time data into the model, and quickly detects leaks, thereby improving the system's detection accuracy and real-time performance. Attached image description:
[0030] Figure 1 A flowchart of the present invention.
[0031] Figure 2 Cyber-physical fusion system for oil and gas pipelines.
[0032] Figure 3 1DCNN model network structure and parameter settings.
[0033] Figure 4 The PSO algorithm optimizes the fitness function iteration curve of the SVM parameter set.
[0034] Figure 5 Test set classification results.
[0035] Figure 6 Test set confusion matrix. Detailed implementation method:
[0036] The present invention will be further described below with reference to the accompanying drawings:
[0037] like Figure 1 As shown, the leakage detection method of the cyber-physical fusion system for oil and gas pipelines based on 1DCNN-TSNE-SVM includes the following steps:
[0038] Step 1: Introduce a cyber-physical system (CPS) into oil and gas pipelines for real-time monitoring and leak detection. Data is acquired by acoustic sensors within the CPS system and simultaneously uploaded to the cloud. The CPS system consists of three parts: an intelligent sensing layer, an information transmission layer, and an analysis and application layer. The intelligent sensing layer comprises data acquisition nodes, data fusion nodes, and communication modules. The information transmission layer utilizes existing public or private networks to transmit data from the intelligent sensing layer, completing data acquisition and remote data transmission tasks. The analysis and application layer processes data using algorithms, extracts data features, and identifies operating conditions, thereby monitoring pipeline operation in real time. The CPS system uses acoustic sensors in the intelligent sensing layer to acquire acoustic signal parameters of pipeline operation in real time. This data is then transmitted to the branch pipeline monitoring room or the cloud-based pipeline control center via signal transmission units in the information transmission layer for backup and easy access. The CPS system is described below. Figure 2 As shown.
[0039] Step 2: Construct a one-dimensional convolutional neural network (1DCNN) pipeline leak detection model by adjusting the network structure and parameters. The 1DCNN pipeline leak detection model adjusts the network structure and parameters based on the impact of recognition accuracy (Acc) and loss value (Loss).
[0040] The 1DCNN pipeline leak detection model network structure includes an input layer, two one-dimensional convolutional layers, two one-dimensional pooling layers, a flattening layer, two fully connected layers, and a Softmax layer. The 1DCNN pipeline leak detection model parameters include the number of convolutional layers, the number and size of convolutional kernels, the number and size of pooling layers, and the number of samples per batch.
[0041] The convolutional layer uses a one-dimensional convolutional layer for the one-dimensional signal of the pipeline. The convolutional layer can be trained to obtain a set of optimal convolutional kernels that satisfy the minimum loss function, and the convolutional kernels are used to achieve automatic feature extraction.
[0042] X = [x1, x2, ..., x s ] T It is passed to the input layer as an input signal. Where X∈R s×d Represented as a time series signal, where T denotes transpose, s is the number of signal groups, and xs Let s be the s-th group of signals in X, and d be the signal length;
[0043] The time series signal is passed through a one-dimensional convolutional layer for one-dimensional convolution operation:
[0044]
[0045] f(x)=max(x,0) (2)
[0046] Where: * represents a one-dimensional convolution operation; Indicates the convolution kernel The generated j-th feature map, j∈[1,n] c ], n c Indicates the number of convolutional kernels (each convolutional kernel corresponds to a feature map, and they are connected in parallel to form a convolutional layer); convolutional kernel It is represented as a weight matrix, where m is the kernel size and b is the bias; f(x) is the activation function used to nonlinearize the data after one-dimensional convolution. The ReLU activation function is chosen to accelerate model convergence and enhance the sparse representation of the model.
[0047] The pooling layer used is a one-dimensional max pooling layer. The max pooling method extracts the maximum value within a neighboring region, halving the length of the time series signal. The pooling layer can extract the most important features from the convolution result and also reduce the dimensionality of the output, as shown in Equation 3:
[0048]
[0049] In the formula
[0050] The flattening layer concatenates the output of the previous pooling layer into a one-dimensional row vector; the fully connected layer is consistent with the traditional neural network structure and consists of multiple hidden layers.
[0051] The classifier uses a normalized exponential function Softmax classifier, which transforms the input into a probability distribution that sums to 1 and outputs it to the output layer.
[0052] Step 3: Construct a 1DCNN-TSNE-SVM model, extract features from each layer of the 1DCNN network and fuse the features, reduce the dimensionality of the model using the TSNE algorithm, and use a support vector machine (SVM) classifier optimized by the particle swarm optimization (PSO) algorithm for classification and recognition.
[0053] Feature fusion is performed by extracting the output features of each hidden layer of the 1DCNN network. Specifically, features from the first pooling layer, the flattening layer, and the first fully connected layer are extracted and fused using a concatenated fusion method. The feature fusion vector F can be expressed as...
[0054] F = [X] 1 ,X 2 ,X 3 (4) Where: X represents the input feature vector of each hidden layer.
[0055] The 1DCNN-TSNE-SVM model reduces the dimensionality of the feature fusion vector F described in step 3 using the TSNE algorithm, selects the most representative signal features, thereby reducing the computational load of the algorithm and improving the real-time detection performance of the oil and gas pipeline cyber-physical fusion system.
[0056] The 1DCNN-TSNE-SVM model uses an SVM classifier optimized by the PSO algorithm to replace the output layer of the CNN for pipeline leak detection. When dealing with linearly inseparable data, the SVM transforms it from a low-dimensional feature space to a high-dimensional one, constructing an optimal hyperplane through a kernel function to make it linearly separable. The PSO algorithm is used to optimize the parameter combinations c and g of the SVM, thereby improving the classification accuracy of the SVM.
[0057] Step 4: Download various pipeline signals from the cloud to construct training and test samples. Input the training samples into the constructed 1DCNN-TSNE-SVM model for training, and use the test samples to test the model's generalization performance. Real-time monitoring of pipeline anomalies is performed by inputting real-time data into the model for rapid leak detection.
[0058] In this embodiment, step 2 designs a 1DCNN pipeline leak detection model based on the one-dimensional characteristics of pipeline signals. The network structure and parameters are adjusted according to the impact of recognition accuracy (Acc) and loss value (Loss). The network structure is designed with 9 layers, and the specific 1DCNN network structure model is as follows: Figure 3 As shown, it includes an input layer, a convolutional layer, a pooling layer, a flattening layer, a fully connected layer, and an output layer. Each convolutional layer is followed by a pooling layer, and a Softmax classifier is connected after the last fully connected layer to output the probability of each working condition predicted by the model.
[0059] In this embodiment, step 3, feature fusion, is performed by extracting the output features of each hidden layer of the 1DCNN network. Features from the first pooling layer, the flattening layer, and the first fully connected layer are extracted and fused using a cascaded fusion method. The fused vector F is then reduced to 20 dimensions using the TSNE algorithm and input into the PSO-optimized SVM classifier for training. The iteration curve of the fitness function of the PSO-optimized SVM parameter set is shown below. Figure 4 As shown.
[0060] This invention constructs a 1DCNN-TSNE-SVM model, extracts features from each layer of the 1DCNN network and performs feature fusion, reduces the dimensionality using the TSNE algorithm, and then uses a Support Vector Machine (SVM) classifier optimized by the Particle Swarm Optimization (PSO) algorithm for classification and recognition. The feature fusion is performed by extracting the output features of each hidden layer of the 1DCNN network, specifically the features of the first pooling layer, the flattening layer, and the first fully connected layer, and then fusing them in a concatenated manner. The 1DCNN-TSNE-SVM model uses the TSNE algorithm to reduce the dimensionality of the feature fusion vector F obtained in step 3, selecting the most representative signal features, thereby reducing the computational load and improving the real-time performance of the oil and gas pipeline cyber-physical fusion system. The 1DCNN-TSNE-SVM model uses a PSO-optimized SVM classifier to replace the output layer of the CNN to achieve pipeline leak detection. When processing linearly inseparable data, the SVM transforms it from a low-dimensional feature space to a high-dimensional space, constructs an optimal hyperplane through a kernel function, and makes it linearly separable. The PSO algorithm is used to optimize the parameter combinations c and g of the SVM, thereby improving the classification accuracy of the SVM.
[0061] Acoustic signals from natural gas pipelines under both normal and leaking operating conditions were downloaded from the cloud-based cyber-physical fusion system for oil and gas pipelines. 1180 sets of signals were collected for each type, totaling 2360 sets. Each set contained 784 sampling points. The collected acoustic signals were divided into training and testing samples at a 4:1 ratio. The training samples were input into a 1DCNN-TSNE-SVM model for training, and the testing samples were used to test the model's recognition accuracy under real-world conditions. The classification results on the test set are as follows: Figure 5 As shown in the image, the confusion matrix is used as a form of accuracy evaluation for classification problems. The classification performance of a model can be evaluated by observing the diagonal of the confusion matrix. Ideally, all data points should be on the diagonal, indicating the highest classification accuracy. The confusion matrix results are shown below. Figure 6 As shown, label 0 represents a normal signal, and label 1 represents a normal signal.
Claims
1. A leak detection method for an improved 1DCNN-based cyber-physical fusion system for oil and gas pipelines, characterized in that... Includes the following steps: Step 1: Acquire oil and gas pipeline data through the acoustic sensor in the oil and gas pipeline cyber-physical fusion system and upload it to the cloud of the oil and gas pipeline cyber-physical fusion system. The oil and gas pipeline cyber-physical fusion system uses the acoustic sensor unit in the intelligent perception layer to obtain the acoustic signal parameters of the pipeline operation in real time, and transmits them to the cloud of the oil and gas pipeline cyber-physical fusion system through the signal transmission unit in the information transmission layer for backup, so that they can be called up at any time. Step 2: Construct a one-dimensional convolutional neural network (1DCNN) pipeline leak detection model by adjusting the network structure and parameters; Step 3: Construct a 1DCNN-TSNE-SVM model, extract features from each layer of the 1DCNN network and fuse the features, reduce the dimensionality of the model using the TSNE algorithm, and use the support vector machine (SVM) classifier optimized by the particle swarm optimization (PSO) algorithm for classification and recognition. Feature fusion is performed by extracting the output features of each hidden layer of the 1DCNN network. The features of the first pooling layer, the flattening layer, and the first fully connected layer are extracted and fused in a series manner. Step 4: Download various pipeline signals from the cloud of the oil and gas pipeline cyber-physical fusion system to construct training and test samples. Input the training samples into the constructed 1DCNN-TSNE-SVM model for training, and use the test samples to test the model's generalization performance. Monitor pipeline anomalies in real time, and input real-time oil and gas pipeline data into the trained model to quickly detect leaks.
2. The improved 1DCNN-based leak detection method for oil and gas pipeline cyber-physical fusion systems according to claim 1, characterized in that: The 1DCNN pipeline leak detection model network structure includes an input layer, two one-dimensional convolutional layers, two one-dimensional pooling layers, a flattening layer, two fully connected layers, and a Softmax layer. The convolutional layers use one-dimensional convolutional layers for the one-dimensional signal of the pipeline. Through training, a set of optimal convolutional kernels that satisfy the minimum loss function are obtained, and automatic feature extraction is achieved by using the convolutional kernels. X = [x1, x2, ..., x s ] T As the input signal, it is passed to the input layer, where X∈R s×d Represented as a time series signal, where T denotes transpose, s is the number of signal groups, and x s Let s be the s-th group of signals in X, and d be the signal length; The time series signal is passed through a one-dimensional convolutional layer for one-dimensional convolution operation: f(x)=max(x,0) (2) Where: * represents a one-dimensional convolution operation; Indicates the convolution kernel The generated j-th feature map, j∈[1,n] c ], n c This indicates the number of convolutional kernels; each kernel corresponds to a feature map, and they are connected in parallel to form a convolutional layer; convolutional kernel It is represented as a weight matrix, where m is the kernel size and b is the bias; f(x) is the activation function used to nonlinearize the data after one-dimensional convolution; ReLU activation function is selected to accelerate model convergence and enhance the sparse representation of the model; The pooling layer uses a one-dimensional max pooling layer. The max pooling method extracts the maximum value within a neighboring region, halves the length of the time series signal, extracts the most important features in the convolution result, and also reduces the dimensionality of the output. In the formula The flattening layer concatenates the outputs of the previous pooling layer into a one-dimensional row vector; the fully connected layer is consistent with the traditional neural network structure and consists of multiple hidden layers; the classifier uses the normalized exponential function Softmax classifier, which transforms the input into a probability distribution with a sum of 1 and outputs it to the output layer.
3. The improved 1DCNN-based leak detection method for oil and gas pipeline cyber-physical fusion systems according to claim 2, characterized in that: Feature fusion Vector F is represented as F=[X 1 ,X 2 ,X 3 ] (4) Where: X represents the input feature vector of each hidden layer; The 1DCNN-TSNE-SVM model uses the TSNE algorithm to reduce the dimensionality of the feature fusion vector F and select the most representative signal features. The 1DCNN-TSNE-SVM model uses an SVM classifier optimized by the PSO algorithm to replace the output layer of the CNN to achieve pipeline leak detection. When processing linearly inseparable data, the SVM transforms it from a low-dimensional feature space to a high-dimensional space and constructs an optimal hyperplane through a kernel function to make it linearly separable. The PSO algorithm is used to optimize the parameter combination c and g of the SVM to improve the classification accuracy of the SVM.
4. The improved 1DCNN-based leak detection method for oil and gas pipeline cyber-physical fusion systems according to claim 3, characterized in that: The oil and gas pipeline cyber-physical fusion system consists of three parts: an intelligent sensing layer, an information transmission layer, and an analysis and application layer. The intelligent sensing layer comprises data acquisition nodes, data fusion nodes, and communication module hardware. The information transmission layer utilizes existing public or private networks to transmit data from the intelligent sensing layer of the oil and gas pipeline network, completing the tasks of pipeline data acquisition and remote data transmission. The analysis and application layer processes data, extracts data features, and identifies operating conditions through algorithms, thereby monitoring the pipeline's operating conditions in real time.
5. The improved 1DCNN-based leak detection method for oil and gas pipeline cyber-physical fusion systems according to claim 4, characterized in that: Acoustic signals from natural gas pipelines under both normal and leaking conditions were downloaded from the cloud of the oil and gas pipeline cyber-physical fusion system. 1180 sets of signals were collected for each type, totaling 2360 sets. The number of sampling points for each set was 784. The collected acoustic signals of the two types were divided into training samples and test samples at a ratio of 4:
1. The constructed training samples were input into the 1DCNN-TSNE-SVM model for training. The test samples were used to test the recognition accuracy of the 1DCNN-TSNE-SVM model under actual conditions. Real-time monitoring of pipeline anomalies was carried out, and the detection speed and accuracy were tested using real-time transmitted signals.
Citation Information
Patent Citations
Oil and gas pipeline leakage wave identification and monitoring system
WO2025223140A1