Defect alignment method and device for double-wheel magnetic flux leakage detection based on multi-feature fusion

By employing a dual-wheel magnetic flux leakage detection method with multi-feature fusion, and utilizing Gaussian pseudo-color images and a matching degree function, high-precision alignment and fusion of magnetic flux leakage detection data are achieved. This solves the problem of inaccurate defect alignment in existing technologies and improves the reliability of pipeline safety management.

CN121033038BActive Publication Date: 2026-01-27NORTHEASTERN UNIV CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511556307.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-29
Publication Date
2026-01-27
Estimated Expiration
2045-10-29

AI Technical Summary

Technical Problem

Existing magnetic flux leakage detection methods suffer from insufficient angular deviation compensation, low efficiency in full pipeline traversal calculations, and low confidence in defect judgment during the defect alignment process, resulting in insufficient accuracy and stability in defect evolution analysis.

Method used

A dual-wheel magnetic flux leakage detection method with multi-feature fusion is adopted. By acquiring the magnetic flux leakage detection dataset, multi-feature vector extraction is performed to generate Gaussian pseudo-color images for defect mileage localization. A matching degree function is constructed to calculate the optimal offset, thereby achieving high-precision alignment and fusion of magnetic flux leakage detection data.

Benefits of technology

It improves the accuracy and stability of defect alignment, ensures the safety and stability of pipeline operation, and reduces the risk of accidents caused by pipeline defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121033038B_ABST
    Figure CN121033038B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of pipeline magnetic flux leakage detection, and provides a double-wheel magnetic flux leakage detection defect alignment method and device based on multi-feature fusion, which comprises: acquiring a magnetic flux leakage detection data set, performing multi-feature vector extraction on the data set to obtain a multi-feature vector set; then, a first Gaussian pseudo-color image corresponding to a first multi-feature vector is generated, and a second Gaussian pseudo-color image corresponding to a second multi-feature vector is generated; based on the two images, defect mileage positioning is performed to determine a common defect interval; within the common defect interval, a matching degree function is constructed based on the first multi-feature vector and the second multi-feature vector, and the optimal offset of the second round of magnetic flux leakage detection data relative to the first round of data is calculated; according to the optimal offset, the first round and the second round of magnetic flux leakage detection data are aligned and fused to obtain target fusion defect data. The embodiment can effectively improve the precision and stability of defect alignment, thereby effectively improving the reliability of pipeline safety management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of pipeline magnetic flux leakage detection technology, and more specifically, to a dual-wheel magnetic flux leakage detection defect alignment method and apparatus based on multi-feature fusion. Background Technology

[0002] Industrial pipelines are the core carriers for transporting oil, natural gas, and other oil and gas energy sources, playing a crucial role in numerous fields such as petrochemicals, energy transmission, and urban gas supply. Their operational safety directly impacts the stability of industrial production and public safety. However, during long-term service, pipelines are affected by various factors, such as erosion from the transported medium, corrosion from the external environment, and mechanical stress, which can easily lead to corrosion defects, cracks, and weld damage. If these defects are not detected and addressed in a timely manner, they can potentially cause serious safety accidents such as media leaks and pipeline ruptures, resulting not only in enormous economic losses but also severe environmental pollution.

[0003] In pipeline lifecycle management, a single inspection is insufficient to support a reliable safety assessment. Multiple inspections are necessary to compare and analyze defect evolution trends in order to develop precise maintenance and remediation plans. A core prerequisite for this comparison is defect alignment. Currently, while conventional data acquisition, preprocessing, and result comparison processes exist, numerous problems remain in the defect alignment stage. For example, existing methods for defect identification and alignment using magnetic flux leakage data rely on acquiring signals through closed magnetic loops, preprocessing data using simplified strategies, identifying defects based on single peak features, and then using manual anchoring and linear interpolation to achieve multi-round data association. However, single features cannot adapt to the complexity of defect corrosion evolution, and the alignment methods are crude with insufficient angular deviation compensation. Full pipeline traversal calculations are inefficient, and the lack of validation for single-round data leads to low confidence in defect judgments, severely impacting the accuracy and stability of evolution analysis. Summary of the Invention

[0004] This disclosure provides at least one method and apparatus for defect alignment based on multi-feature fusion dual-wheel magnetic flux leakage detection, which can effectively improve the accuracy and stability of defect alignment, thereby effectively enhancing the reliability of pipeline safety management.

[0005] This disclosure provides a dual-wheel magnetic flux leakage detection defect alignment method based on multi-feature fusion, including:

[0006] Obtain a magnetic flux leakage detection dataset and extract multiple feature vectors from the magnetic flux leakage detection dataset to obtain a set of multiple feature vectors; wherein, the magnetic flux leakage detection dataset includes first round magnetic flux leakage detection data and second round magnetic flux leakage detection data, and the set of multiple feature vectors includes a first multiple feature vector corresponding to the first round magnetic flux leakage detection data and a second multiple feature vector corresponding to the second round magnetic flux leakage detection data;

[0007] Generate a first Gaussian pseudo-color image corresponding to a first multi-feature vector; and generate a second Gaussian pseudo-color image corresponding to a second multi-feature vector; and perform defect mileage localization based on the first Gaussian pseudo-color image and the second Gaussian pseudo-color image to determine a common defect interval;

[0008] Within the common defect interval, a matching degree function is constructed based on the first multi-feature vector and the second multi-feature vector; and the optimal offset of the second round of magnetic flux leakage detection data relative to the first round of magnetic flux leakage detection data is calculated based on the matching degree function.

[0009] Based on the optimal offset, the first round of magnetic flux leakage detection data and the second round of magnetic flux leakage detection data are aligned and fused to obtain the target fused defect data.

[0010] This disclosure provides a dual-wheel magnetic flux leakage detection defect alignment device based on multi-feature fusion, comprising:

[0011] The data processing module is used to acquire the magnetic flux leakage detection dataset and extract multiple feature vectors from the magnetic flux leakage detection dataset to obtain a set of multiple feature vectors; wherein, the magnetic flux leakage detection dataset includes first-round magnetic flux leakage detection data and second-round magnetic flux leakage detection data, and the set of multiple feature vectors includes a first multiple feature vector corresponding to the first-round magnetic flux leakage detection data and a second multiple feature vector corresponding to the second-round magnetic flux leakage detection data;

[0012] The defect localization module is used to generate a first Gaussian pseudo-color image corresponding to a first multi-feature vector; and to generate a second Gaussian pseudo-color image corresponding to a second multi-feature vector; and to perform defect mileage localization based on the first Gaussian pseudo-color image and the second Gaussian pseudo-color image to determine a common defect interval;

[0013] The offset calculation module is used to construct a matching degree function based on the first multi-feature vector and the second multi-feature vector within the common defect interval; and to calculate the optimal offset of the second round of magnetic flux leakage detection data relative to the first round of magnetic flux leakage detection data based on the matching degree function.

[0014] The data fusion module is used to align and fuse the first round of magnetic flux leakage detection data and the second round of magnetic flux leakage detection data according to the optimal offset to obtain the target fused defect data.

[0015] This disclosure provides a computer device, including a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the dual-wheel magnetic flux leakage detection defect alignment method based on multi-feature fusion as described in any of the above possible embodiments.

[0016] This disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the dual-wheel magnetic flux leakage detection defect alignment method based on multi-feature fusion as described in any of the above possible embodiments.

[0017] The dual-wheel magnetic flux leakage detection defect alignment method and apparatus based on multi-feature fusion provided in this embodiment combines multi-feature vector extraction with Gaussian pseudo-color image generation, which can more comprehensively and accurately capture defect feature information in magnetic flux leakage detection data. At the same time, it utilizes the intuitive visual characteristics of Gaussian pseudo-color images to improve the accuracy of defect mileage positioning and effectively determine the common defect interval. Then, by constructing a matching degree function within the common defect interval and calculating the optimal offset, high-precision alignment and fusion of the two-wheel magnetic flux leakage detection data is achieved. The resulting target fused defect data can more realistically and accurately reflect the actual defect situation of the pipeline, ensuring the safety and stability of pipeline operation and reducing the risk of accidents caused by pipeline defects.

