Oil and gas pipeline corrosion prediction method and platform based on deep reinforcement learning

By employing deep reinforcement learning methods, combined with multi-dimensional sensor data and improved signal processing techniques, a deep Q-network model was constructed. This model solved the problem of real-time prediction of corrosion monitoring in traditional oil and gas pipelines, enabling real-time and accurate monitoring of the corrosion status of oil and gas pipelines, thereby improving prediction accuracy and pipeline operation safety.

CN121885023BActive Publication Date: 2026-06-23SOUTHWEST PETROLEUM UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SOUTHWEST PETROLEUM UNIV
Filing Date
2026-03-18
Publication Date
2026-06-23

Smart Images

  • Figure CN121885023B_ABST
    Figure CN121885023B_ABST
Patent Text Reader

Abstract

The application discloses a deep reinforcement learning-based oil and gas pipeline corrosion prediction method and platform, and relates to the technical field of oil and gas pipeline corrosion prediction. The method comprises the following steps: collecting pipeline operation related time series data through a multi-dimensional sensor, reconstructing non-equidistant data through an improved signal processing technology, constructing a deep Q network prediction framework of a time series residual error corrosion state prediction algorithm, determining an optimal model through multi-group super parameter combination iterative training optimization, outputting a normalized corrosion rate estimation value combined with a residual error correction mechanism, and obtaining an actual corrosion rate prediction result through inverse transformation; and performing specific processes such as prediction framework modeling, network structure construction, residual error algorithm embedding, super parameter optimization, test data processing and prediction result correction, and the platform realizes the whole-process closed-loop operation of data acquisition, processing, modeling, prediction and analysis relying on each functional unit. The application significantly improves the accuracy and time series adaptability of corrosion prediction, and provides technical support for the safe operation of oil and gas pipelines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of oil and gas pipeline corrosion prediction technology, and in particular to an oil and gas pipeline corrosion prediction method and platform based on deep reinforcement learning. Background Technology

[0002] As a core infrastructure for energy transportation, oil and gas pipelines face long-term challenges due to the combined effects of multiple factors, including temperature fluctuations, changes in medium composition, and electrochemical reactions. Corrosion directly threatens the structural integrity and transportation safety of these pipelines. Traditional corrosion monitoring relies on manual inspection and offline analysis, making real-time prediction under dynamic operating conditions difficult. Furthermore, the corrosion process in oil and gas pipelines exhibits significant time-series dependence and multi-factor interaction characteristics, rendering single monitoring indicators or static models inadequate for accurately depicting corrosion evolution. With breakthroughs in deep reinforcement learning for dynamic decision-making, and considering the need for multi-scale corrosion data analysis, developing technical methods and platforms that combine time-series modeling capabilities with real-time prediction performance has become crucial for accurately predicting the corrosion status of oil and gas pipelines and ensuring the continuous and stable transportation of energy.

[0003] Existing technologies suffer from two core defects: First, traditional corrosion prediction models mostly employ static modeling methods, failing to fully consider the dynamic interaction effects and time-series dependencies of corrosion factors. They are not adaptable enough to non-equal-interval sampling data, making it difficult to capture long-term evolution trends and sudden fluctuations in the corrosion process, resulting in significant deviations between prediction results and actual corrosion conditions. Second, existing analysis platforms lack efficient fusion and processing capabilities for multi-source heterogeneous data, failing to achieve a closed-loop connection between prediction models and data processing, visualization analysis, and risk warning throughout the entire process. Furthermore, model parameter optimization relies on manual experience adjustments, making it impossible to adaptively iterate and update based on new corrosion data, thus failing to meet the multi-scale, full-lifecycle corrosion monitoring and prediction needs of oil and gas pipelines. Summary of the Invention

[0004] To overcome the shortcomings and deficiencies of existing technologies, this invention provides a method and platform for predicting corrosion of oil and gas pipelines based on deep reinforcement learning.

[0005] The technical solution adopted in this invention is a corrosion prediction method for oil and gas pipelines based on deep reinforcement learning, comprising the following steps: S1, collecting data on temperature, CO2 partial pressure, H2S partial pressure, pH value, and Cl- content during the operation of the oil and gas pipeline using multi-dimensional sensors. -S1) Construct an original corrosion dataset with different sampling intervals based on time-series data related to content, total mineralization, residual corrosion inhibitor, and liquid-to-gas ratio; S2) Reconstruct and enhance the original non-equal-interval time-series data using an improved assignment-adjusted Fourier transform technique to generate an equal-interval training dataset that maintains the original time-series structure and amplitude distribution; S3) Divide the equal-interval training dataset into a sub-training set and a sub-validation set, construct a prediction framework based on a deep Q-network, and introduce a time-series residual corrosion state prediction algorithm to characterize the time-series dependency relationship under the dynamic interaction of corrosion factors; S4) Train the deep Q-network model under different candidate hyperparameter combinations using the sub-training set, and iteratively optimize the hyperparameter combination using the feedback results from the sub-validation set to determine the optimal model structure; S5) Input the test set data into the deep Q-network model with the optimal hyperparameter configuration, and output the corrosion rate estimate in the normalized space using the time-series residual correction mechanism; S6) Map the normalized corrosion rate estimate to the original dimensions through an inverse transformation process to obtain the predicted result of the actual corrosion rate of the oil and gas pipeline.

[0006] Furthermore, the model formula for the time-series residual corrosion state prediction algorithm is as follows: ,in, This represents the time-series residual corrosion state value at time t. This represents the predicted corrosion rate at time t. This represents the actual corrosion rate at time t. This represents the residual decay coefficient, and m represents the number of residual memory steps. This represents the residual weighting coefficient at step k. Indicates the discount factor. Represents the parameters of a deep Q-network. The state-action value function represents the state. This represents the environmental state at time t. This indicates the action to be predicted at time t. This represents the state feature mapping function.

[0007] Furthermore, the action selection strategy formula of the deep Q-network is as follows: ,in, Represents the state at time t Select action The probability, Indicates the probability of exploration. Representing state The corresponding action space scale, Representing state The set of all optional actions below, The state-action value function represents the state. This represents the parameters of a deep Q-network.

[0008] Furthermore, the loss function of the deep Q-network is calculated as follows: ,in, This represents the value of the loss function. Represents the expectation operator. This represents the experience replay buffer. Indicates the state at time t. This indicates the action to be predicted at time t. This represents the reward value at time t. Indicates the first Current state Indicates the discount factor. Indicates the target network parameters. Represents the parameters of a deep Q-network. Represents the value function. This represents the L2 regularization coefficient.

