Double-wheel magnetic flux leakage detection defect alignment method and device based on multi-feature fusion

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

CN121033038AActive Publication Date: 2025-11-28NORTHEASTERN UNIV CHINA

Patent Information

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

AI Technical Summary

Technical Problem

Existing magnetic flux leakage detection methods suffer from low accuracy and poor stability in the defect alignment process, making it difficult to adapt to the complex evolution of pipeline defects. This results in low confidence in defect judgment and affects the accuracy and stability of pipeline safety assessment.

Method used

A dual-wheel magnetic flux leakage detection method with multi-feature fusion is adopted. By acquiring the magnetic flux leakage detection dataset, extracting multiple feature vectors, generating Gaussian pseudo-color images for defect mileage localization, constructing a matching degree function to calculate the optimal offset, and achieving high-precision alignment and fusion of the two-wheel detection data.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121033038A_ABST
    Figure CN121033038A_ABST
Patent Text Reader

Abstract

The invention 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, and the method comprises the steps: obtaining a magnetic flux leakage detection data set, and carrying out the multi-feature vector extraction of the data set, and obtaining a multi-feature vector set; then, generating 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; defect mileage positioning is carried out based on the two images, and a common defect interval is determined; in 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; and according to the optimal offset, performing alignment fusion on the first round of magnetic flux leakage detection data and the second round of magnetic flux leakage detection data to obtain target fusion defect data. According to the embodiment, the accuracy and stability of defect alignment can be effectively improved, so that the reliability of pipeline safety management is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of pipeline magnetic flux leakage detection, in particular to a double-wheel magnetic flux leakage detection defect alignment method and device based on multi-feature fusion. BACKGROUND

[0002] Industrial pipelines are the core carriers for transporting oil and gas energy such as petroleum and natural gas, and play a key role in many fields such as petrochemical industry, energy transmission and urban gas supply. The safety of the pipelines directly affects the stability of industrial production and public safety. However, during long-term service, the pipelines are affected by many factors such as corrosion of the transported medium, external environmental corrosion and mechanical stress, and thus are prone to defects such as corrosion, cracks and weld damage. If these defects are not discovered and treated in time, they may cause serious safety accidents such as medium leakage and pipeline rupture, which not only cause huge economic losses, but also cause serious environmental pollution.

[0003] In the whole life cycle management of the pipeline, a single detection cannot support reliable safety evaluation, and the defect evolution trend needs to be compared and analyzed through multiple detection data to develop accurate maintenance and management plans. The core prerequisite for realizing the comparison of multiple detection data is defect alignment. At present, although there are conventional data collection, preprocessing and result comparison processes, there are still many problems in the defect alignment link. For example, the existing magnetic flux leakage data defect recognition and alignment method relies on collecting signals through a closed magnetic loop, using a simplified strategy to preprocess data, and judging defects through a single peak feature, and then using artificial marking of anchor points and linear interpolation to realize correlation of multiple rounds of data. However, a single feature cannot adapt to the complexity of defect corrosion evolution, and the alignment method is rough and the angle deviation compensation is insufficient. The whole pipeline traversal calculation is low in efficiency, and the single round of data lacks verification, which leads to low confidence of defect judgment and seriously affects the accuracy and stability of evolution analysis. SUMMARY

[0004] The embodiments of the present disclosure at least provide a double-wheel magnetic flux leakage detection defect alignment method and device based on multi-feature fusion, which can effectively improve the precision and stability of defect alignment, thereby effectively improving the reliability of pipeline safety management.

[0005] The embodiments of the present disclosure provide a double-wheel magnetic flux leakage detection defect alignment method based on multi-feature fusion, comprising: obtaining a magnetic flux leakage detection data set, and performing multi-feature vector extraction on the magnetic flux leakage detection data set to obtain a multi-feature vector set; wherein the magnetic flux leakage detection data set comprises first round magnetic flux leakage detection data and second round magnetic flux leakage detection data, and the multi-feature vector set comprises first multi-feature vectors corresponding to the first round magnetic flux leakage detection data and second multi-feature vectors corresponding to the second round magnetic flux leakage detection data; 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 positioning 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, construct a matching degree function based on the first multi-feature vector and the second multi-feature vector, and calculate an 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; 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 target fused defect data.

[0006] The embodiment of the disclosure provides a double-round magnetic flux leakage detection defect alignment device based on multi-feature fusion, which comprises: A data processing module is configured to acquire a magnetic flux leakage detection data set and extract multi-feature vectors from the magnetic flux leakage detection data set to obtain a multi-feature vector set; wherein the magnetic flux leakage detection data set comprises first round of magnetic flux leakage detection data and second round of magnetic flux leakage detection data, and the multi-feature vector set comprises 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; A defect positioning module is configured to 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 positioning based on the first Gaussian pseudo-color image and the second Gaussian pseudo-color image to determine a common defect interval; An offset calculation module is configured to, within the common defect interval, construct a matching degree function based on the first multi-feature vector and the second multi-feature vector, and calculate an 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; A data fusion module is configured 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 target fused defect data.

[0007] The embodiment of the disclosure provides a computer device, which comprises 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 and the memory communicate through the bus, and the machine readable instructions are executed by the processor to perform the double-round magnetic flux leakage detection defect alignment method based on multi-feature fusion as described in any possible embodiment.

[0008] The embodiment of the present disclosure provides a computer readable storage medium, and the computer readable storage medium stores a computer program. When the computer program is run by a processor, the method for aligning defects based on multi-feature fusion in double-wheel magnetic flux leakage detection is realized.

[0009] The method and device for aligning defects based on multi-feature fusion in double-wheel magnetic flux leakage detection provided in the embodiment of the present disclosure can more comprehensively and accurately capture the defect feature information in the magnetic flux leakage detection data by combining multi-feature vector extraction and Gaussian pseudo-color image generation. Meanwhile, the precision of defect mileage positioning is improved by using the intuitive visual characteristics of the Gaussian pseudo-color image, and the common defect interval is effectively determined. Then, the high-precision alignment and fusion of the two rounds of magnetic flux leakage detection data are realized by constructing a matching degree function in the common defect interval and calculating the optimal offset. The target fusion defect data obtained can more truly and accurately reflect the actual defect situation of the pipeline, thereby ensuring the safety and stability of the pipeline operation and reducing the risk of accidents caused by pipeline defects.

