Dynamic prediction method and device for corrosion rate of low alloy steel

By constructing a dynamic prediction method and device for the corrosion rate of low alloy steel, and using environmental factors and corrosion current data, a machine learning model is employed for prediction, which solves the problem of accurate quantification of the corrosion status of low alloy steel, reduces labor costs and improves efficiency.

CN121561850APending Publication Date: 2026-02-24SOUTHWEST TECHNICAL ENGINEERING RESEARCH INSTITUTE OF CHINA SOUTH IND GROUP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511766721.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately quantify and predict the corrosion of low-alloy steel, resulting in a lack of targeted anti-corrosion measures and increased labor costs and time inefficiency.

Method used

By acquiring environmental factors and corrosion current data, a correlation model is constructed using machine learning methods, target environmental factors are screened, and a dynamic prediction method and device for the corrosion rate of low alloy steel are established. The prediction is then performed using a genetic algorithm-backpropagation neural network or a long short-term memory network model.

Benefits of technology

It enables accurate prediction of corrosion rate of low alloy steel, reduces the labor cost and low efficiency of traditional periodic inspections, and provides timely anti-corrosion measures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121561850A_ABST
    Figure CN121561850A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for dynamically predicting the corrosion rate of low alloy steel. The method comprises the following steps: acquiring environmental factors and corrosion current; carrying out pretreatment on environmental factors and corrosion current; carrying out correlation analysis on the preprocessed environmental factors and the corrosion current, and screening to obtain target environmental factors; adopting a machine learning method to construct a correlation model between the target environment factors and the corrosion current; and acquiring actual service environment factors of the to-be-detected low alloy steel in real time by utilizing the constructed correlation model, so as to realize real-time prediction of the corrosion rate of the to-be-detected low alloy steel. A model verification result shows that the model can effectively describe a nonlinear relationship between environmental factors and corrosion parameters, and accurate prediction of the corrosion rate of the low alloy steel is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of safety monitoring of engineering equipment, and in particular to a method and device for dynamic prediction of corrosion rate of low alloy steel used in engineering. Background Technology

[0002] The corrosion problem of low-alloy steel is mainly affected by a variety of factors, including environmental factors, material properties, and construction techniques. In atmospheric environments, moisture, oxygen, salt, and pollutants can all lead to corrosion of steel structures. In addition, long-term wear of steel materials can destroy the original passivation film, and the exposed metal can react with corrosive media, causing wear corrosion, which is also an important factor leading to the corrosion of low-alloy steel.

[0003] To address corrosion issues, effective anti-corrosion measures are needed to extend the service life of engineering equipment and ensure public safety. These measures include using high-performance anti-corrosion coatings, employing thermal spraying technology to form a dense protective layer, and combining multiple anti-corrosion technologies, such as coatings and cathodic protection, to provide more comprehensive corrosion protection. These measures can effectively address the corrosion challenges posed by atmospheric environments, ensuring the long-term safety and stability of engineering equipment.

[0004] Accurately quantifying and predicting the corrosion of low-alloy steel, and thus providing targeted and timely anti-corrosion measures for relevant low-alloy steel, can ensure the timeliness of engineering equipment maintenance. At the same time, it can reduce the problems of high labor costs and low time efficiency caused by the traditional method of organizing engineering personnel for regular inspections. This has high practical application value for the maintenance of low-alloy steel. Summary of the Invention

[0005] To address the aforementioned technical problems, this application provides a method and apparatus for dynamically predicting the corrosion rate of low alloy steel.

[0006] Firstly, this application provides a method for dynamically predicting the corrosion rate of low alloy steel: Obtain environmental factors and corrosion current; The environmental factors and corrosion current are pretreated. Correlation analysis was performed on the pretreated environmental factors and corrosion current to screen out the target environmental factors; A machine learning approach was used to construct a correlation model between target environmental factors and corrosion current. By using the established correlation model, the actual service environment factors of the low alloy steel under test are collected, and the corrosion rate of the low alloy steel under test can be predicted in real time.

[0007] Optionally, the pretreatment of the environmental factors and corrosion current includes: The environmental factors and corrosion currents are normalized over time to ensure a one-to-one correspondence over time.

[0008] Optionally, the correlation analysis between the pretreated environmental factors and the corrosion current, and the selection of target environmental factors, include: A qualitative analysis of the horizontal relationship between various environmental factors and corrosion current was conducted. The random forest algorithm was used to rank the importance of variables in the environmental factor model and screen out the target environmental factors that affect corrosion current.

[0009] Optionally, the step of constructing a correlation model between target environmental factors and corrosion current using machine learning methods includes: A genetic algorithm-backpropagation neural network model was used to establish a correlation model between target environmental factors and corrosion current; Alternatively, a long short-term memory (LSTM) neural network model can be used to establish a correlation model between target environmental factors and corrosion current.

[0010] Optionally, the environmental factors include air temperature, air humidity, atmospheric pressure, wind speed, wind direction, CO2 concentration, PM2.5 concentration, PM10 concentration, SO2 concentration, and NO2 concentration.

[0011] Secondly, this application provides a device for dynamically predicting the corrosion rate of low-alloy steel; the device includes modules for performing the method in the first aspect or any possible implementation of the first aspect: The device includes: The acquisition module is used to acquire environmental factors and corrosion current; The pretreatment module is used to pretreat the environmental factors and corrosion current. The screening module is used to perform correlation analysis between pretreated environmental factors and corrosion current, and to screen out target environmental factors. The learning module is used to construct a correlation model between target environmental factors and corrosion current using machine learning methods. The prediction module is used to collect the actual service environment factors of the low alloy steel under test using the constructed correlation model, so as to realize the real-time prediction of the corrosion rate of the low alloy steel under test.

[0012] Optionally, the preprocessing module is used to normalize the environmental factors and corrosion current in the time dimension to ensure that they correspond one-to-one in the time dimension.

[0013] Optionally, the screening module is used to perform a qualitative analysis of the horizontal relationship between various environmental factors and corrosion current, and to sort the environmental factor model by variable importance using a random forest algorithm to screen out the target environmental factors that affect corrosion current.

[0014] Optionally, the learning module is used to establish a correlation model between the target environmental factors and the corrosion current using a genetic algorithm-backpropagation neural network model; or, to establish a correlation model between the target environmental factors and the corrosion current using a long short-term memory neural network model.

[0015] Thirdly, this application provides an apparatus including an environmental factor collector, a processor, a memory, and a communication bus. The environmental factor collector is connected to the processor via the communication bus and is used to collect the actual service environmental factors of the low alloy steel to be tested. The communication bus is used to realize the communication connection between the memory and the processor. The processor is used to execute a computer program stored in the memory to implement the method described in any of the above.

