Method for forecasting viscosity of multi-element steelmaking slag

CN122050581APending Publication Date: 2026-05-15UNIV OF SCI & TECH BEIJING
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
UNIV OF SCI & TECH BEIJING
Filing Date
2026-01-09
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing models are difficult to apply simultaneously to predict the viscosity of homogeneous and heterogeneous multi-component steelmaking slags with significant temperature variations and wide viscosity ranges. Furthermore, existing methods consume a lot of manpower and resources and have large prediction errors.

Method used

A stacked ensemble machine learning model based on a table prior fitting network meta-inference with a heterogeneous mapping of 'composition + temperature - viscosity' and a bidirectional attention mechanism is constructed. The base learner is optimized by grid search and five-fold cross-validation to achieve accurate prediction of the viscosity of multivariate steelmaking slag.

Benefits of technology

It achieves efficient and accurate prediction of the viscosity of homogeneous and heterogeneous multi-component steelmaking slag, reduces experimental costs, improves prediction accuracy and generalization ability, and is applicable to the viscosity prediction of steelmaking slag under different temperature and composition conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122050581A_ABST
    Figure CN122050581A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of metal smelting, and particularly relates to a forecasting method for viscosity of multi-element steelmaking slag. The method comprises the following steps: firstly, collecting multi-element steelmaking slag viscosity data of known components at different temperatures, taking the components and the temperatures as input characteristic values, and taking a viscosity value as an output value; the method comprises the following steps: standardizing steelmaking slag component data and temperature data to construct a training set and a test set; then, constructing a component + temperature-viscosity-based parallel heterogeneous mapping base learner and a table prior fitting network element reasoning stacking integrated machine learning model based on a bidirectional attention mechanism, and performing optimization and participation verification on the base model by using grid search and five-fold cross validation; the constructed model can efficiently and accurately forecast the viscosity of homogeneous and heterogeneous multi-element steelmaking slag at different temperatures, the number of experiments is remarkably reduced, the research and development cost is reduced, and the method has important guiding value for design of the steelmaking slag and online regulation and control of metallurgical functions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of metal smelting technology, and more specifically to a method for predicting the viscosity of multi-component steelmaking slag. Background Technology

[0002] Steelmaking slag is a multi-component slag system containing CaO, SiO2, Fe2O3, FeO, MgO, Al2O3, MnO, and P2O5. Viscosity, as a key physical property parameter of steelmaking slag, directly affects the slag metallurgical functions of steelmaking processes such as dephosphorization, slag splashing for furnace protection, and slag foaming. Especially for the rapidly developing electric arc furnace (EAF) steelmaking, slag foaming can reduce heat loss and provide good protection for refractory materials and graphite electrodes during smelting, thereby achieving high power input, high production efficiency, and low energy consumption. However, insufficient or excessive slag foaming can lead to splashing, posing a significant potential hazard to production. Viscosity is a key parameter for controlling slag foaming, and timely acquisition of slag viscosity is of great significance for the online, real-time, and precise control of metallurgical functions such as slag foaming.

