Method and system for detecting defects in a pipe

By combining multimodal detection with magnetic flux leakage signals and ultrasonic guided wave signals, and utilizing multi-scale feature enhancement and adaptive fusion strategies, the problems of low detection accuracy and insufficient generalization ability in existing technologies are solved, and high-precision identification and quantification of complex defects are achieved.

CN121856376BActive Publication Date: 2026-05-12NORTHEASTERN UNIV CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NORTHEASTERN UNIV CHINA
Filing Date
2026-03-18
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing pipeline defect detection technologies suffer from low detection accuracy and insufficient generalization ability when faced with complex defects involving multiple scales, cross-materials, and varying operating conditions, making it difficult to meet the complex and ever-changing operational and maintenance needs of industrial sites.

Method used

Multimodal detection signals (magnetic leakage signal and ultrasonic guided wave signal) are combined with multi-scale feature enhancement, convolution and attention mechanisms to extract features, and cross-modal fusion features are generated through mutual information calculation and adaptive weighting adaptive fusion strategy for multi-task detection and physical verification.

Benefits of technology

It significantly improves the accuracy of pipeline defect type identification, the precision of location, and the reliability of size quantification, thereby enhancing the intelligence level and engineering application value of pipeline defect detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121856376B_ABST
    Figure CN121856376B_ABST
Patent Text Reader

Abstract

The application discloses a pipeline defect detection method and system, and belongs to the technical field of pipeline defect detection. The pipeline defect detection method comprises the following steps: acquiring a preprocessed magnetic flux leakage signal and an ultrasonic guided wave signal; performing feature extraction on the signals to obtain a first feature subjected to multi-scale enhancement processing and a second feature subjected to convolution and attention mechanism processing; adopting a strategy containing mutual information calculation and adaptive weight to perform fusion to obtain a cross-modal fusion feature; performing multi-task detection and correction based on the fusion feature to obtain a detection result indicating a defect type, a position and a size. The application can overcome the limitation of single modal detection, significantly improve the accuracy of defect type identification, positioning accuracy and size quantification reliability through dynamic weight distribution and physical constraint verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of pipeline defect detection technology, and in particular to pipeline defect detection methods and systems. Background Technology

[0002] Pipelines, as core infrastructure for energy and fluid transportation, widely support the stable operation of critical sectors such as oil and gas extraction, chemical production, and urban water and gas supply. Operating in complex and harsh environments for extended periods, pipelines are highly susceptible to defects such as cracks, holes, and corrosion pits. Failure to promptly inspect and repair these defects can lead to major safety accidents such as leaks and explosions.

[0003] Existing pipeline defect detection technologies face two main limitations when dealing with complex and ever-changing industrial scenarios: over-reliance on single leakage magnetic signals and the prevalence of fixed receptive field structures in deep learning models. Firstly, when addressing common multi-scale defect coexistence scenarios in real-world pipelines (such as the simultaneous presence of 1-5mm millimeter-level cracks and 10-50mm centimeter-level corrosion pits), this fixed receptive field model faces an irreconcilable physical contradiction: while a small receptive field can capture the concentrated signal characteristics of cracks ("strong near-field, small range"), it cannot cover the dispersed signals of corrosion pits ("weak far-field, wide range"), leading to fuzzy localization of large defects; conversely, while a large receptive field can sense a wide range of signals, it can wash away crucial high-frequency details of small cracks through downsampling, causing small cracks to be missed. Secondly, because existing technologies are mostly trained on datasets of a single material (such as carbon steel) and specific operating conditions, the models often learn local features under specific environments rather than the essential magnetic signal patterns of the defects. Therefore, once the pipe material changes (such as replacing it with stainless steel) or the operating conditions fluctuate drastically (such as the temperature rising from room temperature to 60°C or the pressure increasing to 50MPa), the characteristics of the magnetic flux leakage signal will change accordingly, resulting in a significant degradation in model performance. The detection accuracy often drops by more than 15%, and it cannot be directly adapted to new scenarios. It is necessary to spend a lot of money to retrain or adjust the parameters, which severely restricts both detection accuracy and cross-scenario generalization ability, making it difficult to meet the complex and ever-changing operation and maintenance needs of industrial sites.

[0004] In summary, when faced with complex defects involving multiple scales, cross-materials, and varying operating conditions, existing pipeline defect detection technologies suffer from low detection accuracy and insufficient generalization ability. Summary of the Invention

[0005] This application provides a pipeline defect detection method and system to at least solve the problems of insufficient utilization of feature information, low accuracy in identifying complex defects, and large quantification error of defect size in existing single-modal detection technologies for pipeline defect detection.

[0006] In a first aspect, this application provides a method for detecting pipeline defects, the method comprising:

[0007] Acquire preprocessed multimodal detection signals about pipeline defects. The multimodal detection signals include magnetic flux leakage signals and ultrasonic guided wave signals.

[0008] Feature extraction is performed on the magnetic flux leakage signal and the ultrasonic guided wave signal to obtain the first feature and the second feature. The first feature is obtained by performing multi-scale feature enhancement processing on the magnetic flux leakage signal, and the second feature is obtained by performing convolution and attention mechanism processing on the ultrasonic guided wave signal.

[0009] An adaptive fusion strategy is adopted to fuse the first feature and the second feature to obtain cross-modal fused features. The adaptive fusion strategy includes mutual information calculation and adaptive weights.

[0010] Multi-task detection and correction based on cross-modal fusion features are used to obtain defect detection results. The defect detection results are used to indicate the type, location and target size of pipeline defects. Multi-task detection and correction includes classification, location and physical verification.

[0011] The above technical solution acquires multimodal detection data containing magnetic flux leakage signals and ultrasonic guided wave signals. It extracts first and second features reflecting different physical properties using multi-scale feature enhancement processing and convolution combined with attention mechanisms. Then, it generates cross-modal fusion features using an adaptive fusion strategy that includes mutual information calculation and adaptive weights. Finally, it performs multi-task detection including classification, localization, and physical verification based on these features. This technical approach achieves deep fusion and maximizes information utilization by complementing the advantages of magnetic flux leakage and ultrasonic guided wave modes. Its beneficial effects are that it can effectively overcome the limitations of single-mode detection. Through dynamic weight allocation and physical constraint verification, it significantly improves the accuracy of pipeline defect type identification, the precision of localization, and the reliability of size quantification, thereby greatly enhancing the intelligence level and engineering application value of pipeline defect detection.

[0012] Secondly, a pipeline defect detection system includes:

[0013] The signal acquisition module is used to acquire preprocessed multimodal detection signals about pipeline defects, including magnetic flux leakage signals and ultrasonic guided wave signals.

[0014] The feature extraction module is used to extract features from the magnetic flux leakage signal and the ultrasonic guided wave signal to obtain a first feature and a second feature. The first feature is obtained by performing multi-scale feature enhancement processing on the magnetic flux leakage signal, and the second feature is obtained by performing convolution and attention mechanism processing on the ultrasonic guided wave signal.

[0015] An adaptive fusion module is used to fuse the first feature and the second feature using an adaptive fusion strategy to obtain cross-modal fusion features. The adaptive fusion strategy includes mutual information calculation and adaptive weights.

[0016] A task detection and correction module is used to perform multi-task detection and correction based on the cross-modal fusion features to obtain defect detection results. These results indicate the type, location, and target size of pipeline defects. The multi-task detection and correction includes classification, localization, and physical verification. Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0018] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A flowchart illustrating the pipeline defect detection method provided in this application embodiment. Figure 1 ;

[0020] Figure 2 A flowchart illustrating the pipeline defect detection method provided in this application embodiment. Figure 2 ;

[0021] Figure 3 A flowchart illustrating the pipeline defect detection method provided in this application embodiment. Figure 3 ;

[0022] Figure 4 A flowchart illustrating the pipeline defect detection method provided in this application embodiment. Figure 4 ;

[0023] Figure 5 A flowchart illustrating the pipeline defect detection method provided in this application embodiment. Figure 5 ;

[0024] Figure 6 A flowchart illustrating the pipeline defect detection method provided in this application embodiment. Figure 6 ;

[0025] Figure 7 A flowchart illustrating the pipeline defect detection method provided in this application embodiment. Figure 7 ;

[0026] Figure 8 A flowchart illustrating the pipeline defect detection method provided in this application embodiment. Figure 8 ;