[0010] In order to make the above-mentioned objectives, characteristics and advantages of the present disclosure more apparent, clear and easy to understand, the following preferred embodiments are specifically described below, and the accompanying drawings are described in detail as follows. BRIEF DESCRIPTION OF DRAWINGS

[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required to be cited in the embodiments will be briefly introduced. The drawings are incorporated into the specification and form a part of the specification. The drawings show the embodiments consistent with the present disclosure, and are used to illustrate the technical solutions of the present disclosure together with the specification. It should be understood that the following drawings only show some embodiments of the present disclosure, and therefore should not be regarded as a limitation on the scope. Other related drawings can also be obtained by those skilled in the art without creative labor.

[0012] Figure 1 A flowchart of a method for aligning defects based on multi-feature fusion in double-wheel magnetic flux leakage detection provided by the embodiment of the present disclosure is shown; Figure 2 A flowchart of a method for extracting multi-feature vectors of data provided by the embodiment of the present disclosure is shown; Figure 3 A flowchart of a method for determining a common defect interval provided by the embodiment of the present disclosure is shown; Figure 4 A flowchart of a method for solving an optimal offset provided by the embodiment of the present disclosure is shown; Figure 5 A flowchart of an iterative method for solving an optimal offset provided by the embodiment of the present disclosure is shown; Figure 6A flow chart of a data alignment fusion method provided by an embodiment of the present disclosure is shown. Figure 7 A structural schematic diagram of a double-wheel magnetic flux leakage detection defect alignment device based on multi-feature fusion provided by an embodiment of the present disclosure is shown. Figure 8 A structural schematic diagram of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0013] To make the objectives, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. The components of the embodiments of the present disclosure described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the claimed present disclosure, but only represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present disclosure.

[0014] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0015] The term "and / or" herein only describes an association relationship, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, 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.

[0016] Industrial pipelines are widely used in the fields of petrochemical industry, energy transmission, urban gas supply, etc. as the core transportation carrier of oil and gas energy such as petroleum and natural gas, and their operation safety is directly related to the stability of industrial production and public safety. However, during the long-term service of the pipelines, they are prone to defects such as corrosion defects, cracks and weld damage due to the influence of factors such as corrosion by the transported medium, external environmental corrosion and mechanical stress. If not discovered and treated in time, it may cause safety accidents such as medium leakage and pipeline burst, resulting in economic loss and environmental pollution.

[0017] It is found through research that although a conventional data collection, preprocessing and result comparison process has been formed in the industry, there are still many technical problems in the defect alignment link, which affects the accuracy and stability of defect evolution analysis. Related methods usually rely on closed magnetic loop to collect magnetic flux leakage signals, use a simplified strategy for data preprocessing, and judge the defect position based on a single peak feature, and then realize multi-round data correlation through manual anchor point marking and linear interpolation. However, the related methods face two key challenges in practical application: on the one hand, due to factors such as roughness of the inner wall of the pipeline, fluctuation of medium flow rate and error of detector posture adjustment in different detection rounds, the detection angle often deviates, causing the sensor array to rotate or translate relative to the pipe, and then causing the magnetic flux leakage features of the same defect to be horizontally displaced in the data sequence, and even a phase difference between multi-channel responses. On the other hand, in the long-term operation of the pipeline, the corrosion defect may gradually expand and connect from multiple scattered points to a larger area of composite defect, and its magnetic flux leakage response correspondingly evolves from multiple discrete weak peaks to a single wide strong peak, accompanied by phenomena such as amplitude increase, half-height width expansion, barycenter shift and curvature change. The traditional method of relying on a single feature for judgment is difficult to adapt to such dramatic changes in shape, and is prone to misjudgment of the actual evolution process of the same defect as "newly added" or "disappeared" defects, ultimately leading to registration failure and deviation in defect growth evaluation.

[0018] Based on the above research, a multi-feature fusion based double-round magnetic flux leakage detection defect alignment method and device are provided in the embodiments of the present disclosure. Specifically, a magnetic flux leakage detection data set is obtained, and a multi-feature vector set is obtained by performing multi-feature vector extraction on the data set. 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. 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.

[0019] In the embodiments of the present disclosure, by combining multi-feature vector extraction with Gaussian pseudo-color image generation, defect feature information in the magnetic flux leakage detection data can be more comprehensively and accurately captured. At the same time, the accuracy of defect mileage positioning is improved by using the intuitive visual characteristics of Gaussian pseudo-color images, and the common defect interval is effectively determined. 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 rounds of magnetic flux leakage detection data are realized. The target fusion defect data obtained can more truly and accurately reflect the actual defect situation of the pipeline, ensuring the safety and stability of the pipeline operation and reducing the risk of accidents caused by pipeline defects.

[0020] To facilitate the understanding of the present embodiment, first, the execution subject of the multi-feature fusion based double-wheel magnetic flux leakage detection defect alignment method provided by the present embodiment is introduced in detail. The execution subject of the multi-feature fusion based double-wheel magnetic flux leakage detection defect alignment method provided by the present embodiment is a computer device. The 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, a vehicle-mounted device, a wearable device, etc. The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud databases, cloud computing, cloud storage, big data and artificial intelligence platforms, etc. basic cloud computing services. Optionally, the method can also be applied to an implementation environment composed of a computer device and a server.

[0021] The multi-feature fusion based double-wheel magnetic flux leakage detection defect alignment method provided by the present embodiment will be described in detail below with reference to the accompanying drawings. Referring to FIG. 1, it is a flowchart of a multi-feature fusion based double-wheel magnetic flux leakage detection defect alignment method provided by the present embodiment. The method comprises the following S101-S104: Figure 1 S101, obtain a magnetic flux leakage detection data set and perform multi-feature vector extraction on the magnetic flux leakage detection data set to obtain a multi-feature vector set.

[0022] It can be understood that magnetic flux leakage detection is a non-destructive testing technology that uses magnetic powder or magnetic induction principles to detect surface and near-surface defects of materials, and is widely used in pipeline detection, metal component detection, etc. Here, the magnetic flux leakage detection data set contains first round magnetic flux leakage detection data and second round magnetic flux leakage detection data, which are data obtained by detecting the same detection object (such as a section of pipeline) at different times and under different detection conditions (such as detection device parameters, detection speed, etc.). Different detection times may be affected by environmental factors, equipment state changes, etc., while different detection device parameters (such as magnetization strength, sensor sensitivity, etc.) and detection speed will cause differences in the features of the collected data.

