Detection Method and Device for Leakage of Oil and Gas Branch Pipelines

By collecting and reducing acoustic emission and pressure signals at both ends of oil and gas pipelines, combined with the pipeline leakage classification model with the cross attention mechanism, the problem of poor accuracy of branch pipeline leakage detection is solved, and more efficient detection results are achieved.

CN117053124BActive Publication Date: 2025-08-05LIAONING UNIVERSITY OF PETROLEUM AND CHEMICAL TECHNOLOGY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311251985.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-26
Publication Date
2025-08-05
Estimated Expiration
2043-09-26

AI Technical Summary

Technical Problem

The prior art has poor accuracy in branch pipeline leakage detection, especially the failure to effectively consider the complex environment of branch pipelines, resulting in insufficient accuracy in detection.

Method used

Acoustic emission signals and pressure signals at both ends of the oil and gas pipeline are collected, noise reduction is reduced through modal decomposition, and characteristic information is fused using a pipeline leakage classification model based on the cross attention mechanism, and classified detection is performed with the cross fusion coding layer.

Benefits of technology

Improve the accuracy of branch pipeline leakage detection and realize effective detection of branch pipeline leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117053124B_ABST
    Figure CN117053124B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for detecting leakage of a branch pipeline, relating to a detection technology field, and mainly aiming to solve the problem of poor detection accuracy of existing branch pipeline leakage. The method includes: collecting acoustic emission signals and pressure signals at both ends of an oil and gas pipeline, where there is at least one branch pipeline between the two ends of the oil and gas pipeline; performing short-time frame time sequence alignment on the acoustic emission signals and the pressure signals at a preset time interval to obtain a sound pressure time sequence signal; classifying and detecting the sound pressure time sequence signal based on a pipeline leakage classification model that has completed model training, and the pipeline leakage classification model includes an encoding layer for fusing feature information based on a cross-attention mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of detection technologies, and particularly to a method and device for detecting leaks in branch pipelines. Background Art

[0002] Pipeline transportation is widely used in oil and gas transportation due to its characteristics of safety, reliability, economy and practicality. Among them, due to the complex on-site environment of pipelines and the more common pipelines with branches, the detection of leaks in branch pipelines has always been a research hotspot.

[0003] Currently, the existing detection of leaks in oil and gas branch pipelines usually collects a single signal and combines model algorithms such as neural networks and deep learning for classification and prediction. However, due to the complexity and diversity of the pipeline site, it is difficult to ensure the integrity of the extracted leak signals by using only one signal, and there is a commonality that only the straight pipe section is considered and the situation of leaks in branch pipelines is not considered. Therefore, there is an urgent need for a method for detecting leaks in branch pipelines to solve the above problems. Summary of the Invention

[0004] In view of this, the present invention provides a method and device for detecting leaks in branch pipelines, mainly aiming to solve the problem of poor accuracy in detecting leaks in existing branch pipelines.

[0005] According to one aspect of the present invention, a method for detecting leaks in branch pipelines is provided, including:

[0006] Collecting acoustic emission signals and pressure signals at both ends of an oil and gas pipeline, where there is at least one branch pipeline between the two ends of the oil and gas pipeline;

[0007] Performing modal decomposition on the acoustic emission signal and the pressure signal to obtain the denoised acoustic emission signal and pressure signal;

[0008] Performing classification detection on the acoustic emission signal and the pressure signal based on a pipeline leak classification model that has completed model training, and obtaining a pipeline detection result. The pipeline leak classification model includes an encoding layer that performs feature information fusion based on a cross-attention mechanism.

[0009] Further, before collecting the acoustic emission signals and pressure signals at both ends of the oil and gas pipeline, the method further includes:

[0010] Obtaining a pipeline leak sample data set, and constructing an initial pipeline leak classification model based on an encoder. The encoder includes a position encoding layer carrying pressure class tokens and sound class tokens, a cross-fusion encoding layer, and a fusion decision layer;

[0011] Training the initial pipeline leakage classification model based on the pipeline leakage sample data set to obtain a pipeline leakage classification model.

[0012] Further, the training of the initial pipeline leakage classification model based on the pipeline leakage sample data set to obtain a pipeline leakage classification model includes:

[0013] Based on the denoised sound time series signal and pressure time series signal in the pipeline leakage sample data set, after extracting local features through the fully connected layer in the initial pipeline leakage classification model, adding pressure class tokens and sound class tokens, and performing position encoding on the local features in the position encoding layer, a pressure packet token sequence and a sound packet token sequence are obtained;

[0014] Obtaining sound time series features based on the sound encoder in the cross-fusion encoding layer, and obtaining pressure time series features based on the pressure encoder in the cross-fusion encoding layer;

[0015] Exchanging the features of the pressure packet token sequence and the sound time series features, and performing feature interaction and fusion through the cross-attention mechanism to obtain the fused sound features;

