Pipeline crack detection method, device, equipment and medium

By introducing a pipeline crack detection model with a dual-branch time domain feature extraction group, a multi-head self-attention mechanism and a dynamic feature enhancement module in pipeline detection, the problem of low pipeline detection accuracy in high temperature and high humidity environments is solved, and the effective extraction and accurate detection of high-dimensional features are achieved.

CN120404937BActive Publication Date: 2025-09-30BEIJING UNIV OF CIVIL ENG & ARCHITECTURE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510896632.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-09-30
Estimated Expiration
2045-07-01

AI Technical Summary

Technical Problem

Existing technologies have difficulty in effectively extracting high-dimensional features in pipeline detection, resulting in low detection accuracy. In particular, thermal pipelines operating in high temperature and high humidity environments are prone to deformation and cracking.

Method used

A pipeline crack detection model adopts a dual-branch time domain feature extraction group, a multi-head self-attention mechanism and a dynamic feature enhancement module. By acquiring time series signals, the multi-head self-attention mechanism is used to establish cross-domain dependencies. The dynamic feature enhancement module is combined to calculate the convolution kernel size and output multi-scale features to improve detection accuracy.

Benefits of technology

The local detail features and global features of the pipeline are effectively extracted, which improves the accuracy and positioning precision of pipeline crack detection and solves the problem of difficulty in extracting high-dimensional features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120404937B_ABST
    Figure CN120404937B_ABST
Patent Text Reader

Abstract

The present application discloses a pipeline crack detection method, apparatus, equipment, and medium, relating to the technical field of pipeline detection. The method comprises: obtaining a time series signal for detecting a target pipeline; the time series signal comprises a plurality of signal samples, each signal sample corresponds to an ultrasonic guided wave signal at a time point, and the ultrasonic guided wave signal at each time point is an ultrasonic guided wave signal transmitted from one end of the target pipeline and received from the other end; inputting the time series signal into a pipeline crack detection model, and outputting a crack detection result; the pipeline crack detection model comprises a dynamic feature enhancement module, the dynamic feature enhancement module is used to output multi-scale features according to different convolution kernel sizes; one signal sample corresponds to one sample feature vector. The present application can improve the accuracy of pipeline crack detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of pipeline detection, and in particular to a pipeline crack detection method, device, equipment and medium. Background Art

[0002] Pipelines have been widely used in the field of long-distance energy transportation due to their efficient transportation capacity and low economic cost, which is crucial for economic construction and infrastructure development. Especially in the thermal energy industry, thermal pipelines, as common pipelines for transmitting thermal energy, play a key role in modern urban heating systems. Spiral welded pipes have been widely used in thermal pipeline systems due to their low cost and high production efficiency. However, as high-temperature and pressurized equipment, thermal pipelines operate in a high-temperature and high-humidity environment for a long time. They are affected by various factors such as the properties of the medium and are prone to problems such as pipeline deformation and cracking, which directly affect the performance and quality of thermal pipelines. Therefore, it is particularly important to research and develop scientific and reasonable pipeline detection methods. At present, in the process of using deep learning algorithms for pipeline detection, there is a problem that high-dimensional features cannot be effectively extracted, which affects the accuracy of pipeline inspection. Summary of the Invention

[0003] The purpose of this application is to provide a pipeline crack detection method, device, equipment and medium, which can improve the accuracy of pipeline crack detection.

[0004] To achieve the above objectives, this application provides the following solutions:

[0005] In a first aspect, the present application provides a pipeline crack detection method, comprising:

[0006] Acquire a time series signal for detecting the target pipeline; the time series signal includes a plurality of signal samples, each signal sample corresponds to an ultrasonic guided wave signal at a time point, and the ultrasonic guided wave signal at each time point is an ultrasonic guided wave signal transmitted from one end of the target pipeline and received from the other end;

[0007] The time series signal is input into a pipeline crack detection model, and a crack detection result is output; the pipeline crack detection model includes a dual-branch time domain feature extraction group, a multi-head self-attention mechanism and a dynamic feature enhancement module, the dual-branch time domain feature extraction group is used to extract time domain features from each signal sample, the time domain features include high-frequency local defect features and low-frequency global structural features, the output of the dual-branch time domain feature extraction group is connected to the input of the multi-head self-attention mechanism, the output of the multi-head self-attention mechanism and the output of the dual-branch time domain feature extraction group are added to form multiple sample feature vectors, the multiple sample feature vectors are input into the dynamic feature enhancement module, the dynamic feature enhancement module is used to calculate a convolution kernel size according to each input sample feature vector, and output multi-scale features according to different convolution kernel sizes; one signal sample corresponds to one sample feature vector.

[0008] Optionally, the dual-branch time-domain feature extraction group includes a first feature extraction branch and a second feature extraction branch;

[0009] The first feature extraction branch includes a first convolutional layer, a ReLU activation function, and a first maximum pooling layer connected in sequence; the second feature extraction branch includes a second convolutional layer, a LeakyReLU activation function, and a second maximum pooling layer connected in sequence;

[0010] The first feature extraction branch is used to extract high-frequency local defect features from each signal sample, and the second feature extraction branch is used to extract low-frequency global structural features from each signal sample.

[0011] Optionally, the multi-head self-attention mechanism is an enhanced multi-head self-attention mechanism, and the attention calculation formula of the enhanced multi-head self-attention mechanism is expressed as:

[0012] ;

[0013] ;

