Pipeline corrosion risk early warning method, electronic equipment and storage medium

By deploying sensor arrays and pre-trained models on pipelines in refining and chemical plants, and combining them with the adaptive weighted gray wolf optimization algorithm, the accuracy and reliability issues of pipeline corrosion monitoring and early warning in existing technologies have been solved, achieving more accurate corrosion risk early warning.

CN122015019APending Publication Date: 2026-05-12CHINA UNIV OF PETROLEUM (BEIJING)
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA UNIV OF PETROLEUM (BEIJING)
Filing Date
2025-12-30
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In existing technologies, corrosion monitoring and early warning of pipelines in refining and chemical plants rely on manual detection and judgment based on preset static thresholds. This has problems such as strong subjectivity, limited coverage, unstable identification, and judgment bias, resulting in low accuracy and reliability of corrosion risk early warning results.

Method used

Corrosion monitoring data is acquired by deploying a sensor array on the target pipeline. After data preprocessing, the data is input into a pre-trained corrosion health status assessment model and a corrosion prediction model. The adaptive weighted gray wolf optimization algorithm is used to optimize hyperparameters. The safe operating period is calculated in combination with the current pipeline wall thickness, and multi-dimensional information fusion corrosion risk early warning information is generated.

Benefits of technology

It has improved the accuracy and reliability of pipeline corrosion risk assessment, reduced the risk of misjudgment and omission, enhanced the timeliness and reliability of early warning, and provided more continuous and forward-looking identification basis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122015019A_ABST
    Figure CN122015019A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a pipeline corrosion risk early warning method, electronic equipment and a storage medium. The method comprises the steps of obtaining corrosion monitoring data collected by a sensor array based on the sensor array deployed on a target pipeline, and performing data preprocessing on the corrosion monitoring data according to a preset data preprocessing rule to obtain corrosion characteristic data; according to the corrosion characteristic data, adopting a pre-trained corrosion health state evaluation model to obtain corrosion health state information; according to the corrosion characteristic data, adopting a pre-trained corrosion prediction model to obtain corrosion prediction information; according to the current pipeline wall thickness and the corrosion prediction information of the target pipeline, the safe operation period of the target pipeline is obtained through calculation; and according to the corrosion health state information, the corrosion prediction information and the safe operation period of the pipeline, obtaining and outputting corrosion risk early warning information of the target pipeline through an early warning judgment rule. The accuracy, reliability and timeliness of target pipeline corrosion risk early warning are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of petrochemical technology, and in particular to a pipeline corrosion risk early warning method, electronic equipment, and storage medium. Background Technology

[0002] In oil refining and chemical production processes, the feed and discharge pipelines of refining and chemical plants serve as material transport paths, and their operational status directly affects the continuous and stable operation of the plant and the safety of the equipment. With the continuous expansion of plant scale and the increase in process complexity, the working conditions endured by pipelines become increasingly harsh, especially in environments with high temperature, high pressure, and highly corrosive media containing sulfur or chlorine, where pipelines are prone to corrosion damage. Corrosion not only causes thinning of the pipe walls and a decrease in pressure-bearing capacity, but can also lead to leaks, production interruptions, and even major accidents. Therefore, monitoring and accurate early warning of pipeline corrosion are crucial to ensuring the safe and stable operation of the plant.

[0003] Currently, the monitoring and early warning of pipeline corrosion in refining and chemical plants mainly relies on manual inspection combined with empirical rules for judgment. Common inspection methods include regular on-site inspections, using ultrasonic thickness gauges to collect wall thickness data at key pipeline locations, or obtaining corrosion rate indicators under the medium environment through corrosion probes, linear polarization probes, etc. These physical inspection methods form the raw data basis for corrosion analysis. In the early warning judgment process, a static threshold comparison method is commonly used, which compares the measured wall thickness value with a set minimum safe wall thickness. When the data is lower than the threshold, an early warning signal is triggered. Furthermore, factors such as service life and medium type may be combined with manual empirical weighting to complete the preliminary judgment of risk level.

[0004] However, this method, which relies on manual detection and preset static threshold judgment, is highly subjective. Not only does it have problems such as limited coverage and missed detections during the data collection process, but it is also prone to problems such as unstable identification and judgment bias because the judgment criteria are usually based on a single indicator. As a result, the accuracy and reliability of the overall corrosion risk warning results are low. Summary of the Invention

[0005] This application provides a pipeline corrosion risk early warning method, electronic equipment, and storage medium to improve the accuracy and reliability of corrosion risk early warning results.

[0006] In a first aspect, embodiments of this application provide a pipeline corrosion risk early warning method, including:

[0007] Based on the sensor array already deployed on the target pipeline, the corrosion monitoring data collected by the sensor array is acquired, and the corrosion monitoring data is preprocessed according to the preset data preprocessing rules to obtain corrosion characteristic data.

[0008] Based on corrosion characteristic data, a pre-trained corrosion health status assessment model is used to obtain corrosion health status information of the target pipeline.

[0009] Based on corrosion characteristic data, a pre-trained corrosion prediction model is used to obtain corrosion prediction information for the target pipeline; the corrosion prediction model is a model determined by hyperparameter optimization through an adaptive weighted gray wolf optimization algorithm.

[0010] Based on the current pipe wall thickness and corrosion prediction information of the target pipeline, the safe operating period of the target pipeline is calculated and obtained.

[0011] Based on the corrosion health status information, corrosion prediction information and safe operation period of the target pipeline, corrosion risk warning information of the target pipeline is obtained and output through preset warning judgment rules.

[0012] Secondly, embodiments of this application provide a pipeline corrosion risk early warning device, comprising:

[0013] The data processing module is used to acquire corrosion monitoring data collected by the sensor array deployed on the target pipeline, and to preprocess the corrosion monitoring data according to the preset data preprocessing rules to obtain corrosion characteristic data.

[0014] The pipeline condition assessment module uses a pre-trained corrosion health status assessment model based on corrosion characteristic data to obtain corrosion health status information of the target pipeline.

[0015] The corrosion prediction module is used to obtain corrosion prediction information of the target pipeline based on corrosion feature data and a pre-trained corrosion prediction model. The corrosion prediction model is determined by hyperparameter optimization through an adaptive weighted gray wolf optimization algorithm.

[0016] The period calculation module is used to calculate and obtain the safe operation period of the target pipeline based on the current pipeline wall thickness and corrosion prediction information.

[0017] The results output module is used to obtain and output corrosion risk warning information of the target pipeline based on the corrosion health status information, corrosion prediction information and safe operation period of the target pipeline, and through preset warning judgment rules.

[0018] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0019] The memory stores computer-executed instructions;

[0020] The processor executes computer execution instructions stored in the memory, causing the processor to perform the implementation of the method described above.

[0021] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the above-described method.

[0022] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0023] This application provides a pipeline corrosion risk early warning method, electronic device, and storage medium. It acquires corrosion monitoring data based on a sensor array deployed on the target pipeline and preprocesses the data according to preset data preprocessing rules to form corrosion feature data. This achieves structured acquisition and standardized input processing of corrosion-related information for the target pipeline, providing a stable and reliable data foundation for corrosion health status analysis and corrosion prediction. Next, based on the corrosion feature data, a pre-trained corrosion health status assessment model and a pre-trained corrosion prediction model are used to acquire corrosion health status information and corrosion prediction information for the target pipeline. This allows for more continuous and forward-looking identification criteria for early warning judgment. The corrosion prediction model is determined after hyperparameter optimization using an adaptive weighted gray wolf optimization algorithm, enabling the model to obtain better parameter configuration and improve the adaptability and stability of the prediction output to complex operating conditions. By combining the current pipeline wall thickness with the corrosion prediction information, the safe operating period of the target pipeline is calculated, transforming the corrosion prediction results into a quantifiable remaining safe operating time indicator. This helps to more accurately reflect the depletion of structural safety margin by corrosion development. Based on the pipeline's corrosion health status information, corrosion prediction information, and safe operation period, corrosion risk warning information is generated through preset warning judgment rules. This achieves the output of warning results under multi-dimensional information fusion, reduces the risk of misjudgment and omission caused by fluctuations in a single indicator or experience-based judgment, and improves the accuracy, reliability, and timeliness of target pipeline corrosion risk warnings as a whole. Attached Figure Description

[0024] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0025] Figure 1 A schematic flowchart illustrating the pipeline corrosion risk early warning method provided in this application embodiment;

[0026] Figure 2 A schematic diagram of the confusion matrix of corrosion health status assessment results provided in the embodiments of this application;

[0027] Figure 3This is a schematic diagram of the structure of the pipeline corrosion risk early warning device provided in the embodiments of this application;

[0028] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0029] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0030] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0031] To address the issues of subjectivity, insufficient coverage, and instability based on single indicators inherent in existing technologies that rely on manual inspection and preset static thresholds, this application proposes a pipeline corrosion risk early warning method. Using a sensor array deployed on the target pipeline as the data source, the corrosion monitoring data acquired by the sensor array is continuously acquired, transforming pipeline corrosion information from discrete, low-frequency manual sampling into continuously updated monitoring data. Furthermore, the corrosion monitoring data is preprocessed according to preset data preprocessing rules to form corrosion characteristic data usable for subsequent analysis, improving the standardization, consistency, and usability of the input.

[0032] Based on this, corrosion feature data are input into pre-trained corrosion health status assessment models and pre-trained corrosion prediction models, respectively, to obtain corrosion health status information and corrosion prediction information for the target pipeline, enabling simultaneous analysis of the current health level and future corrosion trends. The corrosion prediction model is determined through hyperparameter optimization using an adaptive weighted gray wolf optimization algorithm. This allows the corrosion prediction model to adaptively obtain a better model configuration guided by the optimization objective during the determination process, thereby improving the fitting ability and generalization stability of corrosion prediction information under complex operating conditions, and providing a more reliable basis for corrosion identification.

[0033] Furthermore, this application combines the current pipe wall thickness of the target pipeline with corrosion prediction information to calculate the safe operating period of the target pipeline, expanding corrosion risk assessment from a single-point state or single threshold judgment to an actionable quantitative indicator with a time scale. Finally, based on the corrosion health status information, corrosion prediction information, and safe operating period of the target pipeline, corrosion risk warning information of the target pipeline is generated through preset warning judgment rules. This integrates multi-dimensional information into a warning output that can be directly used for operation and maintenance decisions, realizing the identification and response to corrosion risks of the target pipeline. This improves the accuracy and reliability of corrosion risk warning and reduces the risk of misjudgment and omission by traditional experience threshold methods in complex environments.

