A method, device, equipment and storage medium for predicting mechanical properties of magnesium alloy
By calculating the phase diagram and processing the data of magnesium alloy samples, and optimizing the model parameters using the random forest algorithm and genetic algorithm, the problem of low prediction accuracy of the mechanical properties of magnesium alloys was solved, and higher prediction accuracy was achieved.
Patent Information
- Application Number
- CN202211171966.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2042-09-26
AI Technical Summary
The existing technology has low prediction accuracy for the mechanical properties of magnesium alloys, mainly due to the small amount of data and the fact that the machine learning algorithm requires a large amount of data for training, resulting in low prediction accuracy.
By calculating the phase diagram of magnesium alloy samples, the random forest algorithm is used to construct the initial prediction model, and the genetic algorithm is combined to optimize the model parameters, perform data standardization and normalization, expand the data volume, and improve the accuracy of the prediction model.
The accuracy of prediction of mechanical properties of magnesium alloys is improved, overfitting is avoided, and more accurate calculation results are achieved.
Smart Images

Figure CN115527636B_ABST
Abstract
Description
Technical Field
[0001] This article relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for predicting the mechanical properties of magnesium alloys. Background Art
[0002] The mechanical properties of magnesium alloys primarily include ultimate tensile strength (UTS), yield strength (YTS), and elongation (EL). Existing technologies often use machine learning algorithms to predict the mechanical properties of magnesium alloys. Specifically, data on the material composition and processing technology of the magnesium alloy is used as a dataset, and then a machine learning algorithm is used to calculate the dataset to obtain the mechanical properties of the magnesium alloy. However, the amount of data on the material composition and processing technology of magnesium alloys is relatively small, and machine learning algorithms often require a large amount of data for model training. As a result, the accuracy of predicting the properties of magnesium alloys using machine learning algorithms is low.
[0003] There is an urgent need for a method for predicting the mechanical properties of magnesium alloys, so as to solve the problem of low prediction accuracy of the mechanical properties of magnesium alloys in the prior art. Summary of the Invention
[0004] To solve the problems in the prior art, the embodiments of this article provide a method, device, equipment and storage medium for predicting the mechanical properties of magnesium alloys, which can expand the parameter data of magnesium alloys, and quickly and accurately screen out the best model parameters and determine the optimal prediction model, thereby improving the accuracy of the prediction of the mechanical properties of magnesium alloys.
[0005] In order to solve the above technical problems, the specific technical solutions of this article are as follows:
[0006] On the one hand, the embodiments of this invention provide a method for predicting the mechanical properties of magnesium alloys, comprising:
[0007] Calculate the phase diagram of the magnesium alloy sample and use the calculated magnesium alloy composition and processing parameters as the genetic mechanical properties dataset of the magnesium alloy material;
[0008] Performing data standardization and data normalization preprocessing on the genetic mechanical property data set of the magnesium alloy material to obtain a standard data set;
[0009] constructing an initial prediction model for the mechanical properties of a magnesium alloy using a random forest algorithm, and calculating the standard data set using the initial prediction model for the mechanical properties of the magnesium alloy to obtain calculated values of the mechanical properties of the magnesium alloy sample, and optimizing the parameters of the initial prediction model for the mechanical properties of the magnesium alloy according to the actual values of the mechanical properties of the magnesium alloy sample, the calculated values of the mechanical properties of the magnesium alloy sample, and a genetic algorithm to obtain a prediction model for the mechanical properties of the magnesium alloy;
[0010] The magnesium alloy mechanical property prediction model is used to predict the mechanical properties of a target magnesium alloy sample.
[0011] On the other hand, the embodiment of this invention also provides a device for predicting the mechanical properties of magnesium alloys, comprising:
[0012] A data set construction unit is used to calculate the phase diagram of the magnesium alloy sample and use the calculated magnesium alloy composition and processing parameters as the genetic mechanical properties data set of the magnesium alloy material;
[0013] a neglect standardization unit, configured to perform data standardization and data normalization preprocessing on the genetic mechanical property data set of the magnesium alloy material to obtain a standard data set;
[0014] a prediction model construction unit, configured to construct an initial prediction model for the mechanical properties of the magnesium alloy using a random forest algorithm, and to calculate the standard data set using the initial prediction model for the mechanical properties of the magnesium alloy to obtain calculated values of the mechanical properties of the magnesium alloy sample, and to optimize parameters of the initial prediction model for the mechanical properties of the magnesium alloy based on the actual values of the mechanical properties of the magnesium alloy sample, the calculated values of the mechanical properties of the magnesium alloy sample, and a genetic algorithm to obtain a prediction model for the mechanical properties of the magnesium alloy;
[0015] The performance prediction unit is used to predict the mechanical properties of the target magnesium alloy sample using the magnesium alloy mechanical property prediction model.
[0016] On the other hand, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor implements the above method when executing the computer program.
[0017] Finally, the embodiments of this document further provide a computer storage medium on which a computer program is stored. When the computer program is executed by a processor of a computer device, the above method is executed.
[0018] By using the embodiments of this article, a random forest algorithm is used to construct a magnesium alloy mechanical property prediction model, which avoids overfitting in the calculation process. By calculating the phase diagram of the magnesium alloy sample, the magnesium alloy composition is obtained, and the phase diagram of different composition processes is obtained by calculation, and the composition and proportion of its phase are obtained. The amount of calculated data is increased and input into the magnesium alloy mechanical property prediction model, thereby obtaining more accurate calculation results, improving the accuracy of the prediction of the mechanical properties of the magnesium alloy, and solving the problem of low prediction accuracy of the mechanical properties of the magnesium alloy in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of this article or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of this article. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 FIG2 is a schematic diagram of an implementation system of a method for predicting mechanical properties of magnesium alloys according to an embodiment of this invention;
[0021] Figure 2 Shown is a flow chart of a method for predicting mechanical properties of magnesium alloys according to an embodiment of this invention;
[0022] Figure 3 The figure shows the steps of constructing an initial prediction model of magnesium alloy mechanical properties using random forest algorithm in the embodiment of this article;
[0023] Figure 4 The figure shows a schematic structural diagram of a magnesium alloy mechanical property prediction device according to an embodiment of this invention;
[0024] Figure 5a Shown is the R of different algorithm training sets in the examples of this paper 2 value;
[0025] Figure 5b Shown are the RMSE values of the training sets of different algorithms in the examples of this article;
[0026] Figure 5c Shown is the R of the test set of different algorithms in this paper 2 value;
[0027] Figure 5d Shown are the RMSE values of the test sets of different algorithms in the examples of this article;
[0028] Figure 6a Shown is the R of the training set with different preprocessing methods in this paper 2 value;
[0029] Figure 6b Shown are the RMSE values of the training sets for different preprocessing methods in the examples of this article;
[0030] Figure 6c Shown is the R of the test set with different preprocessing methods in this paper 2 value;
[0031] Figure 6d Shown are the RMSE values of the test set for different preprocessing methods in the examples of this article;
[0032] Figure 7aShown is the relationship diagram between the characteristic f(Mg5Zn2) and the characteristic f(Cub) of the embodiment of this article;
[0033] Figure 7b Shown is the relationship diagram between the feature f(UTS) and the feature f(Al11Mn4_T1) of the embodiment of this article;
[0034] Figure 7c Shown is the relationship diagram between the characteristic f(YTS) and the characteristic f(MgZn) of the embodiment of this article;
[0035] Figure 7d Shown is the relationship diagram between the feature f(EL) and the feature f(Ca2Mg5Zn5_im1) of the embodiment of this article;
[0036] Figure 8 Shown is a heat map of the feature relationships of the embodiments in this article;
[0037] Figure 9a Shown is the R before and after the expansion of the embodiment of this article 2 value;
[0038] Figure 9b Shown are the RMSE values before and after dimensionality expansion of the embodiment in this article;
[0039] Figure 10a The figure shows the prediction results of UTS by the embodiment model of this article;
[0040] Figure 10b The figure shows the prediction results of YTS by the embodiment model of this article;
[0041] Figure 10c The figure shows the prediction results of EL by the model of the embodiment of this article;
[0042] Figure 11 Shown is the phase diagram of Mg-5Zn-4Al-xSn in the examples of this article;
[0043] Figure 12a Shown is a stress-strain curve diagram of the embodiment of this article;
[0044] Figure 12b Shown is a diagram of the tensile test results of the embodiments of this article;
[0045] Figure 13 Shown is a schematic structural diagram of a computer device according to an embodiment of this invention.
[0046]
Description of the accompanying drawings
[0047] 101. Terminal;
[0048] 102. Server;
[0049] 401, dataset construction unit;
[0050] 402. Neglect of standardized units;
[0051] 403. Prediction model building unit;
[0052] 404, performance prediction unit;
[0053] 1302. Computer equipment;
[0054] 1304. Processing equipment;
[0055] 1306. Storage resources;
[0056] 1308, driving mechanism;
[0057] 1310, input / output module;
[0058] 1312. Input devices;
[0059] 1314. Output device;
[0060] 1316. Presentation equipment;
[0061] 1318. Graphical User Interface;
[0062] 1320, network interface;
[0063] 1322, communication link;
[0064] 1324. Communication bus. DETAILED DESCRIPTION
[0065] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in the embodiments of this document. Obviously, the embodiments described are only part of the embodiments of this document, not all of the embodiments. Based on the embodiments of this document, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this document.
[0066] It should be noted that the terms "first," "second," and the like in the specification and claims herein and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or devices.
[0067] like Figure 1 The figure shows a schematic diagram of a system for implementing a magnesium alloy mechanical property prediction method according to an embodiment of the present invention. The system may include a terminal 101 and a server 102. The terminal 101 and the server 102 establish a communication connection to enable data exchange. Data of multiple magnesium alloy samples can be manually entered into the terminal 101, which then transmits the data to the server 102. The server 102 then constructs a magnesium alloy mechanical property prediction model based on the data of the magnesium alloy samples transmitted by the terminal 101.
[0068] In the embodiments of this specification, the server 102 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN, Content Delivery Network), and big data and artificial intelligence platforms.
[0069] In an optional embodiment, terminal 101 can be combined with server 102 to predict the mechanical properties of magnesium alloys. Specifically, terminal 101 can include, but is not limited to, electronic devices such as desktop computers, tablet computers, and laptop computers, or data acquisition systems (e.g., DSP data collectors). Optionally, operating systems running on these electronic devices can include, but are not limited to, Linux, Windows, and the like.
[0070] In addition, it should be noted that Figure 1 What is shown is only one application environment provided by the present disclosure. In actual applications, other application environments may also be included, and this specification does not limit them.
[0071] In order to predict the mechanical properties of magnesium alloys, the embodiments of this article provide a method for predicting the mechanical properties of magnesium alloys, which can expand the parameter data of magnesium alloys, and quickly and accurately screen out the best model parameters and determine the optimal prediction model, thereby improving the accuracy of predicting the mechanical properties of magnesium alloys. Figure 2 The flowchart of a method for predicting the mechanical properties of magnesium alloys provided in the embodiments of this article is shown. This figure describes the process of predicting the properties of magnesium alloys, but it may include more or fewer operating steps based on conventional or non-creative work. The order of steps listed in the embodiment is only one way of executing the steps among many, and does not represent the only execution order. When the actual system or device product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiment or the accompanying drawings. Specifically, Figure 2 As shown, the method may include:
[0072] Step 201: Calculate a phase diagram of a magnesium alloy sample, and use the calculated magnesium alloy composition and processing parameters as a genetic mechanical property data set of the magnesium alloy material;
[0073] Step 202: performing data standardization and data normalization preprocessing on the genetic mechanical property dataset of the magnesium alloy material to obtain a standard dataset;
[0074] Step 203: constructing an initial prediction model for the mechanical properties of magnesium alloys using a random forest algorithm, and using the initial prediction model for the mechanical properties of magnesium alloys to calculate the standard data set to obtain calculated values of the mechanical properties of the magnesium alloy sample, and optimizing the parameters of the initial prediction model for the mechanical properties of magnesium alloys based on the actual values of the mechanical properties of the magnesium alloy sample, the calculated values of the mechanical properties of the magnesium alloy sample, and a genetic algorithm to obtain a prediction model for the mechanical properties of magnesium alloys;
[0075] Step 204: using the magnesium alloy mechanical property prediction model to predict the mechanical properties of the target magnesium alloy sample.
[0076] Through the method of the embodiment of this article, a random forest algorithm is used to construct a magnesium alloy mechanical property prediction model, which avoids overfitting in the calculation process. By calculating the phase diagram of the magnesium alloy sample, the magnesium alloy composition is obtained, and the phase diagram of different composition processes is obtained by calculation, and the composition and proportion of its phase are obtained. The amount of calculated data is increased and input into the magnesium alloy mechanical property prediction model, thereby obtaining more accurate calculation results, improving the accuracy of the prediction of the mechanical properties of the magnesium alloy, and solving the problem of low prediction accuracy of the mechanical properties of the magnesium alloy in the prior art.
[0077] According to one embodiment of the present invention, in order to further expand the dimension of the data and thus improve the accuracy of the constructed magnesium alloy mechanical property prediction model, the phase diagram calculation of the magnesium alloy sample further includes:
[0078] The calphad method is used to calculate the phase diagram of the magnesium alloy to obtain the magnesium alloy composition including one or more combinations of the mass fractions of Mg, Al, Ca, Mn, Sn, and Zn.
[0079] The magnesium alloy mechanical properties data used in this paper is the magnesium alloy dataset of Mi et al. The characteristic values include magnesium alloy composition (Mg, Al, Ca, Mn, Sn, Zn mass fraction), processing parameters (extrusion time, temperature, extrusion ratio) and corresponding mechanical properties, totaling 11 features and 210 data.
[0080] Compared to other machine learning prediction models, the eigenvector dimension of this experimental dataset is relatively low. Therefore, the Calphad (phase diagram calculation) method was considered for expanding the dataset dimension. Based on thermodynamic theory, the Calphad method uses the Gibbs free energy model and equilibrium calculations to predict the thermodynamic properties of materials in an unknown high-dimensional system from a known low-dimensional system. In this paper, the Calphad-based Pandat software was used to calculate the phase diagram of the magnesium alloy. A high-throughput method was then used to batch calculate the components of each phase in the stable equilibrium state at the experimental temperature. These components were used as eigenvectors in the dataset, expanding the dimensionality of the original data to enhance the model's fitting capabilities.
[0081] The varying dimensions of data significantly impact the accuracy of algorithms. Therefore, data preprocessing is often used to align the dimensions of all eigenvectors to avoid interference with the model caused by the wide range of values in some features. Data preprocessing primarily involves scaling, including data standardization and data normalization.
[0082] Data normalization is to scale the data so that it falls into a smaller specific range. Currently, there are three main methods: Z-score method, range normalization method, absolute value maximum normalization method, and decimal calibration normalization method.
[0083] The Z-score method transforms the features into normal distribution by calculating the Z-score value, avoiding the large deviation of the results caused by the characteristic data of certain data sets. The calculation method is shown in formula (1).
[0084]
[0085] Where "x" is the training sample, "x'" is the transformed feature, "ave(x)" is the mean of the training sample, and "std(x)" is the standard deviation of the training sample.
[0086] The range normalization method performs interval scaling based on the maximum and minimum values of the features, converting the features to the (0, 1) interval to avoid the difficulty of model convergence caused by a particularly large value of a certain attribute. It is usually used in neural network algorithms, and the calculation method is shown in formula (2).
[0087]
[0088] Absolute value maximum normalization is to scale the feature variables according to the maximum absolute value of each feature variable, as shown in formula (3).
[0089]
[0090] The decimal calibration standardization method performs standardization by moving the decimal point position of the feature so that the feature value is converted to the (-1, 1) interval, as shown in formula (4).
[0091]
[0092] in,
[0093] Data normalization is to reduce the order of magnitude of feature variables and the interference of certain features with larger values on the prediction process by scaling each feature to unit norm, calculating the norm of each sample, and then dividing the value of each sample in the sample by the norm. It is usually used in algorithms such as decision trees.
[0094]
[0095] Among them, when n=1, it is the L1 normalization method, which can be regarded as each vector divided by the sum of the absolute values of each vector; when n=2, it is the L2 normalization method, also known as spatial symbol preprocessing.
[0096] In addition, in order to obtain more objective training data sets and test data sets, the mechanical properties data of the magnesium alloy under study were randomly segmented with a segmentation ratio of 4:1.
[0097] In the embodiments of this article, random forest is an improved algorithm based on decision tree, which is achieved by building several decision trees together and averaging the prediction results of each decision tree. Each decision tree in the random forest performs random sampling training on the training data set. Random forest randomly selects m features from the M features of the data set (such as the number of features of the magnesium alloy data set used in this article, M = 11), traverses and calculates the information gain or Gini coefficient for these m features, and selects the best point among these m features as the splitting attribute of the node. Therefore, compared with the decision tree, the random forest applies an integrated learning method that integrates multiple decision trees, reduces the overfitting of the model, and is more suitable for magnesium alloy mechanical property data sets with smaller data sets.
[0098] Random forests have two key parameters: the maximum depth of each tree and the number of trees in the model. A larger maximum depth increases the computational load, so optimal parameters must be selected to balance model computation and accuracy. A smaller number of trees can lead to underfitting, while a larger number of trees can also impose a computational burden. Therefore, finding the optimal parameters as quickly as possible is crucial for this random forest mechanical properties prediction model.
[0099] Therefore, according to one embodiment of this invention, Figure 3 As shown, the initial prediction model of magnesium alloy mechanical properties constructed using random forest algorithm further includes:
[0100] Step 301: Binary encode the number of trees and the depth of the trees in the random forest algorithm, and use the obtained binary array as the chromosome of an individual in the population of the random forest algorithm;
[0101] Step 302: setting the number of individuals in the population and the length of the chromosome, and randomly generating chromosome parameters of the primary population. The chromosome parameters are binary one-dimensional arrays, and one individual in the population corresponds to one magnesium alloy sample.
[0102] Step 303: Using the chromosome parameters as parameters of the initial prediction model for the mechanical properties of the magnesium alloy, and constructing the initial prediction model for the mechanical properties of the magnesium alloy according to the chromosome parameters.
[0103] Furthermore, the calculated values of the mechanical properties of the magnesium alloy sample include the calculated value of the tensile strength, the calculated value of the yield strength, and the calculated value of the elongation of the magnesium alloy sample.
[0104] Furthermore, optimizing the parameters of the initial prediction model of the mechanical properties of the magnesium alloy according to the actual mechanical property values of the magnesium alloy sample, the calculated mechanical property values of the magnesium alloy sample and the genetic algorithm further includes:
[0105] Calculating the determination coefficients of the calculated values of tensile strength, yield strength and elongation respectively;
[0106] Calculating the adaptability of the chromosome parameters to the initial prediction model for the mechanical properties of the magnesium alloy according to the determination coefficient of the calculated tensile strength value, the determination coefficient of the calculated yield strength value, and the determination coefficient of the calculated elongation value;
[0107] Determine the chromosome parameter with the maximum fitness;
[0108] Calculating the genetic probability of each individual according to the number of individuals in the population and the fitness corresponding to each individual;
[0109] The individuals whose genetic probability exceeds a threshold are selected as individuals in the next generation population;
[0110] Randomly exchanging elements in a binary one-dimensional array of chromosome parameters between adjacent individuals in the next generation population to obtain chromosome parameters in the next generation population;
[0111] The method comprises the steps of: changing the elements of a binary one-dimensional array of multiple chromosome parameters in the next generation population according to a set mutation probability to obtain a next generation population; constructing a next generation prediction model for the mechanical properties of magnesium alloys based on the chromosome parameters in the next generation population; and calculating mechanical property values of magnesium alloy samples corresponding to the next generation prediction model for the mechanical properties of magnesium alloys based on the standard data set;
[0112] determining whether the accuracy of the next-generation prediction model for mechanical properties of magnesium alloys meets the requirements based on the actual mechanical property values of the magnesium alloy sample and the calculated mechanical property values of the magnesium alloy sample corresponding to the next-generation prediction model for mechanical properties of magnesium alloys; and if so, using the next-generation prediction model for mechanical properties of magnesium alloys as the magnesium alloy mechanical properties prediction model;
[0113] If not, repeat the steps of respectively calculating the coefficient of determination of the tensile strength calculated value, the yield strength calculated value, and the elongation calculated value, wherein the tensile strength calculated value, the yield strength calculated value, and the elongation calculated value are the mechanical property calculated values of the magnesium alloy sample corresponding to the next generation prediction model of the mechanical properties of magnesium alloys.
[0114] In the examples herein, a genetic algorithm is a computational model that simulates the biological evolutionary process of natural selection and genetic mechanisms, searching for the optimal solution through natural evolution. In this paper, a genetic algorithm is used to improve the random forest, leveraging its excellent optimization performance to search for key parameters of the random forest—the number of decision trees (num) and the depth of the trees—to efficiently find the parameters that optimize the performance of the random forest mechanical property prediction model.
[0115] The specific calculation steps are as follows:
[0116] Step 1: Coding.
[0117] In this step, the number of trees (num) and the depth (depth) in the random extreme tree are encoded into binary form. Think of the binary array as the chromosomes of an individual in the population. The number of trees (num) and the depth (depth) are core parameters in random forests. Numeral is the number of decision trees in a random forest, and depth is the depth of the decision trees in a random forest, i.e., the size of the decision trees.
[0118] Step 2: Initialize the population.
[0119] In this step, the number of individuals in the population and the length of the chromosomes are set, and the chromosome parameters of the initial population are randomly generated, that is, several binary one-dimensional arrays are generated.
[0120] Step 3: Evaluate the fitness of individuals in the population.
[0121] In this step, num and depth are substituted into the random forest model for training, and the tensile strength (UTS), yield strength (YTS) and elongation (EL) are predicted respectively. These three mechanical properties reflect the accuracy of the model's predictions. However, different parameters have different accuracy for their predictions, and it is impossible to guarantee that all three indicators are optimal at the same time. Therefore, in the genetic algorithm calculation process, the average accuracy of the three mechanical properties prediction results is used as the screening condition for the model parameters. The determination coefficient (R 2 The average value is calculated so that the final model can achieve excellent prediction for the three parameters.
[0122] Coefficient of determination R 2 It is also a method to measure the goodness of fit of the regression model by calculating the total sum of squares SS total and the residual sum of squares SS res , the coefficient of determination R is calculated using formula (6) 2 The value is used to measure the degree of model fit. Compared with the root mean square error (RMSE), the coefficient of determination R 2 This method can reduce the influence of dimension, and the coefficient of determination R 2 The closer the value is to 1, the better the model fit is.
[0123]
[0124] Among them, R 2 represents the coefficient of determination, N represents the number of individuals in the population, y i represents the actual value of the mechanical properties of the magnesium alloy sample, represents the calculated value of the mechanical properties of the magnesium alloy sample, It represents the average value of the calculated mechanical properties of the magnesium alloy samples corresponding to all individuals in the population.
[0125] The average value of the coefficient of determination is then considered the fitness of the corresponding individual chromosome after encoding the number of trees (num) and the tree depth (depth). The chromosome with the highest fitness in the population is identified through screening, and the corresponding binary code and fitness are recorded. The chromosome with the highest fitness can be decoded into the num and depth of the random forest. The purpose of this step is to determine the optimal random forest parameters within the current population, save them, and compare them with the chromosome with the highest fitness in the next generation of the population. Ultimately, the chromosome with the highest fitness after several generations is selected, i.e., the random forest num and depth parameters with the best mechanical properties are selected.
[0126] Step 4: Natural selection.
[0127] In this step, the probability of an individual being selected is set to be proportional to its fitness function value, and then the individuals entering the next round are screened.
[0128] Assuming the population size is n and the fitness of individual i is Fi, the probability of individual i being selected and inherited to the next generation population is formula (7):
[0129]
[0130] Among them, P i represents the genetic probability of the i-th individual, F i represents the fitness of the i-th individual, n represents the number of individuals in the population, It represents the sum of the fitness of all individuals in the population.
[0131] The algorithm used to select individuals to enter the next round is as follows:
[0132]
[0133] Among them, R represents an array of n random numbers, which is a custom array.
[0134] Step 5: Mating.
[0135] In this step, the mating probability is set, and gene exchange is achieved through crossover between individuals to obtain the chromosomes of the next generation individuals. The elements in the binary one-dimensional array of chromosome parameters are randomly exchanged between adjacent individuals in the next generation population to obtain the chromosome parameters of the next generation population.
[0136] Step 6: Mutation.
[0137] In this step, a mutation probability is set to cause a mutation at a specific chromosome locus in some individuals. The elements of a binary one-dimensional array of multiple chromosome parameters in the next-generation population are altered according to the set mutation probability to obtain the next-generation population. A next-generation prediction model for the mechanical properties of magnesium alloys is constructed based on the chromosome parameters in the next-generation population. The mechanical properties of the magnesium alloy samples corresponding to the next-generation prediction model for the mechanical properties of magnesium alloys are then calculated based on the standard data set.
[0138] The mutation algorithm is as follows:
[0139]
[0140]
[0141] After the mutation, the next generation of population is generated, and then steps 3-5 are repeated (it should be noted that step 1 is encoding, step 2 is initialization, and the subsequent derived population does not need to be executed again) until the set maximum population size or the set accuracy is met, and the chromosome with the maximum fitness is output. Its fitness is the average of the prediction accuracy of the three mechanical properties. The chromosome can be decoded into the num and depth parameter values of the optimal random forest model.
[0142] Based on the same inventive concept, the embodiment of this specification also provides a device for predicting the mechanical properties of magnesium alloys, such as Figure 4 Shown, including:
[0143] The data set construction unit 401 is used to calculate the phase diagram of the magnesium alloy sample and use the calculated magnesium alloy composition and processing parameters as the genetic mechanical properties data set of the magnesium alloy material;
[0144] The neglect standardization unit 402 is used to perform data standardization and data normalization preprocessing on the genetic mechanical property data set of the magnesium alloy material to obtain a standard data set;
[0145] A prediction model construction unit 403 is configured to construct an initial prediction model for the mechanical properties of magnesium alloys using a random forest algorithm, and to calculate the standard data set using the initial prediction model for the mechanical properties of magnesium alloys to obtain calculated values of the mechanical properties of the magnesium alloy sample, and to optimize the parameters of the initial prediction model for the mechanical properties of magnesium alloys based on the actual values of the mechanical properties of the magnesium alloy sample, the calculated values of the mechanical properties of the magnesium alloy sample, and a genetic algorithm to obtain a prediction model for the mechanical properties of magnesium alloys;
[0146] The performance prediction unit 404 is configured to predict the mechanical properties of the target magnesium alloy sample using the magnesium alloy mechanical property prediction model.
[0147] The beneficial effects achieved by the above system are consistent with the beneficial effects achieved by the above method, and will not be described in detail in the embodiments of this specification.
[0148] In addition, this paper also provides a step to verify the effectiveness of the magnesium alloy mechanical property prediction method described in the examples of this paper. In order to verify the accuracy of the extended dimension prediction method based on improved extreme random numbers, this paper prepared magnesium alloy samples for analysis and comparison. Mg-5Zn-4Al-xSn (x = 0, 0.5, 1, 2, 3) was prepared using a resistance furnace, and the obtained The ingot obtained by melting and casting was extruded by a XJ-800t horizontal extruder at an extrusion temperature of 300°C, an extrusion ratio of 25:1, and an extrusion speed of 1m / min to obtain Rod.
[0149] The experiments were conducted on a CMT-5105 tensile testing machine at a tensile speed of 2 mm / min. To ensure accurate results, three specimens were taken from each group for tensile testing, and the average value was calculated. The specimens used in the tensile tests had a gauge diameter of 10 mm and a gauge length of 25 mm.
[0150] In this paper, two common regression model evaluation indicators are used, namely the root mean square error and the determination coefficient R 2 .
[0151] The root mean square error is calculated by using the error between the predicted data and the actual data, which reflects the error of the regression model. The closer the RMSE value is to 0, the smaller the model error is. As shown in formula (8):
[0152]
[0153] where y i is the actual value in the data set, is the predicted value of the model, and N is the number of samples.
[0154] Coefficient of determination R 2 It is also a method to measure the goodness of fit of the regression model by calculating the total sum of squares SS total and the residual sum of squares SS res , calculated in the form of formula (9) to obtain R 2 , used to measure the degree of model fit. Compared with RMSE, using R 2 The method of measuring the goodness of fit of the regression model can reduce the influence of dimension, R 2 The closer the value is to 1, the better the model fit is.
[0155]
[0156] In order to fully reflect the degree of fit and generalization of the model, this paper will evaluate the training set and test set respectively with these two indicators: the RMSE value of the training set is larger, and the R 2 If the value is far from 1, it means that the model is not able to fit the training set well and is in an underfitting state; if the RMSE value of the training set is small and R 2 The value is close to 1, but the RMSE value of the test set is too large, R 2 If the value is far from 1, it means that the model is overfitting, which often occurs in small training sets; the training set and test set R 2 The values are close to 1 and the RMSE is small, which shows that the model has strong fitting and generalization capabilities and can more effectively predict the mechanical properties of magnesium alloys with other components and processing technologies. In order to eliminate the influence of dimension, the accuracy evaluation score in the GA-ET model is R 2 Value to represent.
[0157] In order to fully illustrate the adaptability of random forest in Mg alloy data set, in this paper, a comparative study of linear regression, support vector machine, artificial neural network, decision tree, random forest, random forest and Adaboost Trees algorithms is conducted. Among them, the support vector machine studies four different kernel functions respectively, including linear, poly, rbt, and sigmoid, and the artificial neural network uses four different excitation functions, including relu, tanh, logistic, and identity. First, only material composition and processing technology are used as features, and high-throughput programming is applied to parallel calculation of the above algorithms. In order to test the generalization ability of the algorithm, random split training sets and test sets are used, so each training set and test set are different. The model predicts the training data set and test data set respectively, and the prediction results are R 2 The value and RMSE value are calculated, and the design is repeated 20 times, and the average value of the 20 calculation results is used as the evaluation, such as Figure 5a-5d shown.
[0158] according to Figure 5a , the horizontal axis represents different training sets, and the vertical axis represents R 2 From the perspective of training model prediction, the R values of ANN (activation function is 'logistic'), decision tree and random forest are 2 The values are very close to 1, indicating that the three algorithms have a high degree of fit to the training set; Figure 5b , the horizontal axis represents different training sets, and the vertical axis represents the RMSE value. In the prediction of the training set, compared with the RMSE values of decision tree and random forest for mechanical property prediction close to 0, the ANN (logistic) prediction error for UTS and YTS is larger; according to Figure 5c , the horizontal axis represents different test sets, and the vertical axis represents R 2 Value, in the prediction of the test set, ANN (logistic), random forest and random forest R 2 The value is close to 1, among which the R of ANN (logistic) for the prediction of three mechanical properties is 2 There are certain differences in the values, indicating that ANN (logistic) lacks the generalization ability to predict different mechanical properties; Figure 5d The horizontal axis represents different test sets, and the vertical axis represents the RMSE value. When predicting the three mechanical properties of the test set, the RMSE of the random forest is the smallest.
[0159] Therefore, among the 14 algorithms tested, random forest not only has a higher fitting ability for the training set, but also has a better prediction performance for the test set, indicating that it has good generalization ability and can be applied to magnesium alloy design.
[0160] In this paper, several preprocessing algorithms including Z-score method, range standardization, absolute maximum standardization, decimal scaling standardization in data standardization methods, and L1 normalization method and L2 normalization method in normalization methods are studied to explore preprocessing methods suitable for magnesium alloy design. Material composition and processing technology are used as features, and high-throughput programming is applied to perform parallel preprocessing of training sets and data sets using the above preprocessing algorithms. In order to more realistically illustrate the preprocessing effect, a hybrid method of comprehensive Z-score method and L1 normalization and unpreprocessed data are also used for comparison. The model uses random forest method to predict the training data set and test data set processed by different preprocessing methods, and R 2 The value and RMSE value are calculated, and the design is repeated 20 times, and the average value of the 20 calculation results is used as the evaluation, such as Figure 6a-6d shown.
[0161] according to Figure 6a and Figure 6b , Figure 6a The horizontal axis represents different training sets, and the vertical axis represents R 2 value, Figure 6b The horizontal axis represents different training sets, and the vertical axis represents the RMSE value. From the perspective of the prediction of the training set, the R 2 The values are very close to 1, and the RMSE values are small, indicating that the prediction accuracy of the training set is very high. Among them, the model error processed by the normalization method (L1 method and L2 method) is slightly smaller than that of other methods. Figure 6c , the horizontal axis represents different test sets, and the vertical axis represents R 2 The R values of the three mechanical properties are predicted after L2 normalization in the prediction of the test set. 2 The values are slightly higher than those of other methods; Figure 6d The horizontal axis represents different test sets, and the vertical axis represents the RMSE value. When predicting the three mechanical properties of the test set, the RMSE value of the model after L2 normalization is the smallest and is significantly smaller than that of the unprocessed model.
[0162] Therefore, the preprocessing method can effectively improve the accuracy of model prediction and reduce the error. Among the seven preprocessing methods tested, the L2 normalization method has the best prediction performance.
[0163] The phases and their proportions obtained by high-throughput calculation of calphad are expanded to the original data set. To prove that the data can be effectively applied to the data set, the correlation of the supplementary features is first calculated. Here, the Pearson correlation coefficient method is used to study the calculated data and the three mechanical properties studied. The characteristic relationship scatter plots are drawn in pairs. Some of the characteristic relationship scatter plots are as follows Figure 7a-7d shown.
[0164] Figure 7a-7d In the scatter plot, the horizontal and vertical coordinates are two feature variables, reflecting their linear relationship, and the bar graph is the frequency distribution diagram of the variable. It can be seen that the relationship between the features is approximately a straight line, and there is no other functional curve such as the exponential type. Therefore, the Pearson correlation coefficient can be calculated for the features, which can be represented by a heat map as follows: Figure 8 .
[0165] from Figure 8 As can be seen, the Pearson correlation coefficients between the eigenvalues are all below 0.45, indicating that the independence between the features is good. The calphad calculation results can be used as an expansion of the original data set.
[0166] A comparative experiment was conducted on the dataset before and after the calphad method was expanded. The best performing random forest model in the previous experiment was used, and the dataset was preprocessed using the L2 normalization method. The design was calculated 20 times, and the average result was taken as follows Figure 9a-9b .
[0167] like Figure 9a The results are shown in the figure. The vertical axis represents R 2 The horizontal axis represents different performance parameters. Original_train in the legend represents the training set fitting result, Calphad_train represents the training set fitting result after calphad optimization, Original_test represents the test set fitting result, and Calphad_test represents the test set fitting result after calphad optimization. The R 2 The values of have increased significantly, indicating that dimension expansion can effectively improve the accuracy of model prediction; Figure 9b As shown in the results, the ordinate represents the RMSE value, and the abscissa represents different performance parameters. After dimensionality expansion, the RMSE values for mechanical property prediction all decrease to a certain extent, indicating that using Calphad dimensionality expansion can effectively reduce prediction errors. Therefore, using Calphad dimensionality expansion has a significant effect on improving the database.
[0168] According to the analysis results mentioned above, this paper comprehensively constructs a dimensionality expansion prediction method based on improved extreme random numbers: first, the calphad method is used to expand the data set, and then the L2 normalization preprocessing method is used to process the original data set. Next, this paper uses the GA-ET method to construct a prediction model for the mechanical properties of magnesium alloys. By performing genetic algorithm calculations on the original population clusters, the optimized parameters of the final random forest are obtained. The prediction results of the model using the optimal parameters for the training set and the test set are as follows: Figure 10a-Figure 10c shown.
[0169] according to Figure 10a-Figure 10c It can be seen that Figure 10a The horizontal axis represents the experimental tensile strength, and the vertical axis represents the predicted tensile strength. In the legend, test represents the predicted result of the test set, and train represents the predicted result of the training set. Figure 10b The horizontal axis represents the experimental yield strength, and the vertical axis represents the predicted yield strength. Figure 10c The horizontal axis represents the experimental elongation, and the vertical axis represents the predicted elongation. The random forest model improved by GA can achieve a very good fitting state for the prediction of the three mechanical properties, and the prediction R of UTS, YTS, and EL is 2 The values were 96.66%, 95.75% and 94.63% respectively, and the average predicted value was 95.68%.
[0170] In addition, the optimization using genetic algorithms has greatly improved the computational efficiency. The designed genetic generation number is 50, the population size is 20, and the actual number of random forest calculations is 1000 times. The corresponding number of random forest trees num and the depth of the tree depth are (0~32000) (0~320) respectively. If traversal calculation is used, it will require about 10 million calculations. Therefore, the use of genetic algorithms to optimize random forests can greatly improve the operating efficiency of the model, find the optimal model parameters at the fastest speed, and greatly improve the speed of magnesium alloy design.
[0171] The prepared components were detected by inductively coupled plasma optical emission spectrometer (ICP-OES, Optima 8300). The results are shown in Table 1.
[0172] Table 1
[0173]
[0174] The calphad method is used to calculate the phase diagram of Mg-5Zn-4Al-xSn, as shown in the following figure: Figure 11As shown in the figure, the horizontal axis represents the percentage of Sn content in the phase diagram, and the vertical axis represents the temperature. The components of each phase in the stable equilibrium state at the experimental temperature were calculated in batches using a high-throughput method, and the results are shown in Table 2.
[0175] Table 2
[0176]
[0177] The prepared Mg-5Zn-4Al-xSn was subjected to tensile test, and the stress-strain tensile curve was as follows: Figure 12a and Figure 12b As shown, Figure 12a The horizontal axis represents strain, and the vertical axis represents stress. Figure 12b The horizontal axis represents the tested alloy, and the vertical axis represents the corresponding strength and elongation. In the legend, Ultimate Tensile Strength represents tensile strength, YieldStrength represents yield strength, and Elongation represents elongation.
[0178] Based on the magnesium alloy mechanical property prediction method designed earlier in this paper, the tensile strength, yield strength, and elongation of ZAT54x (x = 0, 0.5, 1, 2, 3) with an extrusion ratio of 25:1 and an extrusion speed of 1 m / min were predicted. The results are shown in Table 3.
[0179] Table 3
[0180]
[0181] According to Table 3, the mechanical properties prediction method of magnesium alloy proposed in this paper accurately predicts the mechanical properties of the newly prepared extruded ZA54 magnesium alloy, and the tensile strength, yield strength and elongation are predicted R 2 The values are all above 0.73, and the RMSE values are all less than 6, indicating that the mechanical property prediction method of magnesium alloy proposed in this paper has good prediction accuracy for unknown extruded magnesium alloys and can be effectively used to guide the preparation of high mechanical property magnesium alloys.
[0182] like Figure 13The diagram shows a schematic diagram of the structure of a computer device according to an embodiment of the present invention. The apparatus described herein may be a computer device according to this embodiment, executing the method described herein. Computer device 1302 may include one or more processing devices 1304, such as one or more central processing units (CPUs), each of which may implement one or more hardware threads. Computer device 1302 may also include any storage resources 1306 for storing any type of information, such as code, settings, data, etc. For example, and without limitation, storage resources 1306 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory, hard disks, optical disks, etc. More generally, any storage resource may use any technology to store information. Furthermore, any storage resource may provide volatile or non-volatile retention of information. Furthermore, any storage resource may represent a fixed or removable component of computer device 1302. In one embodiment, when processing device 1304 executes associated instructions stored in any storage resource or combination of storage resources, computer device 1302 may perform any operation of the associated instructions. The computer device 1302 also includes one or more drive mechanisms 1308 for interacting with any storage resources, such as a hard disk drive mechanism, an optical disk drive mechanism, and the like.
[0183] The computer device 1302 may also include an input / output module 1310 (I / O) for receiving various inputs (via input devices 1312) and for providing various outputs (via output devices 1314). A specific output mechanism may include a presentation device 1316 and an associated graphical user interface (GUI) 1318. In other embodiments, the input / output module 1310 (I / O), input devices 1312, and output devices 1314 may not be included, and the computer device 1302 may simply be a computer device in a network. The computer device 1302 may also include one or more network interfaces 1320 for exchanging data with other devices via one or more communication links 1322. One or more communication buses 1324 couple the components described above together.
[0184] The communication link 1322 can be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 1322 can include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
[0185] Corresponding to Figure 2-Figure 3 The embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which executes the steps of the above-mentioned method when the computer program is executed by a processor.
[0186] The embodiment of the present invention also provides a computer readable instruction, wherein when the processor executes the instruction, the program causes the processor to execute the following Figure 2-Figure 3 The method shown.
[0187] It should be understood that in the various embodiments of this document, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.
[0188] It should also be understood that in the embodiments herein, the term "and / or" merely describes an association between associated objects, indicating that three possible relationships exist. For example, "A and / or B" could represent: A alone, A and B simultaneously, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the associated objects.
[0189] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this document.
[0190] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0191] In the several embodiments provided herein, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices, or units, or can be an electrical, mechanical, or other form of connection.
[0192] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments herein.
[0193] In addition, the functional units in the various embodiments herein may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0194] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this article is essentially or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of this article. The aforementioned storage medium includes: various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0195] This article uses specific embodiments to illustrate the principles and implementation methods of this article. The description of the above embodiments is only used to help understand the methods and core ideas of this article. At the same time, for those skilled in the art, based on the ideas of this article, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation to this article.
Claims
1. A method for predicting mechanical properties of magnesium alloys, characterized in that: The method comprises, Calculate the phase diagram of the magnesium alloy sample and use the calculated magnesium alloy composition and processing parameters as the genetic mechanical properties dataset of the magnesium alloy material; Performing data standardization and data normalization preprocessing on the genetic mechanical property data set of the magnesium alloy material to obtain a standard data set; Constructing an initial prediction model for the mechanical properties of a magnesium alloy using a random forest algorithm, wherein the random forest algorithm randomly selects some eigenvectors from multiple eigenvectors of a standard data set, traverses and calculates information gain or Gini coefficient for the selected eigenvectors, selects the best point in the eigenvectors as a node splitting attribute, and uses the initial prediction model for the mechanical properties of a magnesium alloy to calculate the standard data set to obtain calculated values of the mechanical properties of the magnesium alloy sample, and optimizes parameters of the initial prediction model for the mechanical properties of the magnesium alloy based on actual values of the mechanical properties of the magnesium alloy sample, the calculated values of the mechanical properties of the magnesium alloy sample, and a genetic algorithm to obtain a prediction model for the mechanical properties of the magnesium alloy; Predicting the mechanical properties of a target magnesium alloy sample using the magnesium alloy mechanical property prediction model; Phase diagram calculations for magnesium alloy samples further include, The calphad method is used to calculate the phase diagram of the magnesium alloy, and the magnesium alloy composition including a combination of multiple mass fractions of Mg, Al, Ca, Mn, Sn, and Zn is obtained.
2. The method according to claim 1, characterized in that The initial prediction model of magnesium alloy mechanical properties constructed using random forest algorithm further includes: Binary encode the number of trees and the depth of the trees in the random forest algorithm, and use the resulting binary array as the chromosome of an individual in the population of the random forest algorithm; The number of individuals in the population and the length of the chromosome are set, and chromosome parameters of the primary population are randomly generated, where the chromosome parameters are a binary one-dimensional array, and one individual in the population corresponds to one magnesium alloy sample; The chromosome parameters are used as parameters of the initial prediction model for the mechanical properties of the magnesium alloy, and the initial prediction model for the mechanical properties of the magnesium alloy is constructed according to the chromosome parameters.
3. The method according to claim 2, characterized in that The calculated values of the mechanical properties of the magnesium alloy sample include a calculated value of the tensile strength, a calculated value of the yield strength, and a calculated value of the elongation of the magnesium alloy sample.
4. The method according to claim 3, characterized in that Optimizing the parameters of the initial prediction model of the mechanical properties of the magnesium alloy according to the actual value of the mechanical properties of the magnesium alloy sample, the calculated value of the mechanical properties of the magnesium alloy sample and the genetic algorithm further includes: Calculating the determination coefficients of the calculated values of tensile strength, yield strength and elongation respectively; Calculating the adaptability of the chromosome parameters to the initial prediction model for the mechanical properties of the magnesium alloy according to the determination coefficient of the calculated tensile strength value, the determination coefficient of the calculated yield strength value, and the determination coefficient of the calculated elongation value; Determine the chromosome parameter with the maximum fitness; Calculating the genetic probability of each individual according to the number of individuals in the population and the fitness corresponding to each individual; The individuals whose genetic probability exceeds a threshold are selected as individuals in the next generation population; Randomly exchanging elements in a binary one-dimensional array of chromosome parameters between adjacent individuals in the next generation population to obtain chromosome parameters in the next generation population; The method comprises the steps of: changing the elements of a binary one-dimensional array of multiple chromosome parameters in the next generation population according to a set mutation probability to obtain a next generation population; constructing a next generation prediction model for the mechanical properties of magnesium alloys based on the chromosome parameters in the next generation population; and calculating mechanical property values of magnesium alloy samples corresponding to the next generation prediction model for the mechanical properties of magnesium alloys based on the standard data set; determining whether the accuracy of the next-generation prediction model for mechanical properties of magnesium alloys meets the requirements based on the actual mechanical property values of the magnesium alloy sample and the calculated mechanical property values of the magnesium alloy sample corresponding to the next-generation prediction model for mechanical properties of magnesium alloys; and if so, using the next-generation prediction model for mechanical properties of magnesium alloys as the magnesium alloy mechanical properties prediction model; If not, repeat the steps of respectively calculating the coefficient of determination of the tensile strength calculated value, the yield strength calculated value, and the elongation calculated value, wherein the tensile strength calculated value, the yield strength calculated value, and the elongation calculated value are the mechanical property calculated values of the magnesium alloy sample corresponding to the next generation prediction model of the mechanical properties of magnesium alloys.
5. The method according to claim 4, characterized in that The formula for calculating the coefficient of determination is: Among them, R 2 represents the coefficient of determination, N represents the number of individuals in the population, y i represents the actual value of the mechanical properties of the magnesium alloy sample, represents the calculated value of the mechanical properties of the magnesium alloy sample, It represents the average value of the calculated mechanical properties of the magnesium alloy samples corresponding to all individuals in the population.
6. The method according to claim 4, characterized in that The formula for calculating the genetic probability of each individual according to the number of individuals in the population and the fitness of each individual is: Among them, P i represents the genetic probability of the i-th individual, F i represents the fitness of the i-th individual, n represents the number of individuals in the population, It represents the sum of the fitness of all individuals in the population.
7. A device for predicting mechanical properties of magnesium alloys, characterized in that: include, A data set construction unit is used to calculate the phase diagram of the magnesium alloy sample and use the calculated magnesium alloy composition and processing parameters as the genetic mechanical properties data set of the magnesium alloy material; A data standardization unit, configured to perform data standardization and data normalization preprocessing on the genetic mechanical property data set of the magnesium alloy material to obtain a standard data set; a prediction model construction unit, configured to construct an initial prediction model for the mechanical properties of a magnesium alloy using a random forest algorithm, wherein the random forest algorithm randomly selects some eigenvectors from a plurality of eigenvectors of a standard data set, traverses and calculates information gain or a Gini coefficient for the selected eigenvectors, selects the best point in the eigenvectors as a node splitting attribute, and calculates the standard data set using the initial prediction model for the mechanical properties of the magnesium alloy to obtain calculated values of the mechanical properties of the magnesium alloy sample; and optimizes parameters of the initial prediction model for the mechanical properties of the magnesium alloy based on the actual values of the mechanical properties of the magnesium alloy sample, the calculated values of the mechanical properties of the magnesium alloy sample, and a genetic algorithm to obtain a prediction model for the mechanical properties of the magnesium alloy; a performance prediction unit, configured to predict the mechanical properties of a target magnesium alloy sample using the magnesium alloy mechanical property prediction model; Phase diagram calculations for magnesium alloy samples further include, The calphad method is used to calculate the phase diagram of the magnesium alloy, and the magnesium alloy composition including a combination of multiple mass fractions of Mg, Al, Ca, Mn, Sn, and Zn is obtained.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: When the computer program is executed by the processor, the computer program executes the instructions of the method according to any one of claims 1 to 6.
9. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor of a computer device, the computer program executes the instructions of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Structure and mechanical property prediction method for heat treatment state Mg-Zn-Zr series alloys based on BP neural network
CN111063401A
Method for predicting pore structure of SCR (Selective Catalytic Reduction) catalyst based on machine learning technology
CN113205861A