[0016] Fourthly, this application also provides a computer program product that can be executed by a processor to implement the method described above.

[0017] Beneficial technical effects: It enables accurate prediction of corrosion rate of low alloy steel, reducing the high labor costs and low efficiency of traditional methods that rely on regular inspections by engineering personnel. Attached Figure Description

[0018] Figure 1 A schematic flowchart of a method for dynamically predicting the corrosion rate of low alloy steel provided in this application embodiment; Figure 2 A partial screenshot of a meteorological data list provided in an embodiment of this application; Figure 3 This is a partial screenshot of a corrosion current acquisition document provided in an embodiment of this application; Figure 4 A data list of environmental factor data after time-dimension normalization, provided as an embodiment of this application; Figure 5 A schematic diagram illustrating the trend of air temperature change over time, provided as an embodiment of this application; Figure 6 A schematic diagram illustrating the changing trend of air humidity over time, provided as an embodiment of this application; Figure 7 A schematic diagram illustrating the trend of atmospheric pressure over time, provided as an embodiment of this application; Figure 8 A schematic diagram illustrating the trend of SO2 variation over time, provided as an embodiment of this application; Figure 9 A schematic diagram illustrating the trend of CO2 variation over time, provided as an embodiment of this application; Figure 10 A schematic diagram illustrating the change trend of NO2 over time, provided as an embodiment of this application; Figure 11 A schematic diagram illustrating the variation trend of PM2.5 over time, provided as an embodiment of this application; Figure 12 A schematic diagram illustrating the variation trend of PM10 over time, provided as an embodiment of this application; Figure 13 A schematic diagram illustrating the trend of pretreated air temperature over time, provided in an embodiment of this application; Figure 14 A schematic diagram illustrating the trend of pre-treated air humidity over time, provided in an embodiment of this application; Figure 15 A schematic diagram illustrating the trend of atmospheric pressure change over time after pretreatment, provided as an embodiment of this application; Figure 16 A schematic diagram illustrating the trend of SO2 change over time after pretreatment, provided in an embodiment of this application; Figure 17 A schematic diagram illustrating the trend of CO2 change over time after pretreatment, provided in an embodiment of this application; Figure 18 This application provides a schematic diagram illustrating the change trend of pretreated NO2 over time in an embodiment of the present application. Figure 19 A schematic diagram illustrating the trend of pretreated PM2.5 over time, provided as an embodiment of this application; Figure 20 A schematic diagram illustrating the change trend of pre-processed PM10 over time, provided as an embodiment of this application; Figure 21 This is a schematic diagram illustrating the trend of corrosion current over time, provided as an embodiment of this application. Figure 22 This is a schematic diagram illustrating the trend of corrosion current over time after pretreatment, provided in an embodiment of this application. Figure 23 A heatmap of Pearson correlation coefficient analysis results among environmental factors provided in this application embodiment; Figure 24 A schematic diagram of a random forest model provided in an embodiment of this application; Figure 25 This is a schematic diagram illustrating the importance results of a random forest variable, provided in an embodiment of this application. Figure 26 A flowchart of a GA-BP model provided in this application embodiment; Figure 27 A schematic diagram of the mean square error iteration process of a GA-BP model provided in this application embodiment; Figure 28A schematic diagram illustrating the learning rate parameter iteration process of a GA-BP model provided in this application embodiment; Figure 29 A comparison chart of the test set and model predictions of a GA-BP model provided in this application embodiment; Figure 30 A schematic diagram of the network structure of an LSTM model provided in an embodiment of this application; Figure 31 A schematic diagram illustrating the learning rate iteration process of an LSTM model provided in this application embodiment; Figure 32 A comparison chart of LSTM model test set and model prediction values ​​provided for embodiments of this application; Figure 33 This is a schematic diagram of a low-alloy steel corrosion rate dynamic prediction device provided in an embodiment of this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0020] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items. The term “exemplary” means “serving as an example, embodiment, or illustration,” and any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments. The terms “first” and “second” are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as “first” or “second” may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, “a plurality” means two or more.

[0021] To accurately quantify and predict the corrosion of low-alloy steel, and thus provide targeted and timely anti-corrosion measures to ensure timely maintenance of engineering equipment, while reducing the high labor costs and low efficiency of traditional regular inspections by engineering personnel, this application provides a method and apparatus for dynamic prediction of low-alloy steel corrosion rate. Based on environmental factor data and corrosion current data, it first uses an index dimensionality reduction method to screen out the target environmental factors affecting metal corrosion, and then establishes a correlation model between corrosion current and target environmental factors, providing support for dynamic prediction of atmospheric corrosion. This method effectively solves the aforementioned technical problems.

[0022] refer to Figure 1 A method for dynamically predicting the corrosion rate of low alloy steel mainly includes the following steps: S102: Obtain environmental factors and corrosion current.

[0023] In this embodiment, the collected data includes two categories: environmental factors and corrosion current data. The environmental factors include meteorological data such as temperature, humidity, and atmospheric pressure, which can be collected by an atmospheric environment medium sensor. The corrosion current data can be detected by a corrosion current sensor.

[0024] In this embodiment, the atmospheric environment medium sensors include temperature sensors, humidity sensors, air pressure sensors, noise sensors, wind speed sensors, wind direction sensors, optical rainfall sensors, piezoelectric rainfall sensors, carbon dioxide sensors, air particulate matter sensors, sulfur dioxide sensors, and nitrogen dioxide sensors, etc., used to detect environmental factors on the bridge, including air temperature, air humidity, atmospheric pressure, noise, wind speed, wind direction, optical rainfall, piezoelectric rainfall, CO2, PM2.5, PM10, SO2, and NO2. The corrosion current sensor uses an ACM instrument and can be used to collect corrosion current data.

[0025] In this embodiment, meteorological and corrosion current data can be acquired using a monitoring fixture. This fixture is designed based on a PLC main control system and uses the Modbus RTU serial communication protocol to establish communication with the sensor module. The monitoring fixture consists of a sample holder, an electrical box, and an integrated meteorological louver box. The sample holder is used to mount and fix 48 bare metal samples and 48 coated samples; the electrical box is used to house the control system and power supply; and the integrated meteorological louver box is used for collecting environmental data. This monitoring fixture can acquire no less than 6 data points per hour, with a data transmission rate of no less than once per hour. It can detect at least three factors: temperature, humidity, and corrosion current.

