Method and device for predicting processing cycle of hot-rolled slab and electronic equipment
By cleaning and feature encoding the hot-rolled slab processing data and combining it with the integrated learning of BP neural network and support vector regression model, the problem of inaccurate prediction of the hot-rolled slab processing cycle in the steel industry was solved, and accurate processing cycle prediction was achieved.
Patent Information
- Application Number
- CN202510683444.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-09-05
AI Technical Summary
Existing technologies in the steel industry have difficulty accurately describing the complex manufacturing processes in workshops and are unable to effectively mine data information, resulting in inaccurate predictions of the hot-rolled slab processing cycle.
By cleaning and feature encoding the hot-rolled slab processing data, calculating the maximum information value, screening the high-correlation features, and adopting the ensemble learning strategy, combining the BP neural network and support vector regression model, an integrated model is constructed for prediction.
It achieves accurate prediction of the hot-rolled slab processing cycle, improves the model's predictive ability and robustness, and adapts to the complex manufacturing process in the workshop.
Smart Images

Figure CN120598104A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent manufacturing, and in particular to a method, device and electronic equipment for predicting the processing cycle of hot-rolled slabs. Background Art
[0002] While numerous research results have demonstrated the importance and feasibility of predicting production cycle times in workshops, their practical industrial application has primarily focused on the wafer manufacturing industry, with relatively few applications in the steel industry. Furthermore, data processing and feature generation often rely excessively on prior knowledge. Regarding prediction methods, due to the continuous improvement of workshop productivity, existing simulation modeling and mathematical statistics methods are no longer adaptable to real-world conditions. They are unable to accurately describe the complex manufacturing processes in workshops, effectively mine data information, and predict the processing cycle of hot-rolled slabs. Summary of the Invention
[0003] In order to solve the above technical problems, the embodiments of the present application provide a method, device and electronic equipment for predicting the processing cycle of a hot-rolled slab.
[0004] In a first aspect, an embodiment of the present application provides a method for predicting a hot-rolled slab processing cycle, the method comprising: cleaning hot-rolled slab processing data to obtain an initial information set; encoding qualitative features in the initial information set; calculating the maximum information value of different feature categories in the encoded initial information set; screening data whose maximum information value corresponding to different feature categories in the initial information set is greater than or equal to a maximum information value threshold to obtain a preprocessed data set; inputting the preprocessed data set into a base learner to obtain an initial output, inputting the initial output into a meta-learner to obtain an integrated model, and predicting the hot-rolled slab processing cycle through the integrated model.
[0005] In one embodiment, the cleaning of the hot-rolled slab processing data includes: counting the missing values of each feature in the hot-rolled slab processing data to obtain the missing ratio of each feature; if the missing ratio of a feature is greater than or equal to a preset ratio threshold, filling the missing values according to the pattern of the feature; if the missing ratio of a feature is less than the preset ratio threshold, deleting the missing value of the feature.
[0006] In one embodiment, encoding the qualitative features in the initial information set includes: if the qualitative features in the initial information set are unordered category features, performing one-hot encoding on the qualitative features; if the qualitative features in the initial information set are ordered category features, performing label encoding on the qualitative features; if the qualitative features in the initial information set are features without obvious regular categories, performing target encoding on the features without obvious regular categories.
[0007] In one embodiment, the target encoding of the qualitative features includes: dividing the training set in the initial information set into K training subsets, randomly selecting a training subset to be encoded, calculating the first average value of different feature categories in the remaining K-1 training subsets, and encoding the training subset to be encoded according to the first average value; according to the second average value of different feature categories of the K training subsets in the training set, encoding the test set in the initial information set according to the second average value.
[0008] In one embodiment, the calculation of the maximum information value of different feature categories in the encoded initial information set includes: calculating the mutual information of two different feature categories; dividing the data corresponding to the two different feature categories into a preset number of intervals; calculating the maximum value in different interval division methods based on the mutual information and performing normalization processing to obtain the maximum information value.
[0009] In one embodiment, the preprocessed data set is input into a base learner to obtain an initial output, the initial output is input into a meta learner to obtain an integrated model, and the hot-rolled slab processing cycle is predicted by the integrated model, including: dividing the preprocessed data set into a training set and a test set, using K-fold cross-validation to input the training set into a BP neural network model and a support vector regression model respectively to obtain a first training set and a second training set, and combining the first training set and the second training set to obtain the training set of the initial output; inputting the training set of the initial output into the meta learner for training to obtain the integrated model; using K-fold cross-validation to input the test set into the BP neural network model and the support vector regression model respectively for initial prediction, and combining the BP neural network model and the support vector regression model after taking the mean to obtain the test set of the initial output; inputting the test set of the initial output into the meta learner to predict the hot-rolled slab processing cycle.
[0010] In one embodiment, before inputting the preprocessed data set into the base learner to obtain the initial output, the method further includes: S1: determining the structure and parameters of the initial BP neural network model and initializing the particle parameters; S2: using the mean square error of the output result of the initial BP neural network model as the fitness function, and determining the position and velocity of the particle as the individual optimal and the global optimal according to the fitness function; S3: if the maximum number of iterations and the minimum mean square error of the particle swarm optimization algorithm are not met, continuing the S2 iterative search; S4: if the maximum number of iterations or the minimum mean square error of the particle swarm optimization algorithm are met, outputting the optimal weights and thresholds, and then constructing the BP neural network model according to the optimal weights and thresholds.
[0011] In one embodiment, before the preprocessed data set is input into the base learner to obtain the initial output, the method further includes: SS1: respectively giving the search space of the first parameter and the search space of the second parameter of the initial support vector regression model, and determining the first search step; SS2: obtaining the first parameter value and the second parameter value according to the evaluation index, and determining the new search space of the first parameter and the new search space of the second parameter according to the first parameter value and the second parameter value, and determining the second search step; SS3: looping SS2, shortening the search step to a preset range, obtaining the optimal first parameter and the optimal second parameter, and constructing the support vector regression model based on the optimal first parameter and the optimal second parameter.
[0012] In a second aspect, an embodiment of the present application provides a device for predicting a hot-rolled slab processing cycle, the device comprising: A cleaning module is used to clean the hot-rolled slab processing data to obtain an initial information set; An encoding module, configured to encode the qualitative features in the initial information set; A calculation module, used to calculate the maximum information value of different feature categories in the encoded initial information set; A screening module, configured to screen data whose maximum information value corresponding to different feature categories in the initial information set is greater than or equal to a maximum information value threshold, to obtain a preprocessed data set; The prediction module is used to input the preprocessed data set into the base learner to obtain an initial output, input the initial output into the meta learner, and predict the hot-rolled slab processing cycle.
[0013] In a third aspect, an embodiment of the present application provides an electronic device comprising a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is run on the processor, the method for predicting the hot-rolled slab processing cycle provided in the first aspect is executed.
[0014] The method for predicting the hot-rolled slab processing cycle provided in the above-mentioned present application cleans the hot-rolled slab processing data to obtain an initial information set; encodes the qualitative features in the initial information set; calculates the maximum information value of different feature categories in the encoded initial information set; filters the data corresponding to different feature categories in the initial information set whose maximum information value is greater than or equal to the maximum information value threshold to obtain a preprocessed data set; inputs the preprocessed data set into a base learner to obtain an initial output, inputs the initial output into a meta-learner to obtain an integrated model, and predicts the hot-rolled slab processing cycle through the integrated model. The present application optimizes the data set through data cleaning, feature encoding, and feature selection, and adopts an integrated learning strategy to effectively realize the prediction of the slab processing cycle in a hot rolling workshop. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solution of this 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 this application and should not be regarded as limiting the scope of protection of this application. In each of the drawings, similar components are numbered similarly.
[0016] Figure 1 A schematic diagram showing a process flow of a method for predicting a hot-rolled slab processing cycle provided in an embodiment of the present application is shown; Figure 2 Another schematic flow chart of the method for predicting the hot-rolled slab processing cycle provided in an embodiment of the present application is shown; Figure 3 Another schematic flow chart of the method for predicting the hot-rolled slab processing cycle provided in an embodiment of the present application is shown; Figure 4 Another schematic flow chart of the method for predicting the hot-rolled slab processing cycle provided in an embodiment of the present application is shown; Figure 5 The encoding process of the target encoding provided by the embodiment of the present application is shown; Figure 6 The algorithm flow of the integrated model provided by the embodiment of the present application is shown; Figure 7 Another schematic flow chart of the method for predicting the hot-rolled slab processing cycle provided in an embodiment of the present application is shown; Figure 8 A schematic diagram of the integrated model solution process provided by an embodiment of the present application is shown; Figure 9 A structural schematic diagram of a device for predicting a hot-rolled slab processing cycle provided in an embodiment of the present application is shown.
[0017] Icons: 900 - prediction device for hot-rolled slab processing cycle, 901 - cleaning module, 902 - encoding module, 903 - calculation module, 904 - screening module, 905 - prediction module. DETAILED DESCRIPTION
[0018] 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 the embodiments.
[0019] The components of the embodiments of the present application generally described and illustrated in the drawings herein may be arranged and designed in a variety of different 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 claimed application, but rather merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.
[0020] 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 the possibility of adding one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.
[0021] 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.
[0022] Unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly 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 meaning as in the context of the relevant technical field and will not be interpreted as having an idealized meaning or an overly formal meaning unless clearly defined in the various embodiments of the present application.
[0023] Example 1 An embodiment of the present application provides a method for predicting the processing cycle of a hot-rolled slab.
[0024] See also Figure 1 , the prediction methods for hot-rolled slab processing cycle include: S101: Clean the hot-rolled slab processing data to obtain an initial information set.
[0025] In this embodiment, the hot rolling production line involves a large number of equipment and materials, and the process is complex. Therefore, certain errors are inevitable in the process of collecting hot-rolled slab processing data, resulting in missing or abnormal data. It is also easy to cause problems such as inconsistent measurement units and feature redundancy. Therefore, in order to ensure the accuracy of model prediction, the data set is first cleaned to obtain an initial information set. Under the initial information set, corresponding feature encoding and feature selection methods are designed according to the characteristics of the data to provide a basis for algorithm design and model prediction.
[0026] See also Figure 2In one embodiment, step S101 includes steps S1011-S1013: S1011: Counting the missing values of each feature in the hot-rolled slab processing data to obtain the missing ratio of the missing values of each feature.
[0027] In this example, missing value statistics are performed on all characteristic attributes in the hot-rolled slab processing data, and the missing attributes are listed in Table 1. As can be seen from Table 1, the missing ratio of "product type" is 0.39%, and the missing ratio of "processing mode" is 1.03%.
[0028] Table 1 Missing values
[0029] S1012: If the missing ratio of the feature is greater than or equal to a preset ratio threshold, fill in the missing values according to the pattern of the feature.
[0030] In this implementation, if the missing value ratio of a feature is greater than or equal to a preset ratio threshold, then the processing method for such features is determined to be filling in the missing values using the feature's pattern. For example, for missing values in the "Processing Mode" feature, the mode of the "Processing Mode" feature is used for filling in the missing values. This is because each type of pattern has its own fixed meaning, so filling in the missing values using the mean or median is not applicable.
[0031] S1013: If the missing ratio of the feature is less than the preset ratio threshold, the missing value of the feature is deleted.
[0032] In this embodiment, if the missing ratio of the feature is less than the preset ratio threshold, then for this type of feature, the method for determining the missing value is to eliminate the missing value data of this type of feature, that is, since the missing amount of "product type" accounts for a small proportion in the data set, this type of missing value data is eliminated.
[0033] S102: Encode the qualitative features in the initial information set.
[0034] In this example, the data feature attributes in the slab processing cycle prediction problem can generally be divided into two types: qualitative features and quantitative features. Qualitative features generally refer to categorical variables, such as "slab type" and "product type" in the dataset. These variables do not have numerical meanings themselves, but represent different categorical differences. Quantitative features refer to continuous variables, such as "product width," "product length," and "product thickness" in the dataset, which are measured or statistically derived and have numerical attributes.
[0035] On the other hand, in order to make full use of the characteristic attributes of the dataset, in the data preprocessing stage, the qualitative features are encoded and converted into meaningful numerical values that can be processed by the model. The hot rolling dataset is encoded using three encoding strategies: one-hot encoding, label encoding, and improved target encoding.
[0036] See also Figure 3 In one embodiment, the step S102 includes S1021-S1023.
[0037] S1021: If the qualitative features in the initial information set are unordered categorical features, perform one-hot encoding on the qualitative features.
[0038] In this embodiment, if the qualitative features in the initial information set are unordered categorical features, they are one-hot encoded (One-Hot Encoding), and the processed feature values only contain 0 / 1. Taking the values of the "slab type" feature in the dataset ["X80", "X70-4", "Q235B"] as an example, one-hot encoding constructs a feature vector based on these three states, that is, each state is represented as ["100", "010", "001"]. The number of features is also expanded accordingly. It can be understood that the feature "slab type" is converted into three features: "whether it is X80", "whether it is X70-4", and "whether it is Q235B".
[0039] S1022: If the qualitative features in the initial information set are ordered category features, label encoding is performed on the qualitative features.
[0040] In this example, if the qualitative features in the initial information set are ordered categorical features, label encoding is performed on them. This is done by assigning corresponding numerical values to the different categories in the features. For example, for the "slab type" ["X80", "X70-4", "Q235B"], the Label Encoding result is [1, 2, 3], and the number of features remains unchanged.
[0041] S1023: If the qualitative features in the initial information set are features without obvious regular categories, target encoding is performed on the features without obvious regular categories.
[0042] In this embodiment, target encoding is a supervised encoding method suitable for encoding qualitative features without obvious regular categories. The basic idea is to represent each category in the feature with the corresponding target value mean. Taking some "slab types" ["X80", "X70-4", "Q235B"] as an example, Figure 1The three categories and their corresponding partial processing cycle data are displayed. The average processing cycle value of each category in the Target Encoding statistical data set is converted into [359.5714, 353, 130.0286].
[0043] See also Figure 4 In one embodiment, step S1023 includes S10231-S10232: S10231: Divide the training set in the initial information set into K training subsets, randomly select one training subset to be encoded, calculate the first average values of different feature categories in the remaining K-1 training subsets, and encode the training subset to be encoded according to the first average values.
[0044] In this embodiment, although Target Encoding can fully utilize the information of the target value, it is easy to produce overfitting when the distribution gap of the feature variables is large. Therefore, this application proposes a K-Fold Target Encoding strategy to overcome the shortcomings of traditional target encoding. The operation process of K-Fold Target Encoding is as follows: Figure 5 As shown, the training set in the initial information set is first encoded. The training set samples are divided into K parts. For each category to be encoded in the data, the first average value of the processing cycle corresponding to the same category features in the remaining K-1 data parts is calculated as the encoded data. It should be noted that if the mean value is empty due to uneven distribution and the K-1 data parts do not include the value of a category variable, the empty value is filled with the overall mean corresponding to that category.
[0045] S10232: Encode the test set in the initial information set according to the second average values of different feature categories of the K training subsets in the training set according to the second average values.
[0046] In this embodiment, when encoding the test set in the initial information set, the encoding method used for the qualitative features in the test set is the overall mean of each category in the training set, that is, the second mean value.
[0047] S103: Calculate the maximum information value of different feature categories in the encoded initial information set.
[0048] In this embodiment, in order to eliminate the influence of irrelevant variables and maximize the advantages of feature data, this application performs feature selection on the data set through the maximum information coefficient (MIC) of different feature categories. By using the mutual information and grid division method, the degree of correlation between variables can be effectively measured. Among them, mutual information represents the amount of information contained in one feature in another feature.
[0049] In one embodiment, step S103 includes: calculating the mutual information of two different feature categories; dividing the data corresponding to the two different feature categories into a preset number of intervals; calculating the maximum value of different interval division methods based on the mutual information and performing normalization processing to obtain the maximum information value.
[0050] In this embodiment, for example, the two feature categories are fixed slab width ( D ) and processing cycle ( T ), then the mutual information of the two feature categories is calculated according to formula (1) .
[0051] (1) Where, is the slab width ( D ) and processing cycle ( T )’s joint probability density; and are the slab width ( D ) and processing cycle ( T ) is the marginal probability distribution density.
[0052] Furthermore, according to the calculation formula of the maximum information coefficient (MIC) (2), the slab width ( D ) is divided into intervals, processing cycle ( T ) is divided into interval, about to D and T The data set composed of points is divided into intervals, take the maximum value among different interval division methods and perform normalization.
[0053] (2) in, is the upper limit of the interval division, H is the sample size, usually .
[0054] It should be noted that, considering that there are large differences in the characteristic measurement units in the hot rolling production data set and there will inevitably be some noise data, this application first converts the data to the same quantity level to avoid the influence of noise. The calculation formula is shown in (3): (3), where is the standardized eigenvalue; is the average value of the eigenvalues; is the standard deviation of the eigenvalues.
[0055] S104: Filtering data corresponding to different feature categories in the initial information set, whose maximum information value is greater than or equal to a maximum information value threshold, to obtain a preprocessed data set.
[0056] In this example, a maximum information threshold is set based on historical experience. Highly correlated features exceeding this threshold are extracted from the initial information set to filter and eliminate redundant data. The specific feature information is shown in Table 2. Qualitative features in the initial dataset are cleaned and encoded before being normalized. Quantitative features are directly normalized.
[0057] Table 2 Feature information
[0058] S105: Inputting the preprocessed data set into a base learner to obtain an initial output, inputting the initial output into a meta learner to obtain an integrated model, and predicting the hot-rolled slab processing cycle through the integrated model.
[0059] In this embodiment, due to the complexity and diversity of slab rolling data, it is difficult to achieve ideal results by using a single model to predict it. To improve the overall prediction effect, this application further fuses two models based on the stacking ensemble learning method to obtain an integrated model.
[0060] Specifically, Stacking ensemble learning uses a combination of base learners and meta-learners to train the base learners through K-fold cross-validation, and integrates the output results, i.e., the initial output, to train the meta-learner. Finally, the meta-learner outputs the final processing cycle prediction results, which enhances the model's prediction ability and robustness. Taking a two-layer 2-layer Stacking ensemble model as an example, its algorithm flow is as follows: Figure 6 shown.
[0061] Specifically, in the Stacking algorithm, the choice of learner and combination framework directly impacts the ensemble's effectiveness. Consider two key considerations: First, when selecting a hierarchical framework, excessive hierarchies can make it difficult to select the optimal stacking method due to the sheer number of models and combinations available. Furthermore, the overall performance improvement from fusing multiple layers of models is limited. Second, when selecting base and meta-learners, base learners generally need to select models with accurate and similar predictions and some heterogeneity between them. Meta-learners generally choose simple models with good stability to ensure overall generalization performance.
[0062] Optionally, taking the above two points into consideration, this application developed a two-layer learning framework based on stacking integration. The first layer's basis selector uses a BP neural network and support vector regression (SVR). The BP neural network uses the particle swarm optimization (PSO) algorithm to optimize the network weights and thresholds, and the SVR uses an improved grid search algorithm for parameter optimization. The second layer uses the multiple linear regression (MLR) algorithm as a meta-learner to ensure the overall stability and generalization of the model.
[0063] See also Figure 7 In one embodiment, step S105 includes steps S1051-S1054: S1051: Divide the preprocessed data set into a training set and a test set, use K-fold cross validation to input the training set into the BP neural network model and the support vector regression model respectively to obtain a first training set and a second training set, and combine the first training set and the second training set to obtain the initial output training set.
[0064] In this embodiment, most model combination methods use a simple linear addition method to process different prediction results, which cannot fully utilize the advantages of different models. To circumvent this problem, the present application assigns the optimal weight coefficient to the two sets of prediction results of the BP neural network and SVR to obtain the final processing cycle prediction result.
[0065] Specifically, the hot-rolled data set that has undergone data preprocessing is divided into a training set data1 and a test set data2. The BP neural network and SVR model are used as the first-layer base learners, and the particle swarm optimization (PSO) algorithm and improved grid search are used to optimize the parameters of the two models respectively. Taking SVR as an example, in order to prevent the model from overfitting, the 5-fold cross-validation (CV) method is used during training to divide data1 into five equal parts. Four of the parts are used each time to train the SVR, and the remaining part of the data is used for verification. A total of five groups of SVR verification results are obtained, and all verification results are combined vertically. The operation of PSO-BP is similar. The model solution process is as follows: Figure 8 shown.
[0066] S1052: Inputting the initial output training set into the meta-learner for training to obtain the integrated model.
[0067] In this embodiment, the verification results of PSO-BP and SVR are used as two columns of feature attributes, combined with the corresponding true values to obtain a new training set data3, and input into the meta-learner MLR model for training, so as to assign the optimal weight coefficients to the prediction results of PSO-BP and SVR and optimize the model prediction results.
[0068] S1053: Using K-fold cross validation, the test set is input into the BP neural network model and the support vector regression model respectively for initial prediction, and the BP neural network model and the support vector regression model are averaged and combined to obtain the initial output test set.
[0069] In this embodiment, during the cross-validation process, each model obtained by the trained PSO-BP and SVR-based learners is used to predict the test set, and the five groups of prediction results are averaged, which are also used as feature attributes and connected with the true values to form a new test set, that is, the initial output test set data4.
[0070] S1054: Input the initial output training set and the initial output test set into the meta-learner.
[0071] In this embodiment, see Figure 8 ,The new test set data4 is submitted to the MLR trained by S1052 for testing, and the final processing cycle prediction results are output.
[0072] In one embodiment, before step S105, the method further includes: S1: Determine the structure and parameters of the initial BP neural network model and initialize the particle parameters.
[0073] In this embodiment, since the number of layers and nodes in the hidden layer of the BP neural network is manually determined, it is necessary to find the most suitable network structure during the training process to avoid underfitting or overfitting, which affects the prediction effect. At the same time, the use of gradient descent as a training method has some inevitable defects, such as low learning efficiency, slow convergence speed, and easy to fall into local minimum. Therefore, this application uses PSO to optimize the initial weights and thresholds of the BP neural network to circumvent the defects of traditional neural networks and improve the prediction accuracy of the model.
[0074] Specifically, on the one hand, it is necessary to determine the BP neural network structure and parameters, where the input layer nodes are various characteristic factors, the output layer is the processing cycle prediction result, and train to determine the optimal number of hidden layers and nodes, activation function, etc.
[0075] On the other hand, initialize the particle parameters, such as the particle's optimization range, initial position and initial velocity, number of iterations, population size, learning factor, inertia factor, etc. It is equal to the parameter to be optimized, that is, the sum of the number of weights and thresholds in the BP neural network structure.
[0076] S2: Using the mean square error of the output result of the initial BP neural network model as a fitness function, and determining the position and velocity of the particle as the individual optimum and the global optimum according to the fitness function.
[0077] In this embodiment, the particle fitness value is calculated using formula (4) by taking the mean square error between the BP neural network output result and the true value as the fitness function.
[0078] (4) Where, For the k ( k= 1,2,…, ) true values of the output layer nodes, is the mean square error.
[0079] Furthermore, the position and velocity of the particles are updated using equations (5) and (6), and the minimum mean square error is found by comparing the particles. , that is, the minimum fitness value, that is, the particle can find the position corresponding to the best fitness value so far, that is, the individual optimal value of the particle pbest , and search the position corresponding to the global optimal fitness value so far through collective information sharing, that is, the global optimal value of the particle gbest In the optimization process, the particle velocity update expression is formula (5).
[0080] (5) Where, is the inertia factor; c 1, c 2 is the particle learning factor; r 1, r 2 is a random number between 0 and 1, which is used to increase the randomness of the particle flight. Indicates the The particle A speed solution, Indicates the The particle Position solution.
[0081] The position update expression is formula (6): (6) S3: If the maximum number of iterations and minimum mean square error of the particle swarm optimization algorithm are not met, continue the S2 iterative search.
[0082] In this embodiment, if the maximum number of iterations and the minimum mean square error of the particle swarm optimization algorithm are not met, it means that the individual particles are not yet optimal. pbest , or the global state of the particle is not optimal gbest , then continue the iterative search of S2.
[0083] S4: If the maximum number of iterations or the minimum mean square error of the particle swarm optimization algorithm is met, the optimal weights and thresholds are output, and the BP neural network model is constructed according to the optimal weights and thresholds.
[0084] In this embodiment, if the maximum number of iterations or the minimum error is met, the optimization result is output, and the optimal weights and thresholds output by the PSO are used as the optimization result and input into the BP neural network to construct the BP neural network model. Optionally, the number of nodes in the input and output layers of the BP neural network is determined by the number of features of the rolling data set and the predicted target value, which are 11 and 1, respectively. The hidden layer is used to map and propagate data, and its number of layers and nodes has a decisive influence on the performance of the entire network. Therefore, through repeated experimental comparisons, a two-layer hidden layer structure with 16 and 32 nodes, respectively, was finally determined to achieve the best training effect.
[0085] In one embodiment, before step S105, the method further includes: SS1: The search space of the first parameter and the search space of the second parameter of the initial support vector regression model are respectively given, and the first search step is determined.
[0086] In this embodiment, firstly, two important parameters of the initial support vector regression model are given, namely the initial search space of the first parameter C and the second parameter g. and , and the search step length len1=1. SS2: Obtain a first parameter value and a second parameter value according to the evaluation index, determine a new search space for the first parameter and a new search space for the second parameter according to the first parameter value and the second parameter value, and determine a second search step.
[0087] In this example, the parameter evaluation index is set to RMSE and the 3-CV cross-validation method is used to traverse the parameter combination on the training set. The result that minimizes RMSE is the first parameter value C = 64 and the second parameter value g = 0.125. Based on the position of (64, 0.125), the search range of C and g is halved to form a new search space. , , and shorten the search step by half to len2=0.5, then the optimal combination C=90.51, g=0.044194 will be obtained.
[0088] SS3: looping through SS2, shortening the search step to a preset range, obtaining an optimal first parameter and an optimal second parameter, and constructing the support vector regression model based on the optimal first parameter and the optimal second parameter.
[0089] In this embodiment, the search of the SS2 stage is repeated, and a small interval is selected on the grid with (90.51, 0.044194) as the center point. , , and shorten the step size to len3=0.1 for fine search, and obtain the final result C=84.45, g=0.058315.
[0090] The method for predicting the hot-rolled slab processing cycle provided in this embodiment cleans the hot-rolled slab processing data to obtain an initial information set; encodes the qualitative features in the initial information set; calculates the maximum information value of different feature categories in the encoded initial information set; filters the data corresponding to different feature categories in the initial information set whose maximum information value is greater than or equal to the maximum information value threshold to obtain a preprocessed data set; inputs the preprocessed data set into a base learner to obtain an initial output, inputs the initial output into a meta-learner to obtain an integrated model, and predicts the hot-rolled slab processing cycle through the integrated model. This application optimizes the data set through data cleaning, feature encoding, and feature selection, and adopts an integrated learning strategy to effectively realize the prediction of the slab processing cycle in a hot rolling workshop.
[0091] Example 2 In addition, an embodiment of the present application provides a device for predicting the processing cycle of a hot-rolled slab, which is applied to electronic equipment.
[0092] like Figure 9As shown, the prediction device 900 for the hot-rolled slab processing cycle includes: The cleaning module 901 is used to clean the hot-rolled slab processing data to obtain an initial information set.
[0093] The encoding module 902 is configured to encode the qualitative features in the initial information set.
[0094] The calculation module 903 is used to calculate the maximum information value of different feature categories in the encoded initial information set.
[0095] The screening module 904 is used to screen the data corresponding to different feature categories in the initial information set, whose maximum information value is greater than or equal to a maximum information value threshold, to obtain a preprocessed data set.
[0096] The prediction module 905 is configured to input the preprocessed data set into a base learner to obtain an initial output, and input the initial output into a meta learner to predict the hot-rolled slab processing cycle.
[0097] Optionally, the encoding module 902 is also used to determine if the qualitative features in the initial information set are unordered category features, then perform one-hot encoding on the qualitative features; if the qualitative features in the initial information set are ordered category features, then perform label encoding on the qualitative features; if the qualitative features in the initial information set are features without obvious regular categories, then perform target encoding on the features without obvious regular categories.
[0098] Optionally, the encoding module 902 is further used to divide the training set in the initial information set into K training subsets, randomly select one training subset to be encoded, calculate the first average value of different feature categories in the remaining K-1 training subsets, and encode the training subset to be encoded according to the first average value; according to the second average value of different feature categories in the K training subsets in the training set, encode the test set in the initial information set according to the second average value.
[0099] Optionally, the calculation module 903 shown is also used to calculate the mutual information of two different feature categories; divide the data corresponding to the two different feature categories into a preset number of intervals; calculate the maximum value in different interval division methods based on the mutual information and perform normalization processing to obtain the maximum information value.
[0100] Optionally, the prediction module 905 is further used to divide the preprocessed data set into a training set and a test set, and use K-fold cross validation to input the training set into the BP neural network model and the support vector regression model respectively to obtain a first training set and a second training set, and combine the first training set and the second training set to obtain the initial output training set; input the initial output training set into the meta-learner for training to obtain the integrated model; use K-fold cross validation to input the test set into the BP neural network model and the support vector regression model respectively for initial prediction, and take the mean of the BP neural network model and the support vector regression model and combine them to obtain the initial output test set; input the initial output test set into the meta-learner to predict the hot-rolled slab processing cycle.
[0101] Optionally, the prediction module 905 shown is also used for S1: determining the structure and parameters of the initial BP neural network model and initializing the particle parameters; S2: using the mean square error of the output result of the initial BP neural network model as the fitness function, and determining the position and speed of the particle as the individual optimal and the global optimal according to the fitness function; S3: if the maximum number of iterations and the minimum mean square error of the particle swarm optimization algorithm are not met, continuing the S2 iterative search; S4: if the maximum number of iterations or the minimum mean square error of the particle swarm optimization algorithm are met, outputting the optimal weights and thresholds, and then constructing the BP neural network model according to the optimal weights and thresholds.
[0102] Optionally, the prediction module 905 shown is also used for SS1: respectively giving the search space of the first parameter and the search space of the second parameter of the initial support vector regression model, and determining the first search step; SS2: obtaining the first parameter value and the second parameter value according to the evaluation index, and determining the new search space of the first parameter and the new search space of the second parameter according to the first parameter value and the second parameter value, and determining the second search step; SS3: looping SS2, shortening the search step to a preset range, obtaining the optimal first parameter and the optimal second parameter, and constructing the support vector regression model based on the optimal first parameter and the optimal second parameter.
[0103] The hot-rolled slab processing cycle prediction device 900 provided in this embodiment can implement the hot-rolled slab processing cycle prediction method provided in Example 1, and will not be described again here to avoid repetition.
[0104] The prediction device for the hot-rolled slab processing cycle provided in this embodiment cleans the hot-rolled slab processing data to obtain an initial information set; encodes the qualitative features in the initial information set; calculates the maximum information value of different feature categories in the encoded initial information set; filters the data corresponding to different feature categories in the initial information set whose maximum information value is greater than or equal to the maximum information value threshold to obtain a preprocessed data set; inputs the preprocessed data set into a base learner to obtain an initial output, inputs the initial output into a meta-learner to obtain an integrated model, and predicts the hot-rolled slab processing cycle through the integrated model. This application optimizes the data set through data cleaning, feature encoding, and feature selection, and adopts an integrated learning strategy to effectively realize the prediction of the slab processing cycle in a hot rolling workshop.
[0105] Example 3 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, it executes the method for predicting the hot-rolled slab processing cycle provided in Example 1.
[0106] The electronic device provided in the embodiment of the present invention can execute the steps of the method for predicting the processing cycle of the hot-rolled slab provided in the above-mentioned method embodiment 1. To avoid repetition, they will not be described here.
[0107] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or terminal comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or terminal comprising the element.
[0108] 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 the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this 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, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0109] 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 this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. A method for predicting the processing cycle of a hot-rolled slab, characterized in that: The method comprises: Clean the hot-rolled slab processing data to obtain an initial information set; Encoding the qualitative features in the initial information set; Calculate the maximum information value of different feature categories in the encoded initial information set; Screening data whose maximum information value corresponding to different feature categories in the initial information set is greater than or equal to a maximum information value threshold to obtain a preprocessed data set; The preprocessed data set is input into a base learner to obtain an initial output, the initial output is input into a meta learner to obtain an integrated model, and the hot-rolled slab processing cycle is predicted by the integrated model.
2. The method according to claim 1, characterized in that The cleaning of the hot-rolled slab processing data includes: Counting the missing values of each feature in the hot-rolled slab processing data to obtain a missing ratio of each feature; If the missing ratio of the feature is greater than or equal to a preset ratio threshold, the missing values are filled according to the pattern of the feature; If the missing ratio of the feature is less than the preset ratio threshold, the missing value of the feature is deleted.
3. The method according to claim 1, characterized in that The encoding of the qualitative features in the initial information set includes: If the qualitative features in the initial information set are unordered categorical features, performing one-hot encoding on the qualitative features; If the qualitative features in the initial information set are ordered categorical features, label encoding is performed on the qualitative features; If the qualitative features in the initial information set are features without obvious regular categories, target encoding is performed on the features without obvious regular categories.
4. The method according to claim 1, wherein The target encoding of the qualitative features comprises: Dividing the training set in the initial information set into K training subsets, randomly selecting one training subset to be encoded, calculating first average values of different feature categories in the remaining K-1 training subsets, and encoding the training subset to be encoded according to the first average values; According to the second average values of different feature categories of the K training subsets in the training set, the test set in the initial information set is encoded according to the second average values.
5. The method according to claim 1, wherein The calculation of the maximum information value of different feature categories in the encoded initial information set includes: Calculate the mutual information between two different feature categories; Divide the data corresponding to two different feature categories into a preset number of intervals; The maximum value in different interval division methods is calculated according to the mutual information and normalized to obtain the maximum information value.
6. The method according to claim 1, characterized in that Inputting the preprocessed data set into a base learner to obtain an initial output, inputting the initial output into a meta learner to obtain an integrated model, and predicting the hot-rolled slab processing cycle by using the integrated model, comprises: Dividing the preprocessed data set into a training set and a test set, inputting the training set into a BP neural network model and a support vector regression model respectively using K-fold cross validation to obtain a first training set and a second training set, and combining the first training set and the second training set to obtain the initial output training set; Inputting the initial output training set into the meta-learner for training to obtain the integrated model; Using K-fold cross validation, the test set is input into the BP neural network model and the support vector regression model respectively for initial prediction, and the BP neural network model and the support vector regression model are averaged and combined to obtain the test set of the initial output; The initial output test set is input into the meta-learner to predict the hot-rolled slab processing cycle.
7. The method according to claim 6, characterized in that Before inputting the preprocessed data set into the base learner to obtain the initial output, the method further includes: S1: Determine the structure and parameters of the initial BP neural network model and initialize the particle parameters; S2: using the mean square error of the output result of the initial BP neural network model as a fitness function, and determining the position and speed of the particle as the individual optimum and the global optimum according to the fitness function; S3: If the maximum number of iterations and minimum mean square error of the particle swarm optimization algorithm are not met, continue the S2 iterative search; S4: If the maximum number of iterations or the minimum mean square error of the particle swarm optimization algorithm is met, the optimal weights and thresholds are output, and the BP neural network model is constructed according to the optimal weights and thresholds.
8. The method according to claim 6, characterized in that Before inputting the preprocessed data set into the base learner to obtain the initial output, the method further includes: SS1: Given the search space of the first parameter and the search space of the second parameter of the initial support vector regression model respectively, and determining the first search step size; SS2: obtaining a first parameter value and a second parameter value according to the evaluation index, determining a new search space for the first parameter and a new search space for the second parameter according to the first parameter value and the second parameter value, and determining a second search step size; SS3: looping through SS2, shortening the search step to a preset range, obtaining an optimal first parameter and an optimal second parameter, and constructing the support vector regression model based on the optimal first parameter and the optimal second parameter.
9. A device for predicting the processing cycle of hot-rolled slabs, characterized in that: The device comprises: A cleaning module is used to clean the hot-rolled slab processing data to obtain an initial information set; An encoding module, configured to encode the qualitative features in the initial information set; A calculation module, used to calculate the maximum information value of different feature categories in the encoded initial information set; A screening module, configured to screen data whose maximum information value corresponding to different feature categories in the initial information set is greater than or equal to a maximum information value threshold, to obtain a preprocessed data set; The prediction module is used to input the preprocessed data set into the base learner to obtain an initial output, input the initial output into the meta learner, and predict the hot-rolled slab processing cycle.
10. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is run on the processor, the method for predicting the hot-rolled slab processing period according to any one of claims 1 to 8 is executed.