[0016] Exchanging the features of the sound packet token sequence and the pressure time series features, and performing feature interaction and fusion through the cross-attention mechanism to obtain the fused pressure features;

[0017] In the fusion decision layer, performing fusion conversion of the leakage category probabilities for the pressure features and the sound features, and when the probability category matches the model training requirements, determining that the model training of the pipeline leakage classification model is completed.

[0018] Further, the modal decomposition of the acoustic emission signal and the pressure signal to obtain the denoised acoustic emission signal and pressure signal includes:

[0019] Performing complementary ensemble empirical modal decomposition on the acoustic emission signal and the pressure signal to obtain acoustic components and pressure components, and determining highly correlated components based on the acoustic components and the pressure components;

[0020] Selecting the acoustic components and pressure components that match the classification type, and performing filtering and noise reduction on the acoustic components and the pressure components to obtain the denoised acoustic components and the pressure components;

[0021] Performing signal reconstruction on the highly correlated components and the denoised acoustic components and pressure components to obtain the denoised acoustic emission signal and the pressure signal.

[0022] Further, after the pipeline leakage classification model based on the completed model training classifies and detects the acoustic emission signal and the pressure signal to obtain a pipeline detection result, the method further includes:

[0023] If the pipeline detection result is pipeline leakage, determine the attenuation trends of the acoustic emission signal and the pressure signal, and determine the leakage location interval corresponding to the attenuation trends according to the branch pipeline distribution mapping relationship.

[0024] According to another aspect of the present invention, there is provided a detection device for branch pipeline leakage, including:

[0025] An acquisition module for acquiring acoustic emission signals and pressure signals at both ends of an oil and gas pipeline, where there is at least one branch pipeline between both ends of the oil and gas pipeline;

[0026] A noise reduction module for performing modal decomposition on the acoustic emission signal and the pressure signal to obtain the noise-reduced acoustic emission signal and pressure signal;

[0027] A detection module for classifying and detecting the acoustic emission signal and the pressure signal based on a pipeline leakage classification model with completed model training to obtain a pipeline detection result, where the pipeline leakage classification model includes an encoding layer for feature information fusion based on a cross-attention mechanism.

[0028] Further, the device further includes:

[0029] An acquisition module for acquiring a pipeline leakage sample data set and constructing an initial pipeline leakage classification model based on an encoder, where the encoder includes a position encoding layer carrying pressure class tokens and sound class tokens, a cross-fusion encoding layer, and a fusion decision layer;

[0030] A training module for training the initial pipeline leakage classification model based on the pipeline leakage sample data set to obtain a pipeline leakage classification model.

[0031] Further, the training module is specifically configured to extract local features from the denoised sound time series signal and pressure time series signal in the pipeline leakage sample dataset through the fully connected layer in the initial pipeline leakage classification model, then add pressure class tokens and sound class tokens, and perform position encoding on the local features in the position encoding layer to obtain a pressure packet token sequence and a sound packet token sequence; obtain sound time series features through the sound encoder in the cross-fusion encoding layer, and obtain pressure time series features through the pressure encoder in the cross-fusion encoding layer; exchange features between the pressure packet token sequence and the sound time series features, and perform feature interaction and fusion through the cross-attention mechanism to obtain fused sound features; exchange features between the sound packet token sequence and the pressure time series features, and perform feature interaction and fusion through the cross-attention mechanism to obtain fused pressure features; perform fusion conversion of leakage category probabilities on the pressure features and the sound features in the fusion decision layer, and when the probability category matches the model training requirements, determine that the model training of the pipeline leakage classification model is completed.

[0032] Further, the noise reduction module is specifically configured to perform complementary ensemble empirical mode decomposition on the acoustic emission signal and the pressure signal to obtain acoustic components and pressure components, and determine highly correlated components based on the acoustic components and the pressure components; screen the acoustic components and pressure components that match the classification type, and perform filtering and noise reduction on the acoustic components and the pressure components to obtain the denoised acoustic components and pressure components; perform signal reconstruction on the highly correlated components and the denoised acoustic components and pressure components to obtain the denoised acoustic emission signal and pressure signal.

[0033] Further, the device further includes:

[0034] A determination module, configured to determine the attenuation trends of the acoustic emission signal and the pressure signal if the pipeline detection result is pipeline leakage, and determine the leakage location interval corresponding to the attenuation trends according to the branch pipeline distribution mapping relationship.

[0035] According to another aspect of the present invention, there is provided a storage medium storing at least one executable instruction, and the executable instruction causes a processor to perform operations corresponding to the above-mentioned method for detecting leakage in branch pipelines.

[0036] According to still another aspect of the present invention, there is provided a terminal including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface complete communication with each other through the communication bus;