[0003] Obtaining viscosity data for steelmaking slag typically relies on measurements using a rotational viscometer at high temperatures. This method is not only labor-intensive and physically demanding but also struggles to achieve real-time data acquisition. Consequently, several models have been developed to predict steelmaking slag viscosity, such as the widely used Iida model, the Urbain model, the modified Urbain model, the CSIRO model, the Tanaka model, and the Zhang model. However, these models are limited in several ways. First, they do not comprehensively cover all components of steelmaking slag, including CaO, SiO2, Fe2O3, FeO, MgO, Al2O3, MnO, and P2O5. Second, they are only applicable to viscosity prediction in a completely homogeneous liquid-phase system and are not suitable for heterogeneous slag systems containing solid phases. Furthermore, they often exhibit significant prediction errors, which are typical shortcomings of most models. Especially for steelmaking slag, the compositional and temperature variations prevent it from maintaining a completely homogeneous liquid phase during smelting, making viscosity prediction a persistent challenge. For heterogeneous slag systems with coexisting solid and liquid phases, although Roscoe and Einstein have established well-known viscosity prediction models, these models require prior knowledge of the solid fraction, liquid composition, and liquid viscosity at specific temperatures. Currently, the solid fraction and liquid composition are mainly calculated using the foreign FactSage thermodynamic software, which has low computational efficiency and is based solely on equilibrium conditions. Liquid viscosity is calculated using traditional models, but the errors remain significant, limiting its real-time applicability in production processes. Furthermore, other parameters of this model vary considerably in systems with different component contents, significantly reducing prediction accuracy and limiting large-scale application. Therefore, existing models are difficult to simultaneously predict the viscosity of homogeneous and heterogeneous multi-component slag systems with significant temperature variations and wide viscosity ranges. Developing a method that can simultaneously and efficiently predict the viscosity of both homogeneous and heterogeneous multi-component steelmaking slags is therefore essential. Summary of the Invention

[0004] To address the problems existing in the prior art, the main objective of this invention is to propose a method for predicting the viscosity of multi-component steelmaking slag, which can be more accurately applied to predicting the viscosity of multi-component steelmaking slag under both homogeneous and heterogeneous conditions.

[0005] According to a first aspect of the present invention, the present invention provides the following technical solution:

[0006] A method for predicting the viscosity of multi-component steelmaking slag includes the following steps:

[0007] S1. Collect viscosity data of multi-component steelmaking slag with known composition at different temperatures, and perform data cleaning, normalization and logarithmic preprocessing.

[0008] S2. Based on the relationship between the composition of steelmaking slag and temperature and viscosity, the composition and temperature after pretreatment are used together as the input feature values ​​of the model, and the viscosity is used as the output value of the model.

[0009] S3. Standardize the composition and temperature data of steelmaking slag, and divide the data into training and testing sets;

[0010] S4. Construct a stacked ensemble machine learning model based on the heterogeneous mapping of "composition + temperature - viscosity" and the table prior fitting network meta-inference based on the bidirectional attention mechanism. Use grid search and five-fold cross-validation to fine-tune the base model and verify the optimized machine learning algorithm in the stacked ensemble machine learning model to obtain the optimized multivariate steelmaking slag viscosity prediction model.

[0011] S5. The viscosity of multi-component steelmaking slag at different temperatures is predicted using an optimized viscosity prediction model for multi-component steelmaking slag.

[0012] As a preferred embodiment of the method for predicting the viscosity of multi-component steelmaking slag according to the present invention, in step S1, the data preprocessing includes cleaning and removing erroneous data, normalizing the content of each component to make its sum 100%, and performing logarithmic transformation on the temperature data.

[0013] In a preferred embodiment of the method for predicting the viscosity of multi-component steelmaking slag according to the present invention, in step S2, the input component data is normalized data, and the temperature data is logarithmic data.

[0014] As a preferred embodiment of the multi-component steelmaking slag viscosity prediction method of the present invention, in step S3, the normalized steelmaking slag composition data and temperature data are standardized to eliminate the influence of different dimensions, and the data are divided into training set and test set in a ratio of (7~8.5):(1.5~3).

[0015] In a preferred embodiment of the multi-element steelmaking slag viscosity prediction method of the present invention, in step S3, the following expression is used for standardization:

[0016]

[0017] Where X is the original feature value in the dataset, μ is the mean of the feature on the training set, and σ is the standard deviation of the feature on the training set. st It is the value after standardization.

[0018] As a preferred embodiment of the multivariate steelmaking slag viscosity prediction method of the present invention, in step S4, a two-layer stacked ensemble machine learning model is constructed. The first layer includes a base model consisting of an ensemble learning model based on a gradient boosting framework, a support vector regression model, and a K-nearest neighbor model base learner. The second layer includes a meta-model consisting of a meta-learner based on a table prior fitting network. Both the base learner and the meta-learner are supervised regression models based on machine learning.