[0009] Furthermore, the formula for calculating the reward function is: ,in, Indicates action Compared with the actual corrosion rate The corresponding reward value, This indicates the action to be predicted at time t. This represents the actual corrosion rate at time t. Indicates the positive reward coefficient. Indicates the penalty coefficient. This represents the reward sensitivity parameter.

[0010] Furthermore, the formula for calculating the state transition probability is: ,in, Indicates the state Execute action Then transition to state The probability, This represents the probability concentration parameter. This represents the state transition mapping function. Represents the set of all possible environmental states. This represents the Euclidean norm.

[0011] Further, S3 includes the following sub-steps: S31, based on the Markov decision process framework, the corrosion prediction process of oil and gas pipelines is modeled as a decision system including a set of states, a set of actions, a set of rewards, state transition probabilities, and strategies, wherein the states are composed of corrosion data sample features, and the actions correspond to the corrosion rate prediction results; S32, a deep Q-network structure is constructed, the input layer dimension is set to match the number of sample features, the hidden layer adopts a multilayer perceptron structure and selects a nonlinear activation function, and the output layer dimension corresponds to the action space scale; S33, the temporal residual corrosion state prediction algorithm is embedded into the value function calculation process of the deep Q-network, and the value estimation accuracy is optimized by fusing historical residual information with current state features; S34, the storage structure and sampling mechanism of the experience replay buffer are defined, a buffer capacity threshold is set, and a random sampling strategy is used to select training samples from historical experience data to reduce data correlation.

[0012] Further, S4 includes the following sub-steps: S41, determining the candidate hyperparameter set for the deep Q-network, including learning rate, discount factor, exploration probability decay range, batch size, number of hidden layer neurons, and empirical replay buffer capacity calibration parameters; S42, dividing the sub-training set data into fixed batches, sequentially inputting them into deep Q-network models with different hyperparameter combinations, calculating the predicted output through forward propagation, and calculating the error value based on the loss function; S43, using the backpropagation algorithm to iteratively update the model parameters, adjusting the network weights according to the gradient of the loss function, setting a threshold for the number of iterations and an early stopping condition to avoid overfitting; S44, calculating the prediction error index of the model under each hyperparameter combination based on the sub-validation set data, selecting the optimal hyperparameter combination through comparative analysis, and fixing the model structure.

[0013] Further, step S5 includes the following sub-steps: S51, extracting state features from the test set data and constructing a test state vector according to the same feature dimensions and arrangement order as the training set; S52, inputting the test state vector into a deep Q-network model with optimal hyperparameter configuration, and calculating the initial corrosion rate estimate in the normalized space through network forward propagation; S53, calling the temporal residual corrosion state prediction algorithm, inputting historical prediction residual data and current state information, and calculating the temporal residual correction amount; S54, fusing the initial corrosion rate estimate and the temporal residual correction amount to obtain the corrected normalized corrosion rate estimate, ensuring the temporal consistency of the prediction results.

[0014] This platform, based on deep reinforcement learning, is designed for predicting corrosion in oil and gas pipelines. It comprises: a multi-source heterogeneous corrosion data acquisition and transmission unit, used to collect multi-dimensional operating parameters and time-series corrosion data of oil and gas pipelines via a distributed sensor network, and employing a heterogeneous data transmission protocol for real-time data upload and storage; a non-uniform interval data augmentation and preprocessing unit, used to receive the acquired data and convert non-uniform interval data to uniform interval data using an improved assignment-adjusted Fourier transform technique, while simultaneously filtering data noise and removing outliers; and a deep reinforcement learning prediction model training unit, used to load the processed data, construct a fusion model of a deep Q-network and a time-series residual corrosion state prediction algorithm, and perform hyperparameter optimization and model training. The system comprises several modules: a multi-scale corrosion state visualization analysis unit, which receives the output of the prediction model and displays the corrosion rate evolution trend and prediction error distribution at different time scales and in different pipeline sections through multi-dimensional charts; a corrosion risk level assessment and early warning unit, which determines the corrosion risk level and triggers the corresponding early warning mechanism based on the predicted corrosion rate data, combined with pipeline material characteristics and operating parameters, using a risk assessment algorithm; and a model iteration optimization and update unit, which continuously collects new corrosion detection data, updates the parameters and optimizes the performance of the trained model based on an incremental learning strategy, and stores model iteration versions for historical traceability. These units are sequentially connected through data interfaces to form a closed-loop operating architecture encompassing the entire process from data acquisition, processing, modeling, prediction to risk early warning.

[0015] Beneficial Effects: This invention proposes a method and platform for predicting corrosion in oil and gas pipelines based on deep reinforcement learning. It collects time-series data related to pipeline operation through multi-dimensional sensors, and uses improved signal processing technology to convert non-uniformly spaced data into uniformly spaced data. A prediction framework is constructed based on a deep Q-network, embedding a time-series residual corrosion state prediction algorithm. The optimal model is determined through iterative optimization using multiple hyperparameter combinations. Combined with a residual correction mechanism and inverse dimensional transformation, accurate corrosion rate prediction results are output. The platform forms a closed-loop operating architecture with six functional units. The time-series residual algorithm deeply characterizes the dynamic interaction and temporal dependencies of corrosion factors, effectively adapting to the characteristics of non-uniformly spaced sampling data. This overcomes the shortcomings of traditional static models in capturing corrosion evolution trends and sudden fluctuations, significantly improving prediction accuracy. The platform integrates multi-source heterogeneous data processing, adaptive model training, multi-scale visualization analysis, and risk warning functions, achieving automatic hyperparameter optimization and incremental iterative model updates. This solves the problems of insufficient data fusion capabilities and reliance on manual parameter adjustment in existing platforms, providing real-time, accurate, and full-cycle technical support for monitoring the corrosion state of oil and gas pipelines, ensuring the safety and stability of pipeline operation. Attached Figure Description

[0016] Figure 1 This is a flowchart of the method steps of the present invention;

[0017] Figure 2 This is a diagram showing the platform unit composition of the present invention. Detailed Implementation

[0018] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0019] like Figure 1 As shown, the corrosion prediction method for oil and gas pipelines based on deep reinforcement learning includes the following steps:

[0020] S1 collects data on temperature, CO2 partial pressure, H2S partial pressure, pH value, and Cl- content during the operation of oil and gas pipelines using multi-dimensional sensors. - The original corrosion dataset, including different sampling intervals, was constructed using time-series data related to content, total mineralization, residual corrosion inhibitor, and liquid-to-gas ratio.

[0021] Specifically, step S1 completes data acquisition through a multi-dimensional sensor array deployed at key monitoring sections of oil and gas pipelines. The sensor spacing is set differently according to the pipeline operating pressure level. One set is deployed every 2 kilometers in high-pressure sections and one set is deployed every 5 kilometers in medium and low-pressure sections. Each set of sensors includes 8 detection modules, which monitor 8 core corrosion influencing factors, namely temperature, carbon dioxide partial pressure, hydrogen sulfide partial pressure, pH value, chloride ion content, total mineralization, corrosion inhibitor residue, and liquid-gas ratio. The temperature detection module measures from -20℃ to 80℃ with an accuracy of ±0.1℃; the gas partial pressure detection module has a resolution of 0.01 kPa; the pH value detection range is 2 to 12 with an accuracy of ±0.02; the chloride ion content detection limit is 1 mg / L, and the measurement range covers 1 to 10,000 mg / L; the total mineralization detection range is 100 to 50,000 mg / L; the corrosion inhibitor balance detection accuracy is 0.1 mg / L; and the liquid-to-gas ratio detection range is 0.01 to 10 cubic meters per thousand cubic meters. The data sampling interval is dynamically adjusted according to the pipeline's operating conditions. Under normal operating conditions, the sampling interval is 1 hour, which is automatically shortened to 10 minutes when operating conditions fluctuate. The acquisition cycle is no less than 90 days. The final raw corrosion dataset includes at least 17,280 time-series records. Each record is associated with a corresponding acquisition timestamp, sensor number, and pipeline location coordinates, ensuring data traceability and spatial correlation, providing comprehensive and continuous raw data support for subsequent corrosion evolution analysis.

[0022] S2 uses an improved assignment-adjusted Fourier transform technique to reconstruct and enhance the original non-equal interval time series data, generating an equal interval training dataset that maintains the original time series structure and amplitude distribution.

[0023] Specifically, step S2 employs an improved assignment-adjusted Fourier transform technique to process the original non-uniformly spaced time-series data. First, the original data is aligned along the time axis, establishing a unified time grid with a standard time interval of 10 minutes. For missing data points in the grid, cubic Hermite interpolation is used to supplement them based on the changing trends of adjacent valid data, ensuring data continuity. Subsequently, a Fourier transform is performed on the supplemented time-series data, converting the time-domain signal to the frequency domain. During the transform, the sampling frequency is set to 0.0167 Hz, corresponding to a time resolution of 10 minutes and a frequency resolution of 1.986 × 10⁻⁶ Hz. By adjusting the window function parameters, a Hanning window is selected to suppress spectral leakage, with the window function length set to 2048 data points. In the frequency domain, the amplitude and phase spectra of the signal are enhanced, retaining the effective frequency components in the 0.001 to 0.01 Hz band, which corresponds to the main dynamic change cycle of the corrosion process, while filtering out high-frequency noise and power frequency interference signals. Finally, the processed frequency domain signal is converted back to the time domain by inverse Fourier transform to generate an equally spaced training dataset. The time interval of the dataset is uniformly 10 minutes. Each data point includes standardized measurements of 8 corrosion influence factors. The total amount of data is kept consistent with the original dataset, and the changing trend and amplitude distribution characteristics of the original time series structure are strictly maintained to ensure the reliability and effectiveness of the subsequent model training data.

[0024] S3 divides the equally spaced training dataset into a sub-training set and a sub-validation set, constructs a prediction framework based on a deep Q-network, and introduces a temporal residual corrosion state prediction algorithm to characterize the temporal dependency relationship under the dynamic interaction of corrosion factors.

[0025] Specifically, step S3 first divides the equally spaced training dataset processed in S2 into a 7:3 ratio for a training set and a validation set. Stratified sampling is used in this division to ensure consistency in the numerical distribution and temporal trends of the two datasets across the corrosion factors, preventing data distribution bias from affecting model training performance. A prediction framework is constructed based on a deep Q-network. The network architecture includes an input layer, hidden layers, and an output layer. The input layer has 8 nodes, corresponding to the 8 corrosion influencing factors; the hidden layer has 4 layers with 256, 128, 64, and 32 neurons per layer, using the ReLU activation function to enhance the model's ability to fit nonlinear features through linear rectification; the output layer has 1 node, corresponding to the predicted corrosion rate. A temporal residual corrosion state prediction algorithm is embedded into the value function calculation process of the deep Q-network. This algorithm constructs a residual calculation module, traces the predicted residual information over 100 historical time steps, and sets residual decay coefficients and memory step parameters to accurately characterize the temporal dependencies in the dynamic interaction of corrosion factors. Meanwhile, based on the Markov decision process framework, the corrosion prediction process of oil and gas pipelines is modeled as a decision system. The state space consists of feature vectors of eight corrosion influencing factors, the action space corresponds to the possible range of corrosion rate values, and the reward mechanism is directly related to the prediction error. The state-action-reward-next state samples in the training process are stored through an experience replay buffer with a capacity of 100,000. A random sampling strategy is used to select training samples to reduce the interference of data correlation on model training.

[0026] S4. Train the deep Q-network model under different candidate hyperparameter combinations using the sub-training set, and iteratively optimize the hyperparameter combination using the feedback results from the sub-validation set to determine the optimal model structure.

[0027] Specifically, step S4 first determines the candidate hyperparameter set for the deep Q-network, including key parameters such as learning rate, discount factor, exploration probability, batch size, number of hidden layer neurons, and experience replay buffer capacity. The candidate learning rate values ​​are set to three gradients: 0.0001, 0.001, and 0.01; the candidate discount factor values ​​are 0.85, 0.9, and 0.95; the candidate initial exploration probability value ranges from 0.9 to 1.0, with a decay rate of 0.995 to 0.999; the candidate batch size is 32, 64, and 128; the candidate number of hidden layer neurons is selected within the range of 128 to 512 with a step size of 64; and the candidate experience replay buffer capacity is 50000, 100000, and 150000. The sub-training set data is divided into several batches according to the selected batch size, and these batches are sequentially input into the deep Q-network model with different hyperparameter combinations. The erosion rate prediction output for each batch is calculated through forward propagation, and the error between the predicted output and the true value is calculated based on a preset loss function. Using the backpropagation algorithm, the model parameters are iteratively updated based on the gradient information of the loss function. The learning rate is dynamically adjusted according to the training epochs, decaying by 5% every 100 epochs, with a maximum of 1000 epochs. An early stopping condition is also set: training stops when the prediction error on the sub-validation set shows no decreasing trend for 50 consecutive epochs to avoid overfitting. Based on the sub-validation set data, three evaluation metrics—mean absolute error, mean squared error, and coefficient of determination—are calculated for each hyperparameter combination. A weighted summation method is used to determine the comprehensive performance score, with a weighting ratio of 3:4:3. The optimal hyperparameter combination is selected based on the comprehensive score, and the fixed model structure is used for subsequent predictions.