[0037] The memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform operations corresponding to the above-mentioned method for detecting branch pipeline leakage.

[0038] By means of the above technical solution, the technical solution provided by the embodiment of the present invention has at least the following advantages:

[0039] The present invention provides a method and device for detecting branch pipeline leakage. Compared with the prior art, in the embodiment of the present invention, acoustic emission signals and pressure signals located at both ends of an oil and gas pipeline are collected, and there is at least one branch pipeline between the two ends of the oil and gas pipeline; short-time frame time series alignment is performed on the acoustic emission signals and the pressure signals at a preset time interval to obtain acoustic pressure time series signals; the acoustic pressure time series signals are classified and detected based on a pipeline leakage classification model that has completed model training, and the pipeline leakage classification model includes an encoding layer for feature information fusion based on a cross-attention mechanism, which greatly improves the inspection accuracy of branch pipeline leakage and realizes effective detection of branch pipeline leakage.

[0040] The above description is only an overview of the technical solution of the present invention. In order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable, the following specifically describes the embodiments of the present invention. Description of the Drawings

[0041] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present invention. And throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:

[0042] Figure 1 A flowchart of a method for detecting branch pipeline leakage provided by an embodiment of the present invention is shown;

[0043] Figure 2 A schematic diagram of a branch pipeline structure provided by an embodiment of the present invention is shown;

[0044] Figure 3 A schematic diagram of an overall model of acoustic-pressure signal fusion Transformer provided by an embodiment of the present invention is shown;

[0045] Figure 4 A schematic diagram of a Transformer encoder structure provided by an embodiment of the present invention is shown;

[0046] Figure 5 A schematic diagram of a self-attention mechanism provided by an embodiment of the present invention is shown;

[0047] Figure 6 Shows a CEEMD–LMS noise reduction flow chart provided by an embodiment of the present invention;

[0048] Figure 7 Shows a flat layout diagram of a branch pipeline provided by an embodiment of the present invention;

[0049] Figure 8 Shows a block diagram of the composition of a detection device for leakage of a branch pipeline provided by an embodiment of the present invention;

[0050] Figure 9 Shows a schematic structural diagram of a terminal provided by an embodiment of the present invention. Specific embodiments

[0051] Hereinafter, exemplary embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.

[0052] An embodiment of the present invention provides a method for detecting leakage of a branch pipeline, as Figure 1 shown, the method includes:

[0053] 101. Collect acoustic emission signals and pressure signals at both ends of the oil and gas pipeline.

[0054] In an embodiment of the present invention, the current execution end is a cloud server or a terminal server that performs pipeline leakage detection. Specifically, there is at least one branch pipeline between both ends of the oil and gas pipeline. As Figure 2 shown, when a branch pipeline leaks, due to the deformation of the pipeline, acoustic emission signals will be generated. At the same time, under the action of pressure, gas is discharged outward through the aperture at the leakage point, generating a negative pressure wave. Therefore, two acoustic emission sensors and two pressure sensors are respectively installed at the head and end of the pipeline by the current execution end to detect the acoustic emission signals and negative pressure wave signals generated by pipeline leakage.

[0055] 102. Perform modal decomposition on the acoustic emission signals and the pressure signals to obtain the noise-reduced acoustic emission signals and the pressure signals.

[0056] In the embodiments of the present invention, in order to avoid a large number of distorted signals and useless signals in the acoustic emission signals and pressure signals, the current execution end performs noise reduction on the signals by means of modal decomposition. Among them, the CEEMD modal decomposition method can be adopted. That is, CEEMD is a decomposition method further optimized from the EEMD decomposition. It mainly optimizes the residual noise of the EEMD decomposition. The main principle is to add a pair of positive and negative white noises that are opposite to each other as auxiliary noises to the source signal to eliminate the redundant auxiliary white noise remaining in the reconstructed signal after the original EEMD method decomposition, and at the same time reduce the number of iterations required for decomposition and lower the calculation cost.

[0057] 103. Classify and detect the acoustic emission signal and the pressure signal based on the pipeline leakage classification model that has completed model training to obtain a pipeline detection result.

[0058] In the embodiments of the present invention, after obtaining the acoustic emission signal and the pressure signal, classify the sound time series signal and the pressure time series signal based on the pipeline leakage classification model that has completed model training to obtain a pipeline detection result. Among them, the pipeline leakage classification model includes an encoding layer that performs feature information fusion based on a cross-attention mechanism. At this time, the encoding layer as an encoder carries a position encoding layer for pressure class tokens and sound class tokens, as well as a cross-fusion encoding layer and a fusion decision layer, so as to classify and detect the pressure signal and the acoustic emission signal to obtain a pipeline detection result, such as leakage or non-leakage.

[0059] In another embodiment of the present invention, for further limitation and explanation, before the step of collecting the acoustic emission signal and the pressure signal at both ends of the oil and gas pipeline, the method further includes:

[0060] Obtain a pipeline leakage sample data set and construct an initial pipeline leakage classification model based on an encoder;

[0061] Perform model training on the initial pipeline leakage classification model based on the pipeline leakage sample data set to obtain a pipeline leakage classification model.

[0062] In order to perform classification detection based on the pipeline leakage classification model, the current execution end first obtains a pipeline leakage sample data set and constructs an initial pipeline leakage classification model based on an encoder. Among them, the encoder includes a position encoding layer for pressure class tokens and sound class tokens, as well as a cross-fusion encoding layer and a fusion decision layer, as Figure 3 shown. That is, by inputting the acoustic emission signal and the pressure signal that have been noise-reduced by CEEMD-LMS collected in the same period and outputting different leakage types, leakage detection of pipeline sound-pressure signal fusion can be realized. Among them, the pipeline leakage sample data set carries acoustic emission signal samples and pressure signal samples with marked different leakage results and after noise reduction. The embodiments of the present invention do not make specific limitations.

[0063] It should be noted that the initially constructed pipeline leakage classification model is a Transformer encoder. As Figure 4 shown, it is mainly divided into three parts: (1) Positional encoding. Since the self-attention mechanism does not consider the positional relationship of elements in the time series, positional encoding needs to be performed on the input sequence X to add positional information, that is, P E (X) = X + Z; where: Z represents the positional matrix updated during the model training process. (2) Residual connection. In Transformer, a residual connection module is used to strengthen the information flow, improve the model performance, and optimize the training process in combination with layer normalization operations. R C = L N [X + S A (X)]; where, R C is the residual connection operation, and L N is the layer normalization operation. (3) Feed-forward network. The feed-forward network in Transformer consists of two linear transformation layers and one non-linear activation layer. N FFN (X) = W2·f(W1 + X); where: N FFN (X) is the feed-forward network, W1 and W2 are the parameters of the two linear layers, and f(W1 + X) is the non-linear activation function. Additionally,

[0064] In another embodiment of the present invention, for further limitation and illustration, the steps of training the initial pipeline leakage classification model based on the pipeline leakage sample dataset to obtain a pipeline leakage classification model include:

[0065] Based on the denoised sound time series signal and pressure time series signal in the pipeline leakage sample dataset, after extracting local features through the fully connected layer in the initial pipeline leakage classification model, pressure class tokens and sound class tokens are added, and positional encoding is performed on the local features in the positional encoding layer to obtain a pressure packet token sequence and a sound packet token sequence;

[0066] Based on the sound encoder in the cross-fusion encoding layer, obtain sound time series features, and based on the pressure encoder in the cross-fusion encoding layer, obtain pressure time series features;

[0067] Exchange the features of the pressure packet token sequence and the sound time series features, and perform feature interaction and fusion through the cross-attention mechanism to obtain the fused sound features;

[0068] Exchange the features of the sound packet token sequence and the pressure time series features, and perform feature interaction and fusion through the cross-attention mechanism to obtain the fused pressure features;

[0069] At the fusion decision layer, the pressure feature and the sound feature are fused and transformed into leakage category probabilities, and when the training requirements of the probability category matching model are obtained, it is determined that the model training of the pipeline leakage classification model is completed.

[0070] To improve the classification and detection accuracy of the leakage detection model, the current execution end samples the generation method of short-time tokens during training to encode the signal at the position encoding layer. Specifically, the current execution end uses the short-time Fourier transform to analyze the original time-domain signal (the denoised sound time-series signal and pressure time-series signal in the pipeline leakage sample dataset), that is, the time-domain signal is framed and then the fast Fourier transform is performed, and at the same time, it is analyzed from two dimensions of time and short-time local frequency. In a specific implementation scenario, the length of a single sampling acquisition is L s of the sound signal with a length of L v of the pressure signal V ∈ R Lv×1 , (S is the sound signal and V is the pressure signal, V1 is the local feature of the first-frame pressure signal, S1 is the local feature of the first-frame sound signal, ds is the output dimension of this fully connected layer, and n represents the number of segments). Taking the pressure signal as an example for illustration, first, V is equally divided into n small segments with a length of l v to obtain the framed signal The framed signal passes through a fully connected layer to extract the local feature of each frame Furthermore, at the first element of V 1 a pressure category token is inserted At this time The role of the pressure category token is to store the leakage category information in the current sequence and is randomly initialized before training. Finally, according to the formula P E (X) = X + Z, V 1 is position-encoded. The position-encoded V 1 is called the pressure packet token sequence, which includes 1 pressure category token and n pressure short-time tokens Similarly, there is a sound packet token sequence S 1 , which includes 1 sound category token and n sound short-time tokens After the above method, the number of frames of S 1 and V 1 is the same and they correspond one by one, thus achieving the time alignment of the acoustic emission signal and the pressure signal with different sampling rates.