[0034] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described with reference to the accompanying drawings.

[0035] Figure 1 This is a schematic flowchart of the pipeline corrosion risk early warning method provided in the embodiments of this application, as shown below. Figure 1 As shown, the method includes:

[0036] S11. Based on the sensor array already deployed on the target pipeline, acquire the corrosion monitoring data collected by the sensor array, and perform data preprocessing on the corrosion monitoring data according to the preset data preprocessing rules to obtain corrosion characteristic data.

[0037] In this embodiment, a sensor array pre-installed along the target pipeline or at key locations senses and collects data on corrosion-related monitoring objects during pipeline operation, forming corrosion monitoring data. The sensor array refers to a collection of monitoring units composed of multiple sensors, spatially distributed to cover different locations or operating conditions of the target pipeline. It can output monitoring results continuously or periodically, ensuring the corrosion monitoring data has time-series characteristics and reflects the dynamic changes in corrosion status during pipeline operation. Online data acquisition of the target pipeline enables automated collection and continuous updating of corrosion-related information. Pre-defined data preprocessing rules standardize the quality control, format consistency, and structured organization of corrosion monitoring data for model input, ensuring that corrosion monitoring data from different sampling sources, frequencies, or measurement calibers meet unified processing standards. Corrosion feature data refers to a set of characteristic data that can be used for subsequent corrosion health status assessment and corrosion prediction calculations. By converting the original corrosion monitoring data into corrosion feature data, feature expression and input standardization for subsequent calculations are achieved.

[0038] S12. Based on corrosion characteristic data, a pre-trained corrosion health status assessment model is used to obtain corrosion health status information of the target pipeline.

[0039] In this embodiment, the pre-trained corrosion health status assessment model refers to an assessment model trained using historical sample data matching the corrosion mechanism and operating conditions of the target pipeline before method deployment. This model can map the input corrosion feature data into quantitative information about the current health status of the target pipeline, enabling automated analysis of the corrosion health status of the target pipeline without relying on manual, point-by-point interpretation. Rapid analysis of the corrosion health status of the target pipeline is achieved by calling the pre-trained corrosion health status assessment model.

[0040] Specifically, the pre-trained corrosion health status assessment model receives corrosion feature data as input and, based on the parameters and mapping relationships formed during the training phase, comprehensively analyzes the corrosion evolution information reflected by each monitoring parameter in the corrosion feature data. This model can jointly process the multi-dimensional information contained in the corrosion feature data, enabling the assessment results to reflect not only the changing trend of a single parameter but also the comprehensive impact on corrosion risk under multi-parameter coupling conditions, thus improving the ability to identify changes in corrosion health status under complex operating conditions. This embodiment achieves a structured expression of the current health level of the target pipeline, providing directly callable state inputs for subsequent early warning judgment rules, improving the real-time performance and consistency of corrosion risk early warning decisions.

[0041] S13. Based on corrosion characteristic data, a pre-trained corrosion prediction model is used to obtain corrosion prediction information for the target pipeline; wherein, the corrosion prediction model is a model determined after hyperparameter optimization through an adaptive weighted gray wolf optimization algorithm.

[0042] In this embodiment, the pre-trained corrosion prediction model refers to a prediction model fitted using training data. It can quantitatively predict the corrosion development trend of the target pipeline at a given time, enabling corrosion risk warnings to go beyond judging the current state and further form a basis for future risk assessment. Corrosion prediction information refers to the predicted data of the future corrosion evolution of the target pipeline. The corrosion prediction model is determined by hyperparameter optimization using an adaptive weighted gray wolf optimization algorithm. The adaptive weighted gray wolf optimization algorithm is an optimization algorithm used for model parameter optimization. It iteratively updates candidate solutions within a preset search space by simulating a swarm search mechanism, and introduces an adaptive weight adjustment strategy during the iteration process to balance the global exploration capability and local development capability of the search, achieving a more effective approximation of the target optimal solution. Hyperparameter optimization refers to searching and evaluating within a preset candidate range to determine a set of hyperparameter combinations that best performs the model under the training objective, ensuring that the corrosion prediction model maintains stable generalization prediction capability under different operating conditions and different combinations of corrosion characteristics after training. By setting an adaptive weighted gray wolf optimization algorithm during the model training phase to complete hyperparameter optimization, adaptive determination of the configuration parameters of the corrosion prediction model is achieved, reducing the uncertainty caused by manual experience in parameter selection and improving the accuracy and robustness of corrosion prediction results.

[0043] In practical processing, the pre-trained corrosion prediction model receives corrosion feature data and outputs corresponding corrosion prediction information. Because the corrosion prediction model undergoes hyperparameter optimization using the adaptive weighted gray wolf optimization algorithm, it is more sensitive to key changes in the corrosion feature data and can maintain output stability under noise disturbances and operating condition fluctuations, enabling the corrosion prediction information to more reliably reflect the future corrosion status of the target pipeline. By outputting structured corrosion prediction information, a quantitative expression of the corrosion evolution trend of the target pipeline is achieved, providing data support for the subsequent calculation of safe operating period and the generation of early warning information, thus improving the executability and prediction reliability of the overall early warning process.

[0044] S14. Calculate and obtain the safe operating period of the target pipeline based on the current pipeline wall thickness and corrosion prediction information.

[0045] In this embodiment, the current pipe wall thickness is acquired by a sensor array. The current pipe wall thickness reflects the change in the corrosion state of the target pipe under corrosion. Corrosion prediction information refers to the potential depletion intensity of the target pipe's structural safety margin in the future, enabling the calculation of the safe operating period to simultaneously cover both the current corrosion state and future corrosion development. Specifically, the calculation conditions for the safe operating period are established based on a preset safety judgment boundary to obtain the current safety margin of the target pipe. Simultaneously, the corrosion prediction information is transformed into prediction constraints related to the depletion of the safety margin, allowing the calculation of the time required for the target pipe to evolve from its current state to the safety judgment boundary under continued corrosion. By adopting a time-based calculation mechanism oriented towards the safety judgment boundary, the corrosion prediction results are transformed into executable operation management indicators, improving the support of early warning output for maintenance planning and risk control decisions.

[0046] S15: Based on the corrosion health status information, corrosion prediction information and safe operation period of the target pipeline, the corrosion risk warning information of the target pipeline is obtained and output through the preset warning judgment rules.

[0047] In this embodiment, the preset early warning judgment rule refers to a pre-configured set of judgment conditions and output mapping relationships, used to fuse and judge multi-source assessment results and generate corresponding early warning outputs, making the triggering logic of corrosion risk early warning deterministic, verifiable, and traceable. Specifically, the early warning judgment rule sets judgment conditions related to risk levels for the corrosion health status information, corrosion prediction information, and safe operation period of the target pipeline, and defines the content of corrosion risk early warning information to be output under different combinations of conditions. By jointly analyzing the above three types of input information, the risk status of the target pipeline can be judged from different dimensions such as whether the current state is abnormal, whether the future trend is accelerating, and whether the remaining time is urgent, and based on this, it can be determined whether an early warning is triggered and the risk level and output form of the early warning. Among them, the corrosion risk early warning information can include a risk level identifier related to the early warning trigger and a judgment basis that can be used for subsequent response and handling, so that the early warning information can not only indicate the existence of risk, but also clarify the severity and urgency of the risk. The corrosion risk early warning information is associated with the target pipeline identifier so as to realize the traceability management of the early warning object, triggering basis, and judgment result in subsequent handling and review. This embodiment achieves multi-dimensional information fusion judgment through preset early warning judgment rules, improving the stability and consistency of corrosion risk early warning results and making the early warning output more in line with actual operation and maintenance needs. Furthermore, by generating structured corrosion risk early warning information, it improves the executability and management efficiency of the overall corrosion risk early warning system.

[0048] In one embodiment, the acquisition of corrosion feature data in step S11 above is further described below. Based on the above embodiment, it includes:

[0049] S111, Based on the corrosion monitoring data, through normalization processing, each corrosion monitoring parameter in the corrosion monitoring data is mapped to a preset value range to obtain standardized monitoring data;

[0050] S112, obtain multiple preset health assessment indicators, and perform rank correlation analysis on each standardized monitoring parameter and preset health assessment indicator in the standardized monitoring data through rank correlation coefficient analysis to obtain the correlation coefficient corresponding to each standardized monitoring parameter.

[0051] S113, Based on the preset correlation threshold, add standardized monitoring parameters with correlation coefficients greater than or equal to the correlation threshold to the corrosion feature data.

[0052] In this embodiment, normalization processing is performed on the corrosion monitoring data to map each corrosion monitoring parameter in the data to a preset numerical range, thus obtaining standardized monitoring data. The preset numerical range refers to a pre-defined range of values ​​used to unify the dimensions and scale, eliminating scale inconsistencies caused by differences in physical dimensions, value ranges, and sampling fluctuations among different corrosion monitoring parameters. Standardized monitoring data refers to a data set with a unified scale expression formed after mapping each corrosion monitoring parameter. Normalization processing can be achieved by scaling each corrosion monitoring parameter proportionally, ensuring comparability of parameters within the preset numerical range and reducing the impact of extreme values ​​on subsequent correlation analysis. Through normalization processing, scale uniformity and input stability of the corrosion monitoring data are achieved.

[0053] Next, multiple preset health assessment indicators were acquired, and rank correlation coefficient analysis was used to analyze the correlation between each standardized monitoring parameter in the standardized monitoring data and the preset health assessment indicators. The preset health assessment indicators refer to the set of indicators used to describe the health level of the target pipeline, such as safety margin, relative thickness ratio, real-time corrosion rate, and annual inspection and maintenance frequency. These are pre-configured and can serve as a reference for correlation analysis. The correlation coefficient refers to the quantitative result output by the rank correlation analysis, that is, the strength of the association between a certain standardized monitoring parameter and the preset health assessment indicator.

