A method for predicting the compressive strength of anode carbon blocks

Through improved ant nesting optimization algorithm and non-uniform sampling transformation processing, the LANA-LSTM model was constructed, which solved the problem of insufficient overfitting and generalization capabilities of the LSTM network in the compression strength prediction of anode carbon blocks, and achieved higher prediction accuracy and robustness. It is suitable for the quality control and process optimization of anode carbon blocks in the electrolytic aluminum industry.

CN120108608BActive Publication Date: 2025-08-01JINAN LONGSHAN CARBON
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510591941.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-08-01
Estimated Expiration
2045-05-09

AI Technical Summary

Technical Problem

The existing LSTM and BP neural networks are prone to overfitting in the compression strength prediction of anode carbon blocks, lack generalization ability, and cannot adapt to changes in different batches, production lines or raw materials. The optimization accuracy of the ant nesting optimization algorithm is insufficient, resulting in unsatisfactory prediction results.

Method used

The improved ant nesting optimization algorithm (LANA algorithm) is used to optimize the traditional LSTM network. By introducing non-uniform sampling transformation and resampling processing, combining timing modeling and nonlinear spiral search strategies, the LANA-LSTM model is built, and the number of LSTM units L and learning rate factor α are optimized to improve prediction accuracy and generalization ability.

Benefits of technology

It significantly improves the accuracy and robustness of the compression strength prediction of the anode carbon block, can better cope with different process conditions and raw material fluctuations, and improves the real-time response characteristics of the model and the reliability of industrial applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120108608B_ABST
    Figure CN120108608B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of data prediction, and specifically to a method for predicting the compressive strength of anode carbon blocks, including: S1. Collecting the original core dynamic characteristic data of anode carbon blocks at each time stage to construct a multi-dimensional feature data set; S2. Unifying and outputting the first data set through time series reconstruction; dividing the first data set according to the roasting and cooling process stages; S3. Performing non-uniform sampling transformation processing on the multi-dimensional data of each process stage, resampling each processed stage, and splicing them in time series to obtain a second data set; the second data set is divided into a prediction set and a training set; S4. Inputting the training set into the anode carbon block compressive strength prediction model to train the model and fit the data; S5. Inputting the prediction set into the trained anode carbon block compressive strength prediction model to predict the physical correlation and result of the anode carbon block compressive strength, and outputting the anode carbon block compressive strength value to realize the quality control of anode carbon blocks in industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data prediction, and particularly relates to a method for predicting the compressive strength of anode carbon blocks. Background Art

[0002] In the process of electrolytic aluminum production, anode carbon blocks are key consumables in electrolytic cells, and their performance has a significant impact on indicators such as current efficiency, electrolytic life, energy consumption, and environmental emissions. Among them, compressive strength, as an important indicator to measure the structural integrity and mechanical properties of anode carbon blocks, is directly related to their use stability in high-temperature and high-load environments. Therefore, achieving accurate prediction and intelligent evaluation of the compressive strength of anode carbon blocks is of great significance for improving product consistency, reducing defect rates, and optimizing production costs.

[0003] For the prediction of the compressive strength of anode carbon blocks, currently, mainly neural networks such as LSTM and BP are used to construct prediction models. These models are prone to overfitting during training, especially when the training data is limited or the noise is large. This reduces the generalization ability of the model and makes it unable to adapt well to changes in different batches, different production lines, or different raw materials. LSTM and BP and other neural networks mainly process single-modal data. For the prediction of the compressive strength of anode carbon blocks, in addition to production parameters, the influence of various information such as environmental factors should also be considered. Secondly, in addition to material use, the factors that are not easily controlled in determining the compressive strength of anode carbon blocks mainly focus on the roasting and cooling process stages. Currently, there are few prediction methods for these two stages.

[0004] The Ant Nesting Optimization Algorithm (ANA) constructs a mathematical optimization model by simulating the behavior of ant colonies searching for the optimal placement position when building nests. Its optimization mathematical model only includes search strategies. By simulating three different ways to construct a position change rate model, the position of the agent individual is updated through the position variable rate Using the ANA algorithm to optimize the parameters of the LSTM network of the anode carbon block compressive strength prediction model can improve the optimization speed of the parameters of the LSTM network. However, the search strategy lacks control of the optimization accuracy, resulting in being easily trapped in local optima during the optimization process, affecting the parameter accuracy and leading to unsatisfactory prediction results. Summary of the Invention

[0005] A method for predicting the compressive strength of anode carbon blocks proposed by the present invention is applicable to the scenarios of anode carbon block quality control and process optimization in the electrolytic aluminum industry. The method of the present invention is a method for predicting the compressive strength of anode carbon blocks that faces the actual process flow, integrates multi-source process data, and has the ability of time-series modeling, so as to achieve higher prediction accuracy, better generalization ability, and stronger real-time response characteristics, thereby providing an intelligent quality assessment means for electrolytic aluminum anode manufacturing and improving the process control level and product stability.

[0006] The present invention proposes a method for predicting the compressive strength of anode carbon blocks, which makes full use of multi-dimensional characteristic parameters collected during the baking and cooling process stages of anode carbon blocks, and optimizes the traditional LSTM prediction network through an improved ant nest optimization algorithm (LANA algorithm) to construct a prediction model for the compressive strength of anode carbon blocks based on LANA-LSTM, improving the physical relevance and discrimination ability of compressive strength prediction. The specific steps are as follows:

[0007] S1. Collect the original core dynamic characteristic data of anode carbon blocks at each time stage and construct a multi-dimensional characteristic data set;

[0008] S2. Unify the above multi-dimensional characteristics through time series reconstruction and output the first data set; divide the first data set according to the baking and cooling process stages;