[0014] in, is attention, Q represents query matrix, K represents key matrix, V represents value matrix, and superscript T represents transpose. is the dimension of the key vector, P represents the temporal position information, is the time domain feature output by the dual-branch time domain feature, is the learned query weight matrix, is the learned key weight matrix, is the learned value weight matrix.

[0015] Optionally, the dynamic feature enhancement module includes a forward feedback network and two dynamic feature perception convolution units with the same structure connected in sequence. The output of the first dynamic feature perception convolution unit passes through the forward feedback network and is connected to the output of the first dynamic feature perception convolution unit to input the second dynamic feature perception convolution unit. The input of the first dynamic feature perception convolution unit is the input of the dynamic feature enhancement module, and the output of the second dynamic feature perception convolution unit is the output of the dynamic feature enhancement module.

[0016] Each dynamic feature perception convolution unit includes a formula for calculating the convolution kernel size. The formula for calculating the convolution kernel size is expressed as:

[0017] ;

[0018] in, is the convolution kernel size calculated based on the ith sample feature vector, is the ith sample feature vector, is the mean of the eigenvector of the i-th sample, is the standard deviation of the eigenvector of the i-th sample, and are adjustment parameters, Indicates rounding operation, The () function is used to limit the convolution kernel size to between 3 and 25.

[0019] Optionally, each dynamic feature perception convolution unit includes a parallel dynamic single-scale branch, a fixed multi-scale branch and a nonlinear enhancement branch;

[0020] The calculation formula of the dynamic single-scale branch is:

[0021] ;

[0022] in, ,…, ; ,…, ; ,…, ;

[0023] ;

[0024] ;

[0025] in, is the convolution kernel size calculated based on the ith sample feature vector, Indicates that the jth feature in the i-th sample feature vector adopts The convolution kernel is performed The output of the strided convolution operation; m is the number of features; is a constant, ; Indicates the convolution operation on the i-th sample. The tth data point of the convolution window in the slide; t is the relative position index in the convolution kernel window; Represents the convolution weight coefficient of the j-th convolution kernel at the t-th data point position, represents the bias term, k represents the number of convolution kernels; is the feature mean of the jth feature in the feature vector of the i-th sample in the dynamic single-scale branch, represents the standard deviation of the jth feature in the feature vector of the i-th sample in the dynamic single-scale branch;

[0026] The calculation formula of the fixed multi-scale branch is:

[0027] ;

[0028] ;

[0029] ;

[0030] ;

[0031] in, is the sth preset convolution kernel size, Indicates that the jth feature in the i-th sample feature vector adopts The convolution kernel is performed The output of the strided convolution operation, () represents the splicing function, The convolution output splicing results of different preset convolution kernel sizes are: is the feature mean of the jth feature in the feature vector of the i-th sample in the fixed multi-scale branch, is the standard deviation of the jth feature in the feature vector of the i-th sample in the fixed multi-scale branch, 、 and These are the first, second, and third preset convolution kernel sizes respectively; 、 and The jth feature in the i-th sample feature vector is respectively 、 and The preset convolution kernel size is used for the first The output of the strided convolution operation;

[0032] The calculation formula of the nonlinear enhancement branch is:

[0033] ;

[0034] ;

[0035] ;

[0036] in, is a nonlinear activation function, The feature mean of the jth feature in the feature vector of the i-th sample in the nonlinear enhancement branch, is the standard deviation of the jth feature in the ith sample feature vector in the nonlinear enhancement branch, is the convolution sum of the dynamic single-scale branch output, () is layer normalization, It is the enhanced feature after layer normalization;

[0037] The output of each dynamic feature perception convolution unit is expressed as: ,in, Fix the convolution sum of the multi-scale branch outputs.

[0038] Optionally, the pipeline crack detection model also includes a classifier, the input of the classifier is connected to the output of the dynamic feature enhancement module, the classifier adopts an improved residual regressor, and the improved residual regressor includes six parts connected in sequence, the first part includes a convolution operation, normalization, ReLU activation function and maximum pooling connected in sequence; the second part includes 3 residual blocks connected in sequence, the third part includes 4 residual blocks connected in sequence, the fourth part includes 6 residual blocks connected in sequence, the fifth part includes 3 residual blocks connected in sequence, and the sixth part includes average pooling, a fully connected layer and a Softmax function connected in sequence.

[0039] Optionally, the pipeline crack detection model is obtained by training a target neural network using a training set;

[0040] Each sample data in the training set includes input data and label data, wherein the input data is a time series signal sample, and the label data includes a classification result, wherein the classification result includes whether there is a crack or no crack. If there is a crack, the label data also includes the crack location;

[0041] The sample data in the training set are obtained by simulating actual cracks on spiral welded pipe test pieces.

[0042] In a third aspect, the present application provides a pipeline crack detection device, which applies any of the pipeline crack detection methods described above, and includes:

[0043] A time series signal acquisition module is used to acquire a time series signal for detecting a target pipeline; the time series signal includes a plurality of signal samples, each signal sample corresponds to an ultrasonic guided wave signal at a time point, and the ultrasonic guided wave signal at each time point is an ultrasonic guided wave signal transmitted from one end of the target pipeline and received from the other end;

