Computer-based method and apparatus for corrosion analysis of piping equipment, and storage medium

By employing sparse signal representation and deep learning super-resolution reconstruction techniques, the problem of identifying weak corrosion signals in existing technologies has been solved, enabling early corrosion detection of pipeline equipment and improving detection accuracy and reliability.

CN122365094APending Publication Date: 2026-07-10SICHUAN PROVINCE HUACHUAN INSTALL ENG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SICHUAN PROVINCE HUACHUAN INSTALL ENG CO LTD
Filing Date
2026-05-13
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing current signal detection methods are insufficient to effectively identify minor corrosion problems in pipelines and equipment in the early stages of corrosion, resulting in the inability to detect potential corrosion risks in a timely manner.

Method used

By employing dynamic super-resolution reconstruction technology based on sparse signal representation, a high-precision current sensor is used to collect weak current signals. Combined with a sparse dictionary and a deep learning super-resolution network, the weights of sparse coefficients and network parameters are dynamically adjusted to enhance the reconstruction and recognition of weak corrosion signals.

Benefits of technology

It enables high-precision reconstruction and early identification of weak corrosion signals, improves the sensitivity and reliability of corrosion detection for pipeline equipment, and provides a guarantee for safe operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122365094A_ABST
    Figure CN122365094A_ABST
Patent Text Reader

Abstract

The application relates to the computer technical field and discloses a computer-based pipeline equipment corrosion analysis method and device and a storage medium. The method comprises the following steps: collecting a pipeline weak current signal and denoising; performing sparse decomposition by using an adaptive sparse dictionary, identifying a weak corrosion feature area by local energy distribution, and dynamically adjusting sparse coefficient weights; adaptively selecting a deep learning super-resolution network according to sparse coefficient distribution characteristics and adjusting parameters to enhance and reconstruct the signal; extracting time-frequency features of the enhanced signal and inputting the deep learning model to identify corrosion and give early warning. The application can effectively enhance the weak corrosion signal, improve the early corrosion detection accuracy, and realize real-time early warning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to computer-based methods, apparatus, and storage media for corrosion analysis of pipeline equipment. Background Technology

[0002] During long-term operation, pipeline equipment is susceptible to corrosion due to both external environmental factors (such as temperature, humidity, and corrosive gases) and internal factors (such as pressure fluctuations and friction). Corrosion not only affects the stability and safety of pipelines but can also lead to serious economic losses and safety accidents. Especially in the early stages of corrosion, the corrosion phenomenon manifests as weak changes in electrical current signals, which traditional detection methods such as visual inspection, ultrasonic testing, and magnetic detection are difficult to effectively capture.

[0003] Existing methods for detecting corrosion based on current signals can monitor corrosion to some extent, but most methods do not adequately consider the processing and enhancement of weak signals, resulting in the inability to detect potential corrosion problems in their early stages. Therefore, how to enhance the detection accuracy of weak current signals and identify the presence of corrosion at an early stage has become a major challenge in current technology. Summary of the Invention

[0004] To address the technical problems mentioned in the background, this application provides a computer-based method, apparatus, and storage medium for analyzing corrosion of pipeline equipment. By using dynamic super-resolution reconstruction technology based on sparse signal representation to improve the reconstruction quality of weak current signals, early corrosion signals become clearer and more identifiable, thereby achieving high-precision early corrosion warning and avoiding the risk of pipeline equipment not being detected in the early stages of corrosion.

[0005] According to a first aspect of this application, a computer-based corrosion analysis method for pipeline equipment is provided, comprising: S1: A high-precision current sensor is used to collect weak current signals reflecting the corrosion state on or inside the pipe surface in real time, and the collected current signals are processed by wavelet transform to denoise them, so as to obtain the target current signal. S2, the target current signal is sparsely decomposed using a pre-constructed adaptive sparse dictionary to obtain sparse coefficients; and, by calculating the local energy distribution of the target current signal in the time domain or frequency domain, the region where the weak corrosion features are located is identified, and the weight of the corresponding sparse coefficient is dynamically adjusted according to the local energy level of the region, so that the weak but critical corrosion information is enhanced in the sparse representation. S3, based on the distribution characteristics of the sparse coefficients, adaptively select a deep learning super-resolution network that matches the target current signal and dynamically adjust the network parameters, and enhance and reconstruct the target current signal based on the adjusted deep learning super-resolution network to obtain a high-resolution signal. S4. Extract time-domain and frequency-domain features from the high-resolution signal, input them into the trained deep learning model for corrosion identification, and issue a corrosion warning when the identification result exceeds a preset threshold.

[0006] According to a second aspect of this application, a computer-based pipeline corrosion analysis device is provided, the device comprising: The signal acquisition and preprocessing unit is used to acquire weak current signals reflecting the corrosion state on the surface or inside of the pipe in real time through a high-precision current sensor, and to perform wavelet transform noise reduction processing on the acquired current signals to obtain the target current signal. The sparse representation and weight adjustment unit is used to perform sparse decomposition on the target current signal using a pre-constructed adaptive sparse dictionary to obtain sparse coefficients; and to identify the region where weak corrosion features are located by calculating the local energy distribution of the target current signal in the time domain or frequency domain, and dynamically adjust the weight of the corresponding sparse coefficients according to the local energy level of the region, so that the weak but critical corrosion information is enhanced in the sparse representation. The super-resolution reconstruction unit is used to adaptively select a deep learning super-resolution network that matches the target current signal based on the distribution characteristics of the sparse coefficients and dynamically adjust the network parameters, and enhance and reconstruct the target current signal based on the adjusted deep learning super-resolution network to obtain a high-resolution signal. The corrosion identification and early warning unit is used to extract time-domain and frequency-domain features from the high-resolution signal, input them into a trained deep learning model for corrosion identification, and issue a corrosion early warning when the identification result exceeds a preset threshold.