[0018] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings referenced in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.

[0020] Figure 1 A flowchart of a dual-wheel magnetic flux leakage detection defect alignment method based on multi-feature fusion provided in an embodiment of this disclosure is shown;

[0021] Figure 2 A flowchart of a data multi-feature vector extraction method provided by an embodiment of this disclosure is shown;

[0022] Figure 3 A flowchart of a common defect interval determination method provided by an embodiment of this disclosure is shown;

[0023] Figure 4 A flowchart of an optimal offset solution method provided by an embodiment of this disclosure is shown;

[0024] Figure 5 A flowchart of an optimal offset iteration method provided by an embodiment of this disclosure is shown;

[0025] Figure 6 A flowchart of a data alignment and fusion method provided by an embodiment of this disclosure is shown;

[0026] Figure 7 A schematic diagram of the structure of a dual-wheel magnetic flux leakage detection defect alignment device based on multi-feature fusion provided in an embodiment of this disclosure is shown.

[0027] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of this disclosure is shown. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.

[0029] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0030] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0031] Industrial pipelines, as the core transport carriers of oil and gas energy such as petroleum and natural gas, are widely used in petrochemical, energy transmission, and urban gas industries. Their operational safety is directly related to the stability of industrial production and public safety. However, during long-term service, pipelines are susceptible to corrosion defects, cracks, and weld damage due to factors such as erosion by the transported medium, external environmental corrosion, and mechanical stress. If these defects are not detected and addressed in a timely manner, they may lead to safety accidents such as medium leakage and pipeline rupture, resulting in economic losses and environmental pollution.

[0032] Research has revealed that while the industry has established routine data acquisition, preprocessing, and result comparison processes, numerous technical challenges remain in the defect alignment stage, affecting the accuracy and stability of defect evolution analysis. Related methods typically rely on closed magnetic loops to acquire leakage magnetic signals, employ simplified strategies for data preprocessing, determine defect locations based on single peak characteristics, and then achieve multi-round data correlation through manual anchor marking and linear interpolation. However, these methods face two key challenges in practical applications: First, due to factors such as pipe inner wall roughness, media flow velocity fluctuations, and detector attitude adjustment errors in different detection rounds, the detection angle often shifts, causing the sensor array to rotate or translate relative to the pipe body. This results in lateral displacement of the leakage magnetic characteristics of the same defect in the data sequence, and even phase differences between multi-channel responses. Second, during long-term pipeline operation, corrosion defects may gradually expand from initial scattered points and connect into larger-area composite defects. Correspondingly, the leakage magnetic response evolves from multiple discrete weak peaks to a single wide-amplitude strong peak, accompanied by increased amplitude, expanded half-width, centroid shift, and curvature changes. Traditional methods that rely on a single feature for judgment are difficult to adapt to such drastic changes in form. They are prone to misjudging the evolution process of what is actually the same defect as a "new" or "disappearing" defect, which ultimately leads to registration failure and deviation in defect growth assessment.

[0033] Based on the above research, this disclosure provides a method and apparatus for aligning defects in dual-round magnetic flux leakage detection based on multi-feature fusion. Specifically, a magnetic flux leakage detection dataset is acquired, and multi-feature vectors are extracted from the dataset to obtain a set of multi-feature vectors. Then, a first Gaussian pseudo-color image corresponding to the first multi-feature vector and a second Gaussian pseudo-color image corresponding to the second multi-feature vector are generated. Defect mileage localization is performed based on these two images to determine a common defect interval. Within the common defect interval, a matching degree function is constructed based on the first and second multi-feature vectors to calculate the optimal offset of the second-round magnetic flux leakage detection data relative to the first-round data. According to the optimal offset, the first and second-round magnetic flux leakage detection data are aligned and fused to obtain the target fused defect data.

[0034] In this embodiment, by combining multi-feature vector extraction with Gaussian pseudo-color image generation, defect feature information in magnetic flux leakage detection data can be captured more comprehensively and accurately. At the same time, the intuitive visual characteristics of Gaussian pseudo-color images are utilized to improve the accuracy of defect mileage localization and effectively determine the common defect interval. Then, by constructing a matching degree function within the common defect interval and calculating the optimal offset, high-precision alignment and fusion of two rounds of magnetic flux leakage detection data are achieved. The resulting target fused defect data can more realistically and accurately reflect the actual defect situation of the pipeline, ensuring the safety and stability of pipeline operation and reducing the risk of accidents caused by pipeline defects.

[0035] To facilitate understanding of this embodiment, the executing entity of the dual-wheel magnetic flux leakage detection defect alignment method based on multi-feature fusion provided in this disclosure embodiment will first be described in detail. The executing entity of the dual-wheel magnetic flux leakage detection defect alignment method based on multi-feature fusion provided in this disclosure embodiment is a computer device. This computer device can be a terminal device or a server. The terminal device can also be a mobile device, a user terminal, a terminal, a handheld device, a computing device, an in-vehicle device, a wearable device, etc. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, big data, and artificial intelligence platforms. Optionally, this method can also be applied to an implementation environment composed of computer devices and servers.

[0036] The following is a detailed description, with reference to the accompanying drawings, of the dual-wheel magnetic flux leakage detection defect alignment method based on multi-feature fusion provided in the embodiments of this application. See also: Figure 1 The diagram shows a flowchart of a dual-wheel magnetic flux leakage detection defect alignment method based on multi-feature fusion provided in this disclosure embodiment. The method includes the following steps S101 to S104:

[0037] S101, Obtain the magnetic flux leakage detection dataset, and extract multiple feature vectors from the magnetic flux leakage detection dataset to obtain a set of multiple feature vectors.

[0038] As is understandable, magnetic flux leakage (MFL) testing is a non-destructive testing technique that utilizes magnetic powder or magnetic induction principles to detect surface and near-surface defects in materials. It is widely used in fields such as pipeline inspection and metal component inspection. Here, the MFL dataset includes data from the first and second rounds of MFL testing, obtained by inspecting the same object (e.g., a section of pipeline) at different times and under different testing conditions (such as testing equipment parameters and testing speed). Testing at different times may be affected by environmental factors and changes in equipment status, while different testing equipment parameters (such as magnetization intensity and sensor sensitivity) and testing speeds will lead to differences in the characteristics of the collected data.

[0039] Specifically, after obtaining the magnetic flux leakage detection dataset, in order to more accurately and comprehensively analyze the defects in the detected object, a multi-feature vector extraction operation can be performed to obtain a multi-feature vector set. Multi-feature vector extraction refers to extracting multiple representative features from the original magnetic flux leakage detection data. These features can more comprehensively and accurately reflect the condition of the detected object. For example, the extracted features may include signal amplitude features (reflecting the strength of the signal), frequency features (reflecting the rate of signal change), and waveform features (such as the shape and symmetry of the waveform). The multi-feature vector set contains a first multi-feature vector corresponding to the first round of magnetic flux leakage detection data and a second multi-feature vector corresponding to the second round of magnetic flux leakage detection data.

[0040] For example, in this embodiment of the disclosure, amplitude features, signal gradient features, and waveform curvature features are mainly extracted from the magnetic flux leakage detection data to obtain a multi-feature vector. (Refer to...) Figure 2 As shown, when extracting multiple feature vectors from the magnetic flux leakage detection dataset, the following steps S201~S204 may be included:

[0041] S201, for the first round of magnetic flux leakage detection data, identify local peak points in the first round of magnetic flux leakage detection data to form a first peak feature vector set; and calculate the signal gradient of the first round of magnetic flux leakage detection data, and identify gradient abrupt change points in the first round of magnetic flux leakage detection data where the signal gradient change exceeds a preset gradient threshold to form a first gradient abrupt change feature vector set; and calculate the curvature of the first round of magnetic flux leakage detection data, and identify waveform curvature points where the curvature exceeds a preset curvature threshold to form a first curvature feature vector set.

