A method and system for oil and gas pipeline leak detection by fusing multi-modal features

By improving the Gram angle difference field transformation and weighted cross-attention mechanism, and combining the Swing Transformer and GRU models, the problems of insufficient local temporal correlation and inadequate multimodal fusion in traditional methods are solved, and high efficiency and accuracy of oil and gas pipeline leak detection are achieved.

CN121659010BActive Publication Date: 2026-08-04NORTHEAST GASOLINEEUM UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NORTHEAST GASOLINEEUM UNIV
Filing Date
2025-12-02
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Traditional Gram angle field methods fail to fully consider local temporal correlations during signal conversion, resulting in the generated two-dimensional images that cannot effectively capture the unique local temporal patterns of pipeline leaks. Single-modal processing suffers from information bias, and multi-modal fusion lacks deep interaction, making it difficult to achieve efficient complementarity and enhancement of spatiotemporal features. Furthermore, it fails to fully explore detailed features through diverse signal conversion methods to reduce information redundancy.

Method used

An improved Gram Angular Difference Field Transform (GADF) method, which employs wavelet threshold filtering and local angle calculation weighting, is proposed. This method combines the Swing Transformer model to extract spatial features from two-dimensional images with the GRU to extract temporal features from one-dimensional signals. Furthermore, feature fusion is achieved through a weighted cross-attention mechanism (WMCA) to eliminate redundant information.

Benefits of technology

It effectively preserves the temporal correlation of signals, realizes the interactive fusion of cross-modal features, improves the accuracy of oil and gas pipeline leak detection, avoids the low precision problem caused by direct feature splicing, and generates richer joint characterization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121659010B_ABST
    Figure CN121659010B_ABST
Patent Text Reader

Abstract

The application provides a kind of oil and gas pipeline leakage detection method and system fusing multi-modal features, belongs to pipeline leakage detection field.To solve the signal conversion link in pipeline leakage detection, traditional gram angle field is insufficient to consider local time correlation, which restricts feature representation, single mode processing exists one-sided information, multi-modal fusion lacks depth interaction, it is difficult to effectively reduce information redundancy problem.The application adopts gram angle difference field method improved based on wavelet threshold filtering and angle calculation weighting to transform one-dimensional time series signal to two-dimensional image for pipeline signal;Through Swin Transformer, the spatial features of two-dimensional GADF image and the time sequence features of one-dimensional time sequence signal are extracted;Finally, the weighted fusion of spatial features and time sequence features is carried out by using weighted mutual cross attention mechanism module, the cross-modal correlation is captured, and then the classification is carried out by using the fusion features to identify the different working conditions of the pipeline.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pipeline leak detection technology, and more specifically, to a method and system for detecting oil and gas pipeline leaks that integrates multimodal features. Background Technology

[0002] As the primary mode of oil and gas transportation, pipelines occupy an irreplaceable position in the energy transportation system due to their high safety, high reliability, and relatively low construction costs. However, the natural corrosive properties of oil and gas, coupled with the long-term exposure of pipelines to complex and harsh operating environments, pose significant hidden dangers to the safety and stability of the energy transportation system. Pipeline leaks not only cause enormous energy losses and incalculable economic losses but can also trigger chain reactions, endangering lives. Therefore, timely detection of oil and gas pipeline leaks is crucial to ensuring the safety of energy transportation.

[0003] In existing literature, converting one-dimensional time-series signals into two-dimensional images helps capture important features in different domains. Song and Li used time-domain signals and time-frequency images generated by wavelet transforms as input to convolutional neural networks for leak detection. Siddique et al. performed color processing on scale images obtained through continuous wavelet transforms to generate leak-enhanced scalar maps, and then used convolutional neural networks for leak feature extraction and classification. Xu et al. proposed a multi-domain feature fusion anomaly detection method, using GRU to extract time-domain features, combining a fast Fourier transform algorithm with convolutional networks to extract frequency-domain features, and a one-dimensional convolutional neural network to extract spatial features, finally achieving feature fusion based on a channel attention mechanism. Yan et al. proposed a multi-source, multi-modal feature fusion method for detecting natural gas pipeline leaks. First, data collected by multiple sensors was converted into two-dimensional time-frequency images, and then a dual-information fusion module and a channel segmentation multi-scale convolution module were introduced. These two modules were cascaded and fused to achieve the classification task of pipeline leak detection.