[0027] Figure 9 This is a schematic diagram of the pipeline defect detection system provided in the embodiments of this application;

[0028] Figure 10 A schematic diagram of the pipeline defect detection system provided in this application embodiment. Figure 2 ;

[0029] Figure 11 A flowchart illustrating the pipeline defect detection method provided in this application embodiment. Figure 9 . Detailed Implementation

[0030] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0031] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0032] In related technologies, pipeline defect detection typically employs single non-destructive testing methods such as magnetic flux leakage (MFL) or ultrasonic guided wave testing. While MFL has high sensitivity to surface and near-surface defects, it struggles to effectively identify internal pipeline defects. Furthermore, when quantifying defect sizes, it is susceptible to the effects of lift-off values ​​and material permeability inhomogeneities, leading to insufficient measurement accuracy. Ultrasonic guided wave testing, while capable of detecting internal pipeline structures and achieving long-distance detection, suffers from complex signal components, is easily interfered with by factors such as pipeline surface corrosion and coatings, and exhibits low sensitivity to surface opening defects. Moreover, some existing multimodal fusion technologies often rely on simple data splicing or manual interpretation at the data level, lacking adaptive feature fusion mechanisms based on the inherent correlations between signals (such as mutual information), thus failing to fully leverage the complementary advantages of different modal data. Simultaneously, detection algorithms based on purely data-driven approaches often ignore the physical mechanisms of defect formation, potentially leading to predicted defect sizes that do not conform to physical laws, reducing the reliability and robustness of the detection results.

[0033] To address the aforementioned issues, this application provides a pipeline defect detection method. This method acquires multimodal detection data containing magnetic flux leakage signals and ultrasonic guided wave signals. It then utilizes multi-scale feature enhancement processing and a convolutional attention mechanism to extract first and second features reflecting different physical properties. An adaptive fusion strategy incorporating mutual information calculation and adaptive weights is employed to generate cross-modal fusion features. Finally, based on these features, multi-task detection including classification, localization, and physical verification is performed. This method aims to at least resolve the problems of insufficient utilization of feature information, low accuracy in identifying complex defects, and large quantification errors in defect size in existing single-modal detection technologies for pipeline defect detection.

[0034] The application scenarios of the technical solutions provided in the embodiments of this application are described below.

[0035] The pipeline defect detection method provided in this application can be widely applied to various pipeline facilities that require regular maintenance and inspection, such as oil and gas transmission pipelines, urban underground water supply networks, chemical industrial pipelines, and power cable pipelines. As pipelines age, pipeline defects caused by corrosion, cracks, and mechanical damage become increasingly prominent. If these defects are not detected and accurately assessed in a timely manner, they can easily lead to serious safety accidents such as leaks and explosions. Therefore, high-precision and high-reliability non-destructive testing of pipelines is a crucial step in ensuring their safe operation.

[0036] In practical applications, in-pipe detectors (commonly known as "intelligent pipeline pigs") or external pipeline inspection robots are typically used as platforms. This detection platform integrates a magnetic flux leakage sensor array and an ultrasonic guided wave probe, enabling it to travel along the pipeline route, either inside or outside. During its journey, the magnetic flux leakage sensor collects magnetic flux leakage signals from the pipeline surface and near the surface, making it sensitive to surface defects such as cracks and pits. Simultaneously, the ultrasonic guided wave probe excites and receives guided wave signals propagating along the pipe wall, providing good detection of corrosion thinning and layered defects inside the pipeline.

[0037] The detection platform transmits the collected raw multimodal detection signals in real time to the built-in edge computing module or uploads them to a data processing device on a remote server for processing. The data processing device runs the pipeline defect detection method provided in this application embodiment. First, it preprocesses the raw magnetic flux leakage signal and ultrasonic guided wave signal (e.g., denoising, normalization, and alignment). Then, it uses a deep learning network to extract the first feature (after multi-scale enhancement) and the second feature (after convolution and attention mechanisms). Subsequently, it adopts an adaptive fusion strategy, based on mutual information calculation and adaptive weight allocation, to deeply fuse the features of the two modes to obtain cross-modal fusion features. Finally, it performs classification, localization, and physical verification based on the fusion features, and outputs defect detection results containing defect type, precise location, and target size corrected by physical laws.

[0038] By applying the technical solution of this application, the complementary advantages of magnetic flux leakage and ultrasonic guided wave detection technologies can be leveraged in complex pipeline inspection environments to improve the detection rate and quantification accuracy of minute and complex defects on and inside pipelines, providing a scientific and effective basis for pipeline integrity assessment and maintenance.

[0039] After introducing the implementation environment and application scenarios of the embodiments of this application, the technical solutions provided by the embodiments of this application are described below. (See also...) Figure 1 Taking a data processing device as the executing entity as an example, the method includes the following steps.

[0040] Step 101: Obtain the preprocessed multimodal detection signal for pipeline defects.

[0041] The multimodal detection signals include magnetic flux leakage signals and ultrasonic guided wave signals. Specifically, the data processing equipment can receive raw data transmitted from the acquisition equipment (such as a pipe detector) through a data interface. This raw data includes the raw magnetic flux leakage signal and the raw ultrasonic guided wave signal acquired during pipe inspection. Because the raw signals often contain significant amounts of environmental noise, electromagnetic interference, and errors caused by sensor jitter in actual testing environments, the data processing equipment preprocesses the raw signals after acquisition or after initial processing at the acquisition equipment. The preprocessing process may include wavelet threshold denoising of the original magnetic flux leakage signal and the original ultrasonic guided wave signal to filter out high-frequency noise and background interference, resulting in a denoised signal. Subsequently, amplitude normalization is performed on the denoised signal to eliminate the influence of gain differences between different sensors. Finally, based on a preset sampling frequency and detection speed, the two processed modal signals are spatially aligned to ensure that the magnetic flux leakage signal and the ultrasonic guided wave signal at the same location are consistent in time or space, thereby obtaining the preprocessed multimodal detection signal, which lays the foundation for subsequent accurate feature extraction.

[0042] Step 102: Extract features from the magnetic flux leakage signal and the ultrasonic guided wave signal to obtain the first feature and the second feature.

[0043] The first feature is obtained by performing multi-scale feature enhancement processing on the magnetic flux leakage signal, and the second feature is obtained by performing convolution and attention mechanisms on the ultrasonic guided wave signal. Specifically, for the magnetic flux leakage signal, the data processing device uses a pre-set multi-scale feature extraction network (e.g., parallel convolutional layers containing convolutional kernels of different sizes) to process it. Magnetic flux leakage signals are generally sensitive to surface defects, but defects of different sizes (such as microcracks and large-area corrosion) exhibit features of different scales on the signal waveform. Through multi-scale feature enhancement processing, the data processing device can simultaneously capture the subtle texture features and macroscopic contour features in the magnetic flux leakage signal, thereby obtaining the first feature containing rich geometric details.

[0044] For ultrasonic guided wave signals, the data processing equipment utilizes a convolutional neural network incorporating an attention mechanism. Ultrasonic guided wave signals contain rich information about the internal structure of the pipe, but their signal composition is complex. First, local time-frequency features of the signal are extracted through convolution operations; then, an attention mechanism (such as channel attention or spatial attention) is introduced, enabling the network to automatically learn and focus on the signal channels or time segments that contribute most to defect identification, suppressing interference from irrelevant noise, thereby obtaining a second feature that better characterizes the properties of internal pipe defects.

[0045] Step 103: Use an adaptive fusion strategy to fuse the first feature and the second feature to obtain cross-modal fused features.

[0046] The adaptive fusion strategy includes mutual information calculation and adaptive weights. Specifically, while magnetic flux leakage signals and ultrasonic guided wave signals are physically complementary, their information value is not always equal. During fusion, the data processing device first calculates the mutual information between the first and second features, reflecting the correlation and redundancy between the two modal features. Based on the mutual information calculation results and the confidence level of each feature, the data processing device dynamically generates fusion weights for the current input signal through an adaptive weight allocation module (e.g., using a fully connected layer combined with a Softmax function).

