A method and system for corrosion damage driven dynamic risk prediction of long-distance pipelines

CN122928008APending Publication Date: 2026-10-16GUANGDONG UNIV OF PETROCHEMICAL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611106175.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

但该方法未沿管道里程进行动态分段,也未对批次切换造成的腐蚀瞬态进行建模,其图谱为统计描述而非空间风险地图

Benefits of technology

[0018]The beneficial effects of the method and system of this invention are as follows: This invention collects operating condition data from several mileage points along the long-distance pipeline, performs dynamic segmentation of the pipeline driven by corrosion damage, obtains segmented feature vectors, and proposes a two-stage fusion strategy of "gradient-weighted clustering + forced insertion of gradient extreme points". This embeds corrosion mechanism knowledge into the clustering process in the form of gradient weights, ensuring that the segment boundaries can accurately reflect the spatial abrupt changes in corrosion rate, significantly improving the physical interpretability of the segmentation results and the prediction accuracy for vulnerable parts such as bends and low points. Furthermore, it obtains a predefined batch-interactive corrosion cost tensor, enabling the deep learning model to internally acquire a mechanism to simulate the "damage-repair" physical process of the passivation film, solving the problem of poor generalization ability of pure data-driven models for new batch combinations of operating conditions not seen in history. Further, based on the segmented feature vectors… A temporal context is generated and combined with a batch interactive corrosion cost tensor. This is trained using a physical information long short-term memory network to output the corrosion depth increment corresponding to each operating condition segment. Thresholds are dynamically correlated with the pipe section's yield strength, design wall thickness, and historical maximum damage. Alarm thresholds are automatically tightened in weak sections, achieving risk management tailored to local conditions and more aligned with engineering realities. Finally, the corrosion depth increments corresponding to each operating condition segment are stitched together along the long-distance pipeline mileage to generate a dynamic damage risk map of the entire pipeline. This map is then compared with an adaptive multi-level risk threshold to obtain dynamic risk prediction results for the long-distance pipeline. The temporal evolution rate of segment boundaries is quantified into a normalized SMVI index, transforming the segmentation process from a passive data processing step into a proactive "sensor" for sensing unstable operating conditions, providing quantifiable health assessment indicators for upstream and downstream systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122928008A_ABST
    Figure CN122928008A_ABST
Patent Text Reader

Abstract

The application discloses a kind of corrosion damage driven long-distance pipeline dynamic risk prediction method and system, the method includes: the working condition data of long-distance pipeline is collected, long-distance pipeline is driven by dynamic segmentation of corrosion damage, and segmented feature vector is obtained;Obtain pre-defined batch interaction corrosion cost tensor;Through physical information long short-term memory network training, the corresponding corrosion depth increment of each working condition section is output;The corresponding corrosion depth increment of each working condition section is spliced along the mileage direction of long-distance pipeline, and the dynamic damage risk map of whole pipeline is generated, and is judged with adaptive multistage risk threshold, and the long-distance pipeline dynamic risk prediction result is obtained.The application can improve the physical interpretability of long-distance pipeline segmentation result and the prediction accuracy of vulnerable parts such as elbow and low point.The application can be widely applied to the field of pipeline damage risk prediction technology as a kind of corrosion damage driven long-distance pipeline dynamic risk prediction method and system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pipeline damage risk prediction technology, and in particular to a method and system for dynamic risk prediction of long-distance pipelines driven by corrosion damage. Background Technology

[0002] In the long-term operation of long-distance pipelines (such as oil and gas gathering and transportation trunk lines, refined oil long-distance pipelines, and CCUS pipelines), the physical properties (such as sulfur content, water content, temperature, viscosity, etc.) of the same transported medium may vary significantly between different batches over a distance of thousands of kilometers. These batch-to-batch fluctuations in operating conditions can cause significant disturbances in corrosion rates at critical locations such as pump stations, valve chambers, elbows, and low-point liquid accumulation points, posing challenges to the long-term safe operation of the pipeline. Traditional prediction methods such as "unified model for the entire pipeline" or "fixed equidistant grid" cannot adapt to the non-uniform changes in operating conditions along the pipeline, nor can they capture the sudden changes in corrosion kinetics during batch switching, resulting in insufficient prediction accuracy and delayed alarms for localized corrosion risks.

[0003] Existing technologies for predicting damage risks in long-distance pipelines mainly fall into the following categories: 1) Corrosion prediction based on fixed grid. Nodes are divided along the pipeline at fixed intervals (e.g., 1km, 5km), and each node is modeled separately. This method does not consider the non-uniform changes in operating conditions along the pipeline; prediction bias is prone to occur in areas of abrupt changes in operating conditions (e.g., pump stations, valve chambers, elbows, low points), and it is difficult to balance accuracy and computational cost between the number of segments and nodes.

[0004] 2) Internal corrosion prediction based on multiphase flow simulation. Using multiphase flow simulation software such as OLGA and LEADER, flow patterns, shear forces, and phase content are continuously calculated along the pipeline, and then combined with a corrosion model to predict the internal corrosion rate. This method has high computational costs, insufficient integration with field monitoring data, and limited responsiveness to dynamic conditions such as media switching and sand content.

[0005] 3) Corrosion prediction based on machine learning. Deep learning models such as LSTM and GRU are used to predict the time series of corrosion rates along the pipeline. This method is not specifically designed for the non-uniform changes in operating conditions along the pipeline; the model is highly dependent on the spatiotemporal coverage of the training samples; and the prediction accuracy is low in unseen operating condition areas.

[0006] 4) Dynamic segmentation risk assessment of long-distance pipelines oriented towards the external environment. Existing methods, such as dynamic segmentation based on external geological hazards, identify the susceptibility of geological hazards after segmentation and give a comprehensive risk level; the segmentation object of this type of method is "segment prone to geological hazards" rather than "segment under internal corrosion conditions", and the segmentation driving factors are external factors such as topography and geology, without involving the physical properties of internal media.

[0007] 5) Pipeline corrosion rate mapping and visualization prediction. For example, the method for drawing pipeline corrosion rate maps obtains a set of corrosion influencing factors for a set time period of the pipeline to be predicted and draws a two-dimensional map. However, this method does not dynamically segment along the pipeline mileage, nor does it model the corrosion transients caused by batch switching. Its map is a statistical description rather than a spatial risk map.

[0008] The aforementioned technologies generally suffer from the following drawbacks: fixed grids are not adapted to the non-uniform changes in working conditions along the pipeline; the transient impact of batch switching on corrosion kinetics is not adequately considered; the risk threshold is a globally fixed value and is not dynamically coupled with the pipe strength and historical damage status of the pipe section; and the segmented scheme lacks monitoring and early warning of its own stability. Summary of the Invention

[0009] To address the aforementioned technical problems, the present invention aims to provide a method and system for predicting dynamic risks of long-distance pipelines driven by corrosion damage, which can improve the physical interpretability of pipeline segmentation results and the prediction accuracy of vulnerable parts such as bends and low points.