[0023] ​Specifically, after obtaining the magnetic flux leakage detection data set, in order to more accurately and comprehensively analyze the defect situation in the detection object, a multi-feature vector extraction operation can be performed, and then a multi-feature vector set is obtained. The multi-feature vector extraction refers to extracting a plurality of representative features from the original magnetic flux leakage detection data, which can more comprehensively and accurately reflect the situation of the detection object. For example, the extracted features can include signal amplitude features (reflecting the strength of the signal), frequency features (reflecting the speed of signal change), waveform features (such as waveform shape, symmetry, etc.), and the like. The multi-feature vector set includes 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.

[0024] Exemplarily, in the embodiments of the present disclosure, the amplitude feature, the signal gradient feature, and the waveform curvature feature in the magnetic flux leakage detection data are mainly extracted to obtain the multi-feature vector. Referring to FIG. 2, in the multi-feature vector extraction of the magnetic flux leakage detection data set, the following steps S201-S204 can be included: Figure 2 S201, for the first round of magnetic flux leakage detection data, identifying local peak points in the first round of magnetic flux leakage detection data to form a first peak feature vector set; and calculating the signal gradient of the first round of magnetic flux leakage detection data, and identifying gradient mutation points in the first round of magnetic flux leakage detection data whose signal gradient changes exceed a preset gradient threshold to form a first gradient mutation feature vector set; and calculating the curvature of the first round of magnetic flux leakage detection data, and identifying waveform curvature points whose curvature exceeds a preset curvature threshold to form a first curvature feature vector set.

[0025] Specifically, in the magnetic flux leakage detection signal, the local peak point reflects that the strength of the signal at this position reaches a local maximum value, and these points are often closely related to the defect position on the surface of the detection object. For example, when there are cracks or corrosion defects on the surface of the pipeline, the magnetic flux leakage signal will produce obvious peak value changes at the defects. By using a specific algorithm such as the sliding window method, the sizes of adjacent data points in the signal data sequence are compared point by point, and the data points that meet the local maximum value condition are extracted, and these extracted local peak points form the first peak feature vector set.

[0026] In some possible embodiments, the magnetic flux leakage signal can also be traversed , if and , it is recorded as a local peak point, and the arrangement of each local peak point can form a peak feature vector set: .

[0027] ​Meanwhile, the signal gradient represents the rate of change of the signal in space or time, which can reflect the steepness of the signal. In the magnetic flux leakage detection, the change of the signal gradient can be related to the boundary or property change of the defect; for example, when the edge of the defect is detected, the signal gradient will have a significant mutation. Through the numerical differentiation method, 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 the gradient mutation points whose signal gradient changes beyond the threshold are identified, which can constitute the first gradient mutation feature vector set.

[0028] In some possible embodiments, the signal gradient in the magnetic flux leakage detection data can be calculated by the following formula: ; if the absolute difference of the adjacent gradients satisfies: , it is recorded as a gradient mutation point, forming a gradient mutation point set: ; wherein, is a preset gradient threshold.

[0029] Here, the curvature is used to describe the bending degree of the signal waveform. In the magnetic flux leakage signal, the change of the curvature can reflect the abnormal bending of the waveform caused by the defect, for example, a larger curvature value can correspond to a deeper defect or an irregularly shaped defect. The curvature value of the signal at each data point can be calculated by a mathematical formula, and a preset curvature threshold is set to identify the waveform curvature points whose curvature exceeds the threshold, which constitute the first curvature feature vector set.

[0030] In some possible embodiments, the curvature can be calculated by the following formula: ; wherein, represents the curvature at the i-th position, is the magnetic flux leakage signal, is the first derivative of the magnetic flux leakage signal at the i-th position, is the second derivative of the magnetic flux leakage signal at the i-th position.

[0031] If , it can be recorded as a waveform curvature point, ; wherein, represents a preset curvature threshold, represents a threshold coefficient (which can take a value of 1.5 3), represents the mean value of .

[0032] ​​​​S202, constructing the first multi-feature vector based on the first peak feature vector set, the first gradient mutation feature vector set and the first curvature feature vector set.

[0033] 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, i.e. the first multi-feature vector corresponding to the first round of magnetic flux leakage detection data.

[0034] In some possible embodiments, the first multi-dimensional feature vector can be represented as: Among them, to capture the relative change trend of the signal, further optimize the representativeness of the feature vector.

[0035] In some other embodiments, each feature vector can also be weighted and summed according to a certain weight, and the setting of the weight can be determined according to the importance of different features in defect detection. For example, if it is considered that the local peak point is more critical to the indication of the defect position, then a larger weight can be given to the first peak feature vector set. Or, each feature vector can be directly spliced into a longer vector to form a comprehensive vector containing multiple feature information, i.e. the first multi-feature vector.

[0036] S203, for the second round of magnetic flux leakage detection data, identifying the local peak points in the second round of magnetic flux leakage detection data to form the second peak feature vector set; and calculating the signal gradient of the second round of magnetic flux leakage detection data and identifying the gradient mutation points in the second round of magnetic flux leakage detection data whose signal gradient change exceeds a preset gradient threshold to form the second gradient mutation feature vector set; and calculating the curvature of the second round of magnetic flux leakage detection data and identifying the waveform curvature points whose curvature exceeds a preset curvature threshold to form the second curvature feature vector set.

[0037] Here, the feature extraction of the second round of magnetic flux leakage detection data uses the same processing method as the first round of detection data, and the methods and principles of local peak point identification, signal gradient calculation and mutation point identification, curvature calculation and waveform curvature point identification are completely 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 described here. Through the same processing flow, representative multi-feature information can be extracted from the second round of magnetic flux leakage detection data.

[0038] S204, constructing 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.

[0039] ​Here, the multi-feature vector construction of the second round of magnetic flux leakage detection data adopts the same construction method as the first round of detection data, and can refer to step S202 for details, which will not be repeated here.

[0040] In some other embodiments, other features such as frequency domain energy distribution, time domain statistical characteristics, and entropy value characteristics can also be included in the data multi-feature vector extraction, which will not be limited here.