[0047] For example, when the leakage magnetic signal is subjected to strong magnetic interference, causing a decrease in the quality of the first feature, the weight of the first feature is automatically reduced, while the weight of the more reliable second feature is increased. Finally, the data processing device uses the generated adaptive weights to perform weighted fusion or splicing of the first and second features to obtain a cross-modal fused feature. This feature combines the advantages of leakage magnetic signal in its sensitivity to surface defects and the advantages of ultrasound in its penetration of internal defects, and also possesses anti-interference capabilities.

[0048] Step 104: Perform multi-task detection and correction based on cross-modal fusion features to obtain defect detection results.

[0049] Defect detection results are used to indicate the type, location, and target size of pipeline defects. Multi-task detection and correction includes classification, localization, and physical verification. Specifically, the data processing equipment inputs cross-modal fusion features into the multi-task detection network. This multi-task detection network includes a classification head, a regression head, and a physical verification module. The classification head is used to determine the specific type of defect (e.g., axial crack, circumferential crack, volumetric defect, etc.); the regression head is used to predict the location (e.g., axial coordinates, circumferential angle) and initial dimensions (e.g., length, width, depth) of the defect.

[0050] To further improve the accuracy and physical plausibility of the detection results, the data processing equipment also performs physical verification. Physical verification uses pre-set physical constraint models (such as the correspondence model between leakage magnetic field and defect size, guided wave scattering models, etc.) to verify and correct the initial size predicted by the regression head. If the initial size does not meet the physical constraints (for example, the predicted depth exceeds the pipe wall thickness, or the change in leakage magnetic flux is significantly inconsistent with the size ratio), the size is adjusted according to the physical constraint error. Finally, the corrected defect detection results are output, which not only include the defect type and location but also provide accurate target dimensions that conform to physical laws, providing a reliable basis for pipeline maintenance.

[0051] This embodiment acquires preprocessed magnetic flux leakage signals and ultrasonic guided wave signals, extracts detailed features of magnetic flux leakage using multi-scale feature enhancement processing, extracts key ultrasonic features using convolution processing with attention mechanisms, and achieves cross-modal adaptive fusion using a strategy based on mutual information calculation and adaptive weights. The results are output through a multi-task detection mechanism that includes physical verification. This approach achieves comprehensive capture of defect information at different scales, precise focusing of key signal regions, and dynamic adjustment and physical constraint verification of complementary advantages between different modes. It effectively improves the anti-interference capability and feature representation capability of pipeline defect detection in complex noise environments, and significantly improves the accuracy and reliability of defect type identification, location, and size quantification.

[0052] It should be noted that steps 101-104 above are a simplified description of the embodiments provided in this application.

[0053] The embodiments of this application will be described in more detail below with reference to some examples. See also Figure 2 After step 104, the pipeline defect detection method provided in this application embodiment further includes the following steps:

[0054] Step 105: Determine the risk and safety level based on the defect detection results.

[0055] After obtaining precise defect types, locations, and target dimensions through the aforementioned steps, the data processing equipment will further calculate and determine the pipeline's risk and safety level based on these defect detection results in order to comprehensively assess the pipeline's service status and formulate a reasonable maintenance plan. The risk and safety level classification helps maintenance personnel quickly identify high-risk areas within the pipeline segment, thereby optimizing the allocation of maintenance resources.

[0056] In some embodiments, see Figure 3 The determination of the risk and safety level based on the defect detection results includes:

[0057] Step 201: Based on the defect detection results, determine the current characteristics of the pipeline defect.

[0058] The current characteristics of the pipeline defect are used to indicate its geometric shape, dimensional parameters, and degree of damage. In practice, the output defect detection results are analyzed to extract key indicators characterizing the current state of the pipeline defect. Geometric shape can include the shape of the pipeline defect (e.g., circular, elliptical, irregular) and aspect ratio; dimensional parameters directly use the specific values ​​of the detected pipeline defect's length, width, and depth; the degree of damage is a damage ratio calculated based on the pipeline defect's dimensional parameters and the original pipe wall thickness, such as cross-sectional loss rate or percentage of remaining wall thickness. These current characteristics constitute the basic data for risk assessment.

[0059] Step 202: Determine the evolution trend of pipeline defects based on the current characteristics of the pipeline defects.

[0060] The pipeline defect evolution trend represents the growth rate and expansion direction of the pipeline defect within a predetermined time period. In practice, a pre-defined pipeline defect growth prediction model (such as a physics-based corrosion growth model or a data-driven time-series prediction model) can be used to analyze this trend. The current characteristics of the determined pipeline defect are input into the prediction model, and combined with environmental parameters (such as soil corrosivity, transport medium pressure, and temperature), the model predicts the changes in the pipeline defect within a predetermined time period (e.g., the next 1 or 5 years). Specifically, the pipeline defect evolution trend includes the rate of increase in defect depth (i.e., growth rate) and the expansion direction of crack length or corrosion area (i.e., expansion along the pipeline axis or circumferential direction), thereby determining whether the pipeline defect will rapidly develop to a critical failure state.

[0061] Step 203: Determine the risk and safety level based on the evolution trend of pipeline defects.

[0062] Risk safety levels are used to assess the service safety of pipelines and guide maintenance decisions. Finally, based on the pipeline defect evolution trend and relevant safety assessment standards (such as ASME B31G, DNVGL-RP-F101, and other pipeline integrity evaluation standards), the probability of pipeline failure and consequences at the defect location are calculated to determine the risk safety level. For example, risk safety levels can be divided into four categories: "low risk," "medium risk," "high risk," and "extremely high risk." If the pipeline defect evolution trend shows that the defect is growing slowly and has not exceeded the safety threshold, it is assessed as low risk and requires regular monitoring. If the pipeline defect evolution trend shows that the defect will reach a critical size in a short period of time, leading to a sharp increase in the risk of pipeline rupture, it is assessed as high risk or extremely high risk. An alarm will be generated immediately, and maintenance personnel will be guided to take emergency maintenance measures (such as replacing pipe sections, patching, etc.) to ensure the service safety of the pipeline.

[0063] This embodiment utilizes a technical means to extract the geometric shape, size parameters, and damage degree of defects based on defect detection results, and then predict the growth rate and expansion direction of pipeline defects within a preset time period in the future, thereby determining the risk and safety level. This achieves a transformation from static pipeline defect detection to dynamic risk assessment, enabling accurate prediction of pipeline defect evolution trends. Its beneficial effects include the ability to assess the service safety of pipelines in advance, providing scientific and forward-looking guidance for maintenance decisions, effectively preventing pipeline accidents, and significantly improving the intelligence level and operation and maintenance efficiency of pipeline management.

[0064] In some embodiments, see Figure 4Based on the current characteristics of pipeline defects, determine the evolution trend of pipeline defects, including:

[0065] Step 301: Based on the current characteristics of the pipeline defect, determine the key feature vector of the pipeline defect.

[0066] In practice, core indicators that have the greatest impact on the growth of pipeline defects are selected from the current characteristics of pipeline defects, such as the length-to-width ratio, depth-to-diameter ratio, corrosion pit volume, and current maximum depth of pipeline defects. These indicators are combined into a key feature vector that can represent the current state of pipeline defects. This key feature vector is a point in the multi-dimensional data space and is used to quantitatively characterize the current key attributes of pipeline defects.

[0067] Step 302: Determine the growth prediction parameters of pipeline defects based on key feature vectors.

[0068] Next, the key feature vectors are input into a pre-defined pipeline defect growth prediction model (such as a physics-based corrosion kinetics model or a data-driven regression prediction network). Based on the input feature vectors, the pipeline defect growth prediction model calculates and outputs the growth prediction parameters of the pipeline defects. These growth prediction parameters may specifically include values ​​such as corrosion rate (e.g., mm / year) and crack propagation rate (e.g., mm / thousand cycles).

[0069] Step 303: Determine the evolution trend of pipeline defects based on growth prediction parameters.

[0070] Finally, by combining growth prediction parameters and the current time base, the size and morphological changes of pipeline defects in the future within a preset time period are extrapolated, thereby determining the evolution trend of pipeline defects, such as predicting how much the pipeline defects will deepen or how far they will expand circumferentially in the next year.

[0071] This embodiment uses a technical means to extract key feature vectors of pipeline defects and determine growth prediction parameters accordingly, thereby predicting the evolution trend of pipeline defects. This enables quantitative analysis and prediction of the future growth state of pipeline defects. Its beneficial effect is that it can know the development speed and direction of pipeline defects in advance, providing dynamic data support for risk assessment, thereby assisting operation and maintenance personnel in formulating more accurate maintenance strategies and avoiding sudden accidents.