[0028] S5 inputs the test set data into the deep Q-network model with the optimal hyperparameter configuration, and outputs the corrosion rate estimate in the normalized space by combining the temporal residual correction mechanism.

[0029] Specifically, step S5 first extracts state features from the test set data. The test set data comes from time-series data from the same batch and monitoring section as the training set, with equal intervals, and accounts for 20% of the total training set data. The extraction process strictly follows the same feature dimensions and arrangement order as the training set. Each data sample includes standardized values ​​of 8 corrosion influencing factors, forming a test state vector with a dimension of 8×1. The test state vectors are grouped according to a batch size of 64 samples and sequentially input into a deep Q-network model with the optimal hyperparameter configuration determined in S4. The model receives the state vectors through the input layer, and processes them through linear transformation and ReLU activation function of 4 hidden layers to achieve layer-by-layer feature extraction and nonlinear mapping. Finally, the initial corrosion rate estimate in the normalized space is output through the linear activation function of the output layer. The normalization range is 0 to 1, corresponding to 0 to 10 mm per year of the original corrosion rate. The temporal residual corrosion state prediction algorithm is invoked, taking into account the predicted residual data from 50 historical time steps and the current test state vector information. The algorithm calculates the mapping value between the weighted sum of historical residuals and the current state characteristics to obtain the temporal residual correction amount, which ranges from -0.1 to 0.1. The initial corrosion rate estimate and the temporal residual correction amount are then fused together using a weighted summation method, with weights set to 0.85 and 0.15 respectively, to obtain the corrected normalized corrosion rate estimate. This process effectively compensates for model prediction bias by dynamically adjusting the residual weights, ensuring the temporal consistency and accuracy of the prediction results.

[0030] S6, through the inverse transformation process, maps the normalized corrosion rate estimate to the original dimension, and obtains the prediction result of the actual corrosion rate of oil and gas pipeline.

[0031] Specifically, step S6 maps the normalized corrosion rate estimate to the original dimension through an inverse transformation process. The inverse transformation uses a linear transformation method, based on the normalization parameters determined during training, namely the maximum and minimum values ​​of the original corrosion rate. The maximum value is set to 10 mm / year, and the minimum value to 0 mm / year, establishing a mapping relationship between the normalized value and the original dimension value. In practice, the normalized corrosion rate estimate, falling within the range of 0 to 1, is first obtained. This value is then multiplied by the original corrosion rate range (10 mm / year) and added to the original minimum corrosion rate (0 mm / year) to complete the transformation from the normalized space to the original dimension, yielding the predicted actual corrosion rate of the oil and gas pipeline. The predicted value ranges from 0 to 10 mm / year, with an accuracy of 0.001 mm / year. During the transformation process, the predicted value for each test sample is calculated independently, and the values ​​before and after the transformation, along with the corresponding timestamps and pipeline location information, are recorded to form a complete prediction result dataset. To ensure the reliability of the conversion results, an outlier detection mechanism is implemented. When the converted corrosion rate prediction value exceeds the reasonable range of 0 to 10 mm per year, it is automatically marked as abnormal data, triggering a recalculation process to check the accuracy of the normalization parameters and the conversion process. The final output prediction dataset includes the actual corrosion rate prediction value for each time step and each monitoring section, along with the corresponding prediction confidence score. The confidence score is calculated using the activation value of the model output layer, ranging from 0.7 to 1.0, providing accurate and reliable data support for subsequent pipeline corrosion risk assessment.

[0032] Preferably, the model formula of the time-series residual corrosion state prediction algorithm is: ,in, This represents the time-series residual corrosion state value at time t. This represents the predicted corrosion rate at time t. This represents the actual corrosion rate at time t. This represents the residual decay coefficient, and m represents the number of residual memory steps. This represents the residual weighting coefficient at step k. Indicates the discount factor. Represents the parameters of a deep Q-network. The state-action value function represents the state. This represents the environmental state at time t. This indicates the action to be predicted at time t. This represents the state feature mapping function.

[0033] Specifically, the temporal residual corrosion state prediction algorithm is used to accurately characterize the temporal dependencies and error correction mechanisms in the corrosion prediction process. Its core is to achieve dynamic updates of the residual state by integrating the current prediction bias, historical residual information and gradient features of the deep Q network. During implementation, the residual decay coefficient was set to 0.15, a parameter determined through extensive experimental verification, effectively balancing the influence weights of historical residuals and current errors. The residual memory step count was set to 50 steps, covering short-term temporal correlation features during corrosion, ensuring the comprehensiveness of residual calculation. The residual weight coefficient at step k was allocated according to a linear decreasing rule, decreasing sequentially from 0.04 at step 1 to 0.0008 at step 50, making the contribution of recent residuals to the current calculation higher. The discount factor was set to 0.9, consistent with the reasonable trade-off of future gains in deep reinforcement learning. The deep Q-network parameters include the weight matrix and bias vector from the input layer to the output layer, which are iteratively updated through the backpropagation algorithm. The state-action value function is based on the value estimation corresponding to the current environmental state and the predicted action output. The environmental state consists of feature vectors of 8 types of corrosion influencing factors, and the predicted action directly corresponds to the specific value of the corrosion rate. The state feature mapping function uses the ReLU activation function to achieve nonlinear transformation, mapping the original state features to a high-dimensional feature space, enhancing the model's ability to fit complex corrosion patterns. This algorithm effectively reduces the cumulative effect of prediction errors through the synergistic effect of multi-dimensional parameters, improves the temporal consistency and accuracy of corrosion state prediction, and provides a reliable basis for subsequent corrosion rate correction.

[0034] Preferably, the action selection strategy formula of the deep Q-network is: ,in, Represents the state at time t Select action The probability, Indicates the probability of exploration. Representing state The corresponding action space scale, Representing state The set of all optional actions below, The state-action value function represents the state. This represents the parameters of a deep Q-network.