[0019] In a preferred embodiment of the method for predicting the viscosity of multi-element steelmaking slag as described in this invention, in step S4, when performing stacked ensemble machine learning training, multiple parallel heterogeneous mapping base learners are first used to predict the viscosity of multi-element steelmaking slag respectively. Then, the prediction results of each base learner are used as the input features of the meta-learner, and the meta-learner performs secondary learning to output the final viscosity prediction value.

[0020] In a preferred embodiment of the multi-element steelmaking slag viscosity prediction method of the present invention, wherein: in step S4, optimizing the machine learning algorithm in the stacked integrated machine learning model specifically involves:

[0021] S41. Train the base learners of the ensemble learning model, support vector regression model, and K-nearest neighbor model based on the divided training and test sets.

[0022] S42. After training multiple base models, perform five-fold cross-validation on the models, and divide the training set D into K equal subsets {D1, D2, ..., D...}. k (K=5), for the k-th fold verification, use division by D. k Other subsets besides the training set are used as sub-training sets to train sub-model M. k , using M k For the validation set D k The meta-features of this fold are obtained through prediction. ; Concatenate all predicted values ​​in their original order to obtain the training set meta-features A1, and then apply this to the test set X. test The predicted values ​​of K sub-models are averaged to obtain the meta-features B1 of the test set. This ensures that the predicted meta-features of each sample in the training set are not trained using the sample itself, thus strictly avoiding information leakage.

[0023] S43. The original features and meta-features are concatenated and then input into a table for prior fitting. The network meta-learner is then trained, with the input being the concatenated feature matrix X. s The expression is:

[0024]

[0025] Among them, X o The original feature matrix includes nine features: CaO, SiO2, FeO, MgO, Al2O3, MnO, P2O5, Fe2O3, and ln(T) (T represents temperature). A1 consists of meta-features generated by different heterogeneous base learners.

[0026] The table prior fitting network meta-learner learns the complex interaction relationships between features through a bidirectional attention mechanism, and outputs the final viscosity prediction value. The expression is:

[0027]

[0028] In a preferred embodiment of the multi-element steelmaking slag viscosity prediction method of the present invention, in step S4, during the model construction process, corresponding hyperparameter optimization strategies are adopted for different base learners:

[0029] For the extreme gradient boosting base learner, an iterative strategy from coarse to fine is adopted. First, a random search is used to quickly screen within a wide parameter space to initially identify high-potential parameter regions. The optimization targets include learning rate, number of iterations, maximum tree depth, sample sampling ratio, feature sampling ratio, and regularization coefficient. On this basis, a fine grid search is further carried out for the two core parameters that significantly affect prediction accuracy and generalization ability: tree depth and number of learners, to obtain the globally optimal combination.

[0030] For support vector regression base learners, the focus should be on tuning the penalty parameter C and the insensitive loss parameter. The optimal parameter combination is found by using grid search combined with cross-validation.

[0031] For the K-nearest neighbor base learner, the main optimizations are to the key parameters such as the number of nearest neighbors k, the distance metric, and the weight function, and to determine the optimal nearest neighbor configuration through grid search.

[0032] Throughout the optimization process, a five-fold cross-validation mechanism was used to robustly evaluate the model performance under different parameter combinations for all base learners. The root mean square error was used as the loss metric, and the error was converged to the expected level through repeated iterations. After final optimization, the optimal structural parameter configuration of each base learner was determined for the current dataset, so that the model could achieve the best prediction accuracy while maintaining strong generalization ability.

[0033] In a preferred embodiment of the multi-element steelmaking slag viscosity prediction method of the present invention, in step S43, when constructing the stacked ensemble model, the prediction results generated by the base learner are transformed into new feature vectors, which are used as inputs to the meta learner for secondary learning.

[0034] The beneficial effects of this invention are as follows:

[0035] This invention proposes a multivariate method for predicting the viscosity of steelmaking slag. It collects viscosity data of steelmaking slag with known components at different temperatures. The composition and temperature of the steelmaking slag are used as input feature values ​​for the model, while the viscosity is used as the output feature value. The composition and temperature data of the steelmaking slag are standardized, and the data are divided into training and testing sets. A parallel heterogeneous mapping base learner based on "composition + temperature - viscosity" and a meta-inference stacked ensemble machine learning model based on a bidirectional attention mechanism and a table prior fitting network are constructed. Five-fold cross-validation is used to cross-validate the base model, resulting in an optimized steelmaking slag viscosity prediction model that can predict the viscosity of steelmaking slag at different temperatures. Unlike traditional models, this method integrates a traditional heterogeneous base learner with a meta-learner based on a bidirectional attention mechanism using the Transformer architecture. By learning the local residual patterns that the base learner fails to fully fit, it achieves the complementary advantages of "global fitting of heterogeneous models + residual learning of neural networks," effectively avoiding the risk of overfitting during secondary training. It can accurately predict the viscosity of steelmaking slag at different temperatures, and can accurately predict the viscosity of multi-component steelmaking slag containing CaO, SiO2, FeO, MgO, Al2O3, MnO, P2O5, and Fe2O3, especially when FeO and Fe2O3 are treated separately and P2O5 is present. It can be applied to predict the viscosity of both homogeneous (all-liquid phase) and heterogeneous (solid-liquid coexistence) slag systems, and has stronger generalization ability. It significantly reduces the number of experiments and saves a lot of manpower, material resources, and time costs in viscosity measurement. It has good guiding significance for the design, development, and online optimization control of steelmaking slag. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0037] Figure 1 This is a flowchart illustrating the principle of the present invention.

[0038] Figure 2 This diagram illustrates the impact of different decision trees on the error of the base learner in the limiting gradient boosting method.

[0039] Figure 3 This diagram illustrates the impact of the penalty parameters of this invention on the error of the support vector regression base learner.

[0040] Figure 4 This diagram illustrates the impact of different nearest neighbor numbers on the error of the K-nearest neighbor base learner.

[0041] Figure 5This is a volume fraction distribution diagram of the solid phase in the slag system tested in this invention.

[0042] Figure 6 This is a comparison chart of the predicted and measured results of the viscosity of the molten slag system tested in this invention.

[0043] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0044] The technical solutions described below in conjunction with the embodiments will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] This invention proposes a method for predicting the viscosity of multi-component steelmaking slag. Compared with methods that determine the viscosity of steelmaking slag through numerous experiments, this method saves manpower, material resources, and time costs, is simple and fast, and has a smaller deviation from experimental results. Compared with current empirical and semi-empirical models for predicting the viscosity of steelmaking slag, this method can be applied to predicting the viscosity of both homogeneous and heterogeneous multi-component slags, with more accurate prediction results and strong generalization ability, which can meet the current viscosity prediction needs under the diversity of steelmaking slag components and temperatures.

[0046] like Figure 1 As shown, this invention proposes a method for predicting the viscosity of multi-element steelmaking slag, comprising the following steps:

[0047] S1. Collect viscosity data of multi-component steelmaking slag with known components (including components and component content) at different temperatures, and clean, normalize and logarithmically preprocess the data.

[0048] S2. Based on the relationship between the composition of steelmaking slag and temperature and viscosity, the composition and temperature after pretreatment are used together as the input feature values ​​of the model, and the viscosity is used as the output value of the model.

[0049] S3. Standardize the composition and temperature data of steelmaking slag, and divide the data into training and testing sets;

[0050] S4. Construct a stacked ensemble machine learning model based on the heterogeneous mapping of "composition + temperature - viscosity" and the table prior fitting network meta-inference based on the bidirectional attention mechanism. Use grid search and five-fold cross-validation to fine-tune the base model and verify the machine learning algorithm in the optimized stacked ensemble machine learning model to obtain the optimized steelmaking slag viscosity prediction model.