[0010] The first technical solution adopted in this invention is: a method for predicting dynamic risks of long-distance pipelines driven by corrosion damage, comprising the following steps: The operating condition data of several mileage points along the long-distance pipeline were collected, and the long-distance pipeline was dynamically segmented driven by corrosion damage to obtain segment feature vectors. Obtain a predefined batch-interactive corrosion cost tensor, which is used to characterize the expected transient corrosion rate increment coefficient of the pipe wall passivation film when the transport medium switches from category i to category j; Based on segmented feature vectors, a temporal context is generated, and combined with the batch interactive corrosion cost tensor, it is trained through a physical information long short-term memory network to output the corrosion depth increment corresponding to each working condition segment. The corrosion depth increments corresponding to each working condition section are spliced ​​along the mileage direction of the long-distance pipeline to generate a dynamic damage risk map of the entire pipeline. The map is then compared with an adaptive multi-level risk threshold to obtain the dynamic risk prediction results of the long-distance pipeline.

[0011] Furthermore, the step of collecting operating condition data at several mileage points along the long-distance pipeline, performing dynamic segmentation of the pipeline driven by corrosion damage, and obtaining segmented feature vectors specifically includes: The operating condition data are collected at several mileage points along the long-distance pipeline. The operating condition data includes medium physical property parameters, flow velocity, temperature, pressure and pipe material identification. The medium physical property parameters include sulfur content, water content, CO2 partial pressure and pH value. By employing a two-stage fusion strategy and combining operating data, the long-distance pipeline is dynamically segmented based on corrosion damage. This process dynamically divides the pipeline into several operating segments and outputs a segmentation scheme. Based on the segmentation scheme, segmented feature vectors are constructed, which include pipe material characteristics, medium operating condition characteristics, and operation characteristics.

[0012] Furthermore, the step of using a two-stage fusion strategy to dynamically segment the long-distance pipeline based on corrosion damage driven by operating data, dynamically dividing the pipeline into several operating segments, and outputting a segmentation scheme, specifically includes: The basic corrosion damage gradient predicted based on the physical corrosion model is used as a weighting factor for the distance metric. Weighted clustering is performed on the working condition data to obtain the preliminary working condition cluster boundary. The basic corrosion damage gradient is the ratio of the difference in basic corrosion rate between adjacent mileage points to the mileage distance. A change point detection algorithm is used to detect abrupt change points at the maximum points of the basic corrosion damage gradient, and the abrupt change points are set as the forced segmentation boundary. Based on the BIC criterion, the preliminary operating condition clustering boundary and the forced segmentation boundary are fused and optimized to dynamically divide the long-distance pipeline into several operating condition segments and output the segmentation scheme.

[0013] Furthermore, the batch-interactive corrosion cost tensor is obtained experimentally or determined empirically. The experimental method involves conducting a switching experiment from batch category i to batch category j in a high-pressure corrosion loop using actual pipe specimens from long-distance pipelines as the object, measuring the corrosion rate evolution function before and after the switching, and outputting the batch-interactive corrosion cost tensor.

[0014] Furthermore, the step of generating temporal context based on segmented feature vectors, combining it with batch interactive erosion cost tensors, training it through a physical information long short-term memory network, and outputting the erosion depth increment corresponding to each working condition segment specifically includes: Based on segmented feature vectors, and with the preceding batch category code and switching time offset added as temporal context; The batch interaction corrosion cost tensor is injected as a gating tensor into the forget gate of the Physical Information Long Short-Term Memory (PI-LSTM) network. A Transformer multi-head attention module is connected to the output of the PI-LSTM to capture the coupling relationship of multiple environmental factors. Spatial extremum penalty term and physical residual constraint are introduced to train the temporal context and output the corrosion depth increment corresponding to each working condition segment.

[0015] Furthermore, the step of stitching together the corrosion depth increments corresponding to each working condition section along the mileage direction of the long-distance pipeline to generate a dynamic damage risk map of the entire pipeline, and then judging it against an adaptive multi-level risk threshold to obtain the dynamic risk prediction result of the long-distance pipeline, specifically includes: Based on the segmented feature vector, combined with the yield strength of the segmented pipe, the design wall thickness and the historical maximum corrosion depth, an adaptive multi-level risk threshold is generated. The corrosion depth increments corresponding to each working condition section are spliced ​​along the mileage of the long-distance pipeline, and distance-weighted interpolation is performed at the segment boundary. Risk level color coding is combined with adaptive multi-level risk thresholds to generate a dynamic damage risk map of the entire pipeline. Calculate the segment migration speed index based on the dynamic damage risk map of the entire pipeline; When the segment migration speed index exceeds the preset threshold, the corresponding pipe segment is determined to be in an unstable operating state and a segment reassessment warning signal is issued, thus obtaining the dynamic risk prediction result of the long-distance pipeline.

[0016] Furthermore, the segmented migration speed index is the average rate of change of the boundary mileage positions of all segments in two adjacent dynamic segmentation results, normalized to the total pipeline length.

[0017] The second technical solution adopted in this invention is: a corrosion damage-driven dynamic risk prediction system for long-distance pipelines, comprising: The first module is used to collect operating condition data at several mileage points along the long-distance pipeline, perform dynamic segmentation of the long-distance pipeline driven by corrosion damage, and obtain segment feature vectors. The second module is used to obtain a predefined batch-interactive corrosion cost tensor, which is used to characterize the expected transient corrosion rate increment coefficient of the pipe wall passivation film when the transport medium switches from category i to category j. The third module is used to generate temporal context based on segmented feature vectors, and combined with batch interactive corrosion cost tensor, it is trained through physical information long short time memory network to output corrosion depth increment corresponding to each working condition segment. The fourth module is used to stitch together the corrosion depth increments corresponding to each working condition section along the mileage direction of the long-distance pipeline to generate a dynamic damage risk map of the entire pipeline, and to judge it with the adaptive multi-level risk threshold to obtain the dynamic risk prediction result of the long-distance pipeline.

[0018] The beneficial effects of the method and system of this invention are as follows: This invention collects operating condition data from several mileage points along the long-distance pipeline, performs dynamic segmentation of the pipeline driven by corrosion damage, obtains segmented feature vectors, and proposes a two-stage fusion strategy of "gradient-weighted clustering + forced insertion of gradient extreme points". This embeds corrosion mechanism knowledge into the clustering process in the form of gradient weights, ensuring that the segment boundaries can accurately reflect the spatial abrupt changes in corrosion rate, significantly improving the physical interpretability of the segmentation results and the prediction accuracy for vulnerable parts such as bends and low points. Furthermore, it obtains a predefined batch-interactive corrosion cost tensor, enabling the deep learning model to internally acquire a mechanism to simulate the "damage-repair" physical process of the passivation film, solving the problem of poor generalization ability of pure data-driven models for new batch combinations of operating conditions not seen in history. Further, based on the segmented feature vectors… A temporal context is generated and combined with a batch interactive corrosion cost tensor. This is trained using a physical information long short-term memory network to output the corrosion depth increment corresponding to each operating condition segment. Thresholds are dynamically correlated with the pipe section's yield strength, design wall thickness, and historical maximum damage. Alarm thresholds are automatically tightened in weak sections, achieving risk management tailored to local conditions and more aligned with engineering realities. Finally, the corrosion depth increments corresponding to each operating condition segment are stitched together along the long-distance pipeline mileage to generate a dynamic damage risk map of the entire pipeline. This map is then compared with an adaptive multi-level risk threshold to obtain dynamic risk prediction results for the long-distance pipeline. The temporal evolution rate of segment boundaries is quantified into a normalized SMVI index, transforming the segmentation process from a passive data processing step into a proactive "sensor" for sensing unstable operating conditions, providing quantifiable health assessment indicators for upstream and downstream systems. Attached Figure Description