[0026] In this embodiment, the meteorological data are labeled CH0, CH1, CH2, CH3, CH4, CH5, CH6, CH7, CH8, CH9, CH10, CH11, and CH12, respectively, and the read values ​​are integers (data list as follows). Figure 2 (As shown in the figure); the categories, units, and decimal places of each data label representing environmental factors are shown in Table 1.

[0027] Table 1. Environmental Factors Data Communication Points Table

[0028] In this embodiment, the corrosion current acquisition data is in txt format, where the valid data are "time" and "i1", such as... Figure 3 As shown, time and corrosion current are represented respectively.

[0029] The formation of corrosion current is mainly due to the chemical reaction between the metal surface and moisture, oxygen, and other corrosive substances (such as salts and acidic gases) in the environment, leading to redox reactions on the metal surface. Studies on the corrosion behavior and patterns of metallic materials in atmospheric environments primarily employ outdoor atmospheric exposure tests and indoor accelerated testing. However, these traditional methods have long testing cycles, limited data, are prone to large errors, and cannot obtain information on the process of corrosion changes over time, posing certain challenges to atmospheric corrosion research.

[0030] In this embodiment, an ACM instrument is used to collect corrosion current. When two metal materials with different potentials are used as electrodes and exposed to the atmosphere, a corrosion galvanic cell will form if a liquid film is present. In this cell, one metal (anode) loses electrons and undergoes an oxidation reaction, while the other metal (cathode) accepts electrons and undergoes a reduction reaction. This flow of electrons forms a corrosion current, the magnitude of which is related to the corrosion rate.

[0031] In addition, as a real-time characterization of the corrosion state, the corrosion current is affected by various environmental factors, such as temperature, humidity, atmospheric pressure, CO2, NO2, PM2.5, and PM10, which in turn affect the magnitude of the corrosion current and thus the corrosion rate.

[0032] S104: Data preprocessing for environmental factors and corrosion current; Data collected by monitoring equipment is inevitably affected by numerous complex factors, including human error, unforeseen external environmental factors, and equipment operating status. This leads to inconsistencies, abnormal noise, and missing values ​​in the collected data, directly impacting the quality and efficiency of subsequent analysis and modeling. Therefore, preprocessing of the collected experimental data, such as time series consistency analysis, outlier detection, and interpolation, is necessary to improve the scientific validity of the data analysis. Specifically, this includes: (1) Time scale transformation processing In this embodiment, the ACM and meteorological sensor used for data acquisition operate at different sampling frequencies. The ACM data acquisition frequency is on the order of minutes, and the corresponding number of seconds is inconsistent throughout the sampling process, while the meteorological sensor data is on the order of seconds. Therefore, it is necessary to perform targeted time-dimension conversion processing on different data types to ensure that the independent and dependent variables can correspond one-to-one in the time dimension, thereby accurately analyzing the impact of environmental factors on instantaneous corrosion current.

[0033] By transforming the time dimension of environmental factor data, second-level data is converted into minute-level data to ensure consistency with corrosion current data. The transformation steps are as follows: Data Import and Inspection: Import the file containing second-level environmental factor data and check the completeness and accuracy of the data, including whether there are missing values ​​and whether the timestamp format is consistent. In this embodiment, the format of the timestamp of the environmental factor data after combining the date and time records is "yyyy / MM / dd HH:mm:ss"; Timestamp Conversion and Grouping: By formatting the time field, all data belonging to the same minute are grouped into a grouping structure based on minutes, thereby reducing the precision of the timestamp to the minute level. The converted timestamp format is "yyyy / MM / dd HH:mm:00". Filtering invalid data and calculating minute-level averages: During data preprocessing, zero values ​​are generally considered to indicate that the sensor is not working properly or that data is lost. Therefore, to avoid the influence of zero values ​​on the statistical average, invalid data with environmental factor values ​​of 0 are removed from the grouped data for each minute, and the average of the valid data (non-zero values) within each minute's group is calculated. If there is no valid data in a certain minute, the records for that minute are directly ignored. Dataset Reconstruction and Output: Reconstruct the dataset in minutes, retaining the timestamp column as "yyyy / MM / ddHH:mm:00". The data columns represent the mean values ​​of each environmental factor within the corresponding time period, with decimal points added according to the data recording rules shown in Table 1. Assign the original environmental factor names to each column and export the data as required. The list of environmental factor data after time-dimension normalization is as follows: Figure 4 As shown.

[0034] The main purpose of normalizing the time dimension of corrosion current data is to unify the second-level data, adjusting it to a minute-level time dimension. This effectively reduces time offset errors, ensures data consistency and integrity, and aligns the data with the corrosion current data, meeting the requirements for time series data alignment and modeling. The transformation steps are as follows: Data Import and Inspection: Import corrosion current data with sampling frequencies ranging from seconds to minutes, and check whether the data format meets the requirements, paying particular attention to the accuracy of the timestamps. In this embodiment, the format of the corrosion current data timestamp is "yyyy / MM / dd HH:mm:ss"; Timestamp parsing and splitting: The timestamp is split into minutes and seconds. The minutes portion is "yyyy / MM / dd", and the seconds portion is an integer from 0 to 59 seconds, used to determine the specific location of the data; Second-level data rounding: For each data entry, its minute allocation is determined by the number of seconds. If the number of seconds is less than 30 seconds (e.g., 00 to 29 seconds), the minutes portion of the timestamp is retained, and the seconds are set to 00, indicating that the data still belongs to the current minute. If the number of seconds is greater than or equal to 30 seconds (e.g., 30 to 59 seconds), the minutes are incremented by 1, indicating that it belongs to the next minute, and the seconds are set to 00. This adjustment method ensures that the data's time precision is in minutes, avoiding uneven distribution of data across second-level intervals. Dataset reconstruction and output: The adjusted timestamps are regenerated into the standard "yyyy-MM-dd HH:mm:00" format. At this time, all time data is accurate to the minute and no longer contains detailed information on the second.

[0035] Although the original monitoring data does not have missing values ​​under ideal conditions, the corrosion current data after the above normalization process will have missing data, that is, the time dimension is not continuous. Therefore, subsequent data interpolation preprocessing is necessary.

[0036] (2) Outlier handling After normalization, the raw data were used to plot the trends of various environmental factors, such as air temperature, air humidity, atmospheric pressure, SO2, CO2, NO2, PM2.5, and PM10, over the experimental period. Figures 5-12 .

[0037] Depend on Figure 5 Analysis of the changing trends of various environmental factors shows that the air temperature reached a maximum of over 45℃ during this period. Considering the climate characteristics of Chongqing, the period from late July to mid-September is characterized by high temperatures, consistent with historical data. It is also worth noting that Chongqing experienced a significant temperature drop at the end of September 2024, a phenomenon reflected in the meteorological temperature change map, accompanied by a significant increase in air humidity and atmospheric pressure.