[0072] In some embodiments, see Figure 5 An adaptive fusion strategy is used to fuse the first feature and the second feature to obtain cross-modal fused features. The adaptive fusion strategy includes mutual information calculation and adaptive weights, including:

[0073] Step 401: Obtain the mutual information matrix.

[0074] In practice, the mutual information value between the first feature and the second feature is calculated. Mutual information measures the statistical correlation between two variables and is also sensitive to nonlinear relationships. By calculating the mutual information between each feature unit in the two feature maps, a mutual information matrix is ​​constructed. This mutual information matrix is ​​used to indicate the degree of nonlinear correlation between the first feature and the second feature.

[0075] Step 402: Construct a cross-modal attention graph based on the mutual information matrix.

[0076] The mutual information matrix is ​​normalized to generate a cross-modal attention map. This cross-modal attention map is used to characterize the correlation distribution between the first and second features, and can intuitively show the correlation strength of different modal features in spatial or channel dimensions, thereby helping to determine which feature regions are complementary and which are redundant.

[0077] Step 403: Based on the cross-modal attention map, assign corresponding adaptive weights to the first feature and the second feature respectively.

[0078] Based on the numerical distribution in the cross-modal attention map, adaptive weights are assigned to the first and second features respectively using a preset weight generation function. Larger weights are assigned to highly correlated regions to highlight complementary information, while smaller weights are assigned to low-correlation regions to suppress noise, thus achieving dynamic weight allocation.

[0079] Step 404: Use adaptive weights to perform a weighted summation of the first and second features to obtain cross-modal fusion features.

[0080] Finally, the first and second features are weighted and summed using adaptive weights to fuse the feature information of the two modes according to their importance, thus obtaining the cross-modal fusion feature. This cross-modal fusion feature integrates the advantageous information of leakage magnetic signals and ultrasonic guided wave signals.

[0081] This embodiment achieves adaptive feature fusion based on the intrinsic correlation between features by acquiring the mutual information matrix and constructing a cross-modal attention map, and then assigning adaptive weights for weighted summation and fusion. Its beneficial effect is that it can dynamically adjust the contribution of different modal features, make full use of complementary information and suppress redundant interference, and significantly improve the expressive power of cross-modal fusion features and the robustness of detection results.

[0082] In some embodiments, see Figure 6 The second feature is obtained by processing the ultrasonic guided wave signal through convolution and attention mechanisms, including:

[0083] Step 501: Use a one-dimensional convolutional neural network to extract features from the ultrasonic guided wave signal to obtain preliminary features.

[0084] In practice, the preprocessed ultrasonic guided wave signal is input into a one-dimensional convolutional neural network. This one-dimensional convolutional neural network uses multiple one-dimensional convolutional layers to slide the convolution kernel along the time axis to extract local time-frequency features from the signal, capture abrupt changes and patterns in the waveform, and thus obtain preliminary features.

[0085] Step 502: Input the preliminary features into the attention mechanism module to obtain the weighted features.

[0086] To select the most effective features for pipeline defect identification, preliminary features are input into an attention mechanism module (e.g., the channel attention module SE-Net or a self-attention module). This module automatically generates importance weights for each feature channel or time step through learning, and multiplies these weights by the preliminary features to obtain weighted features. This step enhances the response of key features and suppresses responses to background noise and irrelevant information.

[0087] Step 503: Perform feature mapping on the weighted features to obtain the second feature.

[0088] Finally, the weighted features are nonlinearly mapped and dimensionally transformed through fully connected layers or further convolutional layers to extract high-order, semantic feature representations, ultimately yielding the second feature.

[0089] This embodiment utilizes a one-dimensional convolutional neural network to extract preliminary features, and then obtains second features through weighting and feature mapping via an attention mechanism module. This technique enables the focusing and enhancement of key pipeline defect information in ultrasonic guided wave signals. Its beneficial effect lies in effectively filtering noise and background interference in the signal, improving the quality and recognizability of the features, thereby enhancing the accuracy of subsequent pipeline defect detection.

[0090] In some embodiments, see Figure 7 Multi-task detection and correction are performed based on cross-modal fusion features to obtain defect detection results. These results indicate the type, location, and target size of pipeline defects. The multi-task detection and correction includes classification, localization, and physical verification, specifically comprising:

[0091] Step 601: Classify the pipeline defects based on cross-modal fusion features to determine the type of pipeline defect.

[0092] In practice, cross-modal fusion features are input into the classification head of the multi-task detection network. The classification head performs pattern recognition and probability calculation on the fusion features, outputting the probability distribution of pipeline defects belonging to different categories (such as axial cracks, circumferential cracks, volumetric pipeline defects, etc.). The category with the highest probability is selected as the final defect type, thereby achieving a qualitative judgment of the pipeline defect attributes.

[0093] Step 602: Perform localization processing based on cross-modal fusion features to determine the location and initial size of the pipeline defect.

[0094] Simultaneously, the cross-modal fused features are input into the regression head of the multi-task detection network. The regression head performs numerical regression analysis on the fused features to predict the specific location parameters of the pipeline defect on the pipeline (such as axial coordinates and circumferential angles) and the geometric parameters of the pipeline defect (such as length, width, and depth). These geometric parameters, directly predicted by the neural network, are used as initial dimensions. Although they have high reference value, they may not conform to physical laws.

[0095] Step 603: Based on the initial dimensions, perform physical verification using a preset physical constraint model to determine the target dimensions.

[0096] To improve the accuracy of dimensions, pre-defined physical constraint models (such as the correspondence model between leakage magnetic field and pipe defect size, guided wave scattering model, etc.) are used to verify and correct the initial dimensions. First, a physical constraint error is determined based on the initial dimensions. This error indicates the deviation between the initial dimensions and the pre-defined physical laws (e.g., whether the predicted depth exceeds the pipe wall thickness, or whether the signal characteristics match the size ratio). Then, dimension correction parameters are determined based on this physical constraint error. Finally, the initial dimensions are corrected using the dimension correction parameters to obtain a target dimension that conforms to physical reality.

[0097] In some embodiments, see Figure 11 Based on the initial dimensions, physical verification is performed using a pre-defined physical constraint model to determine the target dimensions, including:

[0098] Step 6031: Determine the physical constraint error based on the initial dimensions.

[0099] The physical constraint error is used to indicate the deviation between the initial size and the preset physical laws. In specific implementations, the initial size predicted by the regression head is verified using a preset physical constraint model. This physical constraint model includes prior knowledge reflecting the physical mechanism, such as the correspondence model between the leakage magnetic field and the pipe defect size, and the guided wave scattering model. The initial size is input into the model, and the theoretical difference between it and the actual detection signal characteristics is calculated, or it is directly verified whether the initial size meets basic physical constraints (e.g., whether the predicted depth of the defect exceeds the original wall thickness of the pipe, or whether the change in leakage magnetic flux is significantly inconsistent with the defect size ratio). Through calculation, the physical constraint error is obtained, which quantifies the degree to which the initial size deviates from the physical laws.

[0100] Step 6032: Determine the size correction parameters for the pipeline defect based on the physical constraint error.

[0101] After obtaining the physical constraint error, a size correction parameter is determined based on the magnitude and direction of the error using a preset correction algorithm or backpropagation mechanism. For example, if the physical constraint error indicates that the predicted depth is too large, the correction parameter will include a negative adjustment; if the physical constraint error indicates that the size scale is distorted, the correction parameter will include a corresponding scaling factor. This size correction parameter is used to guide the adjustment of the initial size to eliminate physical deviations.

[0102] Step 6033: Correct the initial dimensions based on the dimension correction parameters to obtain the target dimensions of the pipe defects.

[0103] The initial size is corrected using defined size correction parameters. By applying the correction parameters to the initial size (e.g., through additive compensation or multiplicative adjustment), a target size that conforms to physical constraints is generated. This target size preserves the deep learning network's ability to capture defect features while eliminating errors that violate physical common sense, ensuring the physical plausibility of the result.

[0104] Step 604: Generate defect detection results based on the type, location, and target size of the pipeline defect.