[0042] Specifically, in magnetic flux leakage (MF) detection signals, local peak points reflect the signal intensity reaching a local maximum at that location. These points are often closely related to the location of defects on the surface of the object being detected. For example, when defects such as cracks or corrosion exist on the surface of a pipe, the MF signal will exhibit significant peak changes at the defect location. Using specific algorithms, such as the sliding window method, the magnitudes of adjacent data points are compared point by point in the signal data sequence to extract the data points that satisfy the local maximum condition. These extracted local peak points constitute the first peak feature vector set.

[0043] In some possible embodiments, the leakage magnetic signal can also be traversed. If satisfied and These are then denoted as local peak points. Organizing these local peak points yields a set of peak feature vectors. .

[0044] Meanwhile, the signal gradient represents the rate of change of a signal in space or time, reflecting the steepness of the signal. In magnetic flux leakage detection, changes in the signal gradient may be related to changes in the boundary or properties of defects; for example, when a defect edge is detected, the signal gradient will undergo a significant abrupt change. Using numerical differentiation methods, such as the central difference method, the gradient value of the signal at each data point can be calculated. Then, a preset gradient threshold is set, and gradient abrupt change points where the signal gradient change exceeds this threshold are identified. These points can constitute the first gradient abrupt change feature vector set.

[0045] In some possible embodiments, the signal gradient in the magnetic flux leakage detection data can be calculated using the following formula: If the absolute difference between adjacent gradients satisfies: These are then denoted as gradient mutation points, forming a gradient mutation point set: ;in, This is a preset gradient threshold.

[0046] Here, curvature is used to describe the degree of bending of a signal waveform. In leakage magnetic signals, changes in curvature can reflect abnormal bending of the waveform caused by defects. For example, a larger curvature value may correspond to a deeper defect or an irregularly shaped defect. The curvature value of the signal at each data point can be calculated using mathematical formulas, and a preset curvature threshold can be set to identify waveform curvature points whose curvature exceeds the threshold. These points constitute the first curvature feature vector set.

[0047] In some possible embodiments, curvature can be calculated using the following formula:

[0048] ;

[0049] in, Represented as the first Curvature at each position Leakage signal In the The first derivative at each position Leakage signal In the The second derivative at each position.

[0050] like This can be denoted as the waveform curvature point. ;in, This is represented as a preset curvature threshold. This is represented as a threshold coefficient (which can take a value of 1.5). 3) Indicates the request The mean.

[0051] S202, construct the first multi-feature vector based on the first peak feature vector set, the first gradient abrupt change feature vector set, and the first curvature feature vector set.

[0052] Here, after obtaining the first peak feature vector set, the first gradient mutation feature vector set, and the first curvature feature vector set, they can be integrated to form a more comprehensive and representative feature vector, namely the first multi-feature vector corresponding to the first round of magnetic flux leakage detection data.

[0053] In some possible embodiments, the first multidimensional feature vector can be represented as:

[0054] ;

[0055] in, It is used to capture the relative trend of signal change and further optimize the representativeness of feature vectors.

[0056] In some other embodiments, the feature vectors can be weighted and summed according to certain weights. The weights can be determined based on the importance of different features in defect detection. For example, if local peak points are considered more critical for indicating the location of defects, then the first peak feature vector set can be given a larger weight. Alternatively, the feature vectors can be directly concatenated into a longer vector to form a comprehensive vector containing multiple feature information, i.e., the first multi-feature vector.

[0057] S203, for the second round of magnetic flux leakage detection data, identify local peak points in the second round of magnetic flux leakage detection data to form a second peak feature vector set; and calculate the signal gradient of the second round of magnetic flux leakage detection data, and identify gradient abrupt change points in the second round of magnetic flux leakage detection data where the signal gradient change exceeds a preset gradient threshold to form a second gradient abrupt change feature vector set; and calculate the curvature of the second round of magnetic flux leakage detection data, and identify waveform curvature points where the curvature exceeds a preset curvature threshold to form a second curvature feature vector set.

[0058] Here, the feature extraction of the second round of magnetic flux leakage detection data adopts the same processing method as the first round of detection data. Specifically, it can be referred to step S201. The methods and principles for local peak point identification, signal gradient calculation and abrupt change point identification, curvature calculation and waveform curvature point identification are exactly the same. Only the data object processed changes from the first round of magnetic flux leakage detection data to the second round of magnetic flux leakage detection data, which will not be elaborated here. Through the same processing flow, representative multi-feature information can be extracted from the second round of magnetic flux leakage detection data.

[0059] S204, construct the second multi-feature vector based on the second peak feature vector set, the second gradient mutation feature vector set, and the second curvature feature vector set.

[0060] Here, the construction of multiple feature vectors for the second round of magnetic flux leakage detection data adopts the same construction method as that for the first round of detection data. For details, please refer to step S202, which will not be repeated here.

[0061] In some other embodiments, the extraction of multiple feature vectors from data may also include other features such as frequency domain energy distribution, time domain statistical properties, and entropy features, which are not specifically limited here.

[0062] For example, in the actual magnetic flux leakage detection process, the detection data of different rounds may be affected by various factors (such as the status of the detection equipment, environmental interference, etc.), resulting in missing or abnormal data, which will affect the accuracy of subsequent assessment of the status of the pipeline and other objects under inspection. Therefore, in order to improve the quality of the magnetic flux leakage detection data and ensure the reliability of the subsequent analysis results, after obtaining the multi-feature vector set, the first round of magnetic flux leakage detection data and the second round of magnetic flux leakage detection data can be preprocessed respectively, specifically including the following steps (1) to (3):

[0063] (1) The missing values ​​in the magnetic flux leakage detection data are filled in using the local weighted polynomial interpolation method;

[0064] (2) Calculate the multi-feature anomaly index corresponding to each missing completion value, and compare each of the multi-feature anomaly indices with the dynamic thresholds calculated based on the sliding window corresponding to the multi-feature anomaly index;

[0065] (3) When the multi-feature anomaly index exceeds the dynamic threshold calculated based on the sliding window corresponding to the multi-feature anomaly index, the data point corresponding to the multi-feature anomaly index is marked as an outlier, and the data point is replaced and completed using the distance-weighted average of adjacent valid data points.

[0066] Understandably, locally weighted polynomial interpolation is a method that selects a certain number of neighboring points around a data point, fits a polynomial to these neighboring points, and then estimates the missing value based on the fitting result. For example, if data is missing at a certain location in magnetic flux leakage detection data, data points within a certain range around that location are selected, a polynomial is used to fit the data, and the missing data value should be calculated based on the fitted polynomial.

[0067] In some possible embodiments, when using locally weighted polynomial interpolation to fill in missing values ​​in magnetic flux leakage detection data, a method combining locally weighted cubic polynomial interpolation with robust residual correction can be employed, targeting the missing locations. Constructing a local regression model:

[0068] ;

[0069] Where c is the center coordinate of the missing point, and the coefficient is... Solve using weighted least squares:

[0070] ;

[0071] Here, we design the gradient adaptive weight matrix W, whose elements are:

[0072] ;

[0073] in, The distance weights are the points within the interpolation window. The maximum distance weight for points within the interpolation window. This is the interpolation attenuation factor.

[0074] Further, a residual correction mechanism is introduced, and through three iterations of optimization, the following iterative process is shown in the formula. Finally, the magnetic flux leakage data after imputation of missing values ​​can be obtained. :

[0075] ;

[0076] in, This represents the interpolated value after the t-th iteration. For the square of the residual, Here, s is the robust weight, s is the median residual, and W is the cubic weight function. This is the weighting factor.

[0077] Here, after using the local weighted polynomial interpolation method to fill in the missing values ​​in the magnetic flux leakage detection data, we can further carry out abnormal data identification and correction work on the filled data, thereby improving the overall data quality.

