A liquid metal battery sorting indicator prediction method, system, device and storage medium
By employing multi-criteria feature selection and ensemble learning methods, the problems of large prediction errors and low accuracy in liquid metal battery sorting models are solved, achieving high-precision and stable prediction of sorting indicators, and supporting battery consistency evaluation and automated sorting.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUIZHOU POWER GRID CO LTD
- Filing Date
- 2025-12-31
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies cannot effectively utilize the state information during the activation period of liquid metal batteries, resulting in large prediction errors and low accuracy in sorting models, and making it difficult to maintain consistency under different operating conditions.
By employing a multi-criteria feature selection and ensemble learning approach, we extract feature parameters during the activation period of liquid metal batteries, construct an optimized feature subset, and train it using support vector regression, random forest regression, and extreme gradient boosting models. Combined with ridge regression models, we achieve high-precision prediction of sorting indicators.
It improves the prediction accuracy and stability of liquid metal battery sorting, effectively utilizes activation period data, enhances the model's generalization ability and prediction consistency, and supports battery consistency assessment and automated sorting.
Smart Images

Figure CN122131145A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of liquid metal battery applications, and in particular to a method, system, device, and storage medium for predicting sorting indicators of liquid metal batteries. Background Technology
[0002] In recent years, liquid metal batteries have attracted much attention as an emerging large-scale energy storage technology due to their unique structure, high operating temperature, and good reaction reversibility. Unlike traditional lithium-ion batteries, liquid metal batteries have a relatively long activation period in the initial stage of charging and discharging. Their internal electrochemical characteristics evolve dynamically with changes in temperature, component diffusion, and interface states, exhibiting significant volatility and non-stationarity. This characteristic makes the activation period data rich in state information, but it also increases the difficulty of model learning and feature extraction. Traditional sorting models based on lithium-ion batteries often assume that battery performance parameters are stable and measurable in the initial stage, and therefore cannot be directly applied to the data characteristics of liquid metal batteries, resulting in large prediction errors and low sorting accuracy. Summary of the Invention
[0003] In view of the aforementioned existing problems, this invention is proposed. Therefore, this invention provides a method, system, device, and storage medium for predicting sorting indicators of liquid metal batteries, addressing the problems of low prediction accuracy, insufficient generalization ability, and difficulty in effectively utilizing activation period data in existing liquid metal battery sorting processes.
[0004] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, embodiments of the present invention provide a method for predicting sorting indicators of liquid metal batteries, comprising: collecting cyclic data of liquid metal batteries during their activation period, and extracting original feature parameters based on the cyclic data to construct an original feature space; Each feature in the original feature space is scored using multiple criteria, and a comprehensive score for each feature is obtained by weighted summation. The top five features with the highest comprehensive scores are then selected to form an optimized feature subset. The target base model is trained using the optimized feature subset, and the hyperparameters of the target base model are optimized using root mean square error and root mean square percentage error as indicators. Based on the optimized target basic model, a capacity prediction integrated model is constructed. The activation period characteristic data of the liquid metal battery to be tested are input into the integrated model, and the predicted capacity is output. Based on the predicted capacity, the liquid metal batteries under test are sorted and reorganized.
[0005] As a preferred embodiment of the liquid metal battery sorting index prediction method of the present invention, the step of sorting and classifying the liquid metal battery to be tested based on the predicted capacity includes: If the predicted battery capacity is less than the preset capacity threshold, the current battery is determined to be a defective battery; if the predicted battery capacity is not less than the preset capacity threshold, the current battery is determined to be a qualified battery. Based on the battery classification results, the classification accuracy and recall rate are calculated, and the accuracy and recall rate are used as evaluation indicators of sorting performance to reclassify and reorganize the batteries.
[0006] As a preferred embodiment of the liquid metal battery sorting index prediction method of the present invention, a capacity prediction integrated model is constructed based on the optimized target basic model, the activation period characteristic data of the liquid metal battery to be tested are input into the integrated model, and the output predicted capacity includes: Based on the optimized target base model, the final prediction model is constructed using a stacked ensemble algorithm to predict the input features and obtain the base prediction results. The basic prediction results are used to construct a meta-feature vector, which is then input into the top-level ridge regression meta-model; the output of the ridge regression meta-model is the final prediction capacity.
[0007] As a preferred embodiment of the liquid metal battery sorting index prediction method of the present invention, the target basic model is trained with the optimized feature subset, and the hyperparameters of the target basic model are optimized with root mean square error and root mean square percentage error as indicators, including: the target basic model includes a support vector regression model, a random forest regression model and an extreme gradient boosting model. Using the optimized feature subset as input, the support vector regression model, random forest regression model, and extreme gradient boosting model are trained respectively. For each base model, candidate hyperparameter combinations are traversed within a preset hyperparameter search space. For the support vector regression model, the penalty parameter and kernel function-related parameters are optimized. For the random forest regression model, the number of base learners, the maximum depth of the tree, the size of the feature subset used in each split, and the minimum number of samples in the leaf node are optimized. For the extreme gradient boosting model, the learning rate, the maximum depth of the regression tree, the number of sub-models, and the regularization parameter are optimized. Under each set of hyperparameter configurations, the model is fitted using a training subset, and the prediction error is calculated on the validation subset. The prediction error is characterized by both root mean square error and root mean square percentage error. The parameter combination with the minimum validation error is taken as the optimal hyperparameter configuration for the target base model.
[0008] As a preferred embodiment of the liquid metal battery sorting index prediction method of the present invention, the method includes: performing multi-criteria scoring on each feature in the original feature space, which includes: For each feature, calculate its Pearson correlation coefficient and mutual information value with the target variable, as well as the feature importance score based on the Lasso regression model and the feature importance score based on the extreme random tree model; then combine the four scores into a comprehensive score by weighted summation.
[0009] As a preferred embodiment of the liquid metal battery sorting index prediction method of the present invention, the original feature space is constructed by extracting original feature parameters based on the cyclic data, including: extracting a set of feature parameters including coulombic efficiency, starting voltage, ending voltage, discharge voltage, ohmic internal resistance, DC internal resistance, and plateau arrival time. The original feature space is defined as follows: in, For the first There are 1 original feature variables, and , The number of original features, This represents the original feature space.
[0010] As a preferred embodiment of the liquid metal battery sorting index prediction method described in this invention, the ridge regression model further includes the weight vector and bias term of the ridge regression model, which are determined by minimizing the following loss function on the training set: in, For regularization parameters, To minimize the loss function, For the first The true size of each sample To improve the predictive capacity of the ensemble model, For the weight vector, This represents the total number of training samples.
[0011] Secondly, the present invention provides a liquid metal battery sorting index prediction system, comprising: The data acquisition module is used to collect cycle data during the activation period of liquid metal batteries, and extract original feature parameters based on the cycle data to construct the original feature space; The multi-criteria feature selection module is used to score each feature in the original feature space using multiple criteria, obtain the comprehensive score of each feature by weighted summation, and select the top five features with the highest comprehensive scores to form an optimized feature subset. An optimization module is used to train a target base model with the optimized feature subset and optimize the hyperparameters of the target base model using root mean square error and root mean square percentage error as indicators. The capacity prediction integrated model construction module is used to construct a capacity prediction integrated model based on the optimized target basic model, input the activation period characteristic data of the liquid metal battery to be tested into the integrated model, and output the predicted capacity. The battery sorting and reorganization module is used to sort and reorganize the liquid metal batteries to be tested based on the predicted capacity.
[0012] Thirdly, the present invention provides an electronic device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the liquid metal battery sorting index prediction method.
[0013] Fourthly, the present invention provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the liquid metal battery sorting index prediction method.
[0014] Compared with existing technologies, the advantages of this invention are as follows: By integrating multiple basic learning models, this invention fully leverages the advantages of each model in feature representation, nonlinear fitting, and noise suppression, enabling high-precision prediction of key sorting indicators. Furthermore, to address the complex coupling relationships between the multidimensional features of liquid metal batteries, this invention can retain key feature information while reducing dimensionality, thereby improving the stability and generalization ability of the integrated model. This invention not only effectively utilizes the large amount of time-series data generated during the activation period of liquid metal batteries but also maintains high prediction consistency across different batches and operating conditions. By introducing an integrated learning framework and feature selection mechanism, the prediction accuracy of sorting indicators for liquid metal batteries is significantly improved, providing technical support for subsequent battery consistency evaluation, performance optimization, and large-scale automated sorting. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments 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 these drawings without creative effort. Wherein: Figure 1 This is a schematic flowchart of a method for predicting sorting indicators of liquid metal batteries according to an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the stacking and integration process of a liquid metal battery sorting index prediction method according to an embodiment of the present invention. Figure 3This is a schematic diagram of the hyperparameter optimization process of a model for predicting sorting indicators of liquid metal batteries according to an embodiment of the present invention. Figure 4 This is a performance comparison chart of a liquid metal battery sorting index prediction method according to an embodiment of the present invention, showing models with and without feature selection. Figure 4 (a) in the figure is a comparison of model validation scores before and after feature selection. Figure 4 (b) in the figure is a comparison chart of test set scores before and after feature selection; Figure 4 (c) in the figure is a comparison of the reliability of the test set model before and after feature selection; Figure 5 This is an absolute error distribution diagram of the basic model, ensemble model, and control group neural network of a liquid metal battery sorting index prediction method according to an embodiment of the present invention on each sample of the test set. Detailed Implementation
[0016] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0017] Example 1, referring to Figure 1 As one embodiment of the present invention, this embodiment provides a method for predicting sorting indicators of liquid metal batteries, including: S100: Collects cycle data during the activation period of liquid metal batteries, and extracts original feature parameters based on the cycle data to construct the original feature space; S200: For each feature in the original feature space, perform multi-criteria scoring, obtain the comprehensive score of each feature by weighted summation, and select the top five features with the highest comprehensive scores to form an optimized feature subset; S300: Train the target base model with an optimized feature subset, and optimize the hyperparameters of the target base model with root mean square error and root mean square percentage error as indicators; S400: Based on the optimized target basic model, a capacity prediction ensemble model is constructed. The activation period characteristic data of the liquid metal battery under test are input into the ensemble model, and the predicted capacity is output. S500: Sort and reorganize the liquid metal batteries under test based on the predicted capacity.
[0018] It should be noted that, given the high volatility and complex parameter correlations of liquid metal batteries during their activation period, a novel sorting method that balances model stability and prediction accuracy is urgently needed. To address this, an ensemble learning-based method for predicting sorting indicators for liquid metal batteries is designed. This method can directly utilize the volatile activation period data of liquid metal batteries for sorting, achieving high-precision and high-reliability prediction of sorting indicators.
[0019] In this embodiment of the invention, step S100, which involves extracting original feature parameters based on cyclic data and constructing an original feature space, includes: extracting a set of feature parameters including coulombic efficiency, starting voltage, ending voltage, discharge voltage, ohmic internal resistance, DC internal resistance, and the time interval for reaching the platform. The original feature space is defined as follows: in, For the first There are 1 original feature variables, and , The number of original features, This represents the original feature space.
[0020] It should be noted that, to improve the model's generalization performance and computational efficiency, a feature selection method based on multi-criteria scoring is adopted. The comprehensive score of each feature is a weighted sum of the results calculated from four independent indicators.
[0021] In this embodiment of the invention, step S200, which involves performing multi-criteria scoring on each feature in the original feature space, includes: For each feature, calculate its Pearson correlation coefficient and mutual information value with the target variable, as well as the feature importance score based on the Lasso regression model and the feature importance score based on the extreme random tree model; then combine the four scores into a comprehensive score through a weighted summation.
[0022] Specifically, the overall score Represented as: in, The correlation coefficient is scored to measure the first... The degree of linear correlation between a feature and the prediction target is obtained by calculating the Pearson correlation coefficient between the feature and the target variable and normalizing its absolute value. Mutual information scoring is used to characterize the non-linear dependency between features and the prediction target. It is obtained by calculating the mutual information between feature variables and target variables and then normalizing it. The feature importance score based on the Lasso regression model is obtained by fitting the Lasso model on the training set, using the absolute value of the regression coefficient corresponding to each feature to represent its importance, and then normalizing it. The feature importance score based on the extreme random tree model is obtained by normalizing the average contribution of statistical features to the decrease of the objective function (such as variance or mean squared error) during the random tree splitting process. The weight coefficients for each evaluation indicator are used to balance the influence of different characteristic evaluation criteria on the comprehensive score, and satisfy the non-negativity constraint.
[0023] Specifically, the correlation coefficient is calculated as follows: Among them, among them, Represents the characteristic variable to be evaluated. Indicates the target variable to be predicted. Represents random variables and The covariance between them is used to measure the trend of their linear correlation. and Representing random variables respectively and The variance is used to characterize the degree of dispersion of the data; The Pearson correlation coefficient has a range of values of 100. The larger the absolute value, the stronger the linear correlation between the feature variable and the target variable.
[0024] Mutual information calculation is represented as: in, Represents the characteristic variable to be evaluated. Indicates the target variable for prediction; Represents random variables Information entropy, used to characterize variables Uncertainty; Indicates that in the case of a known random variable random variables under certain conditions Conditional entropy; Represents random variables and Mutual information between them is used to measure the statistical dependency between them; Represents random variables and Values and Joint probability distribution at time; and Representing random variables respectively and Marginal probability distribution; the summation symbol represents the summation of random variables. and Iterate through all possible combinations of values.
[0025] Furthermore, by normalizing the scores and selecting the top five features, an optimized feature subset is obtained: These include the termination voltage, coulombic efficiency, discharge voltage, ohmic internal resistance, and DC internal resistance.
[0026] It should be noted that after completing the multi-criteria feature selection, the training and hyperparameter optimization processes of all basic learners are based on the optimized feature subset, thereby improving the generalization performance and training stability of the model while reducing the feature dimensionality.
[0027] In this embodiment of the invention, step S300 involves training the target base model with an optimized feature subset and optimizing the hyperparameters of the target base model with root mean square error and root mean square percentage error as indicators. The target base model includes a support vector regression model, a random forest regression model, and an extreme gradient boosting model. The optimized feature subset was used as input to train the support vector regression model, the random forest regression model, and the extreme gradient boosting model, respectively. For each base model, candidate hyperparameter combinations are traversed within the predefined hyperparameter search space. For the support vector regression model, the penalty parameter and kernel function-related parameters are optimized. For the random forest regression model, the number of base learners, the maximum depth of the tree, the size of the feature subset used in each split, and the minimum number of samples in the leaf node are optimized. For the extreme gradient boosting model, the learning rate, the maximum depth of the regression tree, the number of sub-models, and the regularization parameter are optimized. For each set of hyperparameter configurations, the model is fitted using the training subset, and the prediction error is calculated on the validation subset. The prediction error is characterized by the root mean square error and the root mean square percentage error. The parameter combination with the minimum validation error is taken as the optimal hyperparameter configuration for the target base model.
[0028] In one feasible approach, for each base model, three-fold cross-validation is used to search and optimize its key hyperparameters, ensuring full utilization of training samples while evaluating the model's generalization ability on unseen data; under each set of candidate hyperparameter configurations, the model is fitted on the training subset and the prediction error is calculated on the validation subset; finally, the parameter combination with the smallest validation error is selected as the optimal hyperparameter configuration for the model.
[0029] Specifically, support vector regression is a widely used machine learning model. For indivual Dimensional Data 𝑖 The goal of support vector regression is to find a function This makes all training data With actual goals Deviation at ε Within. The function expression is: in, Is with The weighting coefficients of the multiplication, It is the bias value.
[0030] Furthermore, during the training of the support vector regression model, the optimized feature subset is used as input, with a focus on optimizing the penalty parameters and kernel function-related parameters. Triple-fold cross-validation is used to evaluate the prediction error of the model under different parameter combinations, and the parameter configuration with the smallest error on the validation set is selected for the final training of the support vector regression model.
[0031] Specifically, the random forest regression algorithm generates a series of different regression decision trees and averages the predictions to obtain the final prediction. During the training of the random forest regression model, the model complexity and generalization ability are controlled by adjusting parameters such as the number of base learners, the maximum tree depth, the size of the feature subset, and the minimum number of samples per leaf node. Each parameter combination is evaluated using a three-fold cross-validation framework, and the validation set error is used as the evaluation criterion. The parameter configuration with the best performance is selected to construct the final random forest model.
[0032] Specifically, the extreme gradient boosting model employs a greedy algorithm that includes several sub-models. During training, each sub-model fits the residual predicted by the previous model, thereby achieving a relatively good overall fitting effect.
[0033] Furthermore, regarding indivual Dimensional Data 𝑖 The algorithm establishes A regression tree is used to fit the actual target. The fitted expression is: in, Φ boost In the extreme gradient boosting model, 𝑥 𝑖 arrive The mapping, each Each represents an independent tree structure.
[0034] Furthermore, for the extreme gradient boosting model, the training process focuses on optimizing the learning rate, regression tree depth, number of sub-models, and regularization-related parameters. A three-fold cross-validation approach is employed, training the model under different parameter configurations and calculating the validation error. By progressively comparing different parameter combinations, the optimal combination that minimizes the validation error is determined, resulting in the best-performing extreme gradient boosting base model.
[0035] In the hyperparameter optimization process, three-fold cross-validation was used, with root mean square error (RMSE) and root mean square percentage error (RMSPE) as evaluation metrics. in, Indicates the number of samples. Indicates the first The actual measured value corresponding to each sample The model represents the first The predicted value for each sample.
[0036] in, Indicates the number of samples. Indicates the first The actual sorting index value corresponding to each sample The model represents the first The predicted sorting index value for each sample.
[0037] It should be noted that the parameter combination with the smallest validation error is selected as the optimal hyperparameter. RMSE and RMSPE, as evaluation metrics in the hyperparameter optimization stage, are used to quantitatively measure the prediction error level of the model on the validation set, thereby guiding the selection of the optimal hyperparameter configuration.
[0038] In this embodiment of the invention, step S400 involves constructing a capacity prediction ensemble model based on the optimized target base model, inputting the activation period characteristic data of the liquid metal battery under test into the ensemble model, and outputting the predicted capacity, including: Based on the optimized target base model, the final prediction model is constructed using a stacked ensemble algorithm to predict the input features and obtain the base prediction results. The basic prediction results are used to construct a meta-feature vector, which is then input into the top-level ridge regression meta-model; the output of the ridge regression meta-model is the final prediction capacity.
[0039] Furthermore, based on the optimized base model, a stacked ensemble algorithm is used to construct the final prediction model; the output function of the ensemble layer is defined as: in, This represents the final prediction result output by the stacked ensemble model. , and These represent the prediction outputs of the support vector regression model, the random forest regression model, and the extreme gradient boosting model for the same input sample, respectively.
[0040] Furthermore, the stacked ensemble model uses the prediction results of multiple base models as input features and achieves the fusion and correction of the prediction results of each base model through a secondary learner.
[0041] in, The top ridge regression model is expressed as follows: in, The weight vector of the ridge regression model is used to characterize the contribution of the prediction results of each base model to the integration process; The bias term is used; the input vector consists of the prediction outputs of each basic model, and the output is the predicted value of the final sorting index.
[0042] In this embodiment of the invention, step S400 of the ridge regression model further includes: the weight vector and bias term of the ridge regression model, which are determined by minimizing the following loss function on the training set: in, For regularization parameters, To minimize the loss function, For the first The true size of each sample To improve the predictive capacity of the ensemble model, For the weight vector, This represents the total number of training samples.
[0043] It should be noted that, in this embodiment of the invention, the stacked ensemble algorithm serves as a model fusion layer, used to uniformly model the prediction results of multiple optimized base models. Specifically, firstly, support vector regression, random forest regression, and extreme gradient boosting models are used to predict the same input sample, obtaining multiple base prediction results. Subsequently, the prediction outputs of the aforementioned base models are used to construct a new feature vector, which serves as the input to the top-level learner. The prediction results of each base model are then weighted and fused using a ridge regression model to obtain the final sorting index prediction result. By introducing a regularization term to constrain the weight vector, excessive dependence of the top-level model on a single base model can be avoided, improving the stability and generalization ability of the ensemble model under conditions of small samples and noisy data.
[0044] In this embodiment of the invention, step S500, which involves sorting and reorganizing the liquid metal battery under test based on its predicted capacity, includes: If the predicted battery capacity is less than the preset capacity threshold, the current battery is determined to be a defective battery; if the predicted battery capacity is not less than the preset capacity threshold, the current battery is determined to be a qualified battery. Based on the battery classification results, the classification accuracy and recall rate are calculated, and the accuracy and recall rate are used as evaluation indicators of sorting performance to reclassify and reorganize the batteries.
[0045] It should be noted that, in this embodiment of the invention, the preset capacity threshold can be set to 48. .
[0046] Specifically, using threshold The criteria for judgment are as follows: To evaluate the performance of this predictive method when applied to battery classification and reorganization, several evaluation metrics for classification are introduced, including accuracy and recall, expressed as follows: in, TP This indicates that a battery that was originally defective was correctly predicted to be defective. TN This indicates that the battery itself was qualified but was correctly predicted to be qualified. FN This indicates that batteries that were actually substandard were mistakenly identified as qualified. ALL This represents the total number of samples that are actually defective batteries.
[0047] The higher the accuracy and recall of a battery sorting method, the better its sorting effect.
[0048] It should be noted that, based on the classification results, the liquid metal battery samples to be sorted were grouped according to the comparison between the predicted capacity and the threshold. Specifically, when the predicted capacity... When the predicted capacity is reached, the corresponding battery will be classified into a qualified battery pack; when the predicted capacity is reached... If the battery is not found to be in the correct configuration, it will be classified as an unqualified battery pack.
[0049] For batteries in qualified battery packs, further capacity matching and combination can be carried out based on their predicted capacity levels for subsequent battery module or battery system reorganization, so as to improve the consistency and reliability of the reorganized system. For batteries in unqualified battery packs, they can be removed, downgraded or recycled to avoid batteries with large performance differences from entering the same reorganization unit.
[0050] This invention achieves automated sorting and recombination of liquid metal batteries based on predictive indicators through a grouping and recombination process.
[0051] The above is an illustrative scheme of a liquid metal battery sorting index prediction method according to this embodiment. It should be noted that the technical solution of this liquid metal battery sorting index prediction system belongs to the same concept as the technical solution of the liquid metal battery sorting index prediction method described above. Details not described in detail in the technical solution of the liquid metal battery sorting index prediction system in this embodiment can be found in the description of the technical solution of the liquid metal battery sorting index prediction method described above.
[0052] This embodiment provides a liquid metal battery sorting index prediction system, comprising: The data acquisition module is used to collect cycle data during the activation period of liquid metal batteries, and extract original feature parameters based on the cycle data to construct the original feature space; The multi-criteria feature selection module is used to score each feature in the original feature space using multiple criteria, obtain the comprehensive score of each feature by weighted summation, and select the top five features with the highest comprehensive scores to form an optimized feature subset. The optimization module is used to train the target base model with an optimized feature subset and optimize the hyperparameters of the target base model with root mean square error and root mean square percentage error as indicators. The capacity prediction integrated model construction module is used to build a capacity prediction integrated model based on the optimized target basic model. It inputs the activation period characteristic data of the liquid metal battery under test into the integrated model and outputs the predicted capacity. The battery sorting and reorganization module is used to sort and reorganize the liquid metal batteries under test based on the predicted capacity.
[0053] This embodiment also provides an electronic device applicable to the liquid metal battery sorting index prediction method, including: The system includes a memory and a processor. The memory stores computer-executable instructions, and the processor executes these instructions to implement the liquid metal battery sorting index prediction method proposed in the above embodiments.
[0054] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the method for predicting sorting indicators of liquid metal batteries as proposed in the above embodiments.
[0055] The storage medium proposed in this embodiment and the method for predicting sorting indicators of liquid metal batteries proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0056] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0057] Example 2, refer to Figures 2-5 This is one embodiment of the present invention. This embodiment verifies the beneficial effects of the present invention through comparative experiments.
[0058] In this embodiment, according to Figure 2 The process described is as follows: Activation period cycle data is collected, and candidate features such as termination voltage, coulombic efficiency, discharge voltage, ohmic internal resistance, and DC internal resistance are normalized and cleaned. Correlation coefficients, mutual information, and Lasso / ExtraTrees quantification indices are calculated sequentially, and combined with sequential forward selection to form a comprehensive score. The best 5-dimensional features are selected, as shown in Table 1. Table 1 Feature selection scoring results of liquid metal battery data features
[0059] Reference Figure 3 The optimal hyperparameters were determined by training SVR, RF, and XGBoost respectively using three-fold cross-validation / grid search, as shown in Table 2. Table 2 Optimal hyperparameter values and model validation scores for each basic model
[0060] Take the average of the outputs of the three models above; in, The number of base models participating in the integration. For the first The ensemble prediction results for each sample The first The sample is in the 1st, 2nd, ..., 3rd Predicted outputs based on a base model; The outputs of the three models are used to construct new features, which are then input into the top-level ridge regression to obtain the final prediction. Generalization was evaluated using RMSE and RMSPE; a capacity threshold was used. A binary classification was implemented, and the Accuracy / Recall ratio was used for classification and reorganization, as shown in Table 3: Table 3. Classification and reorganization results of the entire dataset.
[0061] Preferably, based on the four-dimensional scoring mechanism in Table 1, five effective features are ultimately selected; by Figure 4 The comparison shows that, regardless of validation score, test score, or reliability, the entire process using feature selection significantly outperforms the process without feature selection, demonstrating the effectiveness and robustness of this scoring criterion in small-sample, high-dimensional scenarios. Furthermore, refer to... Figure 3 For XGBoost (learning rate, maximum depth, number of sub-models, Gamma), SVR ( , Random forest (number of base learners, maximum number of features, maximum depth, minimum number of samples in leaf nodes) is searched grid by grid; its optimal configuration is shown in Table 2.
[0062] The horizontal comparison using RMSE as the validation metric is shown in Table 4. It indicates that stacked ensemble has the best overall performance; voting ensemble outperforms SVR and random forest, but is lower than the best validation score of XGBoost single model.
[0063] Table 4 Model validation scores for the base model and ensemble model
[0064] On the independent test set, the stacked ensemble achieved RMSE=0.2278Ah and RMSPE=0.4556%, significantly outperforming the base models and neural network comparisons. Figure 5 As can be seen, the absolute error of most samples is within ±0.75Ah; comprehensive failure statistics show that the stacked integration failed 2 times (2.38%), corresponding to a reliability of 97.42%, which is significantly better than the neural network control (89.29%). On the data of three external 50Ah batteries, the stacked model has RMSE=0.3206Ah and RMSPE=0.6412%, demonstrating good cross-cell generalization ability.
[0065] Finally, with Binary classification is performed based on the threshold; a confusion matrix is generated based on the predicted capacity of the stacking model. The overall accuracy is 96.62% and the recall is 93.18%. Most samples fall on the main diagonal (TN / TP), and there are very few false positives, which meets the accuracy and stability requirements of engineering sorting.
[0066] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for predicting sorting indicators of liquid metal batteries, characterized in that, include: Collect cycle data of liquid metal batteries during the activation period, and extract original feature parameters based on the cycle data to construct the original feature space; Each feature in the original feature space is scored using multiple criteria, and a comprehensive score for each feature is obtained by weighted summation. The top five features with the highest comprehensive scores are then selected to form an optimized feature subset. The target base model is trained using the optimized feature subset, and the hyperparameters of the target base model are optimized using root mean square error and root mean square percentage error as indicators. Based on the optimized target basic model, a capacity prediction integrated model is constructed. The activation period characteristic data of the liquid metal battery to be tested are input into the integrated model, and the predicted capacity is output. Based on the predicted capacity, the liquid metal batteries under test are sorted and reorganized.
2. The method for predicting sorting indicators of liquid metal batteries as described in claim 1, characterized in that, The sorting and reorganization of the liquid metal batteries under test based on the predicted capacity includes: If the predicted battery capacity is less than the preset capacity threshold, the current battery is determined to be a defective battery; if the predicted battery capacity is not less than the preset capacity threshold, the current battery is determined to be a qualified battery. Based on the battery classification results, the classification accuracy and recall rate are calculated, and the accuracy and recall rate are used as evaluation indicators of sorting performance to reclassify and reorganize the batteries.
3. The method for predicting sorting indicators of liquid metal batteries as described in claim 2, characterized in that, Based on the optimized target model, a capacity prediction ensemble model is constructed. The activation period characteristic data of the liquid metal battery under test are input into the ensemble model, and the predicted capacity is output, including: Based on the optimized target base model, the final prediction model is constructed using a stacked ensemble algorithm to predict the input features and obtain the base prediction results. The basic prediction results are used to construct a meta-feature vector, which is then input into the top-level ridge regression meta-model; the output of the ridge regression meta-model is the final prediction capacity.
4. The method for predicting sorting indicators of liquid metal batteries as described in claim 3, characterized in that, The target base model is trained using the optimized feature subset, and the hyperparameters of the target base model are optimized using root mean square error and root mean square percentage error as indicators. The target base model includes a support vector regression model, a random forest regression model, and an extreme gradient boosting model. Using the optimized feature subset as input, the support vector regression model, random forest regression model, and extreme gradient boosting model are trained respectively. For each base model, candidate hyperparameter combinations are traversed within a preset hyperparameter search space. For the support vector regression model, the penalty parameter and kernel function-related parameters are optimized. For the random forest regression model, the number of base learners, the maximum depth of the tree, the size of the feature subset used in each split, and the minimum number of samples in the leaf node are optimized. For the extreme gradient boosting model, the learning rate, the maximum depth of the regression tree, the number of sub-models, and the regularization parameter are optimized. Under each set of hyperparameter configurations, the model is fitted using a training subset, and the prediction error is calculated on the validation subset. The prediction error is characterized by both root mean square error and root mean square percentage error. The parameter combination with the minimum validation error is taken as the optimal hyperparameter configuration for the target base model.
5. The method for predicting sorting indicators of liquid metal batteries as described in claim 4, characterized in that, Multi-criteria scoring for each feature in the original feature space includes: For each feature, calculate its Pearson correlation coefficient and mutual information value with the target variable, as well as the feature importance score based on the Lasso regression model and the feature importance score based on the extreme random tree model; then combine the four scores into a comprehensive score by weighted summation.
6. The method for predicting sorting indicators of liquid metal batteries as described in claim 5, characterized in that, Based on the aforementioned cyclic data, original feature parameters are extracted, and an original feature space is constructed. This includes extracting a set of feature parameters, including coulombic efficiency, starting voltage, ending voltage, discharge voltage, ohmic internal resistance, DC internal resistance, and the time interval for reaching the platform. The original feature space is defined as follows: in, For the first There are 1 original feature variables, and , The number of original features, This represents the original feature space.
7. The method for predicting sorting indicators of liquid metal batteries as described in claim 3 or 6, characterized in that, The ridge regressor model also includes: the weight vector and bias term of the ridge regressor model, which are determined by minimizing the following loss function on the training set: in, For regularization parameters, To minimize the loss function, For the first The true size of a sample To improve the predictive capacity of the ensemble model, For the weight vector, This represents the total number of training samples.
8. A liquid metal battery sorting index prediction system, applied to the method described in any one of claims 1-7, characterized in that, include: The data acquisition module is used to collect cycle data during the activation period of liquid metal batteries, and extract original feature parameters based on the cycle data to construct the original feature space; The multi-criteria feature selection module is used to score each feature in the original feature space using multiple criteria, obtain the comprehensive score of each feature by weighted summation, and select the top five features with the highest comprehensive scores to form an optimized feature subset. An optimization module is used to train a target base model with the optimized feature subset and optimize the hyperparameters of the target base model using root mean square error and root mean square percentage error as indicators. The capacity prediction integrated model construction module is used to construct a capacity prediction integrated model based on the optimized target basic model, input the activation period characteristic data of the liquid metal battery to be tested into the integrated model, and output the predicted capacity. The battery sorting and reorganization module is used to sort and reorganize the liquid metal batteries to be tested based on the predicted capacity.
9. An electronic device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the liquid metal battery sorting index prediction method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the liquid metal battery sorting index prediction method according to any one of claims 1 to 7.