[0054] After obtaining the correlation coefficients for each standardized monitoring parameter, standardized monitoring parameters with correlation coefficients greater than or equal to the correlation threshold are added to the corrosion feature data. The correlation threshold can be configured based on data quality, the number of parameters, and the target model input size. When the correlation coefficient meets the threshold condition, it indicates that there is a strong hierarchical correlation between the corresponding standardized monitoring parameter and the preset health assessment indicator, and it is included in the corrosion feature data. By using threshold screening to construct corrosion feature data, weakly correlated or redundant parameters are suppressed, noise propagation and overfitting problems caused by invalid inputs are reduced, and the accuracy and robustness of corrosion health status assessment and corrosion prediction are improved.

[0055] In one embodiment, the corrosion health status assessment model includes a gated feature processing layer, an autoencoder feature processing layer, and a hierarchical classification layer.

[0056] In this embodiment, the gated feature processing layer is used to perform gated modulation processing on the input corrosion feature data. By introducing learnable gating control in the feature channel dimension, different corrosion features can be adaptively assigned different contribution weights under different operating conditions and noise levels, thereby suppressing the interference of abnormal fluctuations or weakly correlated features on the evaluation results. The gated feature processing layer achieves robust preprocessing of corrosion feature data by selectively enhancing and suppressing input features, improving the stability and effectiveness of subsequent representation learning.

[0057] The autoencoder feature processing layer is used for nonlinear representation learning and dimensionality compression of the gated features. By constructing an encoding mapping of the input features, it transforms the gated features into a low-dimensional representation that reflects the corrosion state pattern, enabling multidimensional corrosion features to obtain a more compact feature expression while retaining key information. This autoencoder feature processing layer allows corrosion health status assessment to move away from direct discrimination of the original high-dimensional features and instead focus on analysis based on more generalized latent features, reducing the perturbation of the classification boundary by the coupling relationships between multi-source features. Therefore, by nonlinearly encoding the corrosion feature data, key corrosion patterns are extracted and redundant information is compressed, improving the generalization ability of the assessment model.

[0058] The hierarchical classification layer maps the low-dimensional representation output by the autoencoder feature processing layer to the discrimination results of preset corrosion health status categories. By constructing a hierarchical discrimination mapping relationship, it outputs the classification score for each corrosion health status category and further generates a probabilistic output to obtain the corrosion health status information of the target pipeline. Through hierarchical classification of low-dimensional features, the hierarchical classification layer achieves standardized output of corrosion health status judgment results, enhancing the usability and consistency of the assessment results in the early warning process.

[0059] Next, based on the above embodiments, step S12 uses a pre-trained corrosion health status assessment model to obtain corrosion health status information of the target pipeline, including:

[0060] S121, through the gated feature processing layer, feature mapping linear transformation and gated mapping linear transformation are performed on the corrosion feature data respectively to obtain feature mapping results and gated mapping results. The gated mapping results are then processed using an activation function to obtain gated coefficients. Finally, the gated coefficients are multiplied element-wise with the feature mapping results to obtain gated features.

[0061] Specifically, corrosion feature data (in vector or matrix form) is input into the gated feature processing layer for feature mapping linear transformation and gate mapping linear transformation. The feature mapping linear transformation maps the corrosion feature data to a feature space relevant to subsequent evaluation, forming a feature mapping result. The gate mapping linear transformation generates a gate mapping result that is dimensionally aligned with the feature mapping result, allowing gating information to act on the feature information element-wise. Linear transformations are typically implemented using matrix multiplication with added bias terms to ensure the mapping process is trainable and generalizable, producing stable mapping outputs under different data distributions and operating conditions. By generating the feature mapping and gate mapping results in parallel, the content information and control information required for subsequent gating modulation are separated and processed.

[0062] Next, an activation function is used to process the gating mapping result to obtain gating coefficients. The activation function is used to constrain the gating mapping result to a numerical range suitable for gating modulation. The gating coefficients are multiplied element-wise with the feature mapping result to obtain gating features, which preserves or enhances dimensions with larger gating coefficients, while weakening dimensions with smaller gating coefficients. This achieves adaptive filtering of effective information and noise suppression in the erosion feature data, improving the stability of subsequent nonlinear coding and hierarchical determination.

[0063] S122, through the self-encoding feature processing layer, uses a preset encoder to perform non-linear encoding processing on the gated features to obtain low-dimensional latent variable features.

[0064] Specifically, the pre-defined encoder refers to the encoding mapping structure determined during the training phase of the corrosion health status assessment model. It is used to map gated features from the original feature dimensions to a lower-dimensional space, forming low-dimensional latent variable features that can characterize key patterns of corrosion status. Nonlinear encoding processing refers to setting nonlinear transformations during the encoding mapping process, enabling the encoder to handle the nonlinear correlation between gated features and corrosion health status. This embodiment achieves a compact expression and redundancy compression of multidimensional corrosion information, improving the model's adaptability to fluctuations in operating conditions.

[0065] S123, through a hierarchical classification layer, the low-dimensional latent variable features are mapped to the classification scores corresponding to each preset corrosion health state category, and the classification scores are subjected to exponential normalization to obtain the corrosion health state probability distribution corresponding to each preset corrosion health state category.

[0066] Specifically, the classification score refers to the degree of matching between low-dimensional latent variable features and each preset corrosion health state category. It can be obtained by superimposing a linear mapping with a nonlinear transformation to form a discriminant function within the hierarchical classification layer. Subsequently, the classification score undergoes exponential normalization to obtain the probability distribution of corrosion health states corresponding to each preset corrosion health state category. The exponential normalization process converts the classification scores of each category into comparable probability values. This normalization process enhances the integrability and interpretability of the evaluation results in the early warning judgment rules.

[0067] S124. Determine the corrosion health status level of the target pipeline based on the probability distribution of corrosion health status.

[0068] Specifically, the preset corrosion health status categories are determined based on the corrosion health status probability distribution to obtain a corrosion health status level that matches the current corrosion status of the target pipeline. The determination of the corrosion health status level can be based on the probability values ​​in the corrosion health status probability distribution, with the corrosion health status category with the highest probability being determined as the corrosion health status level of the target pipeline. When the corrosion health status probability distribution shows the same probability, the worst-case scenario principle (safety first) can be used to determine the corrosion health status level, that is, the worst corrosion health status is taken as the final corrosion health status level.

[0069] In one embodiment, the corrosion prediction model includes a mild corrosion sub-model, a moderate corrosion sub-model, and a severe corrosion sub-model, enabling the corrosion prediction process to establish more suitable mapping relationships for the differences in characteristic distributions at different corrosion development stages. The mild, moderate, and severe corrosion sub-models are prediction sub-models trained and determined respectively for corrosion characteristic patterns in mild, moderate, and severe corrosion scenarios. Each sub-model, under the same corrosion characteristic data input conditions, can form a more sensitive and stable prediction response for its corresponding corrosion stage, reducing the problem of bias accumulation or amplified local interval errors caused by simultaneously fitting a single prediction model across the entire corrosion range.

[0070] In one embodiment, step S13 is implemented as follows. Based on the above embodiment, obtaining corrosion prediction information for the target pipeline includes:

[0071] S131, Based on corrosion feature data, the first corrosion prediction rate and the first corrosion level corresponding to the first corrosion prediction rate are obtained through a pre-trained mild corrosion sub-model.

[0072] S132, Based on corrosion feature data, the second corrosion prediction rate and the second corrosion level corresponding to the second corrosion prediction rate are obtained through a pre-trained moderate corrosion sub-model.

[0073] S133, Based on corrosion feature data, the third corrosion prediction rate and the third corrosion level corresponding to the third corrosion prediction rate are obtained through a pre-trained severe corrosion sub-model.

[0074] S134, Based on the first corrosion level, the second corrosion level, and the third corrosion level, the target corrosion level corresponding to the target pipeline is obtained by adopting a preset level voting rule;

[0075] S135, based on the first corrosion prediction rate, the second corrosion prediction rate and the third corrosion prediction rate, obtain one or more corrosion prediction rates corresponding to the target corrosion level, and take the largest corrosion prediction rate as the target corrosion prediction rate corresponding to the target pipeline.

[0076] In this embodiment, corrosion feature data is input into pre-trained mild corrosion sub-models, pre-trained moderate corrosion sub-models, and pre-trained severe corrosion sub-models to generate multi-perspective prediction outputs under the same input conditions. This yields a first corrosion prediction rate, a second corrosion prediction rate, and a third corrosion prediction rate. The first corrosion level, second corrosion level, and third corrosion level refer to the level determination results of each prediction rate under a preset corrosion level system. Next, a preset level voting rule is used to determine the target corrosion level corresponding to the target pipeline. The level voting rule is used to integrate multiple corrosion level determination results consistently, ensuring that the target corrosion level reflects the overall trend of the prediction conclusions of multiple sub-models, and providing a final determination result through rule-based methods when discrepancies exist. This multi-result aggregation improves the stability of the level determination.

[0077] After determining the target corrosion level, one or more corrosion prediction rates corresponding to the target corrosion level are obtained, and the highest corrosion prediction rate is taken as the target corrosion prediction rate for the target pipeline. This embodiment achieves the screening of the most unfavorable corrosion scenario, improving the reliability and risk sensitivity of the target corrosion prediction rate in the calculation of safe operating period and the execution of early warning judgment rules.

[0078] In one embodiment, step S14 is further described below. Based on the above embodiment, obtaining the safe operating period of the target pipeline includes:

[0079] S141, obtain the current pipe wall thickness of the target pipe, and obtain the preset safety thickness threshold corresponding to the target pipe;

[0080] S142. Based on the corrosion prediction information, obtain the target corrosion prediction rate, and calculate the safe operating period of the target pipeline based on the current pipeline wall thickness, the preset safe thickness threshold, and the target corrosion prediction rate.

[0081] In this embodiment, the sensor array deployed on the target pipeline includes an ultrasonic wall thickness sensor, used to continuously or periodically sample the pipeline wall thickness at preset measurement points, forming a wall thickness measurement value corresponding to the evaluation time. Obtaining the current pipe wall thickness of the target pipeline quantifies the starting point of the current safety margin, providing a calculation benchmark for the safe operating period. A preset safety thickness threshold, as a pre-defined safety boundary parameter for the target pipeline, describes the minimum allowable thickness limit of the target pipeline under given safety judgment conditions. This preset safety thickness threshold can be pre-set based on the specifications, design requirements, and safety management strategies of the target pipeline. Next, the calculation of the safe operating period is based on the correspondence between the current available thickness margin and the future corrosion consumption rate, obtaining the time required for the target pipeline to reach the preset safety thickness threshold under continuous corrosion from the current moment. Here, the current available thickness margin is the difference between the current pipe wall thickness and the preset safety thickness threshold, and the future corrosion consumption rate corresponds to the target corrosion prediction rate. This achieves the quantification of the safe operating period of the target pipeline.