[0078] Specifically, a multi-feature anomaly index corresponding to each missing completion value can be calculated, and each multi-feature anomaly index, and , can be compared with a dynamic threshold calculated based on a sliding window. The multi-feature anomaly index is an indicator used to measure the degree of data anomaly, calculated by comprehensively considering multiple features (such as signal strength and waveform characteristics) in the magnetic flux leakage detection data. A sliding window refers to a fixed-length interval selected in the data sequence. A threshold can be determined by performing statistical analysis (such as calculating the mean and standard deviation) on the data within this window. This threshold is continuously updated as the window slides across the data sequence to adapt to changes in the data. For example, setting the sliding window length to 10 data points, the mean and standard deviation of the data are calculated within each window. The mean plus a certain multiple of the standard deviation is used as the dynamic threshold for that window. Then, the calculated multi-feature anomaly index is compared with this dynamic threshold.

[0079] Here, outliers are data points whose characteristics differ significantly from the majority of data points. Neighboring valid data points are data points that are geographically adjacent to the outlier and are valid data points. After a data point is marked as an outlier, it can be replaced and completed using the distance-weighted average of its neighboring valid data points. The distance-weighted average is determined by the distance between the outlier and its neighboring valid data points; the closer the distance, the greater the weight. The weighted average of these neighboring valid data points is then calculated to replace the outlier's value. For example, if an outlier has three neighboring valid data points, they are assigned weights of 0.5, 0.3, and 0.2 based on their distances to the outlier, respectively. The weighted average of these three data points is then used as the replacement value for the outlier.

[0080] In some possible embodiments, the above-mentioned interpolated magnetic flux leakage data A multi-feature anomaly index can be constructed based on the following formula. Fusion of signal amplitude, gradient, and curvature characteristics:

[0081] ;

[0082] in, and The mean and standard deviation of the signal amplitude. and For gradient statistics, and Let curvature statistics be the weights that satisfy the following conditions: .

[0083] Furthermore, a sliding window dynamic threshold can be used to determine outliers:

[0084] ;

[0085] in, For safety reasons, , is the confidence coefficient Indicating anomaly index The median of all points in the signal. Indicating anomaly index Standard deviation.

[0086] when The time markers were identified as outliers and replaced with the weighted average of adjacent valid data to obtain the preprocessed magnetic flux leakage data. :

[0087] ;

[0088] in, For a valid data window, For distance weights.

[0089] S102, generate a first Gaussian pseudo-color image corresponding to the first multi-feature vector; and generate a second Gaussian pseudo-color image corresponding to the second multi-feature vector; and perform defect mileage localization based on the first Gaussian pseudo-color image and the second Gaussian pseudo-color image to determine the common defect interval.

[0090] Specifically, a Gaussian pseudo-color image is an image obtained by processing raw data through a Gaussian distribution and then mapping it to a color space. It can more intuitively display the distribution and characteristics of the data. For example, the feature values ​​in a multi-feature vector can be normalized according to a Gaussian distribution, and then mapped to different colors based on the normalized values, thus forming a pseudo-color image. After generating two Gaussian pseudo-color images, defect mileage localization can be performed based on them to determine a common defect interval. Defect mileage localization refers to determining the location information of defects on the detected object, usually represented by parameters such as the distance from the detection starting point. The common defect interval refers to the approximate location range of defects detected in both rounds of detection data, determined by comparing regions with similar features in the two Gaussian pseudo-color images.

[0091] In some other embodiments, when generating the Gaussian pseudo-color image corresponding to the multiple feature vectors F, the individual feature values ​​in the multiple feature vectors F can also be... After normalization according to Gaussian distribution:

[0092] ;

[0093] Design a dynamic Gaussian function for each pixel, with its mean... Related local signal peaks:

[0094] ;

[0095] Standard deviation Adaptive adjustment based on local variance:

[0096] ;

[0097] in, The local window radius, Peak coefficient, This is the variance coefficient.

[0098] Further design of the Gaussian weighted color mapping formula:

[0099] ;

[0100] And introduce a defect enhancement coefficient Adjust color contrast:

[0101] ;

[0102] ;

[0103] ;

[0104] The final Gaussian pseudo-color image is generated:

[0105] .

[0106] For example, refer to Figure 3 As shown, when performing defect mileage localization and determining the common defect interval based on the first Gaussian pseudo-color image and the second Gaussian pseudo-color image, the following steps S301~S304 may be included:

[0107] S301, based on the texture features and energy distribution of the first Gaussian pseudo-color image, a first abnormal feature region is determined; and based on the texture features and energy distribution of the second Gaussian pseudo-color image, a second abnormal feature region is determined.

[0108] Understandably, texture features reflect the patterns or structures of local areas in an image. For example, in pipe defect detection, the texture features of a normal pipe surface and a defective area will differ significantly. A normal surface may exhibit a relatively regular and uniform texture, while a defective area may show texture breaks or irregularities. Energy distribution refers to the energy levels in different regions of an image. Energy can be measured by calculating certain statistics of image pixels (such as the sum of squared gray values). In defective areas, due to abnormal signal changes, the energy distribution often differs from that of normal areas. For example, in a first Gaussian pseudo-color image of a pipe, by analyzing its texture features, a certain area is found to have a chaotic texture, contrasting sharply with the surrounding regular texture. At the same time, the energy value of this area is significantly higher than that of the surrounding areas. This area can then be identified as the first anomalous feature region. Similarly, a similar analysis can be performed on the second Gaussian pseudo-color image to identify the second anomalous feature region.

[0109] S302, based on the position of the first abnormal feature region in the first Gaussian pseudo-color image and the preset mapping relationship between the image coordinates and the pipeline mileage coordinates, determine the first defect mileage interval.

[0110] Here, image coordinates refer to the position coordinates of each pixel in the image on the image plane, usually represented by two-dimensional coordinates (x, y). Pipeline mileage coordinates are used to identify the coordinates of different positions on the pipeline, generally based on the starting point of the pipeline and marked according to a certain length unit. The preset mapping relationship is a pre-established correspondence between image coordinates and pipeline mileage coordinates during image acquisition and pipeline mileage measurement. For example, this mapping relationship is determined by setting marker points on the pipeline and recording the coordinates of the marker points in the image and the corresponding pipeline mileage. For instance, if the coordinate range of the first abnormal feature region in the first Gaussian pseudo-color image is known to be (x1, y1) to (x2, y2), according to the preset mapping relationship between image coordinates and pipeline mileage coordinates, it can be converted into the corresponding pipeline mileage range, i.e., the first defect mileage interval.

[0111] For example, in the pipeline defect detection scenario described above, by analyzing the texture features and energy distribution of the first Gaussian pseudo-color image, a first anomalous feature region can be identified. This region's coordinates in the image range from (x1=150, y1=180) to (x2=250, y2=220). Simultaneously, based on a pre-established mapping relationship between image coordinates and pipeline mileage coordinates: every 10 units of x-coordinate in the image corresponds to 1 meter of pipeline mileage, and every 10 units of y-coordinate corresponds to 0.5 meters of pipeline mileage. Therefore, according to this mapping relationship, the coordinate range of the first anomalous feature region can be converted into the corresponding pipeline mileage range: in the x-direction, from 150 to 250 corresponds to a pipeline mileage of (250-150) / 10=10 meters; in the y-direction, from 180 to 220 corresponds to a pipeline mileage of (220-180) / 10×0.5=2 meters. Taking all factors into consideration, the first defect mileage interval can be determined as the pipeline mileage range covered by extending a certain distance in both the horizontal and vertical directions from a certain reference point. For example, the pipeline mileage interval corresponding to the area enclosed by 10 meters horizontally and 2 meters vertically from the reference point.

[0112] S303, based on the position of the second abnormal feature region in the second Gaussian pseudo-color image and the preset mapping relationship between the image coordinates and the pipeline mileage coordinates, determine the second defect mileage interval.

[0113] Here, the principle is the same as in step S302, except that it applies to the second Gaussian pseudo-color image and the second anomalous feature region. For example, the coordinates of the second anomalous feature region in the second Gaussian pseudo-color image are (x3, y3) to (x4, y4). Through the same preset mapping relationship, its corresponding second defect mileage interval can be determined.