[0009] S3. Perform non-uniform sampling transformation processing on the multi-dimensional data of each process stage, resample each processed stage, and splice them in time series to obtain the second data set; the second data set is divided into a prediction set and a training set;

[0010] S4. The training set is input into the prediction model for the compressive strength of anode carbon blocks to train the model and fit the data. The prediction model for the compressive strength of anode carbon blocks is based on an enhanced LSTM prediction model, and the number of LSTM units L and the learning rate factor α of the traditional LSTM prediction network are optimized using an improved ant nest optimization algorithm; the improved ant nest optimization algorithm includes: introducing a historical path memory mechanism based on cognitive information increment and a dynamic memory guiding factor, and constructing a non-linear spiral search mechanism based on anti-moving angle and rotational perturbation to improve the position update strategy of the ant nest optimization algorithm;

[0011] S5. The prediction set is input into the trained prediction model for the compressive strength of anode carbon blocks to predict the physical relevance and results of the compressive strength of anode carbon blocks, and the compressive strength value of the anode carbon block is output.

[0012] Furthermore, the strength of anode carbon blocks is not only affected by a single process stage, but is the result of the coupled evolution of the whole process from forming to baking and then to cooling. The original process data of anode carbon blocks at each time stage is collected as input data, including the baking temperature, oxygen content, furnace body pressure value during the baking stage, and the cooling temperature value, total cooling time, and carbon block volume density during the cooling stage; the output data is the compressive strength of the anode carbon block. Laying out the process data according to time (i.e., simple time training data) lacks structure. The present invention arranges the multi-dimensional characteristic data in ascending order of time to construct the first data set, identifies the process stage boundaries based on time series, divides the prediction data set based on time series into baking and cooling process stage data sets, and then performs non-uniform sampling transformation on each stage according to its multi-dimensional characteristics, resamples each processed stage, and splices them in order to obtain the final data set; specifically:

[0013] S21. For the k-th process stage, at each time point , construct a physical disturbance intensity index. The higher the value of the physical disturbance intensity index, the more significant the impact of this time period on the evolution of the compressive strength of the anode carbon block. The mathematical model is:

[0014] ;

[0015] where is the physical disturbance intensity index at the t-th time point, is the weight at the t-th time point, is the baking temperature at the t-th time point, is the cooling temperature of the anode carbon block at the t-th time point, is the furnace body pressure value at the t-th time point, is the oxygen content at the t-th time point;

[0016] S22. Perform non-uniform sampling transformation, resample the data of each process stage, and the sampling probability is proportional to the PD intensity to construct a resampling probability sequence;

[0017] ;

[0018] where is the resampling probability at each time point t in the k-th stage, and its range is within [0, 1]. The denominator is the total PD of all time points in the current stage;

[0019] S23. For each stage, retain the multi-dimensional data of the time points where the resampling probability is greater than 0.5, otherwise discard the multi-dimensional data of this time point . Retain the multi-dimensional data of Q time points in each stage, then:

[0020] ;

[0021] where is the second data set, is the Q groups of data sets in the baking stage, is the Q groups of data sets in the cooling stage;

[0022] S24. Construct a second data set, combine the 3D data sets of Q groups in the baking stage, the 3D data sets of Q groups in the cooling stage, and the output data into a second data set with 7D features. The second data set includes Q groups of data, and each group of data includes the input baking temperature, oxygen content, furnace body pressure value, the cooling temperature value and total cooling time in the cooling stage, and the carbon block volume density; the output true anode carbon block compressive strength value data, a total of 7D data.

[0023] Furthermore, the physical disturbance intensity index is constructed by using 4 key features that most affect the compressive strength of the anode carbon block. The non-uniform sampling transformation process and resampling process convert the original process data of the anode carbon block at each time stage from the original equally-spaced sampling form into a structure-enhanced expression format, in which the important disturbance time periods within each stage are weighted and retained, and the non-critical change regions are removed; in the present invention, the second data set is a complete data set with high relevance and no missing data problem, which improves the information density of the input data, ensures the consistency of the input structure of the anode carbon block compressive strength prediction model, and facilitates the unified processing of the subsequent anode carbon block compressive strength prediction model.

[0024] Furthermore, the second data set divides the data into a test set and a training set according to a certain ratio, and the proportion of the training set is higher than that of the test set; among them, the training set is used for the training and parameter fitting of the anode carbon block compressive strength prediction model, and the parameters include the number of LSTM units L and the learning rate factor α. The data in the training set covers the entire process of the roasting and cooling process stages, ensuring the adaptability of the anode carbon block compressive strength prediction model in different process stages.

[0025] Furthermore, the test set is used to independently evaluate the generalization ability of the prediction model after the model training is completed. The test set and the training set do not overlap in terms of time period numbers and representatively cover the process of process feature changes of the anode carbon block in the forming, roasting, and cooling stages. During the test, the multi-dimensional process data sequence in the test set is used as the input and sent into the LSTM compressive strength prediction model optimized based on LANA. The predicted value output by the model is compared with the true compressive strength value in the test set, and then the prediction error index is calculated. When the error reaches the target value, the final predicted value of the anode carbon block compressive strength is output.

[0026] Furthermore, in the search strategy of the standard ant nest building optimization algorithm, the random movement of the ant population is simulated, but ants in nature do not just move randomly, but tend to walk on the routes they have walked before and the positions where they have succeeded; based on this, the standard ant nest building optimization algorithm is improved to construct a new mathematical model for updating the position of the agent individual (ant individual); specifically: a memory path set is introduced into each agent individual, and the memory path set is the best positions visited by the agent individual in the most recent n times.

[0027] ;

[0028] Among them, is the memory path set of the i-th agent individual, is the first position ever visited by the i-th agent individual, is the n-th position ever visited by the i-th agent individual;