[0038] Depend on Figure 5 , Figure 6 , Figure 7 It can be seen that the fluctuations in three types of environmental factors—air temperature, air humidity, and atmospheric pressure—are relatively large, with fewer abnormal peaks. Figure 8 , Figure 9 , Figure 10 , Figure 11 , Figure 12 Various environmental factors, such as SO2, CO2, NO2, PM2.5, and PM10, exhibited significant spikes, which can be considered as outlier data. Since the environmental factor data series is time-series data, it exhibits temporal correlation, meaning there is a time dependency between data points. Therefore, when detecting outliers, the temporal order and trend must be considered.

[0039] In this embodiment, a moving average method is used to handle outliers in environmental factor data. By calculating the average value of the dataset within a sliding window, fluctuations are reduced and trends are revealed in the data. For each data point in the time series data, a sliding window of a certain size is set, and the average value of the data points within the window is calculated. Any point that significantly deviates from this average value within a certain range (threshold) is considered an outlier. The sliding window covers various parts of the data. The implementation of the moving average method requires setting a window size, denoted as . Further calculate the window moving average:

[0040] Combined with standard deviation A threshold can be set to determine whether the data is abnormal, such as setting the threshold to 3; then it will be determined that when... This is an outlier.

[0041] After identifying outliers for the current data point, if a point is determined to be an outlier, it is removed and replaced with a linear interpolation value. If a point is determined to be non-outlier, the window slides to the next point, repeating the process until the window reaches the end of the time series data. Analyzing the relationship between data points and the current window using a sliding window helps to dynamically detect short-term abrupt changes or trend shifts. Environmental factor data after outlier removal and interpolation processing is shown below. Figures 13-20 As shown.

[0042] contrast Figures 5-12 and Figures 13-20 The trends in air temperature, air humidity, and atmospheric pressure before and after outlier processing remained largely unchanged, consistent with the outlier analysis of the original data. Environmental factors such as SO2, CO2, NO2, PM2.5, and PM10 significantly eliminated some outliers, making the data's trends and fluctuations more pronounced.

[0043] After normalization, the original corrosion current data contained numerous outliers, obscuring the overall trend. A chart was created to depict the corrosion current trend from October 1, 2024 to November 1, 2024. Figure 21 As shown.

[0044] Based on the normalized corrosion current data, the moving average method described above was also used to preprocess the corrosion current time series data. At the same time, it was observed that there were many abrupt changes in the data. Therefore, the mean value within a window was used for interpolation. The corrosion current variation trend for the period from November 1, 2024 to November 15, 2024, after preprocessing, was plotted as follows: Figure 22 As shown in the figure, although some discrete points still exist in the data after preprocessing, the overall data is smoother and the trend is more obvious than the original data.

[0045] S106: Conduct a correlation analysis between pretreated environmental factors and corrosion current to screen out target environmental factors; This embodiment collected data on 13 meteorological environmental factors (air humidity, air temperature, atmospheric pressure, noise, wind speed, wind direction, optical rainfall, piezoelectric rainfall, SO2, CO2, NO2, PM2.5, and PM10). Noise, optical rainfall, and piezoelectric rainfall showed no significant changes during the experiment, and these three environmental factors were excluded from subsequent analysis. The remaining 10 environmental factors fluctuated during the experiment, but strong collinearity may exist among them, or their impact on corrosion current may be negligible. Therefore, directly applying these factors to model building without screening would not only increase the computational complexity of the model but may also lead to a decrease in the model's prediction accuracy and interpretability. Furthermore, high-dimensional data is prone to the "curse of dimensionality," where the distance between data points gradually decreases in high-dimensional space, leading to a decline in feature discrimination ability and an increased risk of model overfitting, thus adversely affecting the generalization performance of practical applications. Therefore, this embodiment uses qualitative analysis of the relationship between various environmental factors and corrosion current levels, combined with quantitative analysis of the correlation between environmental factors, and employs index dimensionality reduction method to screen out target environmental factors affecting corrosion parameters. This provides accurate input for establishing a correlation model between target environmental factors and corrosion parameters, ensuring the accuracy of the model.

[0046] Specifically, correlation analysis was conducted on data from 10 environmental factors, including air humidity, air temperature, atmospheric pressure, wind speed, wind direction, SO2, CO2, NO2, PM2.5, and PM10. The Pearson correlation coefficient was used as the analysis indicator to provide data support for selecting target environmental factors. The expression for calculating the Pearson correlation coefficient matrix between multidimensional variables is as follows:

[0047] in: Represents the correlation coefficient matrix. ; This represents an environmental factor data matrix, where each row represents a sample and each column represents environmental factor variables such as temperature, humidity, and atmospheric pressure. ; Represents the mean vector. The expression is as follows: The `diag()` operator extracts the diagonal elements of a matrix to form a vector. This represents the covariance after removing the mean.

[0048] Correlation matrix It can also be obtained through the standardization of the covariance matrix, with the following expression:

[0049] in: The covariance matrix is ​​expressed as follows:

[0050] D The diagonal matrix representing the covariance matrix is ​​used to standardize the correlation coefficient.

[0051] The results of the Pearson correlation coefficient analysis among environmental factors are presented in the form of a heatmap, such as... Figure 23 As shown in the image, the color of each cell in the heatmap reflects the degree of correlation between the two variables, ranging from dark blue (strong negative correlation) to dark red (strong positive correlation), with white in between (no correlation).

[0052] Depend on Figure 23 Analysis shows that temperature and humidity (-0.87) exhibit a strong negative correlation, meaning that humidity usually decreases when temperature rises and vice versa; temperature and atmospheric pressure (-0.85) also show a strong negative correlation, indicating that atmospheric pressure tends to decrease when temperature rises. PM2.5 and PM10 (1.0): Because PM2.5 and PM10 have similar sources and physical properties, they exhibit a completely positive correlation.

[0053] PM2.5 and temperature (-0.56) are negatively correlated, indicating that an increase in temperature may be accompanied by a decrease in PM2.5 concentration. Humidity is positively correlated with PM2.5 / PM10 (0.53), meaning that the concentrations of PM2.5 and PM10 tend to increase when humidity increases; temperature is positively correlated with SO2 (0.51), indicating that an increase in temperature may promote an increase in SO2 concentration. Humidity and atmospheric pressure (0.59) have a moderate positive correlation, and humidity and atmospheric pressure change synchronously to some extent; NO2 and CO2 (0.43) have a certain positive correlation, possibly originating from similar pollution sources.