[0082] In one specific embodiment, the formula is used:

[0083]

[0084] Calculate and obtain the safe operating period T safe ,in, For the prediction of the target corrosion rate, δ current δ represents the current pipe wall thickness. min The preset safe thickness threshold (i.e., minimum safe wall thickness) is used.

[0085] In one embodiment, based on the above embodiments, obtaining a corrosion prediction model includes:

[0086] S201. Based on the hyperparameters to be optimized, determine the search space of the hyperparameters to be optimized, and generate multiple sets of initial hyperparameter combinations within the search space of the hyperparameters to be optimized.

[0087] Specifically, the hyperparameters to be optimized refer to the set of control parameters that affect the predictive ability of the support vector regression prediction model. The search space of the hyperparameters to be optimized refers to the predefined range of values ​​for each hyperparameter and its combination constraints, used to clarify the optimization boundary and ensure the usability of the search results. When generating multiple sets of initial hyperparameter combinations based on the search space, samples can be taken and combined within the value range of each hyperparameter according to a preset sampling strategy, so that the initial hyperparameter combinations can cover different regions of the search space, providing diverse initial candidate solutions for subsequent iterations. By constructing the search space of the hyperparameters to be optimized and generating multiple sets of initial hyperparameter combinations, the normalization of the optimization boundary and the initial solution set is achieved, improving the reachability of subsequent group searches to the global optimum.

[0088] In one specific embodiment, the corrosion prediction model employs a support vector regression (SVR) model. It uses corrosion feature data as input and the actual corrosion rate as the supervisory signal output. Nonlinear regression fitting is achieved through kernel function mapping to obtain the predictive ability for the corrosion rate of the target pipeline. The objective function of the SVR prediction model is:

[0089]

[0090] And determine the constraints:

[0091]

[0092] Where C is the penalty coefficient, used to adjust the trade-off between model complexity and training error, and n is the number of samples. y is a slack variable used to allow some samples to exceed the insensitive interval and to penalize them; i This represents the true corrosion rate of the i-th sample. Input feature mapping function, which maps the original input x i Mapped to a high-dimensional feature space; ε is the loss threshold; b is the SVR bias term. Through the above objective function and constraints, the support vector regression prediction model can maintain a stable fit under corrosive data conditions containing noise and abnormal fluctuations.

[0093] To reduce the computational overhead of explicitly constructing high-dimensional mapping functions, an implicit mapping of the feature space is implemented using kernel functions. The radial basis function (RBF) kernel is selected as the kernel function for the support vector regression prediction model. The RBF kernel is expressed as:

[0094]

[0095] Here, γ represents the kernel width, used to adjust the rate of similarity decay of samples in the feature space. Since the penalty coefficient C, the kernel width parameter γ, and the loss threshold ε jointly determine the regression performance and generalization performance of the support vector regression prediction model, (C, γ, ε) is used as the set of hyperparameters to be optimized, determined through an optimization process before model training. Based on the optimized hyperparameters, the support vector regression prediction model is trained to obtain a pre-trained corrosion prediction model for outputting corrosion prediction information. This enables the prediction output of the corrosion development intensity of the target pipeline, providing reliable input for subsequent calculation of safe operating period and generation of corrosion risk early warning information.

[0096] S202, each initial hyperparameter combination is determined as the initial position parameter of the corresponding search individual to obtain the initial gray wolf population; wherein, the initial gray wolf population contains multiple search individuals.

[0097] S203, denote the initial gray wolf population as the current gray wolf population, and obtain the current iteration number.

[0098] Specifically, each initial hyperparameter combination is determined as the initial position parameter of the corresponding search individual. A search individual refers to an entity representing a candidate solution within the gray wolf optimization framework, and its position parameter carries the hyperparameter values ​​corresponding to that candidate solution. The initial gray wolf population is a set of candidate solutions composed of multiple search individuals, used to explore the search space in parallel and gradually approach the optimal solution through a group cooperation mechanism. After dedicating the initial gray wolf population to the current gray wolf population and obtaining the current iteration number, the current gray wolf population serves as the update object for each iteration in subsequent fitness evaluation and position update processes. This embodiment transforms the hyperparameter optimization problem into an iterative swarm search problem, providing a platform for subsequent use of a fitness-oriented update mechanism.

[0099] S204. When the current iteration number has not reached the preset iteration number, construct a support vector regression prediction model based on the position parameters of each searched individual in the current gray wolf population.

[0100] S205. Based on the preset training dataset, calculate the mean squared error of the training set corresponding to the support vector regression prediction model, and use the mean squared error of the training set as the fitness to obtain the fitness set corresponding to the current gray wolf population.

[0101] S206, based on the fitness set, the current gray wolf population is screened to obtain a preset number of target search individuals, and the position parameters of multiple target search individuals are dynamically perturbed to obtain the perturbed position parameters of each target search individual;

[0102] S207. Based on the current iteration number and the preset iteration number, a preset nonlinear adaptive weight update rule is used to determine the weight parameters corresponding to the current iteration number.

[0103] S208. Based on the weight parameters and the perturbed position parameters of each target search individual, update the position parameters of each search individual in the current gray wolf population to obtain the updated gray wolf population.

[0104] S209: Record the updated gray wolf population as the current gray wolf population, and update the current iteration number.

[0105] In this embodiment, when the current iteration count has not reached the preset iteration count, a support vector regression prediction model is constructed based on the location parameters corresponding to each search individual in the current gray wolf population. The hyperparameters of the support vector regression prediction model are given by the location parameters of the search individuals, so that each search individual corresponds to a specific model configuration. The construction process is manifested in instantiating the model structure and training configuration with the location parameters as the control parameters of the model, providing a basis for calculating the prediction performance corresponding to the search individual. Subsequently, the support vector regression prediction model is trained based on the preset training dataset, and the mean squared error of the training set is calculated. The mean squared error of the training set is used as the fitness to obtain the fitness set corresponding to the current gray wolf population. Here, the mean squared error of the training set is used to measure the mean squared error between the model's predicted value and the true value. The fitness set is used to summarize the fitness evaluation results of all search individuals in the current gray wolf population, so that the search individuals can be sorted, filtered, and updated accordingly. Through this embodiment, a unified quantitative comparison of the prediction performance of different hyperparameter combinations is achieved, giving the population update a clear optimization target.

[0106] An example formula for calculating mean squared error (MSE):

[0107]

[0108] Where fitness is the fitness value (a measure of the prediction accuracy of the SVR model); y i This represents the actual corrosion rate. This is the predicted value for SVR.

[0109] Next, a predetermined number of target search individuals are obtained, and their positional parameters are dynamically perturbed. Target search individuals refer to the set of individuals with better fitness in the current iteration, which can be used to guide the group's search direction. Dynamic perturbation involves applying a perturbation to the positional parameters of the target search individuals, adjusting with iteration or population state. This introduces randomness or diversity while maintaining a good search direction, preventing the group from prematurely converging to local optima and enhancing its ability to escape complex search spaces. The perturbed positional parameters provide more exploratory guidance in subsequent position updates, allowing the group to explore other potentially better regions while developing the current favorable region. By applying dynamic perturbation to the target search individuals, the diversity of the group's search is maintained, and local optimum traps are avoided, improving the quality and stability of the final hyperparameter combination in finding optimal results.

[0110] Simultaneously, based on the current iteration number and the preset iteration number, a preset nonlinear adaptive weight update rule is used to determine the weight parameters corresponding to the current iteration number. This nonlinear adaptive weight update rule dynamically adjusts the values ​​of the weight parameters during iteration, enabling them to achieve an adaptive balance between exploration and development as the iteration progresses. The weight parameters are used to adjust the stride or guidance strength of the gray wolf population position update, making early iterations more inclined to expand the search range while later iterations are more inclined to refine and approach the optimal solution domain, thus improving convergence efficiency and reducing the risk of oscillations.

[0111] Based on the weight parameters and the perturbed position parameters of each target individual, the position parameters of each individual in the current gray wolf population are updated. The position update process involves iteratively correcting the candidate solutions of other individuals under the guidance of the target individuals, and adjusting the update magnitude in conjunction with the weight parameters. This allows the gray wolf population to gradually move towards a better hyperparameter combination region driven by fitness. By iteratively updating the position parameters of the gray wolf population, continuous improvement of the hyperparameter combination is achieved, resulting in a gradual optimization trend in the fitness set and improving the predictive ability of the support vector regression prediction model under the training objective. It should be further noted that, provided the current iteration count has not reached the preset iteration count, the steps of calculating fitness and updating the position parameters of each individual in the gray wolf population are repeated.

[0112] S210, when the current iteration number reaches the preset iteration number, select the search individual with the best fitness in the updated gray wolf population, and use the position parameters of the search individual with the best fitness as the target hyperparameter combination of the support vector regression prediction model.

[0113] S211, based on the target hyperparameter combination, the support vector regression prediction model is trained and validated according to the preset training dataset and the preset validation dataset respectively, so as to obtain the pre-trained corrosion prediction model that has passed the validation.

[0114] In this embodiment, when the current iteration count reaches a preset number of iterations, the position parameters of the search individual with the best fitness are used as the target hyperparameter combination for the support vector regression prediction model. This target hyperparameter combination determines the configuration of the final corrosion prediction model, enabling the model to complete final training and validation based on this combination. Subsequently, based on the target hyperparameter combination, the support vector regression prediction model is trained using a preset training dataset, and the trained model is validated using a preset validation dataset to obtain a pre-trained corrosion prediction model that has passed validation. The preset validation dataset is used to test the model's predictive stability and generalization ability on data independent of the training process. In summary, through a closed-loop mechanism of optimization, training, and validation, the hyperparameters and performance of the corrosion prediction model are jointly constrained, improving the robustness and reliability of the corrosion prediction results under complex working conditions and data fluctuations.

[0115] In one specific embodiment, the perturbation-induced position parameters of each target search individual obtained in step S206 above are provided as an implementation method. Based on the above embodiment, it includes:

[0116] S2061, based on the fitness set, sort the fitness of each search individual in the current gray wolf population, and determine the best search individual, the second best search individual, and the third best search individual according to the preset number;

[0117] S2062, obtain the position parameters corresponding to the best search individual, the second best search individual and the third best search individual respectively;

[0118] S2063, by superimposing random perturbation parameters on the position parameters corresponding to the optimal search individual, the second-best search individual, and the third-best search individual respectively, the perturbation-adjusted position parameters corresponding to the optimal search individual, the second-best search individual, and the third-best search individual are obtained.

[0119] In this embodiment, the fitness value is the error level of the support vector regression prediction model corresponding to the position parameters represented by the search individual on a preset training dataset. A higher fitness value indicates a greater contribution of the position parameter combination to the prediction model performance. After fitness ranking, the optimal, second-best, and third-best search individuals are determined according to a preset number, serving as the key search individual set used to guide the group's position update in this iteration. The preset number limits the number of target search individuals participating in the guidance, ensuring sufficient guidance information while reducing the dispersion of update direction due to too many guiding individuals. The obtained optimal, second-best, and third-best search individuals enable subsequent position updates to balance convergence to the current optimal solution domain with the exploration of adjacent potentially better solution domains, improving the directional stability of iterative updates.

[0120] Subsequently, random perturbation parameters are superimposed on the position parameters corresponding to the optimal, second-best, and third-best search individuals, respectively. These random perturbation parameters introduce randomness while preserving the original position parameter characteristics, enabling the perturbed position parameters to form diverse neighborhood exploration points near the original candidate solutions. This enhances the search process's ability to escape local optima and reduces the risk of premature convergence. The superposition can be applied to various dimensions of the position parameters, ensuring that the perturbed position parameters still satisfy the value constraints of the hyperparameters to be optimized and the search space boundary requirements. This embodiment achieves dynamic perturbation processing of key guiding solutions, maintaining population search diversity while ensuring convergence efficiency, and improving the quality and stability of the final target hyperparameter combination in search results.

[0121] For example, to enhance the algorithm's ability to escape local optima, a small perturbation term is added to the positions of the gray wolves α, β, and δ in each iteration, i.e., the formula is: The perturbated position parameters X for the optimal, second-best, and third-best search individuals are calculated respectively. new Where X is the position of the search individual before the perturbation. Let N be the disturbance intensity (which can be taken as 0.03), σ be the standard deviation of the disturbance (which can be taken as 0.2), and N(0, σ) be the disturbance strength. 2 ( ) is normally distributed.

[0122] In another specific embodiment, a specific implementation method is provided for determining the weight parameter corresponding to the current iteration number in step S207 above. Based on the above embodiment, it includes:

[0123] S2071, obtain the current iteration number and the preset iteration number, and use the formula:

[0124]

[0125] Calculate the weight parameter α(t) corresponding to the current iteration number; where t is the current iteration number, T is the preset iteration number, α0 is the initial weight value, k is the adjustment coefficient, and γ is the convergence speed exponent.

[0126] In this embodiment, the current iteration number t refers to the iteration progress already executed in the gray wolf optimization process, and the preset iteration number T is used to limit the maximum number of iterations in the optimization process. Based on the current iteration number t and the preset iteration number T, the weight parameter α(t) is calculated using a preset nonlinear adaptive weight update rule. The nonlinear adaptive weight update rule is implemented through exponential decay, allowing the weight parameter to gradually decrease according to a nonlinear law as the iteration progresses, thereby achieving phased adjustment of the search strategy during the optimization process.

[0127] Specifically, the weight parameter α(t) is calculated according to the above formula, where α0 is the initial weight value (which can be 2), used to define the weight benchmark at the beginning of the iteration. k is the adjustment coefficient (which can be 3), used to adjust the intensity of weight decay, so that the decrease in weight parameter can be configured according to the complexity of the optimization problem and the search requirements. γ is the convergence rate exponent (which can be 1.2), used to adjust the shape of the decay curve, so that the rate of change of weight parameter in different iteration stages can be accurately controlled. Through the above formula, as t gradually approaches T from the initial iteration, the weight parameter α(t) can smoothly decay from a large initial value to a small later value, reducing the search instability caused by sudden changes in weight during the iteration process. The obtained weight parameter is used for the adjustment of update amplitude and guidance intensity control in the subsequent gray wolf population position parameter update process. By using a nonlinear adaptive weight update rule to calculate the weight parameter, adaptive control of the gray wolf optimization search strategy is realized, improving the stability of the target hyperparameter combination optimization results.

[0128] In one embodiment, step S15 is implemented as follows. First, it should be noted that the first rate threshold and the second rate threshold are pre-configured corrosion rate determination thresholds used to divide the risk range of the target corrosion prediction rate. The first rate threshold is the upper limit boundary of the low-risk corrosion rate, and the second rate threshold is the upper limit boundary of the medium-risk corrosion rate. The threshold parameters can be set according to management strategies and risk control requirements, and are invoked in a unified manner during the early warning determination process, making the early warning triggering conditions deterministic.

[0129] Based on the above embodiments, corrosion risk warning information for the target pipeline is acquired and output, including:

[0130] S151, obtain the corrosion health status level and target corrosion prediction rate of the target pipeline;

[0131] S152, if the corrosion health status level is healthy, the target corrosion prediction rate is less than the first rate threshold, and the safe operation period is greater than the first period threshold, then the target pipeline is determined to meet the first-level early warning conditions, and the corrosion risk early warning information of routine inspection is obtained and output.

[0132] Specifically, this judgment corresponds to a situation where the target pipeline is currently in good health, the predicted corrosion intensity is in a low-risk range, and the remaining safe time window is relatively ample. Corrosion risk warning information from routine inspections is used to indicate that maintaining the frequency and focus of routine inspections is sufficient to meet risk control requirements. By outputting corrosion risk warning information from routine inspections under low-risk conditions, excessive intervention triggered when the risk is low is reduced, improving the executability of the warning system and the efficiency of on-site operation and maintenance.

[0133] S153, if the corrosion health status level is sub-healthy, or the target corrosion prediction rate is greater than or equal to the first rate threshold and less than or equal to the second rate threshold, or the safe operation period is greater than or equal to the second period threshold and less than or equal to the first period threshold, then the target pipeline is determined to meet the secondary early warning conditions, and the corrosion risk early warning information of enhanced monitoring is obtained and output.

[0134] Specifically, this judgment is used to cover situations where the health level of the target pipeline shows a downward trend, the predicted corrosion rate enters a range requiring close monitoring, or the remaining safe time window begins to shrink but has not yet been reached. Enhanced monitoring of corrosion risk early warning information is used to prompt increased monitoring and inspection intensity, acquiring and updating relevant data on the target pipeline more frequently, providing more timely basis for subsequent safe operation periods and risk assessments. By triggering enhanced monitoring of corrosion risk early warning information at the moderate risk or early stage of risk escalation, a sensitive response to risk changes is achieved, enhancing the early warning system's foresight in the risk escalation phase.

[0135] S154. If the corrosion health status level is degraded, or the target corrosion prediction rate is greater than the second rate threshold, or the safe operation period is less than the second period threshold, then the target pipeline is determined to meet the level three early warning conditions, and the corrosion risk early warning information for emergency warning is obtained and output.

[0136] Specifically, this judgment corresponds to situations where the target pipeline's health level has entered a state of significant degradation, the predicted corrosion rate has reached a high-risk level, or the remaining safe time window has entered a critical state. The emergency corrosion risk warning information is used to indicate the need for immediate and enhanced treatment measures and prioritize risk control actions to reduce the probability of further corrosion development leading to structural failure. By outputting emergency corrosion risk warning information under high-risk or critical time window conditions, timely exposure and rapid response to major risks are achieved.

[0137] S155, if the corrosion health status level is failure, then the target pipeline is determined to meet the level four early warning conditions, and corrosion risk early warning information for shutdown and maintenance is obtained.

[0138] Specifically, this judgment covers situations where the corrosion health status of the target pipeline has reached a failure level. The corrosion risk warning information for shutdown and maintenance is used to indicate that shutdown and maintenance should be carried out to reduce the occurrence of safety incidents caused by continued operation. By directly triggering the corrosion risk warning information for shutdown and maintenance when the corrosion health status level reaches failure, a rigid constraint on severe situations is achieved, enabling the warning judgment to provide clear and actionable instructions under the most severe conditions.

[0139] S156 If the target pipeline meets both the Level II and Level III early warning conditions, then based on the preset safety principle, the early warning level corresponding to the target pipeline is determined to be Level III, and an emergency early warning corrosion risk warning is output.

[0140] Regarding the handling of conflicting early warning levels, when a target pipeline simultaneously meets both the conditions for a Level II and a Level III early warning, a corrosion risk early warning message corresponding to the higher warning level is output, i.e., a Level III early warning. By adopting the highest-level output strategy under multiple concurrent conditions, the safety-side conservatism of the early warning judgment results is achieved, reducing the impact of missed reports or misjudgments on safety management.

[0141] In another specific embodiment, the output of corrosion risk warning information is further explained. The corrosion risk warning information is organized in a structured data format, including at least the target pipeline identifier, the warning trigger time, the corrosion health status level reflected in the pipeline's corrosion health status information, the target corrosion prediction rate reflected in the corrosion prediction information, the safe operation period, and the corresponding handling recommendations for the warning level. This ensures that the warning output can be displayed, retrieved, and traced consistently across different terminals. By structurally encapsulating the assessment and prediction results, standardized expression of the warning information content is achieved, improving the understandability and actionability of the warning information in production operation and maintenance.

[0142] Specifically, corrosion risk warning information is distributed to multiple receiving terminals according to a preset push strategy to achieve synchronous perception and collaborative handling by different positions. On the central control room terminal side, corrosion risk warning information is presented as a prominent warning icon on the monitoring interface corresponding to the target pipeline. When triggered, a pop-up window displays the corrosion health status level associated with the warning, the target corrosion prediction rate, the safe operation period, and response suggestions, enabling on-duty personnel to complete risk confirmation and handling decisions within the same interface.