[0051] S5. The viscosity of multi-component steelmaking slag at different temperatures is predicted using an optimized viscosity prediction model for multi-component steelmaking slag.

[0052] The collection and processing of steelmaking slag viscosity data is essential before constructing the stacked ensemble learning model. Steelmaking slag contains CaO, SiO2, FeO, MgO, Al2O3, MnO, P2O5, and Fe2O3. After obtaining viscosity data for all steelmaking slags, outlier data is removed, and components not present in certain slag systems are filled in. These components, along with temperature, are used as input features for the model. To avoid instability in subsequent modeling and slow model convergence due to excessively large dataset fluctuations, the data used for modeling is standardized.

[0053] Step S4 specifically includes the following:

[0054] (1) Two-layer stacked ensemble learning model

[0055] A two-layer stacked ensemble machine learning model is constructed. The first layer is the base learner. When training the stacked ensemble machine learning model, multiple heterogeneous base learners are first used to predict the viscosity of multivariate steelmaking slag. Then, the prediction results of each base learner are used as the input features of the meta learner. The meta learner performs secondary learning and outputs the final viscosity prediction value.

[0056] (2) Training and optimization of base learners

[0057] Write Python code to build regression models using three base learners: extreme gradient boosting, support vector regression, and K-nearest neighbors. Divide the pre-processed dataset into training and test sets in an 8:2 ratio. Import the training data into each base learner, train the model, and use five-fold cross-validation to verify the performance of each base learner.

[0058] During model construction, corresponding hyperparameter optimization strategies are adopted for different base learners:

[0059] For the extreme gradient boosting base learner, an iterative strategy from coarse to fine is adopted. First, a random search is used to quickly screen within a wide parameter space to initially identify high-potential parameter regions. The optimization targets include learning rate, number of iterations, maximum tree depth, sample sampling ratio, feature sampling ratio, and regularization coefficient. On this basis, a fine grid search is further carried out for the two core parameters that significantly affect prediction accuracy and generalization ability: tree depth and number of learners, to obtain the globally optimal combination.

[0060] For support vector regression base learners, the focus should be on tuning the penalty parameter C and the insensitive loss parameter. The optimal parameter combination is found by using grid search combined with cross-validation.

[0061] For the K-nearest neighbor base learner, the main optimizations are to the key parameters such as the number of nearest neighbors k, the distance metric, and the weight function, and to determine the optimal nearest neighbor configuration through grid search.

[0062] Figure 2 , Figure 3 and Figure 4 The figures show the effects of different decision trees on the error of the limit gradient boosting base learner, the effects of the penalty parameter on the error of the support vector regression base learner, and the effects of different nearest neighbor numbers on the error of the K-nearest neighbor base learner.

[0063] Throughout the optimization process, a five-fold cross-validation mechanism was used to robustly evaluate the model performance under different parameter combinations for all base learners. Root mean square error (RMSE) was used as the loss metric, and the error was iterated until it converged to the expected level. After final optimization, the optimal structural parameter configuration for each base learner on the current dataset was determined, ensuring that it achieved the best prediction accuracy while maintaining strong generalization ability. RMSE was selected to evaluate the prediction reliability of each base learner.

[0064]

[0065] In the formula, n is the sample size. Forecast value, These are measured values.

[0066] (3) Training and optimization of meta-learners

[0067] When constructing the stacked ensemble model, the prediction results generated by the base learners are transformed into new feature vectors, which are then used as input to the meta-learner for secondary learning. This method employs a regression algorithm based on prior data fitting to the network as the meta-learner. Unlike traditional decision trees or artificial neural network models, this algorithm utilizes prior distribution knowledge formed through large-scale pre-training. Through the Transformer architecture, it directly approximates Bayesian posterior predictions during inference. Its core advantage lies in its ability to demonstrate excellent nonlinear fitting capability and robustness on small to medium-sized datasets without requiring cumbersome hyperparameter tuning (such as tree depth or learning rate selection), effectively avoiding the risk of overfitting during secondary training. After training, test set data is input into the model, and the mean absolute error (MAE) and coefficient of determination (R²) are further selected based on the root mean square error. 2 The model's forecasting performance is evaluated.

