Pipeline defect acoustic detection method and detection system based on characteristic mode decomposition and Transform neural network

By combining feature pattern decomposition with Transformer neural networks, the problems of strong subjectivity in pipeline inspection results, high signal submersion ratio, and low positioning accuracy are solved, realizing automated, all-weather pipeline defect identification and precise positioning, and reducing inspection costs.

CN122017038APending Publication Date: 2026-05-12KUNMING UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
KUNMING UNIV OF SCI & TECH
Filing Date
2026-03-25
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing pipeline inspection technologies suffer from problems such as strong subjectivity in inspection results, high signal submersion ratio, difficulty in extracting defect features, low positioning accuracy, and high equipment costs, making it difficult to achieve automated, all-weather pipeline defect identification and precise positioning.

Method used

An acoustic detection method for pipeline defects based on feature pattern decomposition and Transformer neural network is adopted. The method collects reflected echo signals inside the pipeline through sound wave transmitting and receiving modules, and combines bandpass filtering, detrending processing and amplitude normalization. The signal features of correlation kurtosis decomposition are used to input into the Transformer model for feature extraction and defect identification, so as to realize automated detection.

Benefits of technology

It improves detection sensitivity and positioning accuracy, reduces detection costs, and enables automated and all-weather pipeline defect identification, significantly improving defect identification accuracy and positioning precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122017038A_ABST
    Figure CN122017038A_ABST
Patent Text Reader

Abstract

The invention discloses a pipeline defect acoustic detection method based on characteristic mode decomposition and a Transformer neural network and a detection device thereof. The method and the device are used for intelligently identifying and accurately positioning internal defects of a pipeline. The detection method comprises the following steps: S1, transmitting acoustic excitation signals and collecting echoes; s2, echo signal preprocessing is carried out, a Butterworth band-pass filter is designed, the passband range is 300 Hz to 6 kHz, and low-frequency environment noise and high-frequency electronic noise are filtered out; removing a low-frequency drift component in the signal by adopting a polynomial fitting or high-pass filtering method; normalizing the signal amplitude to an interval of [-1, 1], and eliminating the influence of the gain difference of different sensors; calculating the effective duration of the signal according to the pipeline length and the sound velocity, and intercepting an effective data segment; s3, carrying out feature mode decomposition based on correlation kurtosis; step S4, carrying out deep learning feature extraction and identification based on Transform; and S5, outputting and visualizing a detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of pipeline nondestructive testing technology, specifically relating to a pipeline defect acoustic detection method and system based on feature pattern decomposition and deep learning, which is particularly suitable for intelligent identification and precise location of defects in complex pipeline systems such as urban drainage pipelines. Background Technology

[0002] As an important underground infrastructure to ensure the sustainable development of modern cities, urban drainage pipes bear the heavy responsibility of treating sewage and rainwater. Due to the complex internal environment of the pipes, blockages are prone to occur. At present, there is an urgent need for an efficient and low-cost method to detect blockages in drainage pipes.

[0003] The existing pipeline inspection technologies have the following problems: First, traditional acoustic detection methods rely on human experience and judgment, resulting in highly subjective results that are difficult to standardize and automate. Second, in the complex noise environment inside pipelines, weak defect features are difficult to extract effectively, leading to high signal submersion ratios and low detection sensitivity. Third, traditional signal processing methods (such as wavelet transform and empirical mode decomposition) suffer from problems such as mode aliasing and endpoint effects, resulting in insufficient accuracy in feature extraction. Fourth, the defect location accuracy is low, making it difficult to meet the needs of precise repair and preventive maintenance. Fifth, existing video detection methods are limited by lighting and water turbidity, restricting their application in water-filled pipelines, and the equipment costs are high. Summary of the Invention

[0004] The technical problem to be solved by this invention is to provide an automated, all-weather pipeline defect detection technology solution to achieve intelligent identification and precise location of internal pipeline defects (including blockages, cracks, corrosion, damage, etc.), thereby improving detection efficiency and reducing detection costs.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: a method for acoustic detection of pipeline defects based on feature pattern decomposition and Transformer neural network, comprising the following steps:

[0006] The acoustic excitation signal is emitted into the pipe under test by the acoustic emission module. The acoustic excitation signal is preferably a linear frequency modulated signal (Chirp) or a multi-frequency sinusoidal superposition signal with a frequency range of 500Hz to 5kHz and an excitation duration of 1 to 3 seconds. The acoustic wave receiving module is started synchronously to collect the reflected echo signal that propagates inside the pipe and is modulated by the defect; the acoustic wave receiving module includes a linear array of multiple microphone sensors, the sampling frequency is not less than 4 times the highest frequency of the excitation signal, and the acquisition time is the duration of the excitation signal plus the round-trip propagation time of the pipe; Step S2: Echo signal preprocessing. The following preprocessing operations are performed on the acquired raw echo signal: First, bandpass filtering: Design a Butterworth bandpass filter with a passband range of 300Hz to 6kHz to filter out low-frequency environmental noise and high-frequency electronic noise; Second, detrending processing: Use polynomial fitting or high-pass filtering methods to remove low-frequency drift components from the signal; Third, amplitude normalization: Normalize the signal amplitude to the [-1, 1] interval to eliminate the influence of gain differences between different sensors; Fourth, data segmentation: Calculate the effective duration of the signal based on the pipe length and sound velocity, and extract the effective data segments; Step S3: Feature pattern decomposition based on correlation kurtosis The preprocessed echo signal is input into the feature mode decomposition model for adaptive decomposition, specifically including: Construct an adaptive finite impulse response filter bank, which includes K parallel FIR filters, each filter having an order of M, where K ranges from 4 to 8 and M ranges from 64 to 256. Define the correlation kurtosis CK as the objective function for optimization, and its calculation formula is as follows: ; in, The output signal is the filter signal, and T is the period delay parameter. It represents the mathematical expectation; the correlation kurtosis simultaneously measures the impulsiveness (kurtosis characteristics) and periodicity (correlation) of the signal to effectively enhance the periodic impulsiveness characteristics; The filter coefficients are iteratively optimized using gradient descent or particle swarm optimization algorithms to maximize the correlation kurtosis value of each filter output. K intrinsic mode components (IMFs) are obtained, and each IMF corresponds to defect features of different frequency bands and different physical mechanisms, thereby achieving the enhancement and separation of defect features. Step S4: Deep Learning Feature Extraction and Recognition Based on Transformer The K intrinsic mode components obtained in step S3 are used as multi-channel inputs and fed into a pre-trained Transformer deep learning model for feature extraction and defect identification, specifically including: Data embedding: Each intrinsic mode component (IMF) is segmented using a sliding window method, with a window length of W (W ranging from 128 to 512) and a stride of S, where S = W / 2; each window is mapped to a d-dimensional feature vector through a one-dimensional convolutional layer or a fully connected layer, where d is the embedding dimension (d ranging from 128 to 512). Positional encoding: Sine-cosine positional encoding is added to the embedded feature vector to preserve temporal information. The positional encoding formula is:

[0007] in, For location index, For dimension indexing; Multi-head self-attention encoding: The embedded features are globally modeled through N layers of Transformer encoders (N ranges from 4 to 8); each encoder layer includes a multi-head self-attention sub-layer and a feedforward neural network sub-layer; The formula for calculating the multi-head self-attention mechanism is:

[0008]

[0009] in, , The number of attention heads (h ranges from 4 to 16). The weight matrix is ​​learnable; the self-attention mechanism can adaptively focus on the time regions and channels most relevant to the defect features, capturing the interactions between different intrinsic mode components and the long-distance dependencies between different time steps. Feature aggregation: Perform global average pooling on all time-step features output by the encoder or use a set [CLS] token to obtain a fixed-dimensional global feature representation; Dual-task output: Defect classification and localization are achieved through two independent output heads. Classification Header: Fully connected layer + Softmax activation function, outputs the probability distribution of defect types C, where C is the number of defect types (e.g., normal, blockage, crack, corrosion, etc.). The output formula is: ; in, For global feature vectors, For classification header parameters; Regression head: Fully connected layer + linear activation function, outputs the distance between the defect and the pipe opening, with the following formula: in For regression head parameters; Step S5: Output and Visualization of Detection Results Based on the output of the Transformer model, the probability distribution of defect types and defect location information are extracted. The defect category with the highest probability is selected as the detection result, and a confidence threshold is set for reliability judgment. The detection results are displayed in real time on the human-computer interaction interface, including: defect type, defect location, confidence level, original echo waveform, IMF component waveform, and attention heatmap.

[0010] Furthermore, it includes an adaptive detection operation: when the confidence level of the defect type output in step S5 is lower than a preset threshold, it is determined that the signal quality at the current position is poor or the distance to the defect is too far; the moving platform is controlled to advance a preset distance into the pipeline, and steps S1 to S5 are repeated; the above process is executed cyclically until a high-confidence detection result is obtained or the end of the pipeline is reached.

[0011] As a preferred embodiment, in step S3, the period delay parameter T is adaptively determined based on the pipe length L and the sound velocity c, and the calculation formula is as follows: ; in Sampling frequency, This indicates rounding down; the formula ensures that the periodic delay corresponds to the time it takes for a sound wave to travel one round trip in the pipe, thus effectively extracting the periodic reflection characteristics.

[0012] As a preferred approach, the test results are stored in a database to generate test reports, supporting historical data queries and trend analysis.

[0013] As a preferred approach, in step S4, the Transformer model is pre-trained in the following manner: Data preparation: Collect acoustic echo data of different types of pipes, different defect types, and different defect locations to establish a labeled dataset; the dataset includes at least 1000 normal samples and more than 500 samples of each type of defect; Data augmentation: Methods such as time stretching, frequency shifting, adding Gaussian noise, and time translation are used to expand the training data and improve the model's generalization ability; Loss function: A weighted combination of classification loss and regression loss, expressed as follows: ; in, Cross-entropy classification loss, The mean squared error regression loss, These are the weighting coefficients; Optimization strategy: The AdamW optimizer is used with an initial learning rate of 0.0001. Cosine annealing is used for learning rate scheduling. The training lasts for 100 to 200 epochs with a batch size of 32 to 64. Regularization: Dropout and label smoothing are used to prevent overfitting.

[0014] Another technical problem to be solved by the present invention is to provide a pipeline defect acoustic detection system that implements the above-mentioned pipeline defect acoustic detection method based on feature pattern decomposition and Transformer neural network.

[0015] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: a detection system for implementing the above-mentioned acoustic detection method for pipeline defects based on feature pattern decomposition and Transformer neural network, including a mobile platform that can move autonomously or remotely within the pipeline, a sound wave emitting module, a sound wave receiving module, a control and data processing module, a human-computer interaction module, and an auxiliary function module containing several optional functions. The robot platform includes a vehicle body, on which are mounted a drive mechanism, power supply equipment, communication equipment for real-time data transmission with the ground control station, and a sensor platform. The sensor platform includes a sound wave emitting module and a sound wave receiving module. The drive mechanism is either a four-wheel independent drive mechanism or a tracked drive mechanism. Each drive wheel of the four-wheel independent drive mechanism is equipped with an independent motor and encoder.

[0016] The vehicle body is equipped with an attitude adjustment mechanism for adjusting the attitude of the sensor platform. The attitude adjustment mechanism includes pitch adjustment and roll adjustment devices to ensure that the sensor platform is kept in a horizontal attitude in a non-horizontal pipe.