[0004] However, traditional Gram angle fields fail to fully consider local temporal correlations during signal conversion, resulting in the generated two-dimensional images being unable to effectively capture the unique local temporal patterns of pipeline leaks, thus limiting the feature representation capabilities. Single-modal information is one-sided, and existing multimodal fusion methods mostly employ simple feature splicing or basic attention mechanisms, lacking bidirectional deep interaction mechanisms, making it difficult to achieve effective complementarity and enhancement of spatiotemporal features, and failing to fully mine detailed features through diverse signal conversion methods to reduce information redundancy. Summary of the Invention

[0005] The technical problem to be solved by this invention is:

[0006] To address the signal conversion issues in pipeline leak detection, traditional Gram angle fields fail to adequately consider local temporal correlations, hindering feature representation. Single-modal processing suffers from incomplete information, and multi-modal fusion lacks deep interaction, making it difficult to achieve efficient complementarity and enhancement of spatiotemporal features and effectively reduce information redundancy.

[0007] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:

[0008] This invention provides a method for detecting leaks in oil and gas pipelines that integrates multimodal features, comprising the following steps:

[0009] S100. The GADF method is improved by using wavelet threshold filtering and local angle calculation weighting to obtain a two-dimensional GADF image; including,

[0010] The pipeline signal is acquired, and the input one-dimensional time-series signal of the pipeline is subjected to wavelet threshold filtering. Then, the Gram angle difference field transformation based on angle calculation weighting is performed to enable the one-dimensional time-series signal to complete the two-dimensional image conversion.

[0011] S200. A multimodal feature extraction branch network is proposed, which includes extracting spatial features of two-dimensional images based on the Swin Transformer model and fusing them with temporal features extracted from one-dimensional signals using GRU to achieve cross-modal feature interaction fusion.

[0012] S300, based on the weighted cross-attention mechanism (WMCA), fuses the extracted features and eliminates redundant information by calculating the feature importance weights;

[0013] The S400, after being processed by linear transformation and ReLU activation function, is input into a fully connected layer, and the output is the pipeline leak detection result.

[0014] Further, in step S100, the following are included:

[0015] S110. Set wavelet basis functions to perform multi-level decomposition on the acquired pipeline signal, including using wavelet basis functions to decompose the one-dimensional time-series pipeline signal. Layered wavelet decomposition yields wavelet coefficients, which include approximation coefficients and detail coefficients; including,

[0016] S120. The processed approximation coefficients and detail coefficients are reconstructed into a denoised signal through inverse wavelet transform, and a truncation operation is performed to ensure that the reconstructed signal has the same length as the original signal.

[0017] S130. Construct a local temporal correlation weight matrix. The values ​​of the elements in the weight matrix are dynamically adjusted according to the distance between the row and column indices. Elements within the local window are given enhancement weights, and elements outside the local window are given decay weights.

[0018] S140. Calculate the weighted GADF matrix based on the angle sequence and the weight matrix: the elements of the matrix are the product of the sine of the angle difference and the corresponding weight, to obtain the weighted GADF matrix, and convert the weighted GADF matrix into a two-dimensional GADF image and output it.

[0019] Further, in step S110, the noise standard deviation is estimated based on the median absolute deviation of the highest frequency detail coefficients. :

[0020]

[0021] in, These are the highest frequency detail coefficients in wavelet decomposition. This represents the maximum number of layers in the wavelet decomposition. Indicates the index position of the coefficient in this layer;

[0022] Calculate the threshold for each layer of coefficients based on the signal length, and calculate the threshold for each layer of wavelet coefficients. :

[0023]

[0024] in, The signal length;

[0025] Choose a soft or hard thresholding function to filter out wavelet coefficients containing noise and remove Gaussian noise.

[0026] Further, in step S120, the processed one-dimensional time-series signal is normalized to the interval [-1, 1] to obtain the normalized signal. :

[0027]

[0028] in, This is a one-dimensional time-series signal after wavelet threshold filtering.

[0029] Map the normalized signal to a range of An angle sequence, wherein each element in the angle sequence is the inverse cosine value of the corresponding element in the normalized signal. The formula is as follows:

[0030]

