A method and system for quantifying the three-dimensional size of defects detected in a pipeline
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHIYUNAN TECH (BEIJING) CO LTD
- Filing Date
- 2026-05-20
- Publication Date
- 2026-08-07
AI Technical Summary
[0009]针对现有技术的不足,本发明提供一种管道内检测缺陷三维尺寸量化方法及系统,旨在解决现有技术中对管道漏磁内检测数据的多通道信号差异和周向空间关联利用不足,导致缺陷尺寸量化稳定性和准确性不足的问题
通过以上技术方案,本发明的有益效果为:针对管道漏磁内检测数据中不同磁场信号通道的响应差异,对不同磁场信号通道分别进行特征提取,能够避免在原始数据层面直接混合多个通道而削弱不同方向漏磁响应特征的问题;以周向采样位置为基本单元,对每一周向采样位置对应的轴向采样序列进行特征提取,使得到的通道特征向量与管道周向传感器位置保持对应关系,有利于保留缺陷区域在周向上的空间分布信息。
Smart Images

Figure CN122524939A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pipeline non-destructive testing data processing technology, and in particular to a method and system for quantifying the three-dimensional dimensions of defects detected inside pipelines. Background Technology
[0002] During long-term service, oil and gas pipelines are susceptible to corrosion, metal loss, dents, cracks, or combined defects due to factors such as medium corrosion, external environment, manufacturing defects, mechanical damage, and operating pressure fluctuations. These defects weaken the pipeline's pressure-bearing capacity and affect its operational safety. Therefore, in-service pipelines typically require periodic internal inspections, and the defect size and remaining strength are evaluated based on the inspection results.
[0003] Magnetic flux leakage (MFL) internal testing is a commonly used technique in pipeline internal inspection. MFL internal testing typically involves magnetizing the pipe wall using a magnetizing device carried by an internal pipe detector, and then collecting the magnetic flux leakage response generated in the defect area using a sensor array. For metal loss defects, the MFL signal exhibits different response characteristics in the axial, circumferential, and radial directions of the pipe. Parameters such as the axial length, circumferential width, and wall thickness loss rate of the defect will show varying degrees of change in the MFL signal in different directions. Therefore, accurately extracting features related to the defect geometry from MFL internal testing data is crucial for achieving quantitative defect evaluation.
[0004] Existing methods for quantifying pipeline magnetic flux leakage defects mainly include empirical formula methods, machine learning methods based on artificial features, and automatic quantification methods based on neural networks.
[0005] Empirical formula methods typically calculate residual strength based on parameters such as defect length, defect depth, pipe outer diameter, wall thickness, and material strength. This type of method is widely used in engineering evaluation, but it usually relies on manually measured or manually corrected defect size parameters. For complex defects with irregular shapes, unclear boundaries, or multiple adjacent defects influencing each other, manual measurement or traditional feature extraction methods are prone to significant errors, thus affecting the subsequent residual strength evaluation results.
[0006] Machine learning methods based on artificial features typically extract manual features such as peak values, valley values, area, gradient, width, and amplitude ratio from the magnetic flux leakage signal, and then use support vector machines, random forests, regression models, or shallow neural networks to predict defect sizes. While this approach offers some improvement over purely empirical formulas, its feature design relies on expert experience, and manual features often only describe local or overall statistical characteristics, failing to fully express the spatial distribution of defect areas along the pipe's circumference and axial direction. Furthermore, the generalization ability of manual features tends to decrease when detector specifications, pipe diameter, wall thickness, magnetization state, or defect type change.
[0007] Neural network-based methods can automatically learn features from detection data, showing potential application value in defect identification and size quantization. However, some existing methods directly convert magnetic flux leakage data into images before inputting them into convolutional networks, primarily utilizing local texture features for identification or regression; others directly input global features into fully connected or recurrent networks, failing to adequately maintain the one-to-one correspondence between the circumferential sensor arrangement and the magnetic flux leakage response. For magnetic flux leakage detection data, sensors are typically arranged circumferentially along the pipe, and the expansion of defects in the circumferential direction causes continuous or locally continuous changes in the magnetic flux leakage response at adjacent circumferential sampling positions. If this circumferential spatial relationship is not explicitly translated into the model input structure, the model cannot fully utilize the spatial dependence of defects in the circumferential direction.
[0008] Furthermore, magnetic flux leakage (MF) detection data typically includes multiple magnetic field signal channels, such as axial, circumferential, and radial channels. Different magnetic field signal channels respond differently to defect geometry. Directly mixing multiple channels at the raw data level may weaken the physical differences in directional MF leakage responses; conversely, processing each channel independently may fail to generate a comprehensive magnetic response representation at the same circumferential location. Therefore, current technology still requires a defect size quantification scheme that can balance the differences in multi-channel MF leakage responses and the circumferential spatial sequence relationship. Summary of the Invention
[0009] To address the shortcomings of existing technologies, this invention provides a method and system for quantifying the three-dimensional dimensions of defects detected inside pipelines. The aim is to solve the problem of insufficient utilization of multi-channel signal differences and circumferential spatial correlation in pipeline magnetic flux leakage detection data, which leads to insufficient stability and accuracy in defect size quantification.
[0010] To achieve the above objectives, this application provides the following solution: In a first aspect, this application provides a method for quantifying the three-dimensional dimensions of defects detected inside a pipeline, including acquiring pipeline magnetic flux leakage detection data, wherein the pipeline magnetic flux leakage detection data includes multiple magnetic field signal channels; Based on the location information of the defect area, a defect data block covering the defect area is extracted from the pipeline magnetic flux leakage detection data. The defect data block includes multiple circumferential sampling positions and multiple axial sampling points. Feature extraction is performed on the data of different magnetic field signal channels in the defect data block to obtain channel feature vectors corresponding to each circumferential sampling position; The channel feature vectors corresponding to different magnetic field signal channels at the same circumferential sampling position are fused to obtain the fused feature vectors corresponding to each circumferential sampling position. According to the arrangement order of each circumferential sampling position in the circumferential direction of the pipe, the multiple fused feature vectors are combined to form a circumferential sequence feature; The circumferential sequence features are input into a gated recurrent unit network, and the feature correlation between adjacent circumferential sampling positions is modeled through the gated recurrent unit network to output the defect size quantification result.
[0011] Secondly, this application provides a pipeline magnetic flux leakage internal detection defect size quantification system, including a data acquisition module for acquiring pipeline magnetic flux leakage internal detection data, wherein the pipeline magnetic flux leakage internal detection data includes multiple magnetic field signal channels; The defect data block extraction module is used to extract a defect data block covering the defect area from the pipeline magnetic flux leakage detection data based on the location information of the defect area. The defect data block includes multiple circumferential sampling positions and multiple axial sampling points. The channel feature extraction module is used to extract features from the data of different magnetic field signal channels in the defect data block to obtain channel feature vectors corresponding to each circumferential sampling position. The circumferential feature fusion module is used to fuse the channel feature vectors corresponding to different magnetic field signal channels at the same circumferential sampling position to obtain the fused feature vectors corresponding to each circumferential sampling position, and to form a circumferential sequence feature according to the arrangement order of each circumferential sampling position in the circumferential direction of the pipe. The defect size quantization module is used to input the circumferential sequence features into a gated recurrent unit network (GRN), model the feature correlation between adjacent circumferential sampling positions through the GRN, and output the defect size quantization result. Through the above technical solutions, the beneficial effects of the present invention are as follows: In view of the response differences of different magnetic field signal channels in the pipeline leakage magnetic field detection data, feature extraction is performed on different magnetic field signal channels separately, which can avoid the problem of directly mixing multiple channels at the original data level and weakening the leakage magnetic field response characteristics in different directions; Taking the circumferential sampling position as the basic unit, feature extraction is performed on the axial sampling sequence corresponding to each circumferential sampling position, so that the obtained channel feature vector maintains a correspondence with the circumferential sensor position of the pipeline, which is beneficial to retain the spatial distribution information of the defect area in the circumferential direction. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention, and the embodiments in the accompanying drawings do not constitute any limitation on the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A flowchart illustrating a method for quantifying the three-dimensional dimensions of defects detected inside a pipeline, as provided in an embodiment of this application; Figure 2 A schematic diagram illustrating feature extraction and stitching according to an embodiment of this application; Figure 3 A schematic diagram of GRU network quantization prediction provided in an embodiment of this application; Figure 4 This is a structural diagram of a GRU network provided in an embodiment of this application; Figure 5 This is an architecture diagram of a three-dimensional dimensional quantification system for detecting defects inside a pipeline provided in an embodiment of this application; Figure 6 A model training accuracy curve provided in an embodiment of this application; Figure 7 This is a structural diagram of a three-dimensional dimensional quantification system for detecting defects inside a pipeline provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of a computer device provided in one embodiment of this application; The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0014] It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of the application. Rather, these embodiments are provided to make the disclosure more thorough and complete, and to fully convey the scope of the disclosure to those skilled in the art.
[0015] The foregoing and other technical contents, features and effects of the present invention are described in conjunction with the appendix below. Figure 1 The detailed description of the eight embodiments will clearly demonstrate this. All structural details mentioned in the following embodiments are based on the accompanying drawings.
[0016] Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings.
[0017] In one exemplary embodiment, such as Figure 1 As shown, a method for quantifying the three-dimensional dimensions of defects detected inside a pipeline is provided. The method includes: S101, acquire pipeline magnetic flux leakage detection data, the pipeline magnetic flux leakage detection data includes multiple magnetic field signal channels; S102, based on the location information of the defect area, extract a defect data block covering the defect area from the pipeline magnetic flux leakage detection data. The defect data block includes multiple circumferential sampling positions and multiple axial sampling points. S103, feature extraction is performed on the data of different magnetic field signal channels in the defect data block to obtain channel feature vectors corresponding to each circumferential sampling position; S104, fuse the channel feature vectors corresponding to different magnetic field signal channels at the same circumferential sampling position to obtain the fused feature vectors corresponding to each circumferential sampling position; S105, according to the arrangement order of each circumferential sampling position in the circumferential direction of the pipe, the multiple fused feature vectors are combined into a circumferential sequence feature; S106, the circumferential sequence features are input into a gated recurrent unit network, and the feature correlation between adjacent circumferential sampling positions is modeled through the gated recurrent unit network to output the defect size quantification result.
[0018] For step S101, the pipeline leakage magnetic field detection data can be collected by an in-pipe detector, which may include a magnetizing device, a sensor array, a mileage recording unit, a data acquisition unit, and a data storage unit. During the detection process, the magnetizing device magnetizes the pipe wall, and the sensor array is arranged along the circumference of the pipeline and continuously collects leakage magnetic field signals as the detector moves along the axial direction of the pipeline.
[0019] Multiple magnetic field signal channels may include an axial magnetic field signal channel, a circumferential magnetic field signal channel, and a radial magnetic field signal channel. The axial magnetic field signal channel is used to characterize the magnetic flux leakage response along the axial direction of the pipe, the circumferential magnetic field signal channel is used to characterize the magnetic flux leakage response along the circumferential direction of the pipe, and the radial magnetic field signal channel is used to characterize the magnetic flux leakage response along the radial direction of the pipe.
[0020] The magnetic flux leakage detection data of a pipeline can be represented as: D = {D_A, D_C, D_R}. Here, D_A represents the data from the axial magnetic field signal channel, D_C represents the data from the circumferential magnetic field signal channel, and D_R represents the data from the radial magnetic field signal channel. The data from each magnetic field signal channel can be represented as a two-dimensional signal matrix. One dimension of this matrix corresponds to the circumferential sampling position of the pipeline, and the other dimension corresponds to the axial sampling point of the pipeline.
[0021] It should be noted that the "circumferential sampling position" in this embodiment can correspond to the position of the sensor arranged circumferentially on the detector inside the pipeline, or it can correspond to the circumferential position obtained by interpolation or resampling of the circumferential sensor sampling data.
[0022] For step S102, the location information of the defect area can be provided by the upstream defect detection module, or by existing defect identification algorithms, manual annotation results, or detection report data. The location information of the defect area may include the axial start position, axial end position, circumferential start position, and circumferential end position of the defect area.
[0023] For example, the circumferential start and end positions of the defect region are denoted as c1 and c2, respectively, and the axial start and end positions of the defect region are denoted as s1 and s2, respectively. Based on the location information of the defect region, the defect center can be determined, and then a data block covering the defect region is extracted using the defect center as a reference. The defect center includes a circumferential center c0 and an axial center s0, where: c0 = (c1 + c2) / 2; s0 = (s1 + s2) / 2. After determining the defect center, a preset number of circumferential sampling positions are selected along the circumference of the pipe using the circumferential center c0 as a reference; and a preset number of axial sampling points are selected along the axial direction of the pipe using the axial center s0 as a reference, thereby forming the defect data block.
[0024] The defect data block includes multiple magnetic field signal channels, multiple circumferential sampling positions, and multiple axial sampling points. This defect data block can be represented as a three-dimensional data structure, with one dimension corresponding to the magnetic field signal channels, one dimension corresponding to the circumferential sampling positions, and one dimension corresponding to the axial sampling points.
[0025] In one specific embodiment, the defect data block includes 3 magnetic field signal channels, 35 circumferential sampling positions, and 200 axial sampling points, which can be represented as: X∈R^(3×35×200). Here, 3 represents the axial magnetic field signal channel, the circumferential magnetic field signal channel, and the radial magnetic field signal channel; 35 represents the number of circumferential sampling positions; and 200 represents the number of axial sampling points. The 35 circumferential sampling positions and 200 axial sampling points are a preferred embodiment. In other embodiments, the number of circumferential sampling positions and the number of axial sampling points can be adjusted according to the number of detector sensors, the circumferential sensor spacing, the axial sampling interval, the pipe diameter, the defect size range, and the model input requirements.
[0026] When the defective area is close to the boundary of the data to be processed, resulting in the number of sampling points in the circumferential or axial direction being less than the preset number, boundary value filling, zero value filling, mirror filling, or adjacent valid sampling value filling can be used to make up the difference.
[0027] In step S103, for each magnetic field signal channel, its own leakage magnetic response characteristics are preserved, and feature extraction is performed separately. That is, the axial magnetic field signal channel, circumferential magnetic field signal channel, and radial magnetic field signal channel are not directly mixed at the original data level, but feature encoding is performed separately.
[0028] For any magnetic field signal channel m, the data of this channel in the defect data block can be represented as: X_m∈R^(N×L). Here, N represents the number of circumferential sampling positions, and L represents the number of axial sampling points. For the i-th circumferential sampling position, the corresponding axial sampling sequence for the magnetic field signal channel m can be represented as: x_m,i=[x_m,i,1,x_m,i,2,…,x_m,i,L]. Inputting this axial sampling sequence into the feature extractor yields the channel feature vector corresponding to the circumferential sampling position: f_m,i=F_m(x_m,i). Here, F_m represents the feature extractor corresponding to the magnetic field signal channel m, and f_m,i represents the channel feature vector of the magnetic field signal channel m at the i-th circumferential sampling position.
[0029] like Figure 2 As shown, in one specific embodiment, N is 35 and L is 200. For the axial magnetic field signal channel A, the circumferential magnetic field signal channel C, and the radial magnetic field signal channel R, we obtain: X_A∈R^(35×200); X_C∈R^(35×200); X_R∈R^(35×200).
[0030] After feature extraction from the 200-point axial sampling sequence corresponding to the 35 circumferential sampling positions in each channel, a 35×10 channel feature matrix is obtained for each channel: F_A∈R^(35×10); F_C∈R^(35×10); F_R∈R^(35×10). Here, 10 represents the dimension of the channel feature vector corresponding to each circumferential sampling position.
[0031] The feature extractor can be a deep learning-based encoder model or a feature encoding network including convolutional layers, pooling layers, and fully connected layers. In one implementation, the feature extractor includes a one-dimensional convolutional layer, pooling layer, fully connected layer, and activation layer, used to map the axial sampling sequence corresponding to each circumferential sampling position into a channel feature vector of a preset dimension.
[0032] The channel feature vector can be used to characterize at least one signal characteristic among amplitude characteristics, area characteristics, background value characteristics, effective response range characteristics, and morphological proportion characteristics. Specifically, the channel feature vector can be used to characterize signal characteristics such as leakage magnetic response peak value, response amplitude range, response curve area, background magnetic field level, number of effective response points, ratio of response area to width, radial response length, radial response height, or circumferential effective response range.
[0033] It should be noted that when using a deep learning encoder as a feature extractor, the channel feature vector can be a low-dimensional feature representation obtained by the model learning. It does not have to strictly correspond to a single artificial physical feature, as long as the channel feature vector can characterize at least one of the above-mentioned leakage magnetic response characteristics.
[0034] In step S104, multi-channel feature fusion does not mix features from different circumferential positions, but rather fuses the channel feature vectors corresponding to different magnetic field signal channels at the same circumferential sampling position. This maintains the one-to-one correspondence between the circumferential sampling position and the physical position of the sensor.
[0035] In one specific implementation, the fusion method is feature dimension concatenation. For the i-th circumferential sampling position, the channel feature vectors corresponding to the axial magnetic field signal channel, the circumferential magnetic field signal channel, and the radial magnetic field signal channel are f_A,i, f_C,i, and f_R,i, respectively. Then, the fused feature vector corresponding to the i-th circumferential sampling position is: g_i = concat(f_A,i, f_C,i, f_R,i). Here, concat represents the concatenation operation along the feature dimension.
[0036] If f_A,i, f_C,i, and f_R,i are all 10-dimensional vectors, then the fused feature vector g_i is a 30-dimensional vector. Through the above fusion method, each fused feature vector g_i corresponds to a circumferential sampling position and simultaneously contains the leakage magnetic response characteristics in the axial, circumferential, and radial directions at that circumferential sampling position.
[0037] For step S105, in this embodiment, the circumferential sequence feature can be represented as: G = [g_1, g_2, ..., g_N]. Where N represents the number of circumferential sampling positions. Each fused feature vector is arranged sequentially according to the physical arrangement order of its corresponding circumferential sampling position in the pipe circumference. In a specific embodiment, N is 35, and each fused feature vector is 30-dimensional, then the circumferential sequence feature can be represented as: G ∈ R^(35 × 30).
[0038] It should be noted that the circumferential sequence features in this embodiment are not time series, but rather spatial sequences constructed according to the physical arrangement order of the circumferential sensor array or circumferential sampling positions of the pipeline. Each sequence step in the circumferential sequence features corresponds to a circumferential sampling position, and the input of each sequence step is the fused feature vector corresponding to that circumferential sampling position. By constructing the above circumferential sequence features, the spatial arrangement relationship of the pipeline circumferential sensor array can be transformed into a sequence input structure that can be processed by a gated recurrent unit network.
[0039] For step S106, the input to the gated recurrent unit network is the circumferential sequence feature G. For the t-th sequence step, its input is the fused feature vector g_t corresponding to the t-th circumferential sampling position. Since the sequence step corresponds to the circumferential sampling position, the gated recurrent unit network models the spatial correlation between adjacent circumferential sampling positions, rather than the ordinary time series correlation.
[0040] In one specific implementation, the gated recurrent unit network includes multiple GRU layers connected in sequence. At least one preceding GRU layer outputs a complete sequence, and the final GRU layer outputs a hidden state for defect size regression. The hidden state is mapped to the defect size quantization result via a fully connected layer.
[0041] For example, a gated recurrent unit (GRU) network can include three GRU layers, each containing 128 GRU units. The first and second GRU layers output the complete sequence, while the third GRU layer outputs the hidden state of the last sequence step. This hidden state is then mapped by a fully connected layer to output the defect size quantization result.
[0042] The defect size quantification results include at least one of the following: defect wall thickness loss rate, defect axial length, and defect circumferential width.
[0043] In one implementation, three gated recurrent unit network models can be trained separately to output the defect wall thickness loss rate, defect axial length, and defect circumferential width, respectively. In this case, each gated recurrent unit network model can employ a single-output fully connected layer.
[0044] In another implementation, a shared feature extractor and a shared GRU backbone network can be used, with multiple output branches to output the defect wall thickness loss rate, defect axial length, and defect circumferential width, respectively. This multi-output-branch implementation is an optional implementation and can be determined based on the actual training data and deployment requirements.
[0045] It is readily apparent that, compared to existing technologies, this application can convert the circumferentially arranged sensor responses in pipeline magnetic flux leakage detection data into circumferential sequence features, and establish a correspondence between each circumferential sequence step and a circumferential sampling position. Compared to directly inputting the raw multi-channel data into a neural network, this invention first extracts features from different magnetic field signal channels separately, and then fuses multi-channel features at the same circumferential position. This helps maintain the physical differences in magnetic flux leakage responses in different directions and the correspondence between circumferential sampling positions. Simultaneously, the gated recurrent unit network can model the feature correlation between adjacent circumferential sampling positions along the circumferential sequence direction, enabling the model to utilize the continuous or locally continuous response characteristics of defects in the circumferential direction, thereby improving the stability of size quantification for irregular corrosion defects, complex metal loss defects, or composite defects. The defect size quantification results in this embodiment can be directly used for subsequent usability evaluation, thereby reducing manual feature processing and manual size correction steps, and achieving automated connection from magnetic flux leakage detection data to defect engineering evaluation parameters.
[0046] In one specific embodiment, the plurality of magnetic field signal channels include an axial magnetic field signal channel, a circumferential magnetic field signal channel, and a radial magnetic field signal channel; Before extracting the defect data block covering the defect area, the pipeline magnetic flux leakage detection data is preprocessed, including at least one of time alignment, circumferential weld alignment, and abnormal jump point repair.
[0047] Time Alignment: Due to potential sampling delays or synchronization deviations between different magnetic field signal channels or sensors, direct subsequent processing can lead to shifts in the response positions of the same defect across different channels. Therefore, time alignment can be performed on multiple magnetic field signal channels. In one implementation, time alignment can be based on sampling timestamps, mileage wheel pulses, or detector operating speed. Specifically, the sampling points of each magnetic field signal channel can be mapped to a unified axial mileage coordinate system, ensuring data from different channels at the same mileage position correspond to each other. In another implementation, one magnetic field signal channel can be selected as a reference channel. The correlation between other magnetic field signal channels and the reference channel is calculated to determine the sampling offset, and the other magnetic field signal channels are then shifted or interpolated to align based on the sampling offset.
[0048] Circumferential weld alignment: Circumferential welds in pipelines typically exhibit continuous or near-continuous response characteristics along the circumference in magnetic flux leakage (MFL) detection data. Therefore, the circumferential weld response can be used as a spatial calibration benchmark to align circumferential welds across different detection segments or channels. In one implementation, the circumferential weld position can be identified based on abrupt amplitude changes, gradient variations, or continuous circumferential response characteristics of the MFL signal. The identified circumferential weld position is then used as a reference mileage point, and the axial coordinates of the detection data are corrected. Circumferential weld alignment can reduce the impact of mileage errors on defect data block truncation.
[0049] In one specific embodiment, the abnormal transition point repair includes: Calculate the signal difference between adjacent axial sampling points and / or between adjacent circumferential sampling positions; Sampling points where the signal difference value exceeds a preset difference threshold are identified as abnormal transition points; The abnormal transition point is replaced or interpolated and repaired based on the normal sampling points adjacent to it.
[0050] In one implementation, the signal difference between adjacent axial sampling points and / or between adjacent circumferential sampling positions is calculated; sampling points whose signal difference exceeds a preset difference threshold are identified as abnormal transition points; and the abnormal transition points are replaced or interpolated and repaired based on the normal sampling points adjacent to the abnormal transition points.
[0051] For example, for data from a specific magnetic field signal channel, the difference between adjacent sampling points can be calculated along the axial direction: Δx_j = |x_j - x_{j-1}|. When Δx_j is greater than a preset difference threshold T, sampling point x_j is identified as an abnormal jump point. The preset difference threshold T can be a fixed threshold or determined based on the statistical characteristics of the data to be processed. For example, it can be determined based on the mean μ and standard deviation σ of the difference values in the non-defect background area: T = μ + kσ. Here, k is a threshold coefficient, which can be set according to the data noise level. After identifying the abnormal jump point, it can be replaced by the mean of adjacent normal sampling points, or it can be repaired using linear interpolation, median filtering, or local window smoothing.
[0052] In one specific embodiment, based on the location information of the defect area, a defect data block covering the defect area is extracted from the pipeline magnetic flux leakage detection data, including: The defect center is determined based on the axial and circumferential start and end positions of the defect region. Using the defect center as a reference, a preset number of circumferential sampling positions are selected in the circumferential direction of the pipeline, and a preset number of axial sampling points are selected in the axial direction of the pipeline to form the defect data block.
[0053] The circumferential start and end positions of the defect region are c1 and c2, and the axial start and end positions are s1 and s2. Therefore, the defect center can be represented as: c0 = (c1 + c2) / 2; s0 = (s1 + s2) / 2. Using c0 as the center, 35 consecutive circumferential sampling positions are selected; using s0 as the center, 200 consecutive axial sampling points are selected. For the axial, circumferential, and radial magnetic field signal channels, corresponding data are extracted to form a 3×35×200 defect data block.
[0054] The 35 circumferential sampling positions selected in the circumferential direction can be selected from the circumferential sampling position corresponding to the defect center, with a preset number of circumferential sampling positions selected on both sides. The 200 axial sampling points selected in the axial direction can be selected from the axial center of the defect, with a preset number of axial sampling points selected in front of and behind.
[0055] It should be noted that the sensor positions are arranged in a closed loop along the circumferential direction of the pipeline. Therefore, when selecting circumferential sampling positions based on the defect center, if the selection range crosses the circumferential number boundary, the selection can be performed cyclically according to the circumferential loop number.
[0056] In one specific embodiment, the defect data block includes 3 magnetic field signal channels, 35 circumferential sampling positions, and 200 axial sampling points.
[0057] In one specific embodiment, feature extraction is performed on the data of different magnetic field signal channels in the defect data block to obtain channel feature vectors corresponding to each circumferential sampling position, including: For each magnetic field signal channel, the axial sampling sequence corresponding to each circumferential sampling position in the magnetic field signal channel is input into the feature extractor to obtain the channel feature vector corresponding to the circumferential sampling position; The channel feature vector includes at least one of amplitude feature, area feature, background value feature, effective response range feature, and shape proportion feature.
[0058] The defect data block is 3×35×200. For any magnetic field signal channel, there are 35 circumferential sampling positions, and each circumferential sampling position corresponds to 200 axial sampling points. The 200-point axial sampling sequence corresponding to each circumferential sampling position is input into the feature extractor, which outputs a 10-dimensional channel feature vector corresponding to that circumferential sampling position. Thus, for one magnetic field signal channel, a 35×10 channel feature matrix can be obtained. For three magnetic field signal channels, three 35×10 channel feature matrices can be obtained respectively.
[0059] In one implementation, the feature extractor can be a pre-trained encoder model. This encoder model may include convolutional layers, pooling layers, fully connected layers, and activation layers for extracting magnetic flux leakage response features from an axially sampled sequence.
[0060] In one alternative implementation, the feature extractor can extract or characterize at least one of the following signal characteristics from the input axial sampling sequence: amplitude features, used to characterize the peak, valley, or peak-valley difference of the leakage magnetic response; area features, used to characterize the integral area of the leakage magnetic response curve relative to the background value; background value features, used to characterize the local background magnetic field level; effective response range features, used to characterize the range of sampling points exceeding a preset threshold or the number of effective response points; and morphological proportion features, used to characterize the proportional relationship between the response area and the response width.
[0061] In another implementation, the channel feature vectors output by the feature extractor can be implicit feature representations automatically learned by a deep learning model, used to characterize the aforementioned signal properties, without requiring each feature dimension to correspond to a manually defined physical quantity. This approach is compatible with both "deep learning feature extractor output features" and "physically interpretable features" implementations.
[0062] In one specific embodiment, the channel feature vectors corresponding to different magnetic field signal channels at the same circumferential sampling position are fused, including: The channel feature vectors corresponding to the axial magnetic field signal channel, circumferential magnetic field signal channel and radial magnetic field signal channel at the same circumferential sampling position are concatenated in the feature dimension to obtain the fused feature vector corresponding to the circumferential sampling position. In this context, each sequence step in the circumferential sequence features corresponds to a circumferential sampling position, and the input of each sequence step is the fused feature vector corresponding to that circumferential sampling position.
[0063] For example, for the i-th circumferential sampling position, the channel feature vector corresponding to the axial magnetic field signal channel is f_A,i, the channel feature vector corresponding to the circumferential magnetic field signal channel is f_C,i, and the channel feature vector corresponding to the radial magnetic field signal channel is f_R,i. Then the fused feature vector corresponding to this circumferential sampling position is: g_i=concat(f_A,i, f_C,i, f_R,i).
[0064] When f_A,i, f_C,i, and f_R,i are all 10-dimensional vectors, g_i is a 30-dimensional vector. According to the arrangement order of each circumferential sampling position in the circumferential direction of the pipeline, multiple fused feature vectors are combined to form a circumferential sequence feature: G=[g_1, g_2, ..., g_35].
[0065] In this embodiment, the circumferential sequence feature G can be represented as a 35×30 two-dimensional feature matrix. Here, 35 represents the sequence length, corresponding to 35 circumferential sampling positions; 30 represents the input feature dimension of each sequence step, corresponding to the feature concatenation result of the three magnetic field signal channels at the same circumferential sampling position. Each sequence step in the circumferential sequence feature corresponds to a circumferential sampling position, and the input of each sequence step is the fused feature vector corresponding to that circumferential sampling position. In this way, the response features of different magnetic field signal channels are fused at the same circumferential sampling position, while preserving the arrangement order of the circumferential sampling positions, enabling the gated recurrent unit network to model the spatial correlation between adjacent sampling positions along the circumferential direction.
[0066] In one specific embodiment, the gated recurrent unit network includes multiple GRU layers connected in sequence; At least one pre-stage GRU layer outputs the complete sequence, and the final GRU layer outputs the hidden state used for defect size regression. The hidden state is mapped to the defect size quantization result through a fully connected layer; The defect size quantification results include at least one of the following: defect wall thickness loss rate, defect axial length, and defect circumferential width.
[0067] like Figure 3 and Figure 4As shown, a 35×30 feature matrix is input into a three-layer GRU network; the gated recurrent unit network consists of three GRU layers, each containing 128 GRU units. The gating mechanism of the GRU units is as follows: Update gate: z_t = σ(W_z · [h_{t-1}, x_t] + b_z); Reset gate: r_t = σ(W_r · [h_{t-1}, x_t] + b_r); Candidate hidden state: _t = tanh(W_h · [r_t ⊙ h_{t-1}, x_t] + b_h); Final hidden state: h_t = (1 - z_t) ⊙ h_{t-1} + z_t ⊙ _t; Where x_t is the input vector at time t (30-dimensional), h_t is the hidden state at time t (128-dimensional), W_z / W_r / W_h is the weight matrix, b_z / b_r / b_h is the bias vector, σ is the sigmoid activation function, and ⊙ is the element-wise multiplication.
[0068] The first and second GRU layers are set to return_sequences=true to output the complete sequence. The third GRU layer is set to return_sequences=false to output only the hidden state of the last sequence step.
[0069] For an input 35×30 circumferential sequence feature, the first GRU layer receives 35 sequence steps, with each sequence step inputting a 30-dimensional fused feature vector. The first GRU layer outputs a sequence of hidden states corresponding to the 35 sequence steps. The second GRU layer receives the hidden state sequence output from the first GRU layer and continues to output a complete hidden state sequence. The third GRU layer receives the hidden state sequence output from the second GRU layer and outputs the final hidden state.
[0070] The output of the third-layer GRU (a 128-dimensional vector) is mapped by the fully connected layer Dense(1) to obtain the quantized predicted value of the defect. This final hidden state is then mapped by the fully connected layer to the quantized result of the defect size. The fully connected layer can be a linear output layer. When the predicted object is a single size parameter, the fully connected layer can output a single value; when the predicted object is multiple size parameters, the fully connected layer can output multiple values, or multiple output branches can be set to output different size parameters respectively.
[0071] In one implementation, three models are trained to output: defect wall thickness loss rate (wt), the ratio of defect depth to pipe wall thickness, defect axial length, and defect circumferential width, respectively.
[0072] In another implementation, a shared GRU backbone and multiple output branches are used to simultaneously output the defect wall thickness loss rate, defect axial length, and defect circumferential width. This approach can utilize the correlation between multiple dimensional parameters, but the optimal approach needs to be determined based on the training samples and the actual model implementation.
[0073] In this embodiment, the sequence steps in the gated cyclic unit network correspond to the circumferential sampling positions. Since adjacent circumferential sampling positions are physically adjacent, the leakage magnetic response of corrosion defects or metal loss defects in the circumferential direction usually exhibits continuous or locally continuous changes. Therefore, the gated cyclic unit network can model the feature correlation between adjacent circumferential sampling positions through a gating mechanism.
[0074] In one specific embodiment, the normalized quantization result output by the gated loop unit network is denormalized to obtain the defect size with physical dimensions. The defect size with physical dimensions is input into the evaluation module to calculate the pipeline's remaining strength parameters and / or failure evaluation parameters.
[0075] The denormalization process can be performed using the following formula: x_original = x_norm × (x_max - x_min) + x_min. Here, x_norm represents the normalized quantization result of the gated recurrent unit network output, x_original represents the denormalized defect size, and x_max and x_min represent the maximum and minimum values of the target variable recorded during the training phase, respectively.
[0076] When the defect size quantification result is the wall thickness loss rate, inverse normalization yields the ratio of defect depth to pipe wall thickness. To obtain the defect depth, it can be calculated based on the pipe wall thickness: d = wt × T. Here, d represents the defect depth, wt represents the wall thickness loss rate, and T represents the pipe wall thickness.
[0077] After obtaining the defect size with physical dimensions, the defect size is input into the evaluation module to calculate the pipeline's remaining strength parameters and / or failure evaluation parameters.
[0078] The evaluation module can accept the following parameters: defect wall thickness loss rate or defect depth; defect axial length; defect circumferential width; pipe outer diameter; pipe wall thickness; pipe material strength; maximum allowable operating pressure; and other parameters required by the evaluation criteria.
[0079] The evaluation module can calculate residual strength parameters, allowable pressure, failure evaluation parameters, or defect levels based on preset evaluation methods. For example, ASME B31G, DNV RP-F101, SY / T 6151, or other pipeline corrosion defect evaluation methods can be used.
[0080] It should be noted that existing evaluation standards can be used for the evaluation module. The key improvement of this invention lies in the aforementioned process of obtaining the quantitative results of defect size based on the pipeline leakage magnetic flux detection data.
[0081] In one specific embodiment, the training method for the three-layer GRU network includes: Dataset construction: Collect MFL detection data containing defects of known sizes as training samples; each sample contains a 3×35×200 MFL data block and the corresponding real defect size label; the dataset is divided into training set and test set in a 9:1 ratio.
[0082] Data augmentation: Group samples of the same defect type to ensure a balanced distribution of all types of defects in the dataset; increase the number of samples by using a sliding window for cropping.
[0083] Model training: Loss function: Mean absolute error (MAE) is used as the loss function; Optimizer: Adam optimizer is used; Batch size: 128; Number of training epochs: 150 epochs; Model saving: Save the model weights with the minimum MAE on the validation set.
[0084] Model evaluation: Evaluate the model accuracy on the test set; record metrics such as MAE (mean absolute error) and MAE_95% (95th percentile error).
[0085] Compared with existing technologies, this invention has the following advantages: It employs a three-layer GRU network to model the spatial sequence characteristics of MFL signals, achieving a MAE of only 0.0326 (i.e., 3.26% wall thickness) and a 95th percentile error of 0.0988 (i.e., 9.88% wall thickness) on the test set for wall thickness loss rate prediction, significantly outperforming traditional methods. A pre-trained feature extractor extracts 10-dimensional physical features (defect width, height, area, etc.) from the MFL signal, combined with GRU network modeling of spatial sequence dependencies, balancing physical interpretability and deep learning expressive power, adapting to pipes of different diameters, wall thicknesses, and materials. A single model simultaneously predicts the length, width, and wall thickness loss rate of defects, ensuring consistency and coordination of three-dimensional dimensions. The entire process from raw MFL data to defect quantification results is automated, reducing manual intervention and improving detection efficiency. It has strong engineering applicability: the quantification results can be directly input into various international / domestic standard compliance evaluation modules, outputting engineering-usable defect level classifications.
[0086] In one exemplary embodiment, the model structure parameters, training method, evaluation ensemble, application examples, and computational complexity of the method for quantifying the size of defects detected by magnetic flux leakage in pipelines are described. The specific hardware, software environment, model parameters, and experimental results in this embodiment are merely exemplary implementations and are not intended to limit the scope of protection of this invention.
[0087] In this embodiment, the pipeline magnetic flux leakage internal detection defect size quantification method can be deployed in, for example, Figure 5 The system architecture shown includes a data preprocessing module, a defect data block extraction module, a channel feature extraction module, a circumferential feature fusion module, a defect size quantization module, and a usability evaluation module. The raw pipeline magnetic flux leakage detection data is aligned, anomaly jump point repaired, and normalized by the data preprocessing module. The defect data block extraction module then extracts defect data blocks covering the defect area. The channel feature extraction module extracts channel feature vectors from different magnetic field signal channels within the defect data blocks. The circumferential feature fusion module concatenates the channel feature vectors corresponding to different magnetic field signal channels at the same circumferential sampling location to obtain a circumferential sequence feature. The defect size quantization module inputs the circumferential sequence feature into a gated recurrent unit network and outputs the defect size quantization result. The usability evaluation module calculates the pipeline's remaining strength parameters and / or failure evaluation parameters based on the defect size quantization result.
[0088] In one specific implementation, model training and validation can be performed in the following environment: the hardware environment can be a computing device configured with an NVIDIA GeForce RTX 2080 Ti graphics processor. The deep learning framework can be TensorFlow or Keras. The programming language can be Python 3.x.
[0089] It should be noted that the hardware environment, deep learning framework, and programming language described above are only one specific implementation method. In other embodiments, other types of graphics processors, central processing units, industrial computers, servers, edge computing devices, cloud computing platforms, or other deep learning frameworks can also be used to implement the model training and inference of this invention.
[0090] In one specific implementation, the input to the gated recurrent unit network is a 35×30 circumferential sequence feature. Here, 35 represents the length of the circumferential sequence, corresponding to 35 circumferential sampling positions; 30 represents the input feature dimension of each sequence step, corresponding to the concatenation result of the channel feature vectors of the three magnetic field signal channels at the same circumferential sampling position.
[0091] The gated recurrent unit network consists of three GRU layers, each containing 128 GRU hidden units. The first and second GRU layers output the complete sequence, while the third GRU layer outputs the hidden state corresponding to the last sequence step. The hidden state output by the third GRU layer is mapped to a defect size quantization result by a fully connected layer Dense(1). The fully connected layer uses a linear activation function.
[0092] In one specific implementation, the candidate hidden states within the GRU layer use the tanh activation function, while the update and reset gates use the sigmoid activation function. Weight initialization methods can include: kernel weights initialized using GlorotUniform, cyclic kernel weights initialized using Orthogonal, and biases initialized using Zeros. The GRU implementation can be set to reset_after=true. Dropout can be set to 0.0, i.e., dropout is not used.
[0093] In this embodiment, Dense(1) indicates that the model is a single-output model. That is, a trained model can be used to output a size parameter, such as the wall thickness loss rate, the axial length of the defect, or the circumferential width of the defect. When it is necessary to obtain the wall thickness loss rate, the axial length of the defect, and the circumferential width of the defect separately, three single-output models can be trained separately. Alternatively, in other embodiments, a multi-output model structure with a shared GRU backbone and multiple output branches can be used.
[0094] In one specific implementation, the model parameters can be set as shown in the table below: Table 1. Model Structure Parameter Table The model structure parameters and training parameters described above are exemplary. In other implementations, the number of GRU layers, the number of hidden units, the learning rate, the batch size, the number of training epochs, and the output layer structure can be adjusted according to the sample size, detector resolution, computational resources, and defect quantization accuracy requirements.
[0095] In one specific implementation, the feature extractor is a deep learning-based encoder model, which can be denoted as featureExtractor_10. This feature extractor is used to encode the axial sampling sequence corresponding to each circumferential sampling position in each magnetic field signal channel into a low-dimensional channel feature vector.
[0096] In this embodiment, for each magnetic field signal channel, the input to the feature extractor can be data of shape (35, 200, 1), where 35 represents the number of circumferential sampling positions, 200 represents the number of axial sampling points corresponding to each circumferential sampling position, and 1 represents the single-channel input dimension. The output of the feature extractor can be a feature matrix of shape (35, 10), where 35 represents the number of output positions corresponding one-to-one with the input circumferential sampling positions, and 10 represents the channel feature vector dimension corresponding to each circumferential sampling position.
[0097] For the axial, circumferential, and radial magnetic field signal channels, their respective 35×200 data points can be input into the feature extractor to obtain 35×10 channel feature matrices. Subsequently, at the same circumferential sampling position, the 10-dimensional channel feature vectors corresponding to the three magnetic field signal channels are concatenated to form a 30-dimensional fused feature vector. The above concatenation is performed on 35 circumferential sampling positions to obtain 35×30 circumferential sequence features.
[0098] In one specific implementation, the feature extractor can be a TensorFlow / Keras model and stored in SavedModel format.
[0099] In one implementation, the 10-dimensional channel feature vector output by the feature extractor can be used to characterize signal properties such as defect width, height, area, background value, square root area, area-to-width ratio, number of effective channels under different thresholds, radial length, radial height, and number of effective channels in the circumferential direction. The number of effective channels under different thresholds can include effective response range features under 30%, 40%, and 50% thresholds.
[0100] It should be noted that when the feature extractor is a deep learning encoder, its output channel feature vector can be a low-dimensional feature representation learned by the model, and it is not required that each dimension strictly correspond to a manually defined physical feature. The above-mentioned feature dimension meaning is used to explain the leakage magnetic response characteristics that the channel feature vector can characterize.
[0101] In one specific implementation, the pipeline magnetic flux leakage (MFL) detection data is normalized using a Min-Max normalization method, linearly mapping the original MFL signal values to the [0, 1] interval. The normalization formula is: x_norm = (x - x_min) / (x_max - x_min). Here, x represents the original MFL signal value, x_norm represents the normalized MFL signal value, and x_max and x_min represent the maximum and minimum values used for normalization, respectively. Preferably, x_max and x_min can be statistically obtained from the training dataset and kept consistent during the model inference stage to reduce dimensional differences between different detection devices, different magnetization conditions, and different sampling batches.
[0102] In one specific implementation, training data can be augmented using a sliding window cropping method. Specifically, multiple 3×35×200 data blocks are cropped from the original continuous detection data, centered on the defect region or multiple offset positions near the defect region, thereby increasing the number of training samples.
[0103] When performing data augmentation, samples of the same defect type can be grouped to ensure a relatively balanced distribution of samples with different defect types, size ranges, or wall thickness loss rate ranges within the dataset. To avoid data leakage, it is preferable to divide the training and test sets according to defect number, pipe segment number, or inspection item, so that multiple augmented samples corresponding to the same defect do not appear in the training and test sets simultaneously.
[0104] In one specific implementation, after data augmentation, the total number of samples used for the wall thickness loss rate model is 766, the total number of samples used for the defect circumferential width model is 878, and the total number of samples used for the defect axial length model is 976.
[0105] In one specific implementation, the loss function is the mean absolute error (MAE), the optimizer is the Adam optimizer, the learning rate is 0.001, the batch size is 128, and the number of training epochs is 150. During training, the MAE on the validation set can be monitored, and the model weights with the smallest MAE on the validation set can be saved.
[0106] The loss function, optimizer, learning rate, batch size, and number of training epochs described above are merely one exemplary training configuration. In other implementations, mean squared error, Huber loss, weighted loss function, SGD optimizer, RMSProp optimizer, or other training parameters may be used.
[0107] In one specific implementation, models for wall thickness loss rate, defect axial length, and defect circumferential width are trained and tested respectively, and the mean absolute error (MAE) and quantile error indices are used to evaluate the model accuracy. The quantile error indices may include 85% quantile error, 90% quantile error, and 95% quantile error.
[0108] In the wall thickness loss rate model, the training set has 689 samples and the test set has 77 samples. For example... Figure 6 As shown, the model training accuracy curves for MAE on the training and test sets as a function of the number of training epochs can be plotted. In a specific experimental result, the quantization accuracy of the wall thickness loss rate model is shown in the table below: Table 2. Quantification accuracy of wall thickness loss rate (wt) In the defect axial length model, the training set contains 878 samples, and the test set contains 98 samples. In a specific experimental result, the quantization accuracy of the defect axial length model is as follows: Table 3. Quantification accuracy of defect length In the defect circumferential width model, based on a specific experimental result, the quantization accuracy of the defect circumferential width model is as follows: Table 4. Quantization accuracy of defect width In one specific implementation, the training time for the wall thickness loss rate model (wt) is 275 seconds, the training time for the defect circumferential width model (width) is 289 seconds, and the training time for the defect axial length model (length) is approximately 300 seconds. These training times are related to the hardware environment, data scale, model parameters, and training framework, and are only used to illustrate one implementation effect.
[0109] In one specific implementation, the defect size quantification result output by the model, after inverse normalization, can be input into the usability evaluation module. The usability evaluation module can calculate the pipeline's remaining strength parameters and / or failure evaluation parameters based on parameters such as the defect size quantification result, pipeline outer diameter, pipeline wall thickness, pipeline material strength, and maximum allowable operating pressure.
[0110] The evaluation methods that can be used include ASME B31G, RP-F101, DNV RP-F101, SY / T 6151, or other pipeline corrosion defect evaluation methods. Among them, ASME B31G: based on a modified rheological stress formula, it calculates allowable pressure and can be used to calculate allowable pressure based on defect size and pipeline parameters; RP-F101: DNV's recommended corrosion defect evaluation method; DNV RP-F101: the partial safety factor method, considering detection accuracy and confidence level, can be used for corrosion defect evaluation and considers detection accuracy and confidence level; SY / T 6151: China's petroleum and natural gas industry standard, classified according to corrosion degree, can be used for corrosion defect classification evaluation.
[0111] The evaluation output may include at least one of ERF, defect level, and remaining life prediction results. ERF can be expressed as the ratio between the maximum permissible operating pressure and the safe pressure, i.e., ERF = MAOP / P_safe. When ERF ≤ 1, the defect can be considered acceptable; when ERF > 1, the defect can be considered unacceptable or requires further action. It should be noted that the specific evaluation judgment rules can be determined according to the adopted evaluation standards and engineering requirements. The improvement of this invention focuses on obtaining the defect size quantification result through circumferential sequence features and gated cyclic unit networks, making it suitable for using existing engineering evaluation standards.
[0112] In one specific application example, defect size quantification and evaluation are performed on pipeline inspection data. The pipeline parameters in this example are only used to illustrate the application process of the method of the present invention and are not intended to limit the scope of application of the present invention.
[0113] The pipe has an outer diameter of 508 mm, a wall thickness of 10 mm, and is made of L485 steel. Axial, circumferential, and radial magnetic flux leakage signals of the pipe are collected using an internal magnetic flux leakage detector. Following the aforementioned embodiments, time alignment, circumferential weld alignment, abnormal jump point repair, defect data block extraction, channel feature extraction, circumferential feature fusion, and GRU quantization prediction are performed.
[0114] After quantization using the GRU model, the wall thickness loss rate of a certain defect was found to be 0.52, indicating a defect depth of approximately 5.2 mm; the axial length of the defect was 85 mm; and the circumferential width of the defect was 45 mm. Inputting these defect dimensions into the SY / T 6151 evaluation module resulted in the defect being classified as Class II corrosion, along with the evaluation results for monitoring purposes. This example is only for illustrating the output format of the quantification and evaluation results; specific engineering conclusions should be based on actual detection data, evaluation standards, and engineering verification results.
[0115] In a specific experiment, the defect size quantization method combining the three-layer GRU network and feature extractor provided in this embodiment was compared with the empirical formula method, support vector machine, random forest, and shallow convolutional neural network, with the wall thickness loss rate quantization accuracy as the evaluation object. The comparison results are shown in the table below: Table 5. Comparative Experimental Data Based on the above comparison results, on this specific experimental dataset, the method of this embodiment reduces the MAE by approximately 61.2% compared to the empirical formula method, approximately 46.8% compared to the support vector machine method, approximately 40.0% compared to the random forest method, and approximately 31.3% compared to the shallow CNN method.
[0116] It should be noted that the above comparative experimental results are based on specific experimental conditions. The actual improvement in accuracy may be affected by factors such as the number of samples, the distribution of defect types, label accuracy, the training and testing division method, and the performance of the detection equipment. The above experimental results are used to illustrate the implementation effect of the method in this embodiment on a specific dataset and do not constitute a limitation on all application scenarios.
[0117] In one specific implementation, the computation process of the method mainly includes feature extraction and GRU inference. For the feature extraction process, its time complexity can be expressed as O(N×C×L), where N represents the number of circumferential sampling positions, C represents the number of magnetic field signal channels, and L represents the number of axial sampling points corresponding to each circumferential sampling position. In a specific embodiment, N is 35, C is 3, and L is 200. For the GRU inference process, its time complexity can be expressed as O(S×H²), where S represents the circumferential sequence length, and H represents the number of GRU hidden units. In a specific embodiment, S is 35, and H is 128.
[0118] In one specific implementation, under an NVIDIA GeForce RTX 2080 Ti graphics processor environment, the total time for a single defect quantization is approximately 50ms. Without a GPU, inference can be performed using the CPU, with a single defect quantization taking approximately 500ms. The above inference times are merely examples; actual times depend on hardware performance, model implementation, batch size, and software framework.
[0119] In one specific implementation, the model parameters of the three-layer GRU network and the fully connected layer are approximately 120KB, the feature extractor is approximately 2MB, and the memory usage during inference is approximately 15MB. The above model size and memory usage are merely exemplary implementation results.
[0120] In one deployment, the minimum configuration can be an Intel i5 processor, 8GB of RAM, and an NVIDIA GTX 1060 graphics processor. Another recommended deployment can use an Intel i7 processor, 16GB of RAM, and an NVIDIA RTX 2080 Ti graphics processor. In a GPU-less environment, inference can also be performed using the CPU.
[0121] It should be noted that this invention is not limited to the hardware deployment configuration described above. The technical solution of this invention can be implemented as long as the electronic device can perform inference calculations of the feature extractor and the gated recurrent unit network, and can output the defect size quantification results.
[0122] In this embodiment, the magnetic flux leakage detection data of the pipeline is converted into a circumferential sequence feature with the circumferential sampling position as the sequence step. Each sequence step in this circumferential sequence feature corresponds to a physical sampling position in the circumferential direction of the pipeline, and integrates the magnetic flux leakage response features of multiple magnetic field signal channels in the axial, circumferential, and radial directions at that position. Thus, the gated recurrent unit network can model the feature correlation between adjacent sampling positions along the circumferential direction of the pipeline.
[0123] Compared to directly performing overall regression on the raw magnetic flux leakage data, or making machine learning predictions based solely on artificial features, this embodiment can make fuller use of the differences in multi-channel magnetic flux leakage response and the spatial arrangement of the circumferential sensor array, thereby improving the quantitative stability of defect wall thickness loss rate, defect axial length and / or defect circumferential width.
[0124] Based on the same inventive concept, this application also provides a pipeline magnetic flux leakage internal detection defect size quantification system. The solution provided by this system is similar to the solution described in the above method. Therefore, the specific limitations in one or more system embodiments provided below can be found in the limitations described above, and will not be repeated here.
[0125] In one exemplary embodiment, such as Figure 7 As shown, a pipeline magnetic flux leakage internal detection defect size quantification system is provided, including: The data acquisition module is used to acquire pipeline magnetic flux leakage detection data, which includes multiple magnetic field signal channels. The defect data block extraction module is used to extract a defect data block covering the defect area from the pipeline magnetic flux leakage detection data based on the location information of the defect area. The defect data block includes multiple circumferential sampling positions and multiple axial sampling points. The channel feature extraction module is used to extract features from the data of different magnetic field signal channels in the defect data block to obtain channel feature vectors corresponding to each circumferential sampling position. The circumferential feature fusion module is used to fuse the channel feature vectors corresponding to different magnetic field signal channels at the same circumferential sampling position to obtain the fused feature vectors corresponding to each circumferential sampling position, and to form a circumferential sequence feature according to the arrangement order of each circumferential sampling position in the circumferential direction of the pipe. The defect size quantization module is used to input the circumferential sequence features into a gated recurrent unit network, model the feature correlation between adjacent circumferential sampling positions through the gated recurrent unit network, and output the defect size quantization result.
[0126] In one embodiment, the system may further include a preprocessing module. The preprocessing module is used to perform at least one of the following on the pipeline magnetic flux leakage detection data: time alignment, circumferential weld alignment, and abnormal jump point repair.
[0127] In one embodiment, the system may further include a post-processing evaluation module. The post-processing evaluation module is used to perform de-normalization processing on the normalized quantization results output by the gated cyclic unit network to obtain defect dimensions with physical dimensions, and inputs these defect dimensions into the evaluation module to calculate the pipeline's remaining strength parameters and / or failure evaluation parameters.
[0128] The modules described above can be implemented through software programs, hardware circuits, or a combination of both. These modules can be integrated into the same electronic device or distributed across different computing devices.
[0129] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 8 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and databases. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media to run. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection.
[0130] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0131] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0132] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0133] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0134] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (Read-Only Memory). Memory includes ROM, magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0135] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0136] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0137] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for quantifying the three-dimensional dimensions of defects detected inside a pipeline, characterized in that, The methods include: Acquire pipeline magnetic flux leakage internal detection data, which includes multiple magnetic field signal channels; Based on the location information of the defect area, a defect data block covering the defect area is extracted from the pipeline magnetic flux leakage detection data. The defect data block includes multiple circumferential sampling positions and multiple axial sampling points. Feature extraction is performed on the data of different magnetic field signal channels in the defect data block to obtain channel feature vectors corresponding to each circumferential sampling position; The channel feature vectors corresponding to different magnetic field signal channels at the same circumferential sampling position are fused to obtain the fused feature vectors corresponding to each circumferential sampling position. According to the arrangement order of each circumferential sampling position in the circumferential direction of the pipe, the multiple fused feature vectors are combined to form a circumferential sequence feature; The circumferential sequence features are input into a gated recurrent unit network, and the feature correlation between adjacent circumferential sampling positions is modeled through the gated recurrent unit network to output the defect size quantification result.
2. The method according to claim 1, characterized in that, The plurality of magnetic field signal channels include an axial magnetic field signal channel, a circumferential magnetic field signal channel, and a radial magnetic field signal channel; Before extracting the defect data block covering the defect area, the pipeline magnetic flux leakage detection data is preprocessed, including at least one of time alignment, circumferential weld alignment, and abnormal jump point repair.
3. The method according to claim 2, characterized in that, The abnormal transition point repair includes: Calculate the signal difference between adjacent axial sampling points and / or between adjacent circumferential sampling positions; Sampling points where the signal difference value exceeds a preset difference threshold are identified as abnormal transition points; The abnormal transition point is replaced or interpolated and repaired based on the normal sampling points adjacent to it.
4. The method according to claim 1, characterized in that, Based on the location information of the defect area, a defect data block covering the defect area is extracted from the pipeline magnetic flux leakage detection data, including: The defect center is determined based on the axial and circumferential start and end positions of the defect region. Using the defect center as a reference, a preset number of circumferential sampling positions are selected in the circumferential direction of the pipeline, and a preset number of axial sampling points are selected in the axial direction of the pipeline to form the defect data block.
5. The method according to claim 4, characterized in that, The defect data block includes 3 magnetic field signal channels, 35 circumferential sampling positions, and 200 axial sampling points.
6. The method according to claim 1, characterized in that, Feature extraction is performed on the data from different magnetic field signal channels in the defect data block to obtain channel feature vectors corresponding to each circumferential sampling position, including: For each magnetic field signal channel, the axial sampling sequence corresponding to each circumferential sampling position in the magnetic field signal channel is input into the feature extractor to obtain the channel feature vector corresponding to the circumferential sampling position; The channel feature vector includes at least one of amplitude feature, area feature, background value feature, effective response range feature, and shape proportion feature.
7. The method according to claim 2, characterized in that, The channel feature vectors corresponding to different magnetic field signal channels at the same circumferential sampling position are fused, including: The channel feature vectors corresponding to the axial magnetic field signal channel, circumferential magnetic field signal channel and radial magnetic field signal channel at the same circumferential sampling position are concatenated in the feature dimension to obtain the fused feature vector corresponding to the circumferential sampling position. In this context, each sequence step in the circumferential sequence features corresponds to a circumferential sampling position, and the input of each sequence step is the fused feature vector corresponding to that circumferential sampling position.
8. The method according to claim 1, characterized in that, The gated cyclic unit network includes multiple GRU layers connected in sequence; At least one pre-stage GRU layer outputs the complete sequence, and the final GRU layer outputs the hidden state used for defect size regression. The hidden state is mapped to the defect size quantization result through a fully connected layer; The defect size quantification results include at least one of the following: defect wall thickness loss rate, defect axial length, and defect circumferential width.
9. The method according to claim 1, characterized in that, The normalized quantization result output by the gated recurrent unit network is denormalized to obtain the defect size with physical dimensions; The defect size with physical dimensions is input into the evaluation module to calculate the pipeline's remaining strength parameters and / or failure evaluation parameters.
10. A system for quantifying the size of defects detected by magnetic flux leakage in pipelines, characterized in that, include: The data acquisition module is used to acquire pipeline magnetic flux leakage detection data, which includes multiple magnetic field signal channels. The defect data block extraction module is used to extract a defect data block covering the defect area from the pipeline magnetic flux leakage detection data based on the location information of the defect area. The defect data block includes multiple circumferential sampling positions and multiple axial sampling points. The channel feature extraction module is used to extract features from the data of different magnetic field signal channels in the defect data block to obtain channel feature vectors corresponding to each circumferential sampling position. The circumferential feature fusion module is used to fuse the channel feature vectors corresponding to different magnetic field signal channels at the same circumferential sampling position to obtain the fused feature vectors corresponding to each circumferential sampling position, and to form a circumferential sequence feature according to the arrangement order of each circumferential sampling position in the circumferential direction of the pipe. The defect size quantization module is used to input the circumferential sequence features into a gated recurrent unit network, model the feature correlation between adjacent circumferential sampling positions through the gated recurrent unit network, and output the defect size quantization result.