[0029] Secondly, define the cognitive information increment, and construct a driving memory guiding factor through the cognitive information increment. The driving memory guiding factor The mathematical model is as follows:

[0030] ;

[0031] Among them, is the cognitive information increment. By calculating the cognitive metric between the memory set and the current position of the agent individual, the mathematical model is: ; is the memory difference value at the iter-th iteration, defined as the mean of the cognitive information increments of N agent individuals in the previous iteration, and λ is a parameter controlling the response intensity;

[0032] Finally, introduce the driving memory guiding factor to guide the agent individual to explore the area around the solution with the minimum fitness value again during the iteration, and construct an improved search strategy mathematical model. The mathematical model of the improved search strategy is:

[0033] ;

[0034] Among them, is the updated position of the i-th agent individual, is the position of the i-th agent individual at the current iteration, is the best position of the agent individuals in the current iteration population.

[0035] Furthermore, through the adaptive memory guiding and information increment mechanism, the LANA algorithm can search for the optimal parameter region more accurately, avoid over-exploring invalid regions, and improve the global search efficiency. In the anode carbon block compressive strength prediction model, this means that the optimization process can find the appropriate configuration of the number of LSTM units L and the learning rate factor α faster, reducing the time and computational costs; at the same time, the memory path guiding mechanism helps the model make full use of historical training experience and avoid overfitting problems during training; finally, through dynamically adjusting the memory guiding factor, the information increment mechanism strengthens the learning ability of the model, and the LANA algorithm can adaptively adjust its search strategy, which enables the model to be more flexible in adjusting and adapting when facing different types of data; for the anode carbon block compressive strength prediction model, this means that it can better handle data fluctuations at different process stages and different time points, improving the overall prediction performance.

[0036] Furthermore, the search strategy of the standard ant nest building optimization algorithm is determined by the ant colony placement weight The decision is made based on the current and historical positions and the tendency change of fitness calculation, so that the position of the agent individual shrinks along a straight line toward the target; the present invention proposes a nonlinear spiral migration search strategy driven by orbital perturbation, which geometrically maps the search process of the standard ant nesting optimization algorithm into a set of nonlinear ant circle orbits. Each agent individual will not simply shrink along a straight line toward the target, but will advance in a roundabout way by simulating the "vortex circle formed by the ant colony around the queen ant", so that the agent individual will "spiral centripetal motion" around the global optimal position, thereby enhancing the search diversity and improving the global escape ability; wherein, in the ant nesting optimization algorithm, the position of the ant individual is recorded as the agent individual position, and the position of the queen ant, i.e., the core position, is recorded as the global optimal position; the mathematical model is:

[0037] ;

[0038] in, is the updated position of the i-th agent, is the position of the i-th agent in the current iteration, is the dynamic scaling factor for the iter-th iteration, is the perturbation angle of the i-th agent in the iter-th iteration, is the two-dimensional rotation matrix generated in the current search plane, used for the spiral perturbation direction, is the unit disturbance direction, and the mathematical model is: ; Among them, the disturbance angle is not purely random, but historical tendency and population synergy are introduced as disturbance weights. The mathematical model is:

[0039] ;

[0040] in, is the basic perturbation angle; is the fitness value of the position of the i-th agent in the current iteration, is the fitness value of the position of the i-th agent individual at the iter-1th iteration, rand is the phase offset unique to the individual, which is used to increase the heterogeneity of the solution and takes a random number between 0 and 1.

[0041] Furthermore, the multi-dimensional search strategy, dynamic weight factor adjustment, and historical experience re-exploration mechanism introduced by the orbital perturbation-driven nonlinear spiral migration search strategy can accelerate the convergence process, shorten the model training time, and more quickly find suitable parameter settings in different search spaces, thereby improving model training efficiency.

[0042] Furthermore, the improved ant nest building optimization algorithm is used to optimize the number of LSTM units L and the learning rate factor α of the traditional LSTM prediction network. Through the adaptively adjusted number of LSTM units L and the learning rate factor α, the LSTM prediction network processes the multi-dimensional feature data of anode carbon blocks more precisely. To optimize the number of LSTM units L and the learning rate factor α using the improved ant nest building optimization algorithm, it is necessary to map the positions of the agent individuals (ant individuals) of the LANA algorithm to the values of the number of LSTM units L and the learning rate factor α. Each agent individual position is in the form of a two-dimensional space vector, and the two dimensions respectively correspond to the number of LSTM units L and the learning rate factor α. The mathematical model is: ; By updating the positions of the agent individuals, the values of the number of LSTM units L and the learning rate factor α are updated. The current prediction result is calculated through the fitness function. The fitness function is a feedback model. The improved ant nest building optimization algorithm updates the positions of the agent individuals according to the fitness function and guides until the total number of iterations is reached. At this time, the positions of the agent individuals corresponding to the minimum fitness value are parsed to obtain the optimal values of the number of LSTM units L and the learning rate factor α.

[0043] Furthermore, the improved ant nest building optimization algorithm is used to optimize the number of LSTM units L and the learning rate factor α of the traditional LSTM prediction network. The specific steps are as follows:

[0044] S41. Determine the maximum population size N, the maximum number of iterations Tmax, the problem dimension, and the position range [lb, ub] of the agent individuals of the improved ant nest building optimization algorithm; Define each agent individual position as ;

[0045] S42. Initialize the positions of the agent individuals, use the parameters corresponding to each agent individual position to train the LSTM model for predicting the compressive strength of anode carbon blocks, and calculate the fitness value corresponding to each individual position through the fitness function. The smaller the fitness value, the better the agent individual position;

[0046] S43. Record the n positions with the smallest fitness values in the history of each agent individual itself to construct a memory path set ;