[0031] in, This is the normalized signal after wavelet threshold filtering.

[0032] Further, in step S130, the local window and the weight matrix of the first... Line 1 Column elements The relationship between them is as follows:

[0033] With the first The local window boundary centered on point A is:

[0034] ,

[0035] in, This refers to the size of a local window. The total length of a one-dimensional time-series signal. This indicates the floor function, with a window range. Included with Local time points centered on;

[0036] like Within a local window, i.e. The weights increase as the distance decreases, thus enhancing local temporal correlations.

[0037]

[0038] like Outside the local window, i.e. or The weight decreases exponentially with increasing distance, thus reducing interference from irrelevant regions.

[0039]

[0040] in, For time series points and The distance.

[0041] Further, in step S140, element The calculation formula is:

[0042]

[0043] in, Indicates timing position and The angle difference, i.e., the trend of signal change. This represents the weight of local temporal correlation.

[0044] Further, in step S300, the following are included:

[0045] S310. Using spatial features as keys and values, and temporal features as queries, compute attention-enhanced representations of temporal features:

[0046]

[0047] in, This indicates a query based on time-series features. and This indicates that spatial features serve as keys and values; , and The attention triplet projection matrix represents a specific feature type. The time features of the projection are used as the source features for the query. The spatial features of the projection serve as both source features for the keys and values;

[0048] The spatial-temporal attention output is obtained through computation via the spatial-temporal attention submodule:

[0049]

[0050] in, It is a new temporal representation constrained by spatial characteristics; This represents the scaling factor.

[0051] S320. Using the obtained spatial and temporal features, with the temporal features as keys and values ​​and the spatial features as queries, calculate the attention-enhanced representation of the spatial features:

[0052]

[0053] in, This indicates a query based on spatial features. and This indicates that the key and value are based on time characteristics; , and The attention triplet projection matrix represents a specific feature type. The spatial features of the projection are used as the source features for the query. The temporal features of the projection serve as source features for both the key and the value.

[0054] The spatial-temporal attention output is obtained through computation via the spatial-temporal attention submodule:

[0055]

[0056] in, It is a new temporal representation constrained by time characteristics;

[0057] S330. Perform feature weighted fusion, fusing the original branch features with the corresponding attention-enhanced features according to a preset ratio:

[0058]

[0059] in, For balance parameters;

[0060] The spatial features and temporal features, which have been processed separately by the weighted cross-attention mechanism module, are concatenated to obtain the final features fused by the weighted cross-attention mechanism. :

[0061] .

[0062] A leak detection system for oil and gas pipelines that integrates multimodal features. The system has a program module corresponding to the above steps, and executes the steps in the above-described method for leak detection of oil and gas pipelines that integrates multimodal features when running.

[0063] A computer-readable storage medium storing a computer program configured to, when invoked by a processor, implement the steps of a method for detecting oil and gas pipeline leaks by incorporating multimodal features.

[0064] Compared with the prior art, the beneficial effects of the present invention are:

[0065] This invention proposes a multimodal feature extraction branch network for oil and gas pipeline leak detection. This network improves the GADF method by using wavelet threshold filtering and local angle calculation weighting to obtain a two-dimensional GADF image. It extracts spatial features of the two-dimensional image using a Swing Transformer and fuses them with temporal features extracted from the one-dimensional signal using a GRU. This interactive fusion of cross-modal features effectively preserves the temporal correlation of the signal. The extracted features are fused using a weighted cross-attention mechanism (WMCA) module, which calculates feature importance weights, eliminates redundant information, and avoids the low-precision problem caused by direct feature splicing.

[0066] The Weighted Cross-Attention Mechanism (WMCA) module proposed in this invention can more fully interact and fuse key features. It leverages the interrelationships between different modal features output by the dual-branch system, enabling temporal features to focus on spatial information, and vice versa. To avoid potential distortion of original information introduced by the attention mechanism, this invention does not directly replace the original features with the attention output. Instead, it employs a weighted summation method to fuse the original features with the attention-enhanced features. This weighted fusion of the correlation information between spatial and temporal features ultimately generates a richer joint representation. Using this WMCA mechanism, the model can establish precise correspondences between the two modal features and capture their dynamic interactions across different temporal dimensions and semantic levels, thereby improving the model's accuracy in detecting oil and gas pipeline leaks. Attached Figure Description