[0105] Finally, the defect type determined in step 601, the defect location determined in step 602, and the physically verified target size obtained in step 603 are structurally integrated to generate the final defect detection result. The defect detection result not only includes the qualitative classification and location of the defect but also provides physically verified high-precision quantitative dimensions, thus providing reliable data support for pipeline service safety and subsequent maintenance decisions.

[0106] This embodiment uses a multi-task detection network for classification and localization, and utilizes a physical constraint model to calculate errors and correct parameters to verify the initial size, thereby obtaining the final detection result. This achieves a detection method that combines deep learning prediction with prior physical knowledge. Its beneficial effect is that it can effectively correct absurd results that may occur in pure data-driven prediction and do not conform to physical laws, significantly improving the accuracy of defect size quantification and engineering practicality.

[0107] In some embodiments, see Figure 8 The first feature is obtained by performing multi-scale feature enhancement processing on the leakage magnetic signal, specifically including:

[0108] Step 701: Construct a multi-scale feature extraction network.

[0109] The multi-scale feature extraction network comprises multiple parallel convolutional branches, each using convolutional kernels of different sizes. In specific implementations, a multi-scale feature extraction network is constructed to process magnetic flux leakage signals. This network includes multiple parallel convolutional branches, and to accommodate defects of different sizes within the pipe, each branch uses a convolutional kernel of a different size. For example, the first convolutional branch uses a smaller kernel (e.g., 1×3 or 1×5) to focus on local details of the signal; the second branch uses a medium-sized kernel (e.g., 1×7 or 1×9) to capture medium-scale feature changes; and the third branch uses a larger kernel (e.g., 1×15 or larger) to cover the macroscopic contours of the signal. This allows the network to simultaneously perceive both small and large-area defects.

[0110] Step 702: Input the magnetic leakage signal into each convolution branch and extract the local magnetic leakage features under different receptive fields.

[0111] The preprocessed magnetic flux leakage signal is copied and input into each parallel convolutional branch. Upon receiving the signal, each convolutional branch performs a sliding window convolution operation on the signal using a convolutional kernel of a specific size. Branches with small convolutional kernels, due to their smaller receptive field, can sensitively extract local features with high-frequency abrupt changes in the magnetic flux leakage signal; these features typically correspond to minute cracks or scratches on the pipe surface. Branches with large convolutional kernels, due to their larger receptive field, can extract local features with low-frequency gradual changes in the magnetic flux leakage signal; these features typically correspond to corrosion pits or large-area dents on the pipe surface. In this way, each branch outputs local magnetic flux leakage features reflecting pipe defect information at different scales.

[0112] Step 703: The local features of each leakage magnetic field are spliced ​​and fused to obtain the enhanced first feature.

[0113] Finally, the local leakage magnetic field features output from each convolutional branch are concatenated and fused. Specifically, the feature maps output from each branch are concatenated along the channel dimension to form a feature map with a deeper number of channels and richer information. Through concatenation, the subtle texture features extracted from small receptive fields and the macroscopic morphological features extracted from large receptive fields are organically integrated into the same feature space, thus obtaining the enhanced first feature. This first feature overcomes the limitations of single-scale feature representation and can characterize the multi-scale geometric details of pipe defects.

[0114] This embodiment utilizes a technique of constructing parallel convolutional branches containing convolutional kernels of different sizes to extract local features of magnetic flux leakage under different receptive fields, and then splicing and fusing them to obtain enhanced features. This technique achieves comprehensive capture of details and contour information of pipeline defects at different scales. This method effectively solves the physical contradiction that a fixed receptive field structure cannot simultaneously detect micro-cracks and large-area corrosion pits, avoids missed detection of small pipeline defects and ambiguity in the location of large pipeline defects, and thus significantly improves the feature representation ability and detection accuracy of magnetic flux leakage signals for complex multi-scale pipeline defects.

[0115] In some embodiments, acquiring preprocessed multimodal detection signals regarding pipeline defects includes:

[0116] First, the raw magnetic leakage signal and raw ultrasonic guided wave signal are acquired by the acquisition device.

[0117] Specifically, a data acquisition device (such as a smart pipeline pig) integrating a magnetic flux leakage sensor array and an ultrasonic probe is controlled to travel inside the pipeline. During its journey, the magnetic flux leakage sensor collects data on magnetic flux leakage in the pipeline wall after being excited by a magnetic field, while the ultrasonic probe excites and receives echo data of ultrasonic waves propagating in the pipeline wall. The acquisition device converts these analog signals into digital signals and transmits them through a data transmission module, thereby obtaining the original magnetic flux leakage signal and the original ultrasonic guided wave signal.

[0118] Secondly, wavelet threshold denoising was performed on the original magnetic flux leakage signal and the original ultrasonic guided wave signal to obtain the denoised magnetic flux leakage signal and the denoised ultrasonic guided wave signal.

[0119] Because pipeline inspection sites typically experience noise such as electromagnetic interference and mechanical vibration, the original signal often contains high-frequency spikes. To improve the signal-to-noise ratio, a wavelet thresholding denoising algorithm is used to process these two types of signals separately. Specifically, a suitable wavelet basis function (such as db4 or sym wavelet) is selected to perform multi-scale decomposition on the signal, separating low-frequency approximation coefficients and high-frequency detail coefficients. Subsequently, nonlinear thresholding processing (such as soft thresholding or hard thresholding quantization) is performed on the high-frequency detail coefficients according to a preset threshold function to filter out noise components. Finally, the processed coefficients are used to perform inverse wavelet transform to reconstruct the signal, thereby obtaining the denoised magnetic flux leakage signal and the denoised ultrasonic guided wave signal.

[0120] Then, amplitude normalization processing is performed on the denoised magnetic flux leakage signal and the denoised ultrasonic guided wave signal to determine the normalized magnetic flux leakage signal and the normalized ultrasonic guided wave signal.

[0121] Considering the inconsistent gains of different sensor channels and the large fluctuations in signal intensity, amplitude normalization is performed on the denoised signal to eliminate the influence of dimensions. For example, the Min-Max normalization method can be used to linearly map the signal amplitude to the interval [0,1] or [-1,1]; or the Z-score normalization method can be used to convert the signal into a standard distribution with a mean of 0 and a variance of 1. Through this process, the normalized leakage magnetic field signal and the normalized ultrasonic guided wave signal are determined, ensuring the consistency of the input data distribution during subsequent neural network processing.

[0122] Finally, based on the preset sampling frequency and detection speed, the normalized magnetic flux leakage signal and the normalized ultrasonic guided wave signal are spatially aligned to obtain the preprocessed multimodal detection signal.

[0123] Because the magnetic flux leakage sensor and the ultrasonic probe are physically spaced apart, or because their sampling rates differ, the signal points corresponding to the locations of defects in the same pipe may shift in time series. Based on the preset sampling frequency and the travel speed of the acquisition device within the pipe (detection speed), the actual spatial distance (e.g., meters from the starting point) corresponding to the sampling point is calculated. Subsequently, an interpolation algorithm (e.g., linear interpolation) is used to resample the signals, adjusting the normalized magnetic flux leakage signal and the ultrasonic guided wave signal to a unified spatial coordinate axis. In this way, each data point in both signal sequences corresponds to the same location on the pipe, achieving spatial alignment and obtaining the preprocessed multimodal detection signal.

[0124] This embodiment achieves the goals of removing signal noise, unifying signal magnitude, and ensuring spatial consistency of multimodal signals by performing wavelet threshold denoising, amplitude normalization, and spatial alignment processing on the original signal. Its beneficial effects are that it significantly improves the signal-to-noise ratio and data quality, eliminates the deviation caused by sensor differences, and provides a high-quality and accurately aligned data foundation for subsequent multi-scale feature extraction and cross-modal adaptive fusion, thereby ensuring the accuracy of the final pipeline defect detection results.

[0125] Figure 9 and Figure 10 This is a schematic diagram of the structure of a pipeline defect detection system provided in an embodiment of this application. See also... Figure 10 The pipeline defect detection system 800 includes: a signal acquisition module 801, a feature extraction module 802, an adaptive fusion module 803, a task detection and correction module 804, and a risk assessment module 805.

[0126] The signal acquisition module 801 is used to acquire preprocessed multimodal detection signals about pipeline defects.

[0127] Multimodal detection signals include magnetic flux leakage signals and ultrasonic guided wave signals. It is responsible for receiving raw data from acquisition equipment (such as an in-pipe detector) and performing preprocessing operations such as wavelet threshold denoising, amplitude normalization, and spatial alignment to obtain high-quality, spatially aligned multimodal detection signals.