[0007] According to a third aspect of this application, a storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the preceding claims.

[0008] Compared with existing technologies, this invention dynamically adjusts the sparsity coefficient weights based on local energy distribution, effectively highlighting weak feature regions in the early stages of corrosion while suppressing background noise interference. By adaptively selecting and adjusting the parameters of the super-resolution network according to the characteristics of the sparsity coefficient distribution, the signal reconstruction process highly matches the characteristics of the current signal itself, avoiding the over-smoothing or noise amplification problems caused by traditional fixed models. Consequently, weak corrosion signals that were originally submerged in noise can be clearly reconstructed. Based on this, the deep learning model can accurately identify early signs of corrosion, achieving early warning and significantly improving the sensitivity and reliability of pipeline corrosion detection, providing strong protection for the safe operation of pipeline equipment. Attached Figure Description

[0009] Figure 1 A schematic flowchart of a computer-based corrosion analysis method for pipeline equipment provided in this application embodiment; Figure 2 This is a schematic diagram of the structure of the hybrid deep learning model provided in the embodiments of this application; Figure 3 A schematic diagram of a computer-based pipeline corrosion analysis device provided in this application embodiment; Figure 4 This is a schematic diagram of the sparse representation and weight adjustment unit provided in an embodiment of this application. Detailed Implementation

[0010] The technical solutions of this disclosure will be described in detail below with reference to specific embodiments. It should be understood that the specific embodiments described herein are only for explaining this disclosure and are not intended to limit the scope of protection of this disclosure.

[0011] The solution in this embodiment can be deployed on the server or cloud system corresponding to the pipeline monitoring platform for online monitoring and early warning of corrosion status of pipeline equipment. This monitoring platform provides functional modules such as data acquisition, signal processing, status assessment, and alarm push notifications, providing a carrier for the implementation of the method of this invention.

[0012] like Figure 1 As shown in the figure, this application discloses a computer-based corrosion analysis method for pipeline equipment, the method comprising the following steps: S1: A high-precision current sensor is used to collect weak current signals reflecting the corrosion state on or inside the pipe surface in real time, and the collected current signals are processed by wavelet transform to denoise them, so as to obtain the target current signal. The sensor should possess high sensitivity (e.g., ability to detect current changes below 10µA) and a wide bandwidth response (e.g., 0Hz-10kHz) to accommodate the capture of weak signals in the early stages of corrosion. Let the initial current signal acquired by the sensor at time t be... The sampling frequency was set to 20kHz, thus obtaining the discrete time series. , where n is the index of the sampling point.

[0013] To eliminate environmental noise and sensor noise, wavelet transform denoising is performed on the original signal. This embodiment uses the Daubechies wavelet basis (e.g., db4) to perform a 5-level wavelet decomposition on the signal. Low-frequency approximation coefficients are extracted, and high-frequency detail coefficients are set to zero before reconstruction to obtain the denoised target current signal. This step effectively filters out high-frequency interference while preserving the low-frequency characteristics of the corrosion signal.

[0014] S2, the target current signal is sparsely decomposed using a pre-constructed adaptive sparse dictionary to obtain sparse coefficients; and, by calculating the local energy distribution of the target current signal in the time domain or frequency domain, the region where the weak corrosion features are located is identified, and the weight of the corresponding sparse coefficient is dynamically adjusted according to the local energy level of the region, so that the weak but critical corrosion information is enhanced in the sparse representation. This step aims to convert the target current signal into the sparse domain and accurately identify the region where weak corrosion features are located through local energy analysis and waveform feature matching. Then, the weight of the sparse coefficient is dynamically adjusted so that the weak but critical corrosion information is enhanced in the subsequent reconstruction.

[0015] In some embodiments, the target current signal is sparsely decomposed using a pre-constructed adaptive sparse dictionary to obtain sparse coefficients, including: S21, an adaptive sparse dictionary is trained from historical current signal samples using the K-SVD dictionary learning algorithm, and the target current signal is sparsely decomposed using the orthogonal matching pursuit algorithm to obtain the corresponding sparse coefficients; wherein, the atoms of the adaptive sparse dictionary can be adaptively updated according to the signal characteristics.

[0016] Specifically, historical current signal samples were collected, including signals from the pipeline's normal operating state and different corrosion stages (including early, middle, and late corrosion). Each sample was truncated into 64 sampling points as basic units to construct a training dataset. The K-SVD dictionary learning algorithm was used to train this dataset, resulting in an adaptive sparse dictionary. The dictionary contains 256 atoms, each with a length of 64.

[0017] The K-SVD algorithm, through iterative optimization, enables the dictionary atoms to adaptively update based on the characteristics of the training data, thereby accurately representing the sparse structure of current signals at different corrosion stages. In other words, the atoms in the dictionary are no longer fixed but evolve continuously with the addition of new data to optimally match the local morphology of the signal.

[0018] For the target current signal at the current moment The time domain is divided into 64 time-domain segments, with 32 sampling points overlapping between adjacent segments to avoid boundary effects and ensure feature continuity. Let the first segment be... The signal vectors corresponding to each segment are Its elements are ,in .

[0019] The orthogonal matching pursuit algorithm is used to perform sparse decomposition on each segment. Sparsity constraints are set. (That is, each fragment can be represented by a linear combination of at most 10 atoms), solve the following optimization problem: ; ; Obtain the sparse coefficient vector ,in , quantity Indicates the first The atom is reconstructing the first atom. The contribution weights for each segment are calculated. Due to sparsity constraints, the vast majority of elements in this vector are zero, and the positions of non-zero elements correspond to the activated atom indices, with the numerical values ​​representing the degree of contribution. In this way, each signal segment obtains its sparse representation, forming an initial set of sparse coefficients. .