[0019] Figure 1 This is a flowchart of the steps of a corrosion damage-driven dynamic risk prediction method for long-distance pipelines according to the present invention. Figure 2 This is a structural block diagram of a corrosion damage-driven dynamic risk prediction system for long-distance pipelines according to the present invention. Figure 3 This is a schematic diagram of a corrosion damage-driven dynamic segmentation risk prediction system for long-distance pipelines provided in a specific embodiment of the present invention; Figure 4 This is a schematic diagram of the dynamic segmented long-distance pipeline damage risk prediction system provided in a specific embodiment of the present invention; Figure 5 This refers to the incremental corrosion depth of the pipeline along the entire length in Specific Embodiment 1 of the present invention. Schematic diagram of the prediction curve; Figure 6 This is a two-dimensional projection scatter plot and a five-color schematic diagram of the working condition vector along the line after principal component dimensionality reduction provided in a specific embodiment of the present invention. Figure 7This is a specific embodiment of the present invention, which is based on a 4×4 dielectric interaction corrosion cost tensor. A rendered thermal diagram; Figure 8 This is a comparative experiment of specific embodiment one provided in the specific embodiments of the present invention. A diagram illustrating the predicted RMSE histogram; Figure 9 This is a schematic diagram comparing the extreme batch switching conditions of a specific embodiment two provided by the present invention with actual measurements; Figure 10 This is a schematic diagram of the evolution curve of the three-segment migration velocity index (SMVI) provided in a specific embodiment of the present invention; Figure 11 This is a bar chart of ablation experiment results provided in a specific embodiment of the present invention; Figure 12 This is a schematic diagram illustrating the hyperparameter sensitivity analysis and comparison provided in a specific embodiment of the present invention. Detailed Implementation

[0020] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. The step numbers in the following embodiments are only for ease of explanation and do not limit the order of the steps. The execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.

[0021] Reference Figure 1 This invention provides a method for predicting dynamic risks of long-distance pipelines driven by corrosion damage, the method comprising the following steps: S100. Collect operating condition data at several mileage points along the long-distance pipeline, perform dynamic segmentation of the long-distance pipeline driven by corrosion damage, and obtain segment feature vectors. S110. Collect operating condition data at several mileage points along the long-distance pipeline. The operating condition data includes medium physical property parameters, flow velocity, temperature, pressure and pipe material identification. The medium physical property parameters include sulfur content, water content, CO2 partial pressure and pH value. In this embodiment, operating condition data are collected at N mileage points along the route to construct an operating condition vector, specifically including medium physical properties, flow velocity v, temperature T, pressure p, and pipe material identification ID, and mileage coordinates are obtained. The physical properties of the medium include at least three of the following: sulfur content, moisture content, CO2 partial pressure, and pH value.

[0022] S120. By using a two-stage fusion strategy and combining operating data, the long-distance pipeline is dynamically segmented based on corrosion damage, and the pipeline is dynamically divided into several operating segments, and a segmentation scheme is output. Specifically, the basic corrosion damage gradient predicted based on the physical corrosion model is used as a weighting factor for the distance metric. Weighted clustering is performed on the operating condition data to obtain the preliminary operating condition cluster boundary. The basic corrosion damage gradient is the ratio of the difference in basic corrosion rate between adjacent mileage points to the mileage distance. A change point detection algorithm is used to detect abrupt change points at the maximum points of the basic corrosion damage gradient, and the abrupt change points are set as the forced segmentation boundary. Based on the BIC criterion, the preliminary operating condition cluster boundary and the forced segmentation boundary are fused and optimized to dynamically divide the long-distance pipeline into several operating condition segments and output the segmentation scheme.

[0023] In this embodiment, corrosion damage-driven dynamic segmentation is performed, employing a two-stage fusion strategy: In the first stage, the baseline corrosion damage gradient predicted by the physical corrosion model is used as a weighting factor for the distance metric, and weighted clustering is performed on the operating condition vector to obtain preliminary operating condition cluster boundaries. In the second stage, a change point detection algorithm is used to detect abrupt change points at the maxima of the baseline corrosion damage gradient, and these abrupt change points are forcibly set as segmentation boundaries. Finally, the cluster boundaries and the forced segmentation boundaries are fused and optimized based on the BIC criterion to dynamically divide the pipeline into S operating condition segments, outputting a segmentation scheme. The basic corrosion damage gradient is defined as the ratio of the difference in basic corrosion rate calculated based on the NORSOK M-506 model between adjacent mileage points to the mileage distance.

[0024] The working condition feature clustering uses either the DBSCAN or K-means algorithm, with the distance metric corrected using the following formula: ; in, The original Euclidean distance, The basic corrosion damage gradient at mileage point x. The gradient weight coefficient is set to 0.2-0.5; the change point detection adopts the CUSUM algorithm; the number of working condition segments S is adaptively selected within the range of 5 to 30 segments based on the BIC criterion.

[0025] When the variance of a certain working condition segment is less than a preset threshold, adjacent segments are merged; when the mileage of a certain working condition segment is less than 1km, it is merged into the adjacent segment; when the distance between the cluster boundary and the forced segmentation boundary is less than 500m, the forced segmentation boundary is retained first.

[0026] S130. Based on the segmentation scheme, construct segmentation feature vectors, which include pipe material characteristics, medium operating condition characteristics, and operation characteristics.

[0027] In this embodiment, segmented feature vectors are constructed. The feature vector V includes the pipe feature vector. Medium operating condition feature vector With operating feature vectors .

[0028] S200. Obtain a predefined batch-interactive corrosion cost tensor, which is used to characterize the expected transient corrosion rate increment coefficient of the pipe wall passivation film when the transport medium switches from category i to category j. The batch-interactive corrosion cost tensor is obtained experimentally or determined empirically. The experimental method involves conducting a switching experiment from batch category i to batch category j in a high-pressure corrosion loop using actual pipe specimens from long-distance pipelines as the object, measuring the corrosion rate evolution function before and after the switching, and outputting the batch-interactive corrosion cost tensor.

[0029] In this embodiment, a predefined batch interactive erosion cost tensor is obtained. The cost tensor This is an M×M matrix, where M is the total number of media / batch operating condition categories; matrix elements The batch-to-batch cross-corrosion factor represents the mathematical expectation of the transient corrosion rate increment coefficient caused by the passivation film state of the pipe wall when the transported medium / batch changes from category i to category j; diagonal elements =0 indicates that no cross-corrosion effect occurs when the same batch of the same category is transported continuously; the cost tensor If the data is provided by an external system or database, the method of its construction is not within the scope of protection of this claim.