[0114] S304, combine the first defect mileage interval and the second defect mileage interval to determine the common defect interval.

[0115] Specifically, since the first and second Gaussian pseudo-color images may have been acquired at different times, from different angles, or under different detection conditions, the defect mileage intervals they determine may differ to some extent. By combining these two intervals, the common interval of the actual defects on the pipeline can be determined more accurately. For example, if the first defect mileage interval is [L1, L2] and the second defect mileage interval is [L3, L4], by analyzing parts of these two intervals or according to certain logical rules (such as taking the intersection or comprehensively considering factors such as detection accuracy), the final common defect interval can be determined. This interval can more reliably reflect the actual location range of the defects on the pipeline.

[0116] S103, within the common defect interval, a matching degree function is constructed based on the first multi-feature vector and the second multi-feature vector; and the optimal offset of the second round of magnetic flux leakage detection data relative to the first round of magnetic flux leakage detection data is calculated based on the matching degree function.

[0117] Understandably, the matching degree function is a mathematical function used to measure the similarity between two multi-feature vectors. Its purpose is to quantify the similarity between the two vectors at the feature level and, combined with constraints on the smoothness of offset changes, find the optimal spatial offset of the second-round magnetic flux leakage detection data (signal B) relative to the first-round magnetic flux leakage detection data (signal A), thereby achieving precise alignment of the two rounds of detection data and more accurately analyzing the defects of the inspected objects such as pipes. Its specific construction process may include the following steps (a) to (c):

[0118] (a) Define a feature similarity term to quantify the similarity between the first multi-feature vector and the second multi-feature vector after applying the offset;

[0119] (b) Define an offset smoothing term to constrain the smoothness of the change of the offset between consecutive positions, the offset smoothing term including a first smoothing constraint based on the second difference of the offset and a second smoothing constraint based on the first difference of the offset;

[0120] (c) Combine the feature similarity term and the offset smoothing term to construct the matching degree function.

[0121] Specifically, the feature similarity term reflects the proximity of two vectors at the feature level. For example, if two vectors are very close in features such as peak points, gradient abrupt change points, and waveform curvature points, the value of the feature similarity term will be large, indicating that the features of the two rounds of detection data at that position have high similarity. Meanwhile, in the actual magnetic flux leakage detection process, the offset should not exhibit sudden jumps or abrupt changes, otherwise it will lead to inaccurate data alignment. Here, the first smoothing constraint measures the smoothness of the offset by calculating the second-order difference of the offset, i.e., the change between three consecutive points. If the second-order difference value is large, it indicates that the offset has large jumps or abrupt changes at some positions. In this case, this term will be penalized to make the alignment process smoother. The second smoothing constraint calculates the offset difference between consecutive positions. Large differences will also be penalized, thus ensuring that the change in offset is continuous and smooth.

[0122] In this way, by combining the feature similarity term and the offset smoothing term, the matching degree function is constructed, which takes into account the similarity of the two rounds of detection data at the feature level and ensures the smooth change of the offset in spatial position, so as to more accurately reflect the matching degree between the two rounds of detection data.

[0123] The matching degree function in this disclosure can be expressed as:

[0124] ;

[0125] in, This indicates that signal B (second round of magnetic flux leakage detection data) is relative to signal A (first round of magnetic flux leakage detection data) at the [missing information]. The offset of each position; The term is represented by the feature similarity term; M and N represent the offset smoothing term.

[0126] Here, the feature similarity term can be calculated using dynamic weighting coefficients, and its formula can be expressed as:

[0127] ;

[0128] in, and The dynamic weighting coefficients and exponential decay factors further enhance the adaptability to different feature types; It is the spatial offset of signal B relative to signal A; k=1,2,3: represents the eigenvector. and The three feature dimensions (peak points, gradient abrupt change points, and waveform curvature points); : indicates that the k-th feature is in the feature vector and The differences between them.

[0129] Here, the offset smoothing term can be expressed as:

[0130] ;

[0131] ;

[0132] Here, M represents the first smoothing constraint based on the second-order difference of the offset, and the offset is calculated. The second difference, which is the change between three consecutive points, measures the smoothness of the offset. A large second difference value indicates that the offset has large jumps or abrupt changes at some positions. Penalizing this term helps to make the alignment process smoother. The N term represents the second smoothing constraint based on the first difference of the offset. It calculates the offset difference between consecutive positions. Large differences are penalized to ensure that the change of the offset is continuous and smooth. and To smooth out regularization parameters and reduce offset The mutations ensure smooth transitions between consecutive positions. By adjusting the values ​​of these two parameters, the weights of the feature similarity term and the offset smoothing term in the matching function can be balanced, resulting in better matching results.

[0133] In some other embodiments, the matching degree function can also be a cosine similarity function. There is no specific limitation here. The similarity between two vectors is measured by calculating the cosine value of the angle between them. The closer the cosine value is to 1, the more similar the two vectors are.

[0134] Specifically, after constructing the matching degree function, the optimal offset of the second round of magnetic flux leakage detection data relative to the first round of magnetic flux leakage detection data can be calculated based on this function. Here, the optimal offset refers to the positional offset that maximizes the matching degree between the two rounds of detection data within the common defect region. It reflects the optimal adjustment amount in position of the second round of magnetic flux leakage detection data relative to the first round of magnetic flux leakage detection data.

[0135] For example, when using the matching degree function to determine the optimal offset of the second round of magnetic flux leakage detection data relative to the first round of magnetic flux leakage detection data, refer to Figure 4 As shown, the steps S401~S402 may be included:

[0136] S401, using the first round of magnetic flux leakage detection data as a reference, initialize an offset for each position of the second round of magnetic flux leakage detection data within the common defect interval.

[0137] Here, the process of initializing the offset is similar to setting an initial adjustment guess value for each position. For example, if there are 100 data points within a common defect interval, each of these 100 data points is assigned an initial offset. These initial offsets can be randomly generated values ​​or set based on some prior knowledge. For instance, if it is known that the detection device may have a general displacement direction and range between two detections, then the initial offset can be set within this range.

[0138] S402, the matching degree function is iteratively optimized using the gradient descent method. When the matching degree function converges or reaches the preset number of iterations, the optimal offset is determined.

[0139] Here, gradient descent is a commonly used algorithm in machine learning and optimization problems. Its basic principle is to gradually approach the minimum value of the objective function by continuously adjusting the parameters along the negative gradient direction (in this problem, the matching degree function can be appropriately transformed into a problem of finding its maximum value, and then the parameters can be adjusted along the positive gradient direction). In each iteration, the algorithm calculates the value of the matching degree function based on the current offset and its gradient, then adjusts the offset according to the direction and magnitude of the gradient. When the matching degree function converges, that is, when the change in the value of the matching degree function in several consecutive iterations is less than a pre-set threshold, or when a preset number of iterations is reached, the optimal solution can be considered to have been found, and the offset is then determined as the optimal offset. The preset number of iterations is to prevent the algorithm from looping infinitely if it cannot converge, ensuring that the calculation process ends within a reasonable time.

[0140] Specifically, in order to more accurately determine the optimal position adjustment amount of the second round of magnetic flux leakage detection data relative to the first round of magnetic flux leakage detection data within the common defect interval, and thus improve the consistency and accuracy of the defect feature descriptions of the two rounds of detection data, refer to Figure 5 As shown, each iteration includes the following steps S4021~S4022:

[0141] S4021, based on the current offset, the second multi-feature vector is shifted, and the matching degree function value between the shifted second multi-feature vector and the first multi-feature vector is calculated based on the matching degree function.

[0142] Specifically, shifting the second multi-feature vector based on the current offset essentially simulates the adjustment of the second round of detection data relative to the first round of detection data at various positions. For example, if the offset corresponding to the current data point is positive, it means that each feature value in the second multi-feature vector is moved backward by the corresponding unit along the direction of the vector arrangement; if the offset is negative, it is moved forward. After completing the shift operation, the matching degree function value between the shifted second multi-feature vector and the first multi-feature vector can be calculated based on a pre-constructed matching degree function to quantify the similarity between the two rounds of detection data within the common defect interval, and to determine whether the descriptions of defect features by the two rounds of detection data are close at the current offset.