[0143] On the mobile devices of maintenance personnel, corrosion risk warnings are pushed to their accounts via industrial applications or message notifications, and can also trigger SMS notifications to improve reach. The push notifications include the location information of the target pipeline, presented on a map, enabling maintenance personnel to quickly locate the target and conduct verification and handling. On the management platform, corrosion risk warnings are automatically archived to form warning records, which are then linked to historical data of the target pipeline to generate trend analysis charts. Warning records can be retrieved by target pipeline, warning level, time interval, etc., meeting the management needs for subsequent statistics and maintenance planning.

[0144] In one specific embodiment, a training dataset and a test set need to be established before model training. Corrosion-related data, including operating pressure (P), pipeline wall thickness (δ), service duration (t), operating temperature (T), medium pH value, Cl⁻ concentration, and sulfide content, are collected using a sensor array deployed on the pipeline. This forms corrosion monitoring data. A set of health assessment indicators is constructed based on the corrosion monitoring data and inspection records of the target pipeline. The inspection records may include information such as timestamps of inspection, maintenance, or defect handling events. According to engineering standards, four preset health assessment indicators are set: safety margin Δt, relative thickness ratio t₀, and Δt₀. rw Corrosion rate r c and the number of annual inspections and maintenance (f) IM (τ).

[0145] For the safety margin Δt, the formula is used: , and perform the calculation. Where t min Calculated according to preset engineering standards such as ASME B31.3 or FFS (API 579-1), it represents the minimum thickness required to meet design pressure / load; t actual This refers to the actual measured thickness. The safety margin index directly reflects the safety boundary of the absolute quantity.

[0146] For the relative thickness ratio t rw The formula used is: Calculated and obtained. The measured thickness is normalized to the nominal thickness t. nominal This eliminates dimensional differences between pipe diameters and materials, facilitating cross-process comparisons and visualization. rw The closer it is to 1, the more sufficient the remaining thickness.

[0147] Corrosion rate r c (mm / a) The wall thickness decay rate is estimated using the thickness measurement time series. Following API 570, both long-term and short-term corrosion rates are calculated simultaneously, and the larger rate is used as the evaluation value. The specific formula includes:

[0148]

[0149] in, This represents the long-term corrosion rate. For short-term corrosion rate; r c For evaluation purposes, the larger the value, the faster the thinning and the more unfavorable the health grade.

[0150] For the number of annual inspections and maintenance (f) IM (τ) (times / year), where τ>0 is the observation window length (unit: year, default τ=1; 0.5 years, 2 years, etc. are also possible). At the current evaluation time t k The number of inspection / repair / defect handling events in the past τ years is calculated using the following formula:

[0151]

[0152] The number of annual inspections is:

[0153]

[0154] in, The set of events included in the statistics (such as online inspection, inspection stoppage, repair / replacement, defect handling, etc.); τ is the only adjustable parameter; t e Represents the timestamp of the e-th event; 1() is the indicator function; N IM (τ) represents the total number of events within the observation window. If the window coverage is incomplete, the effective duration T can be used. eff (τ) replaces τ, T eff This represents the actual number of years covered within the window.

[0155] By constructing the aforementioned preset health assessment indicators, an engineering-based quantitative expression of the target pipeline status is achieved from dimensions such as thickness margin, relative remaining thickness, thinning rate, and maintenance frequency.

[0156] To establish a unified expression for corrosion health status levels, a set of tiered thresholds is set for each preset health assessment indicator:

[0157]

[0158] Wherein, Θ is the set of grading thresholds, corresponding to the critical values ​​for grading each health assessment indicator; The three threshold levels for each indicator (from best to worst) correspond to the critical values ​​from healthy to sub-healthy, from sub-healthy to deterioration, and from deterioration to failure, respectively.

[0159] Furthermore, based on a ranking from best to worst, the single-index grading rules, using safety margin, relative thickness ratio, corrosion rate, and annual inspection and maintenance frequency as the basis, include:

[0160]

[0161] in, The classification results are, in order, safety margin, relative thickness ratio, corrosion rate, and annual inspection and maintenance frequency. Each classification result ranges from 1 to 4, monotonically changing from best to worst. To ensure a safety margin, the final corrosion health status level is determined as the most unfavorable result among the four single-indicator classifications, namely:

[0162]

[0163] As can be seen, mapping G to a preset corrosion health status category ensures that the corrosion health status level has safety-side consistency.

[0164] After completing the index calculation and classification, outlier removal was performed on the corrosion monitoring data. Box plots were used to identify outliers, and the lower quartile (Q1), upper quartile (Q3), and interquartile range (IQR) of the characteristic parameters were calculated. Sample values ​​exceeding the interval [Q1−1.5IQR, Q3+1.5IQR] were identified as outliers and removed, thereby reducing the impact of extreme noise on subsequent analysis. Normalization was then performed, mapping each corrosion monitoring parameter in the data to a preset numerical interval [0, 1] to obtain standardized monitoring data. The normalization formula is:

[0165]

[0166] Where x is the original characteristic value (i.e. corrosion monitoring data). The normalized value (i.e., standardized monitoring data), x min and x max These are the minimum and maximum values ​​of the feature in the sample set, respectively.

[0167] After obtaining standardized monitoring data, using preset health assessment indicators as a reference sequence, rank correlation coefficient analysis was performed on each standardized monitoring parameter in the standardized monitoring data and the preset health assessment indicators to obtain the correlation coefficient corresponding to each standardized monitoring parameter. Rank correlation coefficient analysis can be implemented using Spearman's rank correlation coefficient, which measures the degree of rank correlation between variables and maintains good robustness in the presence of nonlinear monotonic relationships or abnormal fluctuations. Furthermore, a correlation threshold was set as a feature selection condition, for example, 0.6. Standardized monitoring parameters with a correlation coefficient greater than or equal to 0.6 were added to the corrosion feature data to form the input feature set required for subsequent models or analyses; parameters that did not reach the threshold were not included in the corrosion feature data. Finally, to support the subsequent training and evaluation process, the sample data was divided into a preset training dataset and a test dataset in a 7:3 ratio.

[0168] In one embodiment, an implementation method is provided for training the corrosion health status assessment model. Based on the above embodiment, the corrosion health status assessment model is implemented using a GLAE-MLP structure. It uses corrosion feature data from the training and testing datasets as model input and the corrosion health status level of the target pipeline as the supervision label output, thereby achieving a risk assessment of the corrosion health status of the target pipeline. The training dataset consists of multiple sets of samples, each containing input features and labels, where the input features are denoted as the input operating condition vector. The input operating condition vector consists of corrosion feature data generated from corrosion monitoring data of the target pipeline after data preprocessing. The label category set is defined as {1: healthy, 2: sub-healthy, 3: degraded, 4: failed}, and the true health level of each sample is denoted as y. i .

[0169] During model training, gated linear units (GLUs) are used at the input to form gated features and suppress noise channels unrelated to degradation, thereby improving the effectiveness of the input features. For the i-th sample, the formula is:

[0170]

[0171] Calculate its gated eigenvector h i , where x i Let W be the input condition vector for the i-th sample. f Let b be the feature transformation weight matrix. f W is the feature transformation bias vector. g Let b be the gated weight matrix. g Let be the gated bias vector, σ() be the Sigmoid activation function with an output range of [0, 1], and ⊙ represent the Hadamard product. After obtaining the gated features, the gated features are input into the autoencoder to achieve nonlinear compression and reconstruction. The encoder outputs a low-dimensional latent variable z=f θ (h), the decoder outputs the reconstruction result. , where θ and φ are the encoder and decoder parameters, respectively. To improve representation stability, a joint gating constraint including a reconstruction term, a sparsity term, and a weight decay term is used as the representation learning objective during training:

[0172]

[0173] Where, λ s and λ w These are preset coefficients.

[0174] Restructuring items are represented as ; where x i Let be the input vector for the i-th sample. The reconstructed vector of the i-th sample is obtained by the decoder based on the low-dimensional latent variable features; for Norm.

[0175] Sparse terms are represented as ;z i Let s be a low-dimensional latent variable of the i-th sample; i For the gated output of the i-th sample, ; for Norm.

[0176] The weight decay term is represented as Where Ψ is the set of parameters, .

[0177] Through the above representation learning process, while ensuring information fidelity, low-dimensional latent variables are focused on key channels related to health degradation, improving robustness to operating condition disturbances and noise inputs, thereby providing a more stable input representation for subsequent corrosion health status classification.

[0178] In the state classification stage, the low-dimensional latent variable z obtained from representation learning is... i Input a two-layer MLP to obtain the classification score vector logits o i The posterior probability distribution is then output via Softmax, resulting in four levels of probability distribution.

[0179]