[0044] A crack detection module is configured to input the time series signal into a pipeline crack detection model and output crack detection results. The pipeline crack detection model includes a dual-branch time-domain feature extraction group, a multi-head self-attention mechanism, and a dynamic feature enhancement module. The dual-branch time-domain feature extraction group is configured to extract time-domain features from each signal sample. The time-domain features include high-frequency local defect features and low-frequency global structural features. The output of the dual-branch time-domain feature extraction group is connected to the input of the multi-head self-attention mechanism. The output of the multi-head self-attention mechanism and the output of the dual-branch time-domain feature extraction group are added to form multiple sample feature vectors. The multiple sample feature vectors are input into the dynamic feature enhancement module. The dynamic feature enhancement module is configured to calculate a convolution kernel size based on each input sample feature vector and output multi-scale features based on different convolution kernel sizes. One signal sample corresponds to one sample feature vector.

[0045] In a third aspect, the present application provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any one of the above-described pipeline crack detection methods.

[0046] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the above-mentioned pipeline crack detection methods.

[0047] According to the specific embodiments provided in this application, this application discloses the following technical effects: This application provides a pipeline crack detection method, device, equipment and medium. The dynamic feature enhancement module of this application is used to calculate a convolution kernel size based on each input sample feature vector, and output multi-scale features according to different convolution kernel sizes. It can capture the local detail features and global features of the time series signal, thereby effectively extracting high-dimensional features and improving the accuracy of pipeline crack detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0049] Figure 1 A schematic flow chart of a pipeline crack detection method provided in one embodiment of the present application.

[0050] Figure 2 A schematic diagram of the structure of a dual-branch time-domain feature extraction group provided in one embodiment of the present application.

[0051] Figure 3 A block diagram of the multi-head attention mechanism principle provided for one embodiment of the present application.

[0052] Figure 4 Schematic diagram of the dynamic feature perception convolution unit provided in one embodiment of the present application.

[0053] Figure 5 A schematic diagram of the structure of the ResNet-Lite network provided in one embodiment of the present application.

[0054] Figure 6 A schematic diagram of the pipeline crack detection model structure provided in one embodiment of the present application.

[0055] Figure 7 A schematic diagram of the functional modules of a pipeline crack detection device provided in one embodiment of the present application.

[0056] Figure 8 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0058] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0059] In an exemplary embodiment, the present application provides a pipeline crack detection method, such as Figure 1 As shown, the pipeline crack detection method includes steps 101 and 102.

[0060] Step 101: Acquire a time series signal for detecting a target pipeline; the time series signal includes multiple signal samples, each signal sample corresponds to an ultrasonic guided wave signal at a time point, and the ultrasonic guided wave signal at each time point is an ultrasonic guided wave signal transmitted from one end of the target pipeline and received from the other end.

[0061] Step 102: Input the time series signal into the pipeline crack detection model and output the crack detection result; the pipeline crack detection model includes a dual-branch time domain feature extraction group, a multi-head self-attention mechanism and a dynamic feature enhancement module, the dual-branch time domain feature extraction group is used to extract time domain features from each signal sample, the time domain features include high-frequency local defect features and low-frequency global structure features, the output of the dual-branch time domain feature extraction group is connected to the input of the multi-head self-attention mechanism, the output of the multi-head self-attention mechanism and the output of the dual-branch time domain feature extraction group are added to form multiple sample feature vectors, the multiple sample feature vectors are input into the dynamic feature enhancement module, the dynamic feature enhancement module is used to calculate a convolution kernel size according to each input sample feature vector, and output multi-scale features according to different convolution kernel sizes; one signal sample corresponds to one sample feature vector.

[0062] In an exemplary embodiment, step 101 specifically includes: obtaining a time-space mixed signal of the pipeline ultrasonic guided wave through a sensor, generating a time series signal with a position tag, that is, a time series matrix , where n is the number of sampling points and m is the feature dimension.

[0063] The location tag binds the time series signal of ultrasonic guided waves with the spatial position information of the pipeline through the fusion of spatiotemporal features. This not only provides a supervision signal with clear physical meaning for the pipeline crack detection model (supporting crack location), but also enhances the scenario adaptability of the signal features (such as distinguishing interference and compensating for attenuation). It is the key prior information for realizing "classification + regression" multi-task detection.

[0064] In an exemplary embodiment, the target pipeline is a spiral welded pipeline. The sensors include a transmitting sensor and a receiving sensor, one at one end of the target pipeline and the other at the other. The transmitting sensor is an MsSR3030R sensor, with parameters listed in Table 1. The receiving sensor is an NI PXIe-5160 data acquisition card. A function generator (Agilent 33220A) generates a 32 kHz Hanning window modulated ultrasonic guided wave pulse signal. Data acquisition is performed using the NI PXIe-5160 data acquisition card. To preprocess the collected signals, the direct current (DC) component is removed and the signal amplitude is normalized to the range [-1, 1].

[0065] Table 1 Parameters of MsSR3030R sensor

[0066]

[0067] Signal samples refer to samples collected at a sampling frequency of 250 kHz. Each signal sample has 2068 time points.

[0068] In an exemplary embodiment, the present application converts the time series matrix Input the multi-scale feature fusion network, which includes a dual-branch time domain feature extraction group and a dynamic feature enhancement module.

[0069] like Figure 2 As shown, the dual-branch time domain feature extraction group includes a first feature extraction branch and a second feature extraction branch, wherein the first feature extraction branch is used to extract high-frequency local defect features. The second feature extraction branch is used to extract low-frequency global structural features .

[0070] The first feature extraction branch and the second feature extraction branch are both one-dimensional convolution groups.