[0054] Wind speed generally has a weak correlation with other environmental factors (such as humidity, PM2.5, CO2, etc.) (close to 0), indicating that its influence on these factors may be small. In addition, wind direction also has a low correlation with most variables.

[0055] The above analysis indicates a strong correlation between some environmental factors (such as humidity and temperature, and atmospheric pressure and temperature). In subsequent modeling, these strongly correlated variables may introduce redundant information, leading to reduced model stability. Therefore, this embodiment employs a random forest algorithm to rank the variables by importance in order to select the target environmental factors.

[0056] Specifically, it includes the following steps: a) Model parameter settings. To achieve optimal model performance and avoid overfitting, the algorithm parameters are first determined, including but not limited to the number of decision trees (trees) and the number of independent variables (mtry) in each decision tree. These parameters can be adjusted through repeated trials and determined using accuracy metrics such as the root mean square error and coefficient of determination. The calculation methods are as follows: in This represents the root mean square error of the model. The coefficient of determination is represented by the coefficient of determination. For sample size, , and These represent the measured value, the measured mean, and the model prediction, respectively.

[0057] A successive selection method combined with the principle of minimizing the root mean square error of the model is used to determine the number of decision trees (trees) and the number of independent variables (mtry) in each decision tree. Specifically: when determining the number of independent variables (mtry) in each decision tree, all possible values ​​for the number of variables are tried (e.g., inputting mtry from 1 to 30), and the relationship curve between the number of variables and the model error is obtained. The number of independent variables that minimizes the model error is selected as the algorithm parameter value. When determining the number of decision trees (trees), the initial number of trees is given (e.g., 100), and the relationship curve between the number of trees and the model error is obtained. Generally, as the number of trees increases, the model error gradually decreases and tends to stabilize. The number of trees corresponding to the critical point is selected as the algorithm parameter.

[0058] b) Model Training Process. The Random Forest algorithm is based on decision tree theory. Therefore, in implementing the Random Forest algorithm, multiple binary decision tree models need to be trained. This requires considering how to select splitting variables (features, i.e., environmental factor variables), how to select splitting points, and how to measure the quality of splitting points. Regarding the selection of splitting variables and splitting points, this embodiment iterates through each feature and all its values, finally selecting the best splitting variables and splitting points. The quality of splitting points is measured by the impurity of the nodes after splitting, i.e., the weighted sum of the impurities of each child node. The calculation formula is as follows: in, For example, it is a segmentation variable (such as environmental factors such as temperature, humidity, and illuminance); For a split point of the variable (for example, if the temperature is 20℃, then the temperature variable dataset is divided into those above 20℃ and those below 20℃); , and These represent the number of training samples for the left child node of the split point, the number of training samples for the right child node of the split point, and the total number of training samples for the current node, respectively. and The training sample sets of the left and right child nodes, To measure the impurity of a node, different impurity functions are generally used for classification and regression tasks in random forests, as shown in Table 2 below.

[0059] Table 2 Four different types of impurity functions

[0060] The training process of a node in a decision tree is mathematically equivalent to the following optimization problem: That is, choose G The smallest splitting variable and splitting point.

[0061] When using MSE As an impurity function Then, for a certain dividing point, we have:

[0062] To obtain multiple different datasets from the original training dataset, the Bootstrap method is applied to the random forest model. A certain proportion of data is randomly selected with replacement from the original dataset as the training set, and the remaining data is used as the test set. This process is then used to construct the training set. nMultiple decision trees are used, with different sub-data to train sub-models, to enhance the robustness and stability of the final model's prediction results, such as... Figure 24 As shown.

[0063] During the iterative training of the model, each decision tree is allowed to grow to its maximum size without any pruning, and the resulting decision trees are combined into a random forest. The prediction result of the random forest is obtained by averaging the prediction results of all its internal binary trees.

[0064] c) Variable importance ranking. The random forest algorithm primarily assesses feature importance by calculating the mean squared error. MSE This determines the extent to which the feature increases node purity. The more important the feature, the better its effect on increasing node purity. The calculation formula is as follows: , , , ,

[0065] in For nodes m The mean square error, K The number of categories in the sample set. For nodes m Belongs to the k The probability of a class For this independent variable at node m The importance of and For the node m The mean square error of the two new nodes after the split. For this independent variable in the th... j A tree species appeared M The importance of this. This represents the normalized importance score of the independent variable in the random forest, where trees is the number of trees in the random forest.

[0066] In the random forest model, the bootstrap method is applied to randomly select a certain proportion of data with replacement from the original dataset as the training set, and the remaining data as the test set, thereby constructing a training set. n Each decision tree is trained in a random forest. During the iterative training of the model, each decision tree is allowed to grow to its maximum size without any pruning. The resulting decision trees are then combined to form a random forest. The contribution of each independent variable to each decision tree in the random forest is calculated. Finally, the importance of each independent variable is ranked in descending order based on its accuracy and mean squared error output by the model.

[0067] (2) Screening results of environmental factors Based on the method described above, a random forest model was established using preprocessed data on 10 environmental factors, including temperature, humidity, atmospheric pressure, and SO2, as input features, and corrosion current data as model labels. The model parameters were set as follows: Use MinMaxScaler to normalize the feature data. Normalization scales the data to the range [0,1] to prevent certain features from affecting model performance due to different units of measurement during training. The calculation expression is as follows: in X This is the original data; and These are the minimum and maximum values ​​of the feature column, respectively; This is the normalized data.

[0068] The dataset was split into a training set (90%) and a test set (10%), with a random seed specified to ensure consistency in data partitioning for each code run and guarantee reproducibility of results. The number of trees was set to 100, and the random seed was set to 42 to ensure consistency in data partitioning for each code run and guarantee reproducibility of results. The random forest variable importance results are as follows: Figure 25 As shown.

[0069] The feature importance ranking from the random forest model shows that temperature is the most important feature, with an importance of 0.387581, indicating that temperature has the greatest impact on corrosion current. Humidity ranks second in importance, with an importance of 0.180691, thus humidity is also a key factor in the corrosion process, especially as the corrosion rate can vary significantly under different environmental humidity conditions. Atmospheric pressure has an importance of 0.148801, indicating that atmospheric pressure still plays a role in the variation of the corrosion process, especially under high or low pressure environments. PM2.5 (importance 0.056044), NO2 (importance 0.046480), PM10 (importance 0.045466): Changes in the concentrations of these pollutants, especially particulate matter (PM2.5, PM10) and nitrogen dioxide (NO2), also affect the corrosion process, accelerating metal corrosion through reactions with moisture and oxygen in the air. SO2 and CO2 concentrations have some impact on corrosion, with importance values ​​of 0.043454 and 0.031771, respectively. Although the concentrations of these factors have some influence on corrosion, their impact is relatively small compared to factors such as temperature and humidity. The effects of wind direction and wind speed are relatively small, at 0.031622 and 0.028089, respectively. Their influence on corrosion exists indirectly; for example, strong winds may affect ambient humidity, but their direct impact is relatively limited.