[0180] Among them, o i =MLP(z i T>0 is the temperature coefficient used for probability calibration, with T=1 by default. `softmax(⋅)` is the activation function, transforming `logits` into a probability distribution that sums to 1. To alleviate class imbalance and suppress overconfident false predictions, weighted focal cross-entropy L0 is used. cls As a classification objective:

[0181]

[0182] Where, α k Weighting coefficients And normalized to determine γ f ≥0 is the focal factor, 1() is the indicator function; p ik Let y be the posterior probability that the i-th sample belongs to the k-th class; iLet be the true health level of the i-th sample. This step maps the latent variables to a probability distribution of healthy (1), sub-healthy (2), deteriorated (3), and failed (4). By setting this loss function, the model maintains sufficient optimization drive for minority class samples during training, while reducing overconfidence in error-prone samples, thereby improving the stability and accuracy of identifying the corrosion health status level.

[0183] In terms of training strategy, phased training or joint training methods can be used to determine model parameters. Under the phased training method, first based on L... rec The gated linear unit and the autoencoder are trained to obtain stable low-dimensional latent variable representations. Then, under the condition of freezing or partially freezing the representation module parameters, based on L... cls A two-layer MLP is trained to classify the corrosion health state. In the joint training approach, the representation learning objective and the classification objective are combined into a total loss L=L. rec +βL cls β is a preset weight coefficient used to coordinate the optimization intensity of representation learning and classification learning. During training, parameters are updated using an iterative optimization method, and the effect of corrosion health status classification is verified on a preset validation dataset. When the preset convergence condition is met or the preset number of iterations is reached, the model parameters are fixed to obtain a pre-trained corrosion health status evaluation model that has passed the validation.

[0184] To further illustrate this application, the feed pipeline of a sulfuric acid alkylation unit in a refinery was selected as the target pipeline. This pipeline is made of Alloy 20, with a design pressure of 2.5 MPa and a design temperature of 120°C, and primarily transports a mixed medium containing sulfuric acid. A total of 3600 sets of continuous operating data were collected by deploying a multi-type sensor array. The collected characteristic parameters included operating temperature, medium pH value, operating pressure, medium flow rate, sulfuric acid concentration, and pipeline wall thickness. Simultaneously, the corrosion rate (mm / a) was measured using a combination of corrosion strip method and ultrasonic testing as basic labeling information, forming the original sample dataset. Partial original data is shown in Table 1.

[0185] Table 1. Partial Corrosion Characteristic Data

[0186]

[0187] To train the corrosion health status assessment model, samples need to be mapped to preset corrosion health status categories. Based on the refinery's corrosion protection guidelines and equipment corrosion control manual, health assessment indicators are constructed and grading thresholds are set, forming a four-level corrosion health status classification standard: Level I (healthy), Level II (sub-healthy), Level III (degraded), and Level IV (failure), with corresponding indicator ranges provided. Details are as follows:

[0188]

[0189] Next, based on the corrosion health status classification criteria, the data in the dataset were labeled, and the corresponding index intervals for each level are shown in Table 2:

[0190] Table 2. Index ranges corresponding to the four levels

[0191]

[0192] In the data preprocessing stage, outlier removal, normalization, and feature selection were performed on the original features. Outlier removal used box plots to detect the collected feature parameters. Taking the medium flow velocity as an example, Q1=19.6m / s, Q3=23.8m / s, and IQR=4.2m / s were calculated. The outlier threshold range was [13.3m / s, 30.1m / s]. After removing one outlier sample with a flow velocity of 31.2m / s, 3599 valid data sets remained, resulting in a total of 3550 valid data sets.

[0193] Normalization maps the features to the [0, 1] interval. Taking operating temperature as an example, the original range is 8.2–9.5℃. The normalized result for a sample temperature of 9.1℃ is (9.1-8.2) / (9.5-8.2) = 0.692. Subsequently, Spearman rank correlation coefficient analysis is used to correlate the above parameters with four health assessment indicators (Δt, t...). rw r c f IM Relevance ρ s Parameters greater than 0.6 were used as model inputs. Seven input parameters were selected: operating temperature, pH value, medium flow rate, sulfuric acid concentration, iron ion content, chloride ion content, and sulfide content. The training set of 2485 groups (70%) and the test set of 1065 groups (30%) were randomly divided in a 7:3 ratio.

[0194] During the model construction and training phases, seven input parameters were used to construct an input vector and fed into the corrosion health status assessment model. This model consists of a gated feature processing layer, an autoencoder feature processing layer, and a hierarchical classification layer. The input layer has seven neurons corresponding to seven core parameters. The gated feature processing layer uses gated linear units to perform gated weighting on the input. The autoencoder feature processing layer uses an encoder (7→14→9) to compress the gated features into nine low-dimensional latent variables, which are then reconstructed by a decoder (9→14→7), while introducing joint constraints including reconstruction, sparsity, and weight decay. The hierarchical classification layer uses a two-layer fully connected network (9→18) and outputs the posterior probability distribution of four corrosion health status categories using Softmax. During training, the optimizer was set to Adam, the learning rate to 0.001, the batch size to 32, and the loss function was weighted focal cross-entropy to alleviate class imbalance.

[0195] During the performance verification phase, the traditional multilayer perceptron (MLP), autoencoder-multilayer perceptron (AE-MLP), and gated linear unit enhanced autoencoder-multilayer perceptron (GLAE-MLP) were compared and evaluated. The confusion matrix of the three models on the corrosion health status assessment task is as follows: Figure 2 As shown, where, Figure 2 This is a schematic diagram of the confusion matrix for corrosion health status assessment results provided in an embodiment of this application. Rows represent true categories 1-4, and columns represent predicted categories 1-4. Figure 2 The data shows that GLAE-MLP has a higher diagonal proportion and a lower cross-class false positive rate in each corrosion health status category, demonstrating higher stability and reliability in corrosion health status level identification. Next, four performance metrics—accuracy, precision, recall, and F1 score—were used to evaluate the performance of the three models, and the comparison results are shown in Table 3.

[0196] Table 3. Comparison of performance indicators of the three evaluation models

[0197]

[0198] Among them, the gated linear unit enhanced autoencoder-multilayer perceptron (GLAE-MLP) achieved an accuracy of 96.78%, precision of 95.46%, recall of 97.19%, and F1 score of 96.07% on the test set, demonstrating higher consistency and discrimination capabilities compared to traditional multilayer perceptrons and autoencoder-multilayer perceptrons.

[0199] Next, Support Vector Regression (SVR) is adopted as the basic model for corrosion rate prediction, and its hyperparameters are optimized using the Adaptive Weighted Gray Wolf Optimization (AWE) algorithm to form the AWGWO-SVR corrosion rate prediction model. The hyperparameters to be optimized are the penalty coefficient C, the kernel function parameter γ, and the insensitive loss parameter ε, where C ∈ [0.1, 10], γ ∈ [0.1, 10], and ε ∈ [0.01, 0.1]; the radial basis function (RBF) kernel is used. Meanwhile, the parameters of the AWE algorithm are set as follows: wolf pack size N = 30, maximum number of iterations T = 50, initial adaptive weight α0 = 2, adjustment coefficient k = 3, convergence speed exponent γ = 1.2, dynamic perturbation intensity 0.03, and perturbation standard deviation σ = 0.2. Under these parameter settings, the AWE algorithm iteratively searches within the search space of the hyperparameters to be optimized, minimizing the error index of the SVR prediction model on the training set, thereby improving the accuracy of corrosion rate prediction.

[0200] In the optimization process, population initialization is first performed. Thirty sets of initial parameter combinations (C, γ, ε) are randomly generated within the search space of C, γ, and ε. Each parameter combination is then used as the initial position parameter for a search individual, forming the initial gray wolf population. Subsequently, the mean squared error (MSE) of the support vector regression prediction model on the training set is used as the fitness function to evaluate the support vector regression prediction model corresponding to each search individual in the current gray wolf population, resulting in a fitness set. The current α (optimal wolf), β (second-best wolf), and δ (third-best wolf) are then selected. During the position update phase, the weight parameter α(t) is iteratively updated according to the adaptive weight update rule. At the 10th iteration, α = 1.62, and at the 30th iteration, α = 0.78. To enhance the ability to escape local optima, a normal perturbation (perturbation standard deviation σ = 0.2) is added to the position parameters of α, β, and δ wolves. Perturbed position parameters are generated under a perturbation strength of 0.03, and these parameters are then used to update the position parameters of each search individual in the current gray wolf population. As the iterations proceed, the fitness convergence curve gradually stabilizes. By the 40th iteration, the fitness value (MSE) stabilizes, and the final MSEs of the mild, moderate, and severe corrosion sub-models converge to 0.00032, 0.00038, and 0.00045, respectively.

[0201] In this embodiment, the pre-trained corrosion prediction model is constructed into three sub-models based on corrosion severity: mild corrosion, moderate corrosion, and severe corrosion. The optimal hyperparameter combination for each sub-model is determined using the adaptive weighted gray wolf optimization algorithm. The optimal parameters and test set performance of the sub-models obtained after optimization are shown in Table 4.

[0202] Table 4. Optimal parameters and test set performance of the hierarchical model

[0203]

[0204] Furthermore, the comparison results with the traditional model are shown in Table 5:

[0205] Table 5 Model Performance Comparison Table

[0206]

[0207] As can be seen, the overall MSE of AWGWO-SVR is reduced by 36.8% compared to GWO-SVR, while the R² is improved by 6.8%. This not only improves the model's prediction accuracy but also directly translates into improved early warning timeliness by reducing prediction errors. In the Level 2 early warning scenario, AWGWO-SVR triggers the warning one year earlier than GWO-SVR; in the Level 3 emergency early warning scenario, it triggers the warning approximately six months earlier than the traditional SVR, providing a critical time window for emergency response such as equipment maintenance and pipeline repair, thus compensating for the shortcomings of existing models in early warning lag under complex operating conditions. By optimizing the hyperparameters of the support vector regression prediction model through adaptive weights and dynamic perturbation strategies, prediction errors can be reduced and the reliability of corrosion prediction information can be improved, providing a more stable input basis for subsequent calculations of safe operating period and generation of corrosion risk early warning information based on corrosion prediction information.

[0208] In this embodiment, real-time corrosion monitoring data of the feed inlet of the northern section of the target pipeline is collected at a certain evaluation time. The corrosion monitoring data includes operating temperature (8.9℃), pH value (1.53), operating pressure (1.04MPa), medium flow rate (22.8m / s), sulfuric acid concentration (98.4%), iron ion content (8.7ppm), chloride ion content (1.6ppm), sulfide content (61.5ppm), and current wall thickness (7.8mm). Based on preset data preprocessing rules, the corrosion monitoring data is normalized and filtered to align all monitoring parameters at the same scale and the same sampling time. Seven parameters for model input are extracted to form the corrosion characteristic data corresponding to that time.

[0209] During the corrosion health status assessment phase, corrosion characteristic data is input into a pre-trained corrosion health status assessment model to obtain the probability distribution of corrosion health status corresponding to each preset corrosion health status category of the target pipeline, specifically: healthy (0.12), sub-healthy (0.75), degraded (0.13), and failed (0.00). Based on the probability distribution of corrosion health status, the corrosion health status level is determined using the maximum probability principle. Accordingly, the corrosion health status level of the target pipeline is determined to be II (sub-healthy).

[0210] In the corrosion prediction stage, corrosion characteristic data at the same time point are input into the pre-trained corrosion prediction model. The mild corrosion sub-model outputs a predicted value of 0.072 mm / a (within the mild range), the moderate corrosion sub-model outputs a predicted value of 0.105 mm / a (within the moderate range), and the severe corrosion sub-model outputs a predicted value of 0.118 mm / a (within the moderate range). A graded voting mechanism is adopted, following the worst-case scenario principle prioritizing safety; that is, if two out of the three sub-models predict within the moderate range, the target corrosion level is determined to be moderate corrosion. Furthermore, the highest predicted corrosion rate is selected as the target predicted corrosion rate, i.e., 0.118 mm / a.

[0211] During the safe operating period calculation phase, the current pipe wall thickness is 7.8 mm; combined with the target corrosion prediction rate of 0.118 mm / a, and based on the preset calculation relationship, the remaining safe operating time T is obtained. safe Approximately 6.7 years. Based on the assessment and prediction results, a Level II early warning is triggered, generating structured corrosion risk early warning information. This information is then pushed to different receiving terminals through multiple channels: an orange warning icon is displayed on the central control room terminal, along with a pop-up window showing the health level, predicted rate, remaining lifespan, and response suggestions; SMS notifications with pipeline location maps are sent to maintenance personnel's mobile devices via an industrial app; and early warning records are automatically archived on the management platform, and trend analysis charts are generated by linking historical data, ensuring immediate visibility, on-site actionability, and full-process traceability of the early warning information.

[0212] Figure 3 This is a schematic diagram of the structure of the pipeline corrosion risk early warning device provided in the embodiments of this application, as shown below. Figure 3 As shown, the pipeline corrosion risk early warning device 30 provided in this embodiment includes:

[0213] The data processing module 301 is used to acquire corrosion monitoring data collected by the sensor array deployed on the target pipeline, and to perform data preprocessing on the corrosion monitoring data according to the preset data preprocessing rules to obtain corrosion characteristic data.

[0214] The pipeline condition assessment module 302 uses a pre-trained corrosion health status assessment model based on corrosion characteristic data to obtain corrosion health status information of the target pipeline.

[0215] The corrosion prediction module 303 is used to obtain corrosion prediction information of the target pipeline based on corrosion feature data and a pre-trained corrosion prediction model; wherein, the corrosion prediction model is a model determined by hyperparameter optimization through an adaptive weighted gray wolf optimization algorithm.

[0216] The period calculation module 303 is used to calculate and obtain the safe operation period of the target pipeline based on the current pipeline wall thickness and corrosion prediction information.

[0217] The result output module 305 is used to obtain and output corrosion risk warning information of the target pipeline based on the corrosion health status information, corrosion prediction information and safe operation period of the target pipeline, and through preset warning judgment rules.

[0218] The pipeline corrosion risk early warning device 30 provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0219] Figure 4This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device 40 provided in this embodiment includes at least one processor 401 and a memory 402. Optionally, the electronic device 40 further includes a communication component 403. The processor 401, memory 402, and communication component 403 are connected via a bus 404.