[0035] Specifically, the action selection strategy of the deep Q-network adopts an ε-greedy algorithm, which is used to balance exploration and utilization during model training, ensuring that the model can fully explore the potential patterns in the data while avoiding getting trapped in local optima. In implementation, the initial exploration probability is set to 0.95, which gradually decreases exponentially with each training epoch, at a decay rate of 0.998, stabilizing at 0.01 after 1000 epochs. This setting ensures that the model primarily explores in the early stages of training and utilizes learned patterns in the later stages. The action space size corresponding to a state is determined based on the range of erosion rates, which are divided into 100 equally spaced intervals, each corresponding to one action; therefore, the action space size is fixed at 100. The set of all selectable actions for a state includes the action values ​​corresponding to the aforementioned 100 erosion rate intervals, covering the complete erosion rate range from 0 to 10 millimeters per year. The state-action value function is calculated using the deep Q-network, whose parameters include the connection weights and biases of neurons in each layer. The forward propagation process converts state features into value estimates corresponding to each action. When an action is determined to be the most valuable action in the current state, its selection probability is 1 minus the current exploration probability plus the exploration probability divided by the action space size. The selection probability of other actions is the exploration probability divided by the action space size. This strategy achieves a balance between randomness and bias in action selection through probability allocation, thereby improving the stability and generalization ability of model training.

[0036] Preferably, the loss function of the deep Q-network is calculated as follows: ,in, This represents the value of the loss function. Represents the expectation operator. This represents the experience replay buffer. Indicates the state at time t. This indicates the action to be predicted at time t. This represents the reward value at time t. Indicates the first Current state Indicates the discount factor. Indicates the target network parameters. Represents the parameters of a deep Q-network. Represents the value function. This represents the L2 regularization coefficient.

[0037] Specifically, the loss function of the deep Q network is used to quantify the deviation between the model's predicted values ​​and the true values, providing a gradient basis for updating the model parameters, while suppressing model overfitting through regularization terms. During implementation, the experience replay buffer capacity is set to 100,000 records to store state-action-reward-next state samples generated during training. During sampling, 64 samples are randomly selected each time to form batch data, reducing the correlation between samples. The state at time t consists of real-time data of 8 types of corrosion influencing factors. The action at time t corresponds to a specific corrosion rate prediction interval. The reward value at time t is calculated through a reward function, reflecting the quality of the current predicted action. The state at time t+1 is the new environment state corresponding to the current action. The discount factor is set to 0.9 to ensure the consistency of temporal rewards in the reinforcement learning framework. The target network parameters are updated every 100 training rounds, copied from the behavior network parameters using a moving average method, with an update rate of 0.05 to avoid excessive fluctuations in target values ​​affecting training stability. The behavior network parameters are continuously updated through backpropagation, and the value function is the specific output of the state-action value function. The L2 regularization coefficient is set to 0.001 to impose a penalty term on the network parameters, limiting the absolute value of the parameters and reducing the model's sensitivity to training data noise. This loss function achieves a balance between model prediction accuracy and generalization ability by comprehensively considering the temporal reward error and parameter regularization term, guiding the model parameters to iterate towards the optimal direction.

[0038] Preferably, the reward function calculation formula is as follows: ,in, Indicates action Compared with the actual corrosion rate The corresponding reward value, This indicates the action to be predicted at time t. This represents the actual corrosion rate at time t. Indicates the positive reward coefficient. Indicates the penalty coefficient. This represents the reward sensitivity parameter.

[0039] Specifically, the reward function is used to evaluate the effectiveness of the predicted action, providing training feedback signals for the deep reinforcement learning model and guiding the model to learn more accurate corrosion rate prediction patterns. In implementation, the positive reward coefficient is set to 2.0, and the penalty coefficient is set to 1.0. This ratio was determined through experimental verification to ensure that the incentive effect of the positive reward on the model is greater than the constraint effect of the penalty, while avoiding excessive rewards that could cause training oscillations. The reward sensitivity parameter is set to 0.5 to adjust the sensitivity of the reward value to the prediction error, so that the reward value increases rapidly when the prediction error is small and decreases significantly when the error is large. The predicted corrosion rate at time t is the normalized value output by the model, ranging from 0 to 1, while the actual corrosion rate at time t is the normalized value obtained through actual detection. The absolute value of the difference between the two directly reflects the prediction accuracy. When the deviation between the predicted corrosion rate and the actual corrosion rate is small, the first term of the function generates a large positive reward, and the second term generates a small penalty, resulting in an overall positive reward output. When the deviation is large, the first positive reward decreases significantly, the second penalty increases significantly, and the overall negative reward output is generated. This reward function strengthens the correlation between prediction accuracy and reward value through an exponential function, enabling the model to quickly perceive changes in prediction error during training and thus prioritize learning prediction strategies with smaller errors, thereby improving the model's prediction accuracy.

[0040] Preferably, the formula for calculating the state transition probability is: ,in, Indicates the state Execute action Then transition to state The probability, This represents the probability concentration parameter. This represents the state transition mapping function. Represents the set of all possible environmental states. This represents the Euclidean norm.

[0041] Specifically, the state transition probability describes the likelihood of transitioning to the next state after performing a specific action in the current state, providing a core parameter for Markov decision processes in deep reinforcement learning. In implementation, the probability concentration parameter is set to 5.0. This parameter determines the concentration of state transition probabilities; the larger the value, the more concentrated the transition probability is on the most probable next state. The state transition mapping function is constructed using a multilayer perceptron. The input is a concatenated vector of the current state and the action to be performed, and the output is the predicted feature vector of the next state. The network includes two hidden layers, each with 64 neurons, and uses ReLU as the activation function. The set of all possible environmental states includes all reasonable combinations of values ​​for eight corrosion influencing factors during the operation of oil and gas pipelines. Calculated with 10 values ​​for each factor, the total number of states reaches 10^8. The Euclidean norm is used to calculate the distance between the predicted next state and the actual next state, quantifying the degree of deviation in state transition. This calculation formula converts state transition deviations into probability values ​​using an exponential function. The smaller the deviation, the larger the output value of the exponential function, and the higher the corresponding transition probability. By normalizing the output values ​​of the exponential function for all possible states, it ensures that the sum of all transition probabilities is 1, satisfying the basic requirements of probability distribution. This method of calculating state transition probabilities can accurately depict the dynamic changes in environmental states during corrosion, providing a reliable probabilistic basis for the model to formulate optimal prediction strategies.