[0041] Exemplarily, in the actual magnetic flux leakage detection process, the detection data of different rounds can be affected by various factors (such as detection equipment state, environmental interference, etc.), resulting in data missing, abnormality, etc., which will affect the accuracy of subsequent state evaluation of the detected object such as a pipeline. 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 also be preprocessed, including the following steps (1) ~ (3): (1) using a local weighted polynomial interpolation method to complete the missing values in the magnetic flux leakage detection data; (2) calculating a multi-feature anomaly index corresponding to each missing completed value, and comparing each multi-feature anomaly index with a dynamic threshold value corresponding to the multi-feature anomaly index and calculated based on a sliding window; (3) when the multi-feature anomaly index exceeds the dynamic threshold value corresponding to the multi-feature anomaly index and calculated based on the sliding window, marking the data point corresponding to the multi-feature anomaly index as an outlier, and replacing and completing the data point using a distance weighted average value of adjacent valid data points.

[0042] It can be understood that the local weighted polynomial interpolation method is a method of selecting a certain number of adjacent points around a data point, fitting these adjacent points using a polynomial, and then estimating the missing value according to the fitting result. For example, in the magnetic flux leakage detection data, the data missing at a certain position is fitted using a polynomial by selecting data points within a certain range around the position, and the data value to be supplemented at the missing position is calculated according to the fitted polynomial.

[0043] In some possible embodiments, when the local weighted polynomial interpolation method is used to complete the missing values in the magnetic flux leakage detection data, a method combining local weighted cubic polynomial interpolation and residual robust correction can be used to calculate the data value to be supplemented at the missing position. Construct a local regression model: ; Where c is the center coordinate of the missing point, the coefficient Solve by weighted least squares: ; Here, the gradient adaptive weight matrix W is designed, and the elements of W are: ; wherein, is the distance weight of the point in the interpolation window, is the maximum distance weight of the point in the interpolation window, is the interpolation decay factor.

[0044] Further introduce the residual correction mechanism, through three iterations optimization, the iteration process is as follows, finally the missing value after the magnetic flux leakage data : ; wherein, represents the interpolation value after the tth iteration, is the residual square, is the robust weight, s is the median of the residual, W is the cubic weight function, is the weight factor.

[0045] Here, after the missing values in the magnetic flux leakage detection data are completed by using the local weighted polynomial interpolation method, further abnormal data recognition and correction work can be carried out on the completed data, so as to improve the overall data quality.

[0046] Specifically, the multi-feature anomaly index corresponding to each missing value can be calculated, and each multi-feature anomaly index is compared with the dynamic threshold corresponding to the multi-feature anomaly index based on the sliding window. The multi-feature anomaly index is an index for measuring the degree of data anomaly, which is calculated by comprehensively considering multiple features (such as signal strength, waveform characteristics, etc.) in the magnetic flux leakage detection data. The sliding window refers to a fixed length interval selected on the data sequence. By statistical analysis (such as calculating the mean and standard deviation) of the data in the window, a threshold value can be determined, and the threshold value is updated constantly with the sliding of the window on the data sequence to adapt to the changes of the data. For example, set the sliding window length to 10 data points, calculate the mean and standard deviation of the data in each window, and take the mean plus a certain multiple of the standard deviation as the dynamic threshold of the window. Then, the calculated multi-feature anomaly index is compared with the dynamic threshold.

[0047] Here, the outlier refers to a data point in the data that is significantly different from the characteristics of most data points, and the adjacent valid data point refers to a data point adjacent to the outlier position and valid data. After the data point is marked as an outlier, the data point can be replaced and completed using the distance weighted average value of the adjacent valid data point. Among them, the distance weighted average value is to determine the weight according to the distance between the adjacent valid data point and the outlier, and the closer the distance, the greater the weight, and then the weighted average value of these adjacent valid data points is calculated to replace the value of the outlier. For example, there are 3 adjacent valid data points around a certain outlier, and according to their distance from the outlier, weights of 0.5, 0.3, and 0.2 are assigned, respectively, and then the weighted average value of the three data points is calculated as the replacement value of the outlier.

[0048] In some possible embodiments, the above-mentioned interpolated magnetic leakage data The multi-feature anomaly index can be constructed based on the following formula , which combines the signal amplitude, gradient and curvature features: ; Among them, and are the mean and standard deviation of the signal amplitude, and are the gradient statistics, and are the curvature statistics, and the weights satisfy .

[0049] Further, a sliding window dynamic threshold can be used to determine outliers: ; Among them, is a safety factor, is a confidence factor, represents the median of the anomaly index of all points in the signal, represents the standard deviation of the anomaly index .

[0050] When , it is marked as an outlier and replaced with the weighted average value of the adjacent valid data, to obtain the preprocessed magnetic leakage data : ; Among them, is the valid data window, is the distance weight.

[0051] S102, generating a first Gaussian pseudo-color image corresponding to the first multi-feature vector, and generating a second Gaussian pseudo-color image corresponding to the second multi-feature vector; and performing defect mileage positioning based on the first Gaussian pseudo-color image and the second Gaussian pseudo-color image to determine a common defect interval.

[0052] Specifically, the Gaussian pseudo-color image is an image obtained by mapping the original data after Gaussian distribution processing to the color space, which can more intuitively show the distribution and characteristics of the data. For example, each feature value in the multi-feature vector can be normalized according to the Gaussian distribution, and then mapped to different colors according to the normalized value to form a pseudo-color image. After generating two Gaussian pseudo-color images, defect mileage positioning can be performed based on them to determine a common defect interval. Defect mileage positioning refers to determining the position information of the defect on the detection object, which is usually represented by parameters such as the length from the starting point of detection. The common defect interval refers to the approximate position range of the defects detected in the two rounds of detection data, which is determined by comparing the regions with similar features in the two Gaussian pseudo-color images.

[0053] In some other embodiments, when generating the Gaussian pseudo-color image corresponding to the multi-feature vector, each feature value in the multi-feature vector F can be normalized according to the Gaussian distribution After being normalized according to the Gaussian distribution: ; A dynamic Gaussian function is designed for each pixel point, and the mean value of the dynamic Gaussian function is the feature value of the pixel point. The local signal peak value is associated: ; The standard deviation is adaptively adjusted by the local variance: ; wherein, is the local window radius, is the peak value coefficient, is the variance coefficient.

[0054] A Gaussian weighted color mapping formula is further designed: ; And a defect enhancement coefficient is introduced to adjust the color contrast: ; ; ; Finally, a Gaussian pseudo-color image is generated: .