[0067] Figure 1 This is a flowchart of an oil and gas pipeline leakage detection method that integrates multimodal features according to an embodiment of the present invention;

[0068] Figure 2 These are waveforms of the original acoustic signals of the pipeline under different operating conditions in embodiments of the present invention.

[0069] Figure 3 This is a schematic diagram of the improved Gram angle difference field (GADF) method based on wavelet threshold filtering and local angle calculation weighting in an embodiment of the present invention;

[0070] Figure 4 This is a schematic diagram of the network structure of the oil and gas pipeline leakage detection method based on the fusion of multimodal features in an embodiment of the present invention;

[0071] Figure 5 This is a schematic diagram of the network structure of the weighted cross-attention mechanism module in an embodiment of the present invention;

[0072] Figure 6 This is an iterative graph showing the accuracy and loss value of the oil and gas pipeline leakage detection method integrating multimodal features in an embodiment of the present invention for a test sample;

[0073] Figure 7 This is a diagram showing the identification and classification results of test samples by the oil and gas pipeline leakage detection method that integrates multimodal features in an embodiment of the present invention. Detailed Implementation

[0074] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0075] Specific Implementation Plan 1: Combining Figure 1 , 4 As shown in Figure 5, the present invention provides a method for detecting oil and gas pipeline leaks by integrating multimodal features, comprising the following steps:

[0076] S100. The Gram Aspect Difference Field (GADF) method is improved by using wavelet threshold filtering and local angle calculation weighting to obtain a two-dimensional GADF image. That is, the pipeline signal is acquired. The pipeline signal is one-dimensional acoustic time-series signal sample data of oil and gas pipelines under normal operating conditions and three different aperture conditions of 1mm, 4mm and 10mm, respectively, collected by an acoustic sensor. The input one-dimensional pipeline time-series signal is processed by wavelet threshold filtering and Gram Aspect Difference Field Transform based on angle calculation weighting is performed to convert the one-dimensional time-series signal into a two-dimensional image.

[0077] include,

[0078] S110. Set wavelet basis functions to perform multi-level decomposition on the acquired pipeline signal; use wavelet basis functions to process the one-dimensional time-series signal. Layered wavelet decomposition yields wavelet coefficients, which include approximation coefficients and detail coefficients.

[0079] An adaptive threshold based on noise standard deviation estimation is employed: noise standard deviation is estimated based on the median absolute deviation of the highest frequency detail coefficients. The formula is as follows:

[0080]

[0081] in, These are the highest frequency detail coefficients in wavelet decomposition. This represents the maximum number of layers in the wavelet decomposition. Indicates the index position of the coefficient in this layer;

[0082] Calculate the threshold for each layer of coefficients based on the signal length, and calculate the threshold for each layer of wavelet coefficients. The formula is as follows:

[0083]

[0084] in, The signal length;

[0085] Choose a soft or hard thresholding function to filter out wavelet coefficients containing noise and remove Gaussian noise;

[0086] S120. The approximation coefficients and detail coefficients obtained after processing are used to reconstruct the denoised signal through inverse wavelet transform, and the reconstructed signal is ensured to have the same length as the original signal through truncation operation.

[0087] The processed one-dimensional time-series signal is normalized to the interval [-1, 1] to obtain the normalized signal. The normalization calculation formula is as follows:

[0088]

[0089] in, This is a one-dimensional time-series signal after wavelet threshold filtering.

[0090] Map the normalized signal to a range of An angle sequence, wherein each element in the angle sequence is the inverse cosine value of the corresponding element in the normalized signal. The formula is as follows:

[0091]

[0092] in, This is the normalized signal after wavelet threshold filtering.

[0093] S130. Construct a local temporal correlation weight matrix. The values ​​of the elements in the weight matrix are dynamically adjusted according to the distance between the row and column indices. Elements within the local window are assigned enhancement weights, and elements outside the local window are assigned decay weights. The local window and the element in the weight matrix are... Line 1 Column elements The relationship between them is as follows:

[0094] With the first The local window boundary centered on point A is:

[0095] ,

[0096] in, This refers to the size of a local window. The total length of a one-dimensional time-series signal. This indicates the floor function, with a window range. Included with Local time points centered on;