[0042] Preferably, step S3 includes the following sub-steps: S31, based on the Markov decision process framework, the corrosion prediction process of oil and gas pipelines is modeled as a decision system including a set of states, a set of actions, a set of rewards, state transition probabilities, and strategies, wherein the states are composed of corrosion data sample features, and the actions correspond to the corrosion rate prediction results; S32, a deep Q-network structure is constructed, the input layer dimension is set to match the number of sample features, the hidden layer adopts a multilayer perceptron structure and selects a nonlinear activation function, and the output layer dimension corresponds to the action space scale; S33, the temporal residual corrosion state prediction algorithm is embedded into the value function calculation process of the deep Q-network, and the value estimation accuracy is optimized by fusing historical residual information with current state features; S34, the storage structure and sampling mechanism of the experience replay buffer are defined, a buffer capacity threshold is set, and a random sampling strategy is used to select training samples from historical experience data to reduce data correlation.

[0043] Specifically, step S3 constructs a deep reinforcement learning framework with both temporal modeling capabilities and prediction accuracy through four sub-steps. S31, based on a Markov decision process framework, models the decision system for corrosion prediction. It clarifies that the state set consists of feature vectors from eight corrosion-influencing factors, including temperature and carbon dioxide partial pressure; the action set corresponds to 100 equally spaced intervals representing the annual corrosion rate from 0 to 10 mm; the reward set is directly linked to the prediction error; the state transition probability characterizes the dynamic changes in the environmental state; and the policy defines the logical rules for action selection, ensuring the prediction process conforms to dynamic decision-making characteristics. S32 constructs a deep Q-network structure. The input layer dimension is set to 8, perfectly matching the number of sample features. The hidden layers employ a four-layer multilayer perceptron structure, with 256, 128, 64, and 32 neurons per layer, respectively. The ReLU nonlinear activation function is used to enhance feature fitting capabilities. The output layer dimension is set to 100, consistent with the action space scale, realizing the mapping from state to action. S33 embeds the temporal residual erosion state prediction algorithm into the value function calculation process. By tracing the residual data from 50 historical time steps, it performs weighted fusion with the current state characteristics. The residual weights are allocated according to a linearly decreasing rule, making the contribution of recent residuals higher and effectively optimizing the value estimation accuracy. S34 defines the storage structure of the experience replay buffer as a key-value pair, storing sample data of state, action, reward, and next state. The buffer capacity threshold is set at 100,000 records, and a random sampling strategy is used to select 64 samples each time for model training, significantly reducing the impact of data correlation on training stability and laying the foundation for subsequent model optimization.

[0044] Preferably, step S4 includes the following sub-steps: S41, determining the candidate hyperparameter set for the deep Q-network, including learning rate, discount factor, exploration probability decay range, batch size, number of hidden layer neurons, and empirical replay buffer capacity calibration parameters; S42, dividing the sub-training set data into fixed batches, sequentially inputting them into deep Q-network models with different hyperparameter combinations, calculating the predicted output through forward propagation, and calculating the error value based on the loss function; S43, using the backpropagation algorithm to iteratively update the model parameters, adjusting the network weights according to the gradient of the loss function, setting a threshold for the number of iterations and an early stopping condition to avoid overfitting; S44, calculating the prediction error index of the model under each hyperparameter combination based on the sub-validation set data, selecting the optimal hyperparameter combination through comparative analysis, and fixing the model structure.

[0045] Specifically, the hyperparameter optimization and model training process in step S4 determines the optimal model structure through four sub-steps. S41 clarifies the candidate hyperparameter set for the deep Q-network, including candidate learning rate values ​​of 0.0001, 0.001, and 0.01; candidate discount factors of 0.85, 0.9, and 0.95; candidate initial exploration probability values ​​ranging from 0.9 to 1.0; a decay rate ranging from 0.995 to 0.999; candidate batch size of 32, 64, and 128; a hidden layer neuron count within the range of 128 to 512 with a step size of 64; and candidate experience replay buffer capacity of 50,000, 100,000, and 150,000, comprehensively covering the key parameters for model training. S42 divides the training set into several batches according to the selected batch size. Data from each batch is sequentially input into a deep Q-network model with different hyperparameter combinations. The erosion rate prediction is calculated through forward propagation from the input layer, hidden layer, to the output layer. Then, based on a preset loss function, the error between the predicted output and the true value is quantified, generating an error sequence corresponding to each hyperparameter combination. S43 uses a backpropagation algorithm to iteratively update the model parameters. The connection weights and biases of neurons in each layer are adjusted according to the gradient information of the loss function. The learning rate is dynamically adjusted according to a 5% decay rule every 100 rounds. The maximum number of iterations is set to 1000 rounds. An early stopping condition is also set: training automatically stops when the prediction error of the sub-validation set shows no decreasing trend for 50 consecutive rounds, effectively avoiding model overfitting. S44 calculates three evaluation indicators—mean absolute error, mean squared error, and coefficient of determination—for each hyperparameter combination based on the sub-validation set data. A comprehensive performance score is calculated with a weighted ratio of 3:4:3. By comparing the comprehensive scores of different hyperparameter combinations, the optimal hyperparameter combination is selected, and the model structure is fixed to ensure the model has optimal prediction performance.

[0046] Preferably, step S5 includes the following sub-steps: S51, extracting state features from the test set data and constructing a test state vector according to the same feature dimensions and arrangement order as the training set; S52, inputting the test state vector into a deep Q-network model with optimal hyperparameter configuration, and calculating the initial corrosion rate estimate in the normalized space through network forward propagation; S53, calling the temporal residual corrosion state prediction algorithm, inputting historical prediction residual data and current state information, and calculating the temporal residual correction amount; S54, fusing the initial corrosion rate estimate and the temporal residual correction amount to obtain the corrected normalized corrosion rate estimate, ensuring the temporal consistency of the prediction results.