[0055] Exemplarily, with reference to Figure 3 As shown in the figure, when locating the defect mileage and determining the common defect interval based on the first and second Gaussian pseudo-color images, the following steps S301-S304 can be included: S301, determining a first abnormal feature region based on the texture feature and energy distribution of the first Gaussian pseudo-color image, and determining a second abnormal feature region based on the texture feature and energy distribution of the second Gaussian pseudo-color image.

[0056] It can be understood that the texture feature reflects the pattern or structure of the local region in the image. For example, in the detection of pipeline defects, the texture features of the normal pipeline surface and the defect site will be significantly different. The normal surface may present a regular and uniform texture, while the defect site may present a broken and irregular texture. The energy distribution refers to the energy size of different regions in the image. The energy can be measured by calculating the statistical quantity of the image pixels (such as the sum of squares of gray values, etc.). In the defect region, due to the abnormal change of the signal, the energy distribution is often different from that of the normal region. For example, in a first Gaussian pseudo-color image of a pipeline, by analyzing the texture feature, it is found that the texture of a certain region presents a chaotic state, which is in sharp contrast with the regular texture around it. At the same time, the energy value of this region is also significantly higher than that of the surrounding region. Therefore, this region can be determined as the first abnormal feature region. Similarly, the second abnormal feature region can be determined by performing similar analysis on the second Gaussian pseudo-color image.

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

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

[0059] Exemplarily, in the above pipeline defect detection scenario, by analyzing the texture features and energy distribution of the first Gaussian pseudo-color image, a first abnormal feature region can be determined, which has a coordinate range of (x1=150, y1=180) to (x2=250, y2=220) in the image. Meanwhile, according to a pre-established mapping relationship between image coordinates and pipeline mileage coordinates: every 10 units of x coordinates in the image correspond to 1 meter of mileage on the pipeline, and every 10 units of y coordinates correspond to 0.5 meters of mileage on the pipeline. Then, according to this mapping relationship, the coordinate range of the first abnormal feature region can be converted into a 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 into account comprehensively, the first defect mileage interval can be determined as a pipeline mileage range covered by extending a certain reference point in the horizontal and vertical directions by a certain distance, for example, the area surrounded by the reference point, 10 meters in the horizontal direction, and 2 meters in the vertical direction corresponds to a pipeline mileage interval.

[0060] S303, determining a second defect mileage interval based on the position of the second abnormal feature region in the second Gaussian pseudo-color image and a pre-established mapping relationship between image coordinates and pipeline mileage coordinates.

[0061] Here, the principle is the same as that of step S302, except that it is directed to the second Gaussian pseudo-color image and the second abnormal feature region. For example, the coordinates of the second abnormal feature region in the second Gaussian pseudo-color image are (x3, y3) to (x4, y4), and through the same pre-established mapping relationship, a corresponding second defect mileage interval can be determined.

[0062] S304, determining the common defect interval by combining the first defect mileage interval and the second defect mileage interval.

[0063] Specifically, since the first Gaussian pseudo-color image and the second Gaussian pseudo-color image can be acquired at different times, different angles, or different detection conditions, the defect mileage intervals determined by them can have certain differences. By combining the two intervals, the common interval of the actual defects on the pipeline can be more accurately determined. For example, the first defect mileage interval is [L1, L2], and the second defect mileage interval is [L3, L4]. By analyzing part of the two intervals or according to certain logical rules (such as taking the intersection or considering detection accuracy and other factors), the final common defect interval can be determined, which can more reliably reflect the actual position range of the defects on the pipeline.

[0064] S103, within the common defect interval, constructing a matching degree function based on the first multi-feature vector and the second multi-feature vector; and calculating an 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.

[0065] It can be understood that the matching degree function is a mathematical function for measuring the similarity between two multi-feature vectors, aiming to find the optimal offset of the second round of magnetic flux leakage detection data (signal B) relative to the first round of magnetic flux leakage detection data (signal A) in the spatial position by quantifying the similarity of the two vectors in the feature level and combining the constraint on the smoothness of the offset change, so as to realize the accurate alignment of the two rounds of detection data, and then more accurately analyze the defect condition of the detected object such as the pipeline. The specific construction process can include the following steps (a)~(c): (a) defining a feature similarity term for quantifying the similarity between the first multi-feature vector and the second multi-feature vector after applying the offset; (b) defining an offset smoothness term for constraining the smoothness of the offset change between consecutive positions, the offset smoothness term including a first smoothness constraint based on the second-order difference of the offset and a second smoothness constraint based on the first-order difference of the offset; (c) combining the feature similarity term and the offset smoothness term to construct the matching degree function.

[0066] Specifically, the feature similarity term reflects the closeness of the two vectors in the feature level. For example, if the two vectors are very close in feature points such as peak points, gradient mutation points and waveform curvature points, the value of the feature similarity term will be larger, indicating that the features of the two rounds of detection data at this position have high similarity. At the same time, in the actual magnetic flux leakage detection process, the offset should not suddenly jump or mutate, otherwise it will lead to inaccurate data alignment. Here, the first smoothness 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 means that the offset has a large jump or mutation at some positions, which will be punished at this time to make the alignment process smoother. The second smoothness constraint calculates the difference of the offset between consecutive positions, and a larger difference will also be punished, so as to ensure that the change of the offset is continuous and smooth.

[0067] In this way, by combining the feature similarity term and the offset smoothness term, the matching degree function constructed can not only consider the similarity of the two rounds of detection data in the feature level, but also ensure the smooth change of the offset in the spatial position, and can more accurately reflect the matching degree between the two rounds of detection data.

[0068] The matching degree function in the present disclosure can be expressed as: ; wherein, represents the offset of signal B (second round magnetic flux leakage detection data) relative to signal A (first round magnetic flux leakage detection data) at the th position; represents the feature similarity term; M, N represent the offset smoothing term.

[0069] Here, the feature similarity term can be calculated by a dynamic weighting coefficient, and its formula can be expressed as: ; wherein, and are dynamic weight coefficients and exponential decay factors, further enhancing the adaptability to different feature types; is the spatial offset of signal B relative to signal A; k = 1, 2, 3: represents three feature dimensions (peak point, gradient mutation point and waveform curvature point) in the feature vectors and ; : represents the difference between the kth feature in the feature vectors and .

