Casting qualification rate prediction method based on component and process parameter recommendation interval
Through the recommended interval prediction method based on composition and process parameters, the problem of poor pass rate prediction effect in the casting process is solved, and precise control and improvement of casting quality is achieved.
Patent Information
- Application Number
- CN202411650122.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-02-28
AI Technical Summary
In the casting process, the material composition is too complex and the production process parameters are numerous, resulting in poor pass rate prediction effect and it is difficult to stably improve the quality of the castings.
The casting pass rate prediction method based on the recommended interval of components and process parameters is adopted. By obtaining historical data for preprocessing and correlation analysis, a random forest model and genetic algorithm are constructed to obtain the recommended interval of key material components and production process parameters, and the casting pass rate of the current batch is calculated.
The prediction effect of casting pass rate is improved, the control of casting quality is enhanced, the precise setting of material composition and process parameters is ensured, and the overall quality of casting is improved.
Smart Images

Figure CN119539602A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of casting, and in particular to a method for predicting the casting qualification rate based on the recommended intervals of composition and process parameters. Background Art
[0002] In modern manufacturing, casting, as a core production method, is widely used in many fields such as automobile, aerospace and machinery manufacturing. The control of material components such as Al, Si, P and production process parameters such as molten iron temperature, pouring temperature and sand temperature during the pouring process will have a significant impact on the final quality of the casting. For example, a suitable Si content can effectively improve the fluidity and filling capacity of the metal, but too high or too low Si content will cause defects in the casting, which will have a negative impact on the quality of the casting; the molten iron temperature is crucial to the fluidity and filling capacity of the metal. The appropriate temperature can not only ensure that the metal fills the mold smoothly during the pouring process, but also prevent oxidation and the generation of pores. However, too high or too low temperature will have an adverse effect on the quality of the casting, which requires that the temperature control in the production process must be precise. Therefore, estimating the qualified rate of castings in advance and improving the accuracy of the qualified rate estimation will help to control the volatility of material composition and the stability of the casting process in advance, which is of great significance to the improvement of casting quality.
[0003] However, in the current casting process, the material composition is too complex, the production process parameters are too numerous, the material composition and production process parameter settings are not accurate enough, and there are many uncertain factors in the data, resulting in poor pass rate prediction results, making it difficult to be effectively applied in actual industrial manufacturing, and thus difficult to stably improve the quality of castings. Summary of the invention
[0004] In order to solve the above technical problems, an embodiment of the present application provides a method for predicting the casting qualification rate based on the recommended range of composition and process parameters.
[0005] In a first aspect, an embodiment of the present application provides a method for predicting the casting qualification rate based on the recommended intervals of composition and process parameters, the method comprising:
[0006] Obtain the data corresponding to the material composition and production process parameters of different historical batches of casting processes and the qualified rate of castings, and pre-process the data corresponding to the material composition and production process parameters of different historical batches;
[0007] Perform correlation analysis on the pre-processed data of material composition and production process parameters of different historical batches and the corresponding casting qualification rate to obtain the correlation between each material composition and production process parameter and the casting qualification rate;
[0008] Selecting key material components and production process parameters whose correlation is higher than the correlation threshold from various material components and production process parameters, and constructing an initial data set with data corresponding to the key material components and production process parameters and the casting qualification rate;
[0009] Obtaining a preset number of sub-samples from the initial data set by random sampling, training a corresponding decision tree based on each sub-sample, and constructing a random forest model based on the preset number of decision trees;
[0010] Obtaining an optimal solution based on the random forest model and the genetic algorithm, and obtaining the recommended intervals of the key material components and production process parameters according to the optimal solution;
[0011] Setting the material composition and production process parameters of the current batch according to the recommended interval, and obtaining data corresponding to the key material composition and production process parameters of the current batch;
[0012] According to the data corresponding to the key material components and production process parameters of the current batch and the preset number of decision trees, the target key material components and production process parameters corresponding to the nodes of each decision tree are obtained, and the casting qualification rate corresponding to each decision tree is calculated according to the correlation degree corresponding to the target key material components and production process parameters;
[0013] The random parameter weight of each decision tree and the corresponding casting qualification rate are weighted and summed to calculate the casting qualification rate of the current batch.
[0014] In one embodiment, the preprocessing of the data corresponding to the material composition and production process parameters of different historical batches includes:
[0015] Selecting initial valid data that conforms to a preset data format from the data corresponding to the material composition and the production process parameters;
[0016] The initial valid data is divided into k clusters using a clustering model, the distance between each initial valid data and the cluster to which it belongs is calculated, and the initial valid data whose distance is less than or equal to a distance threshold is normalized.
[0017] In one embodiment, the data of material composition and production process parameters of different historical batches after pretreatment are analyzed for correlation with the corresponding casting qualification rate to obtain the correlation between each material composition and production process parameter and the casting qualification rate, including:
[0018] According to formula (1), the correlation analysis is performed on the material composition and production process parameter data of different historical batches after preprocessing and the corresponding casting qualification rate to obtain the correlation between each material composition and production process parameter and the casting qualification rate;
[0019] Formula (1):
[0020] Among them, i is the correlation between the i-th material component or production process parameter and the casting qualification rate, i is the serial number of each material component or production process parameter, k is the serial number of the data corresponding to each material component or production process parameter, x i (k) is the qualified rate of the kth data corresponding to the i-th material composition or production process parameter, x0(k) is the qualified rate of castings, is the minimum difference between the k data corresponding to the material composition or production process parameters and the casting qualification rate, is the maximum value of the casting qualification rate among the k data corresponding to the material composition or production process parameters, and ρ is the adjustable coefficient.
[0021] In one embodiment, the training based on each sub-sample to obtain a corresponding decision tree includes:
[0022] Calculate the information gain for each key material component and production process parameter;
[0023] Randomly select a current sub-sample, and select the optimal key material composition and production process parameters from the randomly selected part of the key material composition and production process parameters according to the information gain;
[0024] The left and right subtrees of the current split node are divided according to the optimal key material composition and production process parameters, and finally a decision tree corresponding to each subsample is obtained.
[0025] In one embodiment, the calculating the information gain of each key material component and production process parameter includes:
[0026] The information entropy of each key material component and production process parameter is calculated according to formula (2);
[0027] Calculate the information gain of each key material component and production process parameter according to the information entropy and formula (3);
[0028] Formula (2):
[0029] Formula (3):
[0030] Among them, x is the name of the key material component and production process parameter, Ent(D) is the information entropy of the key material component and production process parameter x, and Ent(D m ) is the information entropy of the key material composition and production process parameter x when the data type is m, D is the data set corresponding to the key material composition and production process parameter x, M is the total number of data types corresponding to the key material composition and production process parameters, pk is the probability of the kth data type of key material composition and production process parameters, It is the ratio of the number of data types in the data set corresponding to the key material component and production process parameter x when there is m data types to the total number of data types in the set. Gain(D,x) is the information gain of each key material component and production process parameter.
[0031] In one embodiment, obtaining an optimal solution based on the random forest model and the genetic algorithm, and obtaining the recommended intervals of the key material components and production process parameters according to the optimal solution, includes:
[0032] S1. Generate multiple initial candidate solutions;
[0033] S2. Predicting the fitness of each initial candidate solution according to the random forest model, and selecting an intermediate candidate solution whose fitness is greater than or equal to a fitness threshold;
[0034] S3, exchanging the binary data of the intermediate candidate solutions or randomly changing the binary data of the intermediate candidate solutions to generate a new generation of candidate solutions, and obtaining an optimal candidate solution and a neighborhood of the optimal candidate solution from the new generation of candidate solutions;
[0035] S4. Repeat S1-S3 to obtain the neighborhood of the optimal candidate solution of the current iteration, and perform an intersection operation on the neighborhood of the optimal candidate solution of the current iteration and the recommended interval of the previous iteration to obtain the recommended interval of the current iteration, and end the repeated execution of S1-S3 by setting keywords to finally obtain the recommended interval of the key material components and production process parameters, wherein the recommended interval of the previous iteration includes the recommended interval of the initial iteration, and the recommended interval of the initial iteration is the neighborhood of the initial candidate solution.
[0036] In one embodiment, the weighted sum of the random parameter weight of each decision tree and the corresponding casting qualification rate is calculated to obtain the casting qualification rate of the current batch, including:
[0037] According to formula (4), the random parameter weight of each decision tree and the predicted casting qualification rate are weighted and summed to obtain the casting qualification rate of the current batch;
[0038] Formula (4):
[0039] in, is the qualified rate of the current batch of castings, x is the data corresponding to the key material composition and production process parameters of the current batch of castings, c i is the random parameter weight, is the casting qualification rate predicted by each decision tree, and N is the total number of decision trees.
[0040] In a second aspect, an embodiment of the present application provides a casting qualification rate prediction device based on a recommended interval of composition and process parameters, and the casting qualification rate prediction device based on a recommended interval of composition and process parameters comprises:
[0041] A preprocessing module is used to obtain the data corresponding to the material composition and production process parameters of different historical batches of casting processes and the qualified rate of castings, and to preprocess the data corresponding to the material composition and production process parameters of different historical batches;
[0042] A correlation analysis module is used to perform correlation analysis on the pre-processed data of material composition and production process parameters of different historical batches and the corresponding casting qualification rate, and obtain the correlation between each material composition and production process parameter and the casting qualification rate;
[0043] A construction module is used to select the key material components and production process parameters whose correlation is higher than the correlation threshold from various material components and production process parameters, and construct an initial data set with the data corresponding to the key material components and production process parameters and the casting qualification rate;
[0044] A training module, used to obtain a preset number of sub-samples from the initial data set by random sampling, obtain a corresponding decision tree based on each sub-sample training, and construct a random forest model based on the preset number of decision trees;
[0045] A first acquisition module, used to obtain an optimal solution based on the random forest model and the genetic algorithm, and obtain the recommended intervals of the key material components and production process parameters according to the optimal solution;
[0046] A second acquisition module is used to set the material composition and production process parameters of the current batch according to the recommended interval, and obtain data corresponding to the key material composition and production process parameters of the current batch;
[0047] A first calculation module is used to obtain the target key material composition and production process parameters corresponding to the nodes of each decision tree according to the data corresponding to the key material composition and production process parameters of the current batch and the preset number of decision trees, and calculate the casting qualification rate corresponding to each decision tree according to the correlation degree corresponding to the target key material composition and production process parameters;
[0048] The second calculation module is used to perform weighted summation on the random parameter weight of each decision tree and the corresponding casting qualification rate to calculate the casting qualification rate of the current batch.
[0049] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and when the processor is running, the computer program executes the casting qualification prediction method based on the recommended range of composition and process parameters provided in the first aspect.
[0050] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when running on a processor, executes the casting qualification prediction method based on the recommended intervals of composition and process parameters provided in the first aspect.
[0051] The above-mentioned casting qualification rate prediction method based on the recommended interval of composition and process parameters provided in the present application obtains the data and casting qualification rate corresponding to the material composition and production process parameters of different historical batches of the casting process, and pre-processes the data corresponding to the material composition and production process parameters of different historical batches; performs correlation analysis on the pre-processed data of the material composition and production process parameters of different historical batches and the corresponding casting qualification rate, and obtains the correlation between each material composition and production process parameter and the casting qualification rate; selects the key material composition and production process parameters whose correlation is higher than the correlation threshold from each material composition and production process parameter, and constructs an initial data set with the data corresponding to the key material composition and production process parameters and the casting qualification rate; obtains a preset number of sub-samples from the initial data set by random sampling, and obtains the corresponding A decision tree is provided, and a random forest model is constructed based on a preset number of decision trees; an optimal solution is obtained based on the random forest model and a genetic algorithm, and a recommended interval of the key material components and production process parameters is obtained according to the optimal solution; the material components and production process parameters of the current batch are set according to the recommended interval, and data corresponding to the key material components and production process parameters of the current batch are obtained; according to the data corresponding to the key material components and production process parameters of the current batch and the preset number of decision trees, the target key material components and production process parameters corresponding to the nodes of each decision tree are obtained, and the casting qualification rate corresponding to each decision tree is calculated according to the correlation degree corresponding to the target key material components and production process parameters; the random parameter weight of each decision tree is weighted summed with the corresponding casting qualification rate to calculate the casting qualification rate of the current batch. The present application sets the raw material dosage through the recommended range of key material components and production process parameters, determines the casting qualification rate of each decision tree through the correlation between key material components and production process parameters and casting qualification rate, and weights the output of the casting qualification rate of each decision tree through random parameter weights, thereby improving the prediction effect of the casting qualification rate and more effectively controlling the casting quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present application and should not be regarded as limiting the scope of protection of the present application. In each of the drawings, similar components are numbered similarly.
[0053] Figure 1 A schematic diagram of a process of predicting the casting qualification rate based on the recommended intervals of composition and process parameters provided in an embodiment of the present application is shown;
[0054] Figure 2 Another schematic diagram of the process of predicting the casting qualification rate based on the recommended intervals of composition and process parameters provided in an embodiment of the present application is shown;
[0055] Figure 3 A schematic diagram showing the correlation between various material components and production process parameters provided in the embodiments of the present application;
[0056] Figure 4 A schematic diagram of feature analysis of a machine learning algorithm provided in an embodiment of the present application is shown;
[0057] Figure 5 Another schematic diagram of a process of predicting the casting qualification rate based on the recommended intervals of composition and process parameters provided in an embodiment of the present application is shown;
[0058] Figure 6 Another schematic diagram of the process of predicting the casting qualification rate based on the recommended intervals of the composition and process parameters provided in the embodiment of the present application is shown;
[0059] Figure 7 It shows an iterative schematic diagram of recommended intervals of key material components and production process parameters provided in an embodiment of the present application;
[0060] Figure 8 A schematic diagram of the structure of a casting qualification rate prediction device based on recommended intervals of composition and process parameters provided in an embodiment of the present application is shown.
[0061] Icons: 800-casting qualification rate prediction device based on recommended intervals of composition and process parameters, 801-pretreatment module, 802-correlation analysis module, 803-construction module, 804-training module, 805-first acquisition module, 806-second acquisition module, 807-first calculation module, 808-second calculation module. DETAILED DESCRIPTION
[0062] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0063] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0064] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present application, are intended only to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations of the foregoing items.
[0065] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0066] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.
[0067] Example 1
[0068] The embodiment of the present application provides a method for predicting the casting qualification rate based on the recommended range of composition and process parameters.
[0069] See also Figure 1 The casting qualification rate prediction method based on the recommended interval of composition and process parameters includes steps S101-S108:
[0070] S101: Obtaining data corresponding to material composition and production process parameters of different historical batches of casting processes and casting qualification rates, and preprocessing the data corresponding to material composition and production process parameters of different historical batches.
[0071] In this embodiment, historical data of different batches of the casting process in actual production are collected, including molten iron temperature, pouring start temperature, element content (material composition), moisture, air permeability, tensile strength, hot wet tensile strength, spheroidization line, inoculation line, gas evolution, mud content, ignition loss, volatile matter, etc., and the qualified rate of castings of each batch is recorded.
[0072] Optionally, before the collected historical data is used to establish the random forest model and before the genetic algorithm under the elite strategy is used to establish the optimal casting parameter model, that is, before the optimal range (recommended range) of material composition and production process parameters is obtained by the above method, and before the qualified rate of the current batch of castings is predicted by each decision tree of the random forest model, data preprocessing is required to ensure that the analysis of the data will not be affected by factors such as measuring instruments and human errors, resulting in invalid prediction results.
[0073] See also Figure 2 In one embodiment, the preprocessing of the data corresponding to the material composition and production process parameters of different historical batches includes:
[0074] S1011: Filtering initial valid data that conforms to a preset data format from the data corresponding to the material composition and the production process parameters.
[0075] In this embodiment, firstly, based on the data format of the data corresponding to the material composition and production process parameters required for random forest model training or genetic algorithm training, invalid data strips are detected to avoid the subsequent training program being unable to run directly due to data that does not meet the format requirements.
[0076] S1012: using a clustering model to divide the initial valid data into k clusters, calculating the distance between each initial valid data and the cluster to which it belongs, and normalizing the initial valid data whose distance is less than or equal to a distance threshold.
[0077] In this embodiment, a clustering model is used to clean up the initial valid data after preliminary screening. The data points are divided into k clusters, so that the points in each cluster are as close as possible, and the points in different clusters are as far away as possible, and the data that deviates far from the center point of the cluster is identified as an outlier and removed, and 100 values of each material component and production process parameter corresponding to each cluster are retained. Among them, the optimal cluster center of each cluster is obtained according to the Euclidean distance. The specific calculation of Euclidean is formula (5): Among them, J(c,μ) is the Euclidean distance, which represents the sum of the squares of the distances from all data points to their corresponding cluster centers, and x i (k) represents material composition or production process parameter x i The kth material composition or production process parameter data point, c i is xi (k) the cluster to which it belongs, represents the center point corresponding to the cluster, and M is the total number of data points of material composition or production process parameter x. The optimal clustering center of each cluster is obtained according to the above formula The data that deviates from the optimal cluster center of each cluster by more than a preset threshold is identified as abnormal data and removed.
[0078] Optional, finally valid initial data x that satisfies the Euclidean distance i (k) Perform normalization processing to unify them into an approximate range to avoid the value of a certain feature of the data being too large, which may cause the algorithm to jitter and fail to iterate and converge. This application uses the averaging method to perform normalization formula (6): Among them, x i (k) ′ is the normalized value, x i (k) is each value of each material component or production process parameter. There are 48 material components or production process parameters in this application, and each material component and production process parameter has 100 values, that is, i is 48 and k is 100.
[0079] S102: performing correlation analysis on the pre-processed data of material composition and production process parameters of different historical batches and the corresponding casting qualification rates, and obtaining the correlation between each material composition and production process parameter and the casting qualification rate.
[0080] In this embodiment, the data of material composition and production process parameters of the above-mentioned different historical batches are first analyzed for correlation, and the parameters that have a greater impact on the qualified rate are mined. Feature correlation mining is an important step in the training of the random forest model, ensuring that the training features are strongly correlated with the output, amplifying the impact of highly correlated parameters on the results, and improving the decision tree in the random forest model to sensitively reflect changes in the input on the output. The Grey Relation Analysis (GRA) algorithm is used to calculate the correlation in this application.
[0081] In one embodiment, S102 includes: performing correlation analysis on the data of material composition and production process parameters of different historical batches after preprocessing and the corresponding casting qualification rate according to formula (1), and obtaining the correlation between each material composition and production process parameter and the casting qualification rate; formula (1): Among them, i is the correlation between the i-th material component or production process parameter and the casting qualification rate, i is the serial number of each material component or production process parameter, k is the serial number of the data corresponding to each material component or production process parameter, x i(k) is the qualified rate of the kth data corresponding to the i-th material composition or production process parameter, x0(k) is the qualified rate of castings, is the minimum difference between the k data corresponding to the material composition or production process parameters and the casting qualification rate, is the maximum value of the casting qualification rate among the k data corresponding to the material composition or production process parameters, and ρ is the adjustable coefficient.
[0082] In this embodiment, the correlation between each material component and production process parameter and the qualified rate of castings in different historical batches is calculated by formula (1), and the correlation between each material component and production process parameter and the qualified rate of castings in each historical batch is averaged to obtain the final correlation between each material component and production process parameter. The result is as follows: Figure 3 shown.
[0083] S103: Selecting key material components and production process parameters whose correlation is higher than the correlation threshold from various material components and production process parameters, and constructing an initial data set with data corresponding to the key material components and production process parameters and casting qualification rate.
[0084] In this embodiment, a correlation threshold is selected based on historical data, and key material components and production process parameters are selected according to the correlation threshold, including 48 key material components and production process parameters such as molten iron temperature and pouring start temperature, and the data of 48 key material components and production process parameters under different batches (including T1, T2, ..., Tk) are combined with the casting qualification rate of the corresponding batch to construct an initial data set. The format of the initial data set is shown in Table 1.
[0085] Table 1: Schematic diagram of the initial dataset
[0086] Historical batches T1 T2 … Tk Parameter 1 Value1_T1 Value1_T2 … Value1_Tk Parameter 2 Value2_T1 Value2_T2 … Value2_Tk … … … … … Parameter i Value i_T1 Value i_T2 … Value i_Tk Parameter 48 Value 48_T1 Value 48_T2 … Value 48_Tk Product qualification rate Pass rate_T1 Pass rate_T2 … Pass rate_Tk
[0087] S104: obtaining a preset number of sub-samples from the initial data set by random sampling, training a corresponding decision tree based on each sub-sample, and constructing a random forest model based on the preset number of decision trees.
[0088] In this embodiment, the random forest model is actually an enhanced and improved version of the decision tree model. It divides the samples in the initial data set into m sub-samples through random sampling. Each sub-sample includes data of a different number of historical batches. Each sub-sample is extracted from the initial data set through sampling with replacement. These subsets are used to train multiple decision tree base learners, and then a decision tree is trained on each data subset. It should be noted that this embodiment also first analyzes the characteristics of the material composition and casting process design problems, and selects a suitable machine learning algorithm to realize the basis for casting qualification rate prediction. Since there are many material composition and casting process parameters and the amount of data is limited, it is necessary to select an algorithm that can cope with multiple features and small data problems, so as to provide a model basis for the subsequent casting production optimization. After analyzing the characteristics of four typical machine learning algorithms, such as Figure 4 The following is an analysis of the characteristics of four typical machine learning algorithms. According to the characteristics of this problem, random forest is finally selected to predict the pass rate because random forest is more stable and suitable for high-dimensional problems.
[0089] See also Figure 5 In one embodiment, the S104 includes S1041-S1403:
[0090] S1041: Calculate the information gain for each key material component and production process parameter.
[0091] In this embodiment, it is first necessary to calculate the information gain of each key material component and production process parameter (such as temperature, strength, fineness, etc.) for the target variable (such as qualified rate). In the decision tree model, information gain is an indicator to measure the importance of a feature to the classification task. It indicates the degree of improvement in the purity of the data set before and after the feature is used for division. The specific calculation process is as follows: Calculate the total entropy Ent(D) of the data of each key material component and production process parameter, and for each key material component and production process parameter, calculate the conditional entropy Ent(D) after each possible value divides the data set into several subsets. m ), and calculate the information gain using total entropy and conditional entropy.
[0092] In one embodiment, S1041 includes: calculating the information entropy of each key material component and production process parameter according to formula (2); calculating the information gain of each key material component and production process parameter according to the information entropy and formula (3); Formula (2): Formula (3): Among them, x is the name of the key material component and production process parameter, Ent(D) is the information entropy of the key material component and production process parameter x, and Ent(D m) is the information entropy of the key material composition and production process parameter x when the data type is m, D is the data set corresponding to the key material composition and production process parameter x, M is the total number of data types corresponding to the key material composition and production process parameters, p k is the probability of the kth data type of key material composition and production process parameters, It is the ratio of the number of data types in the data set corresponding to the key material component and production process parameter x when there is m data types to the total number of data types in the set. Gain(D,x) is the information gain of each key material component and production process parameter.
[0093] In this embodiment, the information entropy and information gain of the key material composition and production process parameter x are calculated by formula (2) and formula (3), and the information gain is used to determine whether it can be the optimal key material composition and production process parameter corresponding to the node when the decision tree is split into left and right subtrees. Exemplarily, x is the name of the material composition or production process parameter, such as sand temperature. Assuming that there are M types of sand temperature, then D m is the sample with temperature m in the production process parameter "sand temperature" among all samples D, where Ent(D) and Ent(D m ) are the total information entropy of the production process parameters and the conditional information entropy when the temperature is m.
[0094] S1042: Randomly select the current sub-sample, and select the optimal key material components and production process parameters from the randomly selected part of the key material components and production process parameters according to the information gain.
[0095] In this embodiment, when training the decision tree, subsamples obtained at some sampling moments are randomly selected, and each subsample contains all the key material components or production process parameters. When the decision tree is split, some key material components or production process parameters are randomly selected from all the key material components or production process parameters as candidate feature sets. For example, if there are n key material components and production process parameters, the number of selected key material components and production process parameters is less than n, assuming that n sub key material components and production process parameters are taken as candidate feature sets, and then, according to the information gain values of the material components and production process parameters in the candidate feature sets calculated by the method of S1041, the optimal key material components and production process parameters are selected as the attributes of the decision tree nodes.
[0096] S1043: Divide the left and right subtrees of the current split node according to the optimal key material composition and production process parameters, and finally obtain a decision tree corresponding to each subsample.
[0097] In this embodiment, the left subtree and the right subtree are divided according to the optimal key material composition and the production process parameters as the division attributes of the current node. Optionally, the division result can be that the left subtree is a qualified product and the right subtree is an unqualified product. The randomness in the decision tree construction process is achieved, which helps to reduce the overfitting of the model and improve the robustness of the model.
[0098] S105: Obtaining an optimal solution based on the random forest model and the genetic algorithm, and obtaining recommended intervals of the key material components and production process parameters according to the optimal solution.
[0099] In this embodiment, a genetic algorithm under an elite strategy is used to find the material composition and production process parameter range combination that maximizes the qualified rate, providing an algorithm basis for the dynamic optimization of the material composition and production process parameters during casting. For specific steps, see S1-S4 described below. This method generates multiple candidate solutions (individuals) in the solution (casting parameter set) space, selects candidate solutions with higher fitness as parents according to the random forest model, and performs operations such as crossover and mutation on the selected candidate solutions to gradually optimize the quality of the solution, and finally finds the optimal solution range, that is, the recommended interval of key material composition and production process parameters.
[0100] See also Figure 6 In one embodiment, S105 includes S1-S4:
[0101] S1. Generate multiple initial candidate solutions.
[0102] In this embodiment, first, a certain number of individuals (candidate solutions) are randomly generated in the solution space as the initial group, and each individual is encoded in binary mode, which is implemented in the model using the toolbox.register method. In addition, the parameter range of the initial individual is used as the recommended interval for the initial iteration. The candidate solution is the value of each parameter. For example, if the production process parameters are sand temperature, fineness and strength, then the format of a candidate solution is (108, 0.05, 15), which corresponds to three material components and production process parameters respectively. Each candidate solution represents a possible parameter setting, and the initial recommended interval is the material composition and production process parameter range of +-10 in the individual neighborhood, and provides an initial recommended interval for the subsequent optimization process. It should be noted that the value of the individual neighborhood is selected according to the numerical value of the production process parameter.
[0103] S2. Predicting the fitness of each initial candidate solution according to the random forest model, and selecting an intermediate candidate solution whose fitness is greater than or equal to a fitness threshold.
[0104] In this embodiment, the fitness of each initial candidate solution is predicted using the random forest model trained in step S104, and the candidate solutions with better quality are screened out as intermediate candidate solutions by comparing the fitness of each candidate solution with the preset fitness threshold, and continue to be the candidate objects of the subsequent optimization process. This method can narrow the search range and improve the optimization efficiency. Optionally, the fitness of each candidate solution can also be evaluated using a fitness function, and the higher the fitness, the better the quality of the candidate solution.
[0105] S3. Exchange the binary data of the intermediate candidate solutions or randomly change the binary data of the intermediate candidate solutions to generate a new generation of candidate solutions, and obtain the optimal candidate solution and the neighborhood of the optimal candidate solution from the new generation of candidate solutions.
[0106] In this embodiment, the selected intermediate candidate solutions are subjected to crossover and mutation operations in the genetic algorithm. The crossover operation generates new offspring individuals by exchanging the binary data of two candidate solutions, which helps to combine the advantages of different candidate solutions and produce better offspring. The mutation operation increases the diversity of the population by randomly changing the binary data of the candidate solutions, preventing the algorithm from falling into the local optimal solution too early. Through the two operations of crossover and mutation, a new generation of candidate solutions is obtained, and the optimal candidate solution and the neighborhood of the optimal candidate solution are screened.
[0107] S4. Repeat S1-S3 to obtain the neighborhood of the optimal candidate solution of the current iteration, and perform an intersection operation on the neighborhood of the optimal candidate solution of the current iteration and the recommended interval of the previous iteration to obtain the recommended interval of the current iteration, and end the repeated execution of S1-S3 by setting keywords to finally obtain the recommended interval of the key material components and production process parameters, wherein the recommended interval of the previous iteration includes the recommended interval of the initial iteration, and the recommended interval of the initial iteration is the neighborhood of the initial candidate solution.
[0108] In this embodiment, each time the steps S1-S3 are repeated, the neighborhood of the optimal candidate solution of the new generation of candidate solutions will be obtained, and the intersection operation will be performed with the optimal interval (recommended interval) obtained by the previous iteration to narrow the search range and approach the optimal solution. The genetic algorithm under this elite strategy ensures that the best individuals in each generation are retained, and new excellent individuals are continuously generated through crossover and mutation operations. Finally, when the preset number of iterations is reached or other termination conditions are met, the steps S1-S3 are stopped and the current optimal parameter interval combination is obtained. This combination can theoretically maximize the qualified rate in the production process. This optimal interval provides a solid basis for the subsequent preparation of casting raw materials.
[0109] For example, see Figure 7 , Figure 7The current best individual refers to the current best candidate solution found by the genetic algorithm. The neighborhood of the current best candidate solution is the neighborhood of the best candidate solution plus or minus 10, that is, a and b. For example, if the best solution for sand temperature is 200K, then a=200-10=190K, b=200+10=210K, that is, the neighborhood of the best candidate solution of the current iteration is [190, 210]. The best interval obtained in the previous iteration is assumed to be c=195K, d=215K, then the best interval of the current iteration is the intersection of the two, that is, [195, 210]. By analogy, each generation is gradually reduced. If the intersection is empty, the interval of the previous generation is still taken to avoid falling into certain extreme values.
[0110] S106: setting the material composition and production process parameters of the current batch according to the recommended interval, and obtaining data corresponding to the key material composition and production process parameters of the current batch.
[0111] In this embodiment, based on the recommended ranges of key material components and production process parameters, such as molten iron temperature, pouring start temperature, element content (material composition), moisture, permeability and tensile strength, the amounts of various materials, such as flux and deoxidizers, alloying elements and slag-forming agents, are accurately calculated according to the recommended ranges, thereby effectively reducing the uncertainty and variability of parameters in production, which would lead to unstable prediction of casting qualification rate.
[0112] S107: According to the data corresponding to the key material components and production process parameters of the current batch and the preset number of decision trees, the target key material components and production process parameters corresponding to the nodes of each decision tree are obtained, and the casting qualification rate corresponding to each decision tree is calculated according to the correlation between the target key material components and the production process parameters.
[0113] In this embodiment, according to step S104, the partitioning attributes of each decision tree, namely the target key material composition and production process parameters, are obtained. The partitioning attributes are determined by information gain during the decision tree training process, which can minimize the classification error rate of whether the product is qualified.
[0114] Exemplarily, assuming that the division attributes of the decision tree are temperature, strength, and fineness, according to the correlation between the key material components and the production process parameters calculated in S102, the correlations of temperature, strength, and fineness are obtained as q1, q2, and q3 respectively, and the qualified rate Q=q1+q2+q3 corresponding to each decision tree is calculated by adding the correlations.
[0115] S108: performing weighted summation on the random parameter weight of each decision tree and the corresponding casting qualification rate, and calculating the casting qualification rate of the current batch.
[0116] In this embodiment, the random parameter weights of each decision tree are obtained, and the weighted sum is performed according to the casting qualification rate calculated by each decision tree to calculate the total casting qualification rate.
[0117] In one embodiment, S108 includes performing weighted summation of the random parameter weight of each decision tree and the predicted casting qualification rate according to formula (4) to obtain the casting qualification rate of the current batch; formula (4): in, is the qualified rate of the current batch of castings, x is the data corresponding to the key material composition and production process parameters of the current batch of castings, c i is the random parameter weight, is the casting qualification rate predicted by each decision tree, and N is the total number of decision trees.
[0118] In this embodiment, the prediction results of each decision tree are weighted and summed according to formula (4) to obtain the qualified rate of castings in the current batch. The target key parameters of the decision tree are obtained by calculating the information gain, and the qualified rate of the current decision tree is calculated by the correlation of the target key parameters. The qualified rate of each decision tree is weighted and summed by setting the random parameter weight, thereby ensuring the correctness of the prediction result.
[0119] The method for predicting the qualified rate of castings based on the recommended intervals of composition and process parameters provided in the present embodiment obtains the data and qualified rate of castings corresponding to the material composition and production process parameters of different historical batches of the casting process, and preprocesses the data corresponding to the material composition and production process parameters of different historical batches; performs correlation analysis on the preprocessed data of the material composition and production process parameters of different historical batches and the corresponding qualified rate of castings to obtain the correlation between each material composition and production process parameter and the qualified rate of castings; selects the key material composition and production process parameters whose correlation is higher than the correlation threshold from each material composition and production process parameter, and constructs an initial data set with the data corresponding to the key material composition and production process parameters and the qualified rate of castings; obtains a preset number of subsamples from the initial data set by random sampling, and obtains the corresponding A decision tree is provided, and a random forest model is constructed based on a preset number of decision trees; an optimal solution is obtained based on the random forest model and a genetic algorithm, and a recommended interval of the key material components and production process parameters is obtained according to the optimal solution; the material components and production process parameters of the current batch are set according to the recommended interval, and data corresponding to the key material components and production process parameters of the current batch are obtained; according to the data corresponding to the key material components and production process parameters of the current batch and the preset number of decision trees, the target key material components and production process parameters corresponding to the nodes of each decision tree are obtained, and the casting qualification rate corresponding to each decision tree is calculated according to the correlation degree corresponding to the target key material components and production process parameters; the random parameter weight of each decision tree is weighted summed with the corresponding casting qualification rate to calculate the casting qualification rate of the current batch. The present application sets the raw material dosage through the recommended range of key material components and production process parameters, determines the casting qualification rate of each decision tree through the correlation between key material components and production process parameters and casting qualification rate, and weights the output of the casting qualification rate of each decision tree through random parameter weights, thereby improving the prediction effect of the casting qualification rate and more effectively controlling the casting quality.
[0120] Example 2
[0121] In addition, an embodiment of the present application provides a casting qualification rate prediction device based on the recommended intervals of composition and process parameters, which is applied to electronic equipment.
[0122] like Figure 8 As shown, the casting qualification rate prediction device 800 based on the recommended interval of composition and process parameters includes:
[0123] The preprocessing module 801 is used to obtain the data corresponding to the material composition and production process parameters of different historical batches of casting processes and the qualified rate of castings, and preprocess the data corresponding to the material composition and production process parameters of different historical batches;
[0124] The correlation analysis module 802 is used to perform correlation analysis on the pre-processed data of material composition and production process parameters of different historical batches and the corresponding casting qualification rate, and obtain the correlation between each material composition and production process parameter and the casting qualification rate;
[0125] A construction module 803 is used to select the key material components and production process parameters whose correlation is higher than the correlation threshold from the various material components and production process parameters, and construct an initial data set with the data corresponding to the key material components and production process parameters and the casting qualification rate;
[0126] A training module 804 is used to obtain a preset number of sub-samples from the initial data set by random sampling, obtain a corresponding decision tree based on each sub-sample training, and construct a random forest model based on the preset number of decision trees;
[0127] A first acquisition module 805 is used to obtain an optimal solution based on the random forest model and the genetic algorithm, and obtain the recommended intervals of the key material components and production process parameters according to the optimal solution;
[0128] The second acquisition module 806 is used to set the material composition and production process parameters of the current batch according to the recommended interval, and obtain data corresponding to the key material composition and production process parameters of the current batch;
[0129] The first calculation module 807 is used to obtain the target key material composition and production process parameters corresponding to the nodes of each decision tree according to the data corresponding to the key material composition and production process parameters of the current batch and the preset number of decision trees, and calculate the casting qualification rate corresponding to each decision tree according to the correlation degree corresponding to the target key material composition and production process parameters;
[0130] The second calculation module 808 is used to perform weighted summation on the random parameter weight of each decision tree and the corresponding casting qualification rate to calculate the casting qualification rate of the current batch.
[0131] Optionally, the preprocessing module 801 shown is also used to screen initial valid data that conforms to a preset data format from the data corresponding to the material composition and production process parameters; use a clustering model to divide the initial valid data into k clusters, calculate the distance between each initial valid data and the cluster to which it belongs, and normalize the initial valid data whose distance is less than or equal to a distance threshold.
[0132] Optionally, the correlation analysis module 802 is further used to perform correlation analysis on the pre-processed data of material composition and production process parameters of different historical batches and the corresponding casting qualification rate according to formula (1), and obtain the correlation between each material composition and production process parameter and the casting qualification rate; formula (1): Among them, i is the correlation between the i-th material component or production process parameter and the casting qualification rate, i is the serial number of each material component or production process parameter, k is the serial number of the data corresponding to each material component or production process parameter, x i (k) is the qualified rate of the kth data corresponding to the i-th material composition or production process parameter, x0(k) is the qualified rate of castings, is the minimum difference between the k data corresponding to the material composition or production process parameters and the casting qualification rate, is the maximum value of the casting qualification rate among the k data corresponding to the material composition or production process parameters, and ρ is the adjustable coefficient.
[0133] Optionally, the training module 804 shown is also used to calculate the information gain of each key material component and production process parameter; randomly select the current sub-sample, and select the optimal key material component and production process parameter from the randomly selected part of the key material components and production process parameters according to the information gain; divide the left and right subtrees of the current split node according to the optimal key material components and production process parameters, and finally obtain the decision tree corresponding to each sub-sample.
[0134] Optionally, the training module 804 is further used to calculate the information entropy of each key material component and production process parameter according to formula (2); calculate the information gain of each key material component and production process parameter according to the information entropy and formula (3); formula (2): Formula (3): Among them, x is the name of the key material component and production process parameter, Ent(D) is the information entropy of the key material component and production process parameter x, and Ent(D m ) is the information entropy of the key material composition and production process parameter x when the data type is m, D is the data set corresponding to the key material composition and production process parameter x, M is the total number of data types corresponding to the key material composition and production process parameters, p k is the probability of the kth data type of key material composition and production process parameters, It is the ratio of the number of data types in the data set corresponding to the key material component and production process parameter x when there is m data types to the total number of data types in the set. Gain(D,x) is the information gain of each key material component and production process parameter.
[0135] Optionally, the first acquisition module 805 shown is also used for S1, generating multiple initial candidate solutions; S2, predicting the fitness of each initial candidate solution according to the random forest model, and selecting the intermediate candidate solution whose fitness is greater than or equal to the fitness threshold; S3, exchanging the binary data of the intermediate candidate solution or randomly changing the binary data of the intermediate candidate solution to generate a new generation of candidate solutions, and obtaining the optimal candidate solution and the neighborhood of the optimal candidate solution from the new generation of candidate solutions; S4, repeatedly executing S1-S3 to obtain the neighborhood of the optimal candidate solution of the current iteration, and performing an intersection operation on the neighborhood of the optimal candidate solution of the current iteration and the recommended interval of the previous iteration to obtain the recommended interval of the current iteration, and ending the repeated execution of S1-S3 by setting a keyword, and finally obtaining the recommended interval of the key material composition and the production process parameters, wherein the recommended interval of the previous iteration includes the recommended interval of the initial iteration, and the recommended interval of the initial iteration is the neighborhood of the initial candidate solution.
[0136] Optionally, the second calculation module 808 is further used to perform weighted summation of the random parameter weight of each decision tree and the predicted casting qualification rate according to formula (4) to obtain the casting qualification rate of the current batch; formula (4): in, is the qualified rate of the current batch of castings, x is the data corresponding to the key material composition and production process parameters of the current batch of castings, c i is the random parameter weight, is the casting qualification rate predicted by each decision tree, and N is the total number of decision trees.
[0137] The casting qualification rate prediction device 800 based on the recommended intervals of components and process parameters provided in this embodiment can implement the casting qualification rate prediction method based on the recommended intervals of components and process parameters provided in Example 1, and will not be described again here to avoid repetition.
[0138] The casting qualification rate prediction device based on the recommended interval of composition and process parameters provided in the present embodiment obtains the data corresponding to the material composition and production process parameters of different historical batches of the casting process and the casting qualification rate, and pre-processes the data corresponding to the material composition and production process parameters of different historical batches; performs correlation analysis on the pre-processed data of the material composition and production process parameters of different historical batches and the corresponding casting qualification rate, and obtains the correlation between each material composition and production process parameter and the casting qualification rate; selects the key material composition and production process parameter whose correlation is higher than the correlation threshold from each material composition and production process parameter, and constructs an initial data set with the data corresponding to the key material composition and production process parameter and the casting qualification rate; obtains a preset number of sub-samples from the initial data set by random sampling, and obtains the corresponding A decision tree is provided, and a random forest model is constructed based on a preset number of decision trees; an optimal solution is obtained based on the random forest model and a genetic algorithm, and a recommended interval of the key material components and production process parameters is obtained according to the optimal solution; the material components and production process parameters of the current batch are set according to the recommended interval, and data corresponding to the key material components and production process parameters of the current batch are obtained; according to the data corresponding to the key material components and production process parameters of the current batch and the preset number of decision trees, the target key material components and production process parameters corresponding to the nodes of each decision tree are obtained, and the casting qualification rate corresponding to each decision tree is calculated according to the correlation degree corresponding to the target key material components and production process parameters; the random parameter weight of each decision tree is weighted summed with the corresponding casting qualification rate to calculate the casting qualification rate of the current batch. The present application sets the raw material dosage through the recommended range of key material components and production process parameters, determines the casting qualification rate of each decision tree through the correlation between key material components and production process parameters and casting qualification rate, and weights the output of the casting qualification rate of each decision tree through random parameter weights, thereby improving the prediction effect of the casting qualification rate and more effectively controlling the casting quality.
[0139] Example 3
[0140] In addition, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program runs on the processor, the casting qualification prediction method based on the recommended range of composition and process parameters provided in Example 1 is executed.
[0141] The electronic device provided in the embodiment of the present invention can execute the steps of the casting qualification prediction method based on the recommended range of composition and process parameters provided in the above method embodiment 1, which will not be described again here to avoid repetition.
[0142] Example 4
[0143] 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 method for predicting the casting qualification rate based on the recommended intervals of composition and process parameters provided in Example 1 is implemented.
[0144] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0145] The computer-readable storage medium provided in this embodiment can implement the casting qualification rate prediction method based on the recommended range of composition and process parameters provided in Example 1, and will not be described again here to avoid repetition.
[0146] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or terminal including the element.
[0147] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0148] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for predicting casting qualification rate based on recommended intervals of composition and process parameters, characterized in that: The method comprises: Obtain the data corresponding to the material composition and production process parameters of different historical batches of casting processes and the qualified rate of castings, and pre-process the data corresponding to the material composition and production process parameters of different historical batches; Perform correlation analysis on the pre-processed data of material composition and production process parameters of different historical batches and the corresponding casting qualification rate to obtain the correlation between each material composition and production process parameter and the casting qualification rate; Selecting key material components and production process parameters whose correlation is higher than the correlation threshold from various material components and production process parameters, and constructing an initial data set with data corresponding to the key material components and production process parameters and the casting qualification rate; Obtaining a preset number of sub-samples from the initial data set by random sampling, training a corresponding decision tree based on each sub-sample, and constructing a random forest model based on the preset number of decision trees; Obtaining an optimal solution based on the random forest model and the genetic algorithm, and obtaining the recommended intervals of the key material components and production process parameters according to the optimal solution; Setting the material composition and production process parameters of the current batch according to the recommended interval, and obtaining data corresponding to the key material composition and production process parameters of the current batch; According to the data corresponding to the key material components and production process parameters of the current batch and the preset number of decision trees, the target key material components and production process parameters corresponding to the nodes of each decision tree are obtained, and the casting qualification rate corresponding to each decision tree is calculated according to the correlation degree corresponding to the target key material components and production process parameters; The random parameter weight of each decision tree and the corresponding casting qualification rate are weighted and summed to calculate the casting qualification rate of the current batch.
2. The method according to claim 1, characterized in that The preprocessing of the data corresponding to the material composition and production process parameters of different historical batches includes: Selecting initial valid data that conforms to a preset data format from the data corresponding to the material composition and the production process parameters; The initial valid data is divided into k clusters using a clustering model, the distance between each initial valid data and the cluster to which it belongs is calculated, and the initial valid data whose distance is less than or equal to a distance threshold is normalized.
3. The method according to claim 1, characterized in that The correlation analysis of the material composition and production process parameter data of different historical batches after preprocessing and the corresponding casting qualification rate is performed to obtain the correlation between each material composition and production process parameter and the casting qualification rate, including: According to formula (1), the correlation analysis is performed on the material composition and production process parameter data of different historical batches after preprocessing and the corresponding casting qualification rate to obtain the correlation between each material composition and production process parameter and the casting qualification rate; Formula (1): Among them, v i is the correlation between the i-th material component or production process parameter and the casting qualification rate, i is the serial number of each material component or production process parameter, k is the serial number of the data corresponding to each material component or production process parameter, x i (k) is the qualified rate of the kth data corresponding to the i-th material composition or production process parameter, x0(k) is the qualified rate of castings, is the minimum difference between the k data corresponding to the material composition or production process parameters and the casting qualification rate, is the maximum value of the casting qualification rate among the k data corresponding to the material composition or production process parameters, and ρ is the adjustable coefficient.
4. The method according to claim 1, characterized in that: The step of obtaining a corresponding decision tree based on each sub-sample training includes: Calculate the information gain for each key material component and production process parameter; Randomly select a current sub-sample, and select the optimal key material composition and production process parameters from the randomly selected part of the key material composition and production process parameters according to the information gain; The left and right subtrees of the current split node are divided according to the optimal key material composition and production process parameters, and finally a decision tree corresponding to each subsample is obtained.
5. The method according to claim 4, characterized in that The information gain of calculating each key material component and production process parameter includes: The information entropy of each key material component and production process parameter is calculated according to formula (2); Calculate the information gain of each key material component and production process parameter according to the information entropy and formula (3); Formula (2): Formula (3): Among them, x is the name of the key material component and production process parameter, Ent(D) is the information entropy of the key material component and production process parameter x, and Ent(D m ) is the information entropy of the key material composition and production process parameter x when the data type is m, D is the data set corresponding to the key material composition and production process parameter x, M is the total number of data types corresponding to the key material composition and production process parameters, p k is the probability of the kth data type of key material composition and production process parameters, It is the ratio of the number of data types in the data set corresponding to the key material component and production process parameter x when there is m data types to the total number of data types in the set. Gain(D,x) is the information gain of each key material component and production process parameter.
6. The method according to claim 1, characterized in that The optimal solution is obtained based on the random forest model and the genetic algorithm, and the recommended range of the key material components and the production process parameters is obtained according to the optimal solution, including: S1. Generate multiple initial candidate solutions; S2. Predicting the fitness of each initial candidate solution according to the random forest model, and selecting an intermediate candidate solution whose fitness is greater than or equal to a fitness threshold; S3, exchanging the binary data of the intermediate candidate solutions or randomly changing the binary data of the intermediate candidate solutions to generate a new generation of candidate solutions, and obtaining an optimal candidate solution and a neighborhood of the optimal candidate solution from the new generation of candidate solutions; S4. Repeat S1-S3 to obtain the neighborhood of the optimal candidate solution of the current iteration, and perform an intersection operation on the neighborhood of the optimal candidate solution of the current iteration and the recommended interval of the previous iteration to obtain the recommended interval of the current iteration, and end the repeated execution of S1-S3 by setting keywords to finally obtain the recommended interval of the key material components and production process parameters, wherein the recommended interval of the previous iteration includes the recommended interval of the initial iteration, and the recommended interval of the initial iteration is the neighborhood of the initial candidate solution.
7. The method according to claim 4, characterized in that The method of performing weighted summation of the random parameter weight of each decision tree and the corresponding casting qualification rate to calculate the casting qualification rate of the current batch includes: According to formula (4), the random parameter weight of each decision tree and the predicted casting qualification rate are weighted and summed to obtain the casting qualification rate of the current batch; Formula (4): in, is the qualified rate of the current batch of castings, x is the data corresponding to the key material composition and production process parameters of the current batch of castings, c i is the random parameter weight, is the casting qualification rate predicted by each decision tree, and N is the total number of decision trees.
8. A casting qualification rate prediction device based on the recommended interval of composition and process parameters, characterized in that: The device comprises: A preprocessing module is used to obtain the data corresponding to the material composition and production process parameters of different historical batches of casting processes and the qualified rate of castings, and to preprocess the data corresponding to the material composition and production process parameters of different historical batches; A correlation analysis module is used to perform correlation analysis on the pre-processed data of material composition and production process parameters of different historical batches and the corresponding casting qualification rate, and obtain the correlation between each material composition and production process parameter and the casting qualification rate; A construction module is used to select the key material components and production process parameters whose correlation is higher than the correlation threshold from various material components and production process parameters, and construct an initial data set with the data corresponding to the key material components and production process parameters and the casting qualification rate; A training module, used to obtain a preset number of sub-samples from the initial data set by random sampling, obtain a corresponding decision tree based on each sub-sample training, and construct a random forest model based on the preset number of decision trees; A first acquisition module, used to obtain an optimal solution based on the random forest model and the genetic algorithm, and obtain the recommended intervals of the key material components and production process parameters according to the optimal solution; A second acquisition module is used to set the material composition and production process parameters of the current batch according to the recommended interval, and obtain data corresponding to the key material composition and production process parameters of the current batch; A first calculation module is used to obtain the target key material composition and production process parameters corresponding to the nodes of each decision tree according to the data corresponding to the key material composition and production process parameters of the current batch and the preset number of decision trees, and calculate the casting qualification rate corresponding to each decision tree according to the correlation degree corresponding to the target key material composition and production process parameters; The second calculation module is used to perform weighted summation on the random parameter weight of each decision tree and the corresponding casting qualification rate to calculate the casting qualification rate of the current batch.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the processor is running, the computer program executes the casting qualification rate prediction method based on the recommended intervals of composition and process parameters as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer program is stored therein, and when the computer program is run on a processor, the method for predicting the casting qualification rate based on the recommended intervals of composition and process parameters according to any one of claims 1 to 7 is executed.
Citation Information
Cited By
Production monitoring method and system for non-toxic household disinfectant and storage medium
CN119863041A
Machining process optimization control method for supporting shaft of drive axle of mining truck
CN121900305A
A processing process optimization control method for a mining truck drive axle support shaft
CN121900305B