[0071] The dual-branch time domain feature extraction group extracts high-frequency local defect features through parallel one-dimensional convolution groups with expansion rates of 1 and 5, respectively. and low-frequency global structural features .

[0072] The first feature extraction branch includes a first convolutional layer, a ReLU activation function, and a first maximum pooling layer connected in sequence; the second feature extraction branch includes a second convolutional layer, a LeakyReLU activation function, and a second maximum pooling layer connected in sequence.

[0073] The kernel size of the convolution layer of the first feature extraction branch is , expansion rate is 1, 32 output channels. The second feature extraction branch extracts low-frequency features, and the convolution layer kernel size is , dilation rate is 5, 64 output channels.

[0074] A multi-head self-attention mechanism is used in the multi-scale feature fusion network to achieve cross-domain dependencies. This enhanced self-attention mechanism establishes long-range dependencies between feature points across intervals in a time series, addressing the problem of feature correlation loss caused by attenuation of ultrasonic guided wave signals after long-distance propagation.

[0075] Use enhanced multi-head attention mechanism to calculate the dependency weights between feature points , the formula is:

[0076] .

[0077] in, and are all weight matrices, is the dimension of the feature vector, is the key vector dimension, is the time position encoding vector, The dimension is data collection.

[0078] The input of the enhanced multi-head self-attention mechanism is the output features of the dual-branch time domain feature extraction group , is the sequence length, D=96 is the feature dimension, for The data set of dimension N is the number of sampling points, which is 2068 in the data set. The enhanced multi-head self-attention mechanism specifically includes the following contents.

[0079] (1) Injection time position coding: ,in, is the time position code at time step i position code dimension j, each Constructing a time position encoding vector .

[0080] The temporal position information is generated by the sine function to avoid the recursive calculation of the recurrent neural network.

[0081] (2) The input features are transformed into queries, keys, and values ​​through three different linear transformations: .

[0082] in, , , , each attention head dimension =64.

[0083] (3) Calculation of attention to scaled dot products:

[0084] ;

[0085] .

[0086] in, is the i-th attention head, The dimension of the key vector is scaled to prevent the dot product from being too large.

[0087] (4) Multi-head splicing and fusion: .

[0088] in, Represents the output of multi-head splicing and fusion, represents the output linear transformation matrix, , for A collection of dimensional data.

[0089] In an exemplary embodiment, Figure 6 As shown, the pipeline crack detection model also includes a classifier, the input of which is connected to the output of the dynamic feature enhancement module, and the classifier uses an improved residual regressor (ResNet-Lite). The improved residual regressor outputs the probability of crack existence. and location coordinates , supporting classification and regression multi-task output.

[0090] The loss function during the pipeline crack detection model training process is: .

[0091] in, L is the total loss value, is the cross entropy loss, is the average error loss.

[0092] The improved residual regressor consists of 33 convolutional layers and 1 fully connected layer. Specifically, the ResNet-Lite network includes six parts connected in sequence, such as Figure 5 As shown in the figure, the first to sixth parts (corresponding to steps 1 to 6) include the first part (convolutional layer 1) consisting of a sequentially connected convolution operation (kernel size 7×7, stride 2), normalization, ReLU activation function, and max pooling (stride 2); the second part (convolutional layer 2) consists of a sequentially connected three residual blocks, the third part (convolutional layer 3) consists of a sequentially connected four residual blocks, the fourth part (convolutional layer 4) consists of a sequentially connected six residual blocks, the fifth part (convolutional layer 5) consists of a sequentially connected three residual blocks, and the sixth part consists of a sequentially connected average pooling layer, a fully connected layer, and a softmax function. Each residual block contains two 3×3 convolutional layers, with skip connections to prevent gradient vanishing.

[0093] The sixth step converts the feature map (7×7×2048) output from the fifth step into a feature vector through global average pooling. The fully connected layer then outputs the classification or regression result. The ResNet-Lite network uses a 224×224×3 image as input. After the convolutions in the first five steps, the output is a 7×7×2048-dimensional feature map.

[0094] This application uses a pre-trained ResNet-Lite network for feature extraction and classification, with the linear layer outputting predictions. In classification tasks, the output is represented by the probability distribution of each category; in regression tasks, it is the corresponding target value.

[0095] (1) Input adaptation layer: .

[0096] in, represents the dimension adjustment function, is the feature after dimension adjustment, represents the features before dimension adjustment, Indicates the index of dimension expansion, which is used to construct a pseudo image format (single channel) so that one-dimensional time series signals can be input into ResNet.

[0097] Expand the one-dimensional features into a pseudo-image format, is a constant, Adapting ResNet input size through interpolation.

[0098] (2) Backbone network: Improved based on ResNet34, including:

[0099] Convolutional layer 1: Convolution (stride 2), normalization, ReLU, and max pooling (stride 2);

[0100] Residual block configuration: [3,4,6,3] blocks;

[0101] Global average pooling layer: output feature vector dimension is 2048.

[0102] (3) Multi-tasking head:

[0103] Classification branch: fully connected layer + Softmax, output dimension (with cracks / without cracks);

[0104] Regression branch: fully connected layer, output dimension 1 (defect location coordinates, unit: meter);

[0105] Loss function: , =0.5.

[0106] During the ResNet-Lite network training process, the optimizer used was the Adam optimizer (learning rate 1×10 −4 , weight decay 5×10 −5 ), batch size 32, and training epochs 50.