[0047] S44. Define the cognitive information increment, construct a driving memory guiding factor through the cognitive information increment, and guide the agent individuals to explore the area around the solution with the smallest fitness value again during the iteration through the driving memory guiding factor; Update the positions of the agent individuals through the improved search strategy;

[0048] S45. Update the positions of the agent individuals using the non-linear spiral migration search strategy driven by orbital perturbation;

[0049] S46. Calculate the fitness value corresponding to the updated agent individual position through the fitness function, and retain the individual position corresponding to the minimum fitness value of each agent individual. When an agent individual finds a better position during this iteration, then set the best position of this individual Insert into the set;

[0050] S47. Whether the current iteration number iter reaches the maximum iteration number Tmax. If so, output the combination of the number of LSTM units L and the learning rate factor α of the current global optimal agent individual; otherwise, return to execute S43 to update the memory path set and continue to optimize the LSTM prediction network.

[0051] Furthermore, reconstruct the LSTM network of the anode carbon block compressive strength prediction model with the combination of the number of LSTM units L and the learning rate factor α, and input the training set part of the second data set into the LSTM network of the reconstructed anode carbon block compressive strength prediction model for training. The training set includes an input data part and an output data part, where the output data is the anode carbon block compressive strength value, and evaluate the error between the predicted anode carbon block compressive strength value and the true anode carbon block compressive strength value output during the training process; after training is completed, input the test set to test the prediction accuracy of the anode carbon block compressive strength prediction model.

[0052] Compared with existing methods and technologies, the beneficial effects of the method proposed by the present invention are as follows: By introducing non-uniform sampling transformation processing and resampling data processing to test and improve the ant nest building optimization algorithm, the method of the present invention adaptively and collaboratively optimizes the structural parameters of the traditional LSTM network, which not only significantly improves the accuracy of anode carbon block compressive strength prediction, but also enhances the robustness and generalization ability of the model in the face of different process conditions and raw material fluctuations; compared with the existing LSTM methods with fixed structures or empirical settings, the present invention can more fully explore the key timing information in the roasting and cooling stages, realize structured, high-density, and physically relevant input data expression, and combine non-linear search strategies to improve the model optimization efficiency, showing stronger real-time performance, reliability and promotion value in industrial applications. Description of the Drawings

[0053] Figure 1 is a schematic flow chart of the anode carbon block compressive strength prediction method;

[0054] Figure 2 is a schematic flow chart of the construction of the second data set;

[0055] Figure 3 is a flow chart for optimizing the number of LSTM units L and the learning rate factor α of the traditional LSTM prediction network using the improved ant nest building optimization algorithm;

[0056] Figure 4It is a comparison graph of the fitness value changes during the model training process;

[0057] Figure 5 It is a comparison graph of the changes during the optimization process of the number of LSTM units L;

[0058] Figure 6 It is a comparison graph of the changes during the optimization process of the learning rate factor α;

[0059] Figure 7 It is a graph of the training model results;

[0060] Figure 8 It is a comparison graph of the prediction results of the compressive strength of the anode carbon block. Specific implementation manners

[0061] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0062] Based on this, an embodiment of the present invention provides a method for predicting the compressive strength of an anode carbon block; Figure 1 It is a schematic flowchart of the method for predicting the compressive strength of an anode carbon block. As Figure 1 shown, the method for predicting the compressive strength of an anode carbon block in the embodiment of the present invention includes the following steps: S1. Collect the original core dynamic feature data of the anode carbon block at each time stage, and construct a multi-dimensional feature dataset.

[0063] Specifically, the original process data of the anode carbon block collected at each time stage is used as input data, including the baking temperature, oxygen content, furnace body pressure value during the baking stage, and the cooling temperature value and total cooling time during the cooling stage, as well as the carbon block volume density; the output data is the compressive strength of the anode carbon block; collect the feature data at 100 time points in each of the baking stage and the cooling stage to construct a multi-dimensional feature dataset as the prediction dataset for the compressive strength of the anode carbon block, and organize it into an.xlsx table.

[0064] Further, S2. Unify the above multi-dimensional features through time series reconstruction and output a first dataset; divide the first dataset according to the roasting and cooling process stages.

[0065] Furthermore, S3. Perform non-uniform sampling transformation processing on the multi-dimensional data of each process stage, resample each processed stage, and splice them in time series to obtain a second dataset; the second dataset is divided into a prediction set and a training set.

[0066] Specifically, the multi-dimensional feature data is arranged in ascending order of time to construct the first data set. The process stage boundaries are identified based on the time series, and the time series-based prediction data set is divided into roasting and cooling process stage data sets. Then, non-uniform sampling transformation is performed on each stage according to its multi-dimensional features, and each processed stage is resampled and spliced in order to obtain the final data set. In the embodiment, k is the stage, the maximum value of k is 2, and the time points are t = 1, 2,..., 100. The specific implementation steps are as follows Figure 2 shown as:

[0067] S21. For the k-th process stage, at each time point , construct a physical disturbance intensity index. The higher the value of the physical disturbance intensity index, the more significant the influence of this time period on the evolution of the compressive strength of the anode carbon block. The mathematical model is:

[0068] ;

[0069] where is the physical disturbance intensity index at the t-th time point, is the weight at the t-th time point, is the baking temperature value at the t-th time point, is the cooling temperature value of the anode carbon block at the t-th time point, is the furnace body pressure value at the t-th time point, is the oxygen content value at the t-th time point;

[0070] S22. Perform non-uniform sampling transformation, resample the data of each process stage, and the sampling probability is proportional to the PD intensity to construct a resampling probability sequence;

[0071] ;

[0072] [[ID=–36]]where is the resampling probability at each time point t of the k-th stage, and its range is within [0, 1]. The denominator is the sum of all PDs at all time points in the current stage;