[0047] Specifically, step S5, test data processing and prediction result correction, achieves high-precision corrosion rate estimation through four sub-steps. S51 extracts state features from the test set data, which accounts for 20% of the total data. The extraction process strictly follows the same feature dimensions and arrangement order as the training set. Each data sample includes standardized values ​​of eight corrosion influencing factors, ultimately constructing an 8×1 dimension test state vector to ensure data format matches model input requirements. S52 groups the test state vectors into batches of 64 samples and sequentially inputs them into a deep Q-network model with optimal hyperparameter configuration. The model receives the state vectors through the input layer, processes them through linear transformation and ReLU activation function in four hidden layers, completing layer-by-layer feature extraction and nonlinear mapping. Finally, the initial corrosion rate estimate in the normalized space is output through the linear activation function of the output layer. The normalization range is controlled between 0 and 1, corresponding to 0 to 10 mm / year of the original corrosion rate. S53 invokes the temporal residual corrosion state prediction algorithm, inputting the predicted residual data of 50 historical time steps and the current test state vector information. The algorithm calculates the mapping value between the weighted sum of historical residuals and the current state characteristics to obtain a temporal residual correction amount ranging from -0.1 to 0.1. The magnitude and direction of the correction amount are dynamically adjusted according to the historical error patterns. S54 weights the initial corrosion rate estimate and the temporal residual correction amount with weights of 0.85 and 0.15 respectively, to obtain the corrected normalized corrosion rate estimate. This process effectively compensates for model systematic and random errors by dynamically integrating historical residual information with the current prediction results, ensuring the temporal consistency and accuracy of the prediction results, and providing high-quality intermediate data for subsequent inverse dimensional transformation.

[0048] like Figure 2As shown, a deep reinforcement learning-based oil and gas pipeline corrosion prediction platform is implemented. This platform, applied to a deep reinforcement learning-based oil and gas pipeline corrosion prediction method, includes: a multi-source corrosion data heterogeneous acquisition and transmission unit, used to collect multi-dimensional operating parameters and time-series corrosion data of oil and gas pipelines through a distributed sensor network, and to upload and store the data in real time using a heterogeneous data transmission protocol; a non-uniform interval data augmentation and preprocessing unit, used to receive the acquired data and convert non-uniform interval data to equal interval data using an improved assignment-adjusted Fourier transform technique, while simultaneously filtering data noise and removing outliers; and a deep reinforcement learning prediction model training unit, used to load the processed data, construct a fusion model of a deep Q-network and a time-series residual corrosion state prediction algorithm, and perform hyperparameter optimization and model training. The training process includes: a multi-scale corrosion state visualization analysis unit, which receives the output results of the prediction model and displays the corrosion rate evolution trend and prediction error distribution of different time scales and different pipeline sections through multi-dimensional charts; a corrosion risk level assessment and early warning unit, which determines the corrosion risk level and triggers the corresponding early warning mechanism based on the predicted corrosion rate data, combined with pipeline material characteristics and operating condition parameters, using a risk assessment algorithm; and a model iteration optimization and update unit, which continuously collects new corrosion detection data, updates the parameters and optimizes the performance of the trained model based on an incremental learning strategy, and stores model iteration versions for historical traceability. All units are connected in sequence through data interfaces to form a closed-loop operation architecture for the entire process from data collection, processing, modeling, prediction to risk early warning.

[0049] This paper presents a method and platform for predicting corrosion in oil and gas pipelines based on deep reinforcement learning. It comprehensively captures key parameters affecting pipeline corrosion through multi-dimensional sensors and utilizes improved signal processing techniques to effectively reconstruct non-uniformly spaced time-series data. This process preserves the temporal characteristics and amplitude distribution of the original data while providing a high-quality data foundation for subsequent modeling. Simultaneously, it deeply integrates temporal residual algorithms with the deep reinforcement learning framework to accurately characterize the dynamic interactions and temporal dependencies between corrosion factors. A residual correction mechanism continuously corrects prediction biases, significantly improving the accuracy of corrosion rate estimation. A closed-loop architecture is constructed, integrating core functions such as data acquisition, processing, modeling, analysis, early warning, and model updates. This enables end-to-end processing from data input to risk output, meeting the needs of multi-scale, full-lifecycle corrosion monitoring.

[0050] This method and platform address the problem that traditional static models cannot adapt to dynamic corrosion processes and time-series data. By employing a dynamic modeling approach and a time-series residual correction mechanism, it effectively captures corrosion evolution trends and sudden fluctuation characteristics, solving the problem of processing non-equidistant data. Addressing the shortcomings of existing platforms such as insufficient data fusion capabilities and reliance on manual parameter adjustment, this method achieves efficient integration of various corrosion-related data through a multi-source heterogeneous data processing unit. Relying on automatic iterative optimization of hyperparameters and incremental learning strategies, it enables adaptive adjustment of model parameters and continuous performance improvement. It can adapt to new operating conditions and data characteristics without manual intervention, providing more reliable and intelligent technical support for corrosion prevention and control of oil and gas pipelines.

[0051] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," "link," and "fix" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0052] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various equivalent changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for predicting corrosion of oil and gas pipelines based on deep reinforcement learning, characterized in that, Includes the following steps: S1 collects data on temperature, CO2 partial pressure, H2S partial pressure, pH value, and Cl- content during the operation of oil and gas pipelines using multi-dimensional sensors. - S1) Construct an original corrosion dataset with different sampling intervals based on time-series data related to content, total mineralization, residual corrosion inhibitor, and liquid-to-gas ratio; S2) Reconstruct and enhance the original non-equal-interval time-series data using an improved assignment-adjusted Fourier transform technique to generate an equal-interval training dataset that maintains the original time-series structure and amplitude distribution; S3) Divide the equal-interval training dataset into a sub-training set and a sub-validation set, construct a prediction framework based on a deep Q-network, and introduce a time-series residual corrosion state prediction algorithm to characterize the time-series dependency relationship under the dynamic interaction of corrosion factors; S4) Train the deep Q-network model under different candidate hyperparameter combinations using the sub-training set, and iteratively optimize the hyperparameter combination using the feedback results from the sub-validation set to determine the optimal model structure; S5) Input the test set data into the deep Q-network model with the optimal hyperparameter configuration, and output the corrosion rate estimate in the normalized space using the time-series residual correction mechanism; S6) Map the normalized corrosion rate estimate to the original dimensions through an inverse transformation process to obtain the predicted result of the actual corrosion rate of the oil and gas pipeline.

2. The method for predicting oil and gas pipeline corrosion based on deep reinforcement learning according to claim 1, characterized in that, The model formula for the time-series residual corrosion state prediction algorithm is as follows: ,in, This represents the time-series residual corrosion state value at time t. This represents the predicted corrosion rate at time t. This represents the actual corrosion rate at time t. This represents the residual decay coefficient, and m represents the number of residual memory steps. This represents the residual weighting coefficient at step k. Indicates the discount factor. Represents the parameters of a deep Q-network. The state-action value function represents the state. This represents the environmental state at time t. This indicates the action to be predicted at time t. This represents the state feature mapping function.