[0068]

[0069]

[0070] Where n is the number of samples. Forecast value, These are measured values. This represents the average of the measured values.

[0071] The root mean square error (RMSE) of the optimal base learner extreme gradient boosting tree model on the test set is 0.176 Pa·s, the mean absolute error (MAO) is 0.103 Pa·s, and the coefficient of determination (COD) is 0.942. The corresponding metrics of the stacked ensemble learning model, which integrates heterogeneous base learners with a meta-learner based on the bidirectional attention mechanism of the Transformer architecture, are 0.164 Pa·s, 0.078 Pa·s, and 0.949, respectively. The low RMSE and MAO, along with the high COD, indicate higher prediction accuracy and reliability, demonstrating that the prediction accuracy of the stacked ensemble learning model is further improved.

[0072] The solid volume fraction distribution of the steelmaking slag system tested in this invention is shown in the figure below. Figure 5 As shown, the prediction results and experimental results of the stacked ensemble machine learning models are as follows: Figure 6 As shown in the figure, the comparison reveals that the predicted and measured values ​​agree well for both homogeneous multi-component steelmaking slag with a solid volume fraction of 0 and heterogeneous multi-component steelmaking slag with a solid-liquid mixture. Therefore, the method of this invention can simultaneously predict the viscosity of homogeneous and heterogeneous multi-component steelmaking slag without model switching and has high accuracy.

[0073] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural transformations made using the contents of the present invention under the inventive concept of the present invention, or direct / indirect applications in other related technical fields, are included within the patent protection scope of the present invention.

Claims

1. A method for predicting the viscosity of multi-element steelmaking slag, characterized in that, Includes the following steps: S1. Collect viscosity data of multi-component steelmaking slag with known composition at different temperatures, and perform data cleaning, normalization and logarithmic preprocessing. S2. Based on the relationship between the composition of steelmaking slag and temperature and viscosity, the composition and temperature after pretreatment are used together as the input feature values ​​of the model, and the viscosity is used as the output value of the model. S3. Standardize the composition and temperature data of steelmaking slag, and divide the data into training and testing sets; S4. Construct a stacked ensemble machine learning model based on the heterogeneous mapping of "composition + temperature - viscosity" and the table prior fitting network meta-inference based on the bidirectional attention mechanism. Use grid search and five-fold cross-validation to fine-tune the base model and verify the optimized machine learning algorithm in the stacked ensemble machine learning model to obtain the optimized multivariate steelmaking slag viscosity prediction model. S5. The viscosity of multi-component steelmaking slag at different temperatures is predicted using an optimized viscosity prediction model for multi-component steelmaking slag.

2. The method for predicting the viscosity of multi-element steelmaking slag according to claim 1, characterized in that, In step S1, data preprocessing includes cleaning and removing erroneous data, normalizing the content of each component to make its sum 100%, and performing a logarithmic transformation on the temperature data.

3. The method for predicting the viscosity of multi-element steelmaking slag according to claim 1, characterized in that, In step S2, the input component data is normalized data, while the temperature data is logarithmic data.

4. The method for predicting the viscosity of multi-element steelmaking slag according to claim 1, characterized in that, In step S3, the normalized data of steelmaking slag composition and temperature data are standardized, and the data are divided into training set and test set according to the ratio of (7~8.5):(1.5~3).

5. The method for predicting the viscosity of multi-element steelmaking slag according to claim 1, characterized in that, In step S3, the following expression is used for standardization: Where X is the original feature value in the dataset, μ is the mean of the feature on the training set, and σ is the standard deviation of the feature on the training set. st It is the value after standardization.