[0073] S23. For each stage, retain the multi-dimensional data at the time points where the resampling probability is greater than 0.5, otherwise discard the multi-dimensional data at this time point . Retain the multi-dimensional data at Q time points for each stage, then:

[0074] ;

[0075] where is the second data set, is the Q-group data set in the baking stage, The Q-group dataset for the cooling stage;

[0076] S24. Construct a second dataset by combining the 3D dataset of the Q-group baking stage, the 3D dataset of the Q-group cooling stage, and the output data into a second dataset with 7D features. The second dataset includes Q-group data, and each group of data includes the input baking temperature, oxygen content, furnace body pressure value, the cooling temperature value and total cooling time in the cooling stage, and the carbon block volume density; the output true anode carbon block compressive strength value data, a total of 7D data. Specifically, Q reads the number of groups of the anode carbon block compressive strength prediction dataset, that is, Q = 100.

[0077] Specifically, divide the data of the second dataset into a training set and a test set according to a ratio of 8 to 2, which are 80 groups and 20 groups respectively; set the last column of the dataset as the output value, that is, the anode carbon block compressive strength. The above implementation process is used for data analysis, and the Matlab code is as follows:

[0078] res = xlsread('Anode Carbon Block Compressive Strength Prediction Dataset.xlsx');

[0079] num_size = 0.8; % Proportion of the training set in the dataset;

[0080] num_train_s = round(num_size * num_samples); % Number of samples in the training set;

[0081] outdim = 1; % The last column is the output;

[0082] num_samples = size(res, 1); % Number of samples;

[0083] res =construct_sample_dataset(alpha_t, T, Pt, rho_t, gamma_t, phase_label); % Construct the second dataset;

[0084] f_ = size(res, 2) - outdim; % Calculate the input feature dimension.

[0085] Furthermore, for non-uniform sampling transformation processing, resample each processed stage. The function code for constructing the second dataset is:

[0086] function final_dataset = construct_sample_dataset(alpha_t, T, Pt,rho_t, gamma_t, phase_label)

[0087] # Input:

[0088] # alpha_t is the weight (physical intensity weight at the time point);

[0089] # T is the baking / cooling temperature;

[0090] # Pt is the furnace pressure;

[0091] # rho_t is the volume density;

[0092] # gamma_t is the oxygen content;

[0093] # phase_label is the phase label (e.g., 1 = baking, 2 = cooling);

[0094] # Output:

[0095] # final_dataset is a two-dimensional structured matrix;

[0096] # Code execution;

[0097] PD_t = alpha_t.* (T + Pt + rho_t + gamma_t);

[0098] PD_total = accumarray(phase_label, PD_t); # Sum of PD for each phase;

[0099] pi_t = PD_t. / PD_total(phase_label); # Weight for each time point;

[0100] valid_idx = false(length(pi_t), 1);

[0101] phases = unique(phase_label);

[0102] for k = 1:length(phases)

[0103] phase = phases(k);

[0104] idx = (phase_label == phase);

[0105] max_pi = max(pi_t(idx));

[0106] valid_idx(idx) = pi_t(idx)>= 0.5 * max_pi;

[0107] end;

[0108] # Filter and retain data points;

[0109] T_q = T(valid_idx);

[0110] Pt_q = Pt(valid_idx);

[0111] rho_q = rho_t(valid_idx);

[0112] gamma_q = gamma_t(valid_idx);

[0113] PD_q = PD_t(valid_idx);

[0114] pi_q = pi_t(valid_idx);

[0115] phase_q = phase_label(valid_idx);

[0116] # Concatenate to form the second dataset, with each row being a 7-dimensional vector;

[0117] res = [T_q, Pt_q, rho_q, gamma_q, PD_q, pi_q, phase_q];

[0118] end。

[0119] Specifically, use the mapminmax function to normalize the input data (P_train) and target data (T_train) of the training set, scale them to the range [0, 1], and then ps_input and ps_output save the normalization parameters, namely the minimum and maximum values; use the same normalization method for the test set data (P_test and T_test), and through a loop, convert the normalized data from a column-major matrix to a row-major storage format, that is, each group of samples is stored separately as a row; specifically: for the training set, convert each column (one sample) of p_train and t_train to a row of vp_train and vt_train; for the test set, convert each column of p_test and t_test to a row of vp_test and vt_test; the above implementation process is for data processing, and the Matlab code is as follows:

[0120] [p_train, ps_input] = mapminmax(P_train, 0, 1);

[0121] p_test = mapminmax('apply', P_test, ps_input);

[0122] [t_train, ps_output] = mapminmax(T_train, 0, 1);

[0123] t_test = mapminmax('apply', T_test, ps_output);

[0124] #Format conversion;

[0125] for i = 1 : 80

[0126] vp_train{i, 1} = p_train(:, i);

[0127] vt_train{i, 1} = t_train(:, i);

[0128] end

[0129] for i = 1 : 20

[0130] vp_test{i, 1} = p_test(:, i);

[0131] vt_test{i, 1} = t_test(:, i);

[0132] end.

[0133] Furthermore, S4, the training set is input into the anode carbon block compressive strength prediction model to train and fit the model with data. The anode carbon block compressive strength prediction model is based on the enhanced LSTM prediction model, and the improved ant nesting optimization algorithm is used to optimize the LSTM unit number L and the learning rate factor α of the traditional LSTM prediction network; the improved ant nesting optimization algorithm includes: introducing a historical path memory mechanism and a dynamic memory guidance factor based on cognitive information increment, and constructing a nonlinear spiral search mechanism based on anti-dynamic angle and rotational disturbance to improve the position update strategy of the ant nesting optimization algorithm.