[0143] S4022, calculate the gradient of the matching degree function with respect to the current offset; and update the offset of the second round of magnetic flux leakage detection data at each position in the common defect interval according to the gradient.

[0144] Here, the gradient is a vector that describes the rate of change and direction of change of the matching degree function at the current offset. The gradient points in the direction of the fastest growth of the matching degree function. The gradient of the matching degree function with respect to the current offset can be obtained by taking the derivative of the matching degree function with respect to the offset. After obtaining the gradient, the offsets of the second round of magnetic flux leakage detection data at various positions within the common defect region can be updated based on the gradient.

[0145] Specifically, the process of updating the offset can follow the principle of gradient ascent, that is, adjusting the offset along the positive direction of the gradient. The adjustment magnitude can be determined by a pre-set learning rate, which controls the step size of the offset change in each iteration. By continuously iterating through steps S4021 and S4022, the offset is gradually adjusted, allowing the value of the matching degree function to continuously increase. Eventually, the offset that maximizes the matching degree function can be found, i.e., the optimal offset.

[0146] In some possible embodiments, when iteratively optimizing the matching degree function using gradient descent, its expression can be represented as:

[0147] ;

[0148] in, It represents the offset of the second round of magnetic flux leakage detection data relative to the first round of magnetic flux leakage detection data within the common defect interval at the k-th iteration. This offset is a vector, and each element corresponds to the position offset of the second round of detection data relative to the first round of detection data at the corresponding position within the common defect interval. It is the learning rate; The offset of the matching degree function D in the k-th iteration is represented as... gradient at; It is the momentum coefficient, used to accelerate convergence, so that the update of the offset depends not only on the current gradient, but also on the direction and magnitude of the offset change in the previous iteration.

[0149] S104, according to the optimal offset, the first round of magnetic flux leakage detection data and the second round of magnetic flux leakage detection data are aligned and fused to obtain the target fused defect data.

[0150] Here, alignment fusion refers to merging two rounds of inspection data after adjusting them according to the optimal offset, to obtain more accurate and comprehensive defect information. Target fusion defect data combines the advantages of both rounds of inspection data, which can more accurately reflect the defect situation on the inspected object, providing a more reliable basis for subsequent defect assessment and maintenance decisions.

[0151] In some possible embodiments, in order to further improve the quality of the fused target fusion defect data, refer to Figure 6 As shown, when aligning and fusing the first round of magnetic flux leakage detection data and the second round of magnetic flux leakage detection data, the following steps S601~S604 may be included:

[0152] S601, perform displacement correction on the second round of magnetic flux leakage detection data according to the optimal offset.

[0153] Here, after obtaining the optimal offset, the second round of magnetic flux leakage detection data can be shifted using the optimal offset to make it correspond spatially with the first round of magnetic flux leakage detection data.

[0154] S602, determine a first weighting coefficient based on the noise variance of the first round of magnetic flux leakage detection data; and determine a second weighting coefficient based on the noise variance of the second round of magnetic flux leakage detection data.

[0155] Understandably, noise variance is an important indicator for measuring the noise level of data, reflecting the magnitude of random fluctuations within the data. In magnetic flux leakage (MFL) detection, noise may originate from various factors such as electronic noise from the detection equipment and environmental interference. Furthermore, the noise levels of data from different rounds of detection may vary due to differing detection conditions. By calculating the noise variance of data from two rounds and determining the weighting coefficients accordingly, greater weight can be assigned to data with lower noise during the fusion process, thereby reducing the impact of noise on the fusion results. For example, if the noise variance of the first round of MFL detection data is small, indicating relatively high data quality, then a larger initial weighting coefficient can be assigned to the first round of MFL detection data during fusion, giving it a more significant role in the fusion result and improving the accuracy of the fused data.

[0156] S603, using the first weighting coefficient and the second weighting coefficient, perform weighted interpolation calculation on the first round of magnetic flux leakage detection data and the displacement-corrected second round of magnetic flux leakage detection data within the common defect interval.

[0157] Specifically, weighted interpolation is an information fusion method that comprehensively considers two rounds of data and their weights. Within the common defect interval, for each location point, the first round of data and the second round of data after displacement correction are weighted according to the first weight coefficient and the second weight coefficient, respectively. Then, the weighted result is interpolated to obtain the fusion value of that location point.

[0158] In this way, the advantages of both rounds of data can be fully utilized, so that the fused data retains the useful information from both rounds of data while reducing the impact of noise and errors.

[0159] Here, the specific formula for the above weighted interpolation calculation can be expressed as:

[0160] ;

[0161] in, and The first weighting coefficient for the first round of magnetic flux leakage detection data (A) and the second weighting coefficient for the second round of magnetic flux leakage detection data (B) are determined based on the noise standard deviation:

[0162] ;

[0163] in, and These are the noise variances of the first round of magnetic flux leakage detection data (A) and the second round of magnetic flux leakage detection data (B), respectively.

[0164] S604, Smooth the weighted interpolation calculation results and output the target fusion defect data.

[0165] It is understandable that during the weighted interpolation calculation process, the discreteness of the data and the influence of noise may cause discontinuities or large fluctuations in the fusion result at certain locations. By smoothing the data, such as by using moving averages or Gaussian filtering, the fused data can be made smoother, reducing local fluctuations and outliers, thereby improving the quality of the target fusion defect data.

[0166] In some possible embodiments, a smoothing weighting coefficient may also be used. and To reduce signal instability:

[0167] ;

[0168] ;

[0169] in, It is a tiny constant to prevent division by zero errors.

[0170] Furthermore, after completing the weighted interpolation, the first round of magnetic flux leakage detection data (A) and the second round of magnetic flux leakage detection data (B) can be finally fused using the following formula to obtain the final target fused defect data. :

[0171] .

[0172] The dual-wheel magnetic flux leakage detection defect alignment method and apparatus based on multi-feature fusion provided in this embodiment combines multi-feature vector extraction with Gaussian pseudo-color image generation, which can more comprehensively and accurately capture defect feature information in magnetic flux leakage detection data. At the same time, it utilizes the intuitive visual characteristics of Gaussian pseudo-color images to improve the accuracy of defect mileage positioning and effectively determine the common defect interval. Then, by constructing a matching degree function within the common defect interval and calculating the optimal offset, high-precision alignment and fusion of the two-wheel magnetic flux leakage detection data is achieved. The resulting target fused defect data can more realistically and accurately reflect the actual defect situation of the pipeline, ensuring the safety and stability of pipeline operation and reducing the risk of accidents caused by pipeline defects.

[0173] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0174] Based on the same inventive concept, this disclosure also provides a dual-wheel magnetic flux leakage detection defect alignment device based on multi-feature fusion, which corresponds to the dual-wheel magnetic flux leakage detection defect alignment method based on multi-feature fusion. Since the principle of the device in this disclosure is similar to the dual-wheel magnetic flux leakage detection defect alignment method based on multi-feature fusion described above, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0175] Reference Figure 7 The diagram shown is a schematic of a dual-wheel magnetic flux leakage detection defect alignment device 700 based on multi-feature fusion provided in an embodiment of this disclosure. The device includes:

[0176] The data processing module 701 is used to acquire a magnetic flux leakage detection dataset and extract multiple feature vectors from the magnetic flux leakage detection dataset to obtain a set of multiple feature vectors; wherein, the magnetic flux leakage detection dataset includes first-round magnetic flux leakage detection data and second-round magnetic flux leakage detection data, and the set of multiple feature vectors includes a first multiple feature vector corresponding to the first-round magnetic flux leakage detection data and a second multiple feature vector corresponding to the second-round magnetic flux leakage detection data;