[0128] The feature extraction module 802 is used to extract features from the magnetic flux leakage signal and the ultrasonic guided wave signal to obtain the first feature and the second feature.

[0129] Specifically, the first feature is obtained by performing multi-scale feature enhancement processing on the leakage magnetic signal to capture the details and contour information of pipe defects at different scales; the second feature is obtained by performing convolution and attention mechanism processing on the ultrasonic guided wave signal to focus on the pipe defect attributes inside the pipe and suppress noise interference.

[0130] The adaptive fusion module 803 is used to fuse the first feature and the second feature using an adaptive fusion strategy to obtain cross-modal fused features.

[0131] The adaptive fusion strategy includes mutual information calculation and adaptive weights. By calculating the mutual information matrix to construct a cross-modal attention map and dynamically allocating adaptive weights, the complementary advantages and deep fusion of the characteristics of magnetic leakage flux and ultrasonic guided wave signals are achieved.

[0132] The task detection and correction module 804 is used for multi-task detection and correction based on cross-modal fusion features to obtain pipeline defect detection results.

[0133] The defect detection results indicate the type, location, and target size of pipeline defects. Multi-task detection and correction includes classification, localization, and physical verification. This module not only utilizes deep learning networks for defect classification and localization but also uses a pre-defined physical constraint model to physically verify the predicted dimensions, ensuring that the results conform to physical laws.

[0134] Risk assessment module 805 is used to determine the risk level based on defect detection results.

[0135] This risk assessment module predicts the evolution trend of pipeline defects (such as growth rate and expansion direction) based on the current characteristics of the defects (such as geometry, size parameters and damage degree), and calculates the failure probability of the pipeline in combination with safety assessment standards, thereby determining the risk safety level to guide maintenance decisions.

[0136] In some embodiments, the signal acquisition module 801 is specifically used to acquire preprocessed multimodal detection signals regarding pipeline defects, wherein the multimodal detection signals include magnetic flux leakage signals and ultrasonic guided wave signals. The specific implementation process is as follows:

[0137] First, the signal acquisition module 801 acquires the raw magnetic flux leakage signal and raw ultrasonic guided wave signal collected by the acquisition device (such as an in-pipe detector). Specifically, the acquisition device, which integrates a magnetic flux leakage sensor array and an ultrasonic probe, moves inside the pipe. During its movement, the magnetic flux leakage sensor collects magnetic flux leakage data after the pipe wall is excited by a magnetic field, and the ultrasonic probe excites and receives echo data of ultrasonic waves propagating in the pipe wall. The acquisition device converts these analog signals into digital signals and sends them, thereby obtaining the raw magnetic flux leakage signal and the raw ultrasonic guided wave signal.

[0138] Secondly, the signal acquisition module 801 performs wavelet threshold denoising on the original magnetic flux leakage signal and the original ultrasonic guided wave signal respectively, to obtain the denoised magnetic flux leakage signal and the denoised ultrasonic guided wave signal. Since electromagnetic interference, mechanical vibration, and other noises are usually present at pipeline inspection sites, the original signal often contains high-frequency spikes. To improve the signal-to-noise ratio, the signal acquisition module 801 uses a wavelet threshold denoising algorithm to process these two signals separately. Specifically, a suitable wavelet basis function (such as db4 or sym wavelet) is selected to perform multi-scale decomposition on the signal, separating low-frequency approximation coefficients and high-frequency detail coefficients; subsequently, nonlinear thresholding (such as soft thresholding or hard thresholding quantization) is performed on the high-frequency detail coefficients according to a preset threshold function to filter out noise components; finally, the processed coefficients are used to perform inverse wavelet transform to reconstruct the signal, thereby obtaining the denoised magnetic flux leakage signal and the denoised ultrasonic guided wave signal.

[0139] Then, the signal acquisition module 801 performs amplitude normalization processing on the denoised magnetic flux leakage signal and the denoised ultrasonic guided wave signal to determine the normalized magnetic flux leakage signal and the normalized ultrasonic guided wave signal. Considering the inconsistent gain of different sensor channels and the large fluctuation of signal intensity, the signal acquisition module 801 performs amplitude normalization on the denoised signal to eliminate the influence of dimensions. For example, the Min-Max normalization method can be used to linearly map the signal amplitude to the interval [0,1] or [-1,1]; or the Z-score normalization method can be used to convert the signal into a standard distribution with a mean of 0 and a variance of 1. Through this process, the normalized magnetic flux leakage signal and the normalized ultrasonic guided wave signal are determined, ensuring the consistency of the input data distribution during subsequent neural network processing.

[0140] Finally, the signal acquisition module 801, based on a preset sampling frequency and detection speed, spatially aligns the normalized magnetic flux leakage signal and the normalized ultrasonic guided wave signal to obtain the preprocessed multimodal detection signal. Because the magnetic flux leakage sensor and the ultrasonic probe have a certain physical distance, or their sampling rates differ, the signal points corresponding to the same pipeline defect location may shift in time series. Based on the preset sampling frequency and the travel speed (detection speed) of the acquisition device within the pipeline, the signal acquisition module 801 calculates the actual spatial distance (e.g., meters from the starting point) corresponding to the sampling point. Subsequently, an interpolation algorithm (e.g., linear interpolation) is used to resample the signal, adjusting the normalized magnetic flux leakage signal and the ultrasonic guided wave signal to a unified spatial coordinate axis. In this way, each data point in the two signal sequences corresponds to the same location on the pipeline, achieving spatial alignment and obtaining the preprocessed multimodal detection signal.

[0141] In some embodiments, the feature extraction module 802 is used to extract features from the magnetic flux leakage signal and the ultrasonic guided wave signal to obtain a first feature and a second feature.

[0142] For the first feature, the feature extraction module 802 obtains it by performing multi-scale feature enhancement processing on the leakage magnetic signal. Specifically, this includes:

[0143] The feature extraction module 802 constructs a multi-scale feature extraction network, which includes multiple parallel convolutional branches, each employing a convolutional kernel of a different size. In specific implementations, to accommodate defects of varying sizes within the pipeline, the feature extraction module 802 configures convolutional kernels of different sizes in each convolutional branch. For example, the first convolutional branch uses a smaller kernel (e.g., 1×3 or 1×5) to focus on local details of the signal; the second convolutional branch uses a medium-sized kernel (e.g., 1×7 or 1×9) to capture medium-scale feature changes; and the third convolutional branch uses a larger kernel (e.g., 1×15 or larger) to cover the macroscopic contours of the signal. This enables the network to simultaneously perceive both small and large-area defects.

[0144] Subsequently, the feature extraction module 802 copies the preprocessed magnetic flux leakage signal and inputs it into each parallel convolutional branch. Upon receiving the signal, each convolutional branch performs a sliding window convolution operation on the signal using a convolutional kernel of a specific size. Branches with small convolutional kernels, due to their smaller receptive field, can sensitively extract local features with high-frequency abrupt changes in the magnetic flux leakage signal; these local features typically correspond to minute cracks or scratches on the pipe surface. Branches with large convolutional kernels, due to their larger receptive field, can extract local features with low-frequency gradual changes in the magnetic flux leakage signal; these local features typically correspond to corrosion pits or large-area dents on the pipe surface. In this way, each branch outputs local magnetic flux leakage features reflecting pipe defect information at different scales.

[0145] Finally, the feature extraction module 802 splices and fuses the local features of each leakage magnetic field to obtain the enhanced first feature.

[0146] For the second feature, the feature extraction module 802 obtains it through convolution and attention mechanisms on the ultrasonic guided wave signal. Specifically, this includes:

[0147] The feature extraction module 802 uses a one-dimensional convolutional neural network to extract features from the ultrasonic guided wave signal to obtain preliminary features. In specific implementation, the preprocessed ultrasonic guided wave signal is input into the one-dimensional convolutional neural network. This one-dimensional convolutional neural network uses multiple one-dimensional convolutional layers to slide the convolution kernel on the time axis to extract local time-frequency features in the signal, capture abrupt changes and patterns in the waveform, and thus obtain preliminary features.

