Method, apparatus and electronic device for constructing corrosion rate prediction model of metal material
By dividing areas in the target area and screening key influencing factors using random forest algorithms, a dose response function model is constructed, and the problem of low prediction accuracy of atmospheric corrosion rate of metal materials is solved, and more accurate corrosion rate prediction is achieved, supporting material selection and protection of power grid equipment.
Patent Information
- Application Number
- CN202211092271.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-07
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2042-09-07
AI Technical Summary
In the prior art, the prediction accuracy of atmospheric corrosion rate of metal materials is not high and cannot be effectively applied in engineering.
By obtaining the dose response parameter set of metal materials in the target area, performing area division and data processing, a random forest algorithm is used to screen key influencing factors, and a corrosion rate prediction model based on the dose response function is constructed.
It improves the accuracy of atmospheric corrosion rate prediction of metal materials, can more accurately reflect the corrosion conditions in different regions, and helps in material selection and corrosion protection of power grid equipment.
Smart Images

Figure CN116011313B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of atmospheric corrosion, and in particular, to a method, an apparatus, and an electronic device for constructing a corrosion rate prediction model of a metal material. Background Art
[0002] The corrosion situation of metal materials in the atmospheric environment is crucial for the normal operation of equipment in production and life. Studying the atmospheric corrosion rate of metal materials in different regions is of great significance for material selection and corrosion protection of power grid equipment in different regions.
[0003] The Dose Response Function (DRF) is a model used to predict the atmospheric corrosion rate of materials. This model takes regional atmospheric environment parameters (such as temperature, relative humidity, etc.) as inputs, and the output is the corrosion rate of the corresponding material, which refers to the average corrosion rate of the material in the first year in this region.
[0004] The International Standard Organization (ISO) gives dose response function models for 4 materials in the standard (number: ISO9223 - 2012). After research and experimental verification, the prediction accuracy of this model for the atmospheric environment corrosion rate is too low to be applied in engineering. Therefore, improving the prediction accuracy of the corrosion rate of metal materials has become an urgent technical problem to be solved. Summary of the Invention
[0005] This application provides a method, an apparatus, and an electronic device for constructing a corrosion rate prediction model of a metal material to solve the problem of low prediction accuracy of the corrosion rate of metal materials in the prior art.
[0006] In a first aspect, this application provides a method for constructing a corrosion rate prediction model of a metal material, and the method includes:
[0007] Obtain multiple metal material dose response parameter sets of a target region, where each metal material dose response parameter set includes the average data of each factor in the atmospheric environment factor set within a preset time period, the corrosion rate of the metal material in the first year, and the distance between the collection location of each metal material dose response parameter set and the coastline;
[0008] Obtain a regional factor set according to the average data of each factor in the atmospheric environment factor set within the preset time period in all metal material dose response parameter sets, and the corrosion rate of the metal material in the first year corresponding to each metal material dose response parameter set respectively;
[0009] According to the preset distance threshold and the thresholds corresponding to each regional factor in the set of regional factors, divide the set of metal material dose response parameters of the target area by region to obtain a set of metal material dose response parameter sets corresponding to each region in the target area. The preset distance threshold is the threshold of the distance between the collection location of the metal material dose response parameter set and the coastline;
[0010] Perform data processing on the metal material dose response parameter set corresponding to the i-th region to obtain a set of key influencing factors for the i-th region;
[0011] According to the pre-constructed dose response function, the average data of each key influencing factor in each set of key influencing factors for the i-th region within a preset time period, and the metal material corrosion rate in the first year corresponding to each set of key influencing factors, obtain the dose response function equation corresponding to the i-th region, where the i-th region is any region divided in the target area;
[0012] Construct a corrosion rate prediction model for the metal materials in the target area based on the dose response function equations of all regions.
[0013] In this way, divide by region according to the characteristics of the metal material dose response parameter set of the target area, and through processing, extract the key influencing sets of each region. According to the key influencing factors and the pre-constructed dose response function, obtain the dose response function equations of each region. Construct a corrosion rate prediction model for the metal materials in the target area based on the dose response function equations of all regions, which is beneficial to obtaining a corrosion rate prediction model that more conforms to regional factors according to the characteristics of the atmospheric environment factors in each region, thereby improving the prediction accuracy of the model.
[0014] Combined with the first aspect, in the first embodiment of the first aspect of the present invention, after obtaining multiple metal material dose response parameter sets of the target area, the method further includes:
[0015] Cluster all the sets of atmospheric environment factors to obtain multiple set groups;
[0016] For the metal material corrosion rate in the first year corresponding to any set of atmospheric environment factors in any set group, calculate the difference between the metal material corrosion rate in the first year and the metal material corrosion rates in the first year corresponding to other sets of atmospheric environment factors in the set group;
[0017] If the differences are all greater than the first preset threshold, delete the metal material dose response parameter set corresponding to the metal material corrosion rate in the first year to obtain an updated set group.
[0018] In this way, the abnormal data in the metal material dose response parameter set is eliminated, and only the normal data is used for processing, eliminating the influence of the abnormal data and ensuring the prediction accuracy of the model.
[0019] Combined with the first aspect, in the second embodiment of the first aspect of the present invention, according to the average data of each factor in each atmospheric environment factor set in all metal material dose response parameter sets within a preset time period, and the first-year metal material corrosion rate corresponding to each metal material dose response parameter set respectively, a regional factor set is obtained, which specifically includes:
[0020] Using the correlation analysis method, the average data of the k-th atmospheric environment factor in the atmospheric environment factor set in the h-th metal material dose response parameter set and the first-year metal material corrosion rate in the h-th metal material dose response parameter set are respectively subjected to correlation analysis to obtain the k-th correlation value;
[0021] According to the k-th correlation value in all metal material dose response parameter sets, a comprehensive correlation value corresponding to the k-th atmospheric environment factor is obtained;
[0022] Sort the comprehensive correlation values of all atmospheric environment factors to obtain the sorting order;
[0023] Select the atmospheric environment factors with a correlation ranking greater than the second preset threshold in the sorting order to form a regional factor set, where the h-th metal material dose response parameter set is any one of all metal material dose response parameter sets, and the k-th atmospheric environment factor is any one atmospheric environment factor in the metal material dose response parameter set.
[0024] In this way, according to the correlation between each atmospheric environment factor in the metal material dose response parameter set and the first-year corrosion rate, a regional factor set is determined, providing a basis for regional division.
[0025] Combined with the third embodiment of the first aspect, in the fourth embodiment of the first aspect of the present invention, data processing is performed on the metal material dose response parameter set corresponding to the i-th region to obtain the key influencing factor set of the i-th region, including:
[0026] Perform data processing on the metal material dose response parameter set corresponding to the i-th region using the random forest algorithm to obtain the key influencing factor set of the i-th region.
[0027] Combined with the third embodiment of the first aspect, in the fourth embodiment of the first aspect of the present invention, data processing is performed on the metal material dose response parameter set corresponding to the i-th region using the random forest algorithm to obtain the key influencing factor set of the i-th region, which specifically includes:
[0028] Divide the metal material dose response parameter set of the i-th region into a training set and a first test set;
[0029] Use the training set to train a random forest model to obtain a trained model;
[0030] Obtain the first prediction accuracy of the trained model on the first test set;
[0031] Shuffle the observation order of the j-th atmospheric environment factor in the test set n times to obtain n test sets;
[0032] Obtain the n prediction accuracies of the trained model on the n test sets;
[0033] Take the average of the differences between the first prediction accuracy and the n prediction accuracies as the selection criterion for the j-th atmospheric environment factor;
[0034] Obtain a set of key influencing factors according to the selection criterion of each atmospheric environment factor, where j is the number of atmospheric environment factors in the test set, and n is a positive integer less than or equal to the number of metal material dose response parameter sets in the test set.
[0035] In this way, using the random forest algorithm to process the data can utilize the advantages of the random forest algorithm and conduct multiple verifications, which is beneficial to accurately obtain the set of key influencing factors for each region.
[0036] In a second aspect, the present application provides a device for constructing a corrosion rate prediction model of a metal material, and the device includes:
[0037] An acquisition module, configured to acquire multiple metal material dose response parameter sets of a target area, where each metal material dose response parameter set includes the average data of each factor in the atmospheric environment factor set within a preset time period, the corrosion rate of the metal material in the first year, and the distance between the collection location of each metal material dose response parameter set and the coastline;
[0038] A regional factor set determination module, configured to obtain a regional factor set according to the average data of each factor in each atmospheric environment factor set within a preset time period in all metal material dose response parameter sets, and the corrosion rate of the metal material in the first year corresponding to each metal material dose response parameter set;
[0039] A regional division module, configured to divide the metal material dose response parameter sets of the target area into regions according to a preset distance threshold and the thresholds corresponding to each regional factor in the regional factor set, to obtain a set of metal material dose response parameter sets corresponding to each region in the target area, where the preset distance threshold is the threshold of the distance between the collection location of the metal material dose response parameter set and the coastline;
[0040] A key influencing factor set determination module, configured to perform data processing on the metal material dose response parameter set corresponding to the i-th region, and obtain the key influencing factor set of the i-th region;
[0041] A dose response function equation determination module, configured to obtain the dose response function equation corresponding to the i-th region according to a pre-constructed dose response function, the average data of each key influencing factor in each key influencing factor set of the i-th region within a preset time period, and the metal material corrosion rate in the first year corresponding to each key influencing factor set, where the i-th region is any one of the regions divided from the target area;
[0042] A model construction module, configured to construct a corrosion rate prediction model of the metal material in the target area based on the dose response function equations of all regions.
[0043] Optionally, the device further includes:
[0044] A clustering module, configured to cluster all the atmospheric environment factor sets to obtain multiple set groups;
[0045] A difference calculation module, configured to calculate the difference between the metal material corrosion rate in the first year corresponding to any one atmospheric environment factor set in any one set group and the metal material corrosion rate in the first year corresponding to other atmospheric environment factor sets in the set group respectively;
[0046] A deletion module, configured to delete the metal material dose response parameter set corresponding to the metal material corrosion rate in the first year to obtain an updated set group if the differences are all greater than a first preset threshold.
[0047] Optionally, the device further includes:
[0048] A correlation analysis module, configured to perform correlation analysis on the average data of the k-th atmospheric environment factor in the atmospheric environment factor set in the h-th metal material dose response parameter set and the metal material corrosion rate in the first year in the h-th metal material dose response parameter set respectively, and obtain the k-th correlation value;
[0049] A data processing module, configured to obtain a comprehensive correlation value corresponding to the k-th atmospheric environment factor according to the k-th correlation value in all the metal material dose response parameter sets;
[0050] A sorting module, configured to sort the comprehensive correlation values of all the atmospheric environment factors to obtain a sorting order;
[0051] The regional factor set determination module is specifically configured to select the atmospheric environment factors with a correlation ranking greater than the second preset threshold in the sorting order to form a regional factor set, where the h-th metal material dose response parameter set is any one of all the metal material dose response parameter sets, and the k-th atmospheric environment factor is any one of the atmospheric environment factors in the metal material dose response parameter set.
[0052] Optionally, the device includes:
[0053] The data processing module is further configured to perform data processing on the metal material dose response parameter set corresponding to the i-th region using a random forest algorithm to obtain a set of key influencing factors for the i-th region.
[0054] Optionally, the device further includes:
[0055] The partitioning module is configured to divide the metal material dose response parameter set of the i-th region into a training set and a first test set;
[0056] The training module is configured to train a random forest model using the training set to obtain a trained model;
[0057] The data processing module is further configured to obtain the first prediction accuracy of the trained model on the first test set; shuffle the observation order of the j-th atmospheric environment factor in the test set n times to obtain n test sets; obtain the n prediction accuracies of the trained model on the n test sets; use the average value of the differences between the first prediction accuracy and the n prediction accuracies as the selection criterion for the j-th atmospheric environment factor; obtain a set of key influencing factors according to the selection criterion of each atmospheric environment factor, where j is the number of atmospheric environment factors in the test set, and n is a positive integer less than or equal to the number of metal material dose response parameter sets in the test set.
[0058] In a third aspect, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
[0059] The memory is used to store a computer program;
[0060] When the processor is configured to execute the program stored on the memory, it implements the steps of the method for constructing a corrosion rate prediction model of metal materials according to any one of the embodiments in the first aspect.
[0061] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the method for constructing a corrosion rate prediction model of metal materials according to any one of the embodiments in the first aspect. Description of the Drawings
[0062] Figure 1 Schematic flow chart of a method for constructing a corrosion rate prediction model of a metal material provided by an embodiment of the present invention;
[0063] Figure 2 Schematic flow chart of an abnormal data processing method provided by an embodiment of the present invention;
[0064] Figure 3 Schematic flow chart of a method for determining a regional factor set provided by an embodiment of the present invention;
[0065] Figure 4 Schematic flow chart of a method for determining a set of key influencing factors provided by an embodiment of the present invention;
[0066] Figure 5 Schematic structural diagram of a device for constructing a corrosion rate prediction model of a metal material provided by an embodiment of the present invention;
[0067] Figure 6 Schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0068] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0069] For ease of understanding of the embodiments of the present invention, the following will further explain and illustrate with specific embodiments in conjunction with the accompanying drawings. The embodiments do not constitute a limitation to the embodiments of the present invention.
[0070] In response to the technical problems mentioned in the background art, the embodiments of the present application provide a method for constructing a corrosion rate prediction model of a metal material. Specifically, refer to Figure 1 as shown in Figure 1 Schematic flow chart of a method for constructing a corrosion rate prediction model of a metal material provided by an embodiment of the present invention. The method steps include:
[0071] Step 110, obtaining multiple metal material dose-response parameter sets of a target area.
[0072] Specifically, each metal material dose-response parameter set includes the average data of each factor in the atmospheric environment factor set within a preset time period, the corrosion rate of the metal material in the first year, and the distance between the collection location of each metal material dose-response parameter set and the coastline.
[0073] In an optional example, the average data of each factor in the set of atmospheric environmental factors within a preset time period can be obtained through a data interface provided by meteorological-related departments. The atmospheric environmental factors can include, but are not limited to, temperature, relative humidity, rainfall, sulfur dioxide, chloride ions, air dust, nitrogen dioxide, ozone, carbon monoxide, etc. The average data can be the annual average data of temperature, the annual average data of relative humidity, etc., or the average data of other time periods. In order for the data to have a certain representativeness, it is best to obtain data on an annual basis.
[0074] The corrosion rate of the metal material in the first year can be obtained through the field test data of a preset test site, and the distance between the preset test site and the coastline, together with the set of atmospheric environmental factors of the test site, jointly form a metal material dose-response parameter set. The metal materials include, but are not limited to, hot-dip galvanized steel, carbon steel, aluminum materials, copper materials, and other metal materials, which can be specifically obtained according to actual needs.
[0075] In a more optimal implementation manner, in order to ensure the accuracy of the parameter set data, after obtaining the metal material dose-response parameter set, abnormal data processing can also be performed on the parameter set.
[0076] Optionally, after obtaining multiple metal material dose-response parameter sets of the target area, it also includes the method steps as Figure 2 shown:
[0077] Step 1101, cluster all the sets of atmospheric environmental factors to obtain multiple set groups.
[0078] Specifically, for all the sets of atmospheric environmental factors, select any one set of atmospheric environmental factors as the clustering center for clustering, and then continuously select other sets of atmospheric environmental factors to add as clustering centers until the clustering result does not change with the clustering center, obtaining multiple set groups of atmospheric environmental factor sets.
[0079] Step 1102, for the corrosion rate of the metal material in the first year corresponding to any one set of atmospheric environmental factors in any one set group, calculate the difference between the corrosion rate of the metal material in the first year and the corrosion rate of the metal material in the first year corresponding to other sets of atmospheric environmental factors in the set group.
[0080] Specifically, for each set group, respectively retrieve the corrosion rate in the first year corresponding to each set of atmospheric environmental factors, and calculate the difference between the corrosion rate in the first year corresponding to any one set of atmospheric environmental factors and the corrosion rate in the first year of other sets of atmospheric environmental factors.
[0081] Step 1103, if the differences are all greater than the first preset threshold, then delete the metal material dose-response parameter set corresponding to the corrosion rate of the metal material in the first year to obtain an updated set group.
[0082] Specifically, if the difference between the corrosion rate in the first year of this set and the corrosion rates in the first year of other sets is greater than a preset threshold, the set of metal material dose response parameters corresponding to the corrosion rate of the metal material in the first year is excluded to obtain an updated set group.
[0083] In this way, the abnormal data in the set of metal material dose response parameters is excluded, and only normal data is used for processing, eliminating the influence of abnormal data and ensuring the prediction accuracy of the model.
[0084] Step 120: Based on the average data of each factor in each atmospheric environment factor set within a preset time period in all sets of metal material dose response parameters, and the corrosion rate of the metal material in the first year corresponding to each set of metal material dose response parameters, obtain a regional factor set.
[0085] Specifically, perform data analysis on the average data of each factor in each atmospheric environment factor set within a preset time period in all sets of metal material dose response parameters, and the corrosion rate of the metal material in the first year corresponding to each set of metal material dose response parameters. According to the analyzed data, obtain a regional factor set, which consists of factors in the atmospheric environment factor set. The analysis methods include but are not limited to data processing methods such as correlation analysis.
[0086] Step 130: According to a preset distance threshold and the thresholds corresponding to each regional factor in the regional factor set, divide the set of metal material dose response parameters of the target area by region to obtain a set of metal material dose response parameter sets corresponding to each region in the target area.
[0087] Specifically, the preset distance threshold is the threshold of the distance between the collection location of the set of metal material dose response parameters and the coastline. Set the preset distance threshold, and set one or more thresholds for each factor in the regional factor set. According to all the set thresholds, define a threshold range, and divide all the sets of metal material dose response parameters according to the threshold range.
[0088] Step 140: Perform data processing on the set of metal material dose response parameters corresponding to the i-th region to obtain a set of key influencing factors for the i-th region.
[0089] Specifically, for each region, perform data processing on the set of metal material dose response parameters within the region to obtain a set of key influencing factors corresponding to each region respectively. The key influencing factors are one or more items in the atmospheric environment factor set.
[0090] Step 150: Obtain the dose-response function equation corresponding to the \(i\)th region according to the pre-constructed dose-response function, the average data of each key influencing factor in each set of key influencing factors in the \(i\)th region within a preset time period, and the corrosion rate of the metal material in the first year corresponding to each set of key influencing factors.
[0091] Specifically, the \(i\)th region is any region divided from the target area. Substitute the average data of the key influencing factors in each region within a preset time period and the corrosion rate of the metal material in the first year corresponding to each set of key influencing factors into the pre-constructed dose-response function, and obtain the coefficients of the parameters in the dose-response equation corresponding to each region, so as to determine the dose-response function equation corresponding to this region.
[0092] Step 160: Construct a corrosion rate prediction model for the metal material in the target area based on the dose-response function equations of all regions.
[0093] Specifically, the dose-response function cluster composed of the dose-response function equations of all regions is the preset model for the corrosion rate of the metal material in the target area.
[0094] In this way, according to the characteristics of the metal material dose-response parameter set in the target area, it is divided by region, and the key influencing factor sets of each region are extracted through processing. According to the key influencing factors and the pre-constructed dose-response function, the dose-response function equations of each region are obtained. According to the dose-response function equations of all regions, a corrosion rate prediction model for the metal material in the target area is constructed, which is beneficial to obtaining a corrosion rate prediction model that better conforms to regional factors according to the characteristics of the atmospheric environment factors in each region, thereby improving the prediction accuracy of the model.
[0095] Optionally, according to the average data of each factor in each set of atmospheric environment factors in all the metal material dose-response parameter sets within a preset time period, and the corrosion rate of the metal material in the first year corresponding to each metal material dose-response parameter set respectively, obtain the regional factor set, which specifically includes the Figure 3 method steps as shown:
[0096] Step 310: Use the correlation analysis method to perform correlation analysis on the average data of the \(k\)th atmospheric environment factor in the set of atmospheric environment factors in the \(h\)th metal material dose-response parameter set and the corrosion rate of the metal material in the first year in the \(h\)th metal material dose-response parameter set respectively, and obtain the \(k\)th correlation value.
[0097] Specifically, the Maximal Information Coefficient (MIC) correlation analysis method can be used to perform a correlation analysis on the k-th atmospheric environmental factor in each metal material dose-response parameter set and the corresponding corrosion rate in the first year, so as to obtain the correlation value of the k-th atmospheric environmental factor in each metal material dose-response parameter set.
[0098] Step 320: Obtain the comprehensive correlation value corresponding to the k-th atmospheric environmental factor according to the k-th correlation value in all metal material dose-response parameter sets.
[0099] Specifically, the comprehensive correlation value of the k-th atmospheric environmental factor is obtained according to the correlation value of the k-th atmospheric environmental factor in all metal material dose-response parameter sets. For example, to obtain the comprehensive correlation value of the annual average temperature value of the atmospheric environmental factor, the correlation values of all annual average temperature values in each metal material dose-response parameter set can be selected for averaging to obtain the comprehensive correlation value of the annual average temperature value.
[0100] Step 330: Sort the comprehensive correlation values of all atmospheric environmental factors to obtain the sorting order.
[0101] Specifically, all atmospheric environmental factors are sorted according to the comprehensive correlation value. For example, the sorting order is: temperature, relative humidity, carbon dioxide, rainfall, chloride ions, etc.
[0102] Step 340: Select the atmospheric environmental factors with a correlation ranking greater than the second preset threshold in the sorting order to form a regional factor set.
[0103] Specifically, the h-th metal material dose-response parameter set is any one of all metal material dose-response parameter sets, and the k-th atmospheric environmental factor is any one of the atmospheric environmental factors in the metal material dose-response parameter set.
[0104] Specifically, select the atmospheric environmental factors with the top A correlation values to form a regional factor set. For example, if the top 2 are selected, the regional factor set is: temperature, relative humidity; if the top 3 are selected, the regional factor set is: temperature, relative humidity, carbon dioxide.
[0105] Optionally, perform data processing on the metal material dose-response parameter set corresponding to the i-th region to obtain the key influencing factor set of the i-th region, including:
[0106] Perform data processing on the metal material dose-response parameter set corresponding to the i-th region using the random forest algorithm to obtain the key influencing factor set of the i-th region.
[0107] Specifically, the random forest algorithm can be used to process the metal material dose response parameter set corresponding to each region respectively to obtain the key influencing factor set of the i-th region.
[0108] Optionally, the random forest algorithm is used to process the metal material dose response parameter set corresponding to the i-th region to obtain the key influencing factor set of the i-th region, including: Figure 4 The method steps shown are:
[0109] Step 410 : Divide the metal material dose response parameter set of the i-th region into a training set and a first test set.
[0110] Specifically, the metal material dose response parameter set of each region is processed separately, and the metal material dose response parameter set is divided according to a certain ratio, for example, 8 to 2. The larger part is used as the training set, and the smaller part is used as the test set, i.e., the first test set, for verification.
[0111] Step 420: Use the training set to train the random forest model to obtain a trained model.
[0112] Step 430: Obtain a first prediction accuracy of the trained model on the first test set.
[0113] Specifically, the first test set is input into the trained model to obtain an output result, and the accuracy of the output result, i.e., the first prediction accuracy, is calculated based on the test set.
[0114] Step 440: shuffle the observation order of the j-th atmospheric environmental factor in the test set n times to obtain n test sets.
[0115] The observation order of the j-th atmospheric environmental factor in all test sets is disrupted, and only one environmental factor is disrupted at a time. This environmental factor is disrupted n times, and n test sets in which the environmental factor is disrupted n times are obtained.
[0116] Step 450: Obtain n prediction accuracies of the trained model on n test sets.
[0117] Input n test sets into the trained model respectively, obtain n output results, and calculate n prediction accuracies respectively until all factors are shuffled n times.
[0118] Step 460: The average of the differences between the first prediction accuracy and the n prediction accuracies is used as a selection criterion for the jth atmospheric environment factor.
[0119] The average of the differences between the first prediction accuracy and the n prediction accuracies of the j-th atmospheric environmental factor is used as the importance score of this atmospheric environmental factor, that is, the selection criterion, until the importance scores of each atmospheric environmental factor are obtained.
[0120] Step 470, obtain the set of key influencing factors according to the selection criterion of each atmospheric environmental factor.
[0121] Specifically, j is the number of atmospheric environmental factors in the test set, and n is a positive integer less than or equal to the number of metal material dose response parameter sets in the test set. The key factors of each region are selected from the atmospheric environmental factors according to the importance score from high to low. The specific selection criterion can be determined according to the actual situation. For example, the scores of all atmospheric environmental factors can be normalized, and then the sum of the selected importance scores reaches a certain threshold, and the selected atmospheric environmental factors form the set of key influencing factors of the region.
[0122] In this way, by using the advanced optimization algorithm of the random forest algorithm to process the data, the advantages of the random forest algorithm can be utilized and verified multiple times, which is beneficial to accurately obtain the set of key influencing factors of each region.
[0123] To make the method of the present invention clearer and more definite, the embodiment of the present invention also provides a more specific method for constructing a metal material corrosion rate prediction model. This method first divides regions with temperature, relative humidity, and coastal distance as parameters, and then uses the random forest method to screen out the key environmental factors of each region. On this basis, a new mathematical expression of the dose response function by region is constructed, and the undetermined parameters in the expression of each region are determined through an optimization algorithm. Finally, a data-driven metal material corrosion rate prediction model is generated.
[0124] Step 1: Input data, that is, the annual average data of 9 atmospheric environmental factors (the annual average data of each factor in the atmospheric environmental factor set), the corrosion rate of the metal material in the first year, and the distance between the location and the coastline. The corrosion rate of the metal material is represented by R corr It is expressed in the unit of μm / a, where a represents year. The 9 atmospheric environmental factors include: temperature is represented by T, in the unit of °C; relative humidity is represented by RH, in the unit of %; rainfall is represented by Rain, in the unit of mm·a; sulfur dioxide is represented by SO2, in the unit of μg / (m 3 ·h); chloride ion is represented by Cl - It is expressed in the unit of mg / m 2 ·d; airborne dust selects PM10, in the unit of μg / (m 3 ·h); nitrogen dioxide is represented by NO2, in the unit of μg / (m 3 ·h); ozone is represented by O3, in the unit of μg / (m 3·h); Carbon monoxide is expressed as CO, unit is mg / (m 3 ·h). The distance from the coastline is expressed in km.
[0125] Step 2: Assuming that the total number of samples is N, the K-means clustering algorithm (K-means clustering algorithm, K-means) is used for clustering. The atmospheric environmental factor data are repeatedly clustered with environmental variables as input, and the cluster centers are gradually increased until all data samples are divided into the closest clusters, and the clustering results do not change with the increase of the number of cluster centers, and M (M) clusters are obtained. <N)大气环境因素数据子集,一个大气环境因素数据子集包括多个集合,一个集合为一个地区大气环境因素集合中各因素的年平均数据。
[0126] Step 3: Automatically remove abnormal data based on the clustering results.
[0127] Specifically, the first-year metal corrosion rate values corresponding to all sets in the M atmospheric environmental factor data subsets are retrieved. Within the same subset, if the difference between a corrosion rate value and all other corrosion rate values is greater than a threshold ε, the corrosion rate value, its corresponding atmospheric environmental factor data, and its distance from the coastline are considered outliers and are removed.
[0128] Step 4: MIC correlation analysis is performed on the samples after the above elimination. The top two with the strongest correlation are selected from the nine atmospheric environmental factors, and five thresholds are set to form the division conditions and automatically divide the areas.
[0129] Specifically, assuming the top two factors with the strongest correlation are f1 and f2, the five thresholds are T1 (the first threshold corresponding to regional factor f1), T2 (the second threshold corresponding to regional factor f1), H1 (the first threshold corresponding to regional factor f2), H2 (the second threshold corresponding to regional factor f2), and D1 (the threshold for distance from the coastline). f1, f2, and the distance from the coastline, l, constitute the partitioning variables, and the five thresholds form the partitioning intervals, dividing the area into at least two regions. The specific regional partitioning criteria are shown in Table 1.
[0130] Region number <![CDATA[f1 condition]]> <![CDATA[f2 condition]]> l condition 1 <![CDATA[f1≥T1]]> <![CDATA[f2≥H2]]> <![CDATA[l≥D1]]> 2 <![CDATA[f1≥T1]]> <![CDATA[f2≥H2]]> <![CDATA[l<D1]]> 3 <![CDATA[f1≥T1]]> <![CDATA[H2>f2≥H1]]> <![CDATA[l≥D1]]> 4 <![CDATA[f1≥T1]]> <![CDATA[H2>f2≥H1]]> <![CDATA[l<D1]]> 5 <![CDATA[f1≥T1]]> <![CDATA[H1≥f2]]> <![CDATA[l≥D1]]> 6 <![CDATA[f1≥T1]]> <![CDATA[H1≥f2]]> <![CDATA[l<D1]]> …… …… …… ……
[0131] Table 1
[0132] By referring to ISO standards and prior experience of atmospheric corrosion rates, it can be seen that environmental factors f1 and f2 are generally T and RH.
[0133] Step 5: Use the random forest method to select S key influencing factors in each region.
[0134] Specifically:
[0135] (1) Divide the data set into a training set and a test set in the ratio of 8:2 by region in sequence. Train a random forest model on the training set and verify the prediction accuracy of the model on the test set. The accuracy is evaluated using the root mean square error (RMSE), denoted as L.
[0136] (2) Assume that the set of environmental factors is F = {F1, F2, … F I}. Shuffle the observation order of F i (i ≤ I) in the test set. Except for F i (i ≤ I), keep the other observation sequences unchanged (shuffle only one factor at a time). Name the new test set DF i (i ≤ I). Repeat several times until each environmental factor in F = {F1, F2, … F I} has been shuffled once, obtaining a set of new test sets D = {DF1, DF2, … DF I}. Calculate the prediction accuracy FL = {FL1, FL2, … FL I} of the model on each test set in D = {DF1, DF2, … DF i} again. Then FL i corresponds to the prediction accuracy of the model after shuffling the observation sequence of factor F i . Among them, DF1 is the test set with only F1 shuffled, DF2 is the test set with only F2 shuffled, and DF i is the test set with only F i shuffled.
[0137] (3) Conduct n-fold cross-validation on step (2). For any FL i , obtain the prediction accuracy of the i-th factor in the j-th cross-validation, that is, FL ij , j = 1, 2 … n. Measure the feature importance using the difference between L and FL ij . Take the average value of the cross-validation and record it in the set IM = {IM1, IM2, … IM I}. IM i can be expressed by the following formula:
[0138]
[0139] Among them, IM i is the feature importance of factor F i , n is the number of prediction accuracies of the test sets with the i-th atmospheric environmental factor shuffled, L is the prediction accuracy of the test set with the order not shuffled, and FL ij is the prediction accuracy of the i-th atmospheric environmental factor in the j-th cross-validation.
[0140] (4) For IM = {IM1, IM2, ... IM i} is normalized so that any IM i The value of is between 0 and 1, and the result is the feature importance score of each environmental factor in the random forest model. L corresponds to the unshuffled F={F1,F2,…F I The result obtained by the model on the prediction set data when any factor in the prediction set data is shuffled can be regarded as the optimal result. I The observation sequence, F i The relationship with the label no longer conforms to the corresponding relationship obtained through the training set. At this time, the result FL obtained by the model in the test set data i It must be worse than L, and the difference between the two is IM i To measure F I Importance of the model.
[0141] (5) Select S key influencing factors from high to low according to the importance score, until the sum of the importance scores of the selected factors reaches 0.8. After data experiment verification, the S key factors in each region all contain the factors T and P = RH / Rain in step 4. Therefore, the S key factors can be expressed as: T, P, A1, A2, ... A S Among them, environmental factors A1, A2, ...A S It varies from region to region.
[0142] Step 6: Establish the dose response function equation of the embodiment of the present invention.
[0143] Specifically: The established function equation is expressed as:
[0144]
[0145]
[0146] Among them, ω1, ω2, ..., ω 2S+2 are unknown coefficients, A1, A2, ...A S represents the environmental factor selected in step 5, ωi represents the i-th coefficient, A i represents the i-th key influencing factor, ω j represents the jth coefficient, A j represents the jth key influencing factor, T represents temperature, RH represents relative humidity, Rain represents rainfall, IM RH and IM Rain Corresponding to the importance scores of relative humidity and rainfall in step 5, ω 2S+1 represents the 2S+1th coefficient, ω 2S+2Represents the (2S + 2)-th coefficient, R corr Represents the corrosion rate of the metal material in the first year, S represents the total number of key influencing factors, P is a variable that can be transformed, as shown in the conditional part of the formula. When IM Rain ≥IM RH P is ln(Rain). When IM Rain <IM RH P is RH.
[0147] Step 7: Calculate the undetermined coefficients based on the data in the divided regions and the multiple linear regression method.
[0148] Specifically: Substitute the data in the divided regions into the dose-response function. With the goal of predicting the accuracy of the corrosion rate of the metal material in the first year using the function output, use multiple linear regression to calculate the values of ω1, ω2,..., ω 2S+2 For each corresponding divided region, a dose-response function can be obtained, forming a preset model for the corrosion rate of the metal material in this area.
[0149] The above is the embodiment of the method for constructing the corrosion rate prediction model of the metal material provided by this application. The following will introduce other embodiments of the corrosion rate prediction model of the metal material provided by this application. For details, please refer to the following.
[0150] Figure 5 This is a device for constructing a corrosion rate prediction model of a metal material provided by an embodiment of the present invention. The device includes:
[0151] An acquisition module 501, configured to acquire multiple metal material dose-response parameter sets of a target area. Each metal material dose-response parameter set includes the average data of each factor in the atmospheric environment factor set within a preset time period, the corrosion rate of the metal material in the first year, and the distance between the collection location of each metal material dose-response parameter set and the coastline;
[0152] A regional factor set determination module 502, configured to obtain a regional factor set according to the average data of each factor in the atmospheric environment factor set within a preset time period in all metal material dose-response parameter sets, and the corrosion rate of the metal material in the first year corresponding to each metal material dose-response parameter set;
[0153] A regional division module 503, configured to divide the metal material dose-response parameter sets of the target area into regions according to a preset distance threshold and the thresholds corresponding to each regional factor in the regional factor set, and obtain a set of metal material dose-response parameter sets corresponding to each region in the target area. The preset distance threshold is the threshold of the distance between the collection location of the metal material dose-response parameter set and the coastline;
[0154] The key influencing factor set determination module 504 is used to process the metal material dose response parameter set corresponding to the i-th region to obtain the key influencing factor set of the i-th region;
[0155] The dose response function equation determination module 505 is used to obtain the dose response function equation corresponding to the i-th region according to the pre-constructed dose response function, the average data of each key influencing factor in each key influencing factor set of the i-th region within a preset time period, and the metal material corrosion rate in the first year corresponding to each key influencing factor set, where the i-th region is any region divided from the target area;
[0156] The model construction module 506 is used to construct a corrosion rate prediction model of the metal material in the target area based on the dose response function equations of all regions.
[0157] Optionally, the device further includes: a clustering module 507, a difference calculation module 508, and a deletion module 509;
[0158] The clustering module 507 is used to cluster all the atmospheric environment factor sets to obtain multiple set groups;
[0159] The difference calculation module 508 is used to calculate the difference between the metal material corrosion rate in the first year corresponding to any atmospheric environment factor set in any set group and the metal material corrosion rate in the first year corresponding to other atmospheric environment factor sets in the set group respectively;
[0160] The deletion module 509 is used to delete the metal material dose response parameter set corresponding to the metal material corrosion rate in the first year if the differences are all greater than the first preset threshold to obtain an updated set group.
[0161] Optionally, the device further includes: a correlation analysis module 510, a data processing module 511, and a sorting module 512;
[0162] The correlation analysis module 510 is used to perform a correlation analysis on the average data of the k-th atmospheric environment factor in the atmospheric environment factor set in the h-th metal material dose response parameter set and the metal material corrosion rate in the first year in the h-th metal material dose response parameter set respectively by using the correlation analysis method to obtain the k-th correlation value;
[0163] The data processing module 511 is used to obtain the comprehensive correlation value corresponding to the k-th atmospheric environment factor according to the k-th correlation value in all the metal material dose response parameter sets;
[0164] The sorting module 512 is used to sort the comprehensive correlation values of all the atmospheric environment factors to obtain the sorting order;
[0165] The regional factor set determination module 502 is specifically configured to select the atmospheric environment factors with a correlation ranking greater than the second preset threshold in the sorting order to form a regional factor set. Among them, the h-th metal material dose response parameter set is any one of all the metal material dose response parameter sets, and the k-th atmospheric environment factor is any atmospheric environment factor in the metal material dose response parameter set.
[0166] Optionally, the device includes:
[0167] The data processing module 511 is further configured to perform data processing on the metal material dose response parameter set corresponding to the i-th region by using the random forest algorithm to obtain the key influencing factor set of the i-th region.
[0168] Optionally, the device further includes: a training module 513;
[0169] The set partitioning module 512 is configured to divide the metal material dose response parameter set of the i-th region into a training set and a first test set;
[0170] The training module 513 is configured to train the random forest model by using the training set to obtain a trained model;
[0171] The data processing module 511 is further configured to obtain the first prediction accuracy of the trained model on the first test set; shuffle the observation order of the j-th atmospheric environment factor in the test set n times to obtain n test sets; obtain the n prediction accuracies of the trained model on the n test sets; use the average value of the differences between the first prediction accuracy and the n prediction accuracies as the selection criterion for the j-th atmospheric environment factor; obtain the key influencing factor set according to the selection criterion of each atmospheric environment factor, where j is the number of atmospheric environment factors in the test set, and n is a positive integer less than or equal to the number of metal material dose response parameter sets in the test set.
[0172] The functions performed by each component in the corrosion rate prediction model construction device for metal materials provided in the embodiments of the present invention have been described in detail in any of the above method embodiments, so they will not be repeated here.
[0173] An apparatus for constructing a corrosion rate prediction model of a metal material provided by an embodiment of the present invention obtains multiple metal material dose-response parameter sets of a target area. Each metal material dose-response parameter set includes the average data of each factor in the atmospheric environment factor set within a preset time period, the corrosion rate of the metal material in the first year, and the distance between the collection location of each metal material dose-response parameter set and the coastline. According to the average data of each factor in each atmospheric environment factor set within the preset time period in all the metal material dose-response parameter sets, and the corrosion rate of the metal material in the first year corresponding to each metal material dose-response parameter set, a regional factor set is obtained. According to a preset distance threshold and the thresholds corresponding to each regional factor in the regional factor set, the metal material dose-response parameter sets of the target area are divided by region, and a set of metal material dose-response parameter sets corresponding to each region in the target area is obtained. The preset distance threshold is the threshold of the distance between the collection location of the metal material dose-response parameter set and the coastline. Data processing is performed on the metal material dose-response parameter set corresponding to the i-th region to obtain a set of key influencing factors for the i-th region. According to a pre-constructed dose-response function, the average data of each key influencing factor in each set of key influencing factors for the i-th region within the preset time period, and the corrosion rate of the metal material in the first year corresponding to each set of key influencing factors, a dose-response function equation corresponding to the i-th region is obtained, where the i-th region is any region divided from the target area. A corrosion rate prediction model of the metal material in the target area is constructed based on the dose-response function equations of all regions. By this method, the metal material dose-response parameter sets of the target area are divided by region according to their characteristics, and the key influencing factor sets of each region are extracted through processing. According to the key influencing factors and the pre-constructed dose-response function, the dose-response function equations of each region are obtained, and a corrosion rate prediction model of the metal material in the target area is constructed based on the dose-response function equations of all regions, which is beneficial to obtaining a corrosion rate prediction model that better conforms to the regional factors according to the characteristics of the atmospheric environment factors in each region, thereby improving the prediction accuracy of the model.
[0174] As Figure 6 shown, an embodiment of the present application provides an electronic device, including a processor 111, a communication interface 112, a memory 113, and a communication bus 114. Among them, the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.
[0175] The memory 113 is used to store a computer program;
[0176] In an embodiment of the present application, when the processor 111 is used to execute the program stored on the memory 113, it implements the method for constructing a corrosion rate prediction model of a metal material provided by any one of the foregoing method embodiments, including:
[0177] Obtain multiple sets of metal material dose-response parameters for the target area, where each set of metal material dose-response parameters includes the average data of each factor in the atmospheric environmental factor set within a preset time period, the corrosion rate of the metal material in the first year, and the distance between the collection location of each set of metal material dose-response parameters and the coastline;
[0178] According to the average data of each factor in each atmospheric environmental factor set within the preset time period in all sets of metal material dose-response parameters, and the corrosion rate of the metal material in the first year corresponding to each set of metal material dose-response parameters, obtain the regional factor set;
[0179] According to the preset distance threshold and the thresholds corresponding to each regional factor in the regional factor set, divide the sets of metal material dose-response parameters for the target area by region to obtain the set of sets of metal material dose-response parameters corresponding to each region in the target area, where the preset distance threshold is the threshold of the distance between the collection location of the set of metal material dose-response parameters and the coastline;
[0180] Perform data processing on the set of metal material dose-response parameters corresponding to the i-th region to obtain the set of key influencing factors for the i-th region;
[0181] According to the pre-constructed dose-response function, the average data of each key influencing factor in each set of key influencing factors for the i-th region within the preset time period, and the corrosion rate of the metal material in the first year corresponding to each set of key influencing factors, obtain the dose-response function equation corresponding to the i-th region, where the i-th region is any region divided from the target area;
[0182] Construct a corrosion rate prediction model for the metal material in the target area based on the dose-response function equations of all regions.
[0183] Optionally, after obtaining multiple sets of metal material dose-response parameters for the target area, the method further includes:
[0184] Cluster all the atmospheric environmental factor sets to obtain multiple set groups;
[0185] For the corrosion rate of the metal material in the first year corresponding to any atmospheric environmental factor set in any set group, calculate the difference between the corrosion rate of the metal material in the first year and the corrosion rate of the metal material in the first year corresponding to other atmospheric environmental factor sets in the set group;
[0186] If the differences are all greater than the first preset threshold, delete the set of metal material dose-response parameters corresponding to the corrosion rate of the metal material in the first year to obtain an updated set group.
[0187] Optionally, perform a correlation analysis on the annual average data of each factor in each set of atmospheric environment factors in all metal material dose response parameter sets and the corresponding metal material corrosion rate in the first year to obtain a set of regional factors, specifically including:
[0188] Use the correlation analysis method to perform a correlation analysis on the average data of the k-th atmospheric environment factor in the set of atmospheric environment factors in the h-th metal material dose response parameter set and the metal material corrosion rate in the first year in the h-th metal material dose response parameter set respectively, to obtain the k-th correlation value;
[0189] Obtain the comprehensive correlation value corresponding to the k-th atmospheric environment factor according to the k-th correlation value in all metal material dose response parameter sets;
[0190] Sort the comprehensive correlation values of all atmospheric environment factors to obtain the sorting order;
[0191] Select the atmospheric environment factors with a correlation ranking greater than the second preset threshold in the sorting order to form a set of regional factors, where the h-th metal material dose response parameter set is any one of all metal material dose response parameter sets, and the k-th atmospheric environment factor is any one of the atmospheric environment factors in the metal material dose response parameter set.
[0192] Optionally, perform data processing on the metal material dose response parameter set corresponding to the i-th region to obtain a set of key influencing factors for the i-th region, including:
[0193] Perform data processing on the metal material dose response parameter set corresponding to the i-th region using the random forest algorithm to obtain a set of key influencing factors for the i-th region.
[0194] Optionally, perform data processing on the metal material dose response parameter set corresponding to the i-th region using the random forest algorithm to obtain a set of key influencing factors for the i-th region, specifically including:
[0195] Divide the metal material dose response parameter set of the i-th region into a training set and a first test set;
[0196] Use the training set to train the random forest model to obtain a trained model;
[0197] Obtain the first prediction accuracy of the trained model on the first test set;
[0198] Shuffle the observation order of the j-th atmospheric environment factor in the test set n times to obtain n test sets;
[0199] Obtain the n prediction accuracies of the trained model on the n test sets;
[0200] The average value of the differences between the first prediction accuracy and n prediction accuracies is used as the selection criterion for the j-th atmospheric environmental factor;
[0201] A set of key influencing factors is obtained according to the selection criterion of each atmospheric environmental factor, where j is the number of atmospheric environmental factors in the test set, and n is a positive integer less than or equal to the number of metal material dose response parameter sets in the test set.
[0202] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for constructing a corrosion rate prediction model of a metal material provided in any of the foregoing method embodiments are implemented.
[0203] It should be noted that in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
[0204] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for constructing a corrosion rate prediction model for metal materials, characterized in that: The method comprises: Acquire multiple metal material dose response parameter sets in the target area, wherein each metal material dose response parameter set includes average data of each factor in the atmospheric environmental factor set within a preset time period, the metal material corrosion rate in the first year, and the distance between the collection location of each metal material dose response parameter set and the coastline; Obtaining a regional factor set based on average data of each factor in each atmospheric environmental factor set in all the metal material dose response parameter sets within a preset time period, and the first-year metal material corrosion rate corresponding to each metal material dose response parameter set; Dividing the metal material dose response parameter set of the target area by region according to a preset distance threshold and a threshold corresponding to each regional factor in the regional factor set, to obtain a set of metal material dose response parameter sets corresponding to each region in the target area, wherein the preset distance threshold is a threshold of the distance between the collection location of the metal material dose response parameter set and the coastline; Performing data processing on the metal material dose response parameter set corresponding to the i-th region to obtain a set of key influencing factors of the i-th region; Obtaining a dose response function equation corresponding to the i-th region based on a pre-constructed dose response function, average data of each key influencing factor in each set of key influencing factors in the i-th region within a preset time period, and the first-year metal material corrosion rate corresponding to each set of key influencing factors, wherein the i-th region is any region into which the target area is divided; Constructing a corrosion rate prediction model for metal materials in the target area based on the dose response function equations of all regions; The dose response function equation is expressed as: Among them, ω1, ω2, K, ω 2S+2 are unknown coefficients, A1, A2, KA S represents the key influencing factors, ω i represents the i-th coefficient, A i represents the i-th key influencing factor, ω j represents the jth coefficient, A j represents the jth key influencing factor, T represents temperature, RH represents relative humidity, Rain represents rainfall, IM RH and IM Rain Corresponding to the importance scores of relative humidity and rainfall, ω 2S+1 represents the 2S+1th coefficient, ω 2S+2 Represents the 2S+2 coefficient, R corr Indicates the corrosion rate of metal materials in the first year, S indicates the total number of key influencing factors, and P is a variable quantity. As shown in the conditional part of the formula, when IM Rain ≥IM RH When P is ln(Rain), when IM Rain <IM RH When , p is RH.
2. The method according to claim 1, characterized in that After obtaining a plurality of metal material dose response parameter sets in the target area, the method further includes: Cluster all atmospheric environmental factor sets to obtain multiple set groups; For the first-year metal material corrosion rate corresponding to any atmospheric environmental factor set in any set group, respectively calculate the difference between the first-year metal material corrosion rate and the first-year metal material corrosion rate corresponding to other atmospheric environmental factor sets in the set group; If the differences are all greater than a first preset threshold, the metal material dose response parameter set corresponding to the first-year metal material corrosion rate is deleted to obtain an updated set group.
3. The method according to claim 1, characterized in that The obtaining of the regional factor set according to the average data of each factor in each atmospheric environmental factor set in all the metal material dose response parameter sets within a preset time period, and the first-year metal material corrosion rate corresponding to each metal material dose response parameter set, specifically includes: The correlation analysis method is used to perform correlation analysis on the average data of the kth atmospheric environmental factor in the atmospheric environmental factor set in the hth metal material dose response parameter set and the first year metal material corrosion rate in the hth metal material dose response parameter set, respectively, to obtain the kth correlation value; Obtaining a comprehensive correlation value corresponding to the kth atmospheric environmental factor according to the kth correlation value in all metal material dose response parameter sets; Sort the comprehensive correlation values of all atmospheric environmental factors to obtain the sorting order; Atmospheric environmental factors whose correlation ranking in the sorting order is greater than a second preset threshold are selected to form a regional factor set, wherein the hth metal material dose response parameter set is any one of all metal material dose response parameter sets, and the kth atmospheric environmental factor is any atmospheric environmental factor in the metal material dose response parameter set.
4. The method according to claim 1, wherein The data processing of the metal material dose response parameter set corresponding to the i-th region to obtain the key influencing factor set of the i-th region includes: The random forest algorithm is used to process the metal material dose response parameter set corresponding to the i-th region to obtain the set of key influencing factors of the i-th region.
5. The method according to claim 4, characterized in that The random forest algorithm is used to process the metal material dose response parameter set corresponding to the i-th region to obtain a set of key influencing factors for the i-th region, specifically including: The dose response parameter set of the metal material in the i-th region is divided into a training set and a first test set; Using the training set to train the random forest model to obtain a trained model; Obtaining a first prediction accuracy of the trained model on the first test set; The observation order of the jth atmospheric environmental factor in the test set is shuffled n times to obtain n test sets; Obtain n prediction accuracies of the trained model on the n test sets; The average of the differences between the first prediction accuracy and the n prediction accuracies is used as the selection criterion for the jth atmospheric environmental factor; The key influencing factor set is obtained according to the selection criteria of each atmospheric environmental factor, wherein j is the number of atmospheric environmental factors in the test set, and n is a positive integer less than or equal to the number of metal material dose response parameter sets in the test set.
6. A device for constructing a corrosion rate prediction model for metal materials, characterized in that: The device comprises: an acquisition module, configured to acquire a plurality of metal material dose response parameter sets in a target area, wherein each of the metal material dose response parameter sets includes average data of each factor in a set of atmospheric environmental factors within a preset time period, a first-year metal material corrosion rate, and a distance between a collection location of each metal material dose response parameter set and a coastline; a regional factor set determination module, configured to obtain a regional factor set based on average data of each factor in each atmospheric environment factor set in all the metal material dose response parameter sets within a preset time period, and the first-year metal material corrosion rate corresponding to each metal material dose response parameter set; a region division module, configured to divide the metal material dose response parameter set of the target area into regions according to a preset distance threshold and a threshold corresponding to each regional factor in the regional factor set, to obtain a set of metal material dose response parameter sets corresponding to each region in the target area, wherein the preset distance threshold is a threshold of the distance between the collection location of the metal material dose response parameter set and the coastline; A key influencing factor set determination module is used to process the metal material dose response parameter set corresponding to the i-th region to obtain the key influencing factor set of the i-th region; a dose response function equation determination module, configured to obtain a dose response function equation corresponding to the i-th region based on a pre-constructed dose response function, average data of each key influencing factor in each set of key influencing factors in the i-th region within a preset time period, and the first-year metal material corrosion rate corresponding to each key influencing factor set, wherein the i-th region is any region into which the target area is divided; A model building module, used for building a corrosion rate prediction model of the metal material in the target area based on the dose response function equations of all areas; The dose response function equation is expressed as: Among them, ω1, ω2, K, ω 2S+2 are unknown coefficients, A1, A2, KA S represents the key influencing factors, ω i represents the i-th coefficient, A i represents the i-th key influencing factor, ω j represents the jth coefficient, A j represents the jth key influencing factor, T represents temperature, RH represents relative humidity, Rain represents rainfall, IM RH and IM Rain Corresponding to the importance scores of relative humidity and rainfall, ω 2S+1 represents the 2S+1th coefficient, ω 2S+2 Represents the 2S+2 coefficient, R corr Indicates the corrosion rate of metal materials in the first year, S indicates the total number of key influencing factors, and P is a variable quantity. As shown in the conditional part of the formula, when IM Rain ≥IM RH When P is ln(Rain), when IM Rain <IM RH When , p is RH.
7. The device according to claim 6, characterized in that The device further comprises: Clustering module, used to cluster all atmospheric environmental factor sets to obtain multiple set groups; a difference calculation module, configured to calculate, for a first-year metal material corrosion rate corresponding to any one set of atmospheric environmental factors in any set group, the difference between the first-year metal material corrosion rate and the first-year metal material corrosion rates corresponding to other sets of atmospheric environmental factors in the set group; The deletion module is configured to delete the metal material dose response parameter set corresponding to the first-year metal material corrosion rate to obtain an updated set group if the differences are all greater than a first preset threshold.
8. The device according to claim 6, characterized in that The device further comprises: a correlation analysis module for performing correlation analysis on the average data of the kth atmospheric environmental factor in the atmospheric environmental factor set in the hth metal material dose response parameter set and the first-year metal material corrosion rate in the hth metal material dose response parameter set using a correlation analysis method to obtain a kth correlation value; a processing module, configured to obtain a comprehensive correlation value corresponding to the kth atmospheric environmental factor according to the kth correlation value in the dose response parameter set of all metal materials; The sorting module is used to sort the comprehensive correlation values of all atmospheric environmental factors and obtain the sorting order; The regional factor set determination module is specifically used to select atmospheric environmental factors whose correlation ranking in the sorting order is greater than a second preset threshold to form a regional factor set, wherein the hth metal material dose response parameter set is any one of all metal material dose response parameter sets, and the kth atmospheric environmental factor is any atmospheric environmental factor in the metal material dose response parameter set.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is used to implement the steps of the method for constructing a corrosion rate prediction model for metal materials as described in any one of claims 1 to 5 when executing the program stored in the memory.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for constructing a corrosion rate prediction model for metal materials as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Converting station grounding grid corrosion rate pattern recognition method based on optimum authentication formula
CN103164619A
Carbon steel corrosion rate prediction method based on random forest algorithm
CN112348264A