[0070] Here, the offset smoothing term can be expressed as: ; ; wherein, the M term represents the first smoothing constraint based on the second-order difference of the offset, which calculates the second-order difference of the offset, i.e. the change between three consecutive points, thereby measuring the smoothness of the offset, and a larger second-order difference value indicates that the offset has a larger jump or mutation at some positions, and the penalty of this term helps to make the alignment process smoother; the N term represents the second smoothing constraint based on the first-order difference of the offset, which calculates the offset difference between consecutive positions, and a larger difference will be penalized, thereby ensuring that the offset changes continuously and smoothly. and are smoothing regularization parameters, which reduce the mutation of the offset and ensure that it changes smoothly 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 degree function can be balanced, thereby obtaining a better matching result.

[0071] In some other embodiments, the matching degree function can also use a cosine similarity function, which is not specifically limited here. The cosine similarity function measures the similarity of two vectors by calculating the cosine value of their angle, and the closer the cosine value is to 1, the more similar the two vectors are.

[0072] ​Specifically, after the matching degree function is constructed, 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 the function. Here, the optimal offset refers to the position offset that makes the matching degree of the two rounds of detection data in the common defect interval the highest, which reflects the optimal adjustment amount of the second round of magnetic flux leakage detection data relative to the first round of magnetic flux leakage detection data in position.

[0073] For example, when the matching degree function is used 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, the following steps S401-S402 can be included: Figure 4 S401. Initialize an offset for each position of the second round of magnetic flux leakage detection data in the common defect interval based on the first round of magnetic flux leakage detection data.

[0074] 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 in the common defect interval, an initial offset is assigned to each of the 100 data points. These initial offsets can be randomly generated values or set according to some prior knowledge. For example, if it is known that the detection equipment may have a general displacement direction and range between two detections, the initial offset can be set within this range.

[0075] S402. Use gradient descent method to iteratively optimize the matching degree function, and when the matching degree function converges or reaches a preset number of iterations, determine the optimal offset.

[0076] Here, the gradient descent method is an algorithm commonly used in machine learning and optimization problems. Its basic principle is to gradually approach the minimum value of the target function by continuously adjusting the parameters along the negative gradient direction of the target function (in this problem, the matching degree function can be converted to a maximum value problem by appropriate transformation, and then the parameters are adjusted along the positive gradient direction). In each iteration process, the algorithm calculates the value of the matching degree function based on the current offset, calculates its gradient, and then adjusts the offset according to the direction and size of the gradient. When the matching degree function converges, i.e., the value of the matching degree function changes by less than a pre-set threshold in consecutive iterations, or reaches a pre-set number of iterations, it is considered that the optimal solution has been found, and the offset is determined as the optimal offset. The pre-set number of iterations is to prevent the algorithm from circulating indefinitely in the case of non-convergence, and to ensure that the calculation process can be completed within a reasonable time.

[0077] ​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 in the common defect interval, and further improve the consistency and accuracy of the two rounds of detection data in describing the defect characteristics, with reference to Figure 5 As shown in FIG. 4, each iteration includes the following steps S4021-S4022: S4021, according to the current offset, the second multi-feature vector is displaced, and the matching degree function value between the displaced second multi-feature vector and the first multi-feature vector is calculated based on the matching degree function.

[0078] Specifically, according to the current offset, the second multi-feature vector is displaced, which actually simulates the adjustment of the second round of detection data relative to the first round of detection data at each position. 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 along the direction of the vector arrangement by the corresponding unit; if the offset is negative, it is moved forward. After completing the displacement operation, the matching degree function value between the displaced second multi-feature vector and the first multi-feature vector can be calculated based on the pre-constructed matching degree function, so as to quantify the similarity of the two rounds of detection data in the common defect interval, and determine whether the description of the defect characteristics by the two rounds of detection data is close under the current offset.

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

[0080] Here, the gradient is a vector that describes the rate and direction of change of the matching degree function at the current offset, and the gradient points to the direction in which the matching degree function grows fastest. By performing the derivation operation on the matching degree function with respect to the offset, the gradient of the matching degree function with respect to the current offset can be obtained. After obtaining the gradient, the offset of the second round of magnetic flux leakage detection data at each position in the common defect interval can be updated according to the gradient.

[0081] Specifically, the process of updating the offset can follow the principle of gradient ascent, that is, adjusting the offset in the positive direction of the gradient, and the adjustment amplitude can be determined by a pre-set learning rate, which controls the step size of the change of the offset in each iteration. By iteratively executing the two steps S4021 and S4022, the offset is gradually adjusted, and the value of the matching degree function is constantly increased, and finally the offset that makes the matching degree function reach the maximum value, that is, the optimal offset, can be found.

[0082] In some possible embodiments, when the matching degree function is iteratively optimized by using the gradient descent method, its expression can be represented as: ; wherein, represents the offset of the second round of magnetic flux leakage detection data relative to the first round of magnetic flux leakage detection data in the common defect interval at the kth iteration, which is a vector, and each element of the vector corresponds to the position offset of the second round of detection data relative to the first round of detection data at the corresponding position in the common defect interval; is the learning rate; represents the gradient of the matching degree function D at the offset at the kth iteration; is the momentum coefficient, which is used to accelerate convergence, so that the update of the offset not only depends on the current gradient, but also considers the direction and amplitude of the change of the offset in the previous iteration.

[0083] S104, 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 to obtain target fusion defect data.

[0084] Here, aligning and fusing means adjusting the two rounds of detection data according to the optimal offset and then merging them together to obtain more accurate and comprehensive defect information. The target fusion defect data integrates the advantages of the two rounds of detection data and can more accurately reflect the defect situation on the detection object, providing a more reliable basis for subsequent defect evaluation, maintenance decision, etc.

[0085] In some possible embodiments, in order to further improve the quality of the target fusion defect data after fusion, with reference to FIG. 6, 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 can be included: Figure 6 S601, performing displacement correction on the second round of magnetic flux leakage detection data according to the optimal offset.

[0086] Here, after obtaining the optimal offset, the second round of magnetic flux leakage detection data can be corrected by displacement according to the optimal offset, so that it corresponds to the first round of magnetic flux leakage detection data in space.

[0087] S602, determining a first weight coefficient according to the noise variance of the first round of magnetic flux leakage detection data; and determining a second weight coefficient according to the noise variance of the second round of magnetic flux leakage detection data.