[0071] In addition, for the feature fusion in the cross-fusion coding layer, in order to achieve the fusion of acoustic emission signals and pressure signals at the feature level, the current execution end fuses the feature extraction processes of the two through the designed acoustic-pressure cross-fusion Transformer module. In a specific implementation scenario, the acoustic time-series features S of the sound Transformer encoder S with M layers in series 1 are obtained 2 , and the pressure time-series features V of the pressure Transformer encoder V with N layers in series 1 are obtained 2 . S 2 and V 2 respectively contain new class tokens and . The class tokens in the acoustic time-series features and the pressure time-series features are exchanged, and the two features are interactively fused at the feature level through the cross-attention mechanism with L layers in series respectively. Finally, the cross-fusion Transformer encoder composed of two basic M-layer and N-layer Transformer encoders and L layers of series-connected cross-attention modules can be connected in series K times to obtain a deeper network structure.

[0072] It should be noted that the class tokens added to the initial pipeline leakage classification model are initially composed of randomly initialized parameters and do not contain any information about leakage detection. As the acoustic-pressure data flows through the network, due to the characteristics of the self-attention mechanism, during the feature extraction process, information about the leakage type is added to the class tokens by calculating the correlation scores with each short-term token of the current input. Therefore, in the detection stage, only the information of the acoustic-pressure class tokens is used for fusion decision-making to reduce the information redundancy brought by using the entire packet token sequence for detection. Among them, the acoustic class tokens and the detection class tokens output by the cross-fusion Transformer encoder are input into their respective multi-layer perceptron heads (MLPHeader). For example, when the cross-fusion Transformer encoder has only 1 layer, the output is and Then In the formula, and are two linear transformations, ξ v and ξ s are the output logic values corresponding to whether it is a leakage result, and n c is the number of leakage types. ξ v and ξ s are fused and converted into the probabilities corresponding to n c leakage categories, that is Among them, is the element-wise addition.