[0134] Specifically, the standard ant nest optimization algorithm is improved to construct a new mathematical model for updating the position of the agent individual (ant individual); the specific implementation steps are as follows: A memory path set is introduced into each agent individual, and the memory path set is the best positions visited by the agent individual in the recent n times.

[0135] ;

[0136] Among them, is the memory path set of the i-th agent individual, is the first position visited by the i-th agent individual, is the n-th position visited by the i-th agent individual;

[0137] Secondly, the cognitive information increment is defined, and the driving memory guiding factor is constructed through the cognitive information increment. The mathematical model of the driving memory guiding factor is:

[0138] ;

[0139] Among them, is the cognitive information increment, and the mathematical model for calculating the cognitive metric between the memory set and the current position of the agent individual is: ; is the memory difference value of the iter-th iteration, which is defined as the mean value of the cognitive information increments of N agent individuals in the previous iteration. λ is a parameter for controlling the response intensity, and in the implementation of the present invention, it is set to 0.5;

[0140] Finally, the driving memory guiding factor is introduced to guide the agent individual to explore the area around the solution with the minimum fitness value again during the iteration, and a mathematical model for the improved search strategy is constructed. The mathematical model of the improved search strategy is:

[0141] ;

[0142] Among them, is the updated position of the i-th agent individual, is the position of the i-th agent individual in the current iteration, is the best position of the agent individual in the current iteration population.

[0143] Specifically, a non-linear spiral migration search strategy driven by orbital perturbation is proposed. The search process of the standard ant nest optimization algorithm is geometrically mapped into a set of non-linear ant circle orbits. Each agent individual will not simply shrink towards the target along a straight line, but instead make a circuitous advance by simulating the way of "ants forming a vortex circle around the queen ant", so that the agent individual makes a "spiral centripetal movement" around the global best position, thereby enhancing the search diversity and improving the global jumping ability. Among them, in the ant nest optimization algorithm, the position of the ant individual is denoted as the position of the agent individual, and the position of the queen ant, that is, the core position, is denoted as the global best position. The implementation mathematical model is as follows:

[0144] ;

[0145] Among them, is the position of the i-th agent individual after update, is the position of the i-th agent individual in the current iteration, is the dynamic scaling factor in the iter-th iteration, implemented according to ; is the perturbation angle of the i-th agent individual in the iter-th iteration, is the two-dimensional rotation matrix generated in the current search plane, used for the spiral perturbation direction, is the unit perturbation direction, and the mathematical model is: ; Among them, the perturbation angle is not purely random, but the historical tendency and population synergy are introduced as perturbation weights, and the mathematical model is:

[0146] ;

[0147] Among them, is the basic perturbation angle, and the initial value is 1; is the fitness value of the i-th agent individual position in the current iteration, is the fitness value of the i-th agent individual position in the (iter - 1)-th iteration, and rand is the phase shift unique to the individual, used to increase the heterogeneity of the solution, and takes a random number within the range of 0 to 1.

[0148] Furthermore, use the above method to construct the optimization method of the present invention, denoted as the improved ant nest optimization algorithm; construct an LSTM prediction model, including initializing the input layer, LSTM layer, Relu activation layer, and regression layer; set the maximum number of training times to 1000 times, set the gradient threshold to 1, set the initial learning rate to 0 and the initial number of LSTM cells to 0, start adjusting the learning rate after training 850 times, and set the regularization parameter to 0.5.

[0149] Specifically, start training the anode carbon block compressive strength prediction model based on the LSTM prediction network using the prediction set LSTM prediction model. At the same time, optimize the number of LSTM units L and the learning rate factor α of the traditional LSTM prediction network using the improved ant nest optimization algorithm. Set the maximum number of iterations to 60, the maximum population size to 20, the problem dimension to 2, the position range lb = [1 1e-6], and ub = [40 2e-3]. Map the position of the agent individual (ant individual) of the LANA algorithm to the values of the number of LSTM units L and the learning rate factor α, and update the values of the number of LSTM units L and the learning rate factor α by updating the position of the agent individual. The specific implementation steps are as Figure 3 shown as:

[0150] S41. Determine the maximum population size N, the maximum number of iterations Tmax, the problem dimension, and the position range [lb, ub] of the agent individual of the improved ant nest optimization algorithm; define the position of each agent individual as ;

[0151] S42. Initialize the position of the agent individual, train the LSTM model using the parameters corresponding to each agent individual position for predicting the compressive strength of the anode carbon block, and calculate the fitness value corresponding to each individual position currently through the fitness function. The smaller the fitness value, the better the position of the agent individual;

[0152] S43. Record the n positions with the smallest fitness values in the history of each agent individual itself to construct a memory path set ;

[0153] S44. Define the cognitive information increment, construct a driving memory guiding factor through the cognitive information increment, and guide the agent individual to explore the area around the solution with the smallest fitness value again during the iteration through the driving memory guiding factor; update the position of the agent individual through the improved search strategy;

[0154] S45. Update the position of the agent individual using the non-linear spiral migration search strategy driven by orbit perturbation;

[0155] S46. Calculate the fitness value corresponding to the updated position of the agent individual through the fitness function, retain the individual position corresponding to the minimum fitness value of each agent individual. When the agent individual finds a better position during this iteration, insert the best position of this individual into the set;

[0156] S47. Whether the current iteration number iter reaches the maximum iteration number Tmax. If so, output the parameter combination of the number of LSTM units L and the learning rate factor α of the current global optimal agent individual; otherwise, return to execute S43 to update the memory path set and continue to optimize the LSTM prediction network.