[0220] In the specific implementation process, at least one processor 401 executes the computer execution instructions stored in the memory 402, causing at least one processor 401 to perform the above-described method. The specific implementation process of the processor 401 can be found in the above-described method embodiments, and its implementation principle and technical effects are similar; therefore, it will not be repeated here.

[0221] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0222] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0223] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0224] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for early warning of pipeline corrosion risk, characterized in that, include: Based on the sensor array deployed on the target pipeline, the corrosion monitoring data collected by the sensor array is acquired, and the corrosion monitoring data is preprocessed according to the preset data preprocessing rules to obtain corrosion characteristic data. Based on the corrosion characteristic data, a pre-trained corrosion health status assessment model is used to obtain the corrosion health status information of the target pipeline. Based on the corrosion feature data, a pre-trained corrosion prediction model is used to obtain corrosion prediction information for the target pipeline; wherein, the corrosion prediction model is a model determined by hyperparameter optimization through an adaptive weighted gray wolf optimization algorithm. Based on the current pipe wall thickness of the target pipeline and the corrosion prediction information, the safe operating period of the target pipeline is calculated and obtained. Based on the corrosion health status information of the target pipeline, the corrosion prediction information, and the safe operation period, corrosion risk warning information of the target pipeline is obtained and output through preset warning judgment rules.

2. The method according to claim 1, characterized in that, The corrosion health status assessment model includes a gated feature processing layer, an autoencoder feature processing layer, and a hierarchical classification layer. Accordingly, based on the corrosion characteristic data, a pre-trained corrosion health status assessment model is used to obtain the corrosion health status information of the target pipeline, including: Through the gated feature processing layer, the corrosion feature data is subjected to feature mapping linear transformation and gated mapping linear transformation respectively to obtain feature mapping results and gated mapping results. The gated mapping results are then processed using an activation function to obtain gated coefficients. Finally, the gated coefficients are multiplied element-wise with the feature mapping results to obtain gated features. Through the self-encoding feature processing layer, a preset encoder is used to perform non-linear encoding processing on the gated features to obtain low-dimensional latent variable features; Through the hierarchical classification layer, the low-dimensional latent variable features are mapped to the classification scores corresponding to each preset corrosion health state category, and the classification scores are subjected to exponential normalization to obtain the corrosion health state probability distribution corresponding to each preset corrosion health state category. The corrosion health status level of the target pipeline is determined based on the corrosion health status probability distribution.

3. The method according to claim 1, characterized in that, The corrosion prediction model includes a mild corrosion sub-model, a moderate corrosion sub-model, and a severe corrosion sub-model; Accordingly, based on the corrosion feature data, a pre-trained corrosion prediction model is used to obtain corrosion prediction information for the target pipeline, including: Based on the corrosion feature data, a first corrosion prediction rate and a first corrosion level corresponding to the first corrosion prediction rate are obtained through a pre-trained mild corrosion sub-model. Based on the corrosion feature data, a second corrosion prediction rate and a second corrosion level corresponding to the second corrosion prediction rate are obtained through a pre-trained moderate corrosion sub-model. Based on the corrosion feature data, a third corrosion prediction rate and the third corrosion level corresponding to the third corrosion prediction rate are obtained through a pre-trained severe corrosion sub-model. Based on the first corrosion level, the second corrosion level, and the third corrosion level, a preset level voting rule is used to obtain the target corrosion level corresponding to the target pipeline. Based on the first corrosion prediction rate, the second corrosion prediction rate, and the third corrosion prediction rate, one or more corrosion prediction rates corresponding to the target corrosion level are obtained, and the largest corrosion prediction rate is taken as the target corrosion prediction rate corresponding to the target pipeline.

4. The method according to claim 3, characterized in that, The step of calculating the safe operating period of the target pipeline based on the current pipe wall thickness and the corrosion prediction information includes: Obtain the current pipe wall thickness of the target pipe, and obtain the preset safe thickness threshold corresponding to the target pipe; Based on the corrosion prediction information, the target corrosion prediction rate is obtained, and the safe operating period of the target pipeline is calculated based on the current pipeline wall thickness, the preset safe thickness threshold, and the target corrosion prediction rate.

5. The method according to claim 1, characterized in that, Obtaining the pre-trained corrosion prediction model includes: Based on the hyperparameters to be optimized, determine the search space of the hyperparameters to be optimized, and generate multiple sets of initial hyperparameter combinations within the search space of the hyperparameters to be optimized; Each of the aforementioned initial hyperparameter combinations is determined as the initial position parameters for the corresponding search individual to obtain the initial gray wolf population; wherein, the initial gray wolf population contains multiple search individuals; The initial gray wolf population is designated as the current gray wolf population, and the current iteration number is obtained; When the current iteration number has not reached the preset iteration number, a support vector regression prediction model is constructed based on the position parameters corresponding to each searched individual in the current gray wolf population. Based on the preset training dataset, the mean squared error of the training set corresponding to the support vector regression prediction model is calculated, and the mean squared error of the training set is used as the fitness to obtain the fitness set corresponding to the current gray wolf population. Based on the fitness set, the current gray wolf population is screened to obtain a preset number of target search individuals, and the position parameters of multiple target search individuals are dynamically perturbed to obtain the perturbed position parameters of each target search individual. Based on the current iteration number and the preset iteration number, a preset nonlinear adaptive weight update rule is used to determine the weight parameters corresponding to the current iteration number; Based on the weight parameters and the perturbed position parameters of each target search individual, the position parameters of each search individual in the current gray wolf population are updated to obtain the updated gray wolf population. The updated gray wolf population is recorded as the current gray wolf population, and the current iteration number is updated. When the current iteration count reaches the preset iteration count, the search individual with the best fitness in the updated gray wolf population is selected, and the position parameters of the search individual with the best fitness are used as the target hyperparameter combination of the support vector regression prediction model. Based on the target hyperparameter combination, the support vector regression prediction model is trained and validated according to a preset training dataset and a preset validation dataset, respectively, to obtain the pre-trained corrosion prediction model that has passed the validation.

6. The method according to claim 5, characterized in that, Based on the fitness set, the current gray wolf population is screened to obtain a preset number of target individuals. The position parameters of multiple target individuals are then dynamically perturbed to obtain the perturbed position parameters of each target individual, including: Based on the fitness set, the fitness of each search individual in the current gray wolf population is sorted, and the optimal search individual, the second-best search individual, and the third-best search individual are determined according to a preset number. Obtain the position parameters corresponding to the optimal search individual, the second-best search individual, and the third-best search individual, respectively; By superimposing random perturbation parameters on the position parameters corresponding to the optimal search individual, the second-best search individual, and the third-best search individual, respectively, the perturbed position parameters corresponding to the optimal search individual, the second-best search individual, and the third-best search individual are obtained.

7. The method according to claim 5, characterized in that, Based on the current iteration number and the preset iteration number, a preset nonlinear adaptive weight update rule is used to determine the weight parameters corresponding to the current iteration number, including: Obtain the current iteration number and the preset iteration number using the formula: Calculate and obtain the weight parameter α(t) corresponding to the current iteration number; Where t is the current iteration number, T is the preset iteration number, α0 is the initial weight value, k is the adjustment coefficient, and γ is the convergence speed exponent.

8. The method according to any one of claims 1 to 7, characterized in that, The step of preprocessing the corrosion monitoring data according to preset data preprocessing rules to obtain corrosion characteristic data includes: Based on the corrosion monitoring data, through normalization processing, each corrosion monitoring parameter in the corrosion monitoring data is mapped to a preset value range to obtain standardized monitoring data; Multiple preset health assessment indicators are obtained, and a rank correlation coefficient analysis is performed on each standardized monitoring parameter in the standardized monitoring data and the preset health assessment indicators to obtain the correlation coefficient corresponding to each standardized monitoring parameter. Based on a preset correlation threshold, standardized monitoring parameters with correlation coefficients greater than or equal to the correlation threshold are added to the corrosion feature data.

9. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 8.