[0148] The feature extraction module 802 inputs the preliminary features into the attention mechanism module to obtain weighted features. To select the most effective features for defect identification, the preliminary features are input into the attention mechanism module (e.g., a channel attention module SE-Net or a self-attention module). This module automatically generates importance weights for each feature channel or time step through learning and multiplies these weights by the preliminary features to obtain weighted features. This step enhances the response of key features and suppresses responses to background noise and useless information.

[0149] The feature extraction module 802 performs feature mapping on the weighted features to obtain the second feature. Finally, the weighted features are nonlinearly mapped and dimensionality transformed through a fully connected layer or a further convolutional layer to extract a high-order, semantic feature representation, ultimately obtaining the second feature.

[0150] In some embodiments, the adaptive fusion module 803 is used to fuse the first feature and the second feature using an adaptive fusion strategy to obtain cross-modal fused features. The adaptive fusion strategy includes mutual information calculation and adaptive weights. Specific implementation is as follows:

[0151] The adaptive fusion module 803 acquires the mutual information matrix. Specifically, the adaptive fusion module 803 calculates the mutual information value between the first feature and the second feature. Mutual information measures the statistical correlation between two variables and is also sensitive to nonlinear relationships. By calculating the mutual information between each feature unit in the two feature maps, the adaptive fusion module 803 constructs a mutual information matrix, which indicates the degree of nonlinear correlation between the first feature and the second feature.

[0152] The adaptive fusion module 803 constructs a cross-modal attention map based on the mutual information matrix. The mutual information matrix is ​​normalized to generate the cross-modal attention map. This cross-modal attention map is used to characterize the correlation distribution between the first and second features, and can intuitively display the correlation strength of different modal features in spatial or channel dimensions, thereby helping to determine which feature regions are complementary and which are redundant.

[0153] The adaptive fusion module 803 assigns adaptive weights to the first and second features based on the cross-modal attention map. Based on the numerical distribution in the cross-modal attention map, the adaptive fusion module 803 assigns adaptive weights to the first and second features using a preset weight generation function. Larger weights are assigned to regions with high correlation to highlight complementary information, while smaller weights are assigned to regions with low correlation to suppress noise, thus achieving dynamic weight allocation.

[0154] The adaptive fusion module 803 uses adaptive weights to perform a weighted summation of the first feature and the second feature to obtain a cross-modal fusion feature. Finally, the adaptive weights are used to perform a weighted summation of the first feature and the second feature, fusing the feature information of the two modes together according to their importance, thereby obtaining the cross-modal fusion feature. This cross-modal fusion feature integrates the advantageous information of the leakage magnetic field signal and the ultrasonic guided wave signal.

[0155] In some embodiments, the task detection and correction module 804 is used to perform multi-task detection and correction based on the cross-modal fusion features to obtain defect detection results.

[0156] Specifically, the task detection and correction module 804 performs classification processing based on the cross-modal fusion features to determine the type of pipeline defect. In practice, the cross-modal fusion features are input into the classification head of the multi-task detection network. The classification head performs pattern recognition and probability calculation on the fusion features, outputting the probability distribution of the defect belonging to different categories (such as axial cracks, circumferential cracks, volumetric defects, etc.). The category with the highest probability is selected as the final defect type, thereby achieving a qualitative judgment of the defect attributes.

[0157] The task detection and correction module 804 performs localization processing based on the cross-modal fusion features to determine the location and initial size of the pipeline defect. Simultaneously, the cross-modal fusion features are input into the regression head of the multi-task detection network. The regression head performs numerical regression analysis on the fusion features to predict the specific location parameters of the defect on the pipeline (such as axial coordinates and circumferential angles) and the geometric parameters of the defect (such as length, width, and depth). These geometric parameters, directly predicted by the neural network, are used as the initial dimensions.

[0158] To improve the accuracy of the dimensions, the task detection and correction module 804 performs physical verification based on the initial dimensions using a preset physical constraint model to determine the target dimensions.

[0159] Specifically, the task detection and correction module 804 determines a physical constraint error based on the initial size. This physical constraint error indicates the deviation between the initial size and preset physical laws. In practice, a preset physical constraint model is used to verify the initial size predicted by the regression head. This physical constraint model includes prior knowledge reflecting physical mechanisms, such as a model showing the correspondence between the leakage magnetic field and the pipe defect size, and a guided wave scattering model. The initial size is input into the model, and the theoretical difference between it and the actual detection signal characteristics is calculated. Alternatively, it can be directly verified whether the initial size meets basic physical limitations (e.g., whether the predicted depth of the defect exceeds the original wall thickness of the pipe, or whether the change in leakage magnetic flux is significantly inconsistent with the defect size ratio). Through calculation, the physical constraint error is obtained, which quantifies the degree to which the initial size deviates from the physical laws.

[0160] The task detection and correction module 804 determines the size correction parameters based on the physical constraint error. After obtaining the physical constraint error, the size correction parameters are determined according to the magnitude and direction of the error using a preset correction algorithm or backpropagation mechanism. For example, if the physical constraint error indicates that the predicted depth is too large, the correction parameters will include a negative adjustment amount; if the physical constraint error indicates that the size scale is distorted, the correction parameters will include a corresponding scaling factor. This size correction parameter is used to guide the adjustment of the initial size to eliminate physical deviations.

[0161] The task detection and correction module 804 corrects the initial size based on the size correction parameters to obtain the target size of the pipeline defect. The initial size is corrected using the determined size correction parameters. By applying the correction parameters to the initial size (e.g., through additive compensation or multiplicative adjustment), a target size conforming to physical constraints is generated. This target size retains the deep learning network's ability to capture defect features while eliminating errors that violate physical common sense, ensuring the physical rationality of the result.

[0162] Finally, the task detection and correction module 804 generates the defect detection result based on the type, location, and target size. The determined pipeline defect type, the determined pipeline defect location, and the physically verified target size are structurally integrated to generate the final defect detection result. This result not only includes the qualitative classification and location of the pipeline defect but also provides physically verified high-precision quantitative dimensions.

[0163] In some embodiments, the risk assessment module 805 is used to determine the risk safety level based on the defect detection results.

[0164] Specifically, the risk assessment module 805 determines the current characteristics of the pipeline defect based on the defect detection results. These current characteristics indicate the geometric shape, dimensional parameters, and degree of damage of the pipeline defect. In practice, the output defect detection results are analyzed to extract key indicators characterizing the current state of the pipeline defect. Geometric shape may include the defect's shape (e.g., circular, elliptical, irregular) and aspect ratio; dimensional parameters directly use the detected pipeline defect's length, width, and depth; and the degree of damage is a damage ratio calculated based on the dimensional parameters and the original pipeline wall thickness, such as cross-sectional loss rate or percentage of remaining wall thickness. These current characteristics constitute the basic data for risk assessment.

[0165] Based on the current characteristics of the pipeline defect, the risk assessment module 805 determines the evolution trend of the pipeline defect. The pipeline defect evolution trend is used to represent the growth rate and expansion direction of the pipeline defect within a preset future time period.

[0166] In some embodiments, the risk assessment module 805 determines the key feature vector of the pipeline defect based on its current characteristics. Specifically, it selects the indicators that have the greatest impact on the growth of the pipeline defect from its current characteristics, such as the length-to-width ratio, depth-to-diameter ratio, corrosion pit volume, and current maximum depth of the pipeline defect, and combines these indicators into a key feature vector that can represent the current state of the pipeline defect.

[0167] Based on the key feature vector, the risk assessment module 805 determines the growth prediction parameters of the pipeline defect. Then, the key feature vector is input into a pre-set defect growth prediction model (such as a physics-based corrosion kinetics model or a data-driven regression prediction network). This defect growth prediction model calculates and outputs the growth prediction parameters of the pipeline defect based on the input feature vector. These growth prediction parameters may specifically include values ​​such as corrosion rate (e.g., mm / year) and crack propagation rate (e.g., mm / thousand cycles).

[0168] Based on the growth prediction parameters, the risk assessment module 805 determines the evolution trend of pipeline defects. Finally, combining the growth prediction parameters and the current time base, it extrapolates the size and morphological changes of pipeline defects over a preset time period, thereby determining the evolution trend of pipeline defects, such as predicting how much the pipeline defects will deepen or how far they will expand circumferentially in the next year.