[0097] like Within a local window, i.e. The weights increase as the distance decreases, thus enhancing local temporal correlations.

[0098]

[0099] like Outside the local window, i.e. or The weight decreases exponentially with increasing distance, thus reducing interference from irrelevant regions.

[0100]

[0101] in, For time series points and The distance is 0.1, which is the attenuation coefficient used to control the rate at which the weight decays with distance, ensuring a smooth transition of weights inside and outside the window;

[0102] S140. Calculate the weighted GADF matrix based on the angle sequence and the weight matrix: the elements of the matrix are the products of the sine of the angle difference and the corresponding weight, resulting in the weighted GADF matrix. The calculation formula is as follows:

[0103]

[0104] in, Indicates timing position and The angle difference, i.e., the trend of signal change. This is used as a local temporal correlation weight to enhance key local features;

[0105] Convert the weighted GADF matrix into a two-dimensional GADF image and output it;

[0106] S200. A multimodal feature extraction branch network is proposed, which includes a spatial feature branch and a temporal feature branch. The spatial features of the two-dimensional image are extracted based on the Swing Transformer model and fused with the temporal features extracted from the one-dimensional signal using GRU to achieve cross-modal feature interaction fusion.

[0107] The spatial feature branch uses the Swing Transformer model to extract features from the two-dimensional GADF image transformed by the weighted GADF matrix, flattens the output features and projects them onto the preset fusion dimension.

[0108] The temporal feature branch directly inputs the original one-dimensional temporal signal into the GRU gated recurrent unit network, takes the output of the last time step, and projects it onto the preset fusion dimension.

[0109] S300, based on the weighted cross-attention mechanism (WMCA), fuses extracted features by calculating feature importance weights, eliminating redundant information, and avoiding the low-precision problem caused by direct feature concatenation; including:

[0110] S310. Using spatial features as keys and values ​​and temporal features as queries, compute attention-enhanced representations of temporal features;

[0111] The attention-enhanced representation of computational time-series features indicates the existence of relationships:

[0112]

[0113] in, This indicates a query based on time-series features. and This indicates that spatial features serve as keys and values; , and The attention triplet projection matrix represents a specific feature type. The time features of the projection are used as the source features for the query. The spatial features of the projection serve as both source features for the keys and values;

[0114] The spatial-temporal attention output can be obtained through computation in the spatial-temporal attention submodule:

[0115]

[0116] in, It is a new temporal representation constrained by spatial features, which extracts relevant information from spatial features through temporal features. This represents the scaling factor, which maintains numerical stability through scaling.

[0117] S320. Using the obtained spatial and temporal features, with the temporal features as keys and values ​​and the spatial features as queries, calculate the attention-enhanced representation of the spatial features;

[0118] Attention-enhanced representations of spatial features indicate the existence of relationships:

[0119] ;

[0120] in, This indicates a query based on spatial features. and This indicates that the key and value are based on time characteristics; , and The attention triplet projection matrix represents a specific feature type. The spatial features of the projection are used as the source features for the query. The temporal features of the projection serve as both the source features of the key and the value.

[0121] The spatial-temporal attention output can be obtained through computation in the spatial-temporal attention submodule:

[0122] ;

[0123] in, It is a new temporal series representation constrained by time characteristics, which extracts relevant information from temporal characteristics through spatial characteristics. This represents the scaling factor, which maintains numerical stability through scaling.

[0124] S330. Perform feature weighted fusion: Weave the original branch features with the corresponding attention enhancement features according to a preset ratio;

[0125] The weighted fusion of the original branch features and attention-enhanced features results in:

[0126] Calculate the weighted feature representation based on the defined weights:

[0127]

[0128] in, It is a balancing parameter used to control the strength of preserving original features, ensuring that the model does not lose the most discriminative features of its own modality while integrating cross-modal information;

[0129] The spatial features and temporal features, which have been processed separately by the weighted cross-attention mechanism module, are concatenated to obtain the final features fused by the weighted cross-attention mechanism. The formula is as follows:

[0130]

[0131] After being processed by linear transformation and ReLU activation function, the input is fed into a fully connected layer, and the output is the pipeline leak detection result.

[0132] Specific implementation scheme 2: The present invention provides an oil and gas pipeline leakage detection system that integrates multimodal features. The system has a program module corresponding to the above steps, and executes the steps in the above-mentioned method for detecting oil and gas pipeline leakage that integrates multimodal features when running.

