Cathodic protection state evaluation and adjustment method based on big data prediction
By constructing a spatiotemporal prediction model that integrates graph neural networks and gated cyclic units, the problem of insufficient spatiotemporal coupling relationship characterization in cathodic protection systems is solved, enabling accurate assessment and dynamic adjustment of pipeline status, improving prediction accuracy and risk detection capabilities, and ensuring pipeline safety and lifespan.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-03-24
AI Technical Summary
Existing methods for assessing the condition of cathodic protection systems lack the ability to characterize spatiotemporal coupling relationships, resulting in insufficient prediction accuracy, difficulty in timely detection of potential risks, and inability to provide a reliable basis for the dynamic adjustment of cathodic protection systems.
A spatiotemporal prediction model integrating a graph neural network (GNN) and a gated recurrent unit (GRU) is constructed. The spatial dependencies between monitoring points are captured by the pipeline topology map, and the temporal evolution law is learned to generate cathodic protection status assessment indicators and achieve dynamic adjustment.
This improves the predictive accuracy and dynamic adjustment capability of the cathodic protection system, enabling timely detection of potential risks and ensuring the safe operation and service life of pipelines.
Smart Images

Figure CN121723221A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pipeline corrosion protection technology, specifically a method for assessing and adjusting cathodic protection status based on big data prediction. Background Technology
[0002] In long-distance pipeline projects such as oil and gas pipelines and water pipelines, cathodic protection systems are a core technical means to delay pipeline corrosion and ensure operational safety. Their effectiveness directly affects the pipeline's service life and operational safety. Traditional condition assessment methods mainly rely on manual inspections or data fitting from single sensors, which suffer from significant time lags and limited coverage. With the development of monitoring technology, the collection of time-series data such as potential and current from multiple monitoring points along the pipeline has become possible; however, effectively utilizing this massive amount of data still faces significant challenges.
[0003] In recent years, although time series prediction models such as LSTM and GRU have been attempted to be applied to the field of condition assessment, these models can only capture the temporal evolution of a single monitoring point and cannot reflect the spatial correlation characteristics of the pipeline system.
[0004] However, in actual operating conditions, problems such as coating damage and stray current interference exhibit spatial conduction characteristics. An anomaly at one monitoring point can affect adjacent areas through the pipe structure, and may even trigger a chain reaction. Existing models lack the ability to characterize spatiotemporal coupling relationships, resulting in insufficient prediction accuracy, making it difficult to detect potential risks in a timely manner, and failing to provide a reliable basis for the dynamic adjustment of the cathodic protection system. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a cathodic protection status assessment and adjustment method based on big data prediction. This method solves the problem that existing technologies lack the ability to characterize spatiotemporal coupling relationships, resulting in insufficient prediction accuracy, difficulty in timely detection of potential risks, and inability to provide a reliable basis for the dynamic adjustment of the cathodic protection system.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for assessing and adjusting the cathodic protection status based on big data prediction, comprising the following steps: S1. Construct a pipeline topology graph, where monitoring points along the pipeline are defined as nodes of the topology graph, and pipe segments connecting adjacent monitoring points are defined as edges of the topology graph. S2. Construct a spatiotemporal prediction model, which integrates a graph neural network (GNN) and a gated recurrent unit (GRU). S3. The graph neural network (GNN) is used to process the topology graph to capture the spatial dependencies between all nodes and generate node representations containing spatial features. S4. Input the node representation containing spatial features into the gated recurrent unit (GRU) to learn the temporal evolution of each node's state and generate time series prediction results. S5. Based on the time-series prediction results, generate cathodic protection status evaluation indicators and determine the cathodic protection status of the pipeline. S6. When the cathodic protection status is determined to be abnormal, an adjustment command for the cathodic protection system is generated and the adjustment operation is executed based on the analysis results of the spatiotemporal prediction model.
[0007] Furthermore, the step of constructing the pipeline topology diagram also includes: Define an initial feature vector for each node in the topology graph. The initial feature vector includes the potential, current and soil resistivity data collected at the monitoring point. Define edge attributes for each edge of the topology graph, including the length, material, and laying environment parameters of the pipe segment.
[0008] Furthermore, the specific process of capturing spatial dependencies using a graph neural network (GNN) is as follows: For each node, its node representation is updated by aggregating the feature vectors of its neighboring nodes; The update process is executed iteratively on the topology graph through a preset message passing mechanism until the representations of all nodes converge or the preset number of iterations is reached. The specific calculation formula for the node representation containing spatial features is as follows: In the formula, Let A be the feature matrix of all nodes in the l-th layer, D be the adjacency matrix of the topological graph, and W be the degree matrix of the topological graph. It is a non-linear activation function.
[0009] Furthermore, the specific process of learning the time evolution law using the gated recurrent unit (GRU) is as follows: At each time step t, the nodes containing spatial features output by the GNN are represented. As input to the GRU; The GRU uses update and reset gates to control the degree of integration between historical information and current input, and to update the hidden state of nodes. The specific calculation formula for updating the hidden state is as follows: ,in, , , In the formula, It is currently in a hidden state. It is the hidden state from the previous moment. It's an update door. It's a door reset. These are candidate hidden states, and W is the corresponding weight matrix. For Hadama accumulation.
[0010] Furthermore, before constructing the spatiotemporal prediction model, a data preprocessing step is also included, as follows: Data cleaning is performed on the collected raw monitoring data to identify and remove outliers and noisy data; The cleaned data is standardized to unify monitoring data of different dimensions to the same numerical scale; The standardization process employs a min-max normalization method, and the specific calculation formula is as follows: In the formula, This is the normalized data, and x is the original data. It is the minimum value of the data in this dimension. It is the maximum value of the data in this dimension.
[0011] Furthermore, the method also includes a model training step, the specific process of which is as follows: Historical monitoring data is divided into training set, validation set, and test set; The spatiotemporal prediction model is trained using the training set, and the model parameters are adjusted by minimizing the loss function between the predicted and the true values. The loss function is the root mean square error (RMSE), and the specific calculation formula is as follows: In the formula, N is the total number of samples. It is the true value of the i-th sample. It is the model's prediction for the i-th sample; The training process is monitored using the validation set. Training is stopped when the model's performance on the validation set no longer improves to prevent overfitting.
[0012] Furthermore, the specific process of generating cathodic protection status assessment indicators and determining the cathodic protection status of the pipeline is as follows: Using a trained spatiotemporal prediction model, and inputting current and historical monitoring data, the protective potential sequence of each monitoring point within a preset time window is predicted. The cathodic protection status evaluation index P is calculated based on the protection potential sequence. The evaluation index P is compared with a preset protection status threshold, which includes a good status threshold. and degradation state threshold ; like If so, the cathodic protection status is determined to be good; if If, then it is determined to be a critical state; if If so, it is determined to be in a deteriorated state.
[0013] Furthermore, the specific calculation formula for the cathodic protection status assessment index P is as follows: In the formula, P is the cathodic protection status assessment index, M is the total number of monitoring points, and T is the prediction time window length. Let be the protection potential of the j-th monitoring point predicted by the model at time t in the future. This represents the lowest predicted potential for that monitoring point within the prediction time window. The standard deviation of the potential sequence for all monitoring points within the prediction time window. and These are the preset weighting coefficients.
[0014] Furthermore, the specific process of generating adjustment instructions and executing adjustment operations is as follows: When the cathodic protection condition is determined to be in a deteriorated state, the region with the lowest evaluation index P is identified as the target adjustment region. Based on the GNN part of the spatiotemporal prediction model, the anode sites with strong spatial correlation to the target adjustment area are analyzed. Calculate the amount of anode output current adjustment required to restore the predicted potential of the target regulation region to above the good-state threshold. ; Generate a generator that includes the anode station and the corresponding current adjustment. The adjustment command is sent to the cathodic protection control system for execution.
[0015] Furthermore, the anode output current adjustment amount The specific calculation process is as follows: Based on the potential response relationship established by the spatiotemporal prediction model, the response coefficient K between the potential change in the target regulation area and the current change at the associated anode site is determined. Calculate the difference between the target potential and the current predicted lowest potential. ; The current adjustment amount The calculation formula is: In the formula, The target protection potential value, K represents the lowest predicted potential of the target adjustment region within the prediction time window, and K is the response coefficient.
[0016] Beneficial effects This invention achieves accurate assessment and dynamic adjustment of the cathodic protection status of pipelines by constructing a spatiotemporal prediction model that integrates graph neural networks and gated recurrent units. Specifically, firstly, by constructing a pipeline topology graph containing initial feature vectors of nodes (potential, current, soil resistivity) and edge attributes (pipe length, material, laying environment parameters), and combining this with a GNN to capture the spatial dependencies between monitoring points, it overcomes the shortcomings of traditional models that can only process data from a single monitoring point and cannot reflect spatial correlations. This allows the model to fully consider the spatial conduction characteristics of problems such as coating damage and stray current interference, improving the ability to perceive the overall state of the pipeline system. Secondly, by using a GRU to learn the temporal evolution of node representations containing spatial features, it effectively captures the temporal dynamics of monitoring data, solving the limitations of traditional time series models in handling long-period dependencies. The limitations of traditional methods are addressed by improving the prediction accuracy of future protection potential sequences. Furthermore, by generating an evaluation index P that comprehensively considers the lowest predicted potential and the standard deviation of the potential sequence, and combining it with preset thresholds to achieve graded judgment of protection status, the evaluation results are made more objective and comprehensive, enabling timely detection of potential risks. Finally, when the judged status is abnormal, the target adjustment area and associated anode sites are identified based on the spatial correlation analysis of the model. Adjustment commands are generated by accurately calculating the current adjustment amount, realizing dynamic and precise adjustment of the cathodic protection system. This avoids interference from ineffective operations on the overall protection status of the pipeline network, significantly improving the effectiveness and reliability of pipeline corrosion protection, and ensuring the operational safety and service life of long-distance pipelines. Attached Figure Description
[0017] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Please see Figure 1 This invention provides a method for assessing and adjusting the cathodic protection status based on big data prediction, comprising the following steps: S1. Construct a pipeline topology graph, where monitoring points along the pipeline are defined as nodes of the topology graph, and pipe segments connecting adjacent monitoring points are defined as edges of the topology graph. S2. Construct a spatiotemporal prediction model, which integrates a graph neural network (GNN) and a gated recurrent unit (GRU). S3. The graph neural network (GNN) is used to process the topology graph to capture the spatial dependencies between all nodes and generate node representations containing spatial features. S4. Input the node representation containing spatial features into the gated recurrent unit (GRU) to learn the temporal evolution of each node's state and generate time series prediction results. S5. Based on the time-series prediction results, generate cathodic protection status evaluation indicators and determine the cathodic protection status of the pipeline. S6. When the cathodic protection status is determined to be abnormal, an adjustment command for the cathodic protection system is generated and the adjustment operation is executed based on the analysis results of the spatiotemporal prediction model.
[0020] Among them, the pipeline topology graph refers to the network structure that abstracts monitoring points along the pipeline as nodes and pipe segments between adjacent monitoring points as edges. Specifically, it can be implemented using adjacency matrix or edge list data structures in graph theory, and is used to represent the spatial connection relationship of the pipeline system.
[0021] Among them, the spatiotemporal prediction model refers to a machine learning architecture that integrates graph neural networks and gated recurrent units. Specifically, it can be implemented using a stacked structure of graph convolutional layers and GRU layers, and is used to jointly model the spatial dependencies and temporal dynamics of pipeline systems.
[0022] Among them, Graph Neural Network (GNN) refers to a deep learning model that learns features based on graph structure data. Specifically, it can be implemented using graph convolutional networks or graph attention networks, and captures the spatial relationships between nodes through message passing mechanisms.
[0023] Among them, the gated recurrent unit (GRU) refers to a recurrent neural network with update gates and reset gates. Specifically, it can be implemented using a time-series sliding window input method, and the forgetting and retention of historical information are controlled through a gating mechanism.
[0024] Among them, the cathodic protection status assessment index refers to the numerical parameters that quantify the corrosion resistance performance of pipelines. Specifically, it can be achieved by weighting the minimum value and standard deviation of the predicted potential, and is used to objectively determine whether the protection system is within the effective working range.
[0025] The core innovation of this invention lies in constructing a spatiotemporal prediction model that integrates graph neural networks and gated recurrent units. By explicitly modeling the spatial correlation between monitoring points through pipeline topology graphs and combining it with GRU to capture the temporal evolution law, it solves the problem of insufficient prediction accuracy caused by the spatiotemporal coupling effect that traditional methods cannot handle.
[0026] The working process and principle of this invention are as follows: First, a pipeline topology diagram is constructed, defining monitoring points along the pipeline as nodes and pipe segments connecting adjacent monitoring points as edges. This topology accurately reflects the spatial layout and connection relationships of the pipeline system.
[0027] Next, a spatiotemporal prediction model is constructed, fusing a graph neural network (GNN) with a gated recurrent unit (GRU). The GNN is used to capture the spatial dependencies between nodes, while the GRU is used to learn the temporal evolution patterns. This fusion model can process information in both spatial and temporal dimensions simultaneously.
[0028] By using a Generative Neural Network (GNN) to process the topology graph and capturing the spatial dependencies between all nodes through message passing mechanisms, this step generates node representations that contain spatial features, reflecting the mutual influence between monitoring points.
[0029] The node representations generated by the GNN are input into the GRU to learn the temporal evolution of each node's state. The GRU's gating mechanism can effectively handle long-term dependency problems and generate time series prediction results.
[0030] Based on the time-series prediction results, cathodic protection status assessment indicators are generated, and the cathodic protection status of the pipeline is determined. This step transforms the model's output into interpretable assessment results.
[0031] When the cathodic protection status is determined to be abnormal, adjustment commands are generated for the cathodic protection system based on the analysis results of the spatiotemporal prediction model, and the adjustment operations are executed. This ensures that the system can respond to abnormal situations in a timely manner and take appropriate measures.
[0032] As a preferred embodiment, the solution of the present invention is implemented as follows: In a long-distance oil pipeline system, 100 monitoring points are arranged along the route, each equipped with potential, current, and soil resistivity sensors. First, a pipeline topology graph is constructed, defining the 100 monitoring points as nodes and the pipe segments between adjacent monitoring points as edges.
[0033] The spatiotemporal prediction model employs a three-layer graph convolutional network (GNN) as its GNN component, with each layer using the ReLU activation function. The GRU component uses a two-layer structure with 128 hidden layers. The model input consists of monitoring data from the past 30 days, and the prediction is based on the cathodic protection status for the next 7 days.
[0034] In the GNN processing, each node updates its own representation by aggregating features from its neighboring nodes. After three iterations, node representations containing spatial features are generated. These representations reflect the spatial correlation between monitoring points.
[0035] GRU receives the node representations output by GNN, and through update gates and reset gates, it integrates historical information with the current input to generate time series prediction results for each node for the next 7 days.
[0036] Based on the prediction results, the cathodic protection status assessment index P is calculated. If P is greater than the preset threshold of 0.85, it is judged as a good state; if P is between 0.7 and 0.85, it is judged as a critical state; if P is less than 0.7, it is judged as a deteriorated state.
[0037] When the system determines that a certain area has entered a deterioration state, it automatically generates adjustment commands. For example, it may increase the output current of the relevant anode station or start the backup anode bed to restore the protection potential of the area. The adjustment commands are sent to the field execution equipment via the SCADA system.
[0038] The present invention further proposes to define an initial feature vector for each node of the topology graph, which includes the potential, current and soil resistivity data collected by the monitoring point; and to define edge attributes for each edge of the topology graph, which include the length, material and laying environment parameters of the pipe segment.
[0039] Specifically, the initial feature vector of each node provides multi-dimensional dynamic data input for each monitoring point. For example, potential data is collected in real time by sensors, current data is recorded by the output value of a potentiostat, and soil resistivity is updated through periodic detection. Edge attributes are initialized using pipeline design parameters and field survey data. For example, pipe segment length is calculated based on geographic coordinates, material information is extracted from engineering drawings, and laying environment parameters are obtained through soil sampling analysis. When constructing the topology graph, node features and edge attributes are encoded as numerical matrices and input into the graph neural network. For example, potential data is in volts, current is in milliamperes, and soil resistivity is in ohms-meters, and the dimensions are unified through standardization. Thus, when updating the node representation, the graph neural network can combine the electrochemical state of adjacent nodes with the physical properties of the pipe segment. For example, long-distance pipe segments experience faster current decay due to material differences, and pipe segments in high-humidity environments are more susceptible to stray current interference due to low soil resistivity. This data fusion method enables the model to more accurately characterize the spatial conduction characteristics of the pipeline system. For example, the potential anomaly in the coating damage area will affect the propagation range through the material and laying environment parameters of adjacent pipe sections, thereby improving the adaptability of the spatiotemporal prediction model to complex working conditions.
[0040] As a preferred embodiment, the solution of the present invention is implemented as follows: When constructing the pipeline topology map, an initial feature vector is defined for each node in the topology map. The initial feature vector of a node includes the potential, current, and soil resistivity data collected at that monitoring point. For example, for a certain monitoring point, its initial feature vector can be represented as [V,I,ρ], where V is the pipe-soil potential value measured at that point (unit: V), I is the protective current value measured at that point (unit: A), and ρ is the soil resistivity value measured at that point (unit: Ω·m).
[0041] Furthermore, edge attributes are defined for each edge of the topology graph. Edge attributes include the length, material, and laying environment parameters of the pipe segment. Specifically, the edge attribute can be represented as [L,M,E], where L is the length of the pipe segment (unit: m), M is the material of the pipe segment (e.g., API 5L X70 steel), and E is the laying environment parameters (e.g., soil pH, moisture content, etc.).
[0042] Therefore, by defining the initial feature vectors of nodes and edge attributes, the topology graph not only contains the geometric structure information of the pipeline, but also incorporates key electrochemical parameters and environmental factors, providing a rich data foundation for subsequent spatial dependency analysis.
[0043] This invention further proposes a specific process for capturing spatial dependencies using graph neural networks, including updating the node representation of each node by aggregating the feature vectors of its neighboring nodes; The update process is executed iteratively on the topology graph through a preset message passing mechanism until the representations of all nodes converge or the preset number of iterations is reached. The specific calculation formula for the node representation containing spatial features is as follows: In the formula, Let A be the feature matrix of all nodes in the l-th layer, D be the adjacency matrix of the topological graph, and W be the degree matrix of the topological graph. It is a non-linear activation function.
[0044] The aggregation of neighbor node feature vectors is implemented through a message-passing mechanism, where each node's feature update depends on its directly connected neighbors. This message-passing mechanism iterates multiple times across the topology graph. In each iteration, the node's feature matrix is generated by combining a linear transformation of the normalized adjacency matrix and the current feature matrix with a non-linear activation function. The degree matrix D is used to normalize the adjacency matrix A, avoiding feature scaling issues caused by differences in node degree. The weight matrix W is optimized during training through backpropagation to adapt to data distributions in different pipeline topologies.
[0045] Specifically, during the node feature update process, the normalization operation of the adjacency matrix A and the degree matrix D transforms the graph structure information into a symmetric normalized Laplace matrix form, making the propagation process of node features isotropic. The feature matrix of each layer... After a linear transformation, an activation function introduces nonlinear expressive power. Iteratively performing this operation allows the local features of a node to gradually diffuse globally, thereby capturing long-distance spatial dependencies. For example, when a node experiences a potential anomaly due to coating damage, its impact is propagated to neighboring nodes through the adjacency matrix and reflected in the feature representation of distant nodes after multiple iterations. The resulting node representation not only includes its own monitoring data but also incorporates spatial correlation information from the topological structure, providing more comprehensive input features for subsequent time series prediction.
[0046] As a preferred embodiment, the solution of the present invention is implemented as follows: In practical applications, ReLU can be chosen as the nonlinear activation function σ. The adjacency matrix A can be constructed based on the pipeline topology, where connections between adjacent monitoring points are assigned a value of 1, and connections between non-adjacent points are assigned a value of 0. The degree matrix D is a diagonal matrix, where the elements on the diagonal represent the degree of each node, i.e., the number of edges connected to that node.
[0047] Furthermore, the number of iterations can be set to 3, that is, to perform 3 layers of graph convolution operations. In each layer of graph convolution, nodes aggregate information from first-order, second-order, and third-order neighbors, thereby capturing a wider range of spatial dependencies.
[0048] Thus, through iterative updates of the graph neural network, the representation of each node not only includes its own feature information but also incorporates information from surrounding nodes, effectively capturing the spatial dependencies in the pipeline system.
[0049] This invention further proposes using the node representations containing spatial features output by the graph neural network at each time step as input to the gated recurrent unit. The degree of fusion between historical information and the current input is controlled by updating and resetting gates, and the hidden state is updated accordingly. The hidden state update process follows the formula: ,in, , , .
[0050] Among them, the update door The sigmoid function is used to map the input data to the 0-1 range, controlling the proportion of the hidden state retained from the previous time step. (Reset gate) The degree of forgetting of historical information is determined using the same activation function, and candidate hidden states are identified. The latent state representation of the current input is generated using the hyperbolic tangent function. Weight matrix. , During training, W is optimized through backpropagation, and the Hadamard product operation is used to achieve element-wise matrix multiplication.
[0051] Specifically, when the spatial feature matrix Ht is input into the gated recurrent unit, the reset gate first calculates the historical hidden state. The degree of relevance to the current input, through Selectively filter irrelevant historical information. Update the gate and then determine the candidate hidden state. With historical status The mixing ratio, the final output This mechanism retains valuable historical information while incorporating current spatiotemporal features. When a potential change occurs at a monitoring point, the reset gate quickly reduces the weight of historical states, while the update gate enhances the transmission efficiency of current anomalous features. For example, in a coating damage scenario, the model can dynamically adjust the gating parameters to control the predicted potential error within ±25mV over 3-5 time steps.
[0052] Specifically, in practical applications, the following steps can be used to implement the learning process of the time evolution law of GRU: 1. Data preparation: Organize the node representation Ht output by GNN into a time series form, with each time step corresponding to an input vector.
[0053] 2. GRU Cell Design: Construct a GRU cell containing update gates, reset gates, and candidate hidden states. The update gate controls the degree to which historical information is retained, and the reset gate controls the degree to which historical information affects the current candidate hidden state.
[0054] 3. Parameter initialization: Randomly initialize the weight matrices Wz, Wr, and W in the GRU unit, as well as the bias terms.
[0055] 4. Forward propagation: For each time step t, perform the following operations: a) Calculate the update gate and reset door The value of .
[0056] b) Calculate the candidate hidden state .
[0057] c) Update the hidden state ht of the current time step.
[0058] 5. Sequence Prediction: The hidden state ht of the last time step is used as the representation of the entire sequence, and the prediction result is generated through a fully connected layer.
[0059] 6. Backpropagation: Calculate the loss between the predicted result and the true value, and update the parameters of the GRU unit through the backpropagation algorithm.
[0060] 7. Iterative training: Repeat steps 4-6 until the model converges or reaches the preset number of training rounds.
[0061] Through the above technical solution, this invention can effectively capture the temporal evolution of parameters such as potential and current at various monitoring points in a cathodic protection system. The GRU unit, through update and reset gate mechanisms, can flexibly control the retention and forgetting of historical information, thereby more accurately modeling long-term dependencies. This method overcomes the gradient vanishing problem in traditional time series models when processing long series, improving the prediction accuracy of dynamic changes in the cathodic protection system. Simultaneously, due to its relatively simple structure and high computational efficiency, the GRU is suitable for processing large-scale pipeline monitoring data. This GRU-based temporal evolution learning method, combined with spatial dependency capture, forms a complete spatiotemporal prediction model, providing reliable data support for accurate assessment and timely adjustment of cathodic protection status.
[0062] This invention further proposes a data preprocessing step before constructing a spatiotemporal prediction model. The data preprocessing step includes: cleaning the collected raw monitoring data and identifying and removing outliers and noise data. The cleaned data is standardized to unify monitoring data of different dimensions to the same numerical scale; The standardization process employs a min-max normalization method, and the specific calculation formula is as follows: In the formula, This is the normalized data, and x is the original data. It is the minimum value of the data in this dimension. It is the maximum value of the data in this dimension.
[0063] Data cleaning identifies outliers by setting thresholds or using statistical distribution analysis; for example, potential data exceeding a preset safety range is considered abnormal. Noise data is removed using sliding window filtering or wavelet transform. In standardization, the minimum and maximum values of potential, current, and soil resistivity data for each monitoring point are calculated, linearly mapping each dimension of data to the [0,1] interval. Data cleaning and standardization are sequentially dependent; the cleaned data must retain a valid numerical range to avoid outliers interfering with subsequent calculations of standardized parameters.
[0064] Specifically, in the data cleaning step, outliers are identified using the interquartile range method; data points deviating from the upper or lower quartile by 1.5 times are discarded. Noisy data is processed using a low-pass filter to retain low-frequency effective signals. In the standardization step, the potential data for each monitoring point is calculated separately. -1.2V, -0.8V, current data It is 0A. The soil resistivity is 5A. It is 10Ω·m. The value is 100 Ω·m. After normalization, the potential, current, and soil resistivity data of different dimensions are converted into dimensionless values, eliminating the influence of dimensional differences on weight updates when input into the spatiotemporal prediction model. For example, the original potential of a monitoring point is -1.0V, which is calculated to be 100 Ω·m. The value is 0.5; the original current is 2.5A. The weight is set to 0.5, giving both equal weights during model training. This approach allows the model to converge faster and improves the stability of prediction results.
[0065] As a preferred embodiment, the solution of the present invention is implemented as follows: For protection potential data, assuming the original data range is -1.5V to -0.85V, then =-1.5, =-0.85. If the original potential value of a monitoring point is -1.2V, then its normalized value is: (-1.2-(-1.5)) / (-0.85-(-1.5))≈0.46. Similarly, other monitoring parameters such as current and soil resistivity are also normalized accordingly.
[0066] This invention further proposes a model training step, the specific process of which includes: dividing historical monitoring data into a training set, a validation set, and a test set; The spatiotemporal prediction model is trained using the training set, and the model parameters are adjusted by minimizing the loss function between the predicted and the true values. The loss function is the root mean square error (RMSE), and the specific calculation formula is as follows: In the formula, N is the total number of samples. It is the true value of the i-th sample. It is the model's prediction for the i-th sample; The training process is monitored using the validation set. Training is stopped when the model's performance on the validation set no longer improves to prevent overfitting.
[0067] Specifically, the training set drives parameter updates for the graph neural network and gated recurrent units, iteratively optimizing the weight matrix through backpropagation. The validation set calculates model performance metrics at the end of each training cycle; training terminates when the metrics fail to improve, retaining the model parameters with the smallest validation error. The test set is used to finally evaluate the model's predictive ability on unknown data, ensuring reliability before deployment to a real system. In the root mean square error (RMSE) calculation, N represents the total number of samples, with each sample corresponding to a predicted node potential at a specific time step. The squared error amplifies the loss contribution of outlier predictions, forcing the model to prioritize correcting predictions that significantly deviate from the true values.
[0068] Furthermore, the gradient of the loss function with respect to each model parameter is calculated using the backpropagation algorithm, and the model parameters are updated using an optimizer (such as Adam) to minimize the loss function. This process is repeated until the model converges or reaches the preset number of training epochs.
[0069] During training, model performance is periodically evaluated using a validation set. If the model's performance on the validation set fails to improve for several consecutive epochs, an early stopping mechanism is triggered to halt training and prevent overfitting. The criterion for early stopping can be set to ensure that the RMSE on the validation set does not decrease for five consecutive epochs.
[0070] Therefore, by using the training-validation-early stopping mechanism, a spatiotemporal prediction model with good generalization ability on unseen data can be obtained.
[0071] This invention further proposes to use a trained spatiotemporal prediction model, input current and historical monitoring data, to predict the protection potential sequence of each monitoring point within a future preset time window; The cathodic protection status evaluation index P is calculated based on the protection potential sequence. The evaluation index P is compared with a preset protection status threshold, which includes a good status threshold. and degradation state threshold ; like If so, the cathodic protection status is determined to be good; if If, then it is determined to be a critical state; if If so, it is determined to be in a deteriorated state.
[0072] The present invention further proposes a specific calculation formula for the cathodic protection status assessment index P, as follows: In the formula, P is the cathodic protection status assessment index, M is the total number of monitoring points, and T is the prediction time window length. Let be the protection potential of the j-th monitoring point predicted by the model at time t in the future. This represents the lowest predicted potential for that monitoring point within the prediction time window. The standard deviation of the potential sequence for all monitoring points within the prediction time window. and These are the preset weighting coefficients.
[0073] Specifically, the protection potential sequence output by the spatiotemporal prediction model reflects the potential change trend of each monitoring point within a future time window. The overall protection level is assessed by calculating the mean minimum potential of all monitoring points; the degree of potential fluctuation is quantified by calculating the standard deviation of the potential sequence. Combining these two factors with weighted coefficients yields a comprehensive evaluation index P, which simultaneously reflects the lower limit and stability of the protection level. When P is lower than... This indicates that there is a localized area with excessively low and drastic potential fluctuations, requiring immediate adjustment. For example, if the mean minimum potential within a certain pipeline prediction window is -0.85V and the standard deviation is 0.12V, and α=0.7 and β=0.3, then P=0.7×(-0.85)-0.3×0.12=-0.631. If the value is -0.6, it is considered a deteriorated state. This determination method improves the accuracy of state classification by dynamically quantifying the spatiotemporal data characteristics.
[0074] As a preferred embodiment, the solution of the present invention is implemented as follows: Using a trained spatiotemporal prediction model, and inputting current and historical monitoring data, the model predicts the protection potential sequence of each monitoring point within a preset time window. Specifically, the prediction time window can be set to 7 days, with data collected at 24 time points each day. For each monitoring point on the pipeline, the model will output 7 × 24 = 168 predicted potential values.
[0075] The cathodic protection status assessment index P is calculated based on the protection potential sequence. In the calculation process, firstly, the minimum value of 168 potential values at each monitoring point within the prediction time window is taken, and then the average of the minimum potential values at all monitoring points is calculated. Secondly, the standard deviation of the potential sequence at all monitoring points over the entire prediction time window is calculated. Finally, these two statistics are linearly combined according to preset weights to obtain the assessment index P.
[0076] The evaluation metric P is compared with a preset protection status threshold. The protection status threshold includes a good status threshold. and degradation state threshold For example, it can be set -0.85V, It is -0.75V (relative to the Cu / CuSO4 reference electrode).
[0077] The cathodic protection status is determined based on the comparison results. If P is greater than... If P is between [value missing], the cathodic protection status is determined to be good; and Between these points, it is determined to be a critical state; if P is less than It is determined to be in a deteriorated state.
[0078] Furthermore, the calculation process first traverses all monitoring points, extracting the minimum value from the predicted potential sequence at each monitoring point to eliminate the interference of occasional fluctuations at individual time points. Then, the minimum values at each point are averaged to obtain a benchmark value reflecting the overall protection level. Simultaneously, the predicted potential data from all monitoring points are incorporated into the standard deviation calculation to capture potential distribution anomalies in the spatial dimension. By adjusting the numerical ratios of α and β, adaptive assessments can be performed for the corrosion sensitivity characteristics of different pipeline sections. When the minimum potential of multiple monitoring points in a certain area decreases synchronously and the standard deviation increases significantly, the evaluation index P will rapidly drop below the deterioration threshold, triggering the adjustment mechanism of the protection system.
[0079] As a preferred embodiment, the specific implementation of the present invention is as follows: In the condition assessment of the cathodic protection system of a water pipeline, 48 monitoring points were deployed along the pipeline, with the prediction time window set to the next 24 hours. Each monitoring point collects protection potential data every 5 minutes. After data preprocessing, the data is input into a spatiotemporal prediction model to obtain the predicted potential sequence for each monitoring point per minute over the next 24 hours. When calculating the assessment index P, the weighting coefficient α is set to 0.6, and β is set to 0.4. In the specific implementation process, the lowest potential value within the prediction time window is extracted for each monitoring point, and the average lowest potential value of the 48 monitoring points is calculated; simultaneously, the standard deviation of the potential values per minute for all monitoring points is calculated. The final assessment index P is obtained through weighted calculation: 0.6 multiplied by the average lowest potential value, minus 0.4 multiplied by the standard deviation. This index is used to characterize the stability and reliability of the overall protection status of the pipeline.
[0080] This invention further proposes that when the cathodic protection status is determined to be in a deteriorated state, the region with the lowest evaluation index is identified as the target adjustment region; based on the graph neural network part of the spatiotemporal prediction model, the anode sites with strong spatial correlation with the target adjustment region are analyzed; the anode output current adjustment amount required to restore the predicted potential of the target adjustment region to above the good state threshold is calculated; and an adjustment command containing the anode sites and the corresponding current adjustment amount is generated and sent to the cathodic protection control system for execution.
[0081] The identification of the target adjustment area is achieved by comparing the deviation of each area's evaluation index from a preset threshold, prioritizing the area with the largest deviation as the focus of adjustment. Strong spatial correlation analysis utilizes the weight matrix between nodes in a graph neural network to extract anode sites whose connection strength with nodes in the target adjustment area exceeds a set threshold. The calculation of the anode output current adjustment is based on the linear response relationship between potential change and current change, determined by dividing the difference between the target potential and the current predicted potential by the response coefficient.
[0082] Specifically, after identifying the target adjustment area, a graph neural network is used to extract the directly connected anode stations in the pipeline topology map, where the connection weights are automatically learned from the trained model parameters. A potential-current mapping relationship is established based on the response coefficients fitted from historical data, converting the difference between the target potential and the predicted potential into a current adjustment amount. The adjustment command is transmitted to a remote terminal unit via an industrial communication protocol, driving the potentiostat to adjust the output current. This process, through the combination of spatial correlation analysis and physical response modeling, ensures that the current adjustment is precisely applied to the target area, avoiding ineffective operations that could interfere with the overall protection status of the pipeline network.
[0083] As a preferred embodiment, the present invention is implemented as follows: When the cathodic protection status of the pipeline is determined to be deteriorated, the pipe section region with the lowest evaluation index P is first identified as the target adjustment region based on the predicted potential data output by the spatiotemporal prediction model. Based on the pipeline topology constructed using a graph neural network, a set of anode bed sites with strong spatial correlation to this region is extracted, where spatial correlation is quantified by the weight coefficients of edge attributes between nodes and the similarity of features in the GNN hidden layer. According to the potential response relationship model, the difference ΔV between the lowest predicted potential value and the protection threshold within the target adjustment region is calculated, and combined with the response coefficient K between this region and the associated anode sites, the required current adjustment ΔI = ΔV / K is derived. Finally, a command message containing the anode site number, adjustment time window, and ΔI value is generated and transmitted to the potentiostat via the Modbus protocol to execute current output adjustment.
[0084] This invention further proposes a calculation process for the anode output current adjustment, which includes: determining the response coefficient K between the potential change in the target adjustment area and the current change in the associated anode site based on the potential response relationship established by the spatiotemporal prediction model; calculating the difference ΔV between the target potential and the current predicted lowest potential; and calculating the current adjustment using the formula ΔI=ΔV / K.
[0085] The determination of the response coefficient K relies on the potential response relationship established by the spatiotemporal prediction model, which obtains the correlation between potential changes and current adjustments through training with historical data. The calculation of ΔV is based on the difference between the target protection potential value and the lowest predicted potential within the prediction time window, ensuring that the adjusted potential reaches the safety threshold. The current adjustment formula converts the potential difference into a specific current adjustment value through a linear relationship, achieving precise adjustment.
[0086] Specifically, when the predicted potential of the target regulation area is lower than the degradation state threshold, the potential response relationship module in the spatiotemporal prediction model is first invoked to extract the response coefficient K between the target area and the associated anode station. Then, the difference ΔV between the current predicted minimum potential and the target potential is calculated. By dividing ΔV by K, the required current adjustment ΔI is directly obtained. For example, when ΔV is 0.5V and K is 0.2V / A, ΔI is calculated to be 2.5A. This current adjustment is sent to the corresponding anode station through the control system, adjusting the output current to restore the potential of the target area to a safe range. This process avoids errors from human experience-based judgment through quantitative calculation, ensuring the accuracy and reliability of the regulation operation.
[0087] As a preferred embodiment, the specific implementation of the present invention is as follows: When a section of the gas transmission pipeline detects a protection potential lower than -0.85V, the topological connection relationship between this area and the three anode stations is analyzed using a graph neural network. The laying environment parameter in the edge attributes shows that the second anode station has high-density soil contact with this area. Based on a potential response model established using historical data, the response coefficient K between the potential change in this area and the current change at the second anode station is measured to be 0.15V / A. The lowest potential within the current prediction window is -1.02V, and the target potential is set to -0.90V, resulting in a calculated ΔV = 0.12V. The formula ΔI = 0.12V / 0.15V·A is then used. -1 The control command, which requires increasing the output current of the second anode station by 0.8A, is transmitted to the potentiostat within the station via an encrypted communication protocol.
[0088] In summary, this invention achieves accurate assessment and dynamic adjustment of the cathodic protection status of pipelines by constructing a spatiotemporal prediction model that integrates graph neural networks and gated recurrent units. Specifically, firstly, by constructing a pipeline topology graph containing initial feature vectors of nodes (potential, current, soil resistivity) and edge attributes (pipe length, material, laying environment parameters), and combining this with a GNN to capture the spatial dependencies between monitoring points, it overcomes the shortcomings of traditional models that can only process data from a single monitoring point and cannot reflect spatial relationships. This allows the model to fully consider the spatial conduction characteristics of problems such as coating damage and stray current interference, improving the ability to perceive the overall state of the pipeline system. Secondly, by using a GRU to learn the temporal evolution of node representations containing spatial features, it effectively captures the temporal dynamics of monitoring data, solving the limitations of traditional time series models in handling long-period dependencies. The limitations of traditional methods are addressed by improving the prediction accuracy of future protection potential sequences. Furthermore, by generating an evaluation index P that comprehensively considers the lowest predicted potential and the standard deviation of the potential sequence, and combining it with preset thresholds to achieve graded judgment of protection status, the evaluation results are made more objective and comprehensive, enabling timely detection of potential risks. Finally, when the judged status is abnormal, the target adjustment area and associated anode sites are identified based on the spatial correlation analysis of the model. Adjustment commands are generated by accurately calculating the current adjustment amount, realizing dynamic and precise adjustment of the cathodic protection system. This avoids interference from ineffective operations on the overall protection status of the pipeline network, significantly improving the effectiveness and reliability of pipeline corrosion protection, and ensuring the operational safety and service life of long-distance pipelines.
[0089] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0090] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various 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 assessing and adjusting the cathodic protection status based on big data prediction, characterized in that, Includes the following steps: S1. Construct a pipeline topology graph, where monitoring points along the pipeline are defined as nodes of the topology graph, and pipe segments connecting adjacent monitoring points are defined as edges of the topology graph. S2. Construct a spatiotemporal prediction model, which integrates a graph neural network (GNN) and a gated recurrent unit (GRU). S3. The graph neural network (GNN) is used to process the topology graph to capture the spatial dependencies between all nodes and generate node representations containing spatial features. S4. Input the node representation containing spatial features into the gated recurrent unit (GRU) to learn the temporal evolution of each node's state and generate time series prediction results. S5. Based on the time-series prediction results, generate cathodic protection status evaluation indicators and determine the cathodic protection status of the pipeline. S6. When the cathodic protection status is determined to be abnormal, an adjustment command for the cathodic protection system is generated and the adjustment operation is executed based on the analysis results of the spatiotemporal prediction model.
2. The method for assessing and adjusting cathodic protection status based on big data prediction according to claim 1, characterized in that, The steps for constructing the pipeline topology map also include: Define an initial feature vector for each node in the topology graph. The initial feature vector includes the potential, current and soil resistivity data collected at the monitoring point. Define edge attributes for each edge of the topology graph, including the length, material, and laying environment parameters of the pipe segment.
3. The method for assessing and adjusting cathodic protection status based on big data prediction according to claim 2, characterized in that, The specific process of capturing spatial dependencies using a graph neural network (GNN) is as follows: For each node, its node representation is updated by aggregating the feature vectors of its neighboring nodes; The update process is executed iteratively on the topology graph through a preset message passing mechanism until the representations of all nodes converge or the preset number of iterations is reached. The specific calculation formula for the node representation containing spatial features is as follows: In the formula, Let A be the feature matrix of all nodes in the l-th layer, D be the adjacency matrix of the topological graph, and W be the degree matrix of the topological graph. It is a non-linear activation function.
4. The method for assessing and adjusting cathodic protection status based on big data prediction according to claim 3, characterized in that, The specific process of learning the evolution law of time using the gated recurrent unit (GRU) is as follows: At each time step t, the nodes containing spatial features output by the GNN are represented. As input to the GRU; The GRU uses update and reset gates to control the degree of integration between historical information and current input, and to update the hidden state of nodes. The specific calculation formula for updating the hidden state is as follows: ,in, , , In the formula, It is currently in a hidden state. It is the hidden state from the previous moment. It's an update door. It's a door reset. These are candidate hidden states, and W is the corresponding weight matrix. For Hadama accumulation.
5. The method for assessing and adjusting cathodic protection status based on big data prediction according to claim 1, characterized in that, Before constructing the spatiotemporal prediction model, a data preprocessing step is also included, as follows: Data cleaning is performed on the collected raw monitoring data to identify and remove outliers and noisy data; The cleaned data is standardized to unify monitoring data of different dimensions to the same numerical scale; The standardization process employs a min-max normalization method, and the specific calculation formula is as follows: In the formula, This is the normalized data, and x is the original data. It is the minimum value of the data in this dimension. It is the maximum value of the data in this dimension.
6. The method for assessing and adjusting cathodic protection status based on big data prediction according to claim 1, characterized in that, The method also includes a model training step, the specific process of which is as follows: Historical monitoring data is divided into training set, validation set, and test set; The spatiotemporal prediction model is trained using the training set, and the model parameters are adjusted by minimizing the loss function between the predicted and the true values. The loss function is the root mean square error (RMSE), and the specific calculation formula is as follows: In the formula, N is the total number of samples. It is the true value of the i-th sample. It is the model's prediction for the i-th sample; The training process is monitored using the validation set. Training is stopped when the model's performance on the validation set no longer improves to prevent overfitting.
7. The method for assessing and adjusting cathodic protection status based on big data prediction according to claim 1, characterized in that, The specific process for generating cathodic protection status assessment indicators and determining the cathodic protection status of the pipeline is as follows: Using a trained spatiotemporal prediction model, and inputting current and historical monitoring data, the protective potential sequence of each monitoring point within a preset time window is predicted. The cathodic protection status evaluation index P is calculated based on the protection potential sequence. The evaluation index P is compared with a preset protection status threshold, which includes a good status threshold. and degradation state threshold ; like If so, the cathodic protection status is determined to be good; if If, then it is determined to be a critical state; if If so, it is determined to be in a deteriorated state.
8. The method for assessing and adjusting cathodic protection status based on big data prediction according to claim 7, characterized in that, The specific calculation formula for the cathodic protection status assessment index P is as follows: In the formula, P is the cathodic protection status assessment index, M is the total number of monitoring points, and T is the prediction time window length. Let be the protection potential of the j-th monitoring point predicted by the model at time t in the future. This represents the lowest predicted potential for that monitoring point within the prediction time window. The standard deviation of the potential sequence for all monitoring points within the prediction time window. and These are the preset weighting coefficients.
9. The method for assessing and adjusting cathodic protection status based on big data prediction according to claim 7, characterized in that, The specific process of generating adjustment instructions and executing adjustment operations is as follows: When the cathodic protection condition is determined to be in a deteriorated state, the region with the lowest evaluation index P is identified as the target adjustment region. Based on the GNN part of the spatiotemporal prediction model, the anode sites with strong spatial correlation to the target adjustment area are analyzed. Calculate the amount of anode output current adjustment required to restore the predicted potential of the target regulation region to above the good-state threshold. ; Generate a generator that includes the anode station and the corresponding current adjustment. The adjustment command is sent to the cathodic protection control system for execution.
10. The method for assessing and adjusting cathodic protection status based on big data prediction according to claim 9, characterized in that, The anode output current adjustment amount The specific calculation process is as follows: Based on the potential response relationship established by the spatiotemporal prediction model, the response coefficient K between the potential change in the target regulation area and the current change at the associated anode site is determined. Calculate the difference between the target potential and the current predicted lowest potential. ; The current adjustment amount The calculation formula is: In the formula, The target protection potential value, K represents the lowest predicted potential of the target adjustment region within the prediction time window, and K is the response coefficient.