Gas pipe network leakage detection method and system
By combining temporal-spatial dual-modal feature extraction and interactive fusion in gas pipeline network leak detection, the problem of low detection accuracy in existing technologies has been solved, and efficient identification and accurate detection of weak leak signals have been achieved.
Patent Information
- Application Number
- CN202511201481.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-10-17
AI Technical Summary
Existing gas pipeline leak detection methods suffer from low accuracy, false alarms, or missed alarms when faced with weak leak signals and complex detection tasks. Furthermore, existing technologies lack in-depth interaction and complementary feature integration.
A dual-modal feature extraction and adaptive interactive fusion method is adopted. By using the time-domain signal of gas pipeline pressure fluctuation and spatiotemporal data of Gram angle difference field, the adaptive fusion of multi-scale deep features is achieved through dual-modal feature extraction and interactive network, combined with bidirectional spatial attention compression and channel spatial attention.
It improves the detection rate of weak leak signals and the accuracy of detection results, enhances the robustness of detection, and improves the accuracy and reliability of gas pipeline network leak detection.
Smart Images

Figure CN120799359A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of pipeline signal recognition, and particularly relates to a gas pipeline network leakage detection method and system. BACKGROUND
[0002] As a clean and efficient green energy, gas has superior environmental performance, outstanding economy, and reliable safety. With the continuous growth of gas consumption demand, pipeline transportation has core advantages such as large transportation volume, low loss rate, and economic operation cost in the field of energy transportation, showing an irreplaceable strategic value. The gas pipeline network system has risen to be a key infrastructure for guaranteeing national energy security, supporting industrial transformation and upgrading, and maintaining social harmony and stability.
[0003] However, with the continuous expansion of the gas pipeline network, the complexity of safety risk prevention and control has also been magnified. In the long-term use process, due to pipeline aging, corrosion or malicious damage and other factors, pipeline network leakage accidents occur, which not only affect energy supply, but also lead to explosion accidents, causing huge economic losses and casualties.
[0004] Therefore, it is urgent to carry out research on gas pipeline network leakage detection algorithm to improve the accuracy and reliability of leakage detection. Early leakage identification can significantly reduce resource waste and safety risks, maximize the protection of people's life and property safety, and has far-reaching social, economic and environmental significance.
[0005] Currently, the gas pipeline network leakage detection method based on pressure fluctuation faces the severe challenges of large noise interference, difficulty in detecting small leakage, and low detection accuracy. How to extract effective leakage features from pressure data and design a leakage identification model has become the key to current gas pipeline network leakage detection research.
[0006] The existing pipeline network leakage detection methods have the following problems: The pipeline network leakage detection method of manually extracting signal features in a single domain such as time domain and frequency domain has a tedious procedure, and the setting of parameters requires a lot of manual experience, which cannot utilize multi-domain features at the same time. When facing weak leakage signals and complex detection tasks, it often leads to missed reports or false reports.
[0007] The pipeline network leakage detection method based on Gram angle field focuses on the overall trend and ignores the complete time series, resulting in inaccurate detection. The pipeline network leakage detection method based on deep learning designs a target feature extraction network to extract multi-dimensional features from pressure data, and fuses domain features at the feature level, but lacks deep interaction and complementary advantages; some only fuse two-domain features through simple splicing, which cannot adaptively fuse deeply.
[0008] Therefore, the existing technology has deficiencies in feature fusion and detection performance. SUMMARY
[0009] The present application proposes a gas pipeline network leakage detection method and system to solve the above problems, which takes the original pressure fluctuation time domain signal and the Gramian Angular Difference Field (GADF) space-time data generated by its conversion as two kinds of isomodal modalities, carries out deep feature extraction and adaptive interactive fusion of double modalities, and aims to improve the detection rate of weak leakage signals and the accuracy and robustness of detection results.
[0010] According to some embodiments, the present application adopts the following technical solutions: A gas pipeline network leakage detection method, comprising: Pretreating the pressure signal of the target position of the gas pipeline network, including segment stacking and Gramian Angular Difference Field algorithm, to generate one-dimensional time series data and two-dimensional space-time data; Using a double-modality feature extraction and interaction network to extract and interactively fuse the multi-scale deep features of the one-dimensional time series data and the two-dimensional space-time data to obtain time series features and space-time features; Adaptively fusing the time series features and the space-time features through bidirectional spatial attention compression and channel spatial attention combined with a gating mechanism to obtain features after double-modality fusion; Based on the features after double-modality fusion, classifying the state of the gas pipeline network to obtain the final leakage detection result; The double-modality feature extraction and interaction network uses two branches to extract multi-scale deep features of the one-dimensional time series data and the two-dimensional space-time data, and in the extraction process, cross-attention is used to realize deep interaction and fusion of the multi-scale deep features.
[0011] According to some embodiments, the present application adopts the following technical solutions: A gas pipeline network leakage detection system, comprising: A preprocessing module configured to pretreat the pressure signal of the target position of the gas pipeline network, including segment stacking and Gramian Angular Difference Field algorithm, to generate one-dimensional time series data and two-dimensional space-time data; A feature extraction module configured to use a double-modality feature extraction and interaction network to extract and interactively fuse the multi-scale deep features of the one-dimensional time series data and the two-dimensional space-time data to obtain time series features and space-time features; A feature fusion module configured to adaptively fuse the time series features and the space-time features through bidirectional spatial attention compression and channel spatial attention combined with a gating mechanism to obtain features after double-modality fusion; The feature classification module is configured to: based on the fused dual-mode features, classify the gas pipe network state to obtain a final leakage detection result. The dual-mode feature extraction and interaction network extracts multi-scale deep features of one-dimensional time sequence data and two-dimensional space-time data respectively by using two branches, and in the extraction process, deep interaction and fusion of the multi-scale deep features are realized by using cross attention.
[0012] According to some embodiments, the present application adopts the technical scheme as follows: A computer program product comprising a computer program which, when executed by a processor, implements the gas pipe network leakage detection method.
[0013] According to some embodiments, the present application adopts the technical scheme as follows: A non-transitory computer-readable storage medium for storing computer instructions, which, when executed by a processor, implement the gas pipe network leakage detection method.
[0014] According to some embodiments, the present application adopts the technical scheme as follows: An electronic device comprising a processor, a memory and a computer program, wherein the processor is connected to the memory, and the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the gas pipe network leakage detection method.
[0015] Compared with the prior art, the present application has the following beneficial effects: The present application proposes a time sequence-space-time dual-mode feature extraction and interaction fusion framework, designs a multi-class network module and constructs an end-to-end gas leakage detection process, aiming to improve the detection rate of weak leakage signals, enhance the accuracy and robustness of the detection results and provide a new solution for gas pipe network leakage detection.
[0016] In order to overcome the limitations brought by single feature or mode, the present application combines one-dimensional pressure fluctuation time domain signal and two-dimensional space-time data generated by gram angle difference field, and uses two kinds of homologous multi-modal data to comprehensively represent pipeline leakage information.
[0017] The present application interacts and fuses the feature layers and decision layers of the two modes, uses cross attention mechanism and adaptive gating to realize deep interaction, complementary advantages and adaptive fusion of the homologous dual-mode, and improves the interaction and fusion effect and detection performance. BRIEF DESCRIPTION OF DRAWINGS
[0018] The accompanying drawings, which form a part of this specification, are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification. The embodiments of the application, and their
[0019] Figure 1 Leak detection block diagram for gas pipeline network of Example 1.
[0020] Figure 2 Structure diagram of leak detection model of Example 1.
[0021] Figure 3 Structure diagram of multi-scale attention feature extraction network of Example 1.
[0022] Figure 4 Structure diagram of inflation multi-scale feature extraction module of Example 1.
[0023] Figure 5 Flow chart of bimodal feature interaction module of Example 1.
[0024] Figure 6 Flow chart of bidirectional spatial attention compression module of Example 1.
[0025] Figure 7 Flow chart of bidirectional spatial attention expansion module of Example 1.
[0026] Figure 8 Flow chart of adaptive gating fusion module of Example 1. DETAILED DESCRIPTION
[0027] The application will be further described below in conjunction with the drawings and embodiments.
[0028] It should be noted that the following detailed description is merely exemplary in nature and is intended to provide further description of the application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0029] It is to be understood that the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. It should be noted that the terms "comprises", "comprising", "includes", "including", "contains", "containing" or variations thereof do not specify an exhaustive or complete list of components or steps.
[0030] Example 1 In an embodiment of the application, a gas pipeline network leak detection method is provided, comprising: Step S1: Preprocessing the pressure signal at the target location of the gas pipeline network, including segmented stacking and Gram's angle difference algorithm, to generate one-dimensional time series data and two-dimensional spatiotemporal data; Step S2: Using bimodal feature extraction and interactive networks, extract and interactively fuse multi-scale deep features of one-dimensional time series data and two-dimensional spatiotemporal data to obtain time series features and spatiotemporal features; Step S3: Adaptively fuse the temporal features and spatiotemporal features through bidirectional spatial attention compression and channel spatial attention, combined with a gating mechanism, to obtain the bimodal fused features; Step S4: Based on the features after bimodal fusion, classify the gas pipeline network status to obtain the final leak detection result; Among them, the bimodal feature extraction and interaction network uses two branches to extract multi-scale deep features of one-dimensional time series data and two-dimensional spatiotemporal data respectively. During the extraction process, cross-attention is used to achieve deep interaction and fusion of multi-scale deep features.
[0031] As an embodiment, a gas pipeline network leak detection method of the present invention uses the original pressure fluctuation time domain signal and the Gram angle difference field spatiotemporal data generated by its conversion as two homologous heterogeneous modalities, and performs dual-modal deep feature extraction and adaptive interactive fusion, aiming to improve the detection rate of weak leakage signals and the accuracy and robustness of the detection results. From the perspective of model construction and training, the following is Figure 1 As shown, the specific implementation process is described in detail: Step 1: Obtain the pressure signal at the target location of the gas pipeline network. The pressure signal is sampled and obtained by the pressure sensor.
[0032] Data sets are prepared according to the normal state, leakage state and interference state of the transportation pipeline operation, which are divided into three sample sets: normal working condition, leakage working condition and interference working condition.
[0033] Among them, each sample of the three working conditions is represented as a row vector, the number of its elements is ,and .
[0034] Step 2: Preprocess each sample to generate one-dimensional time series data , use the Gram angle difference GADF algorithm to generate two-dimensional space-time data The specific process is as follows: Step 2-1: Preprocess the one-dimensional pressure signal in the sample First, the sliding window technique is used to split the one-dimensional sample into four sub-samples to expand the dataset.
[0035] Then, each augmented sub-sample is equally divided into 8 independent segments, and the data of the independent segments are limited in by normalization processing.
[0036] Finally, the 8-channel pressure data is stacked to obtain one-dimensional time series data .
[0037] Step 2-2: Extracting two-dimensional spatiotemporal data, using the Gram Angle Difference GADF algorithm to convert each independent segment of each one-dimensional time series sample into a two-dimensional spatiotemporal texture map, forming 8-channel two-dimensional spatiotemporal data .
[0038] Specifically, using the Gram Angle Difference GADF algorithm for each independent segment, first convert the normalized data from the Cartesian coordinate system to the polar coordinate system, encode the time series information to the coordinate point, and then use the trigonometric cosine function to analyze the time series correlation between the converted data. The final Gram Angle Difference GADF matrix is in the format of , where , represents the length of the one-dimensional time series, respectively represent the length and width of the two-dimensional feature map.
[0039] The same operation is performed on each independent segment, and all converted Gram Angle Difference matrices are stacked into a three-dimensional tensor, so that the one-dimensional time series data is successfully converted into two-dimensional spatiotemporal data , which converts pressure fluctuations into spatial texture features and realizes the spatiotemporal domain enhanced expression of the leakage signal.
[0040] Step 3: Designing a dual-modal feature extraction network for the two-dimensional spatiotemporal data and one-dimensional time series data generated in step 2, which is divided into a two-dimensional spatiotemporal branch and a one-dimensional time series branch to extract multi-scale deep spatiotemporal features and time series features, as shown in Figure 2 , the process includes: Step 3-1: Building a two-dimensional spatiotemporal branch to extract two-dimensional spatiotemporal features, designing a multi-scale attention feature extraction network as a two-dimensional spatiotemporal branch to extract multi-scale spatiotemporal features. The input of the two-dimensional spatiotemporal branch is the two-dimensional spatiotemporal data generated in step 2, and it is one-to-one corresponding to the input in the one-dimensional time series branch, and the output is multi-scale two-dimensional spatiotemporal features .
[0041] Specifically, the multi-scale attention feature extraction network structure is as shown in Figure 3As shown, it contains a total of four layers, each layer contains an expansion multi-scale feature extraction module and a channel space attention module. A single expansion multi-scale feature extraction module is as follows Figure 4 As shown, the specific process is: First, use the input feature map Convolution generates a feature map of the new number of channels, and then the feature map is evenly divided into 4 feature sub-maps according to the channel dimension, recorded as ,in , that is, the input feature map is divided into 4 parts. Each feature sub-map has the same size (height and width) as the input feature map, but the number of channels is .
[0042] In order to reduce module parameters, the of Dilated convolutional layers, except In addition, 、 and There is a corresponding The dilated convolutional layer is denoted as , its expansion rate , and its output is recorded as .for Feature subgraph, without The convolutional layer is expanded so that the output is itself, denoted as .Apart from In addition, the feature subgraph First add the previous set of feature subgraphs go through Dilated convolution The feature output of the layer (where The feature output is itself), that is, the feature subgraph Add first , then enter Corresponding Dilated convolution Layer, outputs the extracted multi-scale features , the whole process is expressed as: (1) Therefore, each Dilated convolution Each layer can obtain feature information from the previous feature subgraph, and each feature subgraph passes through a The dilated convolutional layer has different receptive fields and scales, resulting in different feature outputs. It is extracted from feature subgraphs of different scales and receptive field sizes.
[0043] To better fuse features of different scales, the dilated multi-scale feature extraction module outputs all the features Concatenate along the channel dimension and fuse using convolution. Finally, add the original input features through a residual connection to obtain the final module output , denoted as: (2) where Concat denotes concatenation along the channel, and Conv denotes convolution.
[0044] After the output of each layer of the dilated multi-scale feature extraction module, a channel-spatial attention module is connected to enhance important features, which are then added to the original input features through a residual connection, and finally the feature extraction results of the two-dimensional spatio-temporal branch at this layer are output : (3) where CAM denotes channel attention weighting operation, which is used to assign different weights to different channels to highlight important channels; and SAM denotes spatial attention weighting operation, which is used to assign different weights to different positions in space to highlight important positions.
[0045] By combining the four-layer dilated multi-scale feature extraction module and the channel-spatial attention module, a multi-scale attention feature extraction network (two-dimensional spatio-temporal branch) is constructed, which expands the receptive field while fully extracting multi-scale features and local and global information, and strengthens the deep features related to leakage.
[0046] Step 3-2: Build a one-dimensional temporal branch, as shown in Figure 2 , which is similar to the two-dimensional spatio-temporal branch and uses the same network structure - multi-scale attention feature extraction network, also composed of four layers, as shown in Figure 3 , each layer containing one dilated multi-scale feature extraction module and a channel-spatial attention module for extracting multi-scale temporal features. The input of this branch is the temporal feature matrix , and the output is the multi-scale temporal feature after passing through the multi-scale attention feature extraction network. The feature extraction process is consistent with that of the two-dimensional spatio-temporal branch, except that the two-dimensional convolution, pooling, and batch normalization operations involved in the network are replaced by corresponding one-dimensional convolution, pooling, and batch normalization operations suitable for one-dimensional signals.
[0047] Step 4: Build a dual-modal feature interaction module, as shown in Figure 5 , which uses cross-attention to realize deep interaction and fusion of one-dimensional temporal features and two-dimensional spatio-temporal features, promoting complementary advantages of features of the two modalities.
[0048] The bimodal interaction node is selected after the output of the 2nd and 4th layers of the bimodal feature extraction network, as shown in Figure 2 As shown, the input and output of each layer of the bimodal feature interaction module are specifically: After the second layer, the input is the second layer output of the one-dimensional temporal branch and the second layer output of the 2D spatiotemporal branch , the corresponding output is the one-dimensional time series feature after the interaction of bimodal features and two-dimensional spatiotemporal features ; After the 4th layer, the input is the 4th layer output of the one-dimensional temporal branch and the 4th layer output of the 2D space-time branch , the corresponding output is the one-dimensional time series feature after the interaction of bimodal features and two-dimensional spatiotemporal features .
[0049] The bimodal interaction after the second layer and the fourth layer has the same operation process except for the different input and output. The following takes the bimodal interaction after the output of the fourth layer of the bimodal feature extraction network as an example. The specific process of the bimodal feature interaction operation is as follows: Step 4-1: Use three trainable 1×1 convolutions to transform the input one-dimensional temporal features Perform linear mapping to obtain the time series key features , Time Series Query Features , time series value characteristics
[0050] Similarly, three trainable 1×1 convolutions are used to transform the input two-dimensional spatiotemporal features. Perform linear mapping to obtain time and space key features respectively , spatiotemporal query features , spatiotemporal value characteristics ; It should be noted that when generating spatiotemporal key features and query features, the channel reduction factor is introduced Reduce the number of feature channels and reduce the amount of calculation; among them, , represents the length of the one-dimensional feature sequence, Represent the length and width of the two-dimensional feature map respectively.
[0051] Step 4-2: Since the 2D spatiotemporal features and the 1D temporal features have different dimensions, a bidirectional spatial attention compression module is used to compress the 2D spatiotemporal key features. , query features , value features Perform dimension compression respectively to align with the dimension of one-dimensional time series features.
[0052] The bidirectional spatial attention compression module is as shown in the following formula: Figure 6 The specific steps are as follows: (1) The two-dimensional space-time features to be compressed are respectively subjected to maximum pooling along the width direction (vertical compression) and maximum pooling along the height direction (horizontal pooling) to obtain and .
[0053] (2) The channels are spliced and rearranged to fuse the bidirectional features: (4) wherein, Concat represents feature splicing along the channel dimension.
[0054] (3) A 1x1 convolution layer is used to restore the number of channels to the original number of channels C to obtain the features compressed by the bidirectional spatial attention .
[0055] (4) The channel attention of the original two-dimensional features is obtained , and is used to perform channel-level weighting operation on .
[0056] (5) The dimension-compressed space-time features are obtained .
[0057] The space-time key, query and value features are respectively subjected to the bidirectional spatial attention compression module to obtain the dimension-compressed space-time key features , space-time query features and space-time value features : (5) (6) (7) wherein, BSAS is a bidirectional spatial attention compression operation.
[0058] Step 4-3: For the one-dimensional time sequence branch, the two-dimensional space-time features compressed in step 4-2 are used to interact with the one-dimensional time sequence features, specifically as follows: (1) The time sequence query features are multiplied by the space-time key features to generate a time sequence attention map : (8) wherein, Softmax is a Softmax activation function.
[0059] (2) Using the time sequence attention map To the spatiotemporal value feature Weighted, generate one-dimensional time sequence and two-dimensional spatiotemporal information after interaction Time sequence features : (9) (3) Using trainable parameters , the interactive time sequence feature is adaptively weighted, and then combined with the original one-dimensional time sequence feature Residual connection, generate one-dimensional time sequence feature after double-modal feature interaction Output , namely the time sequence feature containing spatiotemporal information: (10) Step 4-4: For the two-dimensional spatiotemporal branch, use the spatiotemporal query feature And the time sequence key feature Multiply to generate a spatiotemporal attention map : (11) Using the spatiotemporal attention map Weight the time sequence value feature , generate the spatiotemporal feature after the interaction of two-dimensional spatiotemporal and one-dimensional time sequence information : (12) Because the dimension of the interactive spatiotemporal feature At this time, it is , it cannot be added with the original two-dimensional spatiotemporal feature, so the bidirectional spatial attention expansion module is used, as shown in Figure 7 , expand To the same dimension as the two-dimensional spatiotemporal feature, the specific process is as follows: First, the generated interactive spatiotemporal feature , along the horizontal direction and the vertical direction respectively Dimension expansion, get And , channel splicing and rearrangement, through Convolution layer, restore to the original C Channel, get the feature after bidirectional spatial attention expansion ; Then get the channel attention Of the original interactive spatiotemporal feature , weight At the channel level, finally get the dimension expanded interactive spatiotemporal feature : (13) Where, BSAE is the bidirectional spatial attention expansion operation.
[0060] Finally, the features after interaction are adaptively weighted , and then connected with the original two-dimensional spatiotemporal features to generate the output of the two-dimensional spatiotemporal features after the interaction of the double-modal features , i.e., the spatiotemporal features containing time sequence information: (14) According to steps 4-3 and 4-4, and is the final output of the double-modal feature interaction module, representing the adaptive dynamic interaction of the module for two-dimensional spatiotemporal features and one-dimensional time sequence features, which can be represented as: (15) where DMFI is the double-modal feature interaction operation.
[0061] The present embodiment takes the outputs of the 2nd and 4th layers of the double-modal feature extraction network as the interaction objects, but the hierarchical position of the interaction is not limited thereto, and the 1st layer output or the 3rd layer output, etc. can also be interacted; the number of interactions is also not limited to 2 times, and 1 time, 3 times, etc. can also be interacted.
[0062] Step 5: build an adaptive gating fusion module, as shown in Figure 8 , which realizes the adaptive fusion of double-modal feature information through a bidirectional spatial attention compression module and a channel spatial attention module combined with a gating mechanism.
[0063] The input is the two-dimensional spatiotemporal features and one-dimensional time sequence features after the double-modal interaction in step 4, i.e., the features after the double-modal interaction of the 4th layer of the double-modal feature extraction network, and the output is the features after the double-modal fusion , and the specific steps are as follows: Step 5-1: first input the two-dimensional spatiotemporal features after the double-modal interaction in step 4 into the bidirectional spatial attention compression module to compress the three-dimensional tensor into a two-dimensional tensor .
[0064] Add the one-dimensional time sequence features and the two-dimensional spatiotemporal features after the compression of the dimension to obtain , which is represented as: (16) where ReLU represents the ReLU activation function, and BN represents batch normalization.
[0065] Input into the spatial attention and channel attention modules respectively to obtain the channel attention map and the spatial attention map . After multiplication, the gate weight is obtained by normalizing with the Sigmoid activation function , which is expressed as: (17) (18) (19) where CA represents channel attention for extracting the weight of different channels, SA represents spatial attention for extracting the weight of different spatial positions, ReLU represents the ReLU activation function, and BN represents batch normalization. Sigmoid represents the Sigmoid activation function.
[0066] The obtained gate weight is given a trainable parameter , and is element-wise multiplied with the spatio-temporal feature . Conversely, the weight is given a trainable parameter , and is element-wise multiplied with the one-dimensional time sequence feature . Then the weighted spatio-temporal feature and time sequence feature are added, and the output is the feature after dual-modal fusion , which is expressed as: (20) Step 6: Build a classifier, as shown in Figure 2 , the dual-modal fusion feature obtained in step 5 is sequentially input into the max-pooling layer, linear layer and Softmax layer to obtain the final leakage detection probability vector , which is expressed as: (21) where Softmax represents the Softmax function, Linear represents the fully connected layer, GAP represents the global average pooling, and the working condition label corresponding to the maximum value in the leakage detection probability vector is selected as the leakage detection result.
[0067] Step 7: Encapsulate the above built parts as a whole model, i.e. the leakage detection model, for end-to-end training and testing.
[0068] Step 8: Use the obtained pressure data to train and test the leakage detection model encapsulated in step 7, and the network adopts the cross-entropy loss function in the training process.
[0069] Other training parameter settings are shown in Table 1, and the trained parameters of the network are saved.
[0070] Table 1. Network training parameter settings
[0071] So far, the entire network model of the method of the embodiment is constructed and trained, and the weight file is saved in step 8. When performing leakage detection on pressure data, the complete process shown in FIG. 8, i.e., steps 1 to 7, is used to perform leakage detection on the input pressure data using the trained weight parameters in step 8. Figure 1
[0072] The method of the embodiment has good gas pipeline network leakage detection accuracy. In order to better show the advantages of the embodiment, the method is compared with other eight deep neural network models (WOA-ECNN, CNN-LSTM, CNN-BiLSTM, CNN-BiGRU, ResNet18, VGG19, DenseNet, and ResNet50). To ensure the effectiveness of the experimental results, the nine algorithms use the same data set division method and network training parameter settings. Table 2 shows the detection results of the method of the embodiment and the other eight algorithms. As shown in Table 2, the method of the embodiment has the highest detection accuracy , the smallest false positive rate , and the smallest false negative rate . In summary, the method of the embodiment has the best recognition accuracy for gas pipeline network leakage and provides a new solution for gas pipeline network leakage detection.
[0073] Table 2. Performance comparison of the method of the embodiment and eight deep neural network models (%)
[0074] Embodiment 2 In one embodiment of the present application, a gas pipeline network leakage detection system is provided, which comprises: A preprocessing module configured to preprocess the pressure signal of the target position of the gas pipeline network, including segmented stacking and Gram angle difference algorithm, to generate one-dimensional time series data and two-dimensional spatiotemporal data; A feature extraction module configured to extract and interactively fuse multi-scale deep features of the one-dimensional time series data and the two-dimensional spatiotemporal data using a dual-modal feature extraction and interaction network to obtain time series features and spatiotemporal features; A feature fusion module configured to adaptively fuse the time series features and the spatiotemporal features by bidirectional spatial attention compression and channel spatial attention combined with a gating mechanism to obtain dual-modal fused features; The feature classification module is configured to: based on the fused dual-mode features, classify the gas pipe network state to obtain a final leakage detection result. The dual-mode feature extraction and interaction network extracts multi-scale deep features of one-dimensional time sequence data and two-dimensional space-time data respectively by using two branches, and realizes deep interaction and fusion of the multi-scale deep features by using cross attention in the extraction process.
[0075] Embodiment 3 In an embodiment of the present application, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the gas pipe network leakage detection method.
[0076] Embodiment 4 In an embodiment of the present application, a non-transitory computer readable storage medium is provided, which is used to store computer instructions, and the computer instructions, when executed by a processor, implement the gas pipe network leakage detection method.
[0077] Embodiment 5 In an embodiment of the present application, an electronic device is provided, comprising a processor, a memory and a computer program; wherein the processor is connected with the memory, and the computer program is stored in the memory; when the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device executes the gas pipe network leakage detection method.
[0078] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system) and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The device that implements the functions specified in one flow or multiple flows and / or blocks Figure 1 The device that implements the functions specified in one flow or multiple flows and / or blocks
[0079] These computer program instructions can also be loaded into a computer or other programmable data processing device to make a series of operation steps executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The device that implements the functions specified in one flow or multiple flows and / or blocks Figure 1steps of the functions specified in the one or more blocks.
[0080] Although the present application has been described in connection with the preferred embodiments thereof with reference to the drawings, it will be apparent to those of ordinary skill in the art that various changes in form and details can be made therein without departing from the spirit and scope of the application. Therefore, the scope of the application should be defined not by the preferred embodiments, but by the appended claims and their equivalents.
Claims
1. A gas pipe network leak detection method, characterized in that: include: Preprocess the pressure signal at the target location of the gas pipeline network, including segmented stacking and Gram's angle difference algorithm, to generate one-dimensional time series data and two-dimensional spatiotemporal data; By using bimodal feature extraction and interactive networks, we extract and interactively fuse multi-scale deep features of one-dimensional time series data and two-dimensional spatiotemporal data to obtain time series features and spatiotemporal features. Through bidirectional spatial attention compression and channel spatial attention, combined with a gating mechanism, temporal features and spatiotemporal features are adaptively fused to obtain bimodal fused features; Based on the features after bimodal fusion, the gas pipeline network status is classified to obtain the final leak detection results; Among them, the bimodal feature extraction and interaction network uses two branches to extract multi-scale deep features of one-dimensional time series data and two-dimensional spatiotemporal data respectively. During the extraction process, cross-attention is used to achieve deep interaction and fusion of multi-scale deep features.
2. A gas pipe network leak detection method according to claim 1, characterized in that: The segmented stacking is to divide the pressure signal into several independent segments and stack the independent segments to form one-dimensional time series data of several channels; The Gram's angle difference algorithm converts each independent segment into a two-dimensional spatiotemporal texture map to form two-dimensional spatiotemporal data of several channels.
3. A gas pipe network leak detection method according to claim 1, characterized in that: The bimodal feature extraction and interaction network includes a bimodal feature extraction network and a bimodal feature interaction module; The dual-modal feature extraction network includes a one-dimensional temporal branch and a two-dimensional spatiotemporal branch. Both branches use a multi-scale attention feature extraction network as the backbone network to extract multi-scale deep features of one-dimensional temporal data and two-dimensional spatiotemporal data respectively. The bimodal feature interaction module is based on cross attention, linearly mapping temporal features and spatiotemporal features respectively to obtain the keys, queries and values of the two features, and interacting with the dimensionally aligned keys, queries and values to obtain bimodal feature information, including the temporal features and spatiotemporal features after interaction.
4. A gas pipe network leak detection method according to claim 5, characterized in that: The multi-scale attention feature extraction network is constructed based on the expansion multi-scale feature extraction module and the channel space attention module; The dilated multi-scale feature extraction module performs channel segmentation on the input features and uses dilated convolution layers with different dilation rates to extract multi-scale features of different scales and different receptive field sizes from different feature subgraphs obtained by segmentation. The channel space attention module assigns different weights to different channels to highlight important channels, and assigns different weights to different positions in space to highlight important positions.
5. A gas pipe network leakage detection method according to claim 1, characterized in that: The adaptive fusion of the bimodal feature information is specifically as follows: Perform spatial attention and channel attention on the feature vector obtained by adding the interactive temporal features and spatiotemporal features, respectively, to obtain the channel attention map and spatial attention map; Calculate the gating weight based on the channel attention map and the spatial attention map; The gated weights are used to perform weighted fusion on the interacted temporal features and spatiotemporal features to obtain the bimodal fused features.
6. A gas pipe network leak detection method according to claim 1, characterized in that: The classification of the gas network state is based on the features after bimodal fusion, and the probabilities of the normal state, leakage state and interference state are calculated to form the state corresponding to the maximum probability as the leakage detection result.
7. A gas pipe network leak detection system, characterized in that: include: The preprocessing module is configured to: preprocess the pressure signal at the target location of the gas pipeline network, including segmented stacking and Gram's angle difference algorithm, to generate one-dimensional time series data and two-dimensional spatiotemporal data; The feature extraction module is configured to: use bimodal feature extraction and interactive networks to extract and interactively fuse multi-scale deep features of one-dimensional time series data and two-dimensional spatiotemporal data to obtain time series features and spatiotemporal features; The feature fusion module is configured to adaptively fuse temporal features and spatiotemporal features through bidirectional spatial attention compression and channel spatial attention combined with a gating mechanism to obtain bimodal fused features. The feature classification module is configured to: classify the gas pipe network status based on the features after bimodal fusion to obtain the final leak detection results; Among them, the bimodal feature extraction and interaction network uses two branches to extract multi-scale deep features of one-dimensional time series data and two-dimensional spatiotemporal data respectively. During the extraction process, cross-attention is used to achieve deep interaction and fusion of multi-scale deep features.
8. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, a gas pipe network leakage detection method according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium, characterized in that The non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by the processor, a gas pipeline network leakage detection method according to any one of claims 1 to 6 is implemented.
10. An electronic device, characterized in that: include: A processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement a gas pipeline leak detection method as described in any one of claims 1 to 6.
Citation Information
Cited By
Underground pipe gallery environment intelligent monitoring method and system based on multi-modal sensing
CN121230957A
Pipe gallery gas pipeline defect identification method and system and inspection robot
CN121388942A
Oil and gas pipeline leakage detection method and system fusing multi-modal characteristics
CN121659010A