[0177] The defect localization module 702 is used to generate a first Gaussian pseudo-color image corresponding to a first multi-feature vector; and to generate a second Gaussian pseudo-color image corresponding to a second multi-feature vector; and to perform defect mileage localization based on the first Gaussian pseudo-color image and the second Gaussian pseudo-color image to determine a common defect interval.

[0178] The offset calculation module 703 is used to construct a matching degree function based on the first multi-feature vector and the second multi-feature vector within the common defect interval; and to calculate the optimal offset of the second round of magnetic flux leakage detection data relative to the first round of magnetic flux leakage detection data based on the matching degree function.

[0179] The data fusion module 704 is used to align and fuse the first round of magnetic flux leakage detection data and the second round of magnetic flux leakage detection data according to the optimal offset to obtain the target fused defect data.

[0180] In some possible embodiments, the data processing module 701 is specifically used for:

[0181] For the first round of magnetic flux leakage detection data, local peak points in the first round of magnetic flux leakage detection data are identified to form a first peak feature vector set; and the signal gradient of the first round of magnetic flux leakage detection data is calculated, and gradient abrupt change points in the first round of magnetic flux leakage detection data where the signal gradient change exceeds a preset gradient threshold are identified to form a first gradient abrupt change feature vector set; and the curvature of the first round of magnetic flux leakage detection data is calculated, and waveform curvature points where the curvature exceeds a preset curvature threshold are identified to form a first curvature feature vector set.

[0182] Based on the first peak feature vector set, the first gradient abrupt change feature vector set, and the first curvature feature vector set, the first multi-feature vector is constructed.

[0183] For the second round of magnetic flux leakage detection data, local peak points in the second round of magnetic flux leakage detection data are identified to form a second peak feature vector set; and the signal gradient of the second round of magnetic flux leakage detection data is calculated, and gradient abrupt change points in the second round of magnetic flux leakage detection data where the signal gradient change exceeds a preset gradient threshold are identified to form a second gradient abrupt change feature vector set; and the curvature of the second round of magnetic flux leakage detection data is calculated, and waveform curvature points where the curvature exceeds a preset curvature threshold are identified to form a second curvature feature vector set.

[0184] Based on the second peak feature vector set, the second gradient mutation feature vector set, and the second curvature feature vector set, the second multi-feature vector is constructed.

[0185] In some possible embodiments, the data processing module 701 is further configured to:

[0186] The first round of magnetic flux leakage detection data and the second round of magnetic flux leakage detection data are preprocessed respectively;

[0187] The preprocessing includes:

[0188] The missing values ​​in the magnetic flux leakage detection data were filled using a locally weighted polynomial interpolation method.

[0189] as well as,

[0190] Calculate the multi-feature anomaly index corresponding to each missing completion value, and compare each of the multi-feature anomaly indices with the dynamic thresholds calculated based on the sliding window corresponding to the multi-feature anomaly indexes.

[0191] When the multi-feature anomaly index exceeds the dynamic threshold calculated based on the sliding window corresponding to the multi-feature anomaly index, the data point corresponding to the multi-feature anomaly index is marked as an outlier, and the data point is replaced and completed using the distance-weighted average of adjacent valid data points.

[0192] In some possible embodiments, the defect location module 702 is specifically used for:

[0193] Based on the texture features and energy distribution of the first Gaussian pseudo-color image, a first abnormal feature region is determined; and based on the texture features and energy distribution of the second Gaussian pseudo-color image, a second abnormal feature region is determined.

[0194] Based on the position of the first abnormal feature region in the first Gaussian pseudo-color image, and the preset mapping relationship between image coordinates and pipeline mileage coordinates, the first defect mileage interval is determined.

[0195] Based on the position of the second abnormal feature region in the second Gaussian pseudo-color image, and the preset mapping relationship between image coordinates and pipeline mileage coordinates, the second defect mileage interval is determined.

[0196] The common defect interval is determined by combining the first defect mileage interval and the second defect mileage interval.

[0197] In some possible embodiments, the offset calculation module 703 is specifically used for:

[0198] Define a feature similarity term to quantify the similarity between the first multi-feature vector and the second multi-feature vector after applying the offset;

[0199] Define an offset smoothing term to constrain the smoothness of the change of offset between consecutive positions. The offset smoothing term includes a first smoothing constraint based on the second difference of the offset and a second smoothing constraint based on the first difference of the offset.

[0200] The matching degree function is constructed by combining the feature similarity term and the offset smoothing term.

[0201] In some possible embodiments, the offset calculation module 703 is specifically used for:

[0202] Based on the first round of magnetic flux leakage detection data, an offset is initialized for each position of the second round of magnetic flux leakage detection data within the common defect interval;

[0203] The matching degree function is iteratively optimized using the gradient descent method. When the matching degree function converges or reaches a preset number of iterations, the optimal offset is determined.

[0204] Each iteration includes:

[0205] Based on the current offset, the second multi-feature vector is shifted, and the matching degree function value between the shifted second multi-feature vector and the first multi-feature vector is calculated based on the matching degree function.

[0206] Calculate the gradient of the matching degree function with respect to the current offset; and update the offset of the second round of magnetic flux leakage detection data at each position within the common defect interval according to the gradient.

[0207] In some possible embodiments, the data fusion module 704 is specifically used for:

[0208] The second round of magnetic flux leakage detection data is adjusted for displacement based on the optimal offset.

[0209] A first weighting coefficient is determined based on the noise variance of the first round of magnetic flux leakage detection data; and a second weighting coefficient is determined based on the noise variance of the second round of magnetic flux leakage detection data.

[0210] Using the first weighting coefficient and the second weighting coefficient, a weighted interpolation calculation is performed on the first round of magnetic flux leakage detection data and the displacement-corrected second round of magnetic flux leakage detection data within the common defect interval;

[0211] The weighted interpolation calculation results are smoothed, and the target fusion defect data is output.

[0212] Based on the same technical concept, this disclosure also provides a computer device. (See also...) Figure 8 The diagram shows the structure of a computer device 800 provided in this embodiment of the present disclosure, including a processor 801, a memory 802, and a bus 803. The memory 802 stores execution instructions and includes a main memory 8021 and an external memory 8022. The main memory 8021, also called internal memory, is used to temporarily store computational data in the processor 801 and data exchanged with external memory 8022 such as a hard disk. The processor 801 exchanges data with the external memory 8022 through the main memory 8021.

[0213] In this embodiment, the memory 802 is specifically used to store application code that executes the solution of this application, and its execution is controlled by the processor 801. That is, when the computer device 800 is running, the processor 801 communicates with the memory 802 through the bus 803, so that the processor 801 executes the application code stored in the memory 802, and then executes the method described in any of the foregoing embodiments.

[0214] The memory 802 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0215] Processor 801 may be an integrated circuit chip with signal processing capabilities. The aforementioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor.

[0216] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the computer device 800. In other embodiments of this application, the computer device 800 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0217] This disclosure also provides a computer-readable storage medium storing a computer program. When a processor executes the computer program, it performs the steps of the dual-wheel magnetic flux leakage detection defect alignment method based on multi-feature fusion described in the above-described method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0218] This disclosure also provides a computer program product carrying program code. The program code includes instructions that can be used to execute the steps of the dual-wheel magnetic flux leakage detection defect alignment method based on multi-feature fusion described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.

[0219] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0220] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed systems and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0221] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0222] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0223] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0224] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, 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 this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.

Claims