[0133] The other combinations and connections in this implementation scheme are the same as in Specific Implementation Scheme 1.

[0134] Specific Implementation Scheme 3: The present invention provides a computer-readable storage medium storing a computer program configured to implement, when called by a processor, the steps of a method for detecting oil and gas pipeline leaks by fusing multimodal features.

[0135] The other combinations and connections in this implementation scheme are the same as in Specific Implementation Scheme 1.

[0136] Simulation Experiment

[0137] The experimental data used in this embodiment are all from the laboratory oil and gas pipeline leakage detection simulation experimental platform of Northeast Petroleum University. The total length of the pipeline is 180m, and gas and liquid can be transported within it. This embodiment uses compressed air to simulate a gas pipeline, with a gas pressure of 0.5MPa and a flow velocity of 10 m / s. 3 / h. Acoustic wave sensors were used to collect normal signals in a leak-free laboratory environment and leakage signals from pipelines with orifice diameters of 1mm, 4mm, and 10mm, totaling four different operating conditions. 1000 sets of signal data were selected for each condition and divided into training, validation, and test sets in a 7:1.5:1.5 ratio. Each signal set contained 1024 sample data points, such as... Figure 2 The image shows the original acoustic signal waveforms under different operating conditions of the pipeline.

[0138] The input one-dimensional pipeline time-series signal is subjected to wavelet threshold filtering, followed by Gram angle difference field transformation based on local angle calculation and weighting improvement, enabling the one-dimensional time-series signal to be transformed into a two-dimensional image, such as... Figure 3 As shown, the weighted GADF matrix is ​​converted into a two-dimensional GADF image and output. The resulting image size is 224. 224.

[0139] Figure 6 The figure shows the accuracy and loss value iteration curves of this embodiment on the training set and validation set. The figure shows that the loss value converges quickly during the experimental training process, the accuracy rises rapidly to close to 1, and the validation set curve is close to the training curve, proving that there is no overfitting. Figure 7 This is a comparison chart of the true and predicted labels obtained by the multimodal feature extraction branch network in this embodiment on the test set. The chart shows that all samples under normal working conditions, 1mm, and 4mm were correctly predicted, while only 2 samples of 10mm were predicted as 1mm. Figure 6 and Figure 7 It can be seen that the oil and gas pipeline leakage detection method integrating multimodal features can classify and identify the four operating condition signals well, which further illustrates the effectiveness and feasibility of the present invention.

[0140] While the present invention has been disclosed above, its scope of protection is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, and all such changes and modifications will fall within the scope of protection of the present invention.

Claims

1. A method for fusion of multi-modal features for oil and gas pipeline leak detection, the method comprising: Includes the following steps: S100. The GADF method is improved by using wavelet threshold filtering and local angle calculation weighting to obtain a two-dimensional GADF image. include, The pipeline signal is acquired, and the input one-dimensional time-series signal of the pipeline is subjected to wavelet threshold filtering. Then, the Gram angle difference field transformation based on angle calculation weighting is performed to enable the one-dimensional time-series signal to complete the two-dimensional image conversion. S200. A multimodal feature extraction branch network is proposed, which includes extracting spatial features of two-dimensional images based on the Swin Transformer model and fusing them with temporal features extracted from one-dimensional signals using GRU to achieve cross-modal feature interaction fusion. S300, based on the weighted cross-attention mechanism (WMCA), fuses the extracted features and eliminates redundant information by calculating the feature importance weights; include, S310. Using spatial features as keys and values, and temporal features as queries, compute attention-enhanced representations of temporal features: wherein, denotes querying with temporal features, and denotes keying and valuing with spatial features; , and represent the attention triplet projection matrix under a specific feature type; is the source feature of the projected temporal feature as query, is the source feature of the projected spatial feature as both key and value. The spatial-temporal attention output is obtained through computation via the spatial-temporal attention submodule: in, It is a new temporal representation constrained by spatial characteristics; Indicates the scaling factor; S320. Using the obtained spatial and temporal features, with the temporal features as keys and values ​​and the spatial features as queries, calculate the attention-enhanced representation of the spatial features: in, This indicates a query based on spatial features. and This indicates that the key and value are based on time characteristics; , and The attention triplet projection matrix represents a specific feature type. The spatial features of the projection are used as the source features for the query. The temporal features of the projection serve as source features for both the key and the value. The spatial-temporal attention output is obtained through computation via the spatial-temporal attention submodule: in, It is a new temporal representation constrained by time characteristics; S330. Perform feature weighted fusion, fusing the original branch features with the corresponding attention-enhanced features according to a preset ratio: in, For balance parameters; The spatial features and temporal features, which have been processed separately by the weighted cross-attention mechanism module, are concatenated to obtain the final features fused by the weighted cross-attention mechanism. : The S400, after being processed by linear transformation and ReLU activation function, is input into a fully connected layer, and the output is the pipeline leak detection result.