[0070] In summary, the model identifies temperature and humidity as the primary factors predicting corrosion current. The corrosion rate can vary significantly with changes in temperature and humidity. Therefore, in practical applications, optimizing temperature and humidity control, or monitoring changes in these two variables, is crucial for preventing or reducing corrosion. Atmospheric pressure and pollutant concentrations (such as PM2.5 and NO2) have a significant impact on the corrosion process, especially in highly polluted environments where these factors may accelerate corrosion. Wind speed and direction have a relatively small impact on corrosion, but the possibility of them indirectly affecting the corrosion rate under certain extreme weather conditions cannot be ruled out. The results of the importance analysis are largely consistent with the qualitative analysis results. Based on these results, temperature and humidity were selected as target environmental parameters and input variables for the model linking environmental factors and corrosion parameters.

[0071] S108: A machine learning method is used to construct a correlation model between target environmental factors and corrosion current.

[0072] In this embodiment, a genetic algorithm-backpropagation (GA-BP) neural network model is selected to establish a correlation model between target environmental factors and corrosion current.

[0073] Backpropagation (BP) neural networks are multi-layer feedforward networks that evolve by mimicking the working method of human neural networks and propagate errors backward. Their structure consists of three parts: an input layer, a hidden layer, and an output layer. They have good adaptive learning capabilities and are widely used in data fitting and numerical prediction of complex nonlinear systems.

[0074] The BP neural network computation process consists of two parts: forward propagation and backward propagation. In the forward propagation part, data (information, signals) is input from the input terminal, multiplied by the corresponding weights along the network's path, and then summed. The result is then used as input in the activation function for computation, and the calculated result is passed to the next node. This process continues until the final result is obtained. Similarly, through the perceptrons of each layer, layer-by-layer computation yields the output, and the output of each node serves as the input to the next node.

[0075] The backpropagation process compares the output with the expected output, propagating the resulting error back through the network—essentially a "negative feedback" process. Through multiple iterations, the weights between nodes on the network are continuously adjusted (updated) using gradient descent. The iterative objective is to minimize the error, i.e., the loss function. Loss Function Loss The calculation expression is: in, and These are the actual value and the predicted value, respectively. w and bThese are the weighting coefficients and the bias term, respectively. For input variables.

[0076] Backpropagation is used to compute the gradients of the weights and biases of a neural network, so that the parameters can be updated using gradient descent. Weight coefficient parameters. W The update expression is: in For the first Model parameters for the next iteration This is the learning rate.

[0077] Each iteration generates a weight update, which is then forward-propagated to the training samples. If the result is not as expected, backpropagation is performed, and the iteration continues. This process is repeated until the prediction result meets the loss requirement or the required number of iterations.

[0078] While backpropagation (BP) neural networks can effectively capture hidden patterns and features in data, they are prone to getting trapped in local minima, leading to reduced accuracy and computational speed. To address this, this embodiment employs a genetic algorithm (GA) to optimize the initial structure of the BP neural network, resulting in a GA-BP neural network. This optimizes the weights, biases, and network topology of the BP neural network model, effectively resolving the problem of BP neural networks getting trapped in local minima and improving their predictive capabilities.

[0079] In genetic algorithms, the selection operation determines which individuals are chosen as parents for subsequent crossover and mutation. Selection uses the individual's fitness value; individuals with higher fitness have a greater probability of being selected. A commonly used selection method is roulette wheel selection, with the following probability formula: in, It is the first i The probability of an individual being selected. It is an individual's fitness value. N It refers to population size.

[0080] like Figure 26 This is a flowchart of the GA-BP neural network model. First, a basic BP neural network model is established, and the weights and thresholds of each neuron are randomly initialized. These are then used as inputs to the GA algorithm. The root mean square error function of the model's erosion parameters is used as the fitness function for the genetic operation. Optimal weights are obtained through selection, crossover, and mutation operations, and these optimal weights are assigned to the neural network as initial weights. Next, the BP neural network is trained using a training set containing environmental factors and erosion parameter data. Finally, the prediction accuracy of the trained model is verified.

[0081] Specifically, the GA-BP neural network model uses preprocessed temperature and humidity as input features and corrosion current data as labels. The original dataset is randomly divided into 80% training set and 20% test set. The specific model settings are as follows.

[0082] In the data normalization stage, MinMaxScaler is used to normalize all input features and target values, ensuring that the data distribution is within a uniform range to improve model training stability. After GA optimization, the model further fine-tunes the weights using the BP algorithm, combined with the Adam optimizer and learning rate scheduling strategy to achieve performance improvement. To enhance the model's generalization ability, a learning rate scheduler (ReduceLROnPlateau) is used to dynamically adjust the learning rate based on the validation loss. During training, the loss value and current learning rate for each epoch are recorded for analyzing the convergence process.

[0083] The model architecture is a fully connected neural network containing multiple linear transformations and the ReLU activation function. It consists of three linear layers, with ReLU activation introducing non-linearity between layers. The first layer is the input layer, connecting the input features to the hidden layer. The second layer is the hidden layer, responsible for extracting complex features from the data. The third layer is the output layer, used to generate predicted values. Furthermore, to enhance the model's generalization ability, Dropout regularization is introduced in the hidden layers, randomly disabling some neurons to reduce the possibility of overfitting. The specific parameters of the model are adjusted based on the input data, such as the feature dimension of the input layer (input_size), the number of neurons in the hidden layer (hidden_size), the dimension of the output layer (output_size), and the probability of Dropout (default 0.1). The modeling data input consists of two features, and the model architecture can be described as follows: First layer: Linear layer, with an input dimension of 2 and an output dimension of 100 (the number of neurons in the hidden layer).

[0084] Second layer: ReLU activation function.

[0085] The third layer: Linear layer, with an input dimension of 100 and an output dimension of 100.

[0086] Fourth layer: ReLU activation function.

[0087] Fifth layer: Dropout, randomly blocking 10% of neurons.

[0088] The sixth layer: Linear layer, with an input dimension of 100 and an output dimension of 1 (output layer).

