Method and system for predicting corrosion state of pipeline
By combining multimodal sensors and deep learning models, the corrosion status of pipelines can be monitored and predicted in real time, solving the problems of low corrosion monitoring accuracy and response lag under extreme working conditions, and realizing high-precision and rapid corrosion prediction and early warning.
Patent Information
- Application Number
- CN202511001088.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2025-10-28
AI Technical Summary
Under extreme working conditions such as high pressure, high temperature, and high flow rate, pipeline corrosion monitoring and life prediction have low accuracy and delayed response, and traditional detection methods are unable to detect corrosion problems in a timely manner.
Multimodal sensors are used to collect data, and empirical corrosion rate formulas and deep learning models are combined for preprocessing and prediction. Real-time data processing and multi-step corrosion rate prediction are achieved through an embedded system, integrating the "measurement-calculation-transmission-alarm" closed loop to improve prediction accuracy and response speed.
The accuracy and reliability of corrosion status prediction are improved, and the response delay is reduced from minutes to seconds, providing technical support for safe pipeline operation.
Smart Images

Figure CN120850779A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of corrosion monitoring and life prediction technology, and relates to, but is not limited to, a method and system for predicting the corrosion status of pipelines. Background Technology
[0002] Pipeline systems play a crucial role in transporting media in industries such as oil, gas, and chemicals. Their operating environments often exhibit extreme characteristics such as high temperature, high pressure, and high flow rate, leading to the interaction of multiple complex corrosion mechanisms and accelerating the failure risk of pipeline materials. According to the Arrhenius equation, the corrosion reaction rate increases significantly under high temperature conditions, and the metal-media interface reaction becomes more active, promoting the dissolution of the passivation film and increasing the corrosion rate of the matrix. Simultaneously, high temperature may also trigger alloy phase transformation and microstructure evolution, further weakening the material's corrosion resistance. High pressure conditions can enhance the solubility of corrosive gases such as CO2 and H2S, thus creating a more intense acidic corrosion environment within closed pipelines. Pressure fluctuations can also induce additional mechanical stress, superimposed with electrochemical corrosion effects, accelerating material failure. Furthermore, the wall shear stress of high-flow-rate media easily strips away the in-situ passivation film, further increasing the corrosion rate and forming a flow-accelerated corrosion (FAC) mechanism, particularly prominent in ultrapure water or wet steam environments, which has already led to numerous nuclear power plant and chemical pipeline network leaks. Stress corrosion cracking (SCC) occurs when microcracks rapidly propagate and cause sudden failure under the combined action of tensile stress and a specific chemical environment (such as chloride ions or alkaline media), making it difficult to detect in a timely manner using conventional detection methods. Summary of the Invention
[0003] In view of this, embodiments of this application provide a method and system for predicting the corrosion status of pipelines, which at least solves the problems of low accuracy and delayed response in pipeline corrosion monitoring and life prediction under extreme conditions such as high pressure, high temperature, and high flow rate.
[0004] The technical solution of this application embodiment is implemented as follows: In a first aspect, embodiments of this application provide a method for predicting the corrosion state of a pipeline, applied to a corrosion state prediction system, the corrosion state prediction system including an embedded system and a multimodal sensor, the method comprising: The embedded system acquires first pipeline corrosion-related data collected by the multimodal sensor under extreme corrosive conditions at the current moment. The first pipeline corrosion-related data includes a first temperature, a first pressure, a first flow rate, and a first service time of the pipeline at the current moment. The embedded system acquires a first prior corrosion rate calculated based on an empirical formula for corrosion rate using the first temperature and the first service time. The embedded system preprocesses the first pipeline corrosion-related data and the first prior corrosion rate to obtain first time series data. The embedded system inputs the first time series data into a trained deep learning model to obtain the future multi-step corrosion rate prediction results output by the trained deep learning model.
[0005] Secondly, embodiments of this application provide a pipeline corrosion state prediction system, comprising: an embedded system configured to acquire first pipeline corrosion-related data under extreme corrosion conditions collected by a multimodal sensor at the current moment, the first pipeline corrosion-related data including a first temperature, a first pressure, a first flow rate, and a first service time of the pipeline at the current moment; the embedded system configured to acquire a first prior corrosion rate calculated based on an empirical formula for corrosion rate using the first temperature and the first service time; the embedded system configured to preprocess the first pipeline corrosion-related data and the first prior corrosion rate to obtain first time series data; and the embedded system configured to input the first time series data into a trained deep learning model to obtain a future multi-step corrosion rate prediction result output by the trained deep learning model.
[0006] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the program to implement the steps in the above-described method.
[0007] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method.
[0008] The beneficial effects of the technical solutions provided in this application include at least the following: In this embodiment, multimodal sensors suitable for extreme corrosive environments collect pipeline corrosion-related data such as temperature, pressure, flow rate, and service time, covering the main driving factors of corrosion under extreme conditions and improving the data's ability to characterize the corrosion state. By inputting the prior corrosion rate calculated by the empirical formula of corrosion rate into the model together with the sensor data, the model is forced to learn physical laws, avoiding anti-physics predictions caused by pure data-driven approaches, and improving the accuracy, interpretability, and reliability of the prediction results. By preprocessing the data through an embedded system, it is ensured that the data input to the model is always the latest, high-quality real-time data with sufficient online capabilities. By acquiring and processing multimodal data in real time through the embedded system and inputting it into the model, the future multi-step prediction results are directly output without uploading to the cloud for calculation, reducing the response latency from "minutes" to "seconds", resulting in a more timely response. This embodiment integrates multimodal sensor acquisition, data preprocessing, lightweight model inference, and local early warning functions in situ into an intelligent unit adjacent to the pipeline, realizing a "measurement-calculation-transmission-alarm" closed loop: the node end completes the extraction of temperature, pressure, flow rate, and electrochemical signals and multi-step corrosion rate prediction within seconds. It effectively solves the problems of low accuracy and strong lag in traditional monitoring methods under complex working conditions, and provides a solution that combines technological advancement and engineering practicality for safe pipeline operation. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein: Figure 1 A schematic flowchart illustrating a method for predicting the corrosion state of a pipeline provided in an embodiment of this application; Figure 2 A schematic diagram of the structure of a pipeline corrosion state prediction system provided in an embodiment of this application; Figure 3 A schematic diagram of an LSTM-Transformer hybrid architecture provided in this application embodiment; Figure 4 This is a performance diagram of a deep learning model provided in an embodiment of this application; Figure 5 A cross-sectional view of a three-electrode corrosion monitoring probe provided in an embodiment of this application; Figure 6 A schematic diagram of another pipeline corrosion state prediction system provided in this application embodiment; Figure 7 This application provides a schematic diagram of the monitoring process of an intelligent monitoring system. Figure 8 This is a schematic diagram of the hardware entity of an electronic device provided in an embodiment of this application.
[0010] Figure label: Flow rate monitoring probe; 2-Temperature monitoring probe; 3-Three-electrode corrosion monitoring probe; 4-Flange; 5-Electrochemical workstation; 6-Embedded system; 7-5G transmission module; 8-Cloud receiving system; 9-Explosion-proof box; 10-Shielding box; 11-Counter electrode; 12-Probe cap; 13-Double-ended stud; 14-Waterproof connector; 15-Working electrode; 16-Reference electrode; 17-Insulating mounting base. Detailed Implementation
[0011] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0012] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0013] It should be noted that the terms "first, second, and third" used in the embodiments of this application are merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, and third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0014] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of this application pertain. It should also be understood that terms such as those defined in general dictionaries should be understood to have a meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0015] This application provides a method for predicting the corrosion state of pipelines, applied to electronic devices. These electronic devices include, but are not limited to, mobile phones, laptops, tablets, handheld internet devices, multimedia devices, streaming media devices, mobile internet devices, wearable devices, or other types of electronic devices. The functions implemented by this method can be achieved by a processor in the electronic device calling program code. The program code can be stored in a computer storage medium; therefore, the electronic device includes at least a processor and a storage medium. The processor can be used to process the pipeline corrosion state prediction process, and the memory can be used to store the data required and generated during the pipeline corrosion state prediction process.
[0016] Figure 1 This is a flowchart illustrating a method for predicting the corrosion state of a pipeline, provided in an embodiment of this application. The method is applied to a corrosion state prediction system, which includes an embedded system and a multimodal sensor, such as... Figure 1 As shown, the method includes at least the following steps: Step S110: The embedded system acquires the first pipeline corrosion-related data collected by the multimodal sensor under extreme corrosive conditions at the current moment. The first pipeline corrosion-related data includes the first temperature, the first pressure, the first flow rate, and the first service time of the pipeline at the current moment.
[0017] Here, the integrated hardware carrier of the corrosion state prediction system can be an intelligent sensing unit adjacent to the pipeline. This intelligent sensing unit, also known as an intelligent unit, integrates multimodal sensors with an embedded system to form an independently operating closed-loop unit. The multimodal sensors, also called multimodal sensing nodes or sensor nodes, are used to collect first-level pipeline corrosion-related data under extreme corrosion environments. Extreme corrosion environments can be those where environmental parameters exceed normal ranges, such as the temperature of the medium inside the pipeline exceeding normal temperature range, the medium being highly corrosive media such as strong acids, strong alkalis, or high-concentration salt solutions, or the pipeline being under extreme pressure or subjected to high-speed fluid erosion. The pipeline corrosion-related data can include direct corrosion parameters such as corrosion rate, corrosion potential, and polarization resistance, as well as indirect environmental parameters affecting the corrosion rate, such as temperature, pressure, flow rate, pipeline service time, and medium composition. Figure 2 As shown, the multimodal sensor includes a flow rate monitoring probe (1) suitable for high temperature and high pressure environments and a temperature monitoring probe (2) suitable for high temperature and high pressure environments.
[0018] The flow velocity monitoring probe (1) is used to collect the first flow velocity. The flow velocity monitoring probe (1) consists of a pair of ultrasonic transducers (one as a transmitter and one as a receiver) fixed to the outer wall of the pipe by a special clamp. During installation, there is no need to open a hole or interrupt the flow in the pipe. A high-temperature resistant acoustic coupling agent is applied between the transducer and the pipe wall to ensure that the ultrasonic signal can effectively penetrate the pipe wall and enter the fluid. Its working principle is based on accurately calculating the average flow velocity of the medium in the pipe by measuring the time difference between the propagation of ultrasonic waves in the forward and reverse directions. This non-invasive measurement method is a major advantage of this system. It does not damage the structural integrity of the pipe at all, fundamentally eliminating the potential leakage risk and stress concentration problem introduced by opening a hole. It is especially suitable for high-temperature and high-pressure critical pipelines, and the installation and maintenance are extremely convenient without affecting the normal operation of the pipeline.
[0019] The temperature monitoring probe (2), also known as the pressure and temperature integrated monitoring probe or pressure and temperature monitoring probe, is used to collect the first temperature and the first pressure. The pressure sensor and the temperature sensor are integrated into a temperature monitoring probe (2). The temperature measuring end of the temperature monitoring probe (2) includes a thermocouple that extends into the pipe to directly and sensitively sense the fluid temperature. The pressure measuring end is provided with a robust and corrosion-resistant metal isolation plate and a heat dissipation structure that is connected to the pressure sensing chip through a capillary tube filled with silicone oil. The diaphragm (i.e., the metal isolation plate) directly senses the fluid pressure, and then the pressure is transmitted to the pressure sensing chip at the back end through a capillary heat dissipation structure filled with silicone oil. This design cleverly uses the heat dissipation structure to physically isolate the high-temperature medium from the core sensing element, ensuring that the pressure sensor can still work normally even in extreme temperature environments, thereby ensuring the stability and reliability of long-term measurement. The data collected by the temperature monitoring probe (2) is transmitted to the embedded system via wires to provide data for subsequent predictions; the design of the pressure measurement part fully considers the challenges of high-temperature working conditions, realizes the simultaneous monitoring of pressure and temperature in the pipeline, and can work stably in high-temperature and high-pressure environments; the temperature monitoring probe (2) integrates the two measurement functions of pressure and temperature into one monitoring probe, thereby reducing the number of openings in the pipeline, reducing the complexity of the system and potential failure points.
[0020] When a pipeline is put into use, the commissioning time can be recorded manually or automatically by a corrosion monitoring system. The embedded system calculates the cumulative service time (i.e., the first service time) by the difference between the current time and the commissioning time.
[0021] In step S120, the embedded system obtains a first prior corrosion rate calculated based on an empirical formula for corrosion rate using the first temperature and the first service time.
[0022] Here, as Figure 2As shown, the embedded system (6) is connected to the multimodal sensor. The corrosion rate empirical formula is also known as the physical prior empirical formula. The corrosion rate empirical formula can be generated based on the Arrhenius equation. The corrosion rate empirical formula provides physical constraints on the corrosion mechanism, improves the interpretability of the deep learning model, and can directly encode the physicochemical mechanism of the corrosion process (such as the accelerating effect of temperature on the corrosion rate) into the deep learning model, avoiding the deep learning model from deviating from the actual physical law by relying solely on data-driven approaches. By introducing formulas related to physical quantities such as temperature and service time, the deep learning model has a clear physical meaning. For example, the trend of the corrosion rate increasing exponentially with increasing temperature conforms to the principle of chemical kinetics, which is convenient for understanding and verifying the prediction logic. The corrosion rate empirical formula can be expressed by the following formula (1): Formula (1); Where R(T,t) represents the first a priori corrosion rate, R represents the ideal gas constant, T represents the first temperature of the pipeline, t represents the first service time, Ea represents the activation energy, e represents the base of the natural logarithm, n represents the reaction order, and A, B, C, and D represent preset parameters.
[0023] In step S130, the embedded system preprocesses the first pipeline corrosion-related data and the first prior corrosion rate to obtain first time series data.
[0024] Here, preprocessing is used to optimize data quality. The preprocessing process includes techniques such as data cleaning, time alignment, normalization, and standardization. The embedded system is used to preprocess the collected data.
[0025] In step S140, the embedded system inputs the first time series data into the trained deep learning model to obtain the future multi-step corrosion rate prediction result output by the trained deep learning model.
[0026] Here, the calculation result of the empirical corrosion rate formula (the first prior corrosion rate) is used as one of the input features of the deep learning model. Together with the first pipeline corrosion-related data from other multimodal sensors, it constitutes the first time series, which is input into the trained deep learning model. At this point, the physical mechanism of the empirical corrosion rate formula indirectly constrains the output of the trained deep learning model through the input data, preventing the deep learning model from deviating from basic physical laws. The embedded system is used to predict the corrosion rate of the pipeline in multiple future steps using the trained deep learning model. The predicted corrosion rate in these multiple future steps is the corrosion rate predicted by the deep learning model for multiple future time points. Each time step corresponds to a time interval, which can be in "days," "hours," or "months." Using "days" as the unit, the output of the trained deep learning model can be: Day 1: Corrosion rate 0.11 mm / year; Day 2: Corrosion rate 0.13 mm / year; Day 3: Corrosion rate 0.15 mm / year. / year, this set of "0.11, 0.13, 0.15" is the "corrosion rate prediction result for the next 3 steps", which helps maintenance personnel to judge the accelerating trend of pipeline corrosion in advance and decide whether maintenance is needed.
[0027] In the above embodiments, multimodal sensors applicable to extreme corrosive environments collect pipeline corrosion-related data such as temperature, pressure, flow rate, and service time, covering the main driving factors of corrosion under extreme conditions and improving the data's ability to characterize the corrosion state. By inputting the prior corrosion rate calculated by the empirical formula of corrosion rate into the model together with the sensor data, the model is forced to learn physical laws, avoiding anti-physical predictions caused by pure data-driven approaches, and improving the accuracy, interpretability, and reliability of the prediction results. By preprocessing the data through an embedded system, it is ensured that the data input to the model is always the latest, high-quality real-time data with sufficient online capabilities. By acquiring and processing multimodal data in real time through the embedded system and inputting it into the model, the future multi-step prediction results are directly output without uploading to the cloud for calculation, reducing the response latency from "minutes" to "seconds", resulting in a more timely response. In this embodiment, multimodal sensor acquisition, data preprocessing, lightweight model inference, and local early warning functions are integrated in situ into an intelligent unit adjacent to the pipeline, realizing a "measurement-calculation-transmission-alarm" closed loop: the node end completes the extraction of temperature, pressure, flow rate, and electrochemical signals and multi-step corrosion rate prediction within seconds. It effectively solves the problems of low accuracy and strong lag in traditional monitoring methods under complex working conditions, and provides a solution that combines technological advancement and engineering practicality for safe pipeline operation.
[0028] In some embodiments, the method includes the following steps: Step S150: The embedded system acquires the material parameters and geometric design parameters of the pipe; Here, the embedded system (6) can also be equipped with a life prediction module to predict the remaining life of the pipeline, thereby realizing health monitoring of the pipeline. The material parameters can be the essential attributes that determine the corrosion resistance of the pipeline, such as the yield strength of the material. The geometric design parameters can be the morphological characteristics that affect the corrosion distribution and structural bearing capacity, such as nominal diameter, outer diameter, wall thickness, pipeline length, elbow, tee, welding process, inner wall roughness, etc.
[0029] Step S151: The embedded system predicts the lifespan of the pipeline based on the predicted future multi-step corrosion rate, the material parameters, and the geometric design parameters.
[0030] Here, the formula for predicting the remaining life of the pipeline can be shown in formula (2) below: Remaining life = (Initial wall thickness - Critical wall thickness) / Predicted corrosion rate formula (2); The predicted corrosion rate is the result of predicting the corrosion rate in the future multiple steps. The critical wall thickness can be determined by the yield strength of the material. It should be noted that if there are bends in the pipeline, the accelerated thinning of the local wall thickness by scouring corrosion needs to be considered in addition, and the predicted corrosion rate value (i.e., the predicted corrosion rate) needs to be corrected.
[0031] In the above embodiments, the corrosion state prediction system uses a physical prior deep learning model to predict the corrosion rate and predicts the remaining life of the pipeline based on the predicted corrosion rate. The physical prior formula combines the influence of temperature and service time on the corrosion rate, thereby more accurately predicting the remaining life of the pipeline.
[0032] In some embodiments, the trained deep learning model employs an LSTM-Transformer hybrid architecture that includes an LSTM network and a Transformer network. Step S140, "The embedded system inputs the first time series data into the trained deep learning model to obtain the future multi-step erosion rate prediction result output by the trained deep learning model," includes the following steps: In step S401, the embedded system maps the first time series data to a high-dimensional feature space and divides it into multiple time steps to obtain a first time subsequence of multiple time steps.
[0033] Here, as Figure 3 As shown, the first time series data can be represented as (X t-24 X t-23 ..., X t-2 X t-1 By dividing the first time series data by time steps, multiple first time subsequences X can be obtained. t-24 Xt-23 X t-22 ... X t-2 and X t-1 wait.
[0034] In step S402, the embedded system inputs the first time sub-sequence of each time step into an LSTM unit of the LSTM network, so that the corresponding LSTM unit generates the hidden state sequence of the corresponding time step through the control of the input gate, forget gate and output gate. The hidden state sequence is used to capture local temporal features.
[0035] Here, firstly, the first time-sequence after being divided by time step is fed into a multi-layer LSTM unit. The input (first time-sequence) of each time step is dynamically controlled by the input gate, forget gate, and output gate (control information retention / update / output) to generate the hidden state sequence h. t-24 h t-23 ... h t-2 and h t-1 It can efficiently capture local trends and periodic changes; LayerNorm + Dropout (layer normalization + random deactivation) is used to perform layer normalization (stabilize training and accelerate convergence) and random deactivation (suppress overfitting) on the output of LSTM units, preparing for subsequent Transformer networks.
[0036] In step S403, the embedded system concatenates the hidden state sequence of the last time step with each of the first time sub-sequences to obtain the first enhanced feature sequence corresponding to each of the first time sub-sequences.
[0037] In step S404, the embedded system adds positional encoding to each of the first enhanced feature sequences to obtain a corresponding second enhanced feature sequence; it performs a linear transformation on each of the second enhanced feature sequences using the Q / K / V weight matrix of each attention head in the multi-head self-attention layer of the Transformer network to obtain the query vector, key vector, and value vector of the feature at each position of the corresponding second enhanced feature sequence; based on the query vector, key vector, and value vector of the feature at each position of the second enhanced feature sequence of each attention head, it determines the global dependency between the features of the corresponding second enhanced feature sequences; and based on the global dependency between the features of each of the second enhanced feature sequences, it generates a third enhanced feature sequence. Here, the Q / K / V weight matrix is a trainable weight matrix used in the Transformer model to map the embeddings of input data to Q (Query), K (Key), and V (Value) vectors. The Q / K / V linear transformation refers to the operation of performing a linear transformation on the input vector through the Q / K / V weight matrix to generate query vectors, key vectors, and value vectors. Then, the hidden state of the LSTM unit at the last time step is concatenated with the original feature sequence to obtain the first enhanced feature sequence (supplementing temporal information). The first enhanced feature sequence is then fed into positional encoding (supplementing positional information) to obtain the second enhanced feature sequence, which is then input into the multi-head self-attention module. Each attention head calculates the weighted correlation through the Q / K / V linear transformation to achieve parallel extraction of global dependencies, thereby improving the model's ability to capture the overall features of the data.
[0038] Step S405: The embedded system performs deep feature transformation on each of the third enhanced feature sequences through the feedforward network, residual connection and layer normalization of the Transformer network to obtain the corresponding deep feature sequence. Here, deep feature transformation and stable training are then performed through a feed-forward network, residual connections, and layer normalization; the residual connections and layer normalization (Add & Norm) include residual connections and layer normalization (LayerNorm).
[0039] Step S406: The embedded system fuses each of the first enhanced feature sequences and the corresponding deep feature sequences through the fusion layer of the Transformer network to obtain the corresponding fused feature sequence; Here, the first enhanced feature sequence output by the LSTM network and the deep feature sequence output by the Transformer network are ultimately integrated into a unified spatiotemporal representation (i.e., the fused feature sequence) in a fusion layer (which can use gated fusion or multi-head cross attention).
[0040] Step S407: The embedded system maps the fused feature sequence into a future multi-step corrosion rate prediction result through the fully connected layer of the Transformer network.
[0041] Here, after obtaining the fused feature sequence, the erosion rate at future time steps can be predicted step by step using a recursive prediction mechanism. Several fully connected layers are used to perform a fully connected operation on the feature vector output by the recursive prediction mechanism, mapping the high-dimensional feature vector to a low-dimensional output space to obtain the prediction target (i.e., the prediction result of the erosion rate at future multiple steps). The prediction result of the erosion rate at the next 25 steps can be expressed as P. t P t+1 ... P t+23 and P t+24 .
[0042] It should be noted that the LSTM-Transformer hybrid architecture can adopt an encoder-decoder hybrid architecture. The encoder part includes a spatial attention layer, a four-layer stacked bidirectional LSTM network, and a Transformer module, which is used to extract data features. The spatial attention layer adaptively captures the correlation between multivariate features and feeds them into the four-layer stacked bidirectional LSTM network to extract deep temporal dependency information. Then, it is connected to the Transformer module to further model the dependency relationship; steps S401 to S405 above can be executed. The decoder part includes a temporal attention mechanism and a gated LSTM unit, which is used to process sequence data and generate prediction results. This hybrid architecture helps to better handle time series data and capture complex relationships in the data. The temporal attention mechanism is used to extract key contextual information by weighting the historical encoding results, while the gated LSTM unit is used for dynamic state propagation to achieve multi-step prediction; steps S406 and S407 above can be executed.
[0043] Furthermore, during the implementation of this application, ablation experiments were conducted to compare the prediction performance of the deep learning model, such as... Figure 4 As shown in the figure, the experimental results are as follows. Figure 4 Part (a) demonstrates that, at different prediction step sizes, the LSTM-Transformer model exhibits a lower loss function value compared to using LSTM or Transformer models alone, proving the advantages of the LSTM-Transformer model in long-term series prediction. The coefficient of determination R0 2 The closer the value is to 1, the better the model fits the data. Figure 4 Part (b) shows that the LSTM-Transformer model has the smallest increase in mean absolute error (MAE) during the prediction step size increase, demonstrating strong prediction stability. Figure 4Part (c) further validates the advantages of the LSTM-Transformer model in terms of root mean square error (RMSE), showing a more stable error growth compared to other models, demonstrating its high accuracy in corrosion rate prediction. By combining the temporal information extraction capabilities of LSTM with the global dependency modeling capabilities of Transformer, the LSTM-Transformer model can more accurately capture the temporal series changes of pipeline corrosion under extreme corrosive environments. This hybrid model provides superior performance compared to traditional models in predicting pipeline corrosion rates and remaining service life, offering more reliable technical support for pipeline health monitoring and maintenance.
[0044] In this embodiment, the deep learning model adopts a fusion architecture of LSTM and Transformer. The model adaptively captures the relationship between multi-dimensional features through spatial attention mechanism and temporal attention mechanism, thereby further improving the accuracy and reliability of prediction.
[0045] In the above embodiments, the model captures local temporal information by combining the temporal information extraction capability of LSTM and models global dependencies by leveraging the global dependency modeling capability of Transformer. A fusion layer complementarily combines the local temporal features extracted by LSTM and the global dependency features extracted by Transformer, avoiding information loss from a single feature source. This allows the model to capture both short-term fluctuations in corrosion rates and analyze long-term evolution trends. The LSTM-Transformer model can more accurately capture the temporal series changes of pipeline corrosion under extreme corrosive environments. This hybrid model provides superior performance compared to traditional models in predicting pipeline corrosion rates and remaining service life, offering more reliable technical support for pipeline health monitoring and maintenance.
[0046] The hybrid spatiotemporal dual-attention LSTM-Transformer model uses a spatial attention layer to capture local correlations between multi-parameter sensors, a four-layer bidirectional LSTM to extract short-term temporal dependencies, and a Transformer module to model global long-term dependencies. The decoder fuses the temporal attention context with the LSTM hidden states, generating high-precision multi-step predictions through a gating structure and feature fusion layer. This significantly improves the model's prediction accuracy, real-time performance, and anti-interference capabilities, providing technical support for online monitoring and proactive maintenance of pipeline corrosion.
[0047] In some embodiments, such as Figure 2 As shown, the corrosion state prediction system further includes a cloud receiving system (8), and the method further includes the following steps: The embedded system performs the following steps for each of the second pipeline corrosion-related data corresponding to the multimodal sensor: Step S101: The embedded system acquires second pipeline corrosion-related data collected by the multimodal sensor under extreme corrosive conditions at historical moments. The second pipeline corrosion-related data includes second temperature, second pressure, second flow rate and electrochemical signal, as well as the second service time of the pipeline at the historical moment. The electrochemical signal is used to calculate the linear polarization resistance and the corresponding historical measured corrosion rate. Here, as Figure 5 As shown, the multimodal sensor also includes a three-electrode corrosion monitoring probe (3) adapted to high temperature and high pressure environments. The three-electrode corrosion monitoring probe (3) is designed to be installed in the pipeline, with its sensing end directly contacting the corrosive medium inside the pipeline. It is used to measure the corrosion rate of the pipeline. The three-electrode corrosion monitoring probe (3) includes: a counter electrode (11), a probe cap (12), a double-ended stud (13), a waterproof connector (14), a working electrode (15), a reference electrode (16), and an insulating fixing base (17). The double-ended stud (13) and the waterproof connector (14) constitute a sealed structure. The probe cap (12), which serves as the overall outer shell, is made of high-pressure resistant and corrosion-resistant 316L stainless steel, serving to seal and protect the internal components. At the sensing end of the probe (3), i.e., the end in contact with the medium inside the pipe, a counter electrode (11) and a working electrode (15) are provided. The counter electrode (11) is a chemically stable and highly conductive platinum sheet electrode used to conduct current in electrochemical measurements, forming a complete measurement circuit. The working electrode (15) is made of the same material as the monitored pipe body, ensuring that its corrosion behavior accurately represents the corrosion state of the pipe. This working electrode is designed as a replaceable structure to adapt to the monitoring needs of pipes made of different materials. Inside the probe cap, a slender rod-shaped reference electrode (16) is provided. This reference electrode is a high-temperature and high-pressure resistant saturated calomel electrode, used to provide a stable and constant potential reference point during measurement. The potential changes of the working electrode (15) are all measured relative to this reference electrode. The sensing end of the reference electrode (16) is as close as possible to the inside of the working electrode (15) to reduce the measurement error caused by the ohmic voltage drop. An insulating fixing seat (17) is used to isolate and mechanically fix the working electrode (15) and the counter electrode (11). The insulating fixing seat (17) is made of high-temperature and corrosion-resistant insulating material polytetrafluoroethylene, and its end face is flush with the end faces of the two electrodes to avoid disturbing the fluid state. These materials and structural designs enable it to adapt to extreme corrosive environments and accurately measure corrosion-related parameters. At the tail of the probe, a sealing structure is provided. The double-ended stud (13) and the waterproof connector (14) work together to seal and fix the wires led out from the three-electrode system. The waterproof connector ensures that the internal sealing ring tightly wraps the wires when tightened, thus preventing external moisture and dust from entering the probe. It can also withstand the high pressure inside the pipeline, preventing the medium from leaking from the probe tail. This three-electrode integrated probe design is compact, robust, and accurate, fully meeting the needs of in-situ corrosion monitoring under extreme conditions such as high pressure, high temperature, and high flow rate. During operation, the lead wires of the working electrode (15), counter electrode (11), and reference electrode (16) are connected to the electrochemical workstation (5). By applying a small potential disturbance and measuring the corresponding current response (i.e., the linear polarization resistance method), the linear polarization resistance of the working electrode (15) can be calculated by the embedded system (6) according to the Stern-Geary equation, and finally the real-time corrosion rate (i.e., the historical measured corrosion rate) can be calculated.
[0048] It should be noted that, as Figure 2As shown, the multimodal sensor also includes flanges (4) installed between the flow rate monitoring probe (1) and the pipe, between the temperature monitoring probe (2) and the pipe, and between the three-electrode corrosion monitoring probe (3) and the pipe. The flanges (4) are used to fix the corresponding monitoring probes on the pipe to ensure that the probes remain stable during monitoring. It should be noted that motors, transformers, wireless signals, etc. in industrial sites will generate strong electromagnetic radiation. There may be dust, liquid splashes, mechanical vibrations or corrosive media (such as strong acid and strong alkali gases) around the pipe. Direct exposure will lead to corrosion of the probe surface, poor contact or mechanical damage. The signals collected by the probes (such as temperature, pressure, flow rate sensors and electrochemical three-electrode systems) are mostly weak electrical signals (such as electrochemical impedance, linear polarization resistance, etc.). In order to avoid environmental interference, each probe can be placed in a shielded box (10) to ensure the accuracy of data acquisition and ensure that the probes work stably for a long time in harsh environments.
[0049] Here, similar to collecting corrosion-related data for the first pipeline, the multimodal sensor can also be used to collect corrosion-related data for the second pipeline under extreme corrosive environments. Temperature, pressure, and flow rate sensors specifically designed for high-temperature and high-pressure environments are selected, and a three-electrode electrochemical measurement system is constructed to provide a reliable data foundation for corrosion monitoring and life prediction under extreme environments.
[0050] Step S102, the embedded system obtains a second prior corrosion rate calculated based on the empirical formula for corrosion rate of the second temperature and the second service time; Here, similar to the calculation of the first a priori corrosion rate, the second a priori corrosion rate can be calculated by the empirical formula of corrosion rate shown in the following formula (1), where R(T, t) represents the second a priori corrosion rate, R represents the ideal gas constant, T represents the second temperature of the pipeline, t represents the second service time, Ea represents the activation energy, e represents the base of the natural logarithm, n represents the reaction order, and A, B, C, and D represent preset parameters.
[0051] Formula (1); Step S103: The embedded system preprocesses the second pipeline corrosion-related data and the second prior corrosion rate to obtain second time series data; the embedded system sends the second time series data and the corresponding historical measured corrosion rate to the cloud receiving system. Here, the preprocessing process for the second pipeline corrosion-related data and the second a priori corrosion rate is similar to the preprocessing process for the first pipeline corrosion-related data and the first a priori corrosion rate, and will not be repeated here.
[0052] Step S104: The cloud receiving system inputs the second time series data into the initial deep learning model to obtain the current corrosion rate prediction result output by the initial deep learning model; Step S105: The cloud receiving system calculates the physical residual based on the current corrosion rate prediction result and the second prior corrosion rate; calculates the prediction error based on the current corrosion rate prediction result and the historical measured corrosion rate; and calculates the loss function value of the initial deep learning model by weighting the physical residual and the prediction error based on the first preset weighting coefficient corresponding to the physical residual and the second preset weighting coefficient corresponding to the prediction error. Here, a Physics-Informed Neural Network (PINN) can be introduced on top of the hybrid LSTM–Transformer architecture. An additional constraint term based on corrosion-related physical information is added to the model's loss function. The Arrhenius equation, combined with empirical formulas, is encoded as a physical residual, which is then weighted and combined with the data-driven prediction error to form the total loss. The physical residual is calculated and backpropagated each time the model's parameters are updated, ensuring that the model output conforms to the corrosion mechanism. This approach not only effectively utilizes experimental data but also prevents overfitting in small samples or boundary conditions, ultimately resulting in a corrosion lifetime prediction model that combines data-driven flexibility with physical interpretability. Furthermore, by incorporating corrosion-related physical information into the model's training process, the physical consistency and generalization ability of corrosion lifetime prediction can be further improved, enhancing the model's accuracy and reliability.
[0053] Step S106: The cloud receiving system adjusts the parameters of the initial deep learning model based on the loss function value; In step S107, the cloud receiving system repeats the above steps of inputting the second time series data into the initial deep learning model, calculating the loss function value, and adjusting the parameters until the loss function value meets the first preset condition, thereby obtaining the trained deep learning model.
[0054] Here, the first preset condition can be that the loss function value is less than a pre-set fixed threshold, or that the loss function no longer decreases significantly. The deep learning model, also known as the deep learning lifetime prediction model, is used for predicting the corrosion lifetime of pipelines under extreme corrosive environments. Specifically, it uses data collected by multimodal sensor nodes and employs a physical prior-enhanced deep learning model to predict corrosion lifetime. Temperature, service time, corrosion rate obtained from empirical formulas, and historical measured corrosion rate data are used as raw input data to construct a deep learning lifetime prediction model. The prediction model integrates a spatiotemporal dual attention mechanism with physical prior formulas to form an LSTM-Transformer model. The overall structure adopts an encoder-decoder hybrid architecture, specifically including the following steps: The input data includes time-series data (temperature, pressure, flow rate, and actual measured corrosion rate) collected by multimodal sensors and prior corrosion rates calculated based on empirical formulas for corrosion rates based on temperature and time. The prior values are input into the model along with the original sensor features. The encoder part adaptively captures the correlation between multivariate features through a spatial attention layer and feeds them into a four-layer stacked bidirectional LSTM. The network extracts deep temporal dependency information, and then connects to the Transformer module to further model the dependency relationship; the decoder uses a temporal attention mechanism to extract key context information by weighting the historical encoding results, and uses a gated LSTM unit to perform dynamic state propagation to achieve multi-step prediction.
[0055] In the above embodiments, during the model training process, physical prior features based on the Arrhenius formula and dynamic hidden state initialization strategy are introduced, which not only improves the model's ability to generalize to complex mechanisms such as extreme high temperature, high pressure, and high flow rate, but also enhances the physical consistency and interpretability of the prediction, and significantly reduces the error of long-term reliance on feature capture and multi-step prediction.
[0056] In some embodiments, such as Figure 2 As shown, the corrosion state prediction system also includes an electrochemical workstation (5), and the method further includes: Step S1031: The electrochemical workstation performs electrochemical measurement on the electrochemical signal to obtain the measured electrochemical signal, and sends the measured electrochemical signal to the embedded system; Here, electrochemical measurement may include the application of electrochemical excitation signals based on electrochemical principles, the acquisition of electrochemical response signals, signal filtering and noise reduction, and the real-time calculation and conversion of electrochemical parameters.
[0057] The above step S103, "The embedded system preprocesses the second pipeline corrosion-related data and the second prior corrosion rate to obtain the second time series data," can be implemented through the following steps: Step S1032, the embedded system generates third pipeline corrosion-related data based on the measured electrochemical signal, the second temperature, the second pressure, the second flow rate, and the second service time; Step S1033: The embedded system performs data cleaning on the third pipeline corrosion-related data and the second prior corrosion rate; calculates the linear polarization resistance based on the electrochemical signal after data cleaning; automatically fits and analyzes the linear polarization resistance; and calculates the historical measured corrosion rate based on the fitting results. Here, data cleaning includes removing outliers, filling in missing values, and cleaning temperature, pressure, flow rate, and electrochemical signals. For linear polarization resistance data, automatic impedance data fitting and analysis are achieved.
[0058] Step S1034: The embedded system uses a resampling algorithm to time-align the third pipeline corrosion-related data and the second prior corrosion rate corresponding to each sensing unit after data cleaning, based on the sampling frequency of each sensing unit in the multimodal sensor. Here, time alignment includes using a resampling algorithm to unify the data time scale based on the sampling frequency of each sensor, ensuring time sequence consistency.
[0059] In step S1035, the embedded system normalizes and standardizes the third pipeline corrosion-related data and the second prior corrosion rate after data cleaning and time alignment to obtain the second time series data.
[0060] Here, normalization and standardization are used to normalize and standardize all features to eliminate differences in dimensions, so as to facilitate the unified deployment of model input and prediction algorithms.
[0061] In the above embodiments, during the data preprocessing stage, the system cleans the collected raw data, removes outliers, fills in missing values, and resamples the temperature, pressure, flow rate, and corrosion rate at a unified time scale to ensure the temporal consistency of the data from each sensor. All data undergoes normalization and standardization to eliminate the influence of different units of measurement, thus preparing the data for the input of the deep learning model. The embedded system simultaneously completes data cleaning, time alignment, and standardization to ensure that the data input to the model is always the latest, high-quality real-time data.
[0062] In some embodiments, such as Figure 2 As shown, the corrosion state prediction system also includes a 5G transmission module (7) and a cloud receiving system (8), and the method further includes the following steps: Step S161: The embedded system uploads the identifier, timestamp, first pipeline corrosion-related data, and future multi-step corrosion rate prediction results of the multimodal sensor to the cloud receiving system via the 5G transmission module through the MQTT-over-TLS protocol. The identifier of the multimodal sensor is also known as the node ID, and the 5G transmission module can be an NB-IoT module.
[0063] Step S162: When the corrosion rate predicted by the future multi-step corrosion rate prediction results meets the second preset condition, the cloud receiving system triggers a multi-level intelligent early warning mechanism.
[0064] Here, the second preset condition can be a corrosion rate greater than the critical value of the corrosion rate, an abnormal trend in the corrosion rate change, or the cumulative corrosion damage reaching the safety margin threshold. The cloud receiving system (8) is connected to the embedded system (6) through the 5G transmission module (7) to receive and store the prediction results and early warning information sent by the embedded system (6). After completing in-situ data acquisition and prediction, the embedded system (6) reports the node ID, timestamp, and multi-step prediction results to the cloud receiving system (8) through the 5G transmission module (7) via the MQTT-over-TLS protocol. When the corrosion rate changes abruptly, the system immediately triggers a multi-level intelligent early warning mechanism to promptly detect abnormal corrosion in the pipeline. This provides real-time early warning, enables early detection and intervention of pipeline corrosion risks, avoids potential catastrophic failures, and meets the high reliability requirements for the safety of critical pipelines.
[0065] In the above embodiments, the prediction results are encrypted and transmitted through the MQTT-over-TLS protocol. The cloud receives and updates the visualization interface in real time, and maintenance personnel can view the latest corrosion status at any time. When the embedded system detects a sudden change in the corrosion rate (such as exceeding the threshold of 20%), it immediately triggers an early warning locally and prioritizes reporting emergency data through NB-IoT. The cloud receives the data and pushes the alarm within seconds, which improves the response speed compared to the traditional "periodic summary and analysis".
[0066] It should be noted that, in order to prevent safety accidents in flammable and explosive environments, meet the stability requirements of complex working conditions, and ensure electromagnetic compatibility and signal stability, the electrochemical workstation (5), embedded system (6), and 5G transmission module (7) can be placed in an explosion-proof box (9). This ensures that the entire corrosion state prediction system can work reliably for a long time under extreme working conditions.
[0067] In some embodiments, the method further includes the following steps: Step S163: The cloud receiving system, according to the pipe segment location and pipe segment number associated with the multimodal sensor, groups and stores the multimodal sensor identifier, the timestamp, the first pipeline corrosion-related data, the first prior corrosion rate, and the future multi-step corrosion rate prediction results into the time series database. Step S164: The cloud receiving system generates a visualization interface based on the time series database, so that operation and maintenance personnel can perform at least one of the following operations in the visualization interface: filtering alarm level, filtering time interval, filtering corrosion mechanism type, map annotation, work order issuance, and exporting reports.
[0068] Here, the cloud receiving system can also provide data visualization functions. The cloud aggregation and visualization can be achieved by the system automatically classifying and storing data according to location and pipe segment number after the data is transmitted to the cloud platform, building a time series database and generating data visualization. Maintenance personnel can filter alarm levels, time intervals or mechanism types with one click through the web or mobile app, and export PDF / Excel reports. Map annotation and work order issuance are supported to ensure visualized supervision and decision-making of the pipeline health status from macro to micro.
[0069] In the above embodiments, through the cloud receiving system (8), the system can aggregate and visualize various types of pipeline data, enabling maintenance personnel to conduct real-time monitoring and decision-making. Users can filter and view data and generate reports through the Web or mobile App, ensuring comprehensive and intuitive supervision and management of pipeline health status from macro to micro levels.
[0070] In some embodiments, the visual interface includes: Overall network status overview: Displays node online rate and early warning distribution map, where node status is distinguished by different colors to distinguish online nodes and offline nodes; Corrosion risk heat map: Different colors are used to indicate sudden changes in corrosion rate; Pipe segment trend curve: Each curve corresponds to a single pipe segment, and the curves are superimposed with corrosion rate and environmental parameters; Warning Log: Records alarm events in chronological order. The alarm time includes alarm level, occurrence time and associated pipeline information.
[0071] Here, the visualization interface provided by the cloud receiving system (8) includes: a network-wide status overview (node online rate, early warning distribution map), single-point trend analysis (overlay of corrosion rate and environmental parameter curves), risk heat map (color-coded based on sudden changes in corrosion rate), and early warning logs, which allows users to intuitively understand the operating status and corrosion situation of the pipeline system. The visualization interface can provide functions such as a network-wide status overview, single-point trend analysis, and risk heat map.
[0072] In the above embodiments, the cloud receives core prediction results and early warning information, and realizes macro-monitoring and maintenance of pipeline life through visualization screens, risk heat maps, etc.; it significantly reduces communication bandwidth and node power consumption, and eliminates the bottleneck of large-scale raw data backhaul.
[0073] In some embodiments, the corrosion state prediction system further includes a cloud receiving system, and the method further includes the following steps: Step S165: The cloud receiving system acquires the actual measured corrosion rate within multiple time intervals corresponding to the time interval of each of the future multi-step corrosion rate prediction results; and stores each of the actual measured corrosion rates, along with the corresponding first pipeline corrosion-related data and the corresponding first prior corrosion rate, in the time series database. Step S166: The cloud receiving system selects representative samples that meet the third preset condition from the time series database. The representative samples include the target measured corrosion rate, target pipeline corrosion-related data, and target prior corrosion rate. Here, the first preset condition can be samples that effectively reflect the data distribution characteristics, cover key scenarios, and are representative of model updates, ensuring that the model can learn the latest corrosion patterns (such as corrosion characteristic shifts caused by environmental changes and equipment aging) during retraining. These representative samples can both cover the overall data distribution to maintain the model's generalization ability and focus on key scenarios (such as abnormal corrosion and weak points in the model) to achieve targeted optimization. Retraining the model using such samples ensures that the LSTM-Transformer model continuously adapts to changes in corrosion patterns over time, maintaining prediction accuracy.
[0074] Step S167: The cloud receiving system preprocesses the target pipeline corrosion-related data and the target prior corrosion rate to obtain target time series data; In step S168, the cloud receiving system adjusts the parameters of the trained deep learning model based on the target measured corrosion rate and the target time series data to obtain an updated deep learning model; the cloud receiving system sends the updated deep learning model to the embedded system.
[0075] Here, the cloud receiving system can provide periodic model update and management functions. The cloud receiving system periodically aggregates historical prediction data and actual results (stores historical prediction data and actual results together), automatically triggers the model retraining process every month or quarter, extracts representative samples from the database, performs data cleaning and feature resampling, completes the fine-tuning and verification of the LSTM-Transformer model, compares the metrics of the new version and the old version of the model, ensures the continuous optimization and performance improvement of the deep learning model, and continuously improves the prediction accuracy and adaptability of the model.
[0076] In the above embodiments, the system continuously adapts and upgrades with environmental changes through the OTA mechanism, ensuring high reliability and scalability. The cloud automatically fine-tunes the model with new data every month / quarter, such as retraining by extracting representative samples (e.g., corrosion data under extreme temperatures), which can improve the model's prediction accuracy and adaptability. By comparing the metrics of the new and old models (e.g., MAE, RMSE), the prediction accuracy is ensured to continuously improve with data accumulation, avoiding the problem of "accuracy decay after offline training" in traditional models.
[0077] Based on the foregoing embodiments, this application provides another embodiment of a pipeline corrosion state prediction system. The system includes various modules and units included in each module, which can be implemented by a processor in an electronic device; of course, it can also be implemented by specific logic circuits. In the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.
[0078] Figure 6 This is a schematic diagram of the composition structure of a pipeline corrosion state prediction system provided in an embodiment of this application, as shown below. Figure 6 As shown, the system 600 includes an embedded system 610 and a multimodal sensor 620, wherein: The embedded system 610 is used to acquire first pipeline corrosion-related data under extreme corrosive conditions collected by the multimodal sensor 620 at the current moment. The first pipeline corrosion-related data includes a first temperature, a first pressure, a first flow rate, and the first service time of the pipeline at the current moment. The embedded system 610 is used to obtain a first a priori corrosion rate calculated based on an empirical formula for corrosion rate based on the first temperature and the first service time. The embedded system 610 is used to preprocess the first pipeline corrosion-related data and the first prior corrosion rate to obtain first time series data; The embedded system 610 is used to input the first time series data into a trained deep learning model to obtain the future multi-step corrosion rate prediction result output by the trained deep learning model.
[0079] In some possible embodiments, the trained deep learning model employs an LSTM-Transformer hybrid architecture comprising an LSTM network and a Transformer network. Specifically, the embedded system 610 maps the first time-series data to a high-dimensional feature space and segments it by time steps to obtain multiple first time-series sub-sequences at various time steps. The embedded system inputs each first time-sequence sub-sequence at each time step into an LSTM unit of the LSTM network, so that the corresponding LSTM unit generates a hidden state sequence for the corresponding time step through the control of an input gate, a forget gate, and an output gate. The hidden state sequence is used to capture local temporal features. The embedded system concatenates the hidden state sequence of the last time step with each first time-sequence sub-sequence to obtain a first enhanced feature sequence corresponding to each first time-sequence sub-sequence. The embedded system adds positional encoding to each first enhanced feature sequence to obtain a corresponding second enhanced feature sequence. The Q / K / V values of each attention head in the multi-head self-attention layer of the Transformer network are then processed. The weight matrix performs a linear transformation on each of the second enhanced feature sequences to obtain the query vector, key vector, and value vector of the feature at each position of the corresponding second enhanced feature sequence. Based on the query vector, key vector, and value vector of the feature at each position of the second enhanced feature sequence of each attention head, the global dependency relationship between the features of the corresponding second enhanced feature sequences is determined. Based on the global dependency relationship between the features of each of the second enhanced feature sequences, a third enhanced feature sequence is generated. The embedded system performs a deep feature transformation on each of the third enhanced feature sequences through the feedforward network, residual connection, and layer normalization of the Transformer network to obtain the corresponding deep feature sequence. The embedded system fuses each of the first enhanced feature sequences and the corresponding deep feature sequences through the fusion layer of the Transformer network to obtain the corresponding fused feature sequence. The embedded system maps the fused feature sequence to the future multi-step erosion rate prediction result through the fully connected layer of the Transformer network.
[0080] In some possible embodiments, the system 600 further includes a cloud receiving system, and the embedded system 610 is specifically used to acquire second pipeline corrosion-related data under extreme corrosive conditions collected by the multimodal sensor at historical moments. The second pipeline corrosion-related data includes a second temperature, a second pressure, a second flow rate, and an electrochemical signal, as well as a second service time of the pipeline at the historical moment. The electrochemical signal is used to calculate the linear polarization resistance and the corresponding historical measured corrosion rate. A second prior corrosion rate is obtained based on an empirical formula for corrosion rate calculated using the second temperature and the second service time. The second pipeline corrosion-related data and the second prior corrosion rate are preprocessed to obtain second time-series data. The second time-series data and the corresponding historical measured corrosion rate are sent to the cloud receiving system. The cloud receiving system is specifically used to input the second time-series data. An initial deep learning model is established, and the current corrosion rate prediction result output by the initial deep learning model is obtained. The cloud receiving system calculates the physical residual based on the current corrosion rate prediction result and the second prior corrosion rate. Based on the current corrosion rate prediction result and the historical measured corrosion rate, the prediction error is calculated. Based on the first preset weighting coefficient corresponding to the physical residual and the second preset weighting coefficient corresponding to the prediction error, the physical residual and the prediction error are weighted and calculated to obtain the loss function value of the initial deep learning model. Based on the loss function value, the cloud receiving system adjusts the parameters of the initial deep learning model. The cloud receiving system repeats the above steps of inputting the second time series data into the initial deep learning model, calculating the loss function value and adjusting the parameters until the loss function value meets the first preset condition, thereby obtaining the trained deep learning model.
[0081] In some possible embodiments, the system 600 further includes an electrochemical workstation, specifically used to perform electrochemical measurements on the electrochemical signal to obtain a measured electrochemical signal, and to send the measured electrochemical signal to the embedded system; the embedded system 610 is specifically used to generate third pipeline corrosion-related data based on the measured electrochemical signal, the second temperature, the second pressure, the second flow rate, and the second service time; perform data cleaning on the third pipeline corrosion-related data and the second prior corrosion rate; calculate the linear polarization resistance based on the data-cleaned electrochemical signal, automatically fit and analyze the linear polarization resistance, and calculate the historical measured corrosion rate based on the fitting result; according to the sampling frequency of each sensing unit in the multimodal sensor, use a resampling algorithm to time-align the third pipeline corrosion-related data and the second prior corrosion rate corresponding to each sensing unit after data cleaning; the embedded system performs normalization and standardization processing on the data-cleaned and time-aligned third pipeline corrosion-related data and the second prior corrosion rate to obtain second time series data.
[0082] In some possible embodiments, the corrosion state prediction system further includes a 5G transmission module and a cloud receiving system. The embedded system is specifically used to upload the identifier, timestamp, first pipeline corrosion-related data, and future multi-step corrosion rate prediction results of the multimodal sensor to the cloud receiving system via the 5G transmission module through the MQTT-over-TLS protocol. The cloud receiving system is specifically used to trigger a multi-level intelligent early warning mechanism when the corrosion rate indicated by the future multi-step corrosion rate prediction results meets a second preset condition.
[0083] In some possible embodiments, the cloud receiving system is further configured to group and store the identifier of the multimodal sensor, the timestamp, the first pipeline corrosion-related data, the first prior corrosion rate, and the future multi-step corrosion rate prediction results into a time-series database according to the pipe segment location and pipe segment number associated with the identifier of the multimodal sensor; the cloud receiving system generates a visualization interface based on the time-series database, allowing maintenance personnel to perform at least one of the following operations in the visualization interface: filtering alarm levels, filtering time intervals, filtering corrosion mechanism types, map annotation, work order issuance, and report export.
[0084] In some possible embodiments, the visualization interface includes: a network status overview: displaying node online rate and early warning distribution map, wherein the node status is distinguished by different colors to differentiate between online and offline nodes; a corrosion risk heat map: marking corrosion rate abrupt changes with different colors; a pipe segment trend curve: each curve corresponds to a single pipe segment, and the curve is superimposed with corrosion rate and environmental parameters; and an early warning log: recording alarm events in chronological order, wherein the alarm time includes alarm level, occurrence time, and associated pipe segment information.
[0085] In some possible embodiments, the system further includes a cloud receiving system, which is specifically used to acquire the actual measured corrosion rate within multiple time intervals corresponding to the time interval of each of the predicted future multi-step corrosion rates; store each of the actual measured corrosion rates, along with corresponding first pipeline corrosion-related data and corresponding first prior corrosion rates, in the time series database; select representative samples that meet a third preset condition from the time series database, the representative samples including the target measured corrosion rate, target pipeline corrosion-related data, and target prior corrosion rate; preprocess the target pipeline corrosion-related data and the target prior corrosion rate to obtain target time series data; adjust the parameters of the trained deep learning model based on the target measured corrosion rate and the target time series data to obtain an updated deep learning model; and send the updated deep learning model to the embedded system 610.
[0086] In some possible embodiments, the embedded system 610 is further configured to acquire the material parameters and geometric design parameters of the pipeline; and to predict the lifespan of the pipeline based on the future multi-step corrosion rate prediction results, the material parameters, and the geometric design parameters.
[0087] like Figure 7As shown, this application provides an intelligent monitoring and life prediction system for extreme corrosive environments. This system, also known as a pipeline corrosion online monitoring and remaining life prediction system based on multimodal sensing and deep learning, or an intelligent monitoring and life prediction system, includes an intelligent monitoring system and a deep learning life prediction system. The intelligent monitoring system includes an environmental monitoring subsystem and a corrosion rate monitoring subsystem. The environmental monitoring subsystem monitors environmental factors such as temperature, pressure, and flow rate, while the corrosion rate monitoring subsystem monitors the corrosion rate of the pipeline. The environmental factors (temperature, pressure, flow rate, etc.), the measured corrosion rate, and the prior corrosion rate determined based on temperature and service time are input into the deep learning life prediction system. The prediction results of the deep learning life prediction system are transmitted to a remote monitoring and early warning system via a wireless communication module, enabling the system to immediately trigger a multi-level intelligent early warning mechanism. This achieves early detection and intervention of pipeline corrosion risks, avoids potential catastrophic failures, and meets the high reliability requirements for critical pipeline safety.
[0088] This application aims to address the problem of pipeline corrosion monitoring and life prediction under extreme conditions such as high pressure, high temperature, and high flow rate in related technologies. Existing monitoring and life prediction systems suffer from low accuracy, slow response, and insufficient online capability. This system collects various data, including temperature, pressure, flow rate, and electrochemical signals, through multiple sensor nodes. These sensors possess high accuracy and are particularly suitable for high-temperature and high-pressure environments, providing a reliable data foundation for subsequent data processing and life prediction.
[0089] It should be noted that the description of the above system embodiments is similar to the description of the above method embodiments, and has similar beneficial effects. For technical details not disclosed in the system embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0090] It should be noted that, in the embodiments of this application, if the above-mentioned pipeline corrosion state prediction method is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.
[0091] Correspondingly, embodiments of this application provide a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the steps in the corrosion state prediction method for pipelines described in any of the above embodiments. Correspondingly, embodiments of this application also provide a computer program product, which, when executed by a processor of an electronic device, is used to implement the steps in the corrosion state prediction method for pipelines described in any of the above embodiments.
[0092] Based on the same technical concept, this application provides an electronic device for implementing the pipeline corrosion state prediction method described in the above method embodiments. Figure 8 This is a schematic diagram of the hardware entity of an electronic device provided in an embodiment of this application, such as... Figure 8 As shown, the electronic device 800 includes a memory 810 and a processor 820. The memory 810 stores a computer program that can run on the processor 820. When the processor 820 executes the program, it implements the steps in the corrosion state prediction method for pipelines according to any of the embodiments of this application.
[0093] The memory 810 is configured to store instructions and applications executable by the processor 820, and can also cache data to be processed or already processed by the processor 820 and various modules in the electronic device (e.g., image data, audio data, voice communication data and video communication data), which can be implemented by flash memory or random access memory (RAM).
[0094] When processor 820 executes a program, it implements the steps of any of the above-mentioned methods for predicting the corrosion status of pipelines. Processor 820 typically controls the overall operation of electronic equipment 800.
[0095] The aforementioned processor can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that other electronic devices can also implement the functions of the aforementioned processor, and this application does not specifically limit the specific implementation.
[0096] The aforementioned computer storage media / memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc.; or it can be various electronic devices that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0097] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0098] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0099] It should be noted that, in this document, 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 a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0100] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0101] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units; some or all of the units may be selected to achieve the purpose of the embodiments of this application according to actual needs. In addition, each functional unit in the embodiments of this application may be fully integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the integrated unit may be implemented in hardware or in the form of hardware plus software functional units.
[0102] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause the device automatic test line to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0103] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined to obtain new method embodiments without conflict. The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined to obtain new method embodiments or device embodiments without conflict.
[0104] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for predicting the corrosion state of pipelines, characterized in that, The method, applied to a corrosion state prediction system, which includes an embedded system and a multimodal sensor, comprises: The embedded system acquires first pipeline corrosion-related data collected by the multimodal sensor under extreme corrosive conditions at the current moment. The first pipeline corrosion-related data includes a first temperature, a first pressure, a first flow rate, and the first service time of the pipeline at the current moment. The embedded system obtains a first prior corrosion rate calculated based on an empirical formula for corrosion rate using the first temperature and the first service time. The embedded system preprocesses the corrosion-related data of the first pipeline and the first prior corrosion rate to obtain first time series data. The embedded system inputs the first time series data into a trained deep learning model to obtain the future multi-step corrosion rate prediction results output by the trained deep learning model.
2. The method according to claim 1, characterized in that, The trained deep learning model employs an LSTM-Transformer hybrid architecture, incorporating both LSTM and Transformer networks. The embedded system inputs the first time-series data into the trained deep learning model to obtain the future multi-step erosion rate prediction results output by the trained deep learning model, including: The embedded system maps the first time series data to a high-dimensional feature space and divides it by time step to obtain a first time subsequence with multiple time steps. The embedded system inputs the first time subsequence of each time step into an LSTM unit of the LSTM network, so that the corresponding LSTM unit generates the hidden state sequence of the corresponding time step through the control of the input gate, forget gate and output gate. The hidden state sequence is used to capture local temporal features. The embedded system concatenates the hidden state sequence of the last time step with each of the first time sub-sequences to obtain the first enhanced feature sequence corresponding to each of the first time sub-sequences. The embedded system adds positional encoding to each of the first enhanced feature sequences to obtain a corresponding second enhanced feature sequence; it then performs a linear transformation on each of the second enhanced feature sequences using the Q / K / V weight matrices of each attention head in the multi-head self-attention layer of the Transformer network to obtain the query vector, key vector, and value vector of the feature at each position of the corresponding second enhanced feature sequence; based on the query vector, key vector, and value vector of the feature at each position of the second enhanced feature sequence of each attention head, it determines the global dependencies between the features of the corresponding second enhanced feature sequences; and based on the global dependencies between the features of each of the second enhanced feature sequences, it generates a third enhanced feature sequence. The embedded system performs deep feature transformation on each of the third enhanced feature sequences through the feedforward network, residual connection and layer normalization of the Transformer network to obtain the corresponding deep feature sequence. The embedded system fuses each of the first enhanced feature sequences and the corresponding deep feature sequences through the fusion layer of the Transformer network to obtain the corresponding fused feature sequence; The embedded system maps the fused feature sequence into a prediction result of future multi-step corrosion rate through the fully connected layer of the Transformer network.
3. The method according to claim 1, characterized in that, The corrosion state prediction system further includes a cloud receiving system, and the method further includes: The embedded system acquires second pipeline corrosion-related data collected by the multimodal sensor under extreme corrosive conditions at historical moments. The second pipeline corrosion-related data includes second temperature, second pressure, second flow rate, and electrochemical signal, as well as the second service time of the pipeline at the historical moment. The electrochemical signal is used to calculate the linear polarization resistance and the corresponding historical measured corrosion rate. The embedded system obtains a second prior corrosion rate calculated based on an empirical formula for corrosion rate using the second temperature and the second service time. The embedded system preprocesses the second pipeline corrosion-related data and the second prior corrosion rate to obtain second time series data; the embedded system sends the second time series data and the corresponding historical measured corrosion rate to the cloud receiving system. The cloud receiving system inputs the second time series data into the initial deep learning model to obtain the current corrosion rate prediction result output by the initial deep learning model; The cloud receiving system calculates the physical residual based on the current corrosion rate prediction result and the second prior corrosion rate; calculates the prediction error based on the current corrosion rate prediction result and the historical measured corrosion rate; and calculates the loss function value of the initial deep learning model by weighting the physical residual and the prediction error based on the first preset weighting coefficient corresponding to the physical residual and the second preset weighting coefficient corresponding to the prediction error. The cloud receiving system adjusts the parameters of the initial deep learning model based on the loss function value; The cloud receiving system repeats the steps described above: inputting the second time series data into the initial deep learning model, calculating the loss function value, and adjusting the parameters, until the loss function value meets the first preset condition, thereby obtaining the trained deep learning model.
4. The method according to claim 3, characterized in that, The corrosion state prediction system also includes an electrochemical workstation, and the method further includes: The electrochemical workstation performs electrochemical measurements on the electrochemical signal to obtain the measured electrochemical signal, and then sends the measured electrochemical signal to the embedded system. The embedded system preprocesses the second pipeline corrosion-related data and the second prior corrosion rate to obtain second time-series data, including: The embedded system generates third pipeline corrosion-related data based on the measured electrochemical signal, the second temperature, the second pressure, the second flow rate, and the second service time. The embedded system performs data cleaning on the third pipeline corrosion-related data and the second prior corrosion rate; calculates the linear polarization resistance based on the electrochemical signal after data cleaning, automatically fits and analyzes the linear polarization resistance, and calculates the historical measured corrosion rate based on the fitting results. The embedded system uses a resampling algorithm to time-align the third pipeline corrosion-related data and the second prior corrosion rate corresponding to each sensing unit after data cleaning, based on the sampling frequency of each sensing unit in the multimodal sensor. The embedded system normalizes and standardizes the third pipeline corrosion-related data and the second prior corrosion rate after data cleaning and time alignment to obtain the second time series data.
5. The method according to claim 1, characterized in that, The corrosion state prediction system further includes a 5G transmission module and a cloud receiving system, and the method further includes: The embedded system uploads the identifier, timestamp, first pipeline corrosion-related data, and future multi-step corrosion rate prediction results of the multimodal sensor to the cloud receiving system via the 5G transmission module through the MQTT-over-TLS protocol. When the predicted corrosion rate in the future multi-step corrosion rate indicates that the corrosion rate meets the second preset condition, the cloud receiving system triggers a multi-level intelligent early warning mechanism.
6. The method according to claim 5, characterized in that, The method further includes: The cloud receiving system groups and stores the multimodal sensor identifier, the timestamp, the first pipeline corrosion-related data, the first prior corrosion rate, and the future multi-step corrosion rate prediction results into a time-series database according to the pipe segment location and pipe segment number associated with the multimodal sensor identifier; The cloud-based receiving system generates a visual interface based on the time-series database, allowing maintenance personnel to perform at least one of the following operations: filtering alarm levels, filtering time intervals, filtering corrosion mechanism types, map annotation, issuing work orders, and exporting reports.
7. The method according to claim 6, characterized in that, The visualization interface includes: Overall network status overview: Displays node online rate and early warning distribution map, where node status is distinguished by different colors to distinguish online nodes and offline nodes; Corrosion risk heat map: Different colors are used to indicate sudden changes in corrosion rate; Pipe segment trend curve: Each curve corresponds to a single pipe segment, and the curves are superimposed with corrosion rate and environmental parameters; Warning Log: Records alarm events in chronological order. The alarm time includes alarm level, occurrence time and associated pipeline information.
8. The method according to claim 1, characterized in that, The corrosion state prediction system further includes a cloud receiving system, and the method further includes: The cloud receiving system acquires the actual measured corrosion rate within multiple time intervals, corresponding to the time interval of each of the future multi-step corrosion rate prediction results; and stores each of the actual measured corrosion rates, along with the corresponding first pipeline corrosion-related data and the corresponding first prior corrosion rate, in the time series database. The cloud receiving system selects representative samples that meet the third preset condition from the time series database. The representative samples include the target measured corrosion rate, target pipeline corrosion-related data, and target prior corrosion rate. The cloud-based receiving system preprocesses the target pipeline corrosion-related data and the target prior corrosion rate to obtain target time series data; The cloud receiving system adjusts the parameters of the trained deep learning model based on the target measured corrosion rate and the target time series data to obtain an updated deep learning model; the cloud receiving system then sends the updated deep learning model to the embedded system.
9. The method according to claim 1, characterized in that, The method further includes: The embedded system acquires the material parameters and geometric design parameters of the pipeline; The embedded system predicts the lifespan of the pipeline based on the predicted future multi-step corrosion rate, the material parameters, and the geometric design parameters.
10. A corrosion state prediction system for pipelines, characterized in that, The system includes: an embedded system and a multimodal sensor, wherein: The embedded system is used to acquire first pipeline corrosion-related data under extreme corrosive conditions collected by the multimodal sensor at the current moment. The first pipeline corrosion-related data includes a first temperature, a first pressure, a first flow rate, and a first service time of the pipeline at the current moment. The embedded system is used to obtain a first a priori corrosion rate calculated based on an empirical formula for corrosion rate based on the first temperature and the first service time. The embedded system is used to preprocess the first pipeline corrosion-related data and the first prior corrosion rate to obtain first time series data; The embedded system is used to input the first time series data into a trained deep learning model to obtain the future multi-step corrosion rate prediction results output by the trained deep learning model.