[0107] The local features extracted by the dual-branch time domain feature extraction group of this application and the global dependency relationship established by the multi-head attention module are fused with the adaptive convolution kernel to form a high-dimensional feature matrix The ResNet-Lite network is used to further extract deep abstract features, ultimately achieving classification (defect existence) and regression (defect location) tasks.

[0108] The attention mechanism determines the importance of certain elements by calculating the relationship between the elements in the time series. The core is to use the calculated attention weight as the input feature to obtain the weighted output. Figure 4 As shown in Figure 3, the multi-head attention mechanism distributes attention to different representation subspaces, enabling the pipeline crack detection model to learn the intrinsic connections of input data from multiple perspectives.

[0109] The multi-head attention module adopts a customized multi-head attention mechanism to establish global dependencies between features at different positions in the sequence, enabling the pipeline crack detection model to identify key features in the time series and solve the long-distance dependency problem.

[0110] The time series signal is converted into a high-dimensional feature vector through the embedding layer. The embedding layer is connected to the output of the one-dimensional convolution kernel module.

[0111] Figure 3 In the code, mask(opt.) represents an optional masking operation, where mask stands for mask and opt. stands for optional. This can be used in pipeline detection tasks that require processing variable-length signals or limiting contextual dependencies. Scale represents a scaling operation, which normalizes the dot-product attention result. This prevents excessively large dot-product results from causing the softmax function gradient to vanish, ensuring the numerical stability of the attention weights. MatMul represents matrix multiplication.

[0112] The dynamic feature enhancement module includes a forward feedback network and two dynamic feature perception convolution units with the same structure connected in sequence. The output of the first dynamic feature perception convolution unit passes through the forward feedback network and is connected to the output of the first dynamic feature perception convolution unit to input the second dynamic feature perception convolution unit. The input of the first dynamic feature perception convolution unit is the input of the dynamic feature enhancement module, and the output of the second dynamic feature perception convolution unit is the output of the dynamic feature enhancement module.

[0113] The dynamic feature perception convolution unit of this application combines the multi-head attention mechanism with the feedforward network architecture, and combines the input features with the attention output through residual connections, thereby enhancing the influence of global features while retaining the original features. It is output through the feedforward network again and then subjected to a residual connection to enhance the representation ability of the time series, so that the pipeline crack detection model can have a deeper understanding of the complex sequence features. The dynamic feature perception convolution unit includes two cascaded dynamic feature perception convolution units. The structure of the dynamic feature perception convolution unit is as follows: Figure 4 shown.

[0114] The input features of the dynamic feature perception convolution unit are the output of the multi-head attention module, with the dimension of ,in, Represents the feature dimension of each attention head in the multi-head attention module.

[0115] In an exemplary embodiment, a dynamic adjustment strategy is adopted, that is, the size of the convolution kernel is adjusted as part of the data features in a data-driven manner to achieve the adaptation of the convolution kernel size to the original data set.

[0116] Each dynamic feature perception convolution unit includes a formula for calculating the convolution kernel size. The formula for calculating the convolution kernel size is expressed as: .

[0117] in, is the convolution kernel size calculated based on the ith sample feature vector, is the ith sample feature vector, is the mean of the eigenvector of the i-th sample, is the standard deviation of the eigenvector of the i-th sample, and are adjustment parameters, Indicates rounding operation, The () function is used to limit the convolution kernel size to between 3 and 25.

[0118] This application adopts a dynamic adjustment strategy, that is, in a data-driven way, the size of the convolution kernel is adjusted as part of the data features to make the convolution kernel size adapt to the original data set.

[0119] The convolution kernel size is calculated using the convolution kernel size calculation formula, where: , , ensuring that the kernel size adapts to the data characteristics.

[0120] In an exemplary embodiment, each dynamic feature-aware convolution unit includes a parallel dynamic single-scale branch, a fixed multi-scale branch, and a nonlinear enhancement branch.

[0121] Calculate the data features of the original data set and determine the dynamic convolution kernel size. In the dynamic single-scale branch, multiple convolution kernels of different sizes are adaptively generated based on the data features of the original data set. 、 and .

[0122] The calculation formula of the dynamic single-scale branch is:

[0123] ;

[0124] in, ,…, ; ,…, ; ,…, ;

[0125] ;

[0126] ;

[0127] in, is the convolution kernel size calculated based on the ith sample feature vector, Indicates that the jth feature in the i-th sample feature vector adopts The convolution kernel is performed The output of the strided convolution operation; is the number of features; is a constant, ; Indicates the convolution operation on the i-th sample. The tth data point of the convolution window in the slide; t is the relative position index in the convolution kernel window; Represents the convolution weight coefficient of the j-th convolution kernel at the t-th data point position, represents the bias term, k represents the number of convolution kernels; is the feature mean of the jth feature in the feature vector of the i-th sample in the dynamic single-scale branch, represents the standard deviation of the jth feature in the feature vector of the i-th sample in the dynamic single-scale branch;

[0128] The dynamic feature-aware convolutional unit is expressed as: , where M is The set of S is A collection of .

[0129] The calculation formula of the fixed multi-scale branch is:

[0130] This formula operates on convolution kernels of different sizes. The dynamic feature-aware convolution unit can capture both local details and global features of the original dataset. For each convolution output, a new convolution output matrix is ​​calculated.

[0131] ; This formula is used to concatenate the outputs of multiple convolution kernels of different sizes.

[0132] ;

[0133] .