[0017] As a preferred embodiment, the acoustic wave transmitting module also includes a power monitoring unit, which monitors the transmitting power and transducer impedance in real time, and automatically adjusts the transmitting power to prevent equipment damage and signal saturation when the transducer malfunctions or the environmental reflection is too strong.

[0018] As a preferred embodiment, the acoustic wave receiving module is installed at the front end of the sensor platform to receive reflected echo signals from within the pipe; the sensor array of the acoustic wave receiving module is linearly arranged at equal intervals, with the interval d satisfying: Where c is the speed of sound, and each sensor is connected to an independent low-noise preamplifier to perform analog low-pass filtering before ADC sampling to prevent aliasing.

[0019] As a preferred embodiment, the sensor array of the acoustic receiving module employs differential signal transmission and is equipped with shielded cables to effectively suppress electromagnetic interference and common-mode noise. The auxiliary function modules include a video monitoring unit, an environmental sensing unit, a GPS and inertial navigation unit, and a data synchronization unit. The video monitoring unit is equipped with a waterproof camera and LED lighting to transmit real-time video of the pipeline interior, assisting in defect confirmation. The environmental sensing unit includes temperature sensors, humidity sensors, and gas sensors to monitor environmental parameters within the pipeline and assess safety. The GPS and inertial navigation unit accurately records the detection location.

[0020] The beneficial effects of this invention are: This invention employs a feature pattern decomposition method based on phase pipe kurtosis. Correlation kurtosis, as the objective function, simultaneously measures the impulsiveness and periodicity of the signal, exhibiting a strong enhancement effect on periodic impulsive features (such as multiple reflections at defects). By adaptively optimizing FIR filter parameters, it can effectively extract weak defect features in strong noise environments, improving the signal-to-noise ratio by more than 15 dB. Experimental verification shows that even under ambient noise levels of 70 dB, the method can still accurately identify microcracks with a diameter only 5% of the pipe diameter, achieving a 40% improvement in detection sensitivity compared to traditional wavelet transform methods and a 30% improvement compared to EMD methods. Furthermore, it combines defect identification with the Transformer deep learning model, which has been widely and successfully applied in speech recognition and time series analysis. Since acoustic echo signals are essentially one-dimensional time series containing complex temporal dependencies, the Transformer, through its multi-head self-attention mechanism, can perfectly capture long-range dependencies and interactions between multiple IMF channels in the time series, extracting high-level semantic features and significantly improving recognition accuracy. On a test set containing 5000 samples, the defect type identification accuracy reached 96.5%, which is 11.3 percentage points higher than the traditional SVM method (85.2%) and 4.4 percentage points higher than the CNN method (92.1%). The false positive rate (classifying normal segments as defects) was only 1.8%, far lower than the 5% to 10% of traditional methods; the false negative rate (classifying defects as normal) was only 2.3%, ensuring that critical defects are not missed.

[0021] The defect distance is directly predicted using the Transformer's regression output head, and combined with high-precision time measurement and sound velocity calibration, significantly improving positioning accuracy. Experimental verification shows that for a DN800 pipe with a length of 50 meters, the average defect positioning error is 0.25 meters, with a relative error of 0.5%, and 95% of the detection results have an error of less than 0.5 meters (relative error 1%). In contrast, the traditional positioning method based on echo peak time has an average error of 1.2 meters and a relative error of 2.4%. High-precision positioning provides a reliable basis for accurate excavation and maintenance, as well as precise robotic operations, avoiding waste caused by blind excavation.

[0022] Furthermore, both the feature pattern decomposition and the Transformer model of this invention possess adaptive learning capabilities, eliminating the need for manual feature design and automatically adapting to different pipe materials (concrete, PVC, steel pipes, etc.), pipe diameters (DN300 to DN2000), and defect types (blockage, cracks, corrosion, damage, etc.). Through pre-training on diverse datasets, the model exhibits excellent generalization ability. In cross-pipe type testing, only 50 to 100 samples need to be collected for fine-tuning on new pipe types to achieve a recognition accuracy of over 95%, significantly reducing deployment costs in new scenarios. Attached Figure Description

[0023] Figure 1 This is a schematic diagram of the terminal structure of the hardware operating environment involved in the example solution of this invention; Figure 2 This is a simplified front view of the vehicle of the present invention; Figure 3 This is a simplified side view of the vehicle of the present invention; Figure 4 This is a schematic diagram of the operation process of the detection method of the present invention. Detailed Implementation

[0024] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0025] like Figure 1-3 As shown, a detection system for implementing an acoustic detection method for pipeline defects based on feature pattern decomposition and Transformer neural network includes a mobile platform that can move autonomously or remotely within the pipeline, an acoustic wave emitting module, an acoustic wave receiving module, a control and data processing module, a human-machine interaction module, and an auxiliary function module containing several optional functions.

[0026] The robot platform includes a vehicle body, on which are installed a drive mechanism, power supply equipment, communication equipment for real-time data transmission with the ground control station, and a sensor platform. The sensor platform is equipped with a sound wave transmitting module and a sound wave receiving module.

[0027] The drive mechanism is either a four-wheel independent drive mechanism or a tracked drive mechanism. Each drive wheel of the four-wheel independent drive mechanism is equipped with an independent motor and encoder to achieve precise position control.

[0028] The vehicle body is equipped with an attitude adjustment mechanism for adjusting the attitude of the sensor platform. The attitude adjustment mechanism includes pitch adjustment and roll adjustment devices to ensure that the sensor platform is kept in a horizontal attitude in a non-horizontal pipe.