[0030] More specifically, batch-to-batch cross-corrosion factor Predefined and provided by an external system, its typical acquisition method includes: conducting a "batch category i → batch category j" switching experiment in a laboratory high-pressure corrosion circuit, using actual pipe material specimens as the object, measuring the corrosion rate evolution function before and after the switching, and calculating it according to the following formula: ; in, Switch the corrosion rate evolution function measured in the experiment. A reference corrosion rate function for continuous delivery of a single batch category. The time-averaged value is used as a reference corrosion rate.

[0031] When experimental conditions are lacking An empirical estimation method was used to determine the compatibility level: interpolation was performed based on the chemical compatibility levels of the two batches' physical properties. When the compatibility level was "high", the result was determined by interpolation. Use values ​​of 0.05-0.15, 0.15-0.50 for "medium", and 0.50-1.00 for "low"; when specific data is missing, conservatively fill with the maximum value of the non-diagonal element of the row.

[0032] S300: Based on segmented feature vectors, a temporal context is generated, and combined with the batch interactive corrosion cost tensor, it is trained through a physical information long short-term memory network to output the corrosion depth increment corresponding to each working condition segment. Specifically, based on segmented feature vectors, and with the addition of the preceding batch category encoding and switching time offset as temporal context, the batch interaction erosion cost tensor is injected as a gating tensor into the forget gate of the physical information long short-term memory network PI-LSTM. A Transformer multi-head attention module is connected to the output of PI-LSTM to capture the coupling relationship of multiple environmental factors, and spatial extremum penalty term and physical residual constraint are introduced to train the temporal context, outputting the erosion depth increment corresponding to each working condition segment.

[0033] In this embodiment, a segmented feature vector is constructed, and the preceding batch category code and switching time offset are added to the current operating segment as a temporal context; the cost tensor is... As a forgetting gate in the Physically Informed Long Short-Term Memory (PI-LSTM) network, it explicitly models the destruction / repair process of the tube wall passivation film state during batch switching. PI-LSTM, short for Physically Informed Long Short-Term Memory, refers to a long short-term memory network that introduces a physical information guiding term into the standard LSTM forgetting gate. A Transformer multi-head attention mechanism is externally applied to PI-LSTM to capture the complex coupling relationships of multiple environmental factors, and a spatial extremum penalty term is introduced. With physical residual constraints, output corrosion depth increment The spatial extremum penalty term is as follows: ; in, The penalty coefficient is... This refers to a set of vulnerable nodes consisting of elbows, tees, and areas with low-level fluid accumulation. This represents the predicted corrosion depth increment at a single vulnerable node.

[0034] Among them, the forget gate of PI-LSTM Calculate using the following formula: ; in, For the sigmoid function, Here is the forget gate weight matrix. This is the hidden state from the previous moment. For the current input, For bias terms, This is the gating scaling factor, with a value ranging from 0.3 to 0.7. For the intermediate cost tensor The element values ​​corresponding to the current batch category and the previous batch category are defined in the Transformer multi-head attention mechanism, which uses 4 to 8 heads, with a key-value dimension of 64 and a feedforward dimension of 256. The physical residual constraint incorporates the one-dimensional concentration flux residual of the Nernst-Planck equation and the anode-cathode current residual of the Butler-Volmer equation as loss terms into the training process.

[0035] Spatial extremum penalty term In the middle, the penalty coefficient The value range is 0.25 - 0.70, with 0.45 being preferred; Belongs to The increase in corrosion depth at vulnerable nodes within the operating range is calculated by averaging the corrosion depth of the operating range. With node local magnification factor ( >1, obtained by multiplying the values ​​of the elbow radius of curvature or the tee splitting ratio (determined by looking up a table), i.e. .

[0036] S400: The corrosion depth increments corresponding to each working condition section are spliced ​​along the mileage direction of the long-distance pipeline to generate a dynamic damage risk map of the entire pipeline. The map is then compared with an adaptive multi-level risk threshold to obtain the dynamic risk prediction result of the long-distance pipeline.

[0037] S410. Based on the segmented feature vector, combined with the yield strength of the segmented pipe, the design wall thickness and the historical maximum corrosion depth, an adaptive multi-level risk threshold is generated. In this embodiment, an adaptive multi-level risk threshold is generated for each working condition segment, the threshold being based on the pipe yield strength of that segment. Design wall thickness Compared to the largest corrosion depth in history The risk level is dynamically generated, thus linking the risk level classification to the remaining strength reserve of the pipe section itself.

[0038] More specifically, the formula for generating the adaptive multi-level risk threshold is: . The wall thickness ratio coefficient corresponds to the k-th risk level, and the coefficient corresponding to the fourth level. Typical values ​​are 0.20, 0.35, 0.50, and 0.65, respectively. For design wall thickness, the unit is mm; The yield strength of the pipe is expressed in MPa. As the benchmark yield strength, the yield strength of API 5L X52 grade pipe is taken as 358 MPa. This represents the maximum corrosion depth of this section over the past N years, expressed in mm. This is the historical damage reduction factor, corresponding to level four risk. Typical values ​​are 0.10, 0.15, 0.20, and 0.25, respectively.

[0039] S420: The corrosion depth increments corresponding to each working condition section are spliced ​​along the mileage of the long-distance pipeline, and distance-weighted interpolation is performed at the segment boundary. Combined with adaptive multi-level risk thresholds, risk level color coding is performed to generate a dynamic damage risk map of the entire pipeline. In this embodiment, as Figure 5 As shown, the corrosion depth increment for each working condition is... By splicing along the pipeline mileage and performing distance-weighted interpolation at the segment boundaries for smooth transition, and then color-coding the risk level based on the generated adaptive multi-level risk threshold, a dynamic damage risk map of the entire pipeline is obtained.

[0040] More specifically, inverse distance weighted interpolation is used for smoothing at segment boundaries; when discontinuous jumps occur between adjacent mileage points that exceed twice the average within the segment, smoothing constraints are enabled and a data review process is triggered; and the risk level evolution animation for the next 30 days is continuously refreshed and generated.

[0041] S430. Calculate the segment migration speed index based on the dynamic damage risk map of the entire pipeline. The formula for calculating the segmented migration velocity index (SMVI) is as follows: ; in, S represents the total length of the pipeline, and S represents the number of operating sections. The current time represents the boundary mileage position of segment s. This represents the boundary mileage position of segment s at the previous time step. The time interval between the two segmented calculations; the preset threshold is set to 0.005-0.015 km. -1 ·day -1 , preferably 0.010 km -1 ·day -1 .

[0042] S440. When the segment migration speed index exceeds the preset threshold, the corresponding pipe segment is determined to be in an unstable operating state and a segment reassessment warning signal is issued to obtain the dynamic risk prediction result of the long-distance pipeline.

[0043] In this embodiment, the segment migration speed index SMVI is calculated. The SMVI is defined as the average rate of change of the boundary mileage positions of all segments in two adjacent dynamic segmentation results, and is normalized by dividing by the total length of the pipe segment. When the SMVI exceeds a preset threshold, the pipe segment is determined to be in an unstable operating state, and a warning signal of "segmentation to be re-evaluated" is sent to the operation and maintenance system.

[0044] More specifically, when the SMVI exceeds the threshold, the system automatically triggers a recalculation of the segmentation scheme and incremental training of the PI-LSTM-Transformer model to adapt to the current unstable operating conditions; the historical curve of SMVI is shared with the pipeline integrity management platform as an auxiliary evaluation indicator of pipeline operating health.

[0045] In addition, this embodiment also provides a pre-schedule function. After receiving the batch switching plan from the scheduling center, the planned switching sequence is encoded into a previous / current batch category vector, driving the PI-LSTM-Transformer model to predict the next N days. The simulation is performed, and the predicted results are output to support the decision-making of protective measures before the switchover. The pre-schedule simulation function does not involve the optimization or selection of the scheduling sequence itself, but only provides the corrosion risk prediction results under a given scheduling plan. In summary, as Figure 3 and Figure 4 As shown, this embodiment addresses the problems of fixed grids being unsuitable for changes in operating conditions along the pipeline, neglecting the transient corrosion during batch switching, and having globally fixed risk thresholds. This invention collects the physical properties of the medium along the pipeline, flow velocity, temperature, pressure, and pipe material properties. It employs a two-stage dynamic segmentation strategy combining corrosion damage gradient-weighted clustering and forced insertion of gradient extrema. A predefined batch interaction corrosion cost tensor is obtained and injected into the forget gate of a physical information long short-term memory network to explicitly model the transient impact of batch switching on the pipe wall passivation film. Multi-head attention, spatial extremum penalty, and physical residual constraints are combined to output the corrosion depth increment. Adaptive multi-level risk thresholds are generated based on the pipe segment's material strength, design wall thickness, and historical damage to replace the globally fixed threshold. A segment migration velocity index is introduced to quantitatively monitor and warn of the stability of the segmentation results. The predicted results of each segment are stitched together with the adaptive thresholds to form a mileage-level risk map, supporting pre-schedule simulations before batch switching. This invention is mainly used for corrosion risk prediction in long-distance oil and gas, refined oil, and CCUS pipelines.

[0046] Finally, the embodiments of the present invention will be explained and described in conjunction with the accompanying drawings: Specific Implementation Example 1: A long-distance refined oil transportation pipeline (basic scenario): A certain long-distance pipeline for refined oil is approximately 120km long, with a diameter of 508mm, and is made of X60 steel (yield strength...). = 414MPa), design wall thickness = 7.9mm, design pressure 6.4MPa. The entire line has 2 pumping stations, 3 shut-off valve chambers, and 2 elbow clusters. This pipeline mainly transports 92# gasoline, 95# gasoline, and 0# diesel. However, the sulfur content (range 8-45ppm), water content (range 0.05%-0.35%), and transport temperature (range 18-38℃) of the same medium vary significantly between different batches due to different refineries. The owner defines these three typical batch conditions as Category A (low-sulfur, low-temperature gasoline, sulfur content <20ppm, temperature <25℃), Category B (high-sulfur, high-temperature gasoline, sulfur content ≥20ppm, temperature ≥25℃), and Category C (diesel), thus discretizing the continuous physical property parameters into 3 categories (M=3).