[0134] in, is the sth preset convolution kernel size, Indicates that the jth feature in the i-th sample feature vector adopts The convolution kernel is performed The output of the strided convolution operation, () represents the splicing function, The convolution output splicing results of different preset convolution kernel sizes are: is the feature mean of the jth feature in the feature vector of the i-th sample in the fixed multi-scale branch, is the standard deviation of the jth feature in the feature vector of the i-th sample in the fixed multi-scale branch, 、 and These are the first, second, and third preset convolution kernel sizes respectively; 、 and The jth feature in the i-th sample feature vector is respectively 、 and The preset convolution kernel size is used for the first The output of the strided convolution operation, () represents the concatenation function.

[0135] For example, the fixed multi-scale branch uses a predefined set of kernel sizes Parallel convolution to generate cross-scale features And splice to generate cross-scale feature representation , .

[0136] in, These represent predefined kernel sizes of 5, 11, and 19, respectively.

[0137] The nonlinear enhancement branch adds a learnable nonlinear activation function.

[0138] function , x is the input variable.

[0139] By layer normalization, feature discriminability is enhanced, which can be expressed as: .

[0140] in, is the convolution sum of the dynamic single-scale branch output, () indicates layer normalization, For the features after layer normalization enhancement, through "activation + layer normalization", feature standardization, discriminability enhancement and training stability are achieved, providing high-quality nonlinear defect features for subsequent modules, supporting the high-precision performance of this application in industrial ultrasonic testing.

[0141] The calculation formula of the nonlinear enhancement branch is:

[0142] ;

[0143] .

[0144] in, is a nonlinear activation function, The feature mean of the jth feature in the feature vector of the i-th sample in the nonlinear enhancement branch, is the standard deviation of the jth feature in the feature vector of the i-th sample in the nonlinear enhancement branch.

[0145] Multi-scale convolution kernel generation includes: generating convolution kernels of 3 predefined sizes (such as =7, =15, =21), through the formula Calculate the output at each scale and splice it into multi-scale features .

[0146] The output of each dynamic feature perception convolution unit is expressed as ,in, is the convolution sum of the fixed multi-scale branch outputs.

[0147] This application defines the collected time series signal (a data set of ultrasonic guided wave signals) as a convolution kernel. Using a dynamic adjustment strategy, the convolution kernel size is adjusted as part of the data features to ensure that the convolution kernel size is compatible with the original collected data set, i.e., the time series signal. The data features of the original data set are calculated to determine the adaptive convolution kernel size. The dynamic feature-aware convolution unit is capable of capturing both local detail features and global features of the original data set. A dual-branch time-domain feature extraction group captures local features, while an exchange (EXCHANGE) captures global features. EXCHANGE is the output of the dynamic feature-aware convolution unit, and a multi-head attention mechanism captures long-range dependencies between different locations.

[0148] This application proposes a dynamic kernel-driven multi-scale feature extraction method that uses feature vector statistics (mean / standard deviation) to dynamically generate convolution kernel sizes and combines three-branch fusion to achieve multi-scale feature enhancement.

[0149] In an exemplary embodiment, the pipeline crack detection model is obtained by training a target neural network using a training set.

[0150] Each sample data in the training set includes input data and label data, the input data is a time series signal sample, the label data includes a classification result, and the classification result includes whether there is a crack or not. If there is a crack, the label data also includes the crack position.

[0151] The sample data in the training set are obtained by simulating actual cracks on spiral welded pipe test pieces.

[0152] This application dataset was generated by simulating actual cracks on real spiral welded pipe specimens. The dataset captures the time series of ultrasonic guided waves generated by the pipes. This improves the detection of spiral welded pipe defects in pipelines. The dataset is divided into training and test sets.

[0153] The spiral welded pipes are compared with the pipes without spiral welds, and the two sets of data are classified to extract the signal area caused by the spiral welds in the ultrasonic guided wave signal to avoid the influence of the spiral welds during detection.

[0154] Given the current low failure rate of pipelines and the difficulty of on-site inspection, obtaining accurate defect data is challenging. Therefore, the experimental subjects, namely time series signal samples, were obtained by attaching test specimens to real spiral welded pipelines to simulate actual cracks. These time series signal samples represent the changes in the time series of ultrasonic guided waves in the pipelines, thus improving the detection technology for spiral welded pipelines. The parameters of the spiral welded pipelines are shown in Table 2 below.

[0155] Table 2 Parameters of spiral welded pipes

[0156]

[0157] A 32kHz sensor was installed at one end of the pipeline, designated as the origin. Defects were simulated at various locations at 0.5m, 1.5m, 3m, 4.6m, 6m, 7.4m, 9m, 10.5m, and 12m from the origin. The dataset, shown in Table 3, contains 1652 signal samples, each containing 2068 time points. This dataset incorporates various scenarios that may be encountered during actual signal acquisition, ensuring the authenticity of the experimental results. As shown in Table 3, some signals contain zero noise due to factors such as pipe supports, wrapping, slight deformation of pipe sections, and the performance of the inspection equipment. The experiment performed classification (defect detection) and regression (defect location) tasks on data with a high signal-to-noise ratio (≥1.2), and regression tasks on data with a low signal-to-noise ratio (<1.2) and zero noise.

[0158] Table 3 Dataset information

[0159]

[0160] The spiral welded pipes are compared with the pipes without spiral welds, and the two sets of data are classified to extract the signal area caused by the spiral welds in the ultrasonic guided wave signal to avoid the influence of the spiral welds during detection.