2. The method for detecting oil and gas pipeline leaks by integrating multimodal features according to claim 1, characterized in that: In step S100, the following are included: S110. Set wavelet basis functions to perform multi-level decomposition on the acquired pipeline signal, including using wavelet basis functions to decompose the one-dimensional time-series pipeline signal. Layered wavelet decomposition yields wavelet coefficients, which include approximation coefficients and detail coefficients. include, S120. The processed approximation coefficients and detail coefficients are reconstructed into a denoised signal through inverse wavelet transform, and a truncation operation is performed to ensure that the reconstructed signal has the same length as the original signal. S130. Construct a local temporal correlation weight matrix. The values ​​of the elements in the weight matrix are dynamically adjusted according to the distance between the row and column indices. Elements within the local window are given enhancement weights, and elements outside the local window are given decay weights. S140. Calculate the weighted GADF matrix based on the angle sequence and the weight matrix: The elements of the matrix are the product of the sine of the angle difference and the corresponding weight, to obtain the weighted GADF matrix. Convert the weighted GADF matrix into a two-dimensional GADF image and output it.

3. The method for detecting oil and gas pipeline leaks by integrating multimodal features according to claim 2, characterized in that: In step S110, the noise standard deviation is estimated based on the median absolute deviation of the highest frequency detail coefficients. : in, These are the highest frequency detail coefficients in wavelet decomposition. This represents the maximum number of layers in the wavelet decomposition. Indicates the index position of the coefficient in this layer; Calculate the threshold for each layer of coefficients based on the signal length, and calculate the threshold for each layer of wavelet coefficients. : in, The signal length; Choose a soft or hard thresholding function to filter out wavelet coefficients containing noise and remove Gaussian noise.

4. The method for detecting oil and gas pipeline leaks by integrating multimodal features according to claim 3, characterized in that: In step S120, the processed one-dimensional time-series signal is normalized to the interval [-1, 1] to obtain the normalized signal. : in, This is a one-dimensional time-series signal after wavelet threshold filtering. Map the normalized signal to a range of An angle sequence, wherein each element in the angle sequence is the inverse cosine value of the corresponding element in the normalized signal. The formula is as follows: in, This is the normalized signal after wavelet threshold filtering.

5. The method for detecting oil and gas pipeline leaks by integrating multimodal features according to claim 4, characterized in that: In step S130, the local window and the weight matrix of the first... Line 1 Column elements The relationship between them is as follows: With the first The local window boundary centered on point A is: , in, This refers to the size of a local window. The total length of a one-dimensional time-series signal. This indicates the floor function, with a window range. Included with Local time points centered on; like Within a local window, i.e. The weights increase as the distance decreases, thus enhancing local temporal correlations. like Outside the local window, i.e. or The weight decreases exponentially with increasing distance, thus reducing interference from irrelevant regions. in, For time series points and The distance.

6. The method for detecting oil and gas pipeline leaks by integrating multimodal features according to claim 5, characterized in that: In step S140, element The calculation formula is: in, Indicates timing position and The angle difference, i.e., the trend of signal change. This represents the weight of local temporal correlation.

7. A leak detection system for oil and gas pipelines integrating multimodal features, characterized in that: The system has a program module corresponding to the steps of any one of the claims 1-6 above, and executes the steps in the above-described method for detecting oil and gas pipeline leaks by integrating multimodal features when it is run.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program configured to, when invoked by a processor, implement the steps of the oil and gas pipeline leakage detection method according to any one of claims 1-6, which integrates multimodal features.