[0029] The pitch adjustment mechanism uses a stepper motor-driven rack and pinion mechanism with an adjustment range of ±30 degrees. The roll adjustment device uses a servo motor-driven linkage mechanism with an adjustment range of ±20 degrees. The attitude sensor uses a 6-axis IMU (MPU6050) to measure the vehicle's pitch and roll angles in real time. A PID control algorithm drives the adjustment mechanism to keep the sensor platform level and ensure the directionality of sound wave transmission and reception.

[0030] The acoustic wave emission module is installed at the front or top of the sensor platform and is used to emit acoustic excitation signals into the pipe. The signal generation unit is a digital signal generator based on a microcontroller (such as STM32, Arduino) or FPGA, capable of generating various waveforms (sine wave, square wave, chirp signal, etc.) with a frequency range of 100Hz to 10kHz and a frequency accuracy of less than or equal to 0.1Hz. The acoustic wave emission module also includes a power monitoring unit, which monitors the emission power and transducer impedance in real time. When the transducer malfunctions or the environmental reflection is too strong, the emission power is automatically adjusted to prevent equipment damage and signal saturation.

[0031] The acoustic wave receiving module is installed at the front end of the sensor platform and is used to receive reflected echo signals from inside the pipe; the sensor array of the acoustic wave receiving module is linearly arranged at equal intervals, and the interval d satisfies: Where c is the speed of sound, each sensor is connected to an independent low-noise preamplifier to perform analog low-pass filtering before ADC sampling to prevent aliasing. The sensor array of the acoustic receiving module uses differential signal transmission and is equipped with shielded cables to effectively suppress electromagnetic interference and common-mode noise.

[0032] The auxiliary function modules include a video monitoring unit, an environmental sensing unit, a GPS and inertial navigation unit, and a data synchronization unit. The video monitoring unit is equipped with a waterproof camera and LED lighting to transmit real-time video of the pipeline interior and assist in confirming defects. The environmental sensing unit includes temperature sensors, humidity sensors, and gas sensors to monitor environmental parameters inside the pipeline and assess safety. The GPS and inertial navigation unit (IMU) accurately records the detection location.

[0033] Example 1 of this detection method, such as Figure 4 The image shows the method for acoustic detection of pipe defects based on feature pattern decomposition and Transformer neural network, as described in this invention, used to detect defects in a DN800 concrete drainage pipe in a city. The pipe is 50 meters long and 800 mm in diameter, with slight dirt and water accumulation on its inner wall. The detection objective is to identify and accurately locate potential defects such as blockages, cracks, and corrosion within the pipe. The specific steps include: The mobile platform is placed at the inlet of the pipe under test, and an acoustic excitation signal is emitted into the pipe through the acoustic wave emission module. In this embodiment, the acoustic excitation signal is a linear frequency modulated signal (Chirp) with a starting frequency of 500Hz, an ending frequency of 5kHz, and an excitation duration of 2 seconds. This Chirp signal can uniformly distribute energy over a wide frequency band, which is beneficial for exciting the characteristic responses of different types of defects. The signal generation unit generates a digital Chirp signal based on an STM32 microcontroller, converts it into an analog signal through a D / A converter (16-bit resolution, 48kHz sampling rate), amplifies it through a Class D power amplifier (rated power 30W), and then drives a horn speaker to emit the signal. The speaker is installed at the front end of the mobile platform, parallel to the pipe axis, approximately 0.5 meters from the pipe inlet.

[0034] Synchronized with the transmission, the acoustic receiving module begins acquiring the echo signal. This embodiment employs a linear array of eight MEMS microphones (INMP441 model), with a frequency response range of 60Hz to 15kHz, a sensitivity of -26dBFS, and a signal-to-noise ratio of 61dB. The eight microphones are arranged at equal intervals of 30mm, resulting in a total array length of 210mm. Each microphone is connected to an independent preamplifier circuit with a gain set to 40dB. The preamplified signal undergoes anti-aliasing filtering via a 4th-order Butterworth low-pass filter (cutoff frequency 8kHz) before being digitized by an 8-channel synchronous ADC (ADS1299, 24-bit resolution, 20kHz sampling rate). The acquisition time is set to 5 seconds, including 2 seconds of excitation time and 3 seconds of echo reception time (considering the round-trip propagation time of approximately 0.3 seconds in a 50-meter pipe, 3 seconds is sufficient to capture multiple reflected signals). The acquired raw data is stored as a two-dimensional array of 8 channels × 100,000 sampling points in 32-bit floating-point format.

[0035] The acquired 8-channel raw echo signals were preprocessed. First, bandpass filtering was performed using an 8th-order Butterworth bandpass filter with a passband range of 300Hz to 6kHz. The filter was designed using the bilinear transform method, with filter coefficients generated via MATLAB's `butter` function, and then implemented in an embedded system using a direct type II architecture. The purpose of bandpass filtering was to remove low-frequency environmental noise below 300Hz (such as fan noise and traffic noise) and high-frequency electronic noise above 6kHz. After filtering, spectral analysis showed a significant reduction in low-frequency and high-frequency noise components, improving the signal-to-noise ratio by approximately 8dB.

[0036] Next, detrending processing is performed, using a third-order polynomial fitting method to remove low-frequency drift components from the signal. Specifically, a least-squares polynomial fitting is performed on the signal sequence x(n) (n=1,2,...,100000) for each channel to obtain the fitted curve. ,in These are the fitting coefficients. Then, the detrending signal is calculated. Detrending processing eliminates low-frequency components caused by factors such as temperature drift and sensor DC offset, making the signal baseline more stable.

[0037] Amplitude normalization uses the max-min normalization method, calculating the maximum value for each channel separately. and minimum value Then follow the formula The signal is normalized to the [-1, 1] interval. This process eliminates the influence of differences in the gain of different sensors, making the signal amplitudes of the eight channels comparable.