6. The method for predicting the viscosity of multi-element steelmaking slag according to claim 1, characterized in that, In step S4, a two-layer stacked ensemble machine learning model is constructed. The first layer includes a base model consisting of an ensemble learning model based on a gradient boosting framework, a support vector regression model, and a K-nearest neighbor model base learner. The second layer includes a meta-model consisting of a meta-learner based on a table prior fitting network. Both the base learner and the meta-learner are supervised regression models based on machine learning.

7. The method for predicting the viscosity of multi-element steelmaking slag according to claim 6, characterized in that, In step S4, when performing stacked ensemble machine learning training, multiple parallel heterogeneous mapping base learners are first used to predict the viscosity of multivariate steelmaking slag. Then, the prediction results of each base learner are used as input features of the meta-learner. The meta-learner performs secondary learning and outputs the final viscosity prediction value.

8. The method for predicting the viscosity of multi-element steelmaking slag according to claim 7, characterized in that, In step S4, optimizing the machine learning algorithm in the stacked ensemble machine learning model specifically involves: S41. Train the base learners of the ensemble learning model, support vector regression model, and K-nearest neighbor model based on the divided training and test sets. S42. After training multiple base models, perform five-fold cross-validation on the models, and divide the training set D into K equal subsets {D1, D2, ..., D...}. k (K=5), for the k-th fold verification, use division by D. k Other subsets besides the training set are used as sub-training sets to train sub-model M. k , using M k For the validation set D k The meta-features of this fold are obtained through prediction. ; Concatenate all predicted values ​​in their original order to obtain the training set meta-features A1, and then apply this to the test set X. test The predicted values ​​of K sub-models are averaged to obtain the meta-features B1 of the test set. This ensures that the predicted meta-features of each sample in the training set are not trained using the sample itself, thus strictly avoiding information leakage. S43. The original features and meta-features are concatenated and then input into a table for prior fitting. The network meta-learner is then trained, with the input being the concatenated feature matrix X. s The expression is: Among them, X o The original feature matrix includes 9 features: CaO, SiO2, FeO, MgO, Al2O3, MnO, P2O5, Fe2O3, and ln(T). A1 represents the meta-features generated by different heterogeneous base learners. The table prior fitting network meta-learner learns the complex interaction relationships between features through a bidirectional attention mechanism, and outputs the final viscosity prediction value. The expression is: 。 9. The method for predicting the viscosity of multi-element steelmaking slag according to claim 6, characterized in that, In step S4, during the model construction process, corresponding hyperparameter optimization strategies are adopted for different base learners: For the extreme gradient boosting base learner, an iterative strategy from coarse to fine is adopted. First, a random search is used to quickly screen within a wide parameter space to initially identify high-potential parameter regions. The optimization targets include the learning rate, number of iterations, maximum tree depth, sample sampling ratio, feature sampling ratio, and regularization coefficient. On this basis, a fine grid search is further carried out for the two core parameters that significantly affect prediction accuracy and generalization ability: tree depth and number of learners, to obtain the globally optimal combination. For support vector regression base learners, the focus should be on tuning the penalty parameter C and the insensitive loss parameter. The optimal parameter combination is found by using grid search combined with cross-validation. For the K-nearest neighbor base learner, the main optimizations include the number of nearest neighbors k, the distance metric, and the key parameters of the weight function. The optimal nearest neighbor configuration is determined through grid search. Throughout the optimization process, a five-fold cross-validation mechanism was used to robustly evaluate the model performance under different parameter combinations for all base learners. The root mean square error was used as the loss metric, and the error was converged to the expected level through repeated iterations. After final optimization, the optimal structural parameter configuration of each base learner was determined for the current dataset, so that the model could achieve the best prediction accuracy while maintaining strong generalization ability.

10. The method for predicting the viscosity of multi-element steelmaking slag according to claim 1, characterized in that, In step S43, when constructing the stacked ensemble model, the prediction results generated by the base learner are transformed into new feature vectors, which are then used as input to the meta learner for secondary learning.