[0047] The traditional 5km fixed grid + LSTM prediction scheme consistently resulted in an RMSE higher than 0.25mm at the K23+400 bend cluster, and frequently exhibited prediction bias spikes of approximately 0.15mm after batch switchover dates. This embodiment deploys the system of the present invention according to the following steps: 1) Data Acquisition and Preprocessing: 241 virtual mileage markers were set at 500m intervals to collect real-time data on seven dimensions: sulfur content, moisture content, CO2 partial pressure, pH value, flow velocity, temperature, and pressure, with a sampling frequency of 1 minute / time. After data was denoted by 10-minute window mean and outlier removal by IQR, a working condition vector was constructed. The true value of ΔD (training label) was obtained by spatiotemporal interpolation of quarterly internal inspection (ILI) data and monthly ultrasonic thickness measurement data of elbows.

[0048] 2) Corrosion damage-driven two-stage dynamic segmentation: Phase 1 (Gradient-weighted clustering): Calculate the daily baseline corrosion rate for each mileage point using the NORSOK M-506 CO2 corrosion rate model. Then calculate the basic corrosion damage gradient. DBSCAN clustering was performed on the load condition vectors (eps=0.38, minPts=4), but the distance metric was replaced with weighted distance. This makes clusters "naturally" inclined to form boundaries at locations with large erosion gradients.

[0049] Second stage (forced insertion of gradient extrema): In The CUSUM change point detection was run on the sequence, and six significant change points were detected, located at K8+200 (pump station outlet), K23+400 (elbow cluster), K23+900 (elbow cluster end), K45+700 (start of low point liquid accumulation section), K72+100 (tributary branch tee), and K85+500 (temperature transition section).

[0050] Boundary fusion: The cluster boundaries are fused with the six forced breakpoints detected by CUSUM using BIC (Browsing Intelligence Component Analysis). Forced breakpoints are retained when the distance between two boundaries is less than 500m. This ultimately generates six working condition segments. Compared to pure clustering segmentation, this embodiment, due to the forced insertion of the corrosion gradient maxima at the K23+400 elbow cluster, separates the elbow segment that might otherwise have been merged into a separate segment S3 (K23+200~K24+100, only 900m long). This is crucial for improving the prediction accuracy of subsequent elbow nodes.

[0051] 3) Batch Inter-corrosion Cost Tensor Extraction: A predefined 3×3 cost tensor was obtained from the scheduling optimization system database provided by the partner. This tensor was calculated by the partner using standard methods in a laboratory high-pressure corrosion loop, with the X60 steel specimen of this pipeline as the object, for six directed switching experiments between media A, B, and C. The main results are as follows: Figure 7 As shown, the values ​​of A→C and C→A are significantly asymmetrical. This is attributed to the unidirectional destructive effect of the trace amount of moisture remaining in the gasoline batch on the FeCO3 film on the X60 steel surface, which is formed by the localized acidification environment after contact with diesel.

[0052] 4) Spatiotemporal extrapolation of PI-LSTM-Transformer: Construct a piecewise feature vector V with a total of 25 dimensions. The cost tensor B is injected as a gating tensor into the forget gate of the PI-LSTM, where the gating scaling coefficients are... Set the weight to 0.5. Use an external Transformer multi-head attention mechanism (8 heads) to capture the coupling of multiple environmental factors. The weights for the three terms of the loss function are: MAE data fitting term weight 1.0, spatial extremum penalty term weight 0.5, and physical residual term weight 0.1. Input 30 days of historical data, output the daily ΔD sequence for the next 30 days. A single full pipeline run takes approximately 12 minutes (NVIDIA A10 single card).