3. The method for predicting corrosion of oil and gas pipelines based on deep reinforcement learning according to claim 2, characterized in that, The action selection strategy formula for the deep Q-network is: ,in, Represents the state at time t Select action The probability, Indicates the probability of exploration. Representing state The corresponding action space size, Representing state The set of all optional actions below, The state-action value function represents the state. This represents the parameters of a deep Q-network.

4. The method for predicting corrosion of oil and gas pipelines based on deep reinforcement learning according to claim 3, characterized in that, The loss function of the deep Q-network is calculated as follows: ,in, This represents the value of the loss function. Represents the expectation operator. This represents the experience replay buffer. Indicates the state at time t. This indicates the action to be predicted at time t. This represents the reward value at time t. Indicates the first Current state Indicates the discount factor. Indicates the target network parameters. Represents the parameters of a deep Q-network. Represents the value function. This represents the L2 regularization coefficient.

5. The method for predicting corrosion of oil and gas pipelines based on deep reinforcement learning according to claim 4, characterized in that, The formula for calculating the reward function is: ,in, Indicates action Compared with the actual corrosion rate The corresponding reward value, This indicates the action to be predicted at time t. This represents the actual corrosion rate at time t. Indicates the positive reward coefficient. Indicates the penalty coefficient. This represents the reward sensitivity parameter.

6. The method for predicting corrosion of oil and gas pipelines based on deep reinforcement learning according to claim 5, characterized in that, The state transition probability calculation formula of the time-series residual corrosion state prediction algorithm is as follows: ,in, Indicates the state Execute action Then transferred to state The probability, This represents the probability concentration parameter. This represents the state transition mapping function. Represents the set of all possible environmental states. This represents the Euclidean norm.

7. The method for predicting corrosion of oil and gas pipelines based on deep reinforcement learning according to claim 6, characterized in that, S3 includes the following sub-steps: S31, based on the Markov decision process framework, the corrosion prediction process of oil and gas pipelines is modeled as a decision system including a set of states, a set of actions, a set of rewards, state transition probabilities, and strategies, wherein the states are composed of corrosion data sample features, and the actions correspond to the corrosion rate prediction results; S32, a deep Q-network structure is constructed, the input layer dimension is set to match the number of sample features, the hidden layer adopts a multilayer perceptron structure and selects a nonlinear activation function, and the output layer dimension corresponds to the action space scale; S33, the temporal residual corrosion state prediction algorithm is embedded into the value function calculation process of the deep Q-network, and the value estimation accuracy is optimized by fusing historical residual information with current state features; S34, the storage structure and sampling mechanism of the experience replay buffer are defined, the buffer capacity threshold is set, and a random sampling strategy is used to select training samples from historical experience data to reduce data correlation.

8. The method for predicting corrosion of oil and gas pipelines based on deep reinforcement learning according to claim 7, characterized in that, S4 includes the following sub-steps: S41, determining the candidate hyperparameter set for the deep Q-network, including learning rate, discount factor, exploration probability decay range, batch size, number of hidden layer neurons, and empirical replay buffer capacity calibration parameters; S42, dividing the sub-training set data into fixed batches, sequentially inputting them into deep Q-network models with different hyperparameter combinations, calculating the predicted output through forward propagation, and calculating the error value based on the loss function; S43, using the backpropagation algorithm to iteratively update the model parameters, adjusting the network weights according to the gradient of the loss function, setting a threshold for the number of iterations and an early stopping condition to avoid overfitting; S44, calculating the prediction error index of the model under each hyperparameter combination based on the sub-validation set data, selecting the optimal hyperparameter combination through comparative analysis, and fixing the model structure.

9. The method for predicting corrosion of oil and gas pipelines based on deep reinforcement learning according to claim 8, characterized in that, S5 includes the following sub-steps: S51, extracting state features from the test set data and constructing a test state vector according to the same feature dimensions and arrangement order as the training set; S52, inputting the test state vector into a deep Q-network model with optimal hyperparameter configuration, and calculating the initial corrosion rate estimate in the normalized space through network forward propagation; S53, calling the temporal residual corrosion state prediction algorithm, inputting historical prediction residual data and current state information, and calculating the temporal residual correction amount; S54, fusing the initial corrosion rate estimate and the temporal residual correction amount to obtain the corrected normalized corrosion rate estimate, ensuring the temporal consistency of the prediction results.

10. A corrosion prediction platform for oil and gas pipelines based on deep reinforcement learning, characterized in that, This platform is applied to the oil and gas pipeline corrosion prediction method based on deep reinforcement learning as described in claim 1, comprising: a multi-source corrosion data heterogeneous acquisition and transmission unit, used to acquire multi-dimensional operating parameters and time-series corrosion data of oil and gas pipelines through a distributed sensor network, and to upload and store the data in real time using a heterogeneous data transmission protocol; a non-equal interval data enhancement and preprocessing unit, used to receive the acquired data and convert non-equal interval data to equal interval data through an improved assignment-adjusted Fourier transform technique, while simultaneously filtering data noise and removing outliers; a deep reinforcement learning prediction model training unit, used to load the processed data, construct a fusion model of a deep Q-network and a time-series residual corrosion state prediction algorithm, and perform hyperparameter optimization and model training processes; and a multi-scale... The corrosion status visualization and analysis unit receives the output results of the prediction model and displays the corrosion rate evolution trend and prediction error distribution of different time scales and different pipeline sections through multi-dimensional charts. The corrosion risk level assessment and early warning unit determines the corrosion risk level and triggers the corresponding early warning mechanism based on the predicted corrosion rate data, combined with pipeline material characteristics and operating condition parameters, using a risk assessment algorithm. The model iteration optimization and update unit continuously collects new corrosion detection data, updates the parameters and optimizes the performance of the trained model based on an incremental learning strategy, and stores model iteration versions for historical traceability. All units are connected in sequence through data interfaces to form a closed-loop operation architecture for the entire process from data collection, processing, modeling, prediction to risk early warning.

Citation Information

Patent Citations

  • Monitoring method for prediction and early warning of hidden leakage of concrete dam

    CN120278033A

  • Oil and gas pipeline fault prediction method and device, electronic equipment and storage medium

    CN121051585A