[0038] Finally, the data is segmented. Based on the pipe length of 50 meters and the speed of sound of 340 m / s, the effective signal duration is calculated. The round-trip propagation time of the sound wave is t = 2 × 50 / 340 ≈ 0.294 seconds. Considering multiple reflections and reverberation, the effective signal duration is approximately 1 second. Therefore, the data segment from 0 to 1 second after the excitation ends is extracted, corresponding to 20,000 sampling points. The extracted data is a two-dimensional array with 8 channels × 20,000 sampling points, which serves as the input for subsequent processing.

[0039] The preprocessed 8-channel signal is input to a Feature Mode Decomposition (FMD) model for decomposition. In this embodiment, a parallel FIR filter bank of K=6 is constructed, with each filter having an order M=128. The initial parameters of the filter bank are generated through random initialization, and the coefficients of each filter are sampled from a Gaussian distribution with a mean of 0 and a standard deviation of 0.01.

[0040] Define the correlation kurtosis as the optimization objective function. For the k-th filter (k=1,2,...,6), its output signal is... ,in Let be the coefficients of the k-th filter. The input signal is the average value of the 8-channel signal. The period delay parameter T is calculated based on the pipe length and the speed of sound. The sampling point corresponds to the time it takes for a sound wave to travel one round trip. The correlation kurtosis of the k-th filter output is calculated as follows: The expected value E[·] is estimated by time averaging. N is the number of valid sampling points.

[0041] The gradient descent algorithm is used to optimize the filter coefficients, maximizing the correlation kurtosis of each filter. The optimization process employs the Adam optimizer with a learning rate of 0.001 and 500 iterations. In each iteration, the gradient of the correlation kurtosis of each filter is calculated. (Using automatic or numerical differentiation methods), the filter coefficients are then updated according to the gradient ascent direction. , where α is the learning rate. To avoid different filters extracting the same features (modal aliasing), an orthogonalization constraint is added during the optimization process, requiring the correlation coefficient of the output signals of different filters to be less than 0.3.

[0042] After optimization, six intrinsic mode components (IMFs) were obtained: IMF1, IMF2, ..., IMF6. Each IMF component corresponds to a different frequency band and physical mechanism. Spectral analysis revealed that IMF1 mainly contains low-frequency components from 500 Hz to 1 kHz, corresponding to pipe wall vibration and large-scale defects; IMF2 contains components from 1 kHz to 2 kHz, corresponding to medium-scale cracks and local deformation; IMF3 to IMF5 contain high-frequency components from 2 kHz to 5 kHz, corresponding to small-scale defects, roughness variations, and boundary reflections; and IMF6 mainly contains residual noise and aperiodic components. For pipe sections with defects, the correlation kurtosis values ​​of IMF2 and IMF3 increased significantly (from around 2.5 in normal sections to 6.8 in defective sections), indicating that these components successfully enhanced the defect characteristics.

[0043] The six IMF components obtained in step S3 are used as multi-channel inputs and fed into a pre-trained Transformer deep learning model for feature extraction and defect identification. The Transformer model architecture used in this embodiment is as follows: embedding dimension d=256, encoder layers N=6, each layer contains 8 attention heads (h=8), feedforward network hidden layer dimension is 1024, and Dropout ratio is 0.2.

[0044] During the data embedding stage, each IMF component (with 20,000 sampling points) is segmented using a sliding window with a window length W=256 and a stride S=128 (50% overlap). This divides each IMF component into (20,000-256) / 128+1=155 windows. Each window is mapped to a 256-dimensional feature vector through a one-dimensional convolutional layer (kernel size 16, stride 4, output channels 256). The window features from the 6 channels are concatenated to form 6×155=930 time steps, with each time step having a feature dimension of 256.

[0045] A sine-cosine positional encoding is added to the feature vector at each time step. The positional encoding vector PE has the same dimension as the feature vector (256 dimensions), and is calculated using the following formula:

[0046]

[0047] Where pos is the position index (0 to 929) and i is the dimension index (0 to 127). The position encoding vector is added element by element to the feature vector to obtain the encoded input sequence.

[0048] The encoded sequence is fed into a 6-layer Transformer encoder. Each encoder layer contains a multi-head self-attention sublayer and a feedforward neural network sublayer, with residual connections and layer normalization between the two sublayers. In the multi-head self-attention sublayer, the input features are first transformed through three linear transformations to generate a query matrix Q, a key matrix K, and a value matrix V, each with a dimension of 930×256. Then, Q, K, and V are divided into 8 heads, each with a dimension of 930×32. For the i-th head, attention weights are calculated. The attention weight matrix has a dimension of 930×930, representing the degree of attention each time step gives to all other time steps. Then, the weighted values ​​are calculated. The dimensions are 930×32. The outputs of the 8 heads are concatenated and then subjected to a linear transformation to obtain the multi-head attention output, which has a dimension of 930×256. The feedforward neural network sublayer contains two linear transformations and a ReLU activation function. The first linear transformation expands the dimension from 256 to 1024, and the second linear transformation compresses the dimension from 1024 back to 256.

[0049] After six layers of encoders, the encoded feature sequence is obtained, with a dimension of 930×256. Global average pooling is then performed on the features at all time steps to obtain a fixed-dimensional global feature representation h with a dimension of 256. This global feature vector integrates information from the entire signal sequence and all IMF channels, containing high-level semantic features.

[0050] The global feature vector h is fed into two independent output heads. The classification head consists of two fully connected layers. The first layer maps the 256-dimensional features to 128 dimensions and activates them using ReLU. The second layer maps the 128-dimensional features to 4 dimensions (corresponding to four defect categories: normal, blockage, crack, and corrosion). Then, the probability distribution is calculated using the Softmax function. For the test sample in this embodiment, the output of the classification head is [0.05, 0.12, 0.78, 0.05], indicating that the "crack" category has the highest probability (78%). Therefore, it is determined that the pipe section has a crack defect.