[0073] It should be noted that the attention mechanism adopted in the embodiments of the present invention can be regarded as a non-local filtering operation. By estimating the attention scores at all positions and collecting the corresponding inputs according to the scores, the response of each position in the sequence is calculated. As Figure 5 shown, for the input X = [x 1, x2, …, x n ∈ R n×d , the final output sequence is Y = [y1, y2, …, y n ∈ R n×d , and its calculation process is as follows: In the formula: R is a matrix composed of n × d, n is the sequence length, d is the number of dimensions, Q, K, and V are three intermediate matrices, and the three matrices belong to the same sequence W q , W k , W v are three different linear transformation matrices, S A (Q, K, V) is a self-attention calculation function; A is a self-attention matrix, and each element in it represents the attention score between every two elements in X.

[0074] In another embodiment of the present invention, for further limitation and explanation, the step of performing modal decomposition on the acoustic emission signal and the pressure signal to obtain the noise-reduced acoustic emission signal and pressure signal includes:

[0075] Performing complementary ensemble empirical mode decomposition on the acoustic emission signal and the pressure signal to obtain acoustic components and pressure components, and determining highly correlated components based on the acoustic components and the pressure components;

[0076] Screening the acoustic components and pressure components that match the classification type, and performing filter noise reduction on the acoustic components and the pressure components to obtain the noise-reduced acoustic components and the pressure components;

[0077] Performing signal reconstruction on the highly correlated components, the noise-reduced acoustic components and the pressure components to obtain the noise-reduced acoustic emission signal and the pressure signal.

[0078] In order to perform noise reduction on the signal and thus improve the accuracy of pipeline leakage detection, the current execution end first adopts CEEMD decomposition and combines it with LMS noise reduction. Specifically, the specific steps of CEEMD decomposition are: (1) setting the number of times of processing the original signal; (2) adding a group of noise signals with opposite signs to the original signal, and adding the same amplitude each time; In the formula: x(t) represents the original signal, and represent positive and negative noises. (3) For and Perform EMD decomposition to obtain two groups of decomposed IMF components (IMF+ and IMF-), and then calculate the mean of each group of IMF components to obtain the corresponding mean IMF components. The calculation formula is as follows: In the formula: δ IMF1 and δ IMF2 are the means of δ IMF+ and δ IMF- respectively, and N represents the decomposition level. The final decomposition result is the integrated average of four groups of mean IMF components, and steps (2) and (3) are continuously repeated until the final residual component is a monotonic function or a constant, at which point the iteration stops. Specifically, as Figure 6 shown, the steps of combining CEEMD-LMS noise reduction are as follows: Step 1: Perform CEEMD decomposition on the noisy signal to obtain a group of IMF components; Step 2: Calculate the correlation coefficients of the IMF components to determine the high-correlation components and low-correlation components; Step 3: Use the SE-Hurst index to evaluate the low-correlation components and screen out two types of IMF components; Step 4: Perform LMS filtering on the noisy components to obtain the denoised components; Step 5: Reconstruct the high-correlation components and the denoised components to obtain a pure signal.

[0079] In another embodiment of the present invention, for further limitation and explanation, after the step of classifying and detecting the acoustic pressure time series signal based on the pipeline leakage classification model that has completed model training to obtain the pipeline detection result, the method further includes:

[0080] If the pipeline detection result is pipeline leakage, determine the attenuation trends of the acoustic emission signal and the pressure signal, and determine the leakage location interval corresponding to the attenuation trend according to the branch pipeline distribution mapping relationship.

[0081] To improve the accuracy of detecting branch pipelines, when the current execution end determines that the pipeline detection result is pipeline leakage to ensure detection accuracy, determine the attenuation trends of the acoustic emission signal and the pressure signal. At this time, the attenuation trend is the attenuation situation of the sound and pressure after the liquid in the pipeline leaks. Therefore, the attenuation trends of the acoustic emission signal and the pressure signal can be determined according to the changes in the signals. After determining the attenuation trend, determine the leakage location interval corresponding to this attenuation trend according to the branch pipeline distribution mapping relationship. Among them, the branch pipeline distribution mapping relationship is the mapping relationship between the branch pipeline location interval and the attenuation trend configured based on leakage experiments for different branch pipelines. Therefore, the leakage location interval corresponding to the attenuation trend can be determined according to the branch pipeline distribution mapping relationship, and the present invention embodiment does not make specific limitations.

[0082] In a specific embodiment, the current execution end uses acoustic-pressure data acquisition for the branch pipeline detection platform. An acoustic emission sensor and a pressure transmitter are respectively installed at the head station and the end station of the pipeline. A valve is used to simulate the leakage amount. The acoustic emission signal and the pressure signal during leakage are collected by a data collector and sent to the PC side for data analysis. Among them, the pipeline material is steel pipe, the straight pipe section diameter is 50 mm, the branch pipe diameter is 25 mm, the inside of the pipe is gas, and gas is injected through an air compressor. The working pressure of the air compressor is 0.8 MPA. The acoustic emission sensor model is RS-5A, the width is 18.8 mm, the height is 15 mm, the base material is ceramic, and the sampling frequency is 50 - 800 HZ; the pressure sensor model is ICP 106B pressure sensor, the working pressure range is 8.3 psi, the material is stainless steel, and the measuring medium is liquid and gas. As Figure 7 shown, it is a flat layout diagram of the branch pipeline, marking the head station, the end station of the pipeline and the position of the simulated leakage of the pipeline. The total length of the branch pipeline is 2,500 m. Furthermore, based on the distribution mapping relationship of the branch pipeline, it is determined that the distance from the leakage point to the head station is 1,000 m, and the distance from the leakage point to the end station is 1,500 m.

[0083] The embodiment of the present invention provides a method for detecting leakage of a branch pipeline. Compared with the prior art, the embodiment of the present invention collects acoustic emission signals and pressure signals at both ends of the oil and gas pipeline, and there is at least one branch pipeline between the two ends of the oil and gas pipeline; short-time frame time series alignment is performed on the acoustic emission signal and the pressure signal at a preset time interval to obtain an acoustic-pressure time series signal; the acoustic-pressure time series signal is classified and detected based on a pipeline leakage classification model that has completed model training, and the pipeline leakage classification model includes an encoding layer for feature information fusion based on a cross-attention mechanism, which greatly improves the inspection accuracy of branch pipeline leakage and realizes effective detection of branch pipeline leakage.

[0084] Furthermore, as an implementation of the above Figure 1 shown method, the embodiment of the present invention provides a device for detecting leakage of a branch pipeline, as Figure 8 shown, the device includes:

[0085] An acquisition module 21, configured to acquire acoustic emission signals and pressure signals at both ends of the oil and gas pipeline, and there is at least one branch pipeline between the two ends of the oil and gas pipeline;

[0086] A noise reduction module 22, configured to perform modal decomposition on the acoustic emission signal and the pressure signal to obtain the denoised acoustic emission signal and pressure signal;

[0087] The detection module 23 is configured to perform classification detection on the acoustic emission signal and the pressure signal based on a pipeline leakage classification model that has completed model training, so as to obtain a pipeline detection result. The pipeline leakage classification model includes an encoding layer that performs feature information fusion based on a cross-attention mechanism.

[0088] Further, the device further includes:

[0089] An acquisition module, configured to acquire a pipeline leakage sample data set and construct an initial pipeline leakage classification model based on an encoder. The encoder includes a position encoding layer carrying pressure class tokens and sound class tokens, a cross-fusion encoding layer, and a fusion decision layer;

[0090] A training module, configured to perform model training on the initial pipeline leakage classification model based on the pipeline leakage sample data set to obtain a pipeline leakage classification model.

[0091] Further, the training module is specifically configured to extract local features from the denoised acoustic time series signal and pressure time series signal in the pipeline leakage sample data set through a fully connected layer in the initial pipeline leakage classification model, and then add pressure class tokens and sound class tokens, and perform position encoding on the local features in the position encoding layer to obtain a pressure packet token sequence and a sound packet token sequence; obtain acoustic time series features through a sound encoder in the cross-fusion encoding layer, and obtain pressure time series features through a pressure encoder in the cross-fusion encoding layer; perform feature exchange between the pressure packet token sequence and the acoustic time series features, and perform feature interaction fusion through a cross-attention mechanism to obtain fused acoustic features; perform feature exchange between the sound packet token sequence and the pressure time series features, and perform feature interaction fusion through a cross-attention mechanism to obtain fused pressure features; perform fusion conversion of leakage category probabilities on the pressure features and the acoustic features in the fusion decision layer, and when the probability category matches the model training requirements, determine that the model training of the pipeline leakage classification model is completed.

[0092] Further, the noise reduction module is specifically configured to perform complementary ensemble empirical mode decomposition on the acoustic emission signal and the pressure signal to obtain acoustic components and pressure components, and determine high-correlation components based on the acoustic components and the pressure components; screen the acoustic components and pressure components that match the classification type, and perform filtering and noise reduction on the acoustic components and the pressure components to obtain the denoised acoustic components and pressure components; perform signal reconstruction on the high-correlation components and the denoised acoustic components and pressure components to obtain the denoised acoustic emission signal and pressure signal.

[0093] Further, the device further includes:

[0094] A determination module, configured to determine the attenuation trends of the acoustic emission signal and the pressure signal if the pipeline detection result indicates pipeline leakage, and determine the leakage location interval corresponding to the attenuation trend according to the branch pipeline distribution mapping relationship.

[0095] An embodiment of the present invention provides a detection device for branch pipeline leakage. Compared with the prior art, in the embodiment of the present invention, acoustic emission signals and pressure signals located at both ends of an oil and gas pipeline are collected, and at least one branch pipeline is included between both ends of the oil and gas pipeline; short-time frame timing alignment is performed on the acoustic emission signal and the pressure signal at a preset time interval to obtain an acoustic pressure timing signal; the pipeline detection result is obtained by classifying and detecting the acoustic pressure timing signal based on a pipeline leakage classification model that has completed model training, and an encoding layer for feature information fusion based on a cross-attention mechanism is included in the pipeline leakage classification model, which greatly improves the inspection accuracy of branch pipeline leakage and realizes effective detection of branch pipeline leakage.

[0096] According to an embodiment of the present invention, a storage medium stores at least one executable instruction, and the computer executable instruction can execute the detection method for branch pipeline leakage in any of the above method embodiments.

[0097] Figure 9 The structural schematic diagram of a terminal provided according to an embodiment of the present invention is shown. The specific implementation of the terminal is not limited in the specific embodiments of the present invention.

[0098] As Figure 9 shown, the terminal may include: a processor 302, a communication interface 304, a memory 306, and a communication bus 308.

[0099] Among them: The processor 302, the communication interface 304, and the memory 306 communicate with each other through the communication bus 308.

[0100] The communication interface 304 is used to communicate with network elements of other devices such as clients or other servers.

[0101] The processor 302 is configured to execute the program 310, and specifically can execute the relevant steps in the embodiment of the detection method for branch pipeline leakage described above.

[0102] Specifically, the program 310 may include program codes, and the program codes include computer operation instructions.

[0103] The processor 302 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. One or more processors included in the terminal may be of the same type, such as one or more CPUs; or may be of different types, such as one or more CPUs and one or more ASICs.

[0104] A memory 306 for storing a program 310. The memory 306 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.

[0105] The program 310 is specifically configured to cause the processor 302 to perform the following operations:

[0106] Collect acoustic emission signals and pressure signals at both ends of an oil and gas pipeline, where there is at least one branch pipeline between the two ends of the oil and gas pipeline;

[0107] Perform short-time frame time series alignment on the acoustic emission signal and the pressure signal at a preset time interval to obtain an acoustic pressure time series signal;

[0108] Perform classification detection on the acoustic pressure time series signal based on a pipeline leakage classification model that has completed model training. The pipeline leakage classification model includes an encoding layer for feature information fusion based on a cross-attention mechanism.

[0109] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they can be implemented by program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them can be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0110] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc., made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for detecting branch pipeline leakage, characterized in that: include: Collecting acoustic emission signals and pressure signals at both ends of an oil and gas pipeline, wherein the oil and gas pipeline includes at least one branch pipeline between the two ends; Performing modal decomposition on the acoustic emission signal and the pressure signal to obtain the noise-reduced acoustic emission signal and pressure signal; Classify and detect the acoustic emission signal and the pressure signal based on a pipeline leakage classification model that has completed model training to obtain a pipeline detection result, wherein the pipeline leakage classification model includes an encoding layer that fuses feature information based on a cross-attention mechanism; Before collecting the acoustic emission signals and pressure signals at both ends of the oil and gas pipeline, the method further includes: Obtain a pipeline leakage sample dataset and build an initial pipeline leakage classification model based on an encoder, which includes a position encoding layer carrying pressure tokens and sound tokens, a cross-fusion encoding layer, and a fusion decision layer; The initial pipeline leakage classification model is trained based on the pipeline leakage sample data set to obtain a pipeline leakage classification model.

2. The method according to claim 1, characterized in that The performing model training on the initial pipeline leakage classification model based on the pipeline leakage sample data set to obtain the pipeline leakage classification model includes: Based on the de-noised sound time series signal and pressure time series signal in the pipeline leakage sample dataset, local features are extracted through the fully connected layer in the initial pipeline leakage classification model, and then pressure tokens and sound tokens are added. The local features are position-encoded in the position encoding layer to obtain a pressure packet token sequence and a sound packet token sequence; Acquiring a sound temporal feature based on a sound encoder in the cross-fusion coding layer, and acquiring a pressure temporal feature based on a pressure encoder in the cross-fusion coding layer; Performing feature exchange on the pressure packet token sequence and the sound time sequence feature, and performing feature interactive fusion through a cross-attention mechanism to obtain a fused sound feature; Performing feature exchange on the sound packet token sequence and the pressure time series feature, and performing feature interactive fusion through a cross-attention mechanism to obtain a fused pressure feature; The fusion decision layer performs a fusion conversion of the pressure feature and the sound feature into leakage category probabilities, and when a probability category matching model training requirement is obtained, it is determined that the model training of the pipeline leakage classification model is completed.

3. The method according to claim 2, characterized in that The performing modal decomposition on the acoustic emission signal and the pressure signal to obtain the noise-reduced acoustic emission signal and pressure signal comprises: performing complementary set empirical mode decomposition on the acoustic emission signal and the pressure signal to obtain an acoustic component and a pressure component, and determining a highly correlated component based on the acoustic component and the pressure component; screening the sound components and pressure components of matching classification types, and filtering and denoising the sound components and the pressure components to obtain the denoised sound components and the pressure components; Signal reconstruction is performed on the highly correlated component and the noise-reduced acoustic component and the pressure component to obtain the noise-reduced acoustic emission signal and the pressure signal.

4. The method according to any one of claims 1 to 3, characterized in that After the pipeline leakage classification model based on the completed model training is used to classify and detect the acoustic emission signal and the pressure signal to obtain the pipeline detection result, the method further includes: If the pipeline detection result is a pipeline leakage, the attenuation trend of the acoustic emission signal and the pressure signal is determined, and the leakage location interval corresponding to the attenuation trend is determined according to the branch pipeline distribution mapping relationship.

5. A branch pipeline leakage detection device, characterized in that: include: An acquisition module, configured to acquire acoustic emission signals and pressure signals at both ends of an oil and gas pipeline, wherein the oil and gas pipeline includes at least one branch pipeline between the two ends; a noise reduction module, configured to perform modal decomposition on the acoustic emission signal and the pressure signal to obtain noise-reduced acoustic emission signals and pressure signals; a detection module, configured to classify and detect the acoustic emission signal and the pressure signal based on a pipeline leakage classification model for which model training has been completed, to obtain a pipeline detection result, wherein the pipeline leakage classification model includes an encoding layer for feature information fusion based on a cross-attention mechanism; The device further comprises: An acquisition module is used to obtain a pipeline leakage sample dataset and build an initial pipeline leakage classification model based on an encoder. The encoder includes a position encoding layer carrying pressure tokens and sound tokens, a cross-fusion encoding layer, and a fusion decision layer. The training module is used to perform model training on the initial pipeline leakage classification model based on the pipeline leakage sample data set to obtain a pipeline leakage classification model.

6. A storage medium storing at least one executable instruction, wherein the executable instruction enables a processor to execute operations corresponding to the branch pipeline leakage detection method according to any one of claims 1 to 4.

7. A terminal comprising: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute an operation corresponding to the branch pipeline leakage detection method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Pipeline leakage monitoring system and method based on sound wave and negative pressure wave hybrid monitoring

    CN108488638A

  • Pipeline leakage point detection method and device, storage medium and terminal

    CN112013285A

  • Pollen image classification method based on cross attention distillation Transformer

    CN113887610A