[0088] ​It can be understood that the noise variance is an important indicator for measuring the noise level of data, which reflects the size of random fluctuations in data. In magnetic flux leakage detection, noise can come from electronic noise of detection equipment, environmental interference and many other factors. The noise level of detection data in different rounds may also differ due to different detection conditions. By calculating the noise variance of two rounds of data and determining the weight coefficient accordingly, the data with smaller noise can be given greater weight in the fusion process, thereby reducing the influence of noise on the fusion result. For example, if the noise variance of the first round of magnetic flux leakage detection data is small, it means that the data quality is relatively high. Therefore, a larger first weight coefficient is given to the first round of magnetic flux leakage detection data in the fusion process, so that it occupies a more important position in the fusion result and improves the accuracy of the data after fusion.

[0089] S603, using the first weight coefficient and the second weight coefficient, performing weighted interpolation calculation on the first round of magnetic flux leakage detection data and the second round of magnetic flux leakage detection data after displacement correction in the common defect interval.

[0090] Specifically, the weighted interpolation calculation is an information fusion method that comprehensively considers two rounds of data and their weights. In the common defect interval, for each position 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, and then the weighted results are interpolated to obtain the fusion value of the position point.

[0091] In this way, the advantages of two rounds of data can be fully utilized, so that the data after fusion can retain useful information of two rounds of data while reducing the influence of noise and errors.

[0092] Here, the specific formula of the above weighted interpolation calculation can be expressed as: ; Among them, and are the first weight coefficient of the first round of magnetic flux leakage detection data (A) and the second weight coefficient of the second round of magnetic flux leakage detection data (B), which are determined according to the noise standard deviation: ; Among them, and 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.

[0093] S604, performing smoothing processing on the weighted interpolation calculation result, and outputting the target fusion defect data.

[0094] It can be understood that, in the weighted interpolation calculation process, due to the discreteness of data and the influence of noise, the fusion result may appear discontinuous or large fluctuation in some positions. Through smoothing processing, such as using moving average, Gaussian filtering and the like, the fused data can be made more smooth, the local fluctuation and abnormal value can be reduced, and thus the quality of the target fusion defect data can be improved.

[0095] In some possible embodiments, the smoothing weighted coefficient and may also be used to reduce the instability of the signal: ; ; wherein, is a small constant to prevent division by zero error.

[0096] Further, 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 fused finally to obtain the final target fusion defect data : .

[0097] The multi-feature fusion-based double-round magnetic flux leakage detection defect alignment method and device provided in the embodiments of the present disclosure can more comprehensively and accurately capture the defect feature information in the magnetic flux leakage detection data by combining the multi-feature vector extraction with the generation of the Gaussian pseudo-color image, meanwhile, the accuracy of the defect mileage positioning is improved by using the intuitive visual characteristics of the Gaussian pseudo-color image, the common defect interval is effectively determined, then the high-precision alignment fusion of the two rounds of magnetic flux leakage detection data is realized by constructing a matching degree function in the common defect interval and calculating the optimal offset, and the target fusion defect data obtained can more truly and accurately reflect the actual defect situation of the pipeline, thereby ensuring the safety and stability of the pipeline operation and reducing the risk of accidents caused by pipeline defects.

[0098] Those skilled in the art can understand that, in the above method of the specific implementation manner, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process, and the specific execution order of each step should be determined according to its function and possible internal logic.

[0099] Based on the same inventive concept, the embodiments of the present disclosure also provide a multi-feature fusion-based double-round magnetic flux leakage detection defect alignment device corresponding to the multi-feature fusion-based double-round magnetic flux leakage detection defect alignment method, since the principle of the device in the embodiments of the present disclosure for solving the problem is similar to the above-mentioned multi-feature fusion-based double-round magnetic flux leakage detection defect alignment method of the embodiments of the present disclosure, the implementation of the device can be referred to the implementation of the method, and the repeated parts will not be described herein.

[0100] Referring to Figure 7 Fig. 7 shows a schematic diagram of a double-wheel magnetic flux leakage detection defect alignment device 700 provided by an embodiment of the present disclosure, the device comprising: a data processing module 701 configured to acquire a magnetic flux leakage detection data set and perform multi-feature vector extraction on the magnetic flux leakage detection data set to obtain a multi-feature vector set; wherein the magnetic flux leakage detection data set comprises first round magnetic flux leakage detection data and second round magnetic flux leakage detection data, and the multi-feature vector set comprises a first multi-feature vector corresponding to the first round magnetic flux leakage detection data and a second multi-feature vector corresponding to the second round magnetic flux leakage detection data; a defect positioning module 702 configured to generate a first Gaussian pseudo-color image corresponding to the first multi-feature vector, generate a second Gaussian pseudo-color image corresponding to the second multi-feature vector, and perform defect mileage positioning based on the first Gaussian pseudo-color image and the second Gaussian pseudo-color image to determine a common defect interval; an offset calculation module 703 configured to, within the common defect interval, construct a matching degree function based on the first multi-feature vector and the second multi-feature vector, and calculate an optimal offset of the second round magnetic flux leakage detection data relative to the first round magnetic flux leakage detection data based on the matching degree function; a data fusion module 704 configured to align and fuse the first round magnetic flux leakage detection data and the second round magnetic flux leakage detection data according to the optimal offset to obtain target fusion defect data.

[0101] In some possible embodiments, the data processing module 701 is specifically configured to: for the first round magnetic flux leakage detection data, identify local peak points in the first round magnetic flux leakage detection data to form a first peak feature vector set, calculate a signal gradient of the first round magnetic flux leakage detection data, identify gradient mutation points in the first round magnetic flux leakage detection data where a signal gradient change exceeds a preset gradient threshold to form a first gradient mutation feature vector set, and calculate a curvature of the first round magnetic flux leakage detection data, identify waveform curvature points where the curvature exceeds a preset curvature threshold to form a first curvature feature vector set; construct the first multi-feature vector based on the first peak feature vector set, the first gradient mutation feature vector set, and the first curvature feature vector set; 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 value feature vector set; a signal gradient of the second round of magnetic flux leakage detection data is calculated, and gradient mutation points in the second round of magnetic flux leakage detection data where the signal gradient changes by more than a preset gradient threshold are identified to form a second gradient mutation feature vector set; and a 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 value feature vector set, the second gradient mutation feature vector set, and the second curvature feature vector set, the second multi-feature vector is constructed.