1. A defect alignment method for dual-wheel magnetic flux leakage detection based on multi-feature fusion, characterized in that, include: Obtain a magnetic flux leakage detection dataset and extract multiple feature vectors from the magnetic flux leakage detection dataset to obtain a set of multiple feature vectors; wherein, the magnetic flux leakage detection dataset includes first round magnetic flux leakage detection data and second round magnetic flux leakage detection data, and the set of multiple feature vectors includes a first multiple feature vector corresponding to the first round magnetic flux leakage detection data and a second multiple feature vector corresponding to the second round magnetic flux leakage detection data; Generate a first Gaussian pseudo-color image corresponding to a first multi-feature vector; and generate a second Gaussian pseudo-color image corresponding to a second multi-feature vector; and perform defect mileage localization based on the first Gaussian pseudo-color image and the second Gaussian pseudo-color image to determine a common defect interval; Within the common defect interval, a feature similarity term is defined to quantify the similarity between the first multi-feature vector and the second multi-feature vector after applying the offset; an offset smoothing term is defined to constrain the smoothness of the offset change between consecutive positions, the offset smoothing term including a first smoothing constraint based on the second-order difference of the offset and a second smoothing constraint based on the first-order difference of the offset; combining the feature similarity term and the offset smoothing term, a matching degree function is constructed; and, based on the matching degree function, the optimal offset of the second round of magnetic flux leakage detection data relative to the first round of magnetic flux leakage detection data is calculated; Based on the optimal offset, the first round of magnetic flux leakage detection data and the second round of magnetic flux leakage detection data are aligned and fused to obtain the target fused defect data; The step of calculating the optimal offset of the second round of magnetic flux leakage detection data relative to the first round of magnetic flux leakage detection data based on the matching degree function includes: Based on the first round of magnetic flux leakage detection data, an offset is initialized for each position of the second round of magnetic flux leakage detection data within the common defect interval; The matching degree function is iteratively optimized using the gradient descent method. When the matching degree function converges or reaches a preset number of iterations, the optimal offset is determined. Each iteration includes: Based on the current offset, the second multi-feature vector is shifted, and the matching degree function value between the shifted second multi-feature vector and the first multi-feature vector is calculated based on the matching degree function. Calculate the gradient of the matching degree function with respect to the current offset; and update the offset of the second round of magnetic flux leakage detection data at each position within the common defect interval according to the gradient.

2. The method according to claim 1, characterized in that, The step of extracting multiple feature vectors from the magnetic flux leakage detection dataset includes: For the first round of magnetic flux leakage detection data, local peak points in the first round of magnetic flux leakage detection data are identified to form a first peak feature vector set; and the signal gradient of the first round of magnetic flux leakage detection data is calculated, and gradient abrupt change points in the first round of magnetic flux leakage detection data where the signal gradient change exceeds a preset gradient threshold are identified to form a first gradient abrupt change feature vector set; and the curvature of the first round of magnetic flux leakage detection data is calculated, and waveform curvature points where the curvature exceeds a preset curvature threshold are identified to form a first curvature feature vector set. Based on the first peak feature vector set, the first gradient abrupt change feature vector set, and the first curvature feature vector set, the first multi-feature vector is constructed. For the second round of magnetic flux leakage detection data, local peak points in the second round of magnetic flux leakage detection data are identified to form a second peak feature vector set; and the signal gradient of the second round of magnetic flux leakage detection data is calculated, and gradient abrupt change points in the second round of magnetic flux leakage detection data where the signal gradient change exceeds a preset gradient threshold are identified to form a second gradient abrupt change feature vector set; and the curvature of the second round of magnetic flux leakage detection data is calculated, and waveform curvature points where the curvature exceeds a preset curvature threshold are identified to form a second curvature feature vector set. Based on the second peak feature vector set, the second gradient mutation feature vector set, and the second curvature feature vector set, the second multi-feature vector is constructed.

3. The method according to claim 1, characterized in that, After obtaining the multi-feature vector set, the process includes: The first round of magnetic flux leakage detection data and the second round of magnetic flux leakage detection data are preprocessed respectively; The preprocessing includes: The missing values ​​in the magnetic flux leakage detection data were filled using a locally weighted polynomial interpolation method. as well as, Calculate the multi-feature anomaly index corresponding to each missing completion value, and compare each of the multi-feature anomaly indices with the dynamic thresholds calculated based on the sliding window corresponding to the multi-feature anomaly indexes. When the multi-feature anomaly index exceeds the dynamic threshold calculated based on the sliding window corresponding to the multi-feature anomaly index, the data point corresponding to the multi-feature anomaly index is marked as an outlier, and the data point is replaced and completed using the distance-weighted average of adjacent valid data points.

4. The method according to claim 1, characterized in that, The step of locating defect mileage based on the first Gaussian pseudo-color image and the second Gaussian pseudo-color image, and determining the common defect interval, includes: Based on the texture features and energy distribution of the first Gaussian pseudo-color image, a first abnormal feature region is determined; and based on the texture features and energy distribution of the second Gaussian pseudo-color image, a second abnormal feature region is determined. Based on the position of the first abnormal feature region in the first Gaussian pseudo-color image, and the preset mapping relationship between image coordinates and pipeline mileage coordinates, the first defect mileage interval is determined. Based on the position of the second abnormal feature region in the second Gaussian pseudo-color image, and the preset mapping relationship between image coordinates and pipeline mileage coordinates, the second defect mileage interval is determined. The common defect interval is determined by combining the first defect mileage interval and the second defect mileage interval.

5. The method according to claim 1, characterized in that, The step of aligning and fusing the first round of magnetic flux leakage detection data and the second round of magnetic flux leakage detection data according to the optimal offset includes: The second round of magnetic flux leakage detection data is adjusted for displacement based on the optimal offset. A first weighting coefficient is determined based on the noise variance of the first round of magnetic flux leakage detection data; and a second weighting coefficient is determined based on the noise variance of the second round of magnetic flux leakage detection data. Using the first weighting coefficient and the second weighting coefficient, a weighted interpolation calculation is performed on the first round of magnetic flux leakage detection data and the displacement-corrected second round of magnetic flux leakage detection data within the common defect interval; The weighted interpolation calculation results are smoothed, and the target fusion defect data is output.

6. A dual-wheel magnetic flux leakage detection defect alignment device based on multi-feature fusion, characterized in that, include: The data processing module is used to acquire the magnetic flux leakage detection dataset and extract multiple feature vectors from the magnetic flux leakage detection dataset to obtain a set of multiple feature vectors; wherein, the magnetic flux leakage detection dataset includes first-round magnetic flux leakage detection data and second-round magnetic flux leakage detection data, and the set of multiple feature vectors includes a first multiple feature vector corresponding to the first-round magnetic flux leakage detection data and a second multiple feature vector corresponding to the second-round magnetic flux leakage detection data; The defect localization module is used to generate a first Gaussian pseudo-color image corresponding to a first multi-feature vector; and to generate a second Gaussian pseudo-color image corresponding to a second multi-feature vector; and to perform defect mileage localization based on the first Gaussian pseudo-color image and the second Gaussian pseudo-color image to determine a common defect interval; The offset calculation module is used to define a feature similarity term within the common defect interval to quantify the similarity between a first multi-feature vector and a second multi-feature vector after applying an offset; define an offset smoothing term to constrain the smoothness of the offset change between consecutive positions, the offset smoothing term including a first smoothing constraint based on the second-order difference of the offset and a second smoothing constraint based on the first-order difference of the offset; combine the feature similarity term and the offset smoothing term to construct a matching degree function; and calculate the optimal offset of the second round of magnetic flux leakage detection data relative to the first round of magnetic flux leakage detection data based on the matching degree function. The data fusion module is used to align and fuse the first round of magnetic flux leakage detection data and the second round of magnetic flux leakage detection data according to the optimal offset to obtain the target fused defect data; Specifically, the offset calculation module is used for: Based on the first round of magnetic flux leakage detection data, an offset is initialized for each position of the second round of magnetic flux leakage detection data within the common defect interval; The matching degree function is iteratively optimized using the gradient descent method. When the matching degree function converges or reaches a preset number of iterations, the optimal offset is determined. Each iteration includes: Based on the current offset, the second multi-feature vector is shifted, and the matching degree function value between the shifted second multi-feature vector and the first multi-feature vector is calculated based on the matching degree function. Calculate the gradient of the matching degree function with respect to the current offset; and update the offset of the second round of magnetic flux leakage detection data at each position within the common defect interval according to the gradient.

7. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 5.

8. A computer device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Oil and gas pipeline body defect alignment method and device

    CN111159837A

  • Pipeline defect identifying and positioning method based on target detection and weak magnetic detection

    CN117420196A