[0051] The regression head consists of two fully connected layers. The first layer maps the 256-dimensional features to 128 dimensions and activates them using ReLU. The second layer maps the 128-dimensional features to a 1-dimensional scalar value and outputs the distance (in meters) between the defect and the pipe inlet. For the test sample in this embodiment, the regression head outputs 23.6 meters, indicating that the defect is located 23.6 meters from the pipe inlet.

[0052] Based on the output of the Transformer model, defect type and location information were extracted. The classification result was "crack" with a confidence level of 78% (greater than the preset threshold of 70%), therefore the detection result was deemed reliable. The location result was 23.6 meters.

[0053] The detection results are displayed on the touchscreen of the human-computer interaction interface. The interface displays the following information: defect type (crack, highlighted in red), defect location (23.6 meters, marked on the pipeline diagram), confidence level (78%, green indicator bar), original echo waveform (8-channel waveform overlay, with defects marked at the corresponding time positions), IMF component waveform (6 components are displayed separately, with IMF2 and IMF3 showing obvious impact characteristics at the time position corresponding to 23.6 meters), and attention heatmap (a 930×930 matrix visualized as a heatmap, with color intensity indicating the magnitude of attention weight, showing that the model mainly focuses on the time region corresponding to the defect location and the IMF2 and IMF3 channels).

[0054] The inspection results are automatically stored in an SQLite database, recording information including: inspection time (2026-01-04 10:23:45), pipe number (DN800-001), defect type (crack), defect location (23.6 meters), confidence level (78%), original data file path, and inspection personnel and equipment numbers. A PDF inspection report is also generated, containing an inspection summary, detailed results, waveform diagrams, attention heatmaps, and recommended maintenance measures for management and maintenance personnel.

[0055] Example 2 of this detection method describes the implementation of adaptive detection and multi-defect identification using the detection device. This example provides an adaptive detection operation for long-distance pipelines, used to detect multiple defects in a DN600 PVC water supply pipeline in a city. The total length of the pipeline is 200 meters, and the detection objective is to identify and accurately locate all defects in the pipeline.

[0056] The mobile platform was placed at the pipe inlet, and a first inspection was performed according to steps S1 to S5 of Example 1. The inspection results showed a blockage defect at a distance of 18.3 meters from the inlet, with a confidence level of 85%. The mobile platform was then moved forward 20 meters to a position 20 meters from the inlet for a second inspection. The echo signal from the second inspection included reflections from the blockage defect at 18.3 meters (1.7 meters from the current position) and reflections from other defects that might exist further away. The results of Eigenmode Decomposition and Transformer Recognition showed a crack defect at a distance of 1.5 meters from the current position (corresponding to a distance of 21.5 meters from the inlet), with a confidence level of 72%.

[0057] The mobile platform continued moving forward 20 meters, reaching a position 40 meters from the entrance, and conducted a third inspection. The inspection result showed a corrosion defect at a distance of 32.8 meters from the current position (corresponding to a distance of 72.8 meters from the entrance), with a confidence level of 68%. Since the confidence level was slightly below the 70% threshold, the system determined that the signal quality was poor or the distance to the defect was too far, and controlled the mobile platform to move forward 10 meters (to a position 50 meters from the entrance) for a fourth inspection. The fourth inspection result showed a corrosion defect at a distance of 22.5 meters from the current position (corresponding to a distance of 72.5 meters from the entrance), with the confidence level increasing to 82%, essentially consistent with the position of the third inspection (error of 0.3 meters), confirming the presence of a corrosion defect at that location.

[0058] The mobile platform continued moving forward according to a strategy of conducting inspections every 20 meters, performing checks at distances of 60 meters, 80 meters, 100 meters, 120 meters, 140 meters, 160 meters, and 180 meters from the inlet. Another crack defect was detected at a distance of 145.7 meters from the inlet, with a confidence level of 91%. After reaching the end of the pipeline (200 meters), the mobile platform completed a full pipeline scan.

[0059] The entire inspection process involved 11 tests (including one adaptive repeat test), taking approximately 2 hours in total (including movement and inspection time). The summarized inspection results showed four defects in the 200-meter pipeline: a blockage 18.3 meters from the inlet (85% confidence level), a crack 21.5 meters from the inlet (72% confidence level), corrosion 72.5 meters from the inlet (82% confidence level), and a crack 145.7 meters from the inlet (91% confidence level). The system automatically generated a full pipeline health report, including a defect distribution map, a detailed defect information table, maintenance priority ranking (based on defect type and severity), and a recommended maintenance schedule.

[0060] Subsequent manual verification confirmed the existence and location of four defects, with an average positioning error of 0.35 meters (maximum error 0.6 meters, minimum error 0.1 meters), and a defect type identification accuracy of 100%. This embodiment demonstrates that the method of the present invention can be effectively applied to the comprehensive inspection of long-distance pipelines, the adaptive detection strategy can improve the detection reliability of low-confidence areas, and the multi-defect identification capability meets the needs of practical applications.

[0061] This invention achieves a fully automated process from signal acquisition, processing, feature extraction to defect identification, with a single inspection time of less than 10 seconds (including 2 seconds for signal transmission, 3 seconds for acquisition, and 5 seconds for processing). Combined with a mobile platform, it enables continuous and rapid inspection. For a 1000-meter-long pipeline, traditional manual acoustic inspection takes 2 to 3 days, while this invention's method only requires 4 to 6 hours (assuming an average inspection every 10 meters), improving efficiency by more than 10 times. The fully automated inspection process avoids the influence of human factors, and the inspection results are standardized, repeatable, and facilitate data management and quality traceability.