[0053] 5) Adaptive Multi-Level Risk Threshold Generation: Unlike the fixed thresholds in existing technologies, this embodiment calculates the threshold separately for each working condition segment. Taking segment S3 (K23+400 elbow cluster segment) as an example, with X60 steel pipe... =414MPa =7.9mm, =1.8mm, =358MPa. The calculated threshold values ​​for the four levels are as follows: green warning line 1.65mm, yellow warning line 2.93mm, orange warning line 4.21mm, and red warning line 5.49mm; while for pipes with higher strength (X70), =483MPa), with a thicker designed wall thickness ( For section S5 (10.3 mm thick) and without historical damage, the green warning line is 0.20 × 10.3 × (483 / 358) = 2.78 mm. It can be seen that, under the same corrosion depth, the alarm threshold for the weak section S3 is automatically tightened.

[0054] 6) Risk Map Stitching: The daily ΔD for each working condition segment over the next 30 days is stitched along the mileage, with inverse distance weighted interpolation smoothing used at the segment boundaries. The daily ΔD for each mileage point is compared with the generated adaptive threshold to determine its green / yellow / orange / red risk level, and a 30-day risk evolution animation is continuously generated.

[0055] 7) SMVI Monitoring and Early Warning: The system automatically recalculates the segmentation scheme and calculates the SMVI once daily at midnight. On the 34th day of operation of the example, the SMVI reached 0.023 km. -1 ·day -1 Exceeding the preset 0.010 km -1 ·day -1 The system automatically determined that the batch physical properties in the K45~K65 range fluctuated significantly, issuing a yellow warning to the SCADA system indicating "segmented reassessment required." Based on this, engineers adjusted the corrosion inhibitor injection volume downstream of the pump station in advance, effectively preventing a potential localized accelerated corrosion event.

[0056] The technical effects of specific embodiment one: Compared with the traditional 5km fixed grid + LSTM scheme, this specific embodiment reduces the RMSE of 30-day ΔD prediction from 0.27mm to 0.08mm at the K23+400 elbow point; in general pipe sections without elbows, the RMSE decreases from 0.13mm to 0.07mm. Due to the adoption of adaptive thresholds, alarm lag caused by applying lenient standards in weak sections is avoided, and the alarm accuracy is improved from 72% in the baseline scheme to 88%. Figure 6 The stitched-together pipeline risk map is displayed. Figure 7 The PCA scatter plot of the working conditions after gradient-weighted clustering of corrosion damage is shown.

[0057] Comparative experiment of specific embodiment one: This specific embodiment is compared with three methods, namely "fixed mesh + LSTM", "traditional empirical formula", and "only condition clustering and segmentation + standard LSTM" (i.e., without introducing corrosion damage gradient constraints and without using cost tensor gating), on 12 months of retained data. The results are as follows: Figure 8 As shown in the figure. In this specific embodiment, the RMSE under batch switching conditions is 0.09 mm, which is 56% lower than the optimal baseline method; the RMSE at the elbow node is 0.08 mm, which is 68% lower.

[0058] The ablation experiment in Specific Implementation Example 1: Based on 12 months of retained data, the three modules "Basic Corrosion Damage Gradient Constraint," "Adaptive Multi-Level Risk Threshold," and "SMVI Monitoring" were removed, and the degradation of RMSE and alarm accuracy at elbow nodes was recorded. Results showed that after removing the gradient constraint, the RMSE at elbow nodes degraded from 0.08 mm to 0.171 mm, fully demonstrating the decisive role of this constraint in ensuring the prediction accuracy of critical locations; after removing the adaptive threshold, the alarm accuracy decreased from 88% to 76%.

[0059] Specific Implementation Example 2: Pre-simulation of extreme batch switching: On the 56th day of pipeline operation, the dispatch center planned an emergency switch of the entire pipeline's medium from batch A (low-sulfur, low-temperature gasoline) to batch C (diesel). Two hours before the switch, the system received the dispatch plan and activated its pre-switch simulation function. 1) Encode the planned switching sequence as the previous batch category A and the current batch category C. In the driving model, the forget gate reads βAC=+0.62 from the cost tensor and actively reduces the forget gate to 38% of the normal state.

[0060] 2) Pre-heating simulation results show that at the K23+400 bend cluster, on the second day... It will jump to 0.22mm, reaching the adaptive yellow warning line for this segment, and accumulate to 1.62mm on the 5th day, approaching the orange warning line.

[0061] 3) The system sends an early warning to the integrity management platform 30 minutes before the switchover, recommending a speed limit of 0.3 m / s at bends and immediate injection of corrosion inhibitors after the switchover. The maintenance team prepares the necessary chemicals and pump station speed reduction plans accordingly, implementing them simultaneously on the day of the switchover. Actual monitoring results are as follows: Figure 9 As shown, the bend section on the second day The peak value was controlled at 0.14 mm, and the cumulative value on the 7th day was only 0.82 mm, without exceeding the yellow warning line throughout the entire process.

[0062] The technical effect of the second specific embodiment: the prediction and simulation under extreme switching conditions takes 42 seconds and the early warning lead time is 2 hours, which enables the operation and maintenance team to complete the deployment of protective measures before the switching occurs, realizing the transformation from "passive post-event response" to "proactive pre-event simulation".

[0063] Comparative experiment of specific embodiment 2: This specific embodiment is compared with "fixed mesh + LSTM", "traditional NORSOK empirical formula" and "only working condition clustering segmentation + standard LSTM" (without introducing gradient weighting and cost tensor gating) on ​​12 months of retained data. The results are shown in Table 1: Table 1 Comparison of different methods ; In this specific embodiment, the RMSE under batch switching conditions is reduced by 55% relative to the optimal baseline, and the RMSE at the bend node is reduced by 58% relative to the baseline.

[0064] Ablation experiment of specific embodiment 2: The core module was removed from the 12-month retained data, and the degradation of RMSE and alarm accuracy of the elbow node was recorded, as shown in Table 2.

[0065] Table 2 Comparison of different ablation experiments ; It should be noted that removing SMVI monitoring has no direct impact on prediction accuracy, but it completely eliminates the ability to monitor the real-time health of the segmented scheme.

[0066] Specific Implementation Example 3: The Long-Term Value of Segmented Migration Monitoring: like Figure 10 As shown: In the 10th month after the pipeline's commissioning, the SMVI index remained in the 0.015-0.025 range for 15 consecutive days, significantly higher than the stable level of 0.001-0.008 in the previous 9 months. System engineers retrieved data from the abnormal SMVI period for backtracking analysis and discovered that the upstream refinery had changed its crude oil source during this period, leading to periodic fluctuations in the sulfur content of the refined oil. The dynamic segmentation module detected the unstable characteristics of batch properties and frequently fine-tuned the segment boundaries within the K45-K65 range. Based on the SMVI warning, the owner communicated with the upstream refinery and adjusted the crude oil blending ratio, bringing the sulfur content back to the normal fluctuation range. Subsequently, the SMVI index fell back to 0.006.

[0067] This example demonstrates that SMVI is not only a technical indicator, but can also serve as a quantitative decision-making basis for the collaborative optimization of upstream and downstream industrial chains.

