A method and apparatus for processing pulsed eddy current inspection signals
Patent Information
- Application Number
- CN202611229784.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]然而在实际工程场景中,电磁阵列检测信号普遍受强背景噪声干扰,包括油气流速冲击振动噪声、大覆盖层提离噪声、工频干扰、随机冲击脉冲等多种成分
[0028]本发明实施例的具有以下有益效果:具备无标签盲去噪能力,采用非对称上下文掩码自监督学习机制,无需纯净缺陷信号作为标签,仅从含噪观测数据本身即可学习信号内在结构规律,适配现场实测数据标注稀缺的工程场景,大幅降低数据获取成本;能保障物理一致性,引入基于 Loewner 有理谱的低秩物理约束,将铁磁材料脉冲涡流响应的低阶有理函数先验融入网络训练,使输出结果符合电磁物理规律,缓解纯数据驱动模型的“黑箱”问题,提升结果可靠性与可解释性;具有优异的强噪声鲁棒性,结合 Huber 损失对异常值的耐受性与交叉注意力的自适应上下文选择机制,对随机冲击脉冲、流速调制噪声等非平稳强干扰具有良好抑制效果,信噪比提升幅度优于传统小波、EMD 等方法。
Smart Images

Figure CN123012373A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of non-destructive testing and electromagnetic signal processing technology for oil and gas pipelines, and particularly to a pulse eddy current detection signal processing method and apparatus. Background Technology
[0002] Oil and gas pipelines are core infrastructure for energy transmission, and their safe operation is directly related to the stability of the national economy and the safety of people's lives and property. In-service pipelines are subject to long-term effects such as media corrosion, stress fatigue, and geological disasters, which can easily lead to defects such as axial stress concentration and localized metal loss. Electromagnetic array detection technology, with its advantages of non-contact operation, fast detection speed, and applicability to in-service inspection, has become an important means of pipeline defect assessment.
[0003] However, in real-world engineering scenarios, electromagnetic array detection signals are generally subject to strong background noise interference, including various components such as oil and gas flow velocity impact vibration noise, large-coverage layer lift-off noise, power frequency interference, and random impact pulses. This noise deeply overlaps with the effective defect signal in both the time and frequency domains, resulting in a significant reduction in the defect signal-to-noise ratio and severely limiting the accuracy of defect identification and quantitative assessment.
[0004] Existing electromagnetic signal denoising techniques suffer from the following limitations: Traditional filtering, empirical mode decomposition, and wavelet thresholding methods rely on the time-frequency differences between signals and noise. When noise and defect signals highly overlap in the frequency domain, the denoising effect significantly decreases, and the abrupt change characteristics of defects are easily blurred, resulting in the loss of peak and edge information. Blind source separation methods, such as FastICA, rely on multi-channel observation and signal statistical independence, making them difficult to apply directly in single-channel detection scenarios. Furthermore, their ability to separate complex engineering noise that is nonlinear and non-stationary is limited. In addition, denoising methods based on supervised deep learning require large-scale "clean-noisy" paired samples to train the model. However, pure defect signals are difficult to obtain in field measurements, and the distribution of synthetic noise differs from that of real noise, leading to insufficient model generalization ability and difficulty in adapting to complex working conditions. At the same time, purely data-driven deep learning models suffer from a "black box" problem, lacking physical explanation for their internal mechanisms. They are prone to overfitting under small sample conditions, and the output results may violate the basic physical laws of electromagnetic response, making reliability difficult to guarantee.
[0005] Therefore, there is an urgent need to develop a blind denoising method that does not require clean labels, is suitable for single-channel observation, and incorporates electromagnetic physics priors, in order to solve the problem of high-precision denoising of electromagnetic array detection signals for oil and gas pipelines under strong background noise. Summary of the Invention
[0006] The present invention aims to at least partially solve one of the technical problems in the related art.
[0007] The main objective of this invention is to provide a pulsed eddy current detection signal processing method. It adopts a self-supervised mask learning mechanism to achieve blind denoising without clean labels, combines bidirectional long short-term memory network to model long-term sequence dependencies, and introduces Loewner rational spectrum physical constraints to force the output to conform to the electromagnetic response law, which significantly improves the denoising accuracy and physical consistency in strong noise scenarios.
[0008] Another object of the present invention is to provide a pulsed eddy current detection signal processing device.
[0009] The third objective of this invention is to provide an electronic device.
[0010] A fourth objective of this invention is to provide a non-transitory computer-readable storage medium.
[0011] To achieve the above objectives, a first aspect of the present invention provides a pulsed eddy current detection signal processing method, comprising: The original detection signal obtained during the electromagnetic array detection of oil and gas pipelines is collected. The original detection signal includes electromagnetic response information caused by pipeline defects and background noise during the detection process. The original detection signal is standardized and preprocessed, and a self-supervised training sample based on an asymmetric context sliding window mask is constructed without the need to obtain a corresponding noiseless reference signal. The self-supervised training samples are input into the convolutional bidirectional long short-term memory network encoder-decoder network. The contextual temporal features are fused through the cross-attention mechanism between the encoder and decoder, and the signal reconstruction result corresponding to the masked region is output. A two-stage training strategy is adopted to optimize the network parameters. The first stage trains the basic signal recovery capability of the network based on reconstruction loss. The second stage introduces a physical heuristic constraint loss based on the low-rank characteristics of Loewner's rational spectrum on the basis of reconstruction loss, so that the network output satisfies the characterization law of low-order rational function of electromagnetic response. The trained network is used to perform sliding window prediction on the original detection signal, and the signal is reconstructed by adding window weights and superimposing them to obtain a denoising result with the same length as the original detection signal.
[0012] In one embodiment of the present invention, the method for constructing self-supervised training samples based on asymmetric context sliding window masks includes: Let the length of the target center segment be T, the length of the left context be L, and the length of the right context be R. The sliding window length satisfies:
[0013] While keeping the sliding window length constant, the ratio of the left context length L to the right context length R is randomly adjusted to form the input window sequence:
[0014] Within each input window, the sampled values corresponding to the central segment are masked, and a corresponding visibility mask is generated. At the same time, the normalized time coordinate is concatenated with the signal value channel and the visibility mask channel to form a multi-channel input sample containing signal value, visibility mask and time coordinate. For boundary regions that exceed the range of the original detection signal, zero values are used for filling, and these regions are marked as invisible regions using a visibility mask.
[0015] In one embodiment of the present invention, the convolutional-bidirectional long short-term memory network encoding and decoding architecture includes a convolutional front-end, a bidirectional LSTM encoder, a bottleneck layer, and a bidirectional LSTM decoder; The input sample first passes through two layers of one-dimensional convolution and the GELU activation function to extract local temporal features. The convolutional features are then concatenated with the original three-channel input and fed into a multi-layer bidirectional LSTM encoder. The encoder output is weighted pooled according to the visible mask, and only visible context information is aggregated to generate a global context representation. The global context representation, combined with the average time position of the central segment and the left and right context ratio information, is input into the bottleneck layer to obtain low-dimensional latent variables and map them to the initial hidden state and memory state of the decoder. The decoder receives relative position, absolute center time, and contextual proportion information at each step, and generates a prediction sequence of the center segment point by point.
[0016] In one embodiment of the present invention, the fusion of contextual features through a cross-attention mechanism specifically includes: Using the hidden states of the decoder at each time step as the query vector Q, and the hidden states of the encoder at each time step as the key vector K and value vector V respectively, the context fusion features are calculated using scaled dot product attention. The calculation formula is as follows:
[0017] in, The dimension of the key vector; During the attention calculation process, only the visible context region is normalized, so that each predicted sampling point adaptively selects effective information based on context relevance, and the central mask region and zero-fill region are masked.
[0018] In one embodiment of the present invention, the physical heuristic constraint loss construction process based on the low-rank properties of the Loewner rational spectrum includes: Complete reconstruction sequence output from the first stage of the network Perform a discrete Fourier transform and normalize the result to obtain the corresponding normalized frequency domain response; The support set S and the row sampling set are adaptively selected from the frequency points using a greedy residual criterion. A joint Loewner difference quotient matrix is constructed based on two sets of sampling points, where each element of the Loewner matrix satisfies:
[0019] In the formula, For row sampling points, As a support point, It is the frequency domain response function; Singular value decomposition of the joint Loewner matrix yields the singular values arranged in descending order. The order-weighted low-rank loss is used as the physical constraint term, and the calculation formula is as follows:
[0020] Where K is the total number of singular values. is the order weight, p is the penalty strength coefficient, the weight increases with the singular value index, and the penalty focuses on the tail high-rank singular components introduced by noise.
[0021] In one embodiment of the present invention, the two-stage training strategy includes: The first stage uses the Huber loss function as the reconstruction loss:
[0022] in, This is the network prediction value. This represents the original noisy center segment value. This is the hyperparameter for sensitivity to outliers; The second stage introduces a physically inspired constraint loss on top of the reconstruction loss, and the total loss function is expressed as:
[0023] in, For Huber's reconstruction losses, For Loewner rational spectral constraint loss, These are the physical constraint weighting coefficients; Among them, the physical constraint weights adopt a gradually increasing strategy, so that the physical constraint terms participate in the network optimization from weak to strong, in order to avoid network instability in the early stage of training.
[0024] In one embodiment of the present invention, the electromagnetic array detection signal for oil and gas pipelines includes pipeline axial stress leakage magnetic field detection signal and local metal loss pulsed eddy current detection signal under a large overburden layer. The background noise includes one or more of the following: oil and gas flow velocity impact vibration noise, lift-off noise, power frequency interference, and random impact pulse noise.
[0025] To achieve the above objectives, a second aspect of the present invention provides a pulsed eddy current detection signal processing device, comprising: The signal acquisition module is used to acquire the raw detection signals obtained during the electromagnetic array detection of oil and gas pipelines. The raw detection signals include electromagnetic response information caused by pipeline defects and background noise during the detection process. The sample construction module is used to perform standardized preprocessing on the original detection signal and construct self-supervised training samples based on asymmetric context sliding window mask without needing to obtain the corresponding noiseless reference signal. The network feedforward module is used to input the self-supervised training samples into the convolutional-bidirectional long short-term memory network encoder-decoder network, and fuse contextual temporal features through the cross-attention mechanism between the encoder and decoder to output the signal reconstruction result corresponding to the masked region. The training optimization module is used to optimize the network parameters using a two-stage training strategy. The first stage trains the basic signal recovery capability of the network based on reconstruction loss. The second stage introduces a physical heuristic constraint loss based on the low-rank characteristics of Loewner's rational spectrum on the basis of reconstruction loss, so that the network output satisfies the characterization law of low-order rational function of electromagnetic response. The inference and reconstruction module is used to perform sliding window prediction on the original detection signal using the trained network, and reconstruct the signal by adding a window and weighting the signal to obtain a denoising result with the same length as the original detection signal.
[0026] To achieve the above objectives, a third aspect of this application provides an electronic device, including a processor and a memory; wherein the processor runs a program corresponding to the executable program code stored in the memory to implement the method described in the first aspect.
[0027] To achieve the above objectives, a fourth aspect of this application provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method described in the first aspect.
[0028] The embodiments of this invention have the following beneficial effects: They possess label-free blind denoising capabilities, employing an asymmetric context mask self-supervised learning mechanism. They do not require pure defect signals as labels, learning the inherent structural patterns of signals solely from the noisy observation data itself, thus adapting to engineering scenarios where on-site measured data labels are scarce and significantly reducing data acquisition costs. They ensure physical consistency by introducing low-rank physical constraints based on Loewner's rational spectrum, incorporating the prior low-order rational functions of the pulsed eddy current response of ferromagnetic materials into the network training, making the output results conform to electromagnetic physics laws, alleviating the "black box" problem of purely data-driven models, and improving the reliability and interpretability of the results. They exhibit excellent robustness against strong noise, combining the tolerance of Huber loss to outliers with the adaptive context selection mechanism of cross-attention, demonstrating good suppression of non-stationary strong interference such as random impact pulses and flow velocity modulation noise, with a signal-to-noise ratio improvement superior to traditional wavelet and EMD methods. Attached Figure Description
[0029] The above-described and additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which: Figure 1 A flowchart of a pulsed eddy current detection signal processing method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of an asymmetric context sliding window mask provided in an embodiment of the present invention; Figure 3 A schematic diagram of the convolutional-bidirectional LSTM encoding / decoding network architecture provided in an embodiment of the present invention; Figure 4 A flowchart illustrating the two-stage training strategy provided in an embodiment of the present invention; Figure 5 This is a schematic diagram illustrating the blind separation effect of the present invention on eddy current simulation signals according to an embodiment of the invention; Figure 6 This is a schematic diagram of a pulsed eddy current detection signal processing device provided for an embodiment of the present invention. Detailed Implementation
[0030] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0031] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0032] A pulsed eddy current detection signal processing method and apparatus according to an embodiment of the present invention will now be described with reference to the accompanying drawings.
[0033] Example 1 This embodiment provides a method for processing pulsed eddy current detection signals. For example... Figure 1 As shown, the method includes the following steps: S1. Acquire the original detection signal obtained during the electromagnetic array detection of oil and gas pipelines. The original detection signal includes electromagnetic response information caused by pipeline defects and background noise during the detection process.
[0034] In this embodiment, the original detection signal obtained during the electromagnetic array detection of oil and gas pipelines is first acquired. The original detection signal includes electromagnetic response information caused by pipeline defects and background noise during the detection process.
[0035] Specifically, in-service inspection signals of oil and gas pipelines are acquired using an electromagnetic array sensor. These signals include pipeline axial stress leakage magnetic flux detection signals and pulsed eddy current detection signals for localized metal loss under large overburden layers. Preferably, the electromagnetic array sensor employs a single-excitation, single-receiver focused pulsed eddy current probe to acquire the raw electromagnetic response signals during the oil and gas pipeline inspection process.
[0036] Furthermore, since the oil and gas pipelines are in operation, the raw detection signals collected contain not only electromagnetic response information caused by pipeline defects, but also background noise such as oil and gas velocity impact vibration noise, lift-off noise, power frequency interference, and random impact pulses. These raw detection signals serve as input data for subsequent normalization preprocessing and the construction of self-supervised training samples.
[0037] It should be noted that, in this embodiment, the electromagnetic array detection signal for the oil and gas pipeline includes the pipeline axial stress leakage magnetic flux detection signal and the pulsed eddy current detection signal for local metal loss under a large overburden layer. The pipeline axial stress leakage magnetic flux detection signal reflects the leakage magnetic flux response characteristics of the pipeline's axial stress concentration area and defect locations; the pulsed eddy current detection signal for local metal loss under a large overburden layer reflects the transient electromagnetic response characteristics caused by defects such as local metal loss and corrosion thinning under overburden conditions. Further, the background noise includes one or more of the following: oil and gas flow velocity impact vibration noise, lift-off noise, power frequency interference, and random impact pulse noise. The oil and gas flow velocity impact vibration noise is mainly generated by mechanical vibration caused by the flow of oil and gas media; the lift-off noise is mainly caused by changes in the distance between the probe and the pipeline surface during the detection process; the power frequency interference mainly originates from electromagnetic interference generated by the external power system; and the random impact pulse noise is mainly generated by random mechanical impacts or environmental disturbances during the detection process. These background noises are usually superimposed on each other in the original detection signal, interfering with the extraction of defect electromagnetic response information. Therefore, the method of this invention is required to perform blind denoising processing on the original detection signal.
[0038] S2. Perform standardized preprocessing on the original detection signal, and construct self-supervised training samples based on asymmetric context sliding window mask without needing to obtain the corresponding noiseless reference signal.
[0039] In this embodiment, the original detection signal obtained in step S1 is standardized and preprocessed, and a self-supervised training sample based on an asymmetric context sliding window mask is constructed without the need to obtain the corresponding noiseless reference signal, so as to provide input data for subsequent network training.
[0040] Specifically, the acquired original discrete noisy sequence Standardization is performed to ensure that the standardized signal has zero mean and unit variance, thereby eliminating the impact of differences in amplitude scales of different detection signals on the network training process and improving the stability and convergence speed of model training.
[0041] Furthermore, such as Figure 2 As shown, the self-supervised training samples are constructed based on the asymmetric context sliding window mask. The specific process is as follows: Let the length of the target center segment be T, the length of the left context be L, and the length of the right context be R. The sliding window length satisfies:
[0042] In one embodiment, the preferred central segment length T is 64, the single-sided basic context length is 128, and the corresponding total sliding window length W is 320.
[0043] While keeping the total length W of the sliding window constant, the distribution ratio of the left context length L and the right context length R is randomly adjusted to form the input window sequence:
[0044] In this embodiment, each input window contains information from three channels: a signal value channel, a visibility mask channel, and a normalized time coordinate channel. In the signal value channel, all sampled values at the center segment are set to zero, while the original signal value is retained in the context area. In the visibility mask channel, the context area is marked as 1, while the center mask area and boundary fill area are marked as 0. The normalized time coordinate channel records the relative time position of each sample point within the current sliding window, with its value normalized to the interval [0, 1].
[0045] Subsequently, within each input window, the sampled values corresponding to the central segment are masked, and a corresponding visibility mask is generated. At the same time, the normalized time coordinates are concatenated with the signal value channel and the visibility mask channel to form a multi-channel self-supervised training sample containing signal values, visibility masks, and time coordinates.
[0046] Furthermore, for boundary regions that exceed the range of the original detection signal, zero values are used for filling, and the corresponding locations are marked as invisible regions using a visibility mask to avoid the impact of missing boundary data on network training.
[0047] Through the above steps, the standardized preprocessing of the original detection signal and the construction of self-supervised training samples based on asymmetric context sliding window mask are completed. The obtained multi-channel self-supervised training samples are used as input data for the next step of the convolutional-bidirectional long short-term memory network encoding and decoding network.
[0048] S3. Input the self-supervised training samples into the convolutional-bidirectional long short-term memory network encoder-decoder network, and fuse the contextual temporal features through the cross-attention mechanism between the encoder and decoder to output the signal reconstruction result corresponding to the masked region.
[0049] In this embodiment, the multi-channel self-supervised training samples constructed in step S2 are input into the convolutional-bidirectional long short-term memory network encoder-decoder network. The contextual temporal features are fused through the cross-attention mechanism between the encoder and decoder to predict and reconstruct the central mask region in the input samples, and output the corresponding signal reconstruction result.
[0050] like Figure 3As shown, the convolutional-bidirectional long short-term memory network encoding and decoding architecture includes a convolutional front-end, a bidirectional LSTM encoder, a bottleneck layer, and a bidirectional LSTM decoder. The input self-supervised training samples are first processed by the convolutional front-end, which extracts local temporal features from the original detection signal through a one-dimensional convolutional network. Then, the features extracted by the convolution are concatenated with the original three-channel input information along the channel dimension and input into the bidirectional LSTM encoder for temporal feature encoding.
[0051] Specifically, the convolutional front end uses a one-dimensional convolutional layer and the GELU activation function to extract features from the input samples. In one embodiment, the convolutional kernel size is 3 and the stride is 1. Local edge features, oscillation features, and short-term variation features in the detection signal are extracted through convolution operations. After convolution processing, the obtained local temporal features are fused with the original three-channel input containing signal values, a visibility mask, and normalized time coordinates to preserve the original signal information and mask constraint information, and then used as the input to the bidirectional LSTM encoder.
[0052] Furthermore, the bidirectional LSTM encoder is used to encode the fused temporal features to obtain the contextual dependencies of the detection signal. In this embodiment, a multi-layer stacked bidirectional LSTM structure is used as the encoder, preferably a 3-layer bidirectional LSTM network with a hidden layer dimension of 128. By simultaneously extracting temporal features from the input sequence in both forward and reverse directions, the contextual information on both sides of the central mask region is comprehensively utilized.
[0053] Instead of global average pooling, the encoder output uses weighted pooling based on the visibility mask, aggregating only the encoded features corresponding to the visible context regions to generate a global context representation. This approach avoids interference from the central mask region and the zero-padding boundary regions on the context feature representation, ensuring that the generated global context representation effectively reflects the valid temporal information in the original detection signal.
[0054] Furthermore, the global context representation output by the encoder is concatenated with the average time position and left / right visible context ratio information corresponding to the central segment, and then input into the bottleneck layer for conditional mapping to obtain low-dimensional latent variables. Subsequently, these low-dimensional latent variables are mapped to the initial hidden state and unit memory state of the decoder's bidirectional LSTM network, providing initial state information for sequence reconstruction of the central mask region.
[0055] The bidirectional LSTM decoder generates the prediction sequence corresponding to the center segment point by point according to the input conditions. In this embodiment, a two-layer bidirectional LSTM is preferably used as the decoder. During the decoding process, each time step simultaneously receives the relative position encoding, absolute center time information, and left and right context ratio information, and outputs the signal prediction value corresponding to the center mask region point by point according to the fused context features.
[0056] Furthermore, to enhance the information interaction between contextual information and the region to be reconstructed during the decoding process, a cross-attention mechanism is introduced between the encoder and decoder to adaptively fuse the temporal features of the encoder output.
[0057] Specifically, the hidden states of the decoder at each time step are used as the query vector Q, and the hidden states of the encoder at each time step are used as the key vector K and the value vector V, respectively. The context fusion features are calculated by scaling dot product attention, and the calculation formula is as follows:
[0058] in, The dimension of the key vector; During the attention calculation process, the attention weights are constrained based on the visibility mask generated in step S2. Attention score normalization is performed only within the context region where the visibility mask is marked as 1, enabling each sampling point to be reconstructed to adaptively select effective feature information based on its correlation with the context region. Simultaneously, by masking the central mask region and the zero-filled boundary region, interference from invisible regions is avoided in the attention calculation.
[0059] Through the above steps, local temporal features are extracted using a convolutional network, long-distance temporal dependencies are established using a bidirectional LSTM network, and adaptive fusion of contextual information is achieved by combining a cross-attention mechanism. Finally, the signal reconstruction result corresponding to the central mask region is obtained, and the signal reconstruction result is used for subsequent network optimization process based on physical heuristic constraints.
[0060] S4. A two-stage training strategy is adopted to optimize the network parameters. In the first stage, the basic signal recovery capability of the network is trained based on reconstruction loss. In the second stage, a physical heuristic constraint loss based on the low-rank characteristics of Loewner's rational spectrum is introduced on the basis of reconstruction loss, so that the network output satisfies the characterization law of low-order rational function of electromagnetic response.
[0061] In this embodiment, as Figure 4 As shown, the network reconstruction results obtained in step S3 are first trained in the first stage. After obtaining a stable basic signal reconstruction capability, Loewner rational spectrum low-rank constraints are introduced for the second stage of joint optimization.
[0062] Specifically, the physically inspired constraint loss based on the low-rank property of Loewner's rational spectrum is constructed as follows: the complete reconstructed sequence output from the first stage of the network. Perform a discrete Fourier transform and normalize the resulting frequency domain result to obtain the corresponding normalized frequency domain response. Subsequently, a greedy residual criterion was used to adaptively select the support set from the frequency domain sampling points. and row sampling set The initial support set S is empty. During each iteration, the frequency point with the largest current residual is selected and added to the support set until the size of the support set reaches a preset value. In this embodiment, the size of the support set is preferably set to 16.
[0063] After obtaining the support set S and the row sampling set Then, based on the two sets of sampling points, a Loewner difference quotient matrix is constructed, whose matrix elements satisfy:
[0064] In the formula, For row sampling points, As a support point, Let be the frequency domain response function. Based on this, a joint Loewner matrix is constructed, and singular value decomposition is performed on the joint Loewner matrix to obtain the singular values arranged in descending order. .
[0065] Furthermore, a low-rank loss weighted by order is used as a physical heuristic constraint term, and its calculation formula is as follows:
[0066] Where K is the total number of singular values. Here, p is the order weight, and p is the penalty strength coefficient. The weight increases with the singular value index, focusing on penalizing the high-rank singular components at the tail introduced by noise. The increasing order weight strengthens the constraint on later-order high-rank singular components, thereby suppressing high-rank components introduced by noise and ensuring the network output maintains the low-rank spectral characteristics corresponding to the low-order rational function of the electromagnetic response. In this embodiment, the penalty strength coefficient p is preferably set to 2.
[0067] This embodiment uses the Adam optimizer to update the network parameters, with an initial learning rate of 0.001 and a total of 100 training epochs. The training process is divided into two stages.
[0068] The first stage is the basic reconstruction training stage. In the first N training rounds, only Huber loss is used as the reconstruction target to train the network's basic ability to recover the center mask fragment based on visible context information. In this embodiment, N is preferably 80. The Huber reconstruction loss is expressed as:
[0069] in, This is the network prediction value. This represents the original noisy center segment value. δ is the hyperparameter for outlier sensitivity. In this embodiment, δ is preferably set to 1.0. By employing Huber loss, the impact of large-value outliers such as random impulse pulses on network parameter updates can be reduced while maintaining smooth optimization in small error regions.
[0070] The second stage is the joint optimization stage with physical constraints. After completing the first stage of training, the Loewner rational spectrum low-rank constraint loss is introduced on top of the Huber reconstruction loss. The total loss function is expressed as:
[0071] in, For Huber's reconstruction losses, For Loewner rational spectral constraint loss, This represents the physical constraint weighting coefficient. In this embodiment, The value increases linearly from 0 to 0.1. This method avoids prematurely imposing strong physical constraints before the network has developed a stable reconstruction capability, thus ensuring a stable transition between the two training phases.
[0072] Through the above two-stage training, the basic context reconstruction capability of the network is first obtained by using reconstruction loss, and then the frequency domain structure of the network output is further restricted by Loewner rational spectrum low-rank constraint. This allows the trained network to maintain signal reconstruction capability while satisfying the spectral structure characteristics of the low-order rational function of electromagnetic response, and to be used for subsequent sliding window prediction and denoised signal reconstruction.
[0073] S5. Use the trained network to perform sliding window prediction on the original detection signal, and reconstruct the signal by adding a window and weighting the superposition to obtain a denoising result with the same length as the original detection signal.
[0074] Specifically, the original detection signal is segmented according to the same sliding window length as during the training phase. Using half the window length as the sliding step size, input windows are constructed segment by segment of the original detection signal and fed into the trained network for prediction. For each input window, the network only outputs the signal reconstruction result of the corresponding central segment. The reconstruction results of each central segment of the complete signal are obtained through continuous sliding window prediction.
[0075] Because there are overlapping areas between adjacent sliding windows, the prediction results of adjacent center segments overlap in the corresponding parts of the original signal. In this embodiment, Hanning windows are used to weight each prediction segment, and the prediction results of overlapping areas are weighted and superimposed to reduce the boundary effect generated at the window splicing point and improve the continuity and smoothness of the entire denoised signal.
[0076] Furthermore, after weighted superposition of all predicted segments, the reconstructed standardized signal is denormalized to restore it to the amplitude range of the original detection signal, ultimately obtaining a denoised signal with the same length as the original detection signal. .
[0077] Through the above steps, the sliding window prediction, signal reconstruction, and denormalization of the original detection signal are completed, resulting in the final denoising result. The obtained denoised signal effectively preserves the electromagnetic response characteristics of pipeline defects while effectively suppressing the interference of background noise on the detection signal, providing more accurate input data for subsequent oil and gas pipeline defect identification, feature extraction, and condition assessment.
[0078] Figure 5 This embodiment demonstrates the denoising effect on the measured pulsed eddy current detection signal. It is easy to see that it extracts the temporal structure of the signal to a great extent and suppresses the irregular fluctuations of the response signal.
[0079] Example 2 This invention relates to a pulsed eddy current detection signal processing device, such as... Figure 2 As shown, the device includes: The signal acquisition module is used to acquire the raw detection signals obtained during the electromagnetic array detection of oil and gas pipelines. The raw detection signals include electromagnetic response information caused by pipeline defects and background noise during the detection process. The sample construction module is used to perform standardized preprocessing on the original detection signal and construct self-supervised training samples based on asymmetric context sliding window mask without needing to obtain the corresponding noiseless reference signal. The network feedforward module is used to input the self-supervised training samples into the convolutional-bidirectional long short-term memory network encoder-decoder network, and fuse contextual temporal features through the cross-attention mechanism between the encoder and decoder to output the signal reconstruction result corresponding to the masked region. The training optimization module is used to optimize the network parameters using a two-stage training strategy. The first stage trains the basic signal recovery capability of the network based on reconstruction loss. The second stage introduces a physical heuristic constraint loss based on the low-rank characteristics of Loewner's rational spectrum on the basis of reconstruction loss, so that the network output satisfies the characterization law of low-order rational function of electromagnetic response. The inference and reconstruction module is used to perform sliding window prediction on the original detection signal using the trained network, and reconstruct the signal by adding a window and weighting the signal to obtain a denoising result with the same length as the original detection signal.
[0080] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0081] Example 3 To implement the methods of the above embodiments, the present invention also provides an electronic device, which includes a memory and a processor; wherein the processor reads executable program code stored in the memory to run a program corresponding to the executable program code, so as to implement the various steps of the methods described above.
[0082] Example 4 To implement the above embodiments, this application also proposes a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in the foregoing embodiments.
[0083] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0084] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0085] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
Claims
1. A pulsed eddy current detection signal processing method, characterized in that, include: The original detection signal obtained during the electromagnetic array detection of oil and gas pipelines is collected. The original detection signal includes electromagnetic response information caused by pipeline defects and background noise during the detection process. The original detection signal is standardized and preprocessed, and a self-supervised training sample based on an asymmetric context sliding window mask is constructed without the need to obtain a corresponding noiseless reference signal. The self-supervised training samples are input into the convolutional bidirectional long short-term memory network encoder-decoder network. The contextual temporal features are fused through the cross-attention mechanism between the encoder and decoder, and the signal reconstruction result corresponding to the masked region is output. A two-stage training strategy is adopted to optimize the network parameters. The first stage trains the basic signal recovery capability of the network based on reconstruction loss. The second stage introduces a physical heuristic constraint loss based on the low-rank characteristics of Loewner's rational spectrum on the basis of reconstruction loss, so that the network output satisfies the characterization law of low-order rational function of electromagnetic response. The trained network is used to perform sliding window prediction on the original detection signal, and the signal is reconstructed by adding window weights and superimposing them to obtain a denoising result with the same length as the original detection signal.
2. The method as described in claim 1, characterized in that, Methods for constructing self-supervised training samples based on asymmetric context sliding window masks include: Let the length of the target center segment be T, the length of the left context be L, and the length of the right context be R. The sliding window length satisfies: While keeping the sliding window length constant, the ratio of the left context length L to the right context length R is randomly adjusted to form the input window sequence: Within each input window, the sampled values corresponding to the central segment are masked, and a corresponding visibility mask is generated. At the same time, the normalized time coordinate is concatenated with the signal value channel and the visibility mask channel to form a multi-channel input sample containing signal value, visibility mask and time coordinate. For boundary regions that exceed the range of the original detection signal, zero values are used for filling, and these regions are marked as invisible regions using a visibility mask.
3. The method as described in claim 1, characterized in that, The convolutional-bidirectional long short-term memory network encoding and decoding architecture includes a convolutional front-end, a bidirectional LSTM encoder, a bottleneck layer, and a bidirectional LSTM decoder. The input sample first passes through two layers of one-dimensional convolution and the GELU activation function to extract local temporal features. The convolutional features are then concatenated with the original three-channel input and fed into a multi-layer bidirectional LSTM encoder. The encoder output is weighted pooled according to the visible mask, and only visible context information is aggregated to generate a global context representation. The global context representation, combined with the average time position of the central segment and the left and right context ratio information, is input into the bottleneck layer to obtain low-dimensional latent variables and map them to the initial hidden state and memory state of the decoder. The decoder receives relative position, absolute center time, and contextual proportion information at each step, and generates a prediction sequence of the center segment point by point.
4. The method as described in claim 3, characterized in that, The fusion of contextual features through a cross-attention mechanism specifically involves: Using the hidden states of the decoder at each time step as the query vector Q, and the hidden states of the encoder at each time step as the key vector K and value vector V respectively, the context fusion features are calculated using scaled dot product attention. The calculation formula is as follows: in, The dimension of the key vector; During the attention calculation process, only the visible context region is normalized, so that each predicted sampling point adaptively selects effective information based on context relevance, and the central mask region and zero-fill region are masked.
5. The method as described in claim 1, characterized in that, The physically inspired constraint loss construction process based on the low-rank property of Loewner's rational spectrum includes: Complete reconstruction sequence output from the first stage of the network Perform a discrete Fourier transform and normalize the result to obtain the corresponding normalized frequency domain response; The support set S and the row sampling set are adaptively selected from the frequency points using a greedy residual criterion. A joint Loewner difference quotient matrix is constructed based on two sets of sampling points, where each element of the Loewner matrix satisfies: In the formula, For row sampling points, As a support point, It is the frequency domain response function; Singular value decomposition of the joint Loewner matrix yields the singular values arranged in descending order. The order-weighted low-rank loss is used as the physical constraint term, and the calculation formula is as follows: Where K is the total number of singular values. is the order weight, p is the penalty strength coefficient, the weight increases with the singular value index, and the penalty focuses on the tail high-rank singular components introduced by noise.
6. The method as described in claim 1, characterized in that, The two-stage training strategy includes: The first stage uses the Huber loss function as the reconstruction loss: in, This is the network prediction value. This represents the original noisy center segment value. This is the hyperparameter for sensitivity to outliers; The second stage introduces a physically inspired constraint loss on top of the reconstruction loss, and the total loss function is expressed as: in, For Huber's reconstruction losses, For Loewner rational spectral constraint loss, These are the physical constraint weighting coefficients; Among them, the physical constraint weights adopt a gradually increasing strategy, so that the physical constraint terms participate in the network optimization from weak to strong, in order to avoid network instability in the early stage of training.
7. The method as described in claim 1, characterized in that, The electromagnetic array detection signals for oil and gas pipelines include pipeline axial stress leakage magnetic flux detection signals and pulsed eddy current detection signals for local metal loss under large overburden layers; The background noise includes one or more of the following: oil and gas flow velocity impact vibration noise, lift-off noise, power frequency interference, and random impact pulse noise.
8. A pulsed eddy current detection signal processing device, characterized in that, include: The signal acquisition module is used to acquire the raw detection signals obtained during the electromagnetic array detection of oil and gas pipelines. The raw detection signals include electromagnetic response information caused by pipeline defects and background noise during the detection process. The sample construction module is used to perform standardized preprocessing on the original detection signal and construct self-supervised training samples based on asymmetric context sliding window mask without needing to obtain the corresponding noiseless reference signal. The network feedforward module is used to input the self-supervised training samples into the convolutional-bidirectional long short-term memory network encoder-decoder network, and fuse contextual temporal features through the cross-attention mechanism between the encoder and decoder to output the signal reconstruction result corresponding to the masked region. The training optimization module is used to optimize the network parameters using a two-stage training strategy. The first stage trains the basic signal recovery capability of the network based on reconstruction loss. The second stage introduces a physical heuristic constraint loss based on the low-rank characteristics of Loewner's rational spectrum on the basis of reconstruction loss, so that the network output satisfies the characterization law of low-order rational function of electromagnetic response. The inference and reconstruction module is used to perform sliding window prediction on the original detection signal using the trained network, and reconstruct the signal by adding a window and weighting the signal to obtain a denoising result with the same length as the original detection signal.
9. An electronic device, characterized in that, Including processor and memory; The processor reads executable program code stored in the memory to run a program corresponding to the executable program code, so as to implement the method as described in any one of claims 1-7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.