[0157] Specifically, use the optimal combination of the number of LSTM units L and the learning rate factor α obtained by optimization to reconstruct the LSTM network of the anode carbon block compressive strength prediction model. Input the training set part of the second data set into the LSTM network training model of the reconstructed anode carbon block compressive strength prediction model. The training set includes an input data part and an output data part, where the output data is the anode carbon block compressive strength value. Evaluate the error between the predicted anode carbon block compressive strength value and the true anode carbon block compressive strength value output during the training process through the root mean square error RMSE; after the training is completed, input the test set to test the prediction accuracy of the anode carbon block compressive strength prediction model.

[0158] Specifically, the root mean square error RMSE is used as the fitness function, and the mathematical model is: ; where is the true value of the anode carbon block compressive strength of the i-th group of samples, is the predicted value of the anode carbon block compressive strength of the i-th group of samples.

[0159] Specifically, Figure 4 is the comparison chart of the change of the fitness value during the training model process. It can be seen from the figure that the method strategy of the present invention can obtain a lower fitness value within the 43rd iteration number, which indicates that the LANA algorithm has a more efficient local optimal solution exploration ability, enabling the anode carbon block compressive strength prediction model to find a solution close to the optimal solution more quickly from the initial state; while converging quickly, the method strategy of the present invention has obtained a more obvious optimization in the fitness value. Compared with the traditional ANA algorithm strategy (dashed line), the method strategy of the present invention better reduces the deviation, thus providing a more accurate optimization solution for the subsequent LSTM model.

[0160] Specifically, Figure 5 and Figure 6 are the comparison charts of the change process of the optimization of the number of LSTM units L and the learning rate factor α; comparing Figure 4 and Figure 5 , it can be seen that the optimization changes of the number of LSTM units L and the learning rate factor α follow the same trend as the change of the fitness value. The optimization of the method strategy of the present invention reaches stability at the 43rd iteration, and the fitness value reaches the minimum. The corresponding number of LSTM units L is 13, and the learning rate factor α is 0.002; the standard ANA algorithm strategy reaches stability at the 31st iteration, the fitness value is relatively large, the corresponding number of LSTM units L is 8, and the learning rate factor α is 0.00089.

[0161] Specifically, Figure 7This is the result graph of the trained model. From the analysis of the training results in the graph, the LSTM model optimized based on LANA has more stable prediction results compared with the existing methods; the predicted values of the LANA-LSTM method are closer to the actual measured values at most data points, showing a higher accuracy; the predicted values of the existing methods fluctuate greatly, especially in certain intervals, where the predicted values deviate far from the actual measured values; in contrast, the predicted values of the LANA-LSTM method fluctuate less, demonstrating better robustness and stability; this indicates that the optimization of the LANA algorithm can effectively reduce the prediction error and improve the prediction stability of the model; by comparing the errors of different prediction methods, it can be found that the LANA-LSTM model can effectively reduce the error in most cases, especially at some extreme points, where the error between the predicted value and the actual measured value is the smallest. In contrast, the predicted value error of the existing method is larger, indicating that the performance of the traditional LSTM model in predicting the compressive strength of anode carbon blocks is inferior to the prediction method proposed in this invention.

[0162] Specifically, Figure 8 This is the comparison graph of the predicted results of the compressive strength of anode carbon blocks. The method of this invention fits more closely to the true value curve at most sample points, and the error is significantly smaller than that of the existing methods. For example, in samples No. 1, 5, 10, 13, 17, and 20, the predicted results of LANA-LSTM basically coincide with the actual values, indicating that this method has a high fitting ability; there are many cases where the predictions of the existing methods deviate severely, such as in samples No. 6, 12, and 16, where the predicted results deviate greatly from the actual values, while the method of this invention performs stably at these points, and the predicted curve is smoother and has less fluctuation, demonstrating good robustness; it shows that the prediction model proposed in this invention exhibits higher prediction accuracy and stability in the verification of the compressive strength prediction of anode carbon blocks, can more accurately reflect the change trend of the true physical strength, and is suitable for applications with high requirements for prediction reliability in industrial scenarios.

Claims

1. A method for predicting the compressive strength of anodes, characterized in that, Including: S1. Collect the original core dynamic characteristic data of the anode carbon block at each time stage, and construct a multi-dimensional characteristic data set; S2. Unify the above multi-dimensional characteristics through time series reconstruction and output the first data set; Divide the time series-based prediction data set according to the roasting and cooling process stages; S3. Perform non-uniform sampling transformation processing on the multi-dimensional data of each process stage, resample each processed stage, and splice them in time series to obtain the second data set; the second data set is divided into a prediction set and a training set; S4. The training set is input into the anode carbon block compressive strength prediction model to train the model and fit the data. The anode carbon block compressive strength prediction model is based on an enhanced LSTM prediction model, and the number of LSTM units L and the learning rate factor α of the traditional LSTM prediction network are optimized by using an improved ant nest building optimization algorithm; The improved ant nest building optimization algorithm includes: introducing a historical path memory mechanism and a dynamic memory guiding factor based on cognitive information increment, and constructing a non-linear spiral search mechanism based on anti-moving angle and rotational perturbation to improve the position update strategy of the ant nest building optimization algorithm; S5. The prediction set is input into the trained anode carbon block compressive strength prediction model to predict the physical correlation and result of the anode carbon block compressive strength, and output the anode carbon block compressive strength value.