[0161] The dynamic feature-sensing convolution unit proposed in this application can effectively extract height features from time series, effectively improving the accuracy and positioning precision of pipeline crack detection. Because ultrasonic guided waves propagate through spiral welds, they cause signal attenuation and reflection in the weld area, making the signal in this area complex. This application's method can effectively extract the signal area of ​​the spiral weld and the signal area of ​​the defect, avoiding the impact of the spiral weld on detection. This application can process large amounts of data samples, accurately identify pipeline defects, and locate the defect location.

[0162] Based on the same inventive concept, embodiments of the present application also provide a pipeline crack detection device for implementing the aforementioned pipeline crack detection method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more pipeline crack detection device embodiments provided below can be found in the limitations of the pipeline crack detection method described above and will not be further elaborated here.

[0163] In an exemplary embodiment, Figure 7 As shown, a pipeline crack detection device is provided, which includes the following modules.

[0164] A time series signal acquisition module is used to acquire a time series signal for detecting a target pipeline; the time series signal includes multiple signal samples, each signal sample corresponds to an ultrasonic guided wave signal at a time point, and the ultrasonic guided wave signal at each time point is an ultrasonic guided wave signal transmitted from one end of the target pipeline and received from the other end.

[0165] A crack detection module is configured to input the time series signal into a pipeline crack detection model and output a crack detection result. The pipeline crack detection model includes a dual-branch time domain feature extraction group, a multi-head self-attention mechanism, and a dynamic feature enhancement module. The dual-branch time domain feature extraction group is configured to extract time domain features from each signal sample. The time domain features include high-frequency local defect features and low-frequency global structural features. The output of the dual-branch time domain feature extraction group is connected to the input of the multi-head self-attention mechanism. The output of the multi-head self-attention mechanism and the output of the dual-branch time domain feature extraction group are added to form multiple sample feature vectors. The multiple sample feature vectors are input into the dynamic feature enhancement module. The dynamic feature enhancement module is configured to calculate a convolution kernel size based on each input sample feature vector and output multi-scale features based on different convolution kernel sizes. One signal sample corresponds to one sample feature vector.

[0166] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store pipeline crack detection data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a pipeline crack detection method is implemented.

[0167] Those skilled in the art will understand that Figure 8 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application and does not constitute a limitation on the computer device to which the solution of the present application is applied. A specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement. In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the above-mentioned method embodiments when executing the computer program.

[0168] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0169] It should be noted that the collection, use and processing of user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application must comply with relevant regulations.

[0170] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0171] The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units, graphics processing units, digital signal processors, data processing logic of programmable logic devices, and the like.

[0172] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0173] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A pipeline crack detection method, characterized in that: The pipeline crack detection method comprises: Acquire a time series signal for detecting the target pipeline; the time series signal includes a plurality of signal samples, each signal sample corresponds to an ultrasonic guided wave signal at a time point, and the ultrasonic guided wave signal at each time point is an ultrasonic guided wave signal transmitted from one end of the target pipeline and received from the other end; The time series signal is input into a pipeline crack detection model, and a crack detection result is output; the pipeline crack detection model includes a dual-branch time domain feature extraction group, a multi-head self-attention mechanism and a dynamic feature enhancement module, the dual-branch time domain feature extraction group is used to extract time domain features from each signal sample, the time domain features include high-frequency local defect features and low-frequency global structural features, the output of the dual-branch time domain feature extraction group is connected to the input of the multi-head self-attention mechanism, the output of the multi-head self-attention mechanism and the output of the dual-branch time domain feature extraction group are added to form multiple sample feature vectors, the multiple sample feature vectors are input into the dynamic feature enhancement module, the dynamic feature enhancement module is used to calculate a convolution kernel size according to each input sample feature vector, and output multi-scale features according to different convolution kernel sizes; one signal sample corresponds to one sample feature vector.

2. The pipeline crack detection method according to claim 1, characterized in that: The dual-branch time-domain feature extraction group includes a first feature extraction branch and a second feature extraction branch; The first feature extraction branch includes a first convolutional layer, a ReLU activation function, and a first maximum pooling layer connected in sequence; the second feature extraction branch includes a second convolutional layer, a LeakyReLU activation function, and a second maximum pooling layer connected in sequence; The first feature extraction branch is used to extract high-frequency local defect features from each signal sample, and the second feature extraction branch is used to extract low-frequency global structural features from each signal sample.

3. The pipeline crack detection method according to claim 1, characterized in that: The multi-head self-attention mechanism is an enhanced multi-head self-attention mechanism. The attention calculation formula of the enhanced multi-head self-attention mechanism is expressed as: ; ; in, is attention, Q represents query matrix, K represents key matrix, V represents value matrix, and superscript T represents transpose. is the dimension of the key vector, P represents the temporal position information, is the time domain feature output by the dual-branch time domain feature, is the learned query weight matrix, is the learned key weight matrix, is the learned value weight matrix.