[0089] This multi-layered structure enables the model to exhibit strong learning capabilities under complex data patterns, while the use of the ReLU activation function effectively avoids the vanishing gradient problem. During neural network optimization, combining the advantages of genetic algorithms and backpropagation algorithms, the model can find suitable parameter configurations more efficiently, thereby achieving high-precision predictions.

[0090] The dynamic plotting of the learning rate and training / test errors during model iteration visually demonstrates the convergence of model training, as shown in the mean squared error iteration process. Figure 27 The learning rate parameter iteration process is as follows: Figure 28 As shown.

[0091] During the model evaluation phase, inverse normalization is performed on the results to restore the original numerical values, making them easier to interpret and evaluate. Further visualization of the comparison between the actual and predicted values ​​is achieved by plotting a comparison graph of the test set and the model's predicted values, such as... Figure 29 As shown. In summary, this model, through a combination of genetic optimization and backpropagation, can effectively predict the overall trend of data change.

[0092] Optionally, to evaluate model performance, the mean squared error (MSE), root mean squared error (RMSE), mean absolute error (MAE), and mean percentage error (MPE) are calculated. The calculation expressions are as follows, and the calculation results are shown in Table 3.

[0093] , , , , Table 3 Prediction Performance of GA-BP Neural Network Model Indicator Name MSE RMSE MAE 1-MPE result 205.6012 14.3388 9.9282 80.9181% In an optional embodiment of this application, an LSTM neural network model can also be used to construct a correlation model between target environmental factors and corrosion current. The LSTM network structure is as follows: Figure 30 As shown.

[0094] An LSTM unit contains a forget gate, an input gate, and an output gate. The forget gate receives input from the previous neuron and determines whether information from the previous time step needs to be discarded at the current time step. Its state equation can be expressed as: in Forget gate matrix; The output of the neuron at the previous moment; Forget gate parameter identifier; b For bias. It is the sigmoid activation function.

[0095] The input gate determines how much new information is added to the network memory at any given moment, and its expression is: in, This is the input gate weight matrix.

[0096] An update module has also been added to the input gate, with the following expression: , , in This is the weight matrix of the memory neurons.

[0097] The output gate is used to update information and output the current neuron result; its expression is:

[0098] in, This is the output gate weight matrix.

[0099] The forget gate, input gate, and output gate configuration endow LSTM networks with the ability to adjust and update information flow in different memory units, significantly enhancing the time series modeling capabilities of recurrent neural networks and making them suitable for handling problems that rely on long-term historical information. In the field of corrosion prediction, the corrosion process of products typically exhibits long-term dependencies and complex temporal characteristics. Through its unique structure, LSTM can more accurately capture and predict these complex temporal dependencies, making it applicable to the establishment of correlation models between environmental factors and corrosion parameters.

[0100] In this embodiment, the selected target environmental factors include two dimensions: temperature and humidity, which falls under multivariate prediction. The application of LSTM networks in multivariate prediction differs from univariate prediction. Assume the experimental data used for model building is represented as follows: The first column represents time, the second and third columns represent temperature and humidity, respectively, and the fourth column represents corrosion current data. When training the model, the time term is typically not used as a feature variable, so the time data in the first column is ignored. Therefore, it is necessary to determine the continuity of the experimental data over time.

[0101] Further settings p The first lag is considered to be the first order lag. m The corrosion current data and the first mp to m-1 The environmental factor data and corrosion current data are related. A mapping relationship is established between these data, namely: The total length of the test data is n Then there are a total of such corresponding mapping relationships. np The model parameters are obtained by training and solving based on these mapping relationships.

[0102] The LSTM neural network model uses preprocessed temperature and humidity as input features and corrosion current data as labels. The order of the dataset must not be changed during use. The original dataset is divided into a training set (first 80% of the data) and a test set (last 20% of the data). The specific model settings are shown in Table 4.

[0103] Table 4 LSTM Neural Network Model Parameter Settings parameter numerical values parameter numerical values Input feature number 2 Output size 1 Step length 100 Learning rate Adaptive adjustment Network layers 2 Optimizer Adam Number of hidden layer units 25 —— —— The model employs a multi-layer LSTM structure, consisting of two stacked LSTM layers, each containing 25 hidden units. Combined with time-step input, it can capture short-term fluctuations and long-term trends in time series. The output layer is a fully connected layer used to map the LSTM output features to the target predicted value, achieving regression prediction for a single value.

[0104] In the data normalization stage, the original data is first normalized to reduce the interference of data scale on the training process and improve the convergence speed of the model. Then, the time series is divided into fixed-length input-output pairs, with each sample containing input features for 100 time steps and the target value for the next time step.

[0105] The model is trained using the Mean Squared Error (MSE) loss function and the Adam optimizer. To enhance the model's generalization ability, a learning rate scheduler (ReduceLROnPlateau) is employed to dynamically adjust the learning rate based on the validation loss. During training, the loss value and current learning rate for each epoch are recorded to analyze the convergence process. The trend of the learning rate with the number of iterations during model iteration visually demonstrates the convergence of model training. The iteration process is as follows: Figure 31 As shown.

[0106] After training, the model parameters are saved for subsequent reproduction or deployment, and the model is validated based on the test set data. During model prediction, inverse normalization is also performed on the results to restore the original values, facilitating comparative analysis and evaluation of model performance. Further visualization of the comparison between the true and predicted values ​​is achieved by plotting a comparison graph of the test set and model predictions, such as... Figure 32 As shown. In summary, the LSTM model can effectively predict the overall trend of data changes.

[0107] The evaluation metrics for the model's prediction results are consistent with those for the GA-BP neural network model, and the calculation results are shown in Table 5.

[0108] Table 5 Prediction Performance of LSTM Neural Network Model Indicator Name MSE RMSE MAE 1-MPE result 186.7158 13.6644 9.3275 81.2004% In an optional embodiment of this application, the two constructed correlation models can be compared based on the actual situation, and the superior correlation model can be selected for subsequent corrosion rate prediction.

[0109] S110: Real-time acquisition of actual service environment factors of the low alloy steel under test, and prediction of corrosion rate using the constructed correlation model.