[0169] The risk assessment module 805 determines the risk safety level based on the pipeline defect evolution trend. This risk safety level is used to assess the pipeline's service safety and guide maintenance decisions. Finally, based on the pipeline defect evolution trend and relevant safety assessment standards (such as ASME B31G, DNVGL-RP-F101, and other pipeline integrity evaluation standards), the failure probability and consequences at the pipeline defect are calculated to determine the risk safety level. For example, the risk safety level can be divided into four levels: "low risk," "medium risk," "high risk," and "extremely high risk." If the pipeline defect evolution trend shows that the defect grows slowly and does not exceed the safety threshold, it is assessed as low risk and requires regular monitoring. If the pipeline defect evolution trend shows that the pipeline defect will reach a critical size in a short period of time, leading to a sharp increase in the risk of pipeline rupture, it is assessed as high risk or extremely high risk. An alarm message will be generated immediately, and maintenance personnel will be guided to take emergency maintenance measures (such as replacing pipe sections, patching, etc.) to ensure the pipeline's service safety.

[0170] It should be noted that the pipeline defect detection system provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure can be divided into different functional modules to complete all or part of the functions described above. In addition, the pipeline defect detection system and pipeline defect detection method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0171] It should be noted that the pipeline defect detection system provided in the above embodiments is only illustrated by the division of the above functional modules when detecting pipeline defects. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the data processing equipment can be divided into different functional modules to complete all or part of the functions described above. In addition, the pipeline defect detection system and pipeline defect detection method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0172] In addition, the system provided in the embodiments of this application may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute the pipeline defect detection method provided in the above embodiments.

[0173] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the above-described related method steps to implement the pipeline defect detection method provided in the above embodiment.

[0174] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the pipeline defect detection method provided in the above embodiment.

[0175] In this embodiment, the system, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0176] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0177] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for detecting pipeline defects, characterized in that, The method includes: Acquire preprocessed multimodal detection signals regarding pipeline defects, the multimodal detection signals including magnetic flux leakage signals and ultrasonic guided wave signals; Feature extraction is performed on the magnetic flux leakage signal and the ultrasonic guided wave signal to obtain a first feature and a second feature. The first feature is obtained by performing multi-scale feature enhancement processing on the magnetic flux leakage signal, and the second feature is obtained by performing convolution and attention mechanism processing on the ultrasonic guided wave signal. An adaptive fusion strategy is employed to fuse the first feature and the second feature to obtain cross-modal fused features. The adaptive fusion strategy includes mutual information calculation and adaptive weights, comprising: Obtain a mutual information matrix, which is used to indicate the degree of nonlinear correlation between the first feature and the second feature; Based on the mutual information matrix, a cross-modal attention map is constructed, which is used to characterize the correlation distribution between the first feature and the second feature; Based on the cross-modal attention map, corresponding adaptive weights are assigned to the first feature and the second feature, respectively; The first feature and the second feature are weighted and summed using the adaptive weights to obtain the cross-modal fusion feature; Multi-task detection and correction are performed based on the cross-modal fusion features to obtain defect detection results. The defect detection results are used to indicate the type, location and target size of pipeline defects. The multi-task detection and correction includes classification, localization and physical verification.

2. The pipeline defect detection method according to claim 1, characterized in that, The method further includes: Based on the defect detection results, the risk and safety level is determined; The process of determining the risk and safety level based on the defect detection results includes: Based on the defect detection results, the current characteristics of the pipeline defect are determined, and the current characteristics of the pipeline defect are used to indicate the geometric shape, size parameters and damage degree of the pipeline defect; Based on the current characteristics of the pipeline defect, the evolution trend of the pipeline defect is determined. The evolution trend of the pipeline defect is used to represent the growth rate and expansion direction of the pipeline defect in a future preset time period. Based on the pipeline defect evolution trend, a risk safety level is determined. This risk safety level is used to assess the service safety of the pipeline and guide maintenance decisions.

3. The pipeline defect detection method according to claim 2, characterized in that, The step of determining the evolution trend of pipeline defects based on the current characteristics of the pipeline defects includes: Based on the current characteristics of the pipeline defect, determine the key feature vector of the pipeline defect; Based on the key feature vector, the growth prediction parameters of the pipeline defect are determined; Based on the growth prediction parameters, the evolution trend of the pipeline defects is determined.

4. The pipeline defect detection method according to claim 1, characterized in that, The second feature is obtained by processing the ultrasonic guided wave signal through convolution and attention mechanisms, including: Preliminary features are obtained by extracting features from the ultrasonic guided wave signal using a one-dimensional convolutional neural network. The preliminary features are input into the attention mechanism module to obtain the weighted features; The weighted features are then subjected to feature mapping to obtain the second feature.

5. The pipeline defect detection method according to claim 1, characterized in that, The multi-task detection and correction based on the cross-modal fusion features yields defect detection results. These results indicate the type, location, and target size of pipeline defects. The multi-task detection and correction includes classification, localization, and physical verification, comprising: The type of pipeline defect is determined by classifying the cross-modal fusion features. Based on the cross-modal fusion features, the location and initial size of the pipeline defect are determined; Based on the initial dimensions, a physical verification is performed using a preset physical constraint model to determine the target dimensions; The defect detection result is generated based on the type and location of the pipeline defect and the target size.

6. The pipeline defect detection method according to claim 5, characterized in that, The step of determining the target size by performing physical verification using a preset physical constraint model based on the initial size includes: Based on the initial dimensions, a physical constraint error is determined, which indicates the deviation between the initial dimensions and a preset physical law. Based on the aforementioned physical constraint error, determine the size correction parameters for the pipeline defect; The initial size is corrected based on the size correction parameters to obtain the target size.

7. The pipeline defect detection method according to any one of claims 1 to 6, characterized in that, The first feature is obtained by processing in the following way: A multi-scale feature extraction network is constructed, which includes multiple parallel convolutional branches, and the convolutional branches use convolutional kernels of different sizes; The leakage magnetic field signal is input into each of the convolutional branches to extract local leakage magnetic field features under different receptive fields. The enhanced first feature is obtained by splicing and fusing the various local features of magnetic leakage.

8. The pipeline defect detection method according to any one of claims 1 to 6, characterized in that, The acquisition of preprocessed multimodal detection signals regarding pipeline defects includes: Acquire the raw magnetic flux leakage signal and raw ultrasonic guided wave signal collected by the acquisition device; The original magnetic flux leakage signal and the original ultrasonic guided wave signal are respectively subjected to wavelet threshold denoising to obtain the denoised magnetic flux leakage signal and the denoised ultrasonic guided wave signal. The denoised magnetic flux leakage signal and the denoised ultrasonic guided wave signal are subjected to amplitude normalization processing to determine the normalized magnetic flux leakage signal and the normalized ultrasonic guided wave signal. Based on the preset sampling frequency and detection speed, the normalized magnetic flux leakage signal and the normalized ultrasonic guided wave signal are spatially aligned to obtain the preprocessed multimodal detection signal.

9. A pipeline defect detection system, characterized in that, include: The signal acquisition module is used to acquire preprocessed multimodal detection signals about pipeline defects, including magnetic flux leakage signals and ultrasonic guided wave signals. The feature extraction module is used to extract features from the magnetic flux leakage signal and the ultrasonic guided wave signal to obtain a first feature and a second feature. The first feature is obtained by performing multi-scale feature enhancement processing on the magnetic flux leakage signal, and the second feature is obtained by performing convolution and attention mechanism processing on the ultrasonic guided wave signal. An adaptive fusion module is used to fuse the first feature and the second feature using an adaptive fusion strategy to obtain a cross-modal fused feature. The adaptive fusion strategy includes mutual information calculation and adaptive weights, comprising: obtaining a mutual information matrix, which indicates the degree of nonlinear correlation between the first feature and the second feature; constructing a cross-modal attention map based on the mutual information matrix, which characterizes the correlation distribution between the first feature and the second feature; assigning corresponding adaptive weights to the first feature and the second feature based on the cross-modal attention map; and performing a weighted summation of the first feature and the second feature using the adaptive weights to obtain the cross-modal fused feature. The task detection and correction module is used to perform multi-task detection and correction based on the cross-modal fusion features to obtain defect detection results. The defect detection results are used to indicate the type, location and target size of pipeline defects. The multi-task detection and correction includes classification, localization and physical verification.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of the pipeline defect detection method as described in any one of claims 1 to 8.