[0062] Utilizing acoustic detection principles, this method is unaffected by light or water turbidity, and can operate under various conditions, including fully filled, partially filled, and empty pipes, truly achieving all-weather detection. Its waterproof and dustproof design (IP68) ensures reliable operation in harsh environments. Compared to CCTV video detection methods, this method can operate normally underwater and in silt, with its detection range not limited by visual distance. Compared to ultrasonic detection methods, this invention does not require direct contact with the pipe wall and is unaffected by pipe wall dirt or corrosion, making it more widely applicable.

[0063] This invention utilizes general-purpose acoustic sensors and an embedded computing platform, reducing equipment costs by over 50% compared to CCTV inspection vehicles and over 70% compared to robotic inspection systems. The investment per unit is approximately 150,000 to 300,000 yuan. Regarding maintenance costs, the equipment of this invention has no complex mechanical structure, making maintenance simple, with annual maintenance costs less than 5% of the equipment price; while the annual maintenance costs of CCTV equipment and robotic systems reach 10% to 15% of the equipment price. Based on a 5-year lifespan, the total life-cycle cost of this invention is only 30% to 40% of traditional methods, significantly improving the return on investment.

[0064] The testing device of this invention can automatically record raw data, processing results, defect locations, and other information for each test, establishing a pipeline health record. Through long-term data accumulation and trend analysis, defect prediction and preventative maintenance can be achieved, shifting from "post-failure repair" to "pre-failure prevention," significantly reducing the risk of sudden accidents. The test data can be seamlessly integrated with GIS geographic information systems and pipeline management systems, supporting digital and intelligent pipeline management. It can be widely applied to the testing and maintenance of urban drainage pipelines, water supply pipelines, oil and gas pipelines, industrial pipelines, and other fields, providing strong technical support for ensuring safe pipeline operation, extending pipeline service life, and reducing maintenance costs.

[0065] The above embodiments are merely illustrative of the principles and effects of the present invention, as well as some examples of its application, and are not intended to limit the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept of the present invention, and these modifications and improvements are all within the scope of protection of the present invention.

Claims

1. A method for acoustic detection of pipeline defects based on feature pattern decomposition and Transformer neural network, comprising the following steps: Step S1: Acoustic excitation signal transmission and echo acquisition The acoustic excitation signal is emitted into the pipe under test by the acoustic emission module. The acoustic excitation signal is a linear frequency modulation signal or a multi-frequency sinusoidal superposition signal. The acoustic wave receiving module is started synchronously to collect the reflected echo signal that propagates inside the pipe and is modulated by the defect; the acoustic wave receiving module includes a linear array of multiple microphone sensors, the sampling frequency is not less than 4 times the highest frequency of the excitation signal, and the acquisition time is the duration of the excitation signal plus the round-trip propagation time of the pipe; Step S2: Echo signal preprocessing. The following preprocessing operations are performed on the acquired raw echo signal: First, bandpass filtering: Design a Butterworth bandpass filter with a passband range of 300Hz to 6kHz to filter out low-frequency environmental noise and high-frequency electronic noise; Second, detrending processing: Use polynomial fitting or high-pass filtering methods to remove low-frequency drift components from the signal. Third, amplitude normalization: normalize the signal amplitude to the range of [-1, 1] to eliminate the influence of differences in the gain of different sensors; Fourth, data segmentation: Calculate the effective duration of the signal based on the pipe length and sound velocity, and extract the effective data segments; Step S3: Feature pattern decomposition based on correlation kurtosis The preprocessed echo signal is input into the feature mode decomposition model for adaptive decomposition, specifically including: An adaptive finite impulse response filter bank is constructed, comprising K parallel FIR filters, each filter having an order of M, where K ranges from 4 to 8 and M ranges from 64 to 256. Define the correlation kurtosis CK as the objective function for optimization, and its calculation formula is as follows: ; in, The output signal is the filter signal, and T is the period delay parameter. It represents the mathematical expectation; the correlation kurtosis simultaneously measures the impulsiveness and periodicity of the signal to effectively enhance the periodic impulsive characteristics; The filter coefficients are iteratively optimized using gradient descent or particle swarm optimization algorithms to maximize the correlation kurtosis value of each filter output. K intrinsic mode components (IMFs) are obtained, and each IMF corresponds to defect features of different frequency bands and different physical mechanisms, thereby achieving the enhancement and separation of defect features. Step S4: Deep Learning Feature Extraction and Recognition Based on Transformer The K intrinsic mode components obtained in step S3 are used as multi-channel inputs and fed into a pre-trained Transformer deep learning model for feature extraction and defect identification, specifically including: Data embedding: Each intrinsic mode component (IMF) is segmented using a sliding window method, with a window length of W and a stride of S, where S = W / 2; each window is mapped to a d-dimensional feature vector through a one-dimensional convolutional layer or a fully connected layer, where d is the embedding dimension; Positional encoding: Sine-cosine positional encoding is added to the embedded feature vector to preserve temporal information. The positional encoding formula is: ; ; in, For location index, For dimension indexing; Multi-head self-attention encoding: global modeling of embedded features through N layers of Transformer encoders; each encoder layer includes a multi-head self-attention sub-layer and a feedforward neural network sub-layer; The formula for calculating the multi-head self-attention mechanism is: ; ; in, , For the number of attention heads, The weight matrix is ​​learnable; the self-attention mechanism can adaptively focus on the time regions and channels most relevant to the defect features, capturing the interactions between different intrinsic mode components and the long-distance dependencies between different time steps. Feature aggregation: Perform global average pooling on all time-step features output by the encoder or use a set [CLS] token to obtain a fixed-dimensional global feature representation; Dual-task output: Defect classification and localization are achieved through two independent output heads. Classification Header: Fully connected layer + Softmax activation function, outputs the probability distribution of defect types C, where C is the number of defect types. The output formula is: ; in, For global feature vectors, For classification header parameters; Regression head: Fully connected layer + linear activation function, outputs the distance between the defect and the pipe opening, with the following formula: ; in For regression head parameters; Step S5: Output and Visualization of Detection Results Based on the output of the Transformer model, the probability distribution of defect types and defect location information are extracted. The defect category with the highest probability is selected as the detection result, and a confidence threshold is set for reliability judgment. The detection results are displayed in real time on the human-computer interaction interface, including: defect type, defect location, confidence level, original echo waveform, IMF component waveform, and attention heatmap.