[0110] Based on the technical solution provided in this application, preprocessing operations were performed on the data of 13 environmental factors (air temperature, air humidity, atmospheric pressure, noise, wind speed, wind direction, optical rainfall, piezoelectric rainfall, CO2, PM2.5, PM10, SO2, and NO2) obtained from the health status monitoring of bridges in Chongqing, as well as corrosion current data monitored by an ACM instrument. The changing characteristics and correlations of each environmental factor were qualitatively analyzed, focusing on 10 factors including air temperature, air humidity, atmospheric pressure, wind speed, wind direction, CO2, PM2.5, PM10, SO2, and NO2. Using environmental factors as input features and corrosion current parameters as labels, a random forest model was used to rank the importance of each variable and quantitatively screen out air temperature and air humidity as the target environmental factors affecting corrosion current levels. Using temperature and humidity as input features and corrosion current parameters as labels, two correlation models between environmental factors and corrosion parameters were established based on GA-BP and LSTM neural networks, respectively. Model validation results show that both models can effectively describe the nonlinear relationship between environmental factors and corrosion parameters, and achieve accurate prediction of corrosion rate for low alloy steel used in bridges.

[0111] Based on the above method embodiments, this embodiment also provides a dynamic prediction device for corrosion rate of low alloy steel, which can be used to implement the steps of the above method.

[0112] refer to Figure 33 The low-alloy steel corrosion rate dynamic prediction device includes: Acquisition module 331 is used to acquire environmental factors and corrosion current; Pre-processing module 332 is used to pre-process the environmental factors and corrosion current; The screening module 333 is used to perform correlation analysis between pretreated environmental factors and corrosion current, and to screen out target environmental factors. Learning module 334 is used to construct a correlation model between target environmental factors and corrosion current using machine learning methods; The prediction module 335 is used to collect the actual service environment factors of the low alloy steel under test using the constructed correlation model, so as to realize the real-time prediction of the corrosion rate of the low alloy steel under test.

[0113] Optionally, the preprocessing module 332 is used to normalize the environmental factors and corrosion current in the time dimension to ensure that they correspond one-to-one in the time dimension.

[0114] Optionally, the screening module 333 is used to perform a qualitative analysis of the horizontal relationship between various environmental factors and corrosion current, and to sort the environmental factor model by variable importance using the random forest algorithm to screen out the target environmental factors that affect corrosion current.

[0115] Optionally, the 334 learning module is used to establish a correlation model between the target environmental factors and the corrosion current using a genetic algorithm-backpropagation neural network model; or, to establish a correlation model between the target environmental factors and the corrosion current using a long short-term memory neural network model.

[0116] Various variations and specific examples of the methods provided in the above embodiments are also applicable to the apparatus of this embodiment. Through the foregoing detailed description of the methods, those skilled in the art can clearly understand the implementation method of the apparatus in this embodiment. For the sake of brevity, they will not be described in detail here.

[0117] This application also provides an apparatus including an environmental factor collector, a processor, a memory, and a communication bus. The environmental factor collector is connected to the processor via the communication bus and is used to collect the actual service environmental factors of the low alloy steel to be tested. The communication bus is used to realize the communication connection between the memory and the processor. The processor is used to execute a computer program stored in the memory to implement the method described in any of the above.

[0118] This application also provides a computer program product comprising a computer program tangibly embodied on a readable medium thereof, the computer program containing program code for performing any of the methods described in this application, the computer program being downloadable and installable over a network, and / or installed from a removable medium (such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc.).

[0119] The above description of the embodiments is only used to provide a detailed introduction to the technical solutions of this application. However, the description of the above embodiments is only for the purpose of helping to understand the methods and core ideas of this application, and should not be construed as a limitation of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application.

Claims

1. A method for dynamically predicting the corrosion rate of low alloy steel, characterized in that, The method includes: Obtain environmental factors and corrosion current; The environmental factors and corrosion current are pretreated. Correlation analysis was performed on the pretreated environmental factors and corrosion current to screen out the target environmental factors; A machine learning approach was used to construct a correlation model between target environmental factors and corrosion current. By using the established correlation model, the actual service environment factors of the low alloy steel under test are collected, and the corrosion rate of the low alloy steel under test can be predicted in real time.

2. The method as described in claim 1, characterized in that, The pretreatment of the environmental factors and corrosion current includes: The environmental factors and corrosion currents are standardized at the time granularity to ensure a one-to-one correspondence in the time dimension.

3. The method as described in claim 1, characterized in that, The correlation analysis between the pretreated environmental factors and the corrosion current revealed the following target environmental factors: A qualitative analysis of the horizontal relationship between various environmental factors and corrosion current was conducted. The random forest algorithm was used to rank the importance of variables in the environmental factor model and screen out the target environmental factors that affect corrosion current.

4. The method as described in claim 1, characterized in that, The method of constructing a correlation model between target environmental factors and corrosion current using machine learning includes: A genetic algorithm-backpropagation neural network model was used to establish a correlation model between target environmental factors and corrosion current; Alternatively, a long short-term memory (LSTM) neural network model can be used to establish a correlation model between target environmental factors and corrosion current.

5. The method according to any one of claims 1-4, characterized in that, The environmental factors include air temperature, air humidity, atmospheric pressure, wind speed, wind direction, CO2 concentration, PM2.5 concentration, PM10 concentration, SO2 concentration, and NO2 concentration.

6. A device for dynamically predicting the corrosion rate of low alloy steel, characterized in that, include: The acquisition module is used to acquire environmental factors and corrosion current; The pretreatment module is used to pretreat the environmental factors and corrosion current. The screening module is used to perform correlation analysis between pretreated environmental factors and corrosion current, and to screen out target environmental factors. The learning module is used to construct a correlation model between target environmental factors and corrosion current using machine learning methods. The prediction module is used to collect the actual service environment factors of the low alloy steel under test using the constructed correlation model, so as to realize the real-time prediction of the corrosion rate of the low alloy steel under test.

7. The apparatus as claimed in claim 6, characterized in that, The preprocessing module is used to perform time-scale conversion processing on the environmental factors and corrosion current to ensure that they correspond one-to-one in the time dimension.

8. The apparatus as claimed in claim 6, characterized in that, The screening module is used to perform a qualitative analysis of the horizontal relationship between various environmental factors and corrosion current. It combines the random forest algorithm to rank the importance of variables in the environmental factor model and screen out the target environmental factors that affect corrosion current.

9. The apparatus as claimed in claim 6, characterized in that, The learning module is used to establish a correlation model between target environmental factors and corrosion current using a genetic algorithm-backpropagation neural network model; or, to establish a correlation model between target environmental factors and corrosion current using a long short-term memory neural network model.

10. An apparatus, characterized in that, The device includes an environmental factor collector, a processor, a memory, and a communication bus. The environmental factor collector is connected to the processor via the communication bus and is used to collect the actual service environmental factors of the low alloy steel under test. The communication bus is used to realize the communication connection between the memory and the processor. The processor is used to execute the computer program stored in the memory to implement the method as described in any one of claims 1-5 above.