[0020] In some embodiments, by calculating the local energy distribution of the target current signal in the time or frequency domain, the region where the weak corrosion characteristics are located is identified, and the weight of the corresponding sparsity coefficient is dynamically adjusted according to the local energy level of the region, including: S22, the target current signal is divided into multiple time-domain or frequency-domain segments, the local energy value of each segment is calculated, and the local energy distribution curve is obtained; After sparse decomposition, regions potentially containing weak corrosion characteristics are identified from all signal segments. Since the current signal in the early stages of corrosion is extremely weak, its energy is typically much lower than the background energy under normal operating conditions. Therefore, by analyzing the local energy distribution of the signal segments, suspicious areas can be preliminarily located. This step first divides the target current signal into multiple time-domain or frequency-domain segments, and then calculates the local energy value of each segment to obtain the local energy distribution curve. Specifically: First, the denoised target current signal obtained in step S1 is processed... Perform temporal segmentation. For example, using a sliding window approach, divide the segment into segments of length [length missing]. The discrete signal sequence is divided into several segments of equal length, each segment having a length of... There are 10 sampling points. To ensure the continuity and integrity of features and avoid boundary effects, overlapping regions are set between adjacent segments, with an overlap length of 100 mm. There are 32 sampling points, meaning the sliding step size is 32. Let the segment index be... Then the first The signal vector corresponding to each segment Defined as: ; in, This represents the amplitude of the sampling point. Through this overlapping division method, each sampling point participates in the energy calculation of multiple segments, ensuring a smooth transition and complete coverage of signal characteristics.

[0021] For each segment obtained from the division Calculate its local energy value Local energy is defined as the sum of the squares of the amplitudes of all sampling points within a segment, used to characterize the total energy level of the signal within the corresponding time period. The calculation formula is: ; in, Indicates the first The first segment in the segment Each sampling point represents a local energy value that reflects the overall signal strength within that segment. For background signals under normal operating conditions, the energy value typically remains within a relatively stable range; however, when corrosion occurs, the energy value of the corresponding segment will be significantly lower than the background energy level because the initial current change is extremely weak.

[0022] Arrange the local energy values ​​of all fragments in fragment index order to obtain the local energy sequence. The sequence is then normalized by dividing it by the maximum energy value among all segments. The normalized local energy value is obtained as follows: ; Will With fragment index The changes in energy are plotted as a curve, which is the local energy distribution curve. This curve intuitively reflects the fluctuation of signal energy over time (or space): areas with higher energy correspond to periods with stronger signal amplitude (such as normal operation), while areas with lower energy may correspond to periods with weaker signal (such as the initial stage of corrosion or noise interference).

[0023] It should be noted that, in addition to time-domain partitioning, this step can also employ frequency-domain segmentation. Specifically, the signal can be converted to the frequency domain using short-time Fourier transform or wavelet transform, then frequency bands can be divided on the frequency axis, and the energy value of each band can be calculated to obtain the frequency domain energy distribution curve. Frequency domain partitioning helps analyze the energy changes of different frequency components in the signal and is more targeted at corrosion characteristics appearing in certain specific frequency ranges.

[0024] S23, based on the local energy distribution curve, identify the region where the energy value is lower than the preset threshold but the waveform change characteristics match the early corrosion signal characteristics as the region where the weak corrosion characteristics are located. To accurately identify these subtle corrosion features, this invention employs a strategy that combines energy threshold judgment with waveform feature matching to ensure that subtle corrosion signals can be effectively identified even in complex signal environments.

[0025] In some embodiments, regions with energy values ​​below a preset threshold but whose waveform change characteristics match those of the initial corrosion signal are identified based on the local energy distribution curve as regions containing weak corrosion characteristics, including: S231, Based on the local energy distribution curve, time-domain or frequency-domain segments with energy values ​​lower than a preset threshold are selected as candidate segments; Let the set of candidate segments be ,in For fragment index, For the first The local energy values ​​of each fragment. These fragments are regions with significantly low energy, which may contain weak corrosion signals or noise, requiring further analysis in subsequent steps.

[0026] S232, perform joint sparse coding on each candidate segment and the time window composed of multiple adjacent segments before and after it, and apply group sparse constraints so that the sparse coefficients of each segment in the window share the same set of activation atoms under the adaptive sparse dictionary, and obtain the combination of activation atoms that characterizes the waveform change features of the candidate segment and its neighborhood. Corrosion signals exhibit temporal continuity and stability, and their waveform characteristics are not only reflected within individual segments but also manifested in the correlation between adjacent segments. Therefore, this step considers the temporal window formed by candidate segments and their neighboring segments, and extracts shared atomic activation patterns through joint sparse coding, which serve as the representation of waveform features.

[0027] For each candidate fragment Take itself and the two adjacent segments before and after it (a total of 5 segments) to form a time window. However, if the window is too small, it will be difficult to capture continuous features; if the window is too large, it may introduce interference and increase the computational load. Therefore, this application preferably uses a window size of 5. The signal vector of each segment within the window is denoted as... .

[0028] Joint sparse coding is performed on all 5 segments within the window, and a set of sparsity constraints is applied. The goal of joint sparse coding is to find a set of sparse coefficients such that each segment can be represented by a dictionary. The system uses a small number of atoms in a linear representation, while requiring these five segments to share the same set of active atoms during the encoding process.

[0029] Let the signal matrix of the 5 segments within the window be... The corresponding sparse coefficient matrix is Group sparse coding is achieved by solving the following optimization problem: ; in, For group sparse regularization terms, The first element of the coefficient matrix represents the first element of the coefficient matrix. line (corresponding to the first) (coefficient vector of each atom across all 5 segments). These are the weighting coefficients; Let Frobenius norm be the square root of the sum of the squares of all elements in the matrix. This regularization term encourages rows to be either all zero or all non-zero, thus ensuring that each segment shares the same set of activated atoms. The group orthogonal matching pursuit algorithm is used to solve the above problem, resulting in an optimized sparse coefficient matrix. .

[0030] from Extract candidate fragments Corresponding activated atom combinations ,Right now The set of row indices corresponding to non-zero rows. It reflects the sparse structure that candidate segments and their neighboring waveform variation features commonly depend on, and is a compact expression of waveform features.

[0031] S233, calculate the matching degree between the activated atom combination and the typical atom combination in the pre-constructed early corrosion signal waveform feature dictionary. If the matching degree exceeds the preset threshold, the candidate segment is determined to be the region where the weak corrosion feature is located.

[0032] To determine the active atom combination Whether it matches the waveform characteristics of the initial corrosion signal requires pre-constructing a waveform feature dictionary of the initial corrosion signal. The construction process is as follows: First, a large number of historical signal segments known to be in the early stages of corrosion (each segment is 64 points long) are collected. For each early corrosion segment, its activation atom combinations are extracted according to the method described in step S232 above, resulting in a series of atom index sets. Then, these atom index sets are clustered using the K-means clustering algorithm. Since the atom index sets are discrete, they are converted into 256-dimensional binary vectors (the first 64 points are not specified in the original text). Dimension 1 indicates the first If an atom is in the set, the result is 0; otherwise, the result is 0. Cluster number. Take 10, and you get Cluster centers ( Each cluster center is a 256-dimensional real-valued vector. To facilitate subsequent matching, the cluster center vectors are binarized (with a threshold of 0.5) to obtain typical binary atomic combination patterns. .

[0033] For candidate fragments Activated atom combination Calculate its relationship with each typical pattern The degree of matching. For example, the Jaccard similarity coefficient can be used: ; Take the maximum similarity Set a matching threshold. .like If the waveform change characteristics of the candidate segment match the signal characteristics of the initial stage of corrosion, it is marked as the region where the weak corrosion characteristics are located, and denoted as region . ;like If the candidate fragment is not identified as noise or other non-corrosive factor, it will be considered as such and will not be marked.

[0034] S24 assigns a higher weight to the sparsity coefficient of the region where the weak corrosion feature is located than that of other regions, and makes a suppressive adjustment to the sparsity coefficient of other regions.

[0035] For the areas where the aforementioned weak corrosion features are located (i.e., the set of fragment indexes identified as being in the early stages of corrosion). Although the signals in these regions have low energy, they contain crucial corrosion information and need to be enhanced in subsequent super-resolution reconstruction; while other regions (non-corruption areas) The sparse coefficients mainly contain background noise or irrelevant signals, which should be suppressed to avoid interfering with the reconstruction results. Therefore, this step performs differential weighting on the sparse coefficients.

[0036] Let the first The initial sparse coefficient vector obtained by orthogonal matching tracing of the segments is: Based on the region identification results, the weighting coefficients are defined as follows: If the fragment belongs to a region with weak corrosion characteristics ( ), assign enhanced weights Preferably, take The purpose of this weight is to amplify the values ​​of all non-zero elements in the sparse coefficients of the segment, thereby making the signal components corresponding to the segment more significantly represented during subsequent signal reconstruction.

[0037] If the fragment does not belong to the area with weak corrosion characteristics ( Assign suppression weights Preferably, take The role of this weight is to attenuate the amplitude of the sparse coefficients of the segment, reduce its reconstruction contribution, and thus suppress background noise and irrelevant fluctuations.

[0038] Weighted sparsity coefficients Represented as: ; It should be noted that the signal is extremely weak in the early stages of corrosion, with an amplitude typically only a fraction of the background noise. Amplification by 1.5x can bring it up to a level comparable to a normal signal, while avoiding over-amplification that could lead to distortion. (Suppression weights) The choice is to suppress noise while retaining a certain amount of signal energy, preventing the complete elimination of any weak features that may exist (because region identification is not 100% accurate). Understandably, the weights can be fine-tuned based on the signal dynamic range and noise level.

[0039] S3, based on the distribution characteristics of the sparse coefficients, adaptively select a deep learning super-resolution network that matches the target current signal and dynamically adjust the network parameters, and enhance and reconstruct the target current signal based on the adjusted deep learning super-resolution network to obtain a high-resolution signal. In this step, the sparse coefficients obtained in step S2 after local energy weighting are used. The distribution characteristics of the target current signal are analyzed, and based on these characteristics, a deep learning super-resolution network that matches the target current signal is adaptively selected. The network parameters are dynamically adjusted to improve the performance of the target current signal. Enhanced reconstruction was performed to obtain a high-resolution signal. .

[0040] In some embodiments, based on the distribution characteristics of the sparse coefficients, adaptively selecting a deep learning super-resolution network that matches the target current signal and dynamically adjusting the network parameters includes: S31, Analyze the distribution characteristics of the sparse coefficients, including sparsity, the distribution range of non-zero coefficients and their corresponding frequency components; Calculate the adjusted sparsity coefficients of all segments. Analyze the following distribution characteristics: sparsity Defined as the ratio of the total number of non-zero coefficients to the total number of coefficients. Let the total number of segments be... If the length of the sparse coefficient vector for each segment is 256, then the total number of coefficients is... Statistics of all The number of non-zero elements The sparsity is then: ; Sparsity reflects how concise the representation of a signal is in the dictionary: Larger signals have relatively complex structures and require more atoms to represent them. A smaller value indicates strong signal sparsity and a simple structure.

[0041] Distribution range of non-zero coefficients: For each atom corresponding to a non-zero coefficient, its frequency characteristics need to be understood. (Due to the dictionary...) Each atom in the dictionary is a time-domain waveform of length 64, and its dominant frequency can be obtained through Fourier transform. Specifically, for the first atom of the dictionary... Atoms Perform a Fast Fourier Transform to obtain the spectrum, and extract the frequency with the largest amplitude as the dominant frequency of the atom. For all non-zero coefficients, statistically analyze the dominant frequency distribution of their corresponding atoms. Let the set of dominant frequencies corresponding to all non-zero coefficients be denoted as . Calculate its mean and standard deviation And the percentage of the main frequency in different frequency bands is calculated: Low frequency band: ; Mid-frequency band: ; High frequency band: ; Narrow distribution range Small and concentrated in the low-frequency band, indicating that the signal energy is mainly concentrated in the low frequency range; wide distribution range ( (Large) and covering both high and low frequencies, indicating that the signal contains rich details.

[0042] In addition, the complexity of the target current signal is calculated: the variance of the sparse coefficient distribution is used as a measure of signal complexity. For the ... For each segment, calculate its sparse coefficient vector. variance Then, the average variance of all segments is taken as the overall complexity index: ; High complexity ( Large sparse coefficients mean large fluctuations in sparsity and rich signal details; low complexity ( (Small) means the signal is stable.

[0043] S32, adaptively select a matching deep learning super-resolution network based on the distribution characteristics of the sparse coefficients, specifically: When the distribution range of non-zero coefficients is narrow and concentrated in the low-frequency region, and the sparsity is high, a shallow super-resolution network is selected; when the distribution range of non-zero coefficients is wide and covers both high and low frequency regions, and the sparsity is low, a deep super-resolution network is selected. Based on the distribution characteristics obtained from the aforementioned analysis, a super-resolution network suitable for the current signal characteristics is adaptively selected. This embodiment pre-defines two networks: a shallow network FSRCNN (Fast Super-Resolution Convolutional Neural Network, 9 convolutional layers) and a deep network VDSR (Very Deep Super-Resolution, 20 convolutional layers). The selection criteria are as follows: (1) If the distribution range of non-zero coefficients is narrow ( And it is mainly concentrated in the low-frequency region (low-frequency proportion >80%), while having a high sparsity. The result indicates that the signal structure is relatively simple, with the main energy concentrated in the low frequencies. In this case, the shallow super-resolution network FSRCNN is chosen. This network has fewer layers and parameters, and its computation speed is fast. It is suitable for processing smooth signals, can effectively reconstruct low-frequency components, and avoids excessive amplification of noise.

[0044] (2) If the distribution range of non-zero coefficients is wide ( It covers both high and low frequency regions (high frequency ratio > 20%), while having low sparsity. This indicates that the signal contains rich details and requires stronger reconstruction capabilities. Therefore, a deep super-resolution network (VDSR) is chosen. This network, with 20 convolutional layers, has a larger receptive field and stronger nonlinear representation capabilities, effectively recovering high-frequency details.

[0045] It should be noted that the above thresholds (0.5kHz, 80%, 20%, 0.3) can be adjusted according to the actual data distribution; this embodiment is only an example.

[0046] S33, dynamically adjust the parameters of the selected network according to the distribution characteristics of the sparse coefficients, specifically: The size of the convolution kernel is adjusted according to the distribution range of the non-zero coefficients to match the scale of the signal features, the number of network layers is adjusted according to the complexity of the target current signal, and the threshold of the activation function is adjusted according to the sparsity and noise level.

[0047] Based on the selected network type, its internal parameters are further dynamically adjusted according to the distribution characteristics to ensure that the network structure highly matches the current signal characteristics. Specifically: Kernel size adjustment: based on the distribution range of non-zero coefficients (i.e., the standard deviation of the dominant frequency). Adjust the size of the convolution kernel. The size of the convolution kernel determines the receptive field and the scale of feature extraction.

[0048] like A smaller frequency response (<0.5kHz) indicates concentrated signal frequency components and small local feature scales. Therefore, a small convolution kernel (e.g., 3×3) should be used to capture subtle local variations. A larger value (≥0.5kHz) indicates a wide frequency distribution of the signal and the presence of multi-scale features. A large convolution kernel (such as 5×5) is selected to cover a wider range of contextual information and extract multi-scale features.

[0049] Adjusting the number of network layers: based on the complexity of the target current signal. Adjust the number of network layers. When complexity is high, appropriately increase the number of layers to enhance the model's expressive power.

[0050] If FSRCNN (basic 9 layers) is selected, when When the complexity exceeds a preset threshold (e.g., the average complexity of all training samples), two more convolutional layers can be added to FSRCNN, bringing the network to 11 layers. If VDSR (based on 20 layers) is selected, when... At higher levels, 2-4 layers of residual blocks can be added to the VDSR to enhance nonlinear mapping capabilities; when When the number of layers is low, the original number of layers can be maintained or the number of layers can be appropriately reduced to reduce the amount of computation.

[0051] Activation function threshold adjustment: based on sparsity The threshold of the ReLU activation function is adjusted based on the noise level. ReLU is typically... The threshold is 0. When the noise level is high, some noise may generate small positive activation values, causing the noise to be propagated. This embodiment suppresses noise by adjusting the threshold.

[0052] The noise level can be estimated from the residual signal after wavelet denoising: residual signal variance This reflects the noise intensity. When Larger (high noise level) and sparser When the value is low (the signal itself is inactive), the ReLU threshold is increased from 0 to 0.1, meaning the activation function becomes... This suppresses small-amplitude noise activation. When the noise level is low or the signal is active ( When the threshold is high, keep it at 0 to retain all valid features.

[0053] Through the above adjustments, the network parameters can adaptively match the characteristics of the current signal, making the super-resolution reconstruction process more accurate.

[0054] S4. Extract time-domain and frequency-domain features from the high-resolution signal, input them into the trained deep learning model for corrosion identification, and issue a corrosion warning when the identification result exceeds a preset threshold.

[0055] After the aforementioned processing, the high-resolution signal The sampling rate can be increased to 80kHz, containing rich detail information. To effectively characterize the corrosion state, features that characterize its statistical properties and spectral distribution need to be extracted from the signal. This embodiment uses a sliding window approach. Feature extraction is performed.

[0056] For example, Divided into several analysis windows, each window is of length Each sampling point has overlapping adjacent windows. Points are used to ensure the continuity of features. Let the window index be... Then the first The signal segment within each window is .

[0057] For each window Extract the following time-domain and frequency-domain features to construct a feature vector. (The specific number of dimensions can be adjusted according to the actual design).

[0058] (1) Temporal features (8 dimensions in total): mean ; variance ; peak ; cliff ; Waveform factor ; Skewness ; Peak factor ; Pulse factor ; (2) Frequency domain characteristics: for each window Perform a Fast Fourier Transform to obtain the spectrum. Based on the spectrum, the following features are extracted (total 120 dimensions, including 1 dimension each for spectral centroid and dispersion, and 118 dimensions for frequency band energy proportion): Spectral centroid ; Spectral Dispersion ; The frequency range of 0-40kHz (according to the sampling theorem) is divided into 118 equal-width frequency bands (each band is approximately 338Hz wide), and the energy percentage of each frequency band is calculated: ; By concatenating all features, a 128-dimensional feature vector for each window is obtained. To smooth out short-term fluctuations, the average of the feature vectors from all windows is taken every second (corresponding to approximately 19.5 windows) as the final feature vector for that second. In actual deployment, a feature vector is output every second for real-time monitoring.

[0059] This embodiment employs a CNN-LSTM hybrid deep learning model to identify erosion states from features of continuous time series. For example... Figure 2 As shown, the model structure is as follows: Input layer: Accepts a 10-second sequence of feature vectors, i.e., the input dimension is... Each 128-dimensional feature vector is treated as the input for one time step.

[0060] CNN module: Used to extract local features within each time step. First, the input is reshaped into... Then, a one-dimensional convolution is applied independently at each time step. Specifically, two layers of one-dimensional convolution are used: Layer 1: Kernel size 3, stride 1, output channels 32, activation function ReLU. This layer convolves the 128-dimensional features at each time step to extract locally correlated features, with an output size of [missing information]. (Since there is no padding in the convolution, the length is reduced from 128 to 126).

[0061] Second layer: kernel size 3, stride 1, output channels 64, activation function ReLU, output size is... .

[0062] This is followed by a global average pooling layer, which averages the features along the feature length dimension to obtain a 64-dimensional feature vector at each time step, with an output size of [size missing]. .

[0063] LSTM module: Used to capture temporal dependencies. The 64-dimensional feature sequence from 10 time steps of the CNN output is input into a two-layer LSTM: The first LSTM layer has 64 hidden units and returns a sequence (i.e., the hidden state at each time step). The output size is... .

[0064] The second LSTM layer has 64 hidden units and only returns the output of the last time step. The output size is... .

[0065] Output layer: A fully connected layer that maps a 64-dimensional vector to 2 dimensions (corresponding to normal and eroded classes), followed by a softmax activation function to output the erosion probability. (i.e., the probability of the corrosion category).

[0066] The model training process and parameter settings are as follows: Historical high-resolution signals and their corresponding corrosion state labels are collected. The labels are divided into three categories: normal, early corrosion stage, and mid-to-late corrosion stage. In this embodiment, the early and mid-to-late corrosion stages are merged into a single "corrosion" class for binary classification. The training set contains 8000 normal samples (each sample is a 10-second consecutive feature vector sequence) and 3000 corrosion samples (2000 in the early stage and 1000 in the mid-to-late stage). Samples are generated from historical data using a sliding window method, with adjacent samples overlapping by 5 seconds to increase the data volume.

[0067] All features are standardized by subtracting the mean and dividing by the standard deviation to bring the features to a similar scale. The standardization parameters are calculated from the training set and stored for use in real-time monitoring of the input features.

[0068] The loss function used is the cross-entropy loss function, the optimizer used is the Adam optimizer, and the initial learning rate is 0.001.

[0069] Training parameters were set as follows: batch size 64, training epochs 50. Early stopping (patience=5) and dropout (adding a dropout layer with a probability of 0.5 after the CNN and fully connected layers) were used to prevent overfitting. Accuracy was evaluated on the validation set after each epoch during training, and the best model was saved.

[0070] During the real-time monitoring phase, one feature vector is obtained every second. The current time is concatenated with the feature vectors from the previous 9 seconds to form a sequence of length 10 seconds. Input the trained CNN-LSTM model to obtain the erosion probability at the current time step. .

[0071] Set early warning threshold To reduce false alarms, a continuous judgment mechanism is adopted: an alert is triggered when the corrosion probability exceeds a threshold for three consecutive seconds. That is, if... , , If both conditions are met, then corrosion is determined to have occurred.

[0072] Once an alert is triggered, it is pushed to maintenance personnel's mobile devices or the monitoring center's large screen via the cloud platform. The alert information includes: corrosion probability value and its trend graph; time of occurrence (accurate to the second); pipeline location (sensor number and GPS coordinates); and associated high-resolution signal segments and characteristic curves for manual verification. Simultaneously, an alert log is recorded, including the trigger time, probability value, and subsequent maintenance procedures, for later analysis and model optimization.

[0073] like Figure 3 As shown in the figure, this application embodiment also provides a computer-based pipeline equipment corrosion analysis device 100, the device comprising: The signal acquisition and preprocessing unit 10 is used to acquire weak current signals reflecting the corrosion state on the surface or inside of the pipe in real time through a high-precision current sensor, and to perform wavelet transform noise reduction processing on the acquired current signals to obtain the target current signal. The sparse representation and weight adjustment unit 20 is used to perform sparse decomposition on the target current signal using a pre-constructed adaptive sparse dictionary to obtain sparse coefficients; and to identify the region where weak corrosion features are located by calculating the local energy distribution of the target current signal in the time domain or frequency domain, and dynamically adjust the weight of the corresponding sparse coefficients according to the local energy level of the region, so that the weak but critical corrosion information is enhanced in the sparse representation. The super-resolution reconstruction unit 30 is used to adaptively select a deep learning super-resolution network that matches the target current signal according to the distribution characteristics of the sparse coefficients and dynamically adjust the network parameters, and enhance and reconstruct the target current signal according to the adjusted deep learning super-resolution network to obtain a high-resolution signal. The corrosion identification and early warning unit 40 is used to extract time-domain and frequency-domain features from the high-resolution signal, input them into a trained deep learning model for corrosion identification, and issue a corrosion warning when the identification result exceeds a preset threshold.

[0074] In some embodiments, such as Figure 3 As shown, the sparse representation and weight adjustment unit 20 includes a sparse decomposition subunit 201, used for: An adaptive sparse dictionary is trained from historical current signal samples using the K-SVD dictionary learning algorithm, and the target current signal is sparsely decomposed using the orthogonal matching pursuit algorithm to obtain the corresponding sparse coefficients; wherein, the atoms of the adaptive sparse dictionary can be adaptively updated according to the signal characteristics.

[0075] In some embodiments, continue reading Figure 4 The sparse representation and weight adjustment unit 20 further includes a weight adjustment subunit 202, used for: The target current signal is divided into multiple time-domain or frequency-domain segments, and the local energy value of each segment is calculated to obtain the local energy distribution curve. Based on the local energy distribution curve, regions with energy values ​​below a preset threshold but whose waveform change characteristics match those of the initial corrosion signal are identified as areas with weak corrosion characteristics. The sparsity coefficients of regions with weak corrosion features are assigned higher weights than those of other regions, and the sparsity coefficients of other regions are adjusted in a suppressive manner.

[0076] In some embodiments, the specific process by which the weight adjustment subunit 202 identifies the region containing weak corrosion features includes: Based on the local energy distribution curve, time-domain or frequency-domain segments with energy values ​​below a preset threshold are selected as candidate segments. Joint sparse coding is performed on each candidate segment and the time window composed of multiple adjacent segments before and after it, and group sparse constraints are applied so that the sparse coefficients of each segment in the window share the same set of activation atoms under the adaptive sparse dictionary, thus obtaining the combination of activation atoms that characterizes the waveform change features of the candidate segment and its neighborhood. The matching degree between the activated atom combination and the typical atom combinations in the pre-constructed waveform feature dictionary of the initial corrosion signal is calculated. If the matching degree exceeds a preset threshold, the candidate segment is determined to be the region where the weak corrosion feature is located.

[0077] In some embodiments, the super-resolution reconstruction unit 30 is specifically used to implement: Analyze the distribution characteristics of the sparse coefficients, including sparsity, the distribution range of non-zero coefficients, and their corresponding frequency components; Based on the distribution characteristics of the sparse coefficients, a matching deep learning super-resolution network is adaptively selected, specifically: When the distribution range of non-zero coefficients is narrow and concentrated in the low-frequency region, and the sparsity is high, a shallow super-resolution network is selected; when the distribution range of non-zero coefficients is wide and covers both high and low frequency regions, and the sparsity is low, a deep super-resolution network is selected. The parameters of the selected network are dynamically adjusted based on the distribution characteristics of the sparse coefficients, specifically: The size of the convolution kernel is adjusted according to the distribution range of the non-zero coefficients to match the scale of the signal features, the number of network layers is adjusted according to the complexity of the target current signal, and the threshold of the activation function is adjusted according to the sparsity and noise level.

[0078] This application also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the preceding claims.

[0079] Specifically, the storage medium may be a hard disk, flash memory, optical disk, removable storage device, or other type of computer-readable medium used to store an instruction set. When the computer program is loaded into a computer or processor, the steps of the method are executed, thereby realizing corrosion analysis and early warning of pipeline equipment.

[0080] By implementing this storage medium, users can apply the pipeline corrosion analysis method of this invention to actual pipeline management systems, thereby achieving long-term monitoring and maintenance of pipeline equipment and ensuring the safe and stable operation of the pipeline system.

[0081] The above description represents the preferred embodiments of the present invention. It should be noted that, for those skilled in the art, various improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A computer-based corrosion analysis method for pipeline equipment, characterized in that, Includes the following steps: S1: A high-precision current sensor is used to collect weak current signals reflecting the corrosion state on or inside the pipe surface in real time, and the collected current signals are processed by wavelet transform to denoise them, so as to obtain the target current signal. S2, the target current signal is sparsely decomposed using a pre-constructed adaptive sparse dictionary to obtain sparse coefficients; Furthermore, by calculating the local energy distribution of the target current signal in the time or frequency domain, the region where the weak corrosion features are located is identified, and the weight of the corresponding sparsity coefficient is dynamically adjusted according to the local energy level of the region, so that the weak but critical corrosion information is enhanced in the sparse representation. S3, based on the distribution characteristics of the sparse coefficients, adaptively select a deep learning super-resolution network that matches the target current signal and dynamically adjust the network parameters, and enhance and reconstruct the target current signal based on the adjusted deep learning super-resolution network to obtain a high-resolution signal. S4. Extract time-domain and frequency-domain features from the high-resolution signal, input them into the trained deep learning model for corrosion identification, and issue a corrosion warning when the identification result exceeds a preset threshold.

2. The computer-based corrosion analysis method for pipeline equipment according to claim 1, characterized in that, The target current signal is sparsely decomposed using a pre-constructed adaptive sparse dictionary to obtain sparse coefficients, including: S21, an adaptive sparse dictionary is trained from historical current signal samples using the K-SVD dictionary learning algorithm, and the target current signal is sparsely decomposed using the orthogonal matching pursuit algorithm to obtain the corresponding sparse coefficients; wherein, the atoms of the adaptive sparse dictionary can be adaptively updated according to the signal characteristics.

3. The computer-based corrosion analysis method for pipeline equipment according to claim 2, characterized in that, By calculating the local energy distribution of the target current signal in the time or frequency domain, the region containing the weak corrosion characteristics is identified, and the weight of the corresponding sparsity coefficient is dynamically adjusted according to the local energy level of the region, including: S22, the target current signal is divided into multiple time-domain or frequency-domain segments, the local energy value of each segment is calculated, and the local energy distribution curve is obtained; S23, based on the local energy distribution curve, identify the region where the energy value is lower than the preset threshold but the waveform change characteristics match the early corrosion signal characteristics as the region where the weak corrosion characteristics are located. S24 assigns a higher weight to the sparsity coefficient of the region where the weak corrosion feature is located than that of other regions, and makes a suppressive adjustment to the sparsity coefficient of other regions.

4. The computer-based corrosion analysis method for pipeline equipment according to claim 3, characterized in that, Based on the local energy distribution curve, regions with energy values ​​below a preset threshold but whose waveform change characteristics match those of the initial corrosion signal are identified as areas containing weak corrosion features, including: S231, Based on the local energy distribution curve, time-domain or frequency-domain segments with energy values ​​lower than a preset threshold are selected as candidate segments; S232, perform joint sparse coding on each candidate segment and the time window composed of multiple adjacent segments before and after it, and apply group sparse constraints so that the sparse coefficients of each segment in the window share the same set of activation atoms under the adaptive sparse dictionary, and obtain the combination of activation atoms that characterizes the waveform change features of the candidate segment and its neighborhood. S233, calculate the matching degree between the activated atom combination and the typical atom combination in the pre-constructed early corrosion signal waveform feature dictionary. If the matching degree exceeds the preset threshold, the candidate segment is determined to be the region where the weak corrosion feature is located.

5. The computer-based corrosion analysis method for pipeline equipment according to claim 4, characterized in that, Based on the distribution characteristics of the sparse coefficients, an adaptive selection of a deep learning super-resolution network matching the target current signal is performed, and the network parameters are dynamically adjusted, including: S31, Analyze the distribution characteristics of the sparse coefficients, including sparsity, the distribution range of non-zero coefficients and their corresponding frequency components; S32, adaptively select a matching deep learning super-resolution network based on the distribution characteristics of the sparse coefficients, specifically: When the distribution range of non-zero coefficients is narrow and concentrated in the low-frequency region, and the sparsity is high, a shallow super-resolution network is selected; when the distribution range of non-zero coefficients is wide and covers both high and low frequency regions, and the sparsity is low, a deep super-resolution network is selected. S33, dynamically adjust the parameters of the selected network according to the distribution characteristics of the sparse coefficients, specifically: The size of the convolution kernel is adjusted according to the distribution range of the non-zero coefficients to match the scale of the signal features, the number of network layers is adjusted according to the complexity of the target current signal, and the threshold of the activation function is adjusted according to the sparsity and noise level.

6. A computer-based pipeline corrosion analysis device, characterized in that, The device includes: The signal acquisition and preprocessing unit is used to acquire weak current signals reflecting the corrosion state on the surface or inside of the pipe in real time through a high-precision current sensor, and to perform wavelet transform noise reduction processing on the acquired current signals to obtain the target current signal. The sparse representation and weight adjustment unit is used to perform sparse decomposition on the target current signal using a pre-constructed adaptive sparse dictionary to obtain sparse coefficients; and to identify the region where weak corrosion features are located by calculating the local energy distribution of the target current signal in the time domain or frequency domain, and dynamically adjust the weight of the corresponding sparse coefficients according to the local energy level of the region, so that the weak but critical corrosion information is enhanced in the sparse representation. The super-resolution reconstruction unit is used to adaptively select a deep learning super-resolution network that matches the target current signal based on the distribution characteristics of the sparse coefficients and dynamically adjust the network parameters, and enhance and reconstruct the target current signal based on the adjusted deep learning super-resolution network to obtain a high-resolution signal. The corrosion identification and early warning unit is used to extract time-domain and frequency-domain features from the high-resolution signal, input them into a trained deep learning model for corrosion identification, and issue a corrosion early warning when the identification result exceeds a preset threshold.

7. The computer-based pipeline corrosion analysis device according to claim 6, characterized in that, The sparse representation and weight adjustment unit includes a sparse decomposition subunit, used for: An adaptive sparse dictionary is trained from historical current signal samples using the K-SVD dictionary learning algorithm, and the target current signal is sparsely decomposed using the orthogonal matching pursuit algorithm to obtain the corresponding sparse coefficients; wherein, the atoms of the adaptive sparse dictionary can be adaptively updated according to the signal characteristics.

8. The computer-based pipeline corrosion analysis device according to claim 7, characterized in that, The sparse representation and weight adjustment unit further includes a weight adjustment subunit, used for: The target current signal is divided into multiple time-domain or frequency-domain segments, and the local energy value of each segment is calculated to obtain the local energy distribution curve. Based on the local energy distribution curve, regions with energy values ​​below a preset threshold but whose waveform change characteristics match those of the initial corrosion signal are identified as areas with weak corrosion characteristics. The sparsity coefficients of regions with weak corrosion features are assigned higher weights than those of other regions, and the sparsity coefficients of other regions are adjusted in a suppressive manner.

9. A computer-based pipeline corrosion analysis device according to claim 8, characterized in that, The specific process by which the weight adjustment subunit identifies the region containing weak corrosion features includes: Based on the local energy distribution curve, time-domain or frequency-domain segments with energy values ​​below a preset threshold are selected as candidate segments. Joint sparse coding is performed on each candidate segment and the time window composed of multiple adjacent segments before and after it, and group sparse constraints are applied so that the sparse coefficients of each segment in the window share the same set of activation atoms under the adaptive sparse dictionary, thus obtaining the combination of activation atoms that characterizes the waveform change features of the candidate segment and its neighborhood. The matching degree between the activated atom combination and the typical atom combinations in the pre-constructed waveform feature dictionary of the initial corrosion signal is calculated. If the matching degree exceeds a preset threshold, the candidate segment is determined to be the region where the weak corrosion feature is located.

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