[0102] In some possible embodiments, the data processing module 701 is further configured to: Preprocess the first round of magnetic flux leakage detection data and the second round of magnetic flux leakage detection data, respectively. The preprocessing includes: The missing values in the magnetic flux leakage detection data are completed by using a local weighted polynomial interpolation method. And, A multi-feature anomaly index corresponding to each missing completed value is calculated, and each multi-feature anomaly index is compared with a dynamic threshold based on a sliding window corresponding to the multi-feature anomaly index. When the multi-feature anomaly index exceeds the dynamic threshold based on the sliding window corresponding to the multi-feature anomaly index, a data point corresponding to the multi-feature anomaly index is marked as an outlier, and the data point is replaced and completed by using a distance weighted average value of adjacent valid data points.

[0103] In some possible embodiments, the defect positioning module 702 is specifically configured to: Determine a first abnormal feature region based on the texture feature and energy distribution of the first Gaussian pseudo-color image, and determine a second abnormal feature region based on the texture feature and energy distribution of the second Gaussian pseudo-color image. Determine a first defect mileage interval based on a position of the first abnormal feature region in the first Gaussian pseudo-color image and a preset mapping relationship between image coordinates and pipeline mileage coordinates. Determine a second defect mileage interval based on a 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. Determine the common defect interval in combination with the first defect mileage interval and the second defect mileage interval.

[0104] In some possible embodiments, the offset calculation module 703 is specifically configured to: define a feature similarity term for quantifying a similarity degree between the first multi-feature vector and the second multi-feature vector after the offset is applied; define an offset smoothing term for constraining a variation smoothness of the offset between consecutive positions, the offset smoothing term including a first smoothing constraint based on a second-order difference of the offset and a second smoothing constraint based on a first-order difference of the offset; combine the feature similarity term and the offset smoothing term to construct the matching degree function.

[0105] In some possible embodiments, the offset calculation module 703 is specifically configured to: initialize an offset for each position within the common defect interval of the second round of magnetic flux leakage detection data based on the first round of magnetic flux leakage detection data; perform iterative optimization on the matching degree function by using a gradient descent method, and determine the optimal offset when the matching degree function converges or reaches a preset number of iterations; wherein each iteration includes: displace the second multi-feature vector according to the current offset, and calculate a matching degree function value between the displaced second multi-feature vector and the first multi-feature vector based on the matching degree function; calculate a gradient of the matching degree function with respect to the current offset, and update the offset for each position within the common defect interval of the second round of magnetic flux leakage detection data according to the gradient.

[0106] In some possible embodiments, the data fusion module 704 is specifically configured to: displace and correct the second round of magnetic flux leakage detection data according to the optimal offset; determine a first weight coefficient according to a noise variance of the first round of magnetic flux leakage detection data, and determine a second weight coefficient according to a noise variance of the second round of magnetic flux leakage detection data; perform weighted interpolation calculation on the first round of magnetic flux leakage detection data and the displaced and corrected second round of magnetic flux leakage detection data within the common defect interval by using the first weight coefficient and the second weight coefficient; perform smoothing processing on the weighted interpolation calculation result, and output the target fusion defect data.

[0107] Based on the same technical concept, the embodiments of the present disclosure further provide a computer device. Refer to Figure 8As shown, a structural schematic diagram of the computer device 800 provided by the embodiments of the present disclosure is shown, including a processor 801, a memory 802, and a bus 803. The memory 802 is used to store execution instructions, including an internal memory 8021 and an external memory 8022; the internal memory 8021 is also called an internal storage, used to temporarily store operation data in the processor 801 and exchange data with the external memory 8022 such as a hard disk, and the processor 801 exchanges data with the external memory 8022 through the internal memory 8021.

[0108] In the embodiments of the present application, the memory 802 is specifically used to store application program codes for executing the schemes of the present application, and is controlled to execute by the processor 801. That is, when the computer device 800 is running, the processor 801 and the memory 802 communicate through the bus 803, so that the processor 801 executes the application program codes stored in the memory 802, and further executes the methods described in any of the foregoing embodiments.

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

[0110] The processor 801 can be an integrated circuit chip with a processing capability of signals. The processor described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; 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, discrete hardware components. The general processor can be a microprocessor or the processor can also be any conventional processor or the like.

[0111] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the computer device 800. In other embodiments of the present application, the computer device 800 can include more or fewer components than those shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0112] The embodiments of the present disclosure also provide a computer readable storage medium, which stores a computer program. When the computer program is run by a processor, the steps of the method for aligning defects in double-wheel magnetic flux leakage detection based on multi-feature fusion described in the above method embodiments are performed. The storage medium can be a volatile or non-volatile computer readable storage medium.

[0113] The embodiments of the present disclosure also provide a computer program product carrying a program code. The program code includes instructions for performing the steps of the method for aligning defects in double-wheel magnetic flux leakage detection based on multi-feature fusion described in the above method embodiments. For details, refer to the above method embodiments, which will not be repeated here.

[0114] The computer program product can be specifically implemented by hardware, software or a combination thereof. In an optional embodiment, the computer program product is specifically embodied as a computer storage medium. In another optional embodiment, the computer program product is specifically embodied as a software product, such as a software development kit (SDK) and the like.

[0115] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system and device can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here. In several embodiments provided by the present disclosure, it should be understood that the disclosed system and method can be implemented by other ways. The device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and actual implementation can be another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some communication interface, device or unit, which can be electrical, mechanical or other forms.

[0116] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e., may be located in one place, or may be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

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

[0118] If the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present disclosure or the part of the prior art that essentially contributes to the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in various embodiments of the present disclosure. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and various program code storage media.

[0119] Finally, it should be noted that: the above-described embodiments are only specific embodiments of the present disclosure, used to illustrate the technical solutions of the present disclosure, and not to limit them, the protection scope of the present disclosure is not limited thereto, although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand: any person skilled in the art within the technical range disclosed by the present disclosure, can still modify or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to part of the technical features; and these modifications, changes or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and all should be covered in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to 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 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. 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.

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 4, characterized in that, The function for constructing the matching degree includes: 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; 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. The matching degree function is constructed by combining the feature similarity term and the offset smoothing term.

6. The method according to claim 5, characterized in that, 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.

7. 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.

8. 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 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. 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.

9. 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 7.

10. 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 7.

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

  • Defect detection method and device for steel wire rope, storage medium, equipment and system

    CN119291015A

  • Anterior mediastinal surgery three-dimensional imaging method and system based on big data

    CN120510314A

Cited By

  • Pipeline magnetic flux leakage defect detection method and system

    CN122109290A