[0068] To systematically evaluate the effectiveness of this invention, the method was compared with three baselines (fixed mesh + LSTM, OLGA multiphase flow simulation, and traditional empirical formulas) on 12 months of port pipeline data. The results are as follows: Figure 8 As shown, this specific embodiment exhibits the lowest RMSE across four typical scenarios, representing a 42%–82% reduction compared to the baseline; the response delay to sudden changes in operating conditions is consistently within 1 minute, while the baseline generally exceeds 8 hours or is infeasible at the minute level; the failure probability of elbow nodes within 12 months is reduced from 1.5% to 0.9%. The experiment rigorously controlled data partitioning, verifying the significant advantages of the dynamic segmentation + cost tensor gating mechanism in terms of accuracy, response speed, and reliability.

[0069] In the ablation experiment of specific embodiment three, to quantitatively evaluate the contribution of each core module, four modules—dynamic segmentation, cost tensor, PI-LSTM, and spatial extremum penalty—were removed from the 12-month retained dataset of the port pipeline. The RMSE degradation was recorded for two types of indicators: typical operating conditions and bend nodes. The results are as follows: Figure 11 As shown, after removing the dynamic segmentation, the RMSE for typical operating conditions increased to 0.184 mm (a 124% degradation), and for elbows it increased to 0.318 mm (a 348% degradation), confirming its decisive role; after removing the cost tensor, the RMSE increased to 0.143 mm and 0.221 mm respectively, reflecting the calibration for media switching; after removing PI-LSTM, the RMSE increased to 0.171 mm and 0.198 mm, highlighting memory trajectory modeling; after removing the spatial penalty, the RMSE for elbows increased to 0.246 mm, and the failure probability increased from 0.9% to 2.5%, proving its effect of early risk exposure. Each module is indispensable.

[0070] The sensitivity analysis in Specific Implementation Example 3 assesses the impact of key hyperparameters on prediction accuracy. This analysis considers the following parameters: number of dynamic segments S (5, 8, 12, 16, 24), PI-LSTM hidden state dimension H (32, 64, 128, 256, 512), number of Transformer heads K (2, 4, 6, 8, 10, 12), and spatial extremum penalty coefficient. (Values ​​were taken in increments of 0.05, from 0.05 to 0.95.) Univariate frequency sweeps were performed on each of the four hyperparameters. The results are as follows: Figure 12 The results show that the RMSE is at its lowest when the number of segments is between 8 and 12. When there are fewer than 5 segments, the variance within each segment is too large to characterize sudden changes in operating conditions. When there are more than 16 segments, overfitting occurs due to insufficient samples within each segment. The optimal number of segments is consistent with the BIC adaptive selection result. The hidden state dimension is basically saturated at 128. Increasing it to 512 only improves the performance by about 3% but doubles the training time. The number of heads is sufficient to cover the multi-media, multi-pipe, and multi-operating-condition coupling in this case. Increasing it to 12 heads introduces redundant attention distribution. The optimal spatial extremum penalty coefficient is about 0.45. If it is too small (≤0.10), it cannot form an effective conservative constraint on the elbow nodes. If it is too large (≥1.00), it will cause the overall RMSE of the entire pipeline to increase by about 12%.

[0071] The engineering deployment experience of this invention in port pipeline projects is as follows: In terms of hardware, a single edge server equipped with 1×NVIDIA A30 graphics card, 64GB of memory, and a 12-core CPU can handle real-time simulation tasks for pipelines with a length of 100–200km; in terms of software, Python 3.10 + PyTorch 2.1 is used in conjunction with ONNXRuntime to complete production inference; in terms of interfaces, this system provides three types of external interfaces: OPCUA, ModbusTCP, and RESTful, which are adapted to automation, SCADA, and enterprise-level IT systems, respectively; in terms of security, all sensor data is preprocessed at the edge nodes before being uploaded to the central node, and the original time series does not leave the site; in terms of operation and maintenance, the model is incrementally trained once a week, fully trained once a quarter, and the solution is reviewed once a year.

[0072] To ensure the maintainability of long-distance pipelines throughout their entire lifecycle, it is recommended to establish a unified version management system encompassing "models + data + cases + documents": the model library is managed based on annual baselines plus bi-weekly patches; the database is stored hierarchically and compressed progressively; the case library is archived according to the before-and-after window of events; and the document library stores operation, change, and audit records. The system generates weekly operational health reports, undergoes quarterly third-party blind testing, and is reviewed and upgraded annually by the chief engineer's office, dynamically incorporating new processes and materials. For migration to different industries, those skilled in the art can adaptively adjust the parameters in the above embodiments according to the actual engineering scenario without creative effort, and this still falls within the protection scope of this invention.

[0073] In conclusion, through the three specific implementation examples (typical port scenario, extreme operating conditions, and failure recovery), it can be seen that the dynamic segmented long-distance pipeline damage risk prediction method and system provided by this invention can automatically identify operating sections along the pipeline mileage and construct a medium interaction corrosion cost tensor without relying on a fixed grid. Combined with PI-LSTM-Transformer hybrid spatiotemporal extrapolation and spatial extreme value penalty, it provides competitive corrosion depth increment prediction and mileage-level risk maps under typical operating conditions, medium switching, bend nodes, and extreme scheduling scenarios. At the same time, it has minute-level hypothesis analysis capabilities and stable failure recovery capabilities, and has scalable, deployable, and auditable engineering capabilities from single pipeline hundred-kilometer-level demonstration projects to thousand-kilometer-level cross-enterprise long-distance pipeline networks.

[0074] In summary, the embodiments of the present invention have the following advantages compared with the prior art: 1) Unlike existing technologies that rely solely on statistical clustering based on operating parameters, this invention proposes a two-stage fusion strategy of “gradient weighted clustering + forced insertion of gradient extreme points”. This strategy embeds corrosion mechanism knowledge into the clustering process in the form of gradient weights, ensuring that the segment boundaries can accurately reflect the spatial abrupt changes in corrosion rate. This significantly improves the physical interpretability of the segmentation results and the prediction accuracy for vulnerable parts such as bends and low points.

[0075] 2) By using a predefined batch cross-erosion cost tensor By injecting a forget gate into the PI-LSTM, the deep learning model internally acquires a mechanism to simulate the physical process of "damage-repair" of the passivation film, solving the problem of poor generalization ability of purely data-driven models for new batch combinations of operating conditions not seen in history. This tensor is provided by an external system, and this invention only protects its usage in the prediction model.

[0076] 3) It changes the existing practice of using a global fixed threshold, and dynamically links the threshold with the pipe section's pipe yield strength, design wall thickness and historical maximum damage. It automatically tightens the alarm threshold in weak sections, realizing risk management that is more localized and in line with the actual project.

[0077] 4) It proposes to quantify the time evolution rate of the segment boundary into a normalized SMVI index, so that the segmentation process is transformed from a passive data processing step into an active "sensor" for sensing the unstable state of the working condition, providing a quantifiable health assessment index for upstream and downstream systems.