2. The method for predicting the compressive strength of an anode carbon block according to claim 1, wherein, For the non-uniform sampling transformation processing of the first data set, resample to obtain the second data set. The specific method is as follows: S21. For the k-th process stage, at each time point construct a physical disturbance intensity index. The higher the value of the physical disturbance intensity index, the more significant the influence of this time period on the evolution of the compressive strength of the anode carbon block. The mathematical model is as follows: ; Among them, is the physical disturbance intensity index at the t-th time point, is the weight at the t-th time point, is the baking temperature at the t-th time point, is the cooling temperature of the anode carbon block at the t-th time point, is the furnace body pressure value at the t-th time point, is the oxygen content at the t-th time point; S22. Perform non-uniform sampling transformation, resample the data of each process stage, and the sampling probability is proportional to the PD strength to construct a resampling probability sequence; ; in, is the resampling probability of each time point t in the kth stage, ranging from [0,1], and its denominator is the sum of PDs of all time points in the current stage; S23. For each stage, the resampling probability Time points with a value greater than 0.5 The multi-dimensional data at these time points are retained; otherwise, the time points are discarded For the multi-dimensional data at these time points, if Q time points of multi-dimensional data are retained for each stage, then: ; Among them, is the second data set, is the Q-group data set in the baking stage, is the Q-group data set in the cooling stage; S24. Construct the second data set, combine the 3D data sets of Q baking stages, the 3D data sets of Q cooling stages and the output data into a second data set with 7D features. The second data set includes Q groups of data, and each group of data includes the input baking temperature, oxygen content, furnace body pressure value, the cooling temperature value and total cooling time in the cooling stage, and the carbon block volume density; the output true anode carbon block compressive strength value data, a total of 7D data.

3. The method for predicting the compressive strength of an anode carbon block according to claim 2, wherein The historical path memory mechanism and the dynamic memory guiding factor based on cognitive information increment improve the ant nest building optimization algorithm. The specific method is as follows: introduce a memory path set in each agent individual, and the memory path set is the best positions visited by the agent individual in the recent n times; ; Among them, is the memory path set of the i-th agent individual, is the first position ever visited by the i-th agent individual, is the n-th position ever visited by the i-th agent individual; Secondly, define the cognitive information increment, and construct a driving memory guiding factor through the cognitive information increment. The driving memory guiding factor The mathematical model is as follows: ; Among them, is the cognitive information increment. By calculating the cognitive metric between the memory set and the current position of the agent individual, the mathematical model is: ; is the memory difference value at the iter-th iteration, defined as the mean of the cognitive information increments of N agent individuals in the previous iteration, and λ is a parameter controlling the response intensity; The driving memory guiding factor guides the agent individual to re-explore the area around the solution with the minimum fitness value during the iterative process, and constructs an improved search strategy mathematical model. The mathematical model of the improved search strategy is: ; Among them, is the position of the i-th updated agent individual, is the position of the i-th agent individual in the current iteration, is the best position of the agent individuals in the current iteration population.

4. The method for predicting the compressive strength of an anode carbon block according to claim 3, wherein The non-linear spiral search mechanism improves the position update strategy of the ant nest building optimization algorithm. Specifically: geometrically map the search process of the standard ant nest building optimization algorithm into a set of non-linear ant circle orbits, and perform a roundabout advance by simulating the way of "the ant colony forms a vortex circle around the queen ant", so that the agent individual performs "spiral centripetal motion" around the global best position, thereby enhancing the search diversity and improving the global jump-out ability; among them, in the ant nest building optimization algorithm, the ant individual position is recorded as the agent individual position, and the queen ant position, that is, the core position, is recorded as the global best position; the mathematical model is: ; Among them, is the dynamic scaling factor for the iter - th iteration, is the perturbation angle of the i - th agent individual in the iter - th iteration, is the two - dimensional rotation matrix generated in the current search plane for the spiral perturbation direction, is the unit perturbation direction, and the mathematical model is: ; among them, the perturbation angle is not purely random, but historical tendency and population synergy are introduced as perturbation weights, and the mathematical model is: ; Among them, is the basic disturbance angle; is the fitness value of the position of the i-th agent individual in the current iteration, is the fitness value of the position of the i-th agent individual in the (iter - 1)-th iteration, and rand is the phase offset unique to the individual, which is used to increase the heterogeneity of the solution and takes a random number within the range of 0 to 1.

5. A method for predicting the compressive strength of an anode carbon block according to any one of claims 1-4, characterized in that, Optimize the number of LSTM units \(L\) and the learning rate factor \(\alpha\) of the traditional LSTM prediction network using an improved ant nest optimization algorithm. The specific steps are as follows: S41. Determine the maximum population size N, the maximum number of iterations Tmax, the problem dimension, and the position range [lb, ub] of the agent individuals of the improved ant nest building optimization algorithm; define the position of each agent individual as ; S42. Initialize the positions of the agent individuals. Train the LSTM model using the parameters corresponding to each agent individual position to predict the compressive strength of the anode carbon block, and calculate the fitness value corresponding to each individual position at the current time through the fitness function. The smaller the fitness value, the better the agent individual position; S43. Record the n positions with the smallest fitness values in the history of each agent individual to build a memory path set ; S44. Define the cognitive information increment. Construct a driving memory guiding factor through the cognitive information increment, and use the driving memory guiding factor to guide the agent individuals to explore the area around the solution with the smallest fitness value again during the iterative process; Update the positions of the agent individuals through an improved search strategy, S45. Update the positions of the agent individuals using the non-linear spiral migration search strategy driven by orbital perturbation; S46. Calculate the fitness value corresponding to the updated position of the agent individual through the fitness function, and retain the individual position corresponding to the minimum fitness value of each agent individual. When an agent individual finds a better position during this iteration, insert its best position into the set; S47. Whether the current iteration number \(iter\) reaches the maximum iteration number \(T_{max}\). If so, output the combination of the number of hidden layer neuron nodes \(L\) and the learning rate factor \(\alpha\) of the current global optimal agent individual; Otherwise, return to execute S43 to update the memory path set and continue to optimize the LSTM prediction network.

Citation Information

Patent Citations

  • Magnetic resonance symmetric spectrum non-uniform sampling method, and magnetic resonance symmetric spectrum reconstruction method and device

    CN116299105A

  • Air quality prediction method suitable for underground building space

    CN119539202A