2. The method for acoustic detection of pipeline defects based on feature pattern decomposition and Transformer neural network as described in claim 1, characterized in that: Adaptive detection operation: When the confidence level of the defect type output in step S5 is lower than the preset threshold, it is determined that the signal quality at the current position is poor or the distance to the defect is too far; control the moving platform to advance a preset distance into the pipeline, and repeat steps S1 to S5; cyclically execute the above process until a high confidence detection result is obtained or the end of the pipeline is reached.

3. The method for acoustic detection of pipeline defects based on feature pattern decomposition and Transformer neural network as described in claim 1, characterized in that: In step S3, the period delay parameter T is adaptively determined based on the pipe length L and the sound velocity c, and the calculation formula is as follows: ; in Sampling frequency, This indicates rounding down; the formula ensures that the periodic delay corresponds to the time it takes for a sound wave to travel one round trip in the pipe, thus effectively extracting the periodic reflection characteristics.

4. The method for acoustic detection of pipeline defects based on feature pattern decomposition and Transformer neural network as described in claim 1, characterized in that: The test results are stored in a database to generate a test report, which supports historical data query and trend analysis.

5. The method for acoustic detection of pipeline defects based on feature pattern decomposition and Transformer neural network as described in claim 1, characterized in that: In step S4, the Transformer model is pre-trained in the following manner: Data preparation: Collect acoustic echo data of different types of pipes, different defect types, and different defect locations to establish a labeled dataset; the dataset includes at least 1000 normal samples and more than 500 samples of each type of defect; Data augmentation: Methods such as time stretching, frequency shifting, adding Gaussian noise, and time translation are used to expand the training data and improve the model's generalization ability; Loss function: A weighted combination of classification loss and regression loss, expressed as follows: ; in, Cross-entropy classification loss, The mean squared error regression loss, These are the weighting coefficients; Optimization strategy: The AdamW optimizer is used with an initial learning rate of 0.0001. Cosine annealing is used for learning rate scheduling. The training lasts for 100 to 200 epochs with a batch size of 32 to 64. Regularization: Dropout and label smoothing are used to prevent overfitting.

6. A detection system for implementing the acoustic detection method for pipeline defects based on feature pattern decomposition and Transformer neural network as described in any one of claims 1-5, characterized in that: It includes a mobile platform that can move autonomously or remotely within the pipeline, a sound wave emitting module, a sound wave receiving module, a control and data processing module, a human-machine interaction module, and an auxiliary function module with several optional functions; The robot platform includes a vehicle body, on which are mounted a drive mechanism, power supply equipment, communication equipment for real-time data transmission with the ground control station, and a sensor platform. The sensor platform includes a sound wave emitting module and a sound wave receiving module. The drive mechanism is either a four-wheel independent drive mechanism or a tracked drive mechanism. Each drive wheel of the four-wheel independent drive mechanism is equipped with an independent motor and encoder.

7. A detection system for implementing the acoustic detection method for pipeline defects based on feature pattern decomposition and Transformer neural network as described in claim 6, characterized in that: The vehicle body is equipped with an attitude adjustment mechanism for adjusting the attitude of the sensor platform. The attitude adjustment mechanism includes pitch adjustment and roll adjustment devices to ensure that the sensor platform is kept in a horizontal attitude in a non-horizontal pipe.

8. A detection system for implementing the acoustic detection method for pipeline defects based on feature pattern decomposition and Transformer neural network as described in claim 7, characterized in that: The acoustic wave transmitting module also includes a power monitoring unit, which monitors the transmitting power and transducer impedance in real time. When the transducer is abnormal or the environmental reflection is too strong, the transmitting power is automatically adjusted to prevent equipment damage and signal saturation.

9. A detection system for implementing the acoustic detection method for pipeline defects based on feature pattern decomposition and Transformer neural network as described in claim 8, characterized in that: The acoustic wave receiving module is installed at the front end of the sensor platform to receive reflected echo signals from inside the pipe; the sensor array of the acoustic wave receiving module is linearly arranged at equal intervals, and the interval d satisfies: Where c is the speed of sound, and each sensor is connected to an independent low-noise preamplifier to perform analog low-pass filtering before ADC sampling to prevent aliasing.

10. A detection system for implementing the acoustic detection method for pipeline defects based on feature pattern decomposition and Transformer neural network as described in claim 9, characterized in that: The sensor array of the acoustic wave receiving module uses differential signal transmission and is equipped with shielded cables to effectively suppress electromagnetic interference and common-mode noise. The auxiliary function modules include a video monitoring unit, an environmental sensing unit, a GPS and inertial navigation unit, and a data synchronization unit. The video monitoring unit is equipped with a waterproof camera and LED lighting to transmit real-time video of the pipeline interior and assist in confirming defects. The environmental sensing unit includes temperature sensors, humidity sensors, and gas sensors to monitor environmental parameters inside the pipeline and assess safety. The GPS and inertial navigation unit accurately records the detection location.