[0078] Reference Figure 2 A corrosion damage-driven dynamic risk prediction system for long-distance pipelines, comprising: The first module 201 is used to collect operating condition data at several mileage points along the long-distance pipeline, perform dynamic segmentation of the long-distance pipeline driven by corrosion damage, and obtain segment feature vectors. The second module 202 is used to obtain a predefined batch interactive corrosion cost tensor, which is used to characterize the expected transient corrosion rate increment coefficient of the pipe wall passivation film when the transport medium switches from category i to category j. The third module 203 is used to generate a temporal context based on the segmented feature vectors, and combined with the batch interactive corrosion cost tensor, it is trained through a physical information long short time memory network to output the corrosion depth increment corresponding to each working condition segment. The fourth module 204 is used to stitch together the corrosion depth increments corresponding to each working condition section along the mileage direction of the long-distance pipeline to generate a dynamic damage risk map of the entire pipeline, and to judge it with the adaptive multi-level risk threshold to obtain the dynamic risk prediction result of the long-distance pipeline.

[0079] The content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0080] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this is not intended to limit the scope of the embodiments of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the embodiments of the present application.

Claims

1. A method for predicting dynamic risks of long-distance pipelines driven by corrosion damage, characterized in that, Includes the following steps: Data on operating conditions were collected at several mileage points along the long-distance pipeline. The pipeline was then dynamically segmented based on corrosion damage to obtain segment feature vectors. Obtain a predefined batch-interactive corrosion cost tensor, which is used to characterize the expected transient corrosion rate increment coefficient of the pipe wall passivation film when the transport medium switches from category i to category j; Based on segmented feature vectors, a temporal context is generated, and combined with the batch interactive corrosion cost tensor, it is trained through a physical information long short-term memory network to output the corrosion depth increment corresponding to each working condition segment. The corrosion depth increments corresponding to each working condition section are spliced ​​along the mileage direction of the long-distance pipeline to generate a dynamic damage risk map of the entire pipeline. The map is then compared with an adaptive multi-level risk threshold to obtain the dynamic risk prediction results of the long-distance pipeline.

2. The method for predicting dynamic risks of long-distance pipelines driven by corrosion damage according to claim 1, characterized in that, The step of collecting operating condition data at several mileage points along the long-distance pipeline, performing dynamic segmentation of the pipeline driven by corrosion damage, and obtaining segmented feature vectors specifically includes: The operating condition data are collected at several mileage points along the long-distance pipeline. The operating condition data includes medium physical property parameters, flow velocity, temperature, pressure and pipe material identification. The medium physical property parameters include sulfur content, water content, CO2 partial pressure and pH value. By employing a two-stage fusion strategy and combining operating data, the long-distance pipeline is dynamically segmented based on corrosion damage, dividing the pipeline into several operating segments and outputting a segmentation scheme. Based on the segmentation scheme, segmented feature vectors are constructed, which include pipe material characteristics, medium operating condition characteristics, and operation characteristics.

3. The method for predicting dynamic risks of long-distance pipelines driven by corrosion damage according to claim 2, characterized in that, The step of using a two-stage fusion strategy to dynamically segment long-distance pipelines based on corrosion damage driven by operating data, dynamically dividing the pipeline into several operating segments, and outputting a segmentation scheme, specifically includes: The basic corrosion damage gradient predicted based on the physical corrosion model is used as a weighting factor for the distance metric. Weighted clustering is performed on the working condition data to obtain the preliminary working condition cluster boundary. The basic corrosion damage gradient is the ratio of the difference in basic corrosion rate between adjacent mileage points to the mileage distance. A change point detection algorithm is used to detect abrupt change points at the maximum points of the basic corrosion damage gradient, and the abrupt change points are set as the forced segmentation boundary. Based on the BIC criterion, the preliminary operating condition clustering boundary and the forced segmentation boundary are fused and optimized to dynamically divide the long-distance pipeline into several operating condition segments and output the segmentation scheme.

4. The method for predicting dynamic risks of long-distance pipelines driven by corrosion damage according to claim 3, characterized in that, The batch-interactive corrosion cost tensor is obtained experimentally or determined empirically. The experimental method involves conducting a switching experiment from batch category i to batch category j in a high-pressure corrosion loop using actual pipe specimens from long-distance pipelines as the object, measuring the corrosion rate evolution function before and after the switching, and outputting the batch-interactive corrosion cost tensor.

5. The method for predicting dynamic risks of long-distance pipelines driven by corrosion damage according to claim 4, characterized in that, The step of generating temporal context based on segmented feature vectors, combining it with batch interactive erosion cost tensors, training it through a physical information long short-term memory network, and outputting the erosion depth increment corresponding to each working condition segment specifically includes: Based on segmented feature vectors, and with the preceding batch category code and switching time offset added as temporal context; The batch interaction corrosion cost tensor is injected as a gating tensor into the forget gate of the Physical Information Long Short-Term Memory (PI-LSTM) network. A Transformer multi-head attention module is connected to the output of the PI-LSTM to capture the coupling relationship of multiple environmental factors. Spatial extremum penalty term and physical residual constraint are introduced to train the temporal context and output the corrosion depth increment corresponding to each working condition segment.

6. The method for predicting dynamic risks of long-distance pipelines driven by corrosion damage according to claim 5, characterized in that, The step of stitching together the corrosion depth increments corresponding to each working condition section along the mileage direction of the long-distance pipeline to generate a dynamic damage risk map of the entire pipeline, and then judging it against an adaptive multi-level risk threshold to obtain the dynamic risk prediction result of the long-distance pipeline, specifically includes: Based on the segmented feature vector, combined with the yield strength of the segmented pipe, the design wall thickness and the historical maximum corrosion depth, an adaptive multi-level risk threshold is generated. The corrosion depth increments corresponding to each working condition section are spliced ​​along the mileage of the long-distance pipeline, and distance-weighted interpolation is performed at the segment boundary. Risk level color coding is combined with adaptive multi-level risk thresholds to generate a dynamic damage risk map of the entire pipeline. Calculate the segment migration speed index based on the dynamic damage risk map of the entire pipeline; When the segment migration speed index exceeds the preset threshold, the corresponding pipe segment is determined to be in an unstable operating state and a segment reassessment warning signal is issued, thus obtaining the dynamic risk prediction result of the long-distance pipeline.

7. The method for predicting dynamic risks of long-distance pipelines driven by corrosion damage according to claim 6, characterized in that, The segment migration speed index is the average rate of change of the boundary mileage positions of all segments in two adjacent dynamic segmentation results, normalized to the total pipeline length.

8. A corrosion damage-driven dynamic risk prediction system for long-distance pipelines, characterized in that, Includes the following modules: The first module is used to collect operating condition data at several mileage points along the long-distance pipeline, perform dynamic segmentation of the long-distance pipeline driven by corrosion damage, and obtain segment feature vectors. The second module is used to obtain a predefined batch-interactive corrosion cost tensor, which is used to characterize the expected transient corrosion rate increment coefficient of the pipe wall passivation film when the transport medium switches from category i to category j. The third module is used to generate temporal context based on segmented feature vectors, and combined with batch interactive corrosion cost tensor, it is trained through physical information long short time memory network to output corrosion depth increment corresponding to each working condition segment. The fourth module is used to stitch together the corrosion depth increments corresponding to each working condition section along the mileage direction of the long-distance pipeline to generate a dynamic damage risk map of the entire pipeline, and to judge it with the adaptive multi-level risk threshold to obtain the dynamic risk prediction result of the long-distance pipeline.