4. The pipeline crack detection method according to claim 1, characterized in that: The dynamic feature enhancement module includes a forward feedback network and two dynamic feature perception convolution units with the same structure connected in sequence. The output of the first dynamic feature perception convolution unit passes through the forward feedback network and is connected to the output of the first dynamic feature perception convolution unit and input into the second dynamic feature perception convolution unit. The input of the first dynamic feature perception convolution unit is the input of the dynamic feature enhancement module, and the output of the second dynamic feature perception convolution unit is the output of the dynamic feature enhancement module. Each dynamic feature perception convolution unit includes a formula for calculating the convolution kernel size. The formula for calculating the convolution kernel size is expressed as: ; in, is the convolution kernel size calculated based on the ith sample feature vector, is the ith sample feature vector, is the mean of the eigenvector of the i-th sample, is the standard deviation of the eigenvector of the i-th sample, and are adjustment parameters, Indicates rounding operation, The () function is used to limit the convolution kernel size to between 3 and 25.

5. The pipeline crack detection method according to claim 4, characterized in that: Each dynamic feature perception convolution unit includes a parallel dynamic single-scale branch, a fixed multi-scale branch, and a nonlinear enhancement branch; The calculation formula of the dynamic single-scale branch is: ; in, ,…, ; ,…, ; ,…, ; ; ; in, is the convolution kernel size calculated based on the ith sample feature vector, Indicates that the jth feature in the i-th sample feature vector adopts The convolution kernel is The output of the strided convolution operation; m is the number of features; is a constant, ; Indicates the convolution operation on the i-th sample. The tth data point of the convolution window in the slide; t is the relative position index in the convolution kernel window; Represents the convolution weight coefficient of the j-th convolution kernel at the t-th data point position, represents the bias term, k represents the number of convolution kernels; is the feature mean of the jth feature in the feature vector of the i-th sample in the dynamic single-scale branch, represents the standard deviation of the jth feature in the feature vector of the i-th sample in the dynamic single-scale branch; The calculation formula of the fixed multi-scale branch is: ; ; ; ; in, is the sth preset convolution kernel size, Indicates that the jth feature in the i-th sample feature vector adopts The convolution kernel is The output of the strided convolution operation, () represents the splicing function, The convolution output splicing results of different preset convolution kernel sizes are: is the feature mean of the jth feature in the feature vector of the i-th sample in the fixed multi-scale branch, is the standard deviation of the jth feature in the feature vector of the i-th sample in the fixed multi-scale branch, 、 and These are the first, second, and third preset convolution kernel sizes respectively; 、 and The jth feature in the i-th sample feature vector is respectively 、 and The preset convolution kernel size is used for the first The output of the strided convolution operation; The calculation formula of the nonlinear enhancement branch is: ; ; ; in, is a nonlinear activation function, The feature mean of the jth feature in the feature vector of the i-th sample in the nonlinear enhancement branch, is the standard deviation of the jth feature in the ith sample feature vector in the nonlinear enhancement branch, is the convolution sum of the dynamic single-scale branch output, () is layer normalization, It is the enhanced feature after layer normalization; The output of each dynamic feature perception convolution unit is expressed as: ,in, is the convolution sum of the fixed multi-scale branch outputs.

6. The pipeline crack detection method according to claim 1, characterized in that: The pipeline crack detection model also includes a classifier, the input of the classifier is connected to the output of the dynamic feature enhancement module, the classifier adopts an improved residual regressor, and the improved residual regressor includes six parts connected in sequence, the first part includes a convolution operation, normalization, ReLU activation function and maximum pooling connected in sequence; the second part includes three residual blocks connected in sequence, the third part includes four residual blocks connected in sequence, the fourth part includes six residual blocks connected in sequence, the fifth part includes three residual blocks connected in sequence, and the sixth part includes average pooling, a fully connected layer and a Softmax function connected in sequence.

7. The pipeline crack detection method according to claim 1, characterized in that: The pipeline crack detection model is obtained by training the target neural network using a training set; Each sample data in the training set includes input data and label data, wherein the input data is a time series signal sample, and the label data includes a classification result, wherein the classification result includes whether there is a crack or no crack. If there is a crack, the label data also includes the crack location; The sample data in the training set are obtained by simulating actual cracks on spiral welded pipe test pieces.

8. A pipeline crack detection device, characterized in that: The pipeline crack detection device applies the pipeline crack detection method according to any one of claims 1 to 7, and the pipeline crack detection device comprises: A time series signal acquisition module is used to acquire a time series signal for detecting a target pipeline; the time series signal includes a plurality of signal samples, each signal sample corresponds to an ultrasonic guided wave signal at a time point, and the ultrasonic guided wave signal at each time point is an ultrasonic guided wave signal transmitted from one end of the target pipeline and received from the other end; A crack detection module is configured to input the time series signal into a pipeline crack detection model and output crack detection results. The pipeline crack detection model includes a dual-branch time-domain feature extraction group, a multi-head self-attention mechanism, and a dynamic feature enhancement module. The dual-branch time-domain feature extraction group is configured to extract time-domain features from each signal sample. The time-domain features include high-frequency local defect features and low-frequency global structural features. The output of the dual-branch time-domain feature extraction group is connected to the input of the multi-head self-attention mechanism. The output of the multi-head self-attention mechanism and the output of the dual-branch time-domain feature extraction group are added to form multiple sample feature vectors. The multiple sample feature vectors are input into the dynamic feature enhancement module. The dynamic feature enhancement module is configured to calculate a convolution kernel size based on each input sample feature vector and output multi-scale features based on different convolution kernel sizes. One signal sample corresponds to one sample feature vector.

9. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the pipeline crack detection method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the pipeline crack detection method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Pipeline buried microcrack positioning method based on fusion feature matrix and deep learning

    CN119881106A

  • Pipeline defect identification method and device, storage medium and equipment

    CN119901821A