Rare earth electrolytic product purity early warning method and system
By combining data completion and semi-supervised learning methods with CNN-LSTM and BiLSTM models, a CARNet model was constructed for early warning of the purity of rare earth electrolytic products. This solved the problems of subjectivity and control lag in product purity prediction in rare earth electrolytic production, and achieved mid-process early warning and improved data utilization efficiency.
Patent Information
- Application Number
- CN202610240113.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-28
- Publication Date
- 2026-06-02
AI Technical Summary
In current rare earth electrolytic production, the prediction of product purity relies on human experience, which is highly subjective, has a lag in control, and is difficult to pass on knowledge. Furthermore, existing technologies cannot provide mid-process early warning, resulting in unstable product quality and waste of resources.
We employ a data completion and semi-supervised learning approach. We correct temperature anomalies using a CNN-LSTM fusion model, complete time-series data using a BiLSTM model, and construct a CARNet model for purity prediction. We optimize feature representation using a multi-task loss function to achieve mid-course early warning.
It enables mid-process early warning of the purity of rare earth electrolysis products, improves production stability and intelligence, alleviates the problem of data tag scarcity, and enhances the model's generalization ability and prediction accuracy.
Smart Images

Figure CN122135811A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent technology for rare earth metal electrolytic smelting, specifically involving a method and system for mid-process prediction and real-time early warning of product purity during rare earth molten salt electrolysis, which integrates time-series data completion and semi-supervised learning strategies. Background Technology
[0002] Rare earth metals are indispensable strategic resources for high-end manufacturing and national defense, and their purity directly affects material properties. Industrially, molten salt electrolysis is widely used for production, a process conducted at ultra-high temperatures. The product is manufactured in an extreme environment of strong corrosion and multi-physical field coupling, and its quality is affected by the nonlinear interaction of multiple parameters such as temperature, oxide concentration, current, and voltage.
[0003] Currently, rare earth electrolysis production mainly relies on the experience of operators for manual control, which involves observing the color of molten salt and adjusting the current, voltage, and feeding rhythm based on experience. This method has three major defects: (1) It is highly subjective, resulting in large fluctuations in product quality and difficulty in ensuring stability; (2) Control is severely delayed, as the purity of the product can only be determined through offline testing after electrolysis, making it impossible to intervene in abnormalities in real time during production, leading to resource waste; (3) Knowledge transfer is difficult, experienced technicians are aging, and there is a talent gap.
[0004] Existing research mostly focuses on the prediction and control of single intermediate parameters (such as temperature and oxide concentration) in the electrolysis process, such as using PID control and fuzzy neural networks. However, these methods have significant shortcomings: (1) They lack end-to-end quality correlation and fail to establish a direct prediction model between process parameters and the purity of the final product; (2) They cannot achieve mid-process early warning and cannot make effective purity predictions based on partial data before the end of the electrolysis process; (3) They have low data utilization efficiency and fail to effectively solve the contradiction between labeled data (expensive and scarce) and unlabeled data (abundant and readily available) in industrial sites, thus limiting the generalization ability of the model.
[0005] Therefore, developing an intelligent purity early warning method that can directly link process and quality, achieve accurate mid-process prediction, and efficiently utilize industrial data is of urgent technical demand and significant industrial value for improving the stability, pass rate, and intelligence level of rare earth electrolysis production. Summary of the Invention
[0006] To address the black-box problem of traditional methods being unable to predict purity before product electrolysis is complete, and to realize effective early warning 30-90 minutes in advance, this invention aims to provide a method and system for early warning of rare earth electrolysis product purity based on data completion and semi-supervised learning. This overcomes the bottleneck of scarce labeled data in industrial scenarios, fully leverages the value of massive amounts of unlabeled data through innovative training strategies, and improves the model's generalization and robustness. Furthermore, it constructs an end-to-end intelligent early warning framework, providing a feasible technical solution for process optimization and intelligent upgrading of rare earth electrolysis.
[0007] To achieve the above objectives, the technical solution adopted by this invention is as follows: First, a formal definition is performed:
[0008] Suppose that within one electrolysis cycle, the preprocessed multivariate time-series data constitute a complete observation matrix, where, This represents the total number of time steps in a complete electrolysis cycle. For feature dimension, For the first The observation vector at each time step, and the purity label corresponding to this batch of products is:
[0009] .
[0010] During online early warning, when electrolysis reaches the [number]th [stage]... time step At that time, only a partial observation sequence could be obtained:
[0011]
[0012] To achieve mid-course prediction, the aim is to learn a time-series data completion function. It satisfies:
[0013] .
[0014] in, For the generated "pseudo-complete" sequence, These are function parameters. Establishing this mapping fundamentally bridges the gap in the model training phase (using complete sequences). Compared to the online early warning stage (where only partial sequences are available) The gap in input dimensions between the two methods is the theoretical basis for achieving early prediction.
[0015] Based on this, the specific technical solution provided by the present invention is as follows: a method and system for early warning of the purity of rare earth electrolysis products, the specific steps of which are as follows:
[0016] Step 1: Collect multimodal time-series process parameters and corresponding product purity labels for rare earth electrolysis, perform preprocessing and alignment, and construct a standardized dataset containing labeled and unlabeled sample sets.
[0017] Multi-source heterogeneous data acquisition and high-quality preprocessing: A distributed sensor network is deployed on-site at the rare earth electrolysis cell to simultaneously acquire core multimodal time-series data covering thermal and material balance, specifically including:
[0018] Thermal balance parameters: The surface temperature sequence of the electrolyte was collected by a short-wave infrared thermometer, and the surface image sequence of the electrolytic cell was collected by a high dynamic range industrial camera. The average gray level, variance, and entropy value of the molten salt region were extracted as image features.
[0019] Material balance parameters: The cell current and cell voltage sequences are obtained by recognizing the digital dials on the electrolytic cell control cabinet through machine vision, and the precise feeding time and feeding quantity sequences are obtained by monitoring the feeding machine control signals.
[0020] Quality Labels: Collect offline test reports on the carbon (C) and iron (Fe) content of each batch of products from the factory laboratory, and classify them into three categories according to enterprise standards: high-quality (H), qualified (M), and inferior (L).
[0021] The raw data is rigorously preprocessed to construct a standardized dataset that can be used for model training:
[0022] Intelligent temperature data correction: To address the issue of infrared thermometers being susceptible to interference under extreme conditions in rare earth electrolysis workshops, a CNN-LSTM fusion model is constructed with image grayscale features, current, voltage, and feed rate as inputs. This model predicts and corrects temperature anomalies caused by infrared spot shift and furnace operation interference, and outputs a reliable temperature sequence.
[0023] This model uses CNN (Convolutional Neural Network) to capture the spatial local correlation and feature patterns between multi-source process parameters, and then uses LSTM (Long Short-Term Memory Network) to model the time series dependencies of these features, ultimately achieving accurate inference and correction of abnormal temperature values.
[0024] Formal definition of model input:
[0025] Let the multi-source observation vector at time t be:
[0026] ;
[0027] in, Gray-scale features extracted from the electrolyte surface image. For slot current, Slot voltage, This is the normalized feed rate.
[0028] The model's input is a window of time-series features:
[0029]
[0030] Where L is the length of the history window.
[0031] Mathematical expression of the CNN-LSTM fusion architecture:
[0032] Model
[0033] It can be broken down into two core components:
[0034]
[0035] CNN Feature Extractor :
[0036]
[0037] in, This represents a one-dimensional convolution operation. These are the parameters of the convolutional layer. This is the activation function.
[0038] LSTM time series modeler :
[0039] ;
[0040] in, For the hidden state of LSTM, This is the corrected temperature estimate output by the model.
[0041] Define correction temperature Compared with the original observation Consistency judgment function:
[0042]
[0043] in, This represents the temperature error tolerance threshold; when Q=1, the original temperature data is considered reliable; when Q=0, it indicates that the data is abnormal and needs to be corrected. replace .
[0044] The CNN-LSTM model structure is shown in Table 1.
[0045] Table 1 CNN-LSTM Model Parameters
[0046]
[0047] Precise Alignment of Electrolysis Cycles: Since a complete electrolysis cycle exists between two consecutive tapping times, this invention introduces an optimization strategy based on standard K-means clustering to accurately identify the tapping operation time. The feature matrix of the N industrial camera images collected throughout the day is defined as follows:
[0048]
[0049] in, For the first Feature vectors extracted from images (such as color histograms, texture features, etc.). For feature dimensions.
[0050] Adaptive K-means clustering objective function is used:
[0051]
[0052] Where K is the number of clusters to be determined. For the cluster center set, This is a regularization parameter used to prevent overfitting due to an excessively large K value; it is achieved by minimizing... It can automatically determine the optimal number of clusters K.
[0053] For the identified furnace exit operation category cluster center Calculate the probability of each image being produced:
[0054]
[0055] in, These are learnable scale weight parameters. This indicates the calculation of Euclidean distance, when When the threshold is reached, the image is determined to be the image taken at the time of baking.
[0056] Sequence standardization and slicing: Each aligned electrolysis cycle data is uniformly standardized into a sample of fixed length T (e.g., 120 time steps), and all numerical features are normalized. To support mid-course prediction, each complete sample is divided into a first segment sequence of different lengths according to time order, such as the first 30 steps, the first 60 steps, and the first 90 steps.
[0057] In step one, the multimodal timing process parameters include at least: electrolyte surface temperature, visual features extracted from the electrolytic cell surface image, cell current, cell voltage, and feed rate;
[0058] Preprocessing includes: correcting abnormal temperature data using a pre-trained neural network model based on visual features, current, voltage, and material feeding data; and automatically identifying the furnace exit time based on image analysis to achieve precise time alignment between process data and product quality labels.
[0059] Step 2: Construct a convolutional attention residual network CARNet as a purity classification model. This model includes a feature extraction module, a temporal modeling module, an attention mechanism module, and a classification output module. It is optimized using a joint loss function that integrates classification loss, inter-class separation loss, and intra-class compaction loss.
[0060] Design a deep learning model CARNet specifically for multivariate temporal classification. Its innovation lies in the network structure design and loss function construction:
[0061] Network structure: The model input is a standardized time-series data matrix (dimension: time step × feature dimension), which is processed sequentially through:
[0062] Feature extraction backbone network: It includes convolutional layers, pooling layers, and residual blocks that integrate dilated convolutions to extract local correlations and periodic features of the data. Residual connections ensure effective training of deep networks.
[0063] Expression for dilated convolution:
[0064]
[0065] in, is the i-th element of the output feature map; X is the input feature map; W is the convolution kernel; d is the dilation rate (the spacing between kernel elements); K is the kernel size.
[0066] Adaptive Attention Focusing Module: Introduces a self-attention mechanism, enabling the model to automatically evaluate the importance weights of features at different time steps to the final purity classification, focusing on key anomaly stages.
[0067] Attention mechanism calculation:
[0068]
[0069] Where Q is the query matrix; K is the key matrix; V is the value matrix; d k is the dimension of the key vector; Softmax is the normalization exponential function.
[0070] In the attention-focusing module of CARNet, a dedicated multimodal feature fusion layer is designed. Let the original multimodal feature vector at time t be:
[0071]
[0072] Where M is the number of modes. The m-th mode is a feature.
[0073] Features after fusion This is obtained through attention-weighted multimodal fusion:
[0074]
[0075] in, A mode-specific linear transformation matrix maps different modal features to a common space. The key adaptive weights Calculated using the following attention mechanism:
[0076]
[0077] in, It is the query vector at time t, generated from context information. is the key vector of the m-th modality, is a learnable parameter, and d is the feature dimension.
[0078] This mechanism enables the model to dynamically assess the importance of different modal features to the final purity classification at the current moment. For example, when there are abnormal temperature fluctuations, the temperature mode may be given higher weight; after the feeding operation, more attention may be paid to material balance-related features.
[0079] Classification decision layer: Through a fully connected layer and a Softmax function, it outputs the probability that the product belongs to each purity category.
[0080] The detailed parameters of the CARNet model are shown in Table 2.
[0081] Table 2 CARNet Model Parameters
[0082] Construction of a multi-task joint loss function: In order to guide the Convolutional Attention Residual Network (CARNet) to learn highly discriminative feature representations, this invention designs a joint loss function that integrates the ideas of supervised classification and metric learning.
[0083] Suppose a training batch contains The nth sample, after CARNet feature extraction, is the nth... i The feature vector of each sample is denoted as . Its corresponding real category label is .
[0084] Supervision and classification of losses We employ standard cross-entropy loss to ensure the model's basic classification ability.
[0085]
[0086] in, Indicates the model predicts samples Category The probability, This is an indicator function.
[0087] Inter-class separation loss The aim is to maximize the minimum margin between different category feature prototypes to improve the class separability of features.
[0088]
[0089] in, This is the mean of all features of category A in the current batch (i.e., the category prototype). It is a small smoothing constant used to avoid the denominator being zero.
[0090] Intraclass compact loss The aim is to minimize the maximum distance between features of similar samples and their class prototypes, thereby encouraging similar features to cluster in the embedding space.
[0091] ;
[0092] The final joint optimization objective function is defined as the weighted sum of the three losses mentioned above:
[0093] ;
[0094] and All of these are hyperparameters. This loss function optimizes classification accuracy and feature space structure collaboratively. Let the cross-entropy loss be denoted as , To facilitate the separation of features from different categories, To induce the loss of similar features, and All are non-negative hyperparameters.
[0095] The feature extraction module of the CARNet model contains at least one residual block, which integrates a dilated convolutional layer.
[0096] Step 3: Train the CARNet model using a combined data completion and semi-supervised training strategy, specifically including:
[0097] Step S31: Train a bidirectional long short-term memory network BiLSTM as a time-series data completion model, and learn by predicting the subsequent data based on the preceding data of the input sequence.
[0098] Step S32: Using the trained BiLSTM model, data completion is performed on the samples in the labeled sample set to generate pseudo-complete samples, which together with the original labeled samples constitute the enhanced training set.
[0099] Step S33: Use the augmented training set to perform initial training on the CARNet model to obtain the initial model; then use the initial model to generate pseudo-labels for the samples in the unlabeled sample set, and merge the unlabeled samples with pseudo-labels with the augmented training set to perform semi-supervised co-training on the CARNet model to obtain the final warning model.
[0100] This step is crucial for solving the challenges of mid-course prediction and small sample sizes, and specifically includes:
[0101] Step S31: Train a BiLSTM time series data completion model. Train a BiLSTM network using all labeled complete sequence data. This model learns the mapping relationship from partially known sequences (e.g., the first M steps) to predict subsequent unknown sequences (the last TM steps), thus possessing completion capabilities. Different configurations of completion models can be trained for different warning lead times (e.g., 30, 60, 90 minutes).
[0102] For different lead times, BiLSTM uses differentiated configurations as shown in Table 3:
[0103] Table 3 Differentiated Configurations of BiLSTM Models
[0104]
[0105] Short sequence completion (first 30 steps): hidden layer dimension 64, network depth 2 layers, learning rate 0.001;
[0106] Sequence completion (first 60 steps): hidden layer dimension 128, network depth 3 layers, learning rate 0.0005;
[0107] Long sequence completion (first 90 steps): hidden layer dimension 256, network depth 4 layers, learning rate 0.0001.
[0108] Step S32: Construct an augmented training set. Using the trained BiLSTM model, predict the subsequent data for each segment of the labeled samples (e.g., the first 30 / 60 / 90 steps), and concatenate the predicted parts with the true preceding segments to generate pseudo-complete samples. These pseudo-complete samples, together with the original complete samples, constitute the augmented training set, effectively expanding the scale of labeled data and allowing the model to learn and process the supplementary data in advance.
[0109] Step S33: Semi-supervised co-training of the CARNet model:
[0110] Initial training: Using the augmented training set obtained in step S32, the CARNet model is initially trained to obtain the initial model.
[0111] Pseudo-label generation and selection: Using the initial CARNet model and BiLSTM completion model, a large number of unlabeled samples are processed: first, they are completed into pseudo-complete sequences, then purity prediction is performed, and samples with prediction confidence higher than a set threshold are selected. The predicted class of the sample is used as a high-confidence pseudo-label.
[0112] Joint optimization training: The CARNet model is retrained by merging the augmented training set with real labels with the unlabeled dataset with high-confidence pseudo-labels. This process enables the model to learn from a wider range of data distributions, corrects initial biases, and significantly improves generalization ability.
[0113] In step S33, the process of generating pseudo-labels for unlabeled samples includes: first, using the BiLSTM model to complete the front-end data of the unlabeled samples into a pseudo-complete sequence, and then using the initial model to predict the pseudo-complete sequence, only including samples with prediction confidence higher than a preset threshold and their prediction categories into the semi-supervised training set.
[0114] Step 4: In the actual electrolysis process, process parameter data for the first M time steps are collected in real time, and the BiLSTM model is used to complete the sequence. The data is then input into the final early warning model to obtain the early prediction result of product purity, thereby achieving early warning.
[0115] The trained BiLSTM completion model and CARNet prediction model are deployed to an industrial server to form an online early warning system.
[0116] For an ongoing electrolyzer, process parameter data for the first M minutes (e.g., 30, 60, 90 minutes) are collected in real time and preprocessed in the same way as during training.
[0117] The preprocessed partial sequence is input into the BiLSTM completion model to generate the corresponding pseudo-complete sequence.
[0118] By inputting the pseudo-complete sequence into the CARNet prediction model, the real-time purity category prediction results and confidence levels of the current furnace product are obtained.
[0119] When the prediction result is a defective product (L) or the confidence level exceeds the warning threshold, the system automatically triggers an audible and visual alarm and can push the warning information to the production management platform, providing operators with a process adjustment intervention window of (TM) minutes in advance.
[0120] If M is 30, 60, or 90, it corresponds to a purity warning 90 minutes, 60 minutes, or 30 minutes in advance, respectively.
[0121] A purity early warning system for rare earth electrolysis products, comprising a method for early warning of the purity of rare earth electrolysis products, including:
[0122] Data acquisition and preprocessing module: used to acquire multi-source sensor data from the electrolytic cell in real time and perform preprocessing and alignment operations;
[0123] Time series data completion module: Built-in BiLSTM model trained as described in claim 1, used to complete the real-time acquired partial sequence into a complete sequence;
[0124] Purity prediction and early warning module: It has a built-in pre-trained CARNet final early warning model, which is used to receive the completed sequence, output the purity prediction category and confidence level, and trigger an early warning signal when the prediction result is poor or the confidence level exceeds the limit.
[0125] Human-computer interaction and display module: used to display real-time data, prediction results, early warning information and historical records.
[0126] The system is deployed as a software service on industrial servers or cloud platforms and communicates with field data acquisition equipment and factory production execution systems through industrial networks.
[0127] Compared with the prior art, the specific beneficial effects of this invention are as follows:
[0128] I. This application discloses the mid-process early warning capability for rare earth electrolysis purity: through data completion technology, it creatively solves the problem of input dimension mismatch between model training (using complete data) and actual early warning (only partial data can be used), and realizes effective prediction of product purity 30-90 minutes before the end of electrolysis, changing post-event inspection to in-process control, with a high degree of technological innovation.
[0129] Second, this invention greatly alleviates the data labeling bottleneck in the implementation of industrial AI: the proposed data completion enhancement + semi-supervised learning collaborative framework combines data generation with unsupervised learning. On the one hand, it enhances data through completion, and on the other hand, it improves model performance by utilizing massive amounts of unlabeled data, enabling the model to still achieve excellent performance in industrial scenarios with extremely high labeling costs.
[0130] Third, the prediction model of this invention has high accuracy and enhanced interpretability: The designed CARNet model integrates residual connections, dilated convolutions, and attention mechanisms, which can deeply mine complex temporal features. The innovative multi-task loss function forces the model to learn features with strong class discriminative power, which not only improves the classification accuracy (more than 96% on the test set), but its attention weights can also be used to locate key process periods that affect quality, thus enhancing the interpretability of the model.
[0131] Fourth, this invention forms a closed-loop, implementable system solution: from data acquisition, preprocessing, model building, training strategy to online early warning, it provides a complete technical chain, which fully considers the harsh environment of industrial sites (such as data anomalies, alignment difficulties) and actual needs (such as real-time performance, early warning lead time), and has engineering value for direct application to the intelligent transformation of existing production lines. Attached Figure Description
[0132] Figure 1 This is the overall flowchart of the method of the present invention.
[0133] Figure 2 This is a schematic diagram of the CARNet model structure, a convolutional attention residual network.
[0134] Figure 3 This is a schematic diagram illustrating the principle and effect of data completion based on BiLSTM.
[0135] Figure 4 This is a schematic diagram of a semi-supervised collaborative training process.
[0136] Figure 5 This is a comparison chart showing the prediction accuracy of the model as the available data time increases under different training strategies.
[0137] Figure 6 This is a comparison chart of the classification performance of the CARNet model of this invention and traditional models on complete data.
[0138] Figure 7 A comparison of the feature space distribution of the model (before training).
[0139] Figure 8 A comparison of the feature space distribution of the model (after training). Detailed Implementation
[0140] To make the technical problems to be solved, the technical solutions, and the beneficial effects of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.
[0141] This embodiment uses an 8kA cerium oxide electrolytic cell in a rare earth smelting plant as the specific implementation object to fully demonstrate the implementation process and technical effects of the present invention.
[0142] A method and system for early warning of purity of rare earth electrolysis products, including data acquisition and high-quality preprocessing: deployed in the electrolysis workshop as follows... Figure 1The distributed data acquisition system shown includes hardware such as an LSCI-TZ03 shortwave infrared thermometer, an MV-CU120-10GC industrial camera, a Hikvision network camera (for photographing electricity meters), and a DC voltage transmitter (for monitoring material feeding signals). The system operates continuously and stably, with a data acquisition period from November 2024 to March 2025.
[0143] Raw data acquisition: A total of 1001 valid electrolysis cycle data were collected. The data within each cycle included: temperature sequence (one point every 20 seconds), electrolytic cell surface image sequence (one image per minute), cell current and cell voltage sequence (obtained once every 20 seconds through image recognition), and feeding event sequence (monitored once every 100 milliseconds). Among them, 280 cycles have corresponding product purity labels. These labels are derived from the offline test reports of carbon (C) and iron (Fe) content of each batch of products from the factory laboratory, and are classified into three categories according to the standards given by the factory: high-quality (H), qualified (M), and inferior (L).
[0144] Key preprocessing steps:
[0145] Intelligent temperature data correction: A CNN-LSTM fusion model is constructed with image grayscale features, current, voltage, and material feeding as inputs to predict and correct temperature anomalies caused by infrared spot shift and furnace operation interference, and output a reliable temperature sequence.
[0146] The steps for extracting grayscale features from an image are as follows:
[0147] Image preprocessing: Gaussian filtering (Gaussian kernel size 5×5, standard deviation 1.0) was used to remove noise;
[0148] Region segmentation: Set grayscale threshold Remove dark areas, preserve molten salt areas;
[0149] Feature calculation: Calculate the average gray value of the remaining region. and standard deviation Preserve grayscale values Pixels within the range;
[0150] Molten salt region extraction: Filling voids using morphological closing operations (kernel size 3×3);
[0151] Feature extraction: Calculate the statistical features of the molten salt region, such as the mean gray value, variance, and entropy value.
[0152] The CNN-LSTM model structure includes:
[0153] Input layer: Shape is This corresponds to four features from the past 60 time steps;
[0154] CNN feature extraction module: two convolutional layers (64 and 32 convolutional kernels, kernel size 3, activation function ReLU) and a max pooling layer;
[0155] LSTM timing modeling module: two layers of LSTM units (50 and 30 units, activation function tanh, dropout rate 0.2);
[0156] Output layer: The fully connected layer outputs the corrected temperature value.
[0157] Training configuration: Adam optimizer, learning rate 0.001, training for 300 epochs.
[0158] The reliability of the original temperature data is determined using a consistency assessment function (a temperature error tolerance threshold is set in this embodiment). for ).when When this occurs, it indicates that the data is abnormal and needs to be checked. replace This allows the CNN-LSTM model to intelligently identify and correct temperature anomalies by learning the "feature-temperature" mapping relationship under normal operating conditions. Typical temperature anomalies fall into three categories:
[0159] Persistent low temperature anomaly: when input features (Image grayscale) indicates the presence of molten salt regions, but When the value remains consistently low, the model adjusts according to normal... , , Inferring the expected features .
[0160] Abnormal drastic fluctuations: when When sudden changes occur without physical basis, the model, based on the assumption of temporal smoothness, outputs results that conform to the inertia of process changes. .
[0161] Drift anomaly: When the position of the light spot changes slowly, the model eliminates systematic bias by modeling long-term time-series dependencies.
[0162] Precise alignment of electrolysis cycles: Industrial camera images are analyzed using the K-means clustering algorithm to automatically identify the time of the unloading operation. For the identified unloading operation cluster center, the unloading probability of each image is calculated. When the threshold is set to 0.8 in this embodiment, the image is determined to be the image of the time of exiting the furnace. The time period of consecutive exiting images corresponds to a complete exiting operation, thereby accurately defining the boundary of the electrolysis cycle and achieving strict alignment of multi-source process data with the final product quality label in time sequence.
[0163] Sequence standardization and slicing: All corrected and cleaned multi-source data (temperature, image grayscale value, current, voltage, and material feeding rate) within the same cycle were resampled and aligned at 1-minute intervals, starting from the end of the furnace discharge, forming a standardized sequence with 120 time steps and a feature dimension of 5. Ultimately, a dataset containing 1001 samples was constructed, including 280 labeled samples and 721 unlabeled samples.
[0164] Core Model Construction: A BiLSTM time-series data completion model is used to achieve early warning. This model needs to be trained to infer the global picture from partial data. Different configurations of BiLSTM networks are constructed to meet different early warning requirements. Taking a 90-minute early warning (using data from the first 30 time steps) as an example, a 2-layer BiLSTM network with 64 hidden layers is constructed. The training objective of this model is: input a 30×5 matrix (5-dimensional data from the first 30 minutes), output a 90×5 matrix (predicted data from the next 90 minutes). Mean squared error is used as the loss function, and training is performed on 280 labeled complete sequences.
[0165] CARNet purity prediction model: Construction as Figure 2 The core innovation of the convolutional attention residual network shown lies in its network structure and loss function:
[0166] By expanding the receptive field through dilated convolution residual blocks, the attention mechanism focuses on key time periods.
[0167] For the loss function, a custom joint loss is used:
[0168] ;
[0169] in, , , Let be the cross-entropy loss, inter-class separation loss, and intra-class compaction loss, respectively. Figure 4 The middle corresponds to , and , and This is a non-negative hyperparameter used to balance the importance of various losses. In this embodiment, we take... .
[0170] The model training based on the "data completion-semi-supervised collaboration" strategy strictly follows the training process. Figure 1 and Figure 4 The steps shown are as follows:
[0171] Phase 1: Complete the model using a trained Bidirectional Long Short-Term Memory (BiLSTM) network. We perform data augmentation on a limited number of labeled samples to construct an augmented training set suitable for mid-course prediction tasks.
[0172] For a complete labeled sample Take the front The data at each time step constitutes the observation subsequence. Predicting subsequent events through a complete model Data at each time step:
[0173] ;
[0174] Subsequently, a "pseudo-complete" augmented sample is generated through sequence splicing operations. :
[0175] ;
[0176] Among them, symbols Indicates splicing along the time dimension, superscript This indicates that the enhanced sample originated from the previous one. M Step-by-step observation data.
[0177] The quality of time-series data completion is quantified using the completion quality index Q, which is calculated as follows:
[0178] ;
[0179] in, To complete the predicted values, To correspond to the true value, N is the total number of data points to be filled in, and the Q range is... The closer the value is to 1, the higher the completion quality. It was judged to be of excellent quality at that time. For good, The model needs to be optimized. This metric provides a simple and reliable quantitative basis for evaluating the BiLSTM completion effect.
[0180] By applying the following methods to the original 280 labeled samples: Three different lengths of observation data were used to complete the dataset, generating 840 "pseudo-complete" augmented samples. These augmented samples were then merged with the original 280 complete samples to construct a final augmented training set containing 1120 samples. This strategy not only significantly expands the scale of training data, but more importantly, it allows the classification model to be exposed to and adapt to the "pseudo-complete" data distribution generated by the completion process during the learning phase, thus preparing it for online mid-course prediction.
[0181] Phase Two: Semi-supervised collaborative training.
[0182] Initial training: Using the augmented training set of the above 1120 samples, the CARNet model was initially trained to obtain the initial model. On the test set (56 independent samples), the classification accuracy reached 75% using only the first 30 steps of data (after completion).
[0183] High-confidence pseudo-label generation and filtering mechanism: to effectively utilize massive amounts of unlabeled data A pseudo-label filtering mechanism based on confidence threshold was designed.
[0184] For any unlabeled sample U, the temporal completion model is first used. Complete it into a pseudo-complete sequence Using the pre-trained CARNet classification model Predicting it yields the category probability distribution vector:
[0185] ;
[0186] The prediction confidence of this sample is defined as its maximum class probability:
[0187] ;
[0188] Set a strict confidence threshold (In this embodiment) The pseudo-label adoption criteria can be expressed as:
[0189] Conditions for adopting pseudo-tags: ;
[0190] For samples that meet this condition, assign them pseudo-labels. :
[0191] ;
[0192] The core of this selection mechanism lies in including only unlabeled samples and their pseudo-labels with high model prediction confidence and certainty in subsequent training. This maximizes the reliability of pseudo-labels and effectively suppresses the accumulation and propagation of noisy labels during semi-supervised learning, which is crucial for improving the model's final generalization performance. Through this step, approximately 500 high-quality samples were selected from 721 unlabeled samples to form the pseudo-label dataset. .
[0193] Joint optimization training: The augmented training set with real labels (1120 samples) is merged with the unlabeled dataset with high-confidence pseudo-labels (500 samples) to retrain the CARNet model (i.e., semi-supervised training). This process allows the model to learn from a wider range of data distributions, which significantly improves its generalization ability.
[0194] Early warning performance verification and effectiveness: The final CARNet model trained through the above process is integrated with the BiLSTM completion model to form the core of the early warning system. Performance verification is performed by simulating online early warning scenarios on a reserved independent test set of 56 samples.
[0195] Mid-course prediction accuracy: such as Figure 5 As shown, the final model trained under semi-supervised conditions performs optimally under different lead times. In particular, using only the data from the first 30 time steps (i.e., 90 minutes in advance), the model's classification accuracy improved from 46% in the initial training to 80%, fully meeting the accuracy requirements for early warning. When using the data from the first 60 and 90 steps, the accuracy reached 88% and 91%, respectively.
[0196] End-to-end classification performance: When using the complete 120-step data (i.e., post-validation mode), the CARNet model of this invention achieves a classification accuracy of 96%, significantly outperforming traditional BP neural networks, support vector machines (SVM), and radial basis function networks (RBF). The classification accuracy for each category is compared to... Figure 6 As shown.
[0197] Feature space visualization: such as Figure 7 and Figure 8 As shown, after training with this method, the features learned by the CARNet model exhibit excellent intra-class aggregation and inter-class separation characteristics in the t-SNE dimensionality reduction visualization, which intuitively proves the effectiveness of the multi-task loss function.
[0198] Early warning implementation: Based on the above performance, the system early warning rules are set: when the real-time prediction result is "inferior product (L)" or the prediction confidence is lower than 0.7, an alarm is triggered immediately. This early warning system provides operators with a process adjustment time window of up to 30 to 90 minutes, fundamentally changing the passive situation of relying on "post-testing".
[0199] In summary, this embodiment fully demonstrates the entire process from data acquisition to final early warning, and proves through detailed experimental data the outstanding effectiveness and industrial application value of the method of the present invention in solving the problems of mid-process prediction of rare earth electrolysis purity, small sample learning, and improving early warning accuracy.
[0200] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included within the scope of the present invention.
Claims
1. A method for early warning of the purity of rare earth electrolytic products, characterized in that, The specific steps are as follows: Step 1: Collect multimodal time-series process parameters and corresponding product purity labels for rare earth electrolysis, perform preprocessing and alignment, and construct a standardized dataset containing labeled and unlabeled sample sets. Step 2: Construct a convolutional attention residual network CARNet as a purity classification model. This model includes a feature extraction module, a temporal modeling module, an attention mechanism module, and a classification output module. It is optimized using a joint loss function that integrates classification loss, inter-class separation loss, and intra-class compaction loss. Step 3: Train the CARNet model using a combined data completion and semi-supervised training strategy, specifically including: Step S31: Train a bidirectional long short-term memory network BiLSTM as a time-series data completion model, and learn by predicting the subsequent data based on the preceding data of the input sequence. Step S32: Using the trained BiLSTM model, complete the data of the samples in the labeled sample set and generate pseudo-complete samples, which together with the original labeled samples constitute the enhanced training set. Step S33: Use the augmented training set to perform initial training on the CARNet model to obtain the initial model; then use the initial model to generate pseudo-labels for the samples in the unlabeled sample set, and merge the unlabeled samples with pseudo-labels with the augmented training set to perform semi-supervised co-training on the CARNet model to obtain the final warning model. Step 4: In the actual electrolysis process, process parameter data for the first M time steps are collected in real time, and the BiLSTM model is used to complete the sequence. The data is then input into the final early warning model to obtain the early prediction result of product purity, thereby achieving early warning.
2. The method for early warning of the purity of rare earth electrolytic products according to claim 1, characterized in that, In step one, the multimodal sequential process parameters include at least: electrolyte surface temperature, visual features extracted from the electrolytic cell surface image, cell current, cell voltage, and feed rate; The preprocessing includes: correcting abnormal temperature data using a pre-trained neural network model based on visual features, current, voltage, and material feeding data; and automatically identifying the furnace exit time based on image analysis to achieve time-series alignment between process data and product quality labels.
3. The method for early warning of the purity of rare earth electrolytic products according to claim 1, characterized in that, In step two, the feature extraction module of the CARNet model contains at least one residual block, which integrates dilated convolutional layers. The joint loss function is specifically expressed as follows: ; in, For cross-entropy loss, To facilitate the separation of features from different categories, To induce the loss of similar features, and All are non-negative hyperparameters.
4. The method for early warning of the purity of rare earth electrolytic products according to claim 1, characterized in that, In step S33, the process of generating pseudo-labels for unlabeled samples is as follows: first, the BiLSTM model is used to complete the front-end data of the unlabeled samples into a pseudo-complete sequence, and then the initial model is used to predict the pseudo-complete sequence. Only samples with prediction confidence higher than a preset threshold and their prediction categories are included in the semi-supervised training set.
5. The method for early warning of the purity of rare earth electrolytic products according to claim 1, characterized in that, In step four, M is 30, 60, or 90, corresponding to a purity warning 90 minutes, 60 minutes, or 30 minutes in advance, respectively.
6. A purity early warning system for rare earth electrolytic products, characterized in that, For implementing the early warning method as described in any one of claims 1-5, comprising: Data acquisition and preprocessing module: used to acquire multi-source sensor data from the electrolytic cell in real time and perform preprocessing and alignment operations; Time series data completion module: Built-in pre-trained BiLSTM model, used to complete the real-time acquired partial sequences into complete sequences; Purity prediction and early warning module: The built-in pre-trained CARNet model is used to receive the completed sequence, output the purity prediction category and confidence level, and trigger an early warning signal when the prediction result is poor or the confidence level exceeds the limit; Human-computer interaction and display module: used to display real-time data, prediction results, early warning information and historical records.
7. The purity early warning system for rare earth electrolytic products according to claim 6, characterized in that, The system is deployed as a software service on an industrial server or cloud platform and communicates with field data acquisition equipment and factory production execution systems through an industrial network.