Pipeline corrosion state prediction method and system based on monitoring and detection data fusion
By combining corrosion monitoring and detection data fusion methods with LSTM intelligent prediction algorithms, the problem of predicting the corrosion status of oil and gas pipelines has been solved, achieving high-precision dynamic prediction of pipeline corrosion status, reducing maintenance costs and improving pipeline safety.
Patent Information
- Application Number
- CN202511323694.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-09-17
AI Technical Summary
Existing technologies cannot achieve comprehensive monitoring and prediction of the corrosion status of oil and gas pipelines, nor can they accurately predict future corrosion trends, leading to pipeline safety and maintenance cost issues.
By combining corrosion monitoring and detection data, an LSTM intelligent prediction algorithm is used for data fusion to construct a pipeline corrosion state prediction method. The average corrosion rate is monitored by corrosion probes and the remaining wall thickness is detected by ultrasonic thickness measurement. An LSTM model is then built for data training and prediction.
It achieves high-precision, dynamic, and continuous prediction of pipeline corrosion status, accurately reflecting the overall and local corrosion status of pipelines, reducing maintenance costs, and improving pipeline safety and operational reliability.
Smart Images

Figure CN120832587B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of industrial corrosion monitoring, and particularly relates to a pipeline corrosion state prediction method and system based on monitoring and detection data fusion, and is particularly suitable for the scene of predicting the corrosion state and residual life of an oil and gas pipeline. BACKGROUND
[0002] Corrosion monitoring technology can obtain information about the relationship between internal corrosion process and operating parameters, and provide data support for identifying corrosion causes. By early monitoring and accurate measurement, internal corrosion damage accidents are prevented, and the effectiveness and reliability of internal corrosion control measures are judged and evaluated, and then schemes and measures for adjusting and optimizing internal corrosion control are formulated. The most commonly used corrosion monitoring technologies at home and abroad include corrosion coupon, resistance probe, linear polarization resistance method, hydrogen detection, etc. Among them, the coupon method, resistance probe method and linear polarization resistance method constitute the core of the commonly used industrial corrosion monitoring system.
[0003] Corrosion detection technology mainly measures and analyzes related problems according to the change of wall thickness. In the case of no excavation, internal corrosion detection of pipelines generally adopts magnetic flux leakage method, ultrasonic method, eddy current detection method, etc. The eddy current detection method can be applied to various ferrous and non-ferrous metals, but the penetration of eddy current to ferromagnetic materials is very weak, so it can only be used to check surface corrosion. If there is magnetic scale or magnetic oxide in the corrosion product on the metal surface, it may bring unavoidable errors to the measurement results. In addition, since the eddy current test result is closely related to the electrical conductivity of the measured metal, in order to improve the measurement accuracy, the measured system also needs to be kept at a constant temperature. Therefore, the widely used corrosion detection methods at home and abroad are magnetic flux leakage method and ultrasonic detection method.
[0004] For the previous corrosion monitoring probe, such as linear polarization resistance (LPR) probe, the current is measured by a small polarization voltage, and the instantaneous corrosion rate (such as mpy, millimeter per year) is calculated. This method can only provide the average corrosion rate continuously, and cannot directly show the residual wall thickness and future corrosion trend. For the previous corrosion detection technology such as ultrasonic thickness measurement, the thickness is measured according to the principle of ultrasonic pulse reflection. When the ultrasonic pulse emitted by the probe passes through the measured object to the material interface, the pulse is reflected back to the probe. The thickness of the measured material is determined by accurately measuring the time of ultrasonic wave propagation in the material. This method can only reflect the residual wall thickness of the pipeline or equipment at that time through artificial periodic detection, and cannot predict the wall thickness change trend in the future.
[0005] With the increase of service time of oil and gas pipelines and equipment in China, the equipment failure caused by corrosion is increasingly prominent. The actual corrosion condition of the pipeline in the production process cannot be ensured to achieve the purpose of safe operation of the oil and gas pipeline through a single corrosion monitoring technology or detection technology, and needs to be combined with both. Both corrosion monitoring and detection technologies have their own limitations, and if an integrated device is formed by combining both, real-time corrosion monitoring and detection data are collected and the data of both are fused, the corrosion state and residual life of the oil and gas pipeline can be predicted, which has great significance for predictive maintenance on site, and can reduce the cost of periodic corrosion detection by manual and improve the safety of the operation of the oil and gas pipeline. SUMMARY
[0006] The purpose of the present application is to provide a pipeline corrosion state prediction method based on monitoring and detection data fusion, which fuses corrosion monitoring and detection data, and trains an intelligent prediction algorithm based on the fused data, so that the trained intelligent prediction algorithm can predict the pipeline corrosion state and the pipeline residual life in the future period.
[0007] In order to achieve the above purpose, the present application adopts the following technical scheme:
[0008] The pipeline corrosion state prediction method based on monitoring and detection data fusion comprises the following steps:
[0009] Step 1. First, the real-time corrosion rate of the pipeline measured by the corrosion monitoring probe is obtained, and the integral calculation of the loss wall thickness is performed; then the residual wall thickness is obtained by subtracting the loss wall thickness from the initial wall thickness, as the monitoring data;
[0010] At the same time, the residual wall thickness of each point in the circumferential direction of the pipeline obtained by ultrasonic detection is obtained as the detection data;
[0011] Step 2. According to the sampling time point sequence, a plurality of sets of residual wall thickness data are sequentially constructed; wherein each set of residual wall thickness data is composed of a monitoring data and a plurality of detection data of the points in the circumferential direction of the pipeline;
[0012] The data fusion is performed on all residual wall thicknesses in each set of residual wall thickness data, and a plurality of sets of fused wall thicknesses are obtained;
[0013] Step 3. A pipeline corrosion state prediction model based on LSTM is built, wherein the input of the model is the fused wall thickness sequence in the historical period T1, and the output of the model is the predicted residual wall thickness sequence in the future period T2;
[0014] Step 4. The pipeline corrosion state prediction model is trained based on the fused wall thickness obtained in step 2;
[0015] Given the fusion wall thickness sequence of the historical time period T1 and the corresponding future time period T2 true wall thickness sequence, the parameters of the LSTM are learned, and a trained pipeline corrosion state prediction model is obtained, which is used to predict the overall corrosion state of the pipeline.
[0016] In addition, in step 2, further comprising:
[0017] At the same time, determine the point position corresponding to the minimum residual wall thickness in all detection data of each group of residual wall thickness data;
[0018] Count the number of occurrences of each point position corresponding to the minimum residual wall thickness in the historical time period T1; if the number of occurrences of a certain point position is the most after counting, the point position is determined as the minimum wall thickness point position as the to-be-monitored point position;
[0019] In step 3, further comprising:
[0020] Further, a minimum residual wall thickness prediction model based on LSTM is built for the to-be-monitored point position;
[0021] The input of the model is the residual wall thickness sequence formed by the to-be-monitored point position at each time point in the historical time period T1, and the output of the model is the residual wall thickness sequence of the to-be-monitored point position predicted in the future time period T2;
[0022] In step 4, further comprising:
[0023] Based on the determined residual wall thickness of the to-be-monitored point position, the minimum residual wall thickness prediction model is trained;
[0024] Given the residual wall thickness sequence of the to-be-monitored point position in the historical time period T1 and the corresponding true wall thickness sequence in the future time period T2, the parameters of the LSTM are learned, and a trained model is obtained, which is used to predict the residual wall thickness of the to-be-monitored point position.
[0025] On the basis of the pipeline corrosion state prediction method based on monitoring and detection data fusion, the present application also proposes a pipeline corrosion state prediction system based on monitoring and detection data fusion for realizing the above-mentioned method, which adopts the following scheme:
[0026] The pipeline corrosion state prediction system based on monitoring and detection data fusion comprises a corrosion probe monitoring device, an ultrasonic thickness detection device and a computer device; the corrosion probe monitoring device and the ultrasonic thickness detection device are connected to the computer device;
[0027] The corrosion probe monitoring device is used for collecting monitoring data in real time and transmitting to the computer device; the ultrasonic thickness detection device is used for collecting detection data of each point position in the circumferential direction of the pipeline in real time and uploading to the computer device;
[0028] The computer device comprises a processor and a memory, and the computer program is stored on the memory; when the processor executes the computer program, the method for predicting the pipeline corrosion state based on monitoring and detection data fusion is implemented.
[0029] The present application has the following advantages:
[0030] As described above, in order to solve the problems of insufficient measurement time continuity, limited measurement point coverage, isolated measurement data and difficulty in predicting future trends in the pipeline corrosion monitoring technology in the prior art, the present application provides an intelligent, high-precision and dynamically continuous pipeline corrosion state prediction method and system based on monitoring and detection data fusion. The present application jointly uses corrosion probe monitoring and ultrasonic thickness detection technology to continuously collect data of both and use them in fusion, wherein the point of ultrasonic thickness detection can be automatically switched on a circle of the pipeline in the radial direction (for example, multiple points such as 0 o'clock, 3 o'clock, 6 o'clock and 9 o'clock in the clock direction are collected, and N wall thickness curves at different points are formed after the data is collected), and the corrosion probe collects the average corrosion rate. Through the continuous product (integral) of time, the lost wall thickness can be obtained, and then the remaining wall thickness curve can be obtained by continuously subtracting the lost wall thickness from the initial wall thickness. The corrosion detection technology can also directly obtain the remaining wall thickness value. The remaining wall thickness obtained by corrosion monitoring and corrosion detection is fused by a data fusion algorithm to obtain a fused remaining wall thickness value. The LSTM intelligent prediction algorithm is used to continuously learn the remaining wall thickness curve after data fusion, and the trend of the remaining wall thickness curve can be predicted, and the pipeline wall thickness prediction result after a period of time can be obtained. The pipeline wall thickness prediction result can accurately reflect the overall corrosion state of the pipeline. Since the pipeline has a requirement for the minimum remaining wall thickness, the remaining life of the pipeline can also be obtained according to the predicted pipeline wall thickness. In addition, the present application also separately predicts the minimum remaining wall thickness point on the pipeline, that is, first trains the LSTM by using the historical data of the minimum remaining wall thickness point, so that the LSTM can accurately predict the remaining wall thickness value of the minimum remaining wall thickness point in the future. By focusing on monitoring the special point, the remaining wall thickness of the weak area of the pipeline can be accurately reflected. In addition, the overall corrosion state of the pipeline predicted by data fusion can be compared with the prediction result of the minimum remaining wall thickness point. If the two are not much different, it indicates that the pipeline is in a uniform corrosion state, and in this case, the entire pipeline can be replaced when the corrosion state reaches or approaches the minimum remaining wall thickness. If the two are quite different, it indicates that only the local point of the pipeline is severely corroded, and only the local point of the pipeline needs to be repaired, thereby reducing the pipeline maintenance cost, and thus having practical application value. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 The flowchart of the pipeline corrosion state prediction method in Embodiment 1 of the present application;
[0032] Figure 2 Flow chart of corrosion monitoring and detection data fusion algorithm in embodiment 1 of the present application;
[0033] Figure 3 Flow chart of random gating LSTM algorithm in embodiment 1 of the present application;
[0034] Figure 4 Device installation schematic diagram of pipeline corrosion state prediction system in embodiment 3 of the present application; wherein Figure 4 (a) in the above is a front view, Figure 4 (b) in the above is a side view. DETAILED DESCRIPTION
[0035] The present application will be further described in detail below in combination with the accompanying drawings and specific embodiments:
[0036] Embodiment 1
[0037] This embodiment 1 describes a pipeline corrosion state prediction method based on monitoring and detection data fusion. The method can dynamically, accurately and prospectively master the residual wall thickness and its future change of the pipeline at key positions by continuous and collaborative monitoring of two technical means of multi-point ultrasonic thickness measurement and corrosion probe, combined with innovative data fusion algorithm and random gating LSTM, and can scientifically evaluate the residual life of the pipeline, thereby significantly improving the intelligent level and reliability of pipeline safety management.
[0038] As shown in Figure 1 , the pipeline corrosion state prediction method based on monitoring and detection data fusion comprises the following steps:
[0039] Step 1. First, the real-time corrosion rate of the pipeline measured by the corrosion monitoring probe LPR is obtained, and the integral loss of wall thickness is calculated; then the residual wall thickness is obtained by subtracting the loss of wall thickness from the initial wall thickness, which is used as monitoring data.
[0040] In this embodiment, the LPR probe outputs the corrosion rate (unit: mpy) every 10 minutes, for example; after obtaining the corrosion rate, the LPR integral loss of wall thickness Δh LPR is calculated, and the formula is: Δh LPR =∑(corrosion rate × time interval)。
[0041] The corrosion rate refers to the instantaneous corrosion rate measured by the LPR probe at each measurement time.
[0042] The LPR technology directly calculates the corrosion rate at this moment by applying a small polarization voltage and measuring the generated current, and the unit is usually millimeter / year (mm / a) or mil / year (mpy). It is a rate value, not a cumulative amount.
[0043] Time interval refers to the time difference between two adjacent corrosion rate readings.
[0044] This step is to convert the instantaneous corrosion rate (unit: mm / a) into the cumulative wall thickness loss (unit: mm) by integration (summation). Then use the initial wall thickness, subtract the loss wall thickness Δh LPR To get the remaining wall thickness measured by LPR.
[0045] The initial wall thickness refers to the original, uncorroded wall thickness of the pipeline. It is the absolute basis for LPR integration to calculate the remaining wall thickness. In practical application, this basis can be calibrated by the first ultrasonic measurement to ensure the accuracy of long-term calculation.
[0046] At the same time, the remaining wall thickness of each point on the pipeline circumference obtained by ultrasonic detection is obtained, that is, the detection data. In this embodiment, the ultrasonic thickness outputs multi-point wall thickness values (accuracy ±0.1mm) every 6 hours, for example.
[0047] By automatically switching the ultrasonic thickness point (such as 0°, 45°, 90° radial position), the wall thickness change curves of multiple different positions on the pipeline circumference are continuously collected, overcoming the limitations of single-point monitoring, and capturing the spatial distribution characteristics of pipeline corrosion.
[0048] Step 2. According to the order of sampling time points, a plurality of groups of remaining wall thickness data are sequentially constructed; wherein each group of remaining wall thickness data is composed of a monitoring data and detection data of a plurality of points on the pipeline circumference.
[0049] Data fusion is performed on all remaining wall thicknesses in each group of remaining wall thickness data, and a plurality of groups of fused wall thicknesses are obtained.
[0050] The present application combines the corrosion probe monitoring (providing average corrosion rate and average wall thickness loss integrated therefrom) and multi-point ultrasonic thickness detection (providing direct remaining wall thickness data), and realizes dynamic, multi-dimensional corrosion data fusion monitoring.
[0051] In addition, the present application also generates more accurate and reliable real-time remaining wall thickness curves by a data fusion algorithm specially designed for the fusion of monitoring and detection data, dynamically and continuously integrating the advantages of the two technical means.
[0052] Suppose the wall thickness measured by ultrasonic thickness is h u Since there are multiple points of ultrasonic measured wall thickness, suppose the wall thickness measured by the mth point is h um , and the corresponding variance is Similarly, the wall thickness measured by the e th point is h ue , and the corresponding variance is .
[0053] The corrosion monitoring probe monitors the corrosion rate, and after time integration, the corrosion wall thickness is obtained, then the original wall thickness minus the corrosion wall thickness is the residual wall thickness, and the residual wall thickness calculated by the corrosion monitoring probe is called h L , and the variance is .
[0054] The present application provides a fusion model based on variance weighting and similarity analysis, and the general principle is as follows:
[0055] Firstly, based on the ultrasonic detection value h um and the LPR calculated value h L , a weight influence matrix is constructed ; then the normalized weight factor is solved by the characteristic vector method, and the contribution weight of the two types of data is dynamically allocated; finally, the fusion wall thickness is output.
[0056] The present application trains the prediction model through the fusion wall thickness, which significantly improves the calculation accuracy of the residual wall thickness.
[0057] As shown in Figure 2 , the input of data fusion is ultrasonic thickness data (wall thickness values and variances of multiple points) and LPR monitoring data (integrated residual wall thickness and variance), and the specific process of data fusion is as follows:
[0058] Suppose each group of residual wall thickness data includes one monitoring data and m detection data of points.
[0059] Define k and are any two data in each group of residual wall thickness data; define the similarity value between k and , that is, the similarity degree between data is , and the weight influence factor, that is, the degree of mutual influence weight between data, is defined as .
[0060] Define , represent the variance corresponding to the k、 th data obtained by monitoring or detection.
[0061] ;
[0062] Define or , then is the Gaussian error function, and is obtained directly according to the z value table.
[0063] .
[0064] Where d maxd is the maximum value among all similarity values. min It is the minimum value among all similarity values.
[0065] Constructing the weight influence matrix The formula is as follows:
[0066] ;
[0067] Since it is currently in matrix form, matrix However, the degree of mutual influence between the data points cannot reflect the actual weight of each individual data point. To reflect the influence of weights on the matrix... The weight of each data point in the m+1 remaining wall thickness data is represented numerically, a weighting factor is introduced, and the weight is determined based on the matrix. Solve for the weighting factors. Given a non-negative symmetric matrix, by the properties of matrices, there exists a matrix... The largest eigenvalue by modulus And its corresponding eigenvectors, and all eigenvectors are positive. This makes Therefore, it can be used A metric used as a weighting factor for monitoring and inspection data.
[0068] Then there exists a set of nonnegative matrices V= , making , ;in It represents a non-negative number.
[0069] In the formula ;in This represents the weighting factor.
[0070] Assuming there are a total of m+1 monitoring data points at a certain time point, the weight factor for the k-th data point is:
[0071] ;
[0072] Normalize the weighting factors of all data to obtain the final weights of all data in each group of remaining wall thickness data. :
[0073] .
[0074] The final fused wall thickness h f for: .
[0075] Step 3. Build an LSTM-based pipeline corrosion state prediction model, where the input of the model is the fused wall thickness sequence within the historical time period T1, and the output of the model is the predicted remaining wall thickness sequence for the future time period T2.
[0076] The application applies a random gating LSTM network structure to pipeline wall thickness prediction.
[0077] The input layer of the model is used to receive fused residual wall thickness for a continuous period of time T1 (e.g. T1 = 90 days).
[0078] The hidden layer of the model contains 2 layers of random gating LSTM units, each layer of random gating LSTM units containing 128 neurons (hidden state dimension). Dropout (dropout rate 0.2) is applied between layers to further enhance regularization.
[0079] The output layer of the model is a fully connected layer (DenseLayer) for outputting wall thickness prediction values for the future T2 days (e.g. T2 = 30 days) , with a prediction step of 1 day. Wherein is the wall thickness prediction value.
[0080] The model is trained on fused residual wall thickness data (input features) and its corresponding future real wall thickness sequence (output labels) for a given period of historical time T. The model parameters include the weight matrices W, U and the bias term b of the LSTM unit, as well as the network parameters of the prediction gating probability, and the variational parameters
[0081] include the parameters that control the approximate posterior distribution. Traditional LSTM has difficulty fully capturing random fluctuations and pattern changes in data when dealing with time series such as pipeline corrosion data, which has complex spatio-temporal dependence and inherent uncertainty, making it difficult to fully capture random fluctuations and pattern changes in data. The deterministic gating mechanism of the traditional LSTM limits the prediction accuracy or the robustness. Therefore, the application makes core improvements to the traditional LSTM:
[0082] 1. By improving the deterministic gating of the traditional LSTM to probabilistic random gating:
[0083] 1. The forgetting gate f t , the input gate i t , and the output gate o t are modeled as Bernoulli random variables;
[0084] 2. Introduce the variational inference framework (Variational Inference, VI), generate variational parameters λt through an inference network (introduce an additional neural network), and sample the gating state.
[0085] 2. Introduce the variational inference framework (Variational Inference, VI), generate variational parameters λt through an inference network (introduce an additional neural network), and sample the gating state.
[0086] 3. The training objective of the model is to maximize the variational lower bound of the observation data likelihood ELBO, balancing the prediction accuracy and the stability of the gating distribution, and improving the modeling ability of the uncertainty of the corrosion data.
[0087] Through the above improvements, the random gating LSTM model can achieve the following effects:
[0088] 1. Explicitly modeling uncertainty: learning the inherent randomness of the data, providing more reliable prediction intervals.
[0089] 2. Enhance robustness and generalization: introduce regularization effect through random gating, reduce overfitting to noise.
[0090] 3. Adaptive information flow control: random gating allows the model to decide the preservation, update and output of information in a probabilistic manner at different time steps, more flexible to adapt to the dynamic changes of the corrosion process.
[0091] The present application improves the LSTM algorithm to form a random gating LSTM algorithm, which continuously learns the residual wall thickness curve of multiple time series after data fusion processing, which is beneficial to improve the prediction accuracy and forward-looking of the residual wall thickness.
[0092] The specific process of the above improvement of LSTM will be discussed in detail in the following step 4.
[0093] Step 4. Train the pipeline corrosion state prediction model based on the fusion wall thickness obtained in step 2.
[0094] Given the fusion wall thickness sequence of the historical time period T1 and its corresponding real wall thickness sequence of the future time period T2, learn the parameters of the LSTM to obtain a trained pipeline corrosion state prediction model for predicting the overall corrosion state of the pipeline.
[0095] The training process of the present application combines the ideas of probabilistic modeling and variational inference method, and the specific process is as follows:
[0096] a) Forward pass - process the input sequence for a single time step t .
[0097] I. Calculate the deterministic basis:
[0098] Use the current input x t and the previous time step hidden state h t-1 , calculate through the conventional LSTM (but do not apply the final gating):
[0099] Candidate memory cell state: .
[0100] Where W c, b c For candidate memory cell parameters.
[0101] W c is a weight matrix used to map the hidden state h t-1 at the previous time step and the current input c t after concatenation to the candidate memory space, learning long-term trend features in the corrosion data (such as the slow decay pattern of wall thickness).
[0102] b c is a bias vector used to introduce a nonlinear offset to enhance the model's expressive ability. For example, in pipeline corrosion prediction, it can capture the nonlinear decay caused by differences in material corrosion resistance.
[0103] Original forget gate activation value: .
[0104] where W f , b f are forget gate parameters.
[0105] W f is a weight matrix used to calculate the historical memory retention ratio, deciding which historical corrosion patterns should be retained or forgotten (such as sudden abnormal noise).
[0106] b f is a bias vector used to control the basic forgetting probability, for example, when b f > 0, the model tends to retain historical data.
[0107] Original input gate activation value: .
[0108] W i , b i are input gate parameters.
[0109] W i is a weight matrix used to calculate the proportion of new information received, used to adjust the contribution weight of current input data (such as new thickness values) to the memory cell.
[0110] b i is a bias vector used to control the basic input intensity, for example, when bi increases during corrosion acceleration, the influence of new data is strengthened.
[0111] Original output gate activation value: .
[0112] W o , b o are output gate parameters.
[0113] W ois the weight matrix for computing the hidden state output proportion, filtering out irrelevant information in the memory cell for prediction (e.g. pipeline vibration noise).
[0114] b o is the bias vector for adjusting the information output, e.g. in a safety warning scenario o Reducing the can improve sensitivity.
[0115] These computations are based on the current input (e.g. the latest fused wall thickness value) and the previous state of the model (memorized history of wall thickness patterns), providing the basis signals for the gating decisions and state updates. W, U, b are parts of the model parameters to be learned.
[0116] II. Probabilistic modeling of the gating signals:
[0117] The invention considers the forget gate f t , the input gate i t , and the output gate o t as random variables, rather than deterministic Sigmoid outputs in traditional LSTMs. This explicitly introduces the uncertainty of the model’s internal decisions.
[0118] The forget gate f t , the input gate i t , and the output gate o t are considered as random variables to explicitly introduce the uncertainty of the model’s internal decisions.
[0119] Gating distribution selection (binary case):
[0120] Assume each gating unit j at time step t is an independent Bernoulli random variable:
[0121] Forget gate probability: ;
[0122] Input gate probability: ;
[0123] Output gate probability: ;
[0124] where is the Sigmoid function, outputting a probability between 0 and 1.
[0125] , , are the probabilities of the gates being open computed by the LSTM model from the input data, with the same dimension as the LSTM hidden layer units, , , are the computed probabilities , , the original gate activation value before.
[0126] The gating distribution is then:
[0127] ;
[0128] ;
[0129] ;
[0130] where the probability of opening the gate (retaining information) is , the probability of closing the gate (forgetting information) is ;
[0131] the probability of opening the gate (retaining information) is , the probability of closing the gate (forgetting information) is ;
[0132] the probability of opening the gate (retaining information) is , the probability of closing the gate (forgetting information) is .
[0133] In pipe wall thickness prediction, represents the model's probabilistic tendency to "think" how much of the previous memory of the corrosion pattern needs to be retained based on the current data. For example, if the corrosion rate suddenly changes, the input gate probability may increase, hinting the model to pay more attention to the new information of the current input. Random sampling of the Bernoulli distribution simulates the "hesitation" or uncertainty of the model when facing complex, possibly noisy, corrosion data.
[0134] III. Variational Inference and Gating Sampling.
[0135] Directly computing the true posterior distribution is extremely difficult. Therefore, the present invention introduces a variational distribution controlled by variational parameters to approximate the true posterior.
[0136] Choice and sampling of variational distribution: The variational distribution is also chosen to be a parameterized independent Bernoulli distribution.
[0137] Building the inference network: The variational parameters , , i.e. the approximate gating probabilities, are generated by an inference network, which is an additional neural network; the inference network takes the current input as input and outputs:
[0138] , , .
[0139] where are the weights and biases of the inference network, which constitute the variational parameters .
[0140] The gating is sampled from the variational distribution :
[0141] f forgetting represents the forgetting gate sampled from the approximate posterior;
[0142] f input represents the input gate sampled from the approximate posterior;
[0143] f output represents the output gate sampled from the approximate posterior.
[0144] where , , are the gating probability parameters of the variational distribution , which are computed by the inference network based on the current input ; containing all parameters of the inference network .
[0145] The role of the inference network is to learn how to “guess” what the optimal gating settings should look like in order to best predict future wall thicknesses, given the current data fusion wall thickness data x t .
[0146] The variational distribution provides an operational, easy-to-sample approximation to the complex true posterior. The sampled f t , i t , o t are concrete 0 / 1 values (or continuous values) that control the flow of information at the current time step.
[0147] IV. Compute memory cells and hidden state:
[0148] Update the memory cells using the sampled random gates f t , i t and the candidate memory cell states computed in step I:
[0149] .
[0150] where denotes element-wise multiplication (Hadamard Product).
[0151] The output gate o t is computed using the sampled output : .
[0152] This step is the core operation of LSTM, but the gating is the result of random sampling. t The accumulated memory information about the history of pipe wall thickness evolution based on the random decision making of the model. t is the state vector output at the current time step, which contains the key information for predicting future wall thickness. Its value is directly affected by the result of random gating sampling.
[0153] V. Compute Output and Prediction:
[0154] The current hidden state h t is passed to the subsequent layer (e.g., fully connected layer):
[0155] where is the output layer parameter, which belongs to the model parameters .
[0156] is the output of the model at the current time step. In the pipe wall thickness prediction task, if the model structure is designed to output future values (such as sequence-to-sequence), may represent the predicted wall thickness value at a certain future time point.
[0157] More commonly, the final output layer processes the integration of or all at the last time step to predict the wall thickness sequence in the future (e.g., 30 days). The predicted value is directly used to calculate the loss and subsequent life assessment.
[0158] b) Compute Loss:
[0159] The training objective of the model is no longer simply to minimize the prediction error, but to maximize the variational lower bound of the evidence (Evidence Lower Bound, ELBO). The loss function is defined as the negative ELBO.
[0160] I. Monte Carlo Estimation of Expected Log-Likelihood (Reconstruction Loss):
[0161] For the input sequence and the corresponding target sequence The loss includes .
[0162] in Gated sequence representing samples from all time steps .
[0163] In actual calculations, by using variational distributions... Mid-sampled K-group gated sequences Monte Carlo estimation:
[0164] .
[0165] K=1 is usually used to balance training efficiency and effectiveness.
[0166] This measure is applied to the sampled random gating sequence. Below, the wall thickness value predicted by the model. The degree of agreement with the actual future wall thickness value y. This is typically calculated using loss functions such as mean squared error (MSE). .
[0167] For example, assuming that the prediction error follows a Gaussian distribution encourages the model to make accurate predictions even under random gating conditions.
[0168] II. Calculate the KL divergence-regularization term:
[0169] The losses also include KL divergence measures the variational approximation of the distribution. With model prior distribution The difference between them. KL divergence, as a regularization term, is used to prevent variational posteriors. The excessive deviation model itself is based on the "belief" generated by the input x (i.e., the belief calculated in the above steps). Commonly used prior choices include:
[0170] Independent Bernoulli (0.5): No prior information.
[0171] Independent Bernoulli(π): π is a small, fixed value or a learnable parameter, encouraging sparse gating (more concise information).
[0172] Deterministic probability calculated step by step As a prior distribution parameter, i.e. Similarly At this time, if Also choose independent Bernoulli and variational parameters as The KL term can then be decomposed as the sum of Bernoulli KL divergences for each gate at each time step, which is easy to compute:
[0173] Applicable to each gate .
[0174] This term constrains the variational distribution to not be too "wild", and to be close to the model's prior on the gating probabilities computed based on the data itself, preserving the stability and interpretability of the model.
[0175] III. Computing the ELBO estimate for a sample and the final loss:
[0176] Combining the two terms above, the ELBO estimate for a single sample (sequence) is:
[0177] .
[0178] The loss function (Loss) during training is the negative ELBO:
[0179] .
[0180] where K denotes the number of Monte Carlo samples; denotes the variational approximation posterior distribution, and z denotes the random variable for all gating signals; denotes the prior distribution of the gating states. denotes a set of randomly sampled gating states, denotes the likelihood probability of the target sequence y predicted by the model given the input history sequence x and a specific set of random gating states z (k) . is the KL divergence between two probability distributions, which measures the information loss caused by approximating one distribution with another.
[0181] The total loss function simultaneously optimizes the model parameters and the variational parameters , which balances the prediction accuracy and the posterior approximation constraint through the expected likelihood term in the first term on the right and the KL divergence term in the second term. Minimizing this total loss function allows the LSTM model to learn both to make accurate wall thickness predictions and to learn how to "guess" (through the inference network) how the gating should be set (variational distribution) given the current input, and this guess cannot be too far off (subject to the prior constraint).
[0182] c) Backward propagation and parameter update:
[0183] I. Calculate the gradient:
[0184] Calculate the loss function using automatic differentiation (such as the backpropagation algorithm). Regarding model parameters and variational parameters gradient and Due to the presence of sampling operations (especially binary sampling), gradient estimates with low variance can be obtained using techniques such as Gumbel-Softmax relaxation (if continuous relaxation gating is employed) or reinforcement learning (such as REINFORCE). Modern deep learning frameworks (such as PyTorch and TensorFlow) can effectively handle gradient estimation for common distributions (such as Bernoulli and Concrete).
[0185] II. Parameter Update:
[0186] Update parameters using stochastic gradient descent (SGD) or its variants (such as the Adam optimizer):
[0187] ; ;in It is the learning rate.
[0188] III. Iteration:
[0189] Repeat steps a) to c) multiple times on the entire training dataset (i.e., the multiple sets of fused wall thickness data obtained in step 2) until the model converges (the loss no longer decreases significantly or the preset number of epochs is reached).
[0190] At this point, both the model parameters and variational parameters are optimal, resulting in a well-trained pipeline corrosion state prediction model. The trained model is then deployed to predict the overall corrosion state of the pipeline.
[0191] The input features for prediction are the wall thickness and corrosion rate of the past 90 days (the remaining wall thickness is obtained by integration). Each set of remaining wall thickness data is first fused to obtain the fused wall thickness and form a fused wall thickness sequence. The output is the wall thickness value for the next 30 days.
[0192] In addition to predicting the overall corrosion status of pipelines, this invention can also calculate the daily corrosion amount based on the predicted wall thickness sequence, calculate the remaining lifespan in combination with the safety threshold, output the remaining lifespan, and determine whether it is below the threshold. If so, an alarm is triggered.
[0193] For example, the current wall thickness is 8.5mm, and the model predicts that the wall thickness will decrease to 8.18mm after 30 days (prediction error ±0.05mm). If the pipeline safety threshold is 6.0mm, the remaining life=(8.18-6.0) / average daily loss (0.004mm / day)=545 days.
[0194] In addition, to adapt to the long-term changes in the pipeline corrosion process, the model has online learning ability after deployment.
[0195] The LSTM model automatically triggers model weight updates every 7 days. The present application uses a sliding window mechanism and only uses the fused wall thickness data in the recent period (such as 90 days) for training to ensure that the model focuses on the latest patterns.
[0196] If the prediction error of the model for future wall thickness (such as the mean absolute percentage error MAPE) exceeds the preset threshold (such as 5%) for three consecutive times, an alarm is triggered, prompting that manual intervention may be needed to check the equipment, data, or perform model reconstruction / retraining.
[0197] Based on the complex spatiotemporal variation patterns learned by the LSTM, the present application predicts the wall thickness change trend of the pipeline in the future period, obtaining a high-precision wall thickness prediction result. At the same time, combined with the minimum allowable residual wall thickness standard required for safe operation of the pipeline, the predicted future wall thickness change trend is used to scientifically calculate and warn the expected time when the pipeline reaches the minimum allowable wall thickness, providing reliable pipeline residual life assessment, and providing a key basis for preventive maintenance and safety production decision-making.
[0198] In addition, in order to verify the effectiveness of the method of the present application, the following examples are given to verify the effect.
[0199] Oil pipeline corrosion monitoring and inspection integrated intelligent prediction example: The present device is deployed in a DN300 oil pipeline (material X65 steel, initial wall thickness 10.0mm), and the safety wall thickness threshold is 6.0mm. The implementation process is as follows:
[0200] Step 1. Data acquisition and dynamic point management.
[0201] Corrosion monitoring data:
[0202] The LPR probe outputs the corrosion rate every 10 minutes. Assuming that the continuous 24-hour monitoring data is as follows:
[0203] Corrosion rate=[0.21, 0.19, 0.22,..., 0.20]mm / a (average 0.20mm / a).
[0204] The wall thickness loss is calculated by time integration:
[0205] Corrosion rate .
[0206] Monitoring the remaining wall thickness (standard deviation , due to integral cumulative error).
[0207] Ultrasonic detection data:
[0208] Initial detection points 0°, 90° (scan every 6 hours). First scan data:
[0209] 0° wall thickness h u1 = 9.95 mm, standard deviation σ1= 0.1.
[0210] 90° wall thickness h u2 = 9.92 mm, standard deviation σ2= 0.1.
[0211] When rotated to 45°, the wall thickness is detected to be 9.10 mm, and the average wall thickness of adjacent points is Since 9.10 < 0.8 x 9.935 = 7.948, the system automatically adds 45° to the monitoring sequence (with the highest priority).
[0212] Subsequent detection of 0°, 45°, and 90° points every 6 hours.
[0213] Step 2. Data fusion calculation.
[0214] Input data: At a certain time, the system collects the following set of remaining wall thickness data, such as data from 3 ultrasonic detection points and data from 1 LPR monitoring and calculation:
[0215] Ultrasonic detection data:
[0216] Point 0° data: h u1 = 9.95 mm, standard deviation σ1= 0.1;
[0217] Point 45° data: h u2 = 9.10 mm, standard deviation σ2= 0.1;
[0218] Point 90° data: h u3 = 9.92 mm, standard deviation σ3= 0.1.
[0219] LPR monitoring value: h L = 9.9868 mm, standard deviation σ L = 0.3.
[0220] The fusion calculation process is as follows:
[0221] 1. Construct data vector and standard deviation vector.
[0222] Include 4 data points in the fusion set:
[0223] .
[0224] .
[0225] 2. Calculate the similarity between any two data points (Formula ).
[0226] Take d 12 (i.e. the similarity between 0° and 45° points) as an example:
[0227] .
[0228] Similarly, calculate the similarity between all data pairs.
[0229] Suppose the following similarity matrix is obtained (only some key values are shown for simplicity):
[0230] .
[0231] , .
[0232] Physical meaning: The value is very large, indicating that the wall thickness difference between 0° and 45° points is far beyond the measurement error range, indicating that there is significant local difference (local corrosion) at this point.
[0233] The values of d 13 and d 1L are very small, indicating that the data of 0° and 90°, 0° and LPR are consistent within the error range.
[0234] 3. Normalize the similarity and calculate the weight influence factor (Formula ):
[0235] Suppose the global maximum and minimum similarity is . Take d as an example:
[0236] .
[0237] Look up the error function complement table, , so . Physical meaning: The lower the similarity (d kl , the smaller the weight influence factor q kl , indicating that the influence weight between the two data points is also smaller.
[0238] 4. Construct the weight influence matrix Q.
[0239] Based on all Construct a 4x4 symmetric matrix:
[0240] .
[0241] Note: Diagonal line is 1 (data is completely related to itself).
[0242] 5. Get the maximum weight .
[0243] Solve the equation , get the principal eigenvector .
[0244] Further according to the formula , can get .
[0245] According to the formula , the maximum weight of each data is obtained:
[0246] ;
[0247] ;
[0248] ;
[0249] .
[0250] Among them , , , respectively represent the weight of 0 point, 45° point, 90° point, LPR.
[0251] 6. Calculate the fusion wall thickness :
[0252]
[0253]
[0254]
[0255] .
[0256] Step 3. Randomly gated LSTM prediction (90 days of historical fusion data, 30 days of prediction).
[0257] The input data is a 90-day fusion wall thickness sequence (1 point every 6 hours, a total of 360 points):
[0258] (Example values: 9.54, 9.53,..., 9.10 mm).
[0259] Forward propagation procedure:
[0260] 1. Deterministic base computation (time step ):
[0261] Candidate memory .
[0262] Original gate activation value:
[0263] , .
[0264] 2. Probabilistic modeling and sampling:
[0265] Forget gate probability .
[0266] Variational sampling (through inference network):
[0267] Input → output, sample (Open gate).
[0268] 3. State update:
[0269] ;
[0270] .
[0271] 4. Predicted output:
[0272] (Future 120 time points / 30 days).
[0273] Step 4. Remaining life assessment
[0274] Prediction result analysis:
[0275] Starting prediction value (1st day): 8.15 mm, ending prediction value (30th day): 7.82 mm.
[0276] .
[0277] Remaining life calculation:
[0278] .
[0279] Table 1 shows the indicators of 30-day prediction error, life warning advance, and maintenance cost.
[0280] Table 1 verification results
[0281]
[0282] From the above table 1, it can be seen that the method of the present application can calculate the remaining life of the current pipeline, and further can give a 195-day early warning advance, thereby verifying the decision support role of the prediction model of the present application for preventive maintenance.
[0283] The present application uses a dynamic weight fusion algorithm to eliminate single technology errors (such as ultrasonic coupling fluctuation and LPR integral drift). Experiments have proved that the fusion wall thickness error is reduced by 60% compared with single technology. The random gated LSTM enhances noise robustness through probabilistic gating, and the prediction stability is improved in an oil stain interference environment. The present application reduces the frequency of artificial detection (which can be changed from monthly inspection to annual inspection), and reduces maintenance cost. The accurate life assessment prolongs the pipeline safety period and avoids the cost of replacing pipe materials, and the economic benefit is significant.
[0284] Example 2
[0285] This embodiment 2 describes a pipeline corrosion state prediction method based on monitoring and detection data fusion. Except for the following technical features, the remaining technical features can be referred to the above embodiment 1.
[0286] Based on embodiment 1, this embodiment further increases the monitoring of the minimum residual wall thickness point in the circumferential direction of the pipeline.
[0287] Specifically, in the above step 2, further comprising:
[0288] At the same time, the point corresponding to the minimum residual wall thickness in all detection data of each group of residual wall thickness data is determined; for example, after detection, the residual wall thickness value of the 45° point is the smallest, and the 45° point is determined as the minimum residual wall thickness point.
[0289] The number of occurrences of each point corresponding to the minimum residual wall thickness in the historical time period T1 is counted. If the number of occurrences of the minimum residual wall thickness of a certain point is the most after counting, the point is determined as the minimum wall thickness point as the monitoring point.
[0290] For example, assuming that there are a total of 360 groups of residual wall thickness data in the historical time period T1 (for example, 90 days), and the number of times of the minimum residual wall thickness of the 45° point reaches 320 times, the 45° point is determined as the monitoring point.
[0291] Correspondingly, in the above step 3, further comprising:
[0292] Further, a minimum residual wall thickness prediction model based on LSTM is built for the monitoring point.
[0293] wherein the input of the model is the residual wall thickness sequence formed by the monitored point in each time point in the historical time period T1, and the output of the model is the predicted residual wall thickness sequence of the monitored point in the future time period T2 (for example, 30 days).
[0294] Correspondingly, in the above step 4, further comprising:
[0295] Training the minimum residual wall thickness prediction model based on the determined residual wall thickness of the monitored point.
[0296] Specifically, given the residual wall thickness sequence of the monitored point in the historical time period T1 and its corresponding real wall thickness sequence in the future time period T2, the parameters of the LSTM are learned to obtain the trained model.
[0297] After the minimum residual wall thickness prediction model is trained, the model can be used to predict the residual wall thickness of the minimum residual wall thickness point (monitored point) in the future period of time, so as to accurately reflect the corrosion condition of the weak area of the pipeline.
[0298] The model trained in the above embodiment 1 can accurately predict the overall corrosion state of the pipeline in the future period of time. Since the pipeline has a requirement for the minimum residual wall thickness, the remaining life of the pipeline can also be obtained according to the predicted pipeline wall thickness.
[0299] The embodiment 2 further increases the separate prediction of the minimum residual wall thickness point on the basis of the above embodiment 1. By focusing on monitoring the special point, the residual wall thickness condition of the weak area of the pipeline can be accurately reflected.
[0300] By comparing the predicted overall corrosion state of the pipeline with the prediction result of the minimum residual wall thickness point:
[0301] If the difference is small, it indicates that the pipeline is in a uniform corrosion state. In this case, when the corrosion state reaches or approaches the minimum residual wall thickness required by the pipeline, the entire pipeline can be directly replaced.
[0302] If the difference is large, it indicates that only the local point (i.e., the monitored point) of the pipeline is severely corroded, and only the local point of the pipeline needs to be repaired, thereby reducing the pipeline maintenance cost and having practical application value.
[0303] Embodiment 3
[0304] The embodiment 3 describes a pipeline corrosion state prediction system based on monitoring and detection data fusion. The system and the pipeline corrosion state prediction method in the above embodiments 1 or 2 are based on the same inventive concept.
[0305] The pipeline corrosion state prediction system based on monitoring and detection data fusion comprises a corrosion probe monitoring device, an ultrasonic thickness detection device and a computer device, the corrosion probe monitoring device and the ultrasonic thickness detection device are connected with the computer device,
[0306] The corrosion probe monitoring device is used for collecting monitoring data in real time and transmitting the monitoring data to the computer device, and the ultrasonic thickness detection device is used for collecting detection data of each point in the circumferential direction of the pipeline in real time and uploading the detection data to the computer device.
[0307] The computer device comprises a processor and a memory, a computer program is stored on the memory, and the processor is used for realizing the pipeline corrosion state prediction method based on monitoring and detection data fusion when the processor executes the computer program.
[0308] As shown in Figure 4 , the corrosion probe monitoring device comprises an LPR probe.
[0309] When the monitoring data is collected, the LPR probe is inserted into the pipeline through a flange interface, and the probe axis is parallel to the fluid flow direction.
[0310] As shown in Figure 4 (a) and (b), the ultrasonic thickness detection device comprises a plurality of ultrasonic probes.
[0311] Each ultrasonic probe is installed on the outer wall of the pipeline and located in the same circumferential direction of the pipeline, and the ultrasonic probe is perpendicular to the surface of the pipeline.
[0312] The present application integrates the LPR corrosion probe and the multi-probe rotary ultrasonic thickness detection device in a single device, realizes the synchronization and cooperation of real-time corrosion rate monitoring and multi-point wall thickness dynamic detection, and is beneficial to solve the data island problem of the traditional technology.
[0313] The present application realizes the integration of "perception-decision-execution" through the whole process of data acquisition (self-cleaning probe anti-pollution), dynamic point expansion (automatic identification of weak points), fusion calculation and life warning autonomous operation.
[0314] As shown in Figure 4 (b), the LPR corrosion probe of the corrosion probe monitoring device is provided with a self-cleaning structure, as shown in Figure 1 (b), which comprises a super-hydrophobic coating 101, a mechanical scraping assembly 102 and an ultrasonic cleaning unit 103.
[0315] The super-hydrophobic coating 101 is composed of silicon dioxide nanoparticles and fluorocarbon resin, which is coated on the surface of the LPR corrosion probe 104, the contact angle is ≥160°, and the surface roughness Ra is ≤0.1 μm.
[0316] The mechanical scraping assembly 102 contains a ring-shaped stainless steel scraping blade, a micro-step motor and a photoelectric sensor, and the inner diameter of the scraping blade is gap-fitted with the outer diameter of the LPR corrosion probe (gap ≤ 0.05 mm).
[0317] The ultrasonic cleaning unit 103 is internally provided with a piezoelectric ceramic sheet (frequency 20 kHz ± 2 kHz) and a driving circuit.
[0318] It should be noted that the structure of the corrosion probe monitoring device is relatively conventional, and will not be described in detail here. In use, the LPR corrosion probe 104 is inserted into the pipeline through a flange interface (DN20 standard), and the probe axis is parallel to the fluid flow direction.
[0319] The ultrasonic thickness measurement detection device includes an ultrasonic probe array 201, for example, including Figure 1 six ultrasonic probes (2011, center frequency 5 MHz) are circumferentially uniformly distributed as shown in the figure, and the probe spacing is adjustable (range 0°~360°, resolution 1°).
[0320] In addition, the ultrasonic probe array 201 is also provided with a rotary drive mechanism 202, which is in the form of a step motor (step angle 1.8°) + harmonic reducer (reduction ratio 1:50), for example, with a positioning accuracy of ±0.5°.
[0321] In use, the ultrasonic probe array 201 (of the annular rotating support) is fixed to the outer wall of the pipeline by a magnetic clamp (conventional structure), and the rotating support is adjusted so that the probe is perpendicular to the surface of the pipeline, as shown in Figure 4 .
[0322] The use of magnetic tools here can not only achieve fixation, but also can be rotated and scanned under the action of 202. The initial point of the ultrasonic thickness measurement is set to 0°, 90°, 180° and 270° by default, and custom angles (such as 45° and 135°) are supported.
[0323] In this embodiment, the dynamic point determination method is used for ultrasonic detection at each point, and the process is as follows:
[0324] I. The user presets the initial detection points, and selects 0°, 90°, 180° and 270°.
[0325] II. In the process of rotating and scanning, it is judged that the thickness value of a certain point between the two adjacent points is greater than the average value of the remaining thickness of the two points; if the thickness value h x satisfies h x ≤0.8×h avg , the point is automatically added to the monitoring sequence.
[0326] Where h avg is the average value of the remaining thickness of the two adjacent points.
[0327] For example, during the scanning from the 0° point to the 90° point, when the scanning is rotated to the 45° point, the remaining wall thickness of the pipeline is detected as 7.2 mm, while the average wall thickness of the adjacent points (0° and 90°) is 8.0 mm.
[0328] Since 7.2 mm < 0.8 x 8.0 mm (6.4 mm), the system automatically adds the 45° point to the monitoring sequence, and detects once every 6 hours subsequently.
[0329] III. The newly added point is prioritized, and the smaller the remaining wall thickness, the higher the priority, and a maximum of 16 dynamic monitoring points are supported.
[0330] The application establishes a closed-loop management of "monitoring-fusion-prediction-alarm", in which the ultrasonic point is dynamically supplemented to automatically expand the monitoring sequence; through an online learning mechanism, the LSTM weight is updated once every 7 days, and a sliding window (90-day data) can ensure the adaptability of the model; when the prediction error > 5%, a reconstruction alarm is triggered, so as to realize predictive maintenance without manual operation.
[0331] The application realizes the intercommunication and sharing of various corrosion information by data fusion of monitoring and detection data, and sets an intelligent prediction module on a computer device, so that the new data can be continuously adapted and the corrosion condition can be predicted, which is convenient for predictive maintenance work on site. The application realizes the dynamic correlation analysis of the corrosion rate and the remaining wall thickness and accurately predicts the future corrosion trend by integrating the LPR probe, the multi-channel ultrasonic thickness measuring device, the data fusion algorithm and the intelligent prediction model.
[0332] Of course, the above description is only for the preferred embodiments of the application, and the application is not limited to the above-described embodiments. It should be noted that any skilled person in the art can make all equivalent substitutions and obvious modifications under the teaching of the present application, which all fall within the scope of the present application, and should be protected by the present application.
Claims
1. A method for predicting the corrosion state of a pipeline based on monitoring and detection data fusion, characterized in that, Comprising the following steps: Step 1. First, obtain the real-time corrosion rate of the pipeline measured by the corrosion monitoring probe, and integrate to calculate the loss of wall thickness; then subtract the loss of wall thickness from the initial wall thickness to obtain the remaining wall thickness as the monitoring data; At the same time, obtain the remaining wall thickness of each point in the circumferential direction of the pipeline obtained by ultrasonic detection, that is, the detection data; Step 2. According to the sampling time point sequence, a plurality of sets of remaining wall thickness data are sequentially constructed; wherein each set of remaining wall thickness data is composed of a monitoring data and a plurality of detection data of the points in the circumferential direction of the pipeline; Data fusion is performed on all the remaining wall thicknesses in each set of remaining wall thickness data, and a plurality of sets of fused wall thicknesses are obtained; Step 3. Build a pipeline corrosion state prediction model based on LSTM, wherein the input of the model is the fused wall thickness sequence in the historical time period T1, and the output of the model is the predicted remaining wall thickness sequence in the future time period T2; Step 4. Train the pipeline corrosion state prediction model based on the fused wall thickness obtained in step 2; The training objective of the LSTM model is to learn the model parameters of the LSTM given the model input features and their corresponding output labels and variational parameters ; where the model parameters include the weight matrices W, U and bias terms b of the LSTM units, and the network parameters of the predicted gating probabilities; the variational parameters include parameters that control the approximated posterior distribution; During the training of the LSTM model, the deterministic gating of the traditional LSTM is improved to probabilistic stochastic gating: forget gate input gate output gate modeled as Bernoulli random variables; At the same time, a variational inference framework is introduced to generate variational parameters through an inference network , sample the gating state; The training target is to maximize the variational lower bound ELBO of the observation data likelihood to balance the prediction accuracy and the stability of the gating distribution; Given the fused wall thickness sequence in the historical time period T1 and the real wall thickness sequence in the future time period T2, the parameters of the LSTM are learned to obtain the trained pipeline corrosion state prediction model for predicting the overall corrosion state of the pipeline.
2. The method for predicting the state of corrosion in a pipeline based on the fusion of monitoring and inspection data according to claim 1, characterized in that, In step 2, further comprising: Determine the point corresponding to the minimum remaining wall thickness in all detection data of each set of remaining wall thickness data; Statistically count the number of times each point corresponding to the minimum remaining wall thickness appears in the historical time period T1; if a certain point appears the minimum remaining wall thickness the most times after counting, the point is determined as the minimum wall thickness point as the to-be-monitored point; In step 3, further comprising: Further, for the to-be-monitored point, build a minimum remaining wall thickness prediction model based on LSTM; Wherein the input of the model is the remaining wall thickness sequence formed by the to-be-monitored point at each time point in the historical time period T1, and the output of the model is the predicted remaining wall thickness sequence of the to-be-monitored point in the future time period T2; In step 4, further comprising: Train the minimum remaining wall thickness prediction model based on the determined remaining wall thickness of the to-be-monitored point; Given the remaining wall thickness sequence of the to-be-monitored point in the historical time period T1 and the real wall thickness sequence in the future time period T2, the parameters of the LSTM are learned to obtain the trained model for predicting the remaining wall thickness of the to-be-monitored point.
3. The pipeline corrosion state prediction method based on monitoring and detection data fusion according to claim 1 or 2, characterized by, In step 1, during ultrasonic detection, each point adopts a dynamic point determination method, the process is as follows: I. The user presets the initial detection points, selects 0°, 90°, 180°, and 270° four points; II. In the process of rotating scanning, judging the size relation between the wall thickness value of a certain point between two adjacent point positions and the average value of the residual wall thickness of the two point positions; if the wall thickness value of the certain point satisfies , automatically adding the point into the monitoring sequence; wherein, is the average value of the residual wall thickness of the two adjacent points; III. The new point is sorted by priority, the smaller the remaining wall thickness, the higher the priority, and a maximum of 16 dynamic monitoring points are supported.
4. The pipeline corrosion state prediction method based on monitoring and detection data fusion according to claim 1 or 2, characterized by, In step 2, the specific process of data fusion is as follows: Assuming that each group of residual wall thickness data includes 1 monitoring data and point detection data; Definitions The similarity value between any two data in each group of remaining wall thickness data is defined as The similarity value between any two data in each group of remaining wall thickness data is defined as The similarity value between any two data in each group of remaining wall thickness data is defined as The similarity value between any two data in each group of remaining wall thickness data is defined as The similarity value between any two data in each group of remaining wall thickness data is defined as The similarity value between any two data in each group of remaining wall thickness data is defined as wherein , represents the variance of the first , data pair obtained by monitoring or detecting ; Definitions or then is the error function, obtained directly from table lookup ; ; wherein is the maximum value among all similarity values, is the minimum value among all similarity values; Constructing the weight influence matrix The formula is as follows: ; In order to obtain the weight influence matrix In numerical form to express The weight of each data in the residual wall thickness data, further introduce weight factor, and according to the matrix Solve the weight factor; is a non-negative symmetric matrix, by the properties of matrix, there exists a matrix whose largest eigenvalue λ and its corresponding eigenvector, and the eigenvector is positive, so that , thus using as the weight factor of the monitoring data measurement; wherein , resulting in a set of non-negative matrices V such that , ; denotes a non-negative number; In the formula ; wherein denotes a weighting factor; Assume that there are a total of monitoring data at a certain point in time, the weight factor of the first data is : ; normalizing the weight factors of all data to obtain the maximum weight of all data in each group of remaining wall thickness data : ; Final data fusion after fusion wall thickness is: .
5. The method for predicting the state of corrosion in a pipeline based on the fusion of monitoring and inspection data according to claim 1, characterized in that, In step 4, the process of modeling the key gating signal as a random variable is as follows: forget gate , input gate , output gate as random variables to explicitly introduce uncertainty in the model's internal decisions; Gating distribution selection: Assume each gating unit At time step is an independent Bernoulli random variable: forget gate probability: ; Input gate probability: ; Output gate probability: ; wherein is a Sigmoid function, the output probability between the two. 、 、 is the probability of the gate opening computed by the LSTM model from the input data, has the same dimension as the LSTM hidden layer cell number, 、 、 is the original gate activation value before the corresponding probability 、 、 is computed Then the gating distribution is: ; ; ; wherein i.e. the probability of opening the door is , i.e. the probability of closing the door is ; The probability of opening the door is , The probability of closing the door is ; The probability of opening the door is , The probability of closing the door is .
6. The method for predicting the state of corrosion of a pipeline based on fusion of monitoring and inspection data according to claim 5, characterized in that, In step 4, the process of introducing the variational inference framework is as follows: Introduce a variational parameter controlled variational distribution to approximate the true posterior, denotes the current input; Selection and sampling of variational distribution: Variational distribution Also chosen to be a parametric independent Bernoulli distribution; Construction of inference network: Variational parameters , , The approximate gating probability is generated by an inference network; the inference network takes as input the current input and outputs , , ; wherein are weights and biases of the inference network, constituting variational parameters ; According to the variational distribution Sample the gate: , denotes the approximate posterior sampling forget gate; , denotes the input gate from the approximate posterior sampling; denotes the approximate posterior sampling output gate; wherein , , is a gating probability parameter of the variational distribution computed by the inference network based on the current input ; contains all parameters of the inference network ( ).
7. The method for predicting the state of corrosion in a pipeline based on the fusion of monitoring and inspection data according to claim 1, characterized in that, In step 4, the loss function during training is the negative ELBO. ; where K denotes the number of Monte Carlo samples; denotes a set of randomly sampled gating states, denotes the likelihood probability of the target sequence y predicted by the model given the input history sequence and a set of specific random gating states ; denotes the variational approximate posterior distribution, and z denotes the random variable of all gating signals; is the prior distribution of gating states; is the KL divergence between and 8. The method for predicting the state of corrosion in a pipeline based on fusion of monitoring and inspection data according to claim 1, characterized in that, In step 4, the LSTM model automatically triggers model weight update every 7 days; a sliding window mechanism is used, and only the fusion wall thickness data in the recent period T1 is used for training to ensure that the LSTM model focuses on the latest patterns.
9. A pipeline corrosion state prediction system based on monitoring and detection data fusion, comprising a corrosion probe monitoring device, an ultrasonic thickness detection device, and a computer device; the corrosion probe monitoring device and the ultrasonic thickness detection device are connected to the computer device; The corrosion probe monitoring device is used to collect monitoring data in real time and transmit it to the computer device; the ultrasonic thickness detection device is used to collect detection data of each point in the circumferential direction of the pipeline in real time and upload it to the computer device; wherein The computer device comprises a processor and a memory; A computer program is stored on the memory; characterized in that when the processor executes the computer program, it is used to implement the pipeline corrosion state prediction method based on monitoring and detection data fusion according to any one of claims 1 to 7; The corrosion probe monitoring device comprises an LPR probe; When collecting monitoring data, the LPR probe is inserted into the pipeline through the flange interface, and the probe axis is parallel to the fluid flow direction; The ultrasonic thickness detection device comprises a plurality of ultrasonic probes; Each ultrasonic probe is installed on the outer wall of the pipeline and located in the same pipeline circumferential direction, and the ultrasonic probe is perpendicular to the pipeline surface.
Citation Information
Patent Citations
Expressway lane-level speed prediction method based on multi-source data fusion
CN117012039A
Prediction and early warning method and system for corrosion of natural gas pipeline
CN119004336A