Cvae-based milk powder drying tower abnormality self-adaptive recovery method and system

CN122945388APending Publication Date: 2026-10-20SHANGHAI HUAIXIN INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610895894.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-22
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

1.微小异常(如温度缓慢漂移3至5℃、负压轻微波动)难以被传统阈值法及时识别;

Benefits of technology

1.高灵敏度微小异常检测:CVAE能够从大量正常工况数据中学习深层特征表示,有效处理多变量耦合问题,相比传统阈值法,可更快速、准确地识别微小异常工况;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This application relates to the field of intelligent control technology for industrial processes, and provides a method and system for adaptive recovery of anomalies in milk powder drying towers based on CVAE (Continuous Chemical Aspect-Oriented Array). The method includes offline training and online operation phases: the offline phase trains a CVAE model with fused product embeddings and determines the anomaly detection threshold; the online phase detects anomalies through the reconstruction error output by the model, solves the control objective containing L2 norm and physical process constraints in the latent space, and generates a smooth control path through linear interpolation when the difference does not meet preset conditions. This application achieves adaptive detection and smooth recovery of abnormal operating conditions for different milk powder products, effectively improving production stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent control technology for industrial processes, specifically to an adaptive recovery method and system for abnormalities in milk powder drying towers based on CVAE. Background Technology

[0002] The spray drying tower for milk powder is a core piece of equipment in a dairy processing production line. Its main operating parameters include: inlet air temperature (160 to 220℃), material temperature (70 to 80℃), exhaust air temperature (85 to 95℃), internal negative pressure (0 to 200 Pa), inlet air flow rate (100,000 to 140,000 kg / h), and material flow rate (4,000 to 8,000 kg / h). These parameters exhibit strong coupling, large time delays, and nonlinear characteristics, and are easily affected by disturbances such as batch differences in raw materials and fluctuations in ambient temperature and humidity during production.

[0003] Existing methods for handling abnormal operating conditions mainly rely on manual experience or fixed threshold alarm mechanisms, which have the following significant shortcomings: 1. Minor anomalies (such as slow temperature drift of 3 to 5°C or slight fluctuations in negative pressure) are difficult to identify in a timely manner using traditional threshold methods; 2. Lacks the ability to generate automated control paths to autonomously recover from the current state to normal operating conditions after an anomaly occurs; 3. Existing unsupervised anomaly detection methods (such as PCA and autoencoders) are not organically integrated with downstream control path planning. Summary of the Invention

[0004] To help solve the above-mentioned technical problems, this application provides a method and system for adaptive recovery of anomalies in milk powder drying towers based on CVAE.

[0005] In the first aspect, this application provides an adaptive recovery method for anomalies in a milk powder drying tower based on CVAE, which includes an offline training phase and an online running phase; Offline training phase: The operating parameters of the spray drying tower are collected and preprocessed to obtain standardized feature vectors; a conditional variational autoencoder model is constructed and trained, which includes an item embedding layer, an encoder, and a decoder; during training, the item embedding vector is concatenated with the standardized feature vector and then input into the encoder, and the item embedding vector is concatenated with the latent space vector and then input into the decoder; the reconstruction error is calculated using the validation set and the anomaly detection threshold is determined. During the online operation phase: Real-time acquisition of current operating parameters and preprocessing to obtain the current standardized feature vector; inputting the current standardized feature vector and the current item embedding vector into the trained model to obtain the current reconstruction error and the current latent space vector. If the current reconstruction error is greater than the anomaly detection threshold, it is determined to be an abnormal operating condition; using the current latent space vector as the initial solution, constructing an objective function containing L2 norm constraints and physical process constraints, and optimizing the solution to obtain the target latent space vector; inputting the target latent space vector and the current item embedding vector into the decoder to obtain the target reconstruction feature vector. If the difference between the target reconstruction feature vector and the current standardized feature vector meets the preset conditions, the target reconstruction feature vector is output as the setpoint of the control system; otherwise, linear interpolation is performed in the latent space from the current latent space vector to the target latent space vector to generate a control path; executing the control path and continuously monitoring the real-time reconstruction error, and determining whether to restore normal operation or regenerate the control target based on the monitoring results.

[0006] During the offline training phase, the collected operating parameters include inlet air temperature, inlet air flow rate, feed temperature, feed flow rate, exhaust air temperature, negative pressure inside the tower, static air temperature, and static air flow rate. The Z-score standardization method is used for preprocessing, which involves subtracting the mean of each variable from its original value in the training set and then dividing by the standard deviation to obtain a standardized feature vector. Normal operating condition data is split into a training set and a validation set according to a preset ratio, while all abnormal operating condition data is added to the validation set.

[0007] When constructing the conditional variational autoencoder model, the encoder maps the concatenated vector to the mean and variance of the latent space distribution, and obtains the latent space vector through reparameterized sampling; the item embedding layer uses a trainable embedding matrix to encode milk powder items.

[0008] The specific architecture of the conditional variational autoencoder model is as follows: Item embedding layer: Outputs item embedding vectors in the item embedding dimension; Encoder: The input is the encoder input dimension vector, which is the result of concatenating the standardized feature vector of the input feature dimension and the item embedding vector of the item embedding dimension. It contains ReLU activated hidden layers of the encoder's first hidden layer dimension, the encoder's second hidden layer dimension, and the encoder's third hidden layer dimension in sequence. The output layer is the encoder output dimension, where the first input feature dimension is the mean of the latent space distribution and the second input feature dimension is the logarithm of the variance of the latent space distribution. Decoder: The input is the latent space vector of the input feature dimension and the item embedding vector of the item embedding dimension, which are concatenated into the decoder input dimension vector. It successively contains the ReLU activated hidden layers of the encoder's third hidden layer dimension, the encoder's second hidden layer dimension, and the encoder's first hidden layer dimension. The output layer is the reconstructed feature vector of the input feature dimension.

[0009] The formula for calculating the reconstruction error is: , Among them, e recon x represents the reconstruction error of a single sample, where n is the preset feature dimension; i For the standardized input value of the i-th running parameter, The reconstructed value of the i-th running parameter output by the decoder; The method for determining the anomaly detection threshold is as follows: the reconstruction errors of all samples in the validation set are deduplicated and sorted in descending order to generate a candidate threshold list. The corresponding true positive rate and false positive rate are calculated by traversing each candidate threshold. The threshold that maximizes the difference between the true positive rate and the false positive rate is selected as the optimal anomaly detection threshold.

[0010] When training the conditional variational autoencoder model, the loss function is a band loss function. The variational autoencoder loss function for the coefficients is calculated using the following formula: Where L is the lower bound loss value of the evidence. Indicates the approximate posterior distribution The expected value of the following mathematical expression The latent space is an approximate posterior distribution of the encoder output. Let z be the trainable network parameters of the encoder, z be the latent space vector, and x be the normalized feature vector of the input. The log-likelihood value is the output of the decoder. These are the trainable network parameters for the decoder; To balance the reconstruction loss with the preset weighting coefficients of the KL divergence regularization term, D KL is the KL divergence operator; p(z) is the prior distribution of the latent space, which follows a standard normal distribution.

[0011] During the online operation phase, the sampling period for the operation parameters is a preset sampling period. The preprocessing of the current operation parameters collected in real time adopts the same Zscore standardization method as the offline training phase. The mean and standard deviation of the training set are used to standardize the current operation parameters to obtain the current standardized feature vector.

[0012] The formula for calculating the objective function is as follows: Where Loss is the objective function value. The L2 norm constraint term is used to ensure that the latent vector conforms to the standard normal prior distribution; f is the physical process constraint term, decoder(z, e) curr ( ) is to combine the latent space vector z with the current item embedding vector e curr The concatenated feature vector is input into the decoder to obtain the reconstructed feature vector; x currThis is the current standardized feature vector; The physical process constraints include at least the following: Less than the first preset single temperature adjustment threshold; The feed temperature is below the preset upper limit. T milk_decoder To decode the feed temperature in the state vector, T milk_curr The current feed temperature, The preset conditions are that the difference between the inlet air temperature in the target reconstructed feature vector and the current inlet air temperature is less than the second preset single temperature adjustment threshold, and the difference between the feed temperature in the target reconstructed feature vector and the current feed temperature is less than the third preset single temperature adjustment threshold.

[0013] The formula for calculating the control path using linear interpolation in the latent space is: , where z k Let z be the latent space vector of the k-th interpolation sampling point, where k is the sampling point index, ranging from 0 to N; N is the preset total interpolation step size, generating N+1 consecutive sampling points; curr z is the latent space vector of the current anomalous state; target To optimize the obtained target latent space vector, the execution cycle of each control step in the control path is a preset control step execution cycle.

[0014] Secondly, this application provides a CVAE-based adaptive recovery system for milk powder drying tower anomalies, wherein the system is used to execute the CVAE-based adaptive recovery method for milk powder drying tower anomalies as described in any one of the first aspects, the system comprising: The offline training module is used to perform all the operations of the offline training phase in claim 1: collecting the operating parameters of the spray drying tower and preprocessing them to obtain standardized feature vectors, constructing and training a conditional variational autoencoder model, and using the validation set to calculate the reconstruction error and determine the anomaly detection threshold; the model includes an item embedding layer, an encoder, and a decoder; during training, the item embedding vector is concatenated with the standardized feature vector and then input into the encoder, and the item embedding vector is concatenated with the latent space vector and then input into the decoder; The online operation module is used to perform all operations in the online operation phase of claim 1: real-time acquisition of current operating parameters and preprocessing to obtain the current standardized feature vector; inputting the current standardized feature vector and the current item embedding vector into the trained model to obtain the current reconstruction error and the current latent space vector; if the current reconstruction error is greater than the anomaly detection threshold, it is determined to be an abnormal operating condition; constructing an objective function containing L2 norm constraints and physical process constraints with the current latent space vector as the initial solution, and optimizing the solution to obtain the target latent space vector; inputting the target latent space vector and the current item embedding vector into the decoder to obtain the target reconstruction feature vector; if the difference between the target reconstruction feature vector and the current standardized feature vector meets the preset conditions, the target reconstruction feature vector is output as the setpoint of the control system; otherwise, linear interpolation is performed in the latent space from the current latent space vector to the target latent space vector to generate a control path; executing the control path and continuously monitoring the real-time reconstruction error, and determining whether to restore normal or regenerate the control target based on the monitoring results.

[0015] In summary, compared with the prior art, this application has the following advantages: 1. High-sensitivity detection of minute anomalies: CVAE can learn deep feature representations from a large amount of normal operating condition data, effectively handling multivariate coupling problems. Compared with the traditional threshold method, it can identify minute anomalies more quickly and accurately. 2. Automated control path generation: Automatically generates feasible control trajectories that conform to physical and process constraints from abnormal to normal states, avoiding the tedious process and potential risks of manually setting recovery paths; 3. Stable operation guarantee: Using this application can significantly improve the operational stability of spray drying towers, reduce product quality fluctuations, and lower the rate of defective products. Attached Figure Description

[0016] Figure 1 This is a diagram of the overall system architecture of this application; Figure 2 This is a schematic diagram of the CVAE model structure of this application; Figure 3 A flowchart is generated for the control path of this application. Detailed Implementation

[0017] The present application will be further described below with reference to the accompanying drawings. The principles of the present application are very clear to those skilled in the art. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

[0018] Figure 1 This is the overall system architecture diagram of this application, which is divided into two interconnected core parts: the offline training stage and the online execution stage, demonstrating the entire process logic from model building to anomaly adaptive recovery: Offline training phase: This phase provides the model and threshold foundation for online operation, and executes the following steps in sequence: First, data collection of operating parameters is performed, and the collected raw data is preprocessed; next, the milk powder items are encoded to obtain item embedding features; the preprocessed features and item embedding features are input into a conditional variational autoencoder (CVAE) for model training; after training, the reconstruction error is calculated using the validation set and the anomaly detection threshold is determined; finally, the trained model parameters and the determined anomaly detection threshold are saved and output to the online operation phase.

[0019] Online Operation Phase: Real-time anomaly monitoring and adaptive recovery are achieved, forming a closed-loop control process: First, the operating parameters of the spray drying tower are collected in real time, and the real-time data is processed for feature standardization. The standardized features are input into the anomaly detection module, and anomaly judgment is made in combination with the anomaly detection threshold determined in the offline phase. If the condition is determined to be normal, the system returns to the real-time data acquisition step to continue monitoring. If the condition is determined to be abnormal, the system enters the control target generation step to solve for the target state that satisfies the constraints in the latent space. Then, a difference judgment is made: If the difference between the target state and the current state is small, the system setpoint is directly output and the system returns to real-time data acquisition. If the difference is large, a multi-step smooth control path is generated, and the system enters the recovery process monitoring phase. During the recovery process, if the system is determined not to have recovered, the system returns to the control target generation step to solve for the target again. If the system is determined to have recovered, the system returns to the real-time data acquisition step to continue normalized monitoring.

[0020] 1. This application consists of two phases: offline training and online operation. In the offline phase, normal and abnormal operating condition data are collected to train a CVAE model that integrates the characteristics of milk powder products and determine the anomaly detection threshold. In the online phase, operating parameters are monitored in real time, anomaly detection is performed based on reconstruction error, and after an anomaly is triggered, the control objective that satisfies the physical process constraints is solved in the latent space. A smooth control path is generated through linear interpolation, and the recovery effect is monitored in a closed loop.

[0021] 2. Offline training phase.

[0022] 2.1 Data Acquisition and Preprocessing.

[0023] In the spray drying tower control system at the milk powder production site, eight core operating parameters are collected, including: inlet air temperature, inlet air flow rate, feed temperature, feed flow rate, exhaust air temperature, tower negative pressure, static air temperature, and static air flow rate. The sampling period is set to 10 seconds, and operating data is continuously collected for 30 days, covering normal operating conditions for mainstream products such as whole milk powder, skim milk powder, and modified milk powder, as well as typical abnormal operating conditions such as inlet air temperature drift, feed flow rate fluctuation, and abnormal tower negative pressure.

[0024] The Z-score standardization method is used to preprocess the raw data to eliminate the differences in the units of measurement of different variables. The calculation formula is as follows: , where X i This is the original value of the i-th running parameter. Let be the mean of the i-th operating parameter across all normal operating condition samples. Let be the standard deviation of the i-th operating parameter across all normal operating condition samples.

[0025] The preprocessed normal operating condition data was randomly split into training and validation sets at a ratio of 9:1. All abnormal operating condition data were added to the validation set for subsequent model validation and threshold determination.

[0026] 2.2 CVAE Model Construction and Training.

[0027] Figure 2 This is a schematic diagram of the CVAE model structure of this application. The model consists of three core parts connected in sequence: an encoder, a reparameterization module, and a decoder. It fully demonstrates the fusion mechanism and data flow of item embedding condition information: Encoder: The input is a concatenated vector of standardized feature vector and item embedding vector. It is processed through fully connected layer 1 and fully connected layer 2 for feature extraction. Finally, it outputs two parallel branches: the mean of the latent space distribution and the logarithm of the variance of the latent space distribution.

[0028] Reparameterization module: Receives the mean and variance of the encoder output and generates a continuously differentiable latent space vector through reparameterization sampling operation, solving the gradient backpropagation problem in the training process of variational autoencoder.

[0029] Decoder: The input is a concatenated vector of latent space vector z and item embedding vector e. It is passed through fully connected layer 3 and fully connected layer 4 for feature reconstruction. The final output is a reconstructed feature vector with the same dimension as the input.

[0030] The core feature of this model is that the item embedding vector acts on the input of both the encoder and decoder, integrating milk powder item information as a global condition into the entire encoding-decoding process, thereby achieving differentiated modeling and reconstruction for different item conditions.

[0031] A conditional variational autoencoder model comprising an item embedding layer, an encoder, and a decoder is constructed, with the specific architecture as follows: Product Embedding Layer: A trainable embedding matrix is ​​used to encode milk powder products, outputting a 16-dimensional product embedding vector. This embodiment includes 3 types of milk powder products, and the embedding matrix size is 3×16.

[0032] Encoder: The input is a 24-dimensional vector obtained by concatenating an 8-dimensional normalized feature vector and a 16-dimensional item embedding vector. It contains ReLU activation hidden layers of 128, 64, and 32 dimensions in sequence. The output layer is 16-dimensional, where the first 8 dimensions are the mean of the latent space distribution and the last 8 dimensions are the logarithm of the variance of the latent space distribution.

[0033] Decoder: The input is a 32-dimensional vector obtained by concatenating an 8-dimensional latent space vector and a 16-dimensional item embedding vector. It contains ReLU activation hidden layers of 32, 64, and 128 dimensions in sequence. The output layer is an 8-dimensional reconstructed feature vector.

[0034] During model training, the item embedding vector and the standardized feature vector are first concatenated and then input into the encoder to obtain the mean and variance of the latent space distribution; the latent space vector z is obtained through reparameterized sampling.

[0035] The latent space vector and the item embedding vector are concatenated and then input into the decoder to obtain the reconstructed feature vector. A method using... The conditional variational autoencoder with coefficients is trained using the evidence lower bound loss function, calculated as follows: Where L is the lower bound loss value of the evidence. Indicates the approximate posterior distribution The expected value of the following mathematical expression The latent space is an approximate posterior distribution of the encoder output. Let z be the trainable network parameters of the encoder, z be the latent space vector, and x be the normalized feature vector of the input. The log-likelihood value is the output of the decoder. These are the trainable network parameters for the decoder; To balance the reconstruction loss with the preset weighting coefficients of the KL divergence regularization term, D KL is the KL divergence operator; p(z) is the prior distribution of the latent space, which follows a standard normal distribution.

[0036] The model was trained using the Adam optimizer with an initial learning rate of 1e4, a batch size of 256, a maximum of 100 training epochs, and a learning rate decay strategy of halving the learning rate every 20 training epochs. Training was terminated early, and the optimal model parameters were saved, when the loss on the validation set no longer decreased after 10 consecutive training epochs.

[0037] 2.3 Determination of anomaly detection threshold.

[0038] The standardized feature vectors of the validation set and the corresponding item embedding vectors are input into the trained CVAE model, and the resulting vectors are decoded to obtain the reconstructed feature vectors of the validation set. The reconstruction error for each sample is calculated using the following formula: , Among them, erecon x represents the reconstruction error of a single sample, where n is the preset feature dimension; i For the standardized input value of the i-th running parameter, This is the reconstructed value of the i-th running parameter output by the decoder.

[0039] The reconstruction errors of all samples in the validation set are deduplicated and sorted in descending order to generate a candidate threshold list. For each candidate threshold, the corresponding True Positive Rate (TPR) and False Positive Rate (FPR) are calculated. The threshold that maximizes the difference between the TPR and FPR is selected as the optimal anomaly detection threshold. In this embodiment, the optimal anomaly detection threshold is 1.23.

[0040] 3. Online operation phase.

[0041] 3.1 Real-time data acquisition and preprocessing.

[0042] During the online operation phase, eight core operating parameters of the spray drying tower are collected in real time at a sampling period of 10 seconds. The same Zscore normalization method as in the offline training phase is used to standardize the real-time collected operating parameters using the mean and standard deviation of the training set to obtain the current standardized feature vector.

[0043] 3.2 Anomaly detection.

[0044] The current standardized feature vector and the corresponding item embedding vector of the currently produced milk powder are input into the trained CVAE model to obtain the current reconstructed feature vector and the current latent space vector. The current reconstruction error is calculated using the following formula: e recon Let x be the reconstruction error of the current sample. curr Given the current standardized feature vector, decoder(z, e) curr ( ) is to combine the latent space vector z with the current item embedding vector e curr The reconstructed feature vector obtained by inputting the concatenated vector into the decoder is confirmed as an abnormal condition when the current reconstruction error is determined to be greater than the optimal anomaly detection threshold for three consecutive times, thus triggering the adaptive recovery process.

[0045] 3.3 Control target generation.

[0046] Using the latent space vector of the current anomalous state as the initial solution, an objective function containing L2 norm constraints and physical process constraints is constructed. The objective latent space vector is then obtained by solving a gradient descent optimization solver. The formula for calculating the objective function is: Where Loss is the objective function value. The L2 norm constraint term is used to ensure that the latent vector conforms to the standard normal prior distribution; f is the physical process constraint term, decoder(z, e) curr ( ) is to combine the latent space vector z with the current item embedding vector e curr The concatenated feature vector is input into the decoder to obtain the reconstructed feature vector; x curr This is the current standardized feature vector; The physical process constraints include at least the following: Less than (10℃) 2 ; Less than 80℃; T milk_decoder To decode the feed temperature in the state vector, T milk_curr The current feed temperature, The target latent space vector obtained from the solution and the current item embedding vector are input into the decoder to obtain the target reconstruction feature vector. If the difference between the inlet air temperature in the target reconstruction feature vector and the current inlet air temperature is less than 5℃, and the difference between the feed temperature in the target reconstruction feature vector and the current feed temperature is less than 3℃, then the target reconstruction feature vector is directly de-normalized and used as the setpoint output of the control system; otherwise, the control path generation step is executed.

[0047] 3.4 Control path generation.

[0048] Figure 3 The flowchart for generating the control path in this application illustrates the complete logic for generating a smooth transition control path from the current latent space state under abnormal conditions: using the current latent space vector z corresponding to the abnormal state. curr Starting from this point, the target latent space vector z is obtained through constrained optimization. target First, determine whether the difference between the target reconstructed feature vector after decoding the target latent space vector and the current standardized feature vector meets the preset conditions: if it does, then directly use the target reconstructed feature vector as the final control output; if it does not, then generate N interpolation sampling points between the current latent space vector and the target latent space vector, where the 0th sampling point z0 is equal to the current latent space vector z curr The Nth sampling point z N Equal to the target latent space vector z target The first to N-1 sampling points are obtained by linear interpolation; all sampling points are concatenated with the current item embedding vector and then input into the decoder to obtain the corresponding reconstructed feature vector sequence, which finally forms a multi-step smooth control path sequence.

[0049] Linear interpolation is performed on the current latent space vector to the target latent space vector in the latent space to generate multiple consecutive latent space vector sampling points. The calculation formula is as follows: , where z k Let z be the latent space vector of the k-th interpolation sampling point, where k is the sampling point index, ranging from 0 to N; N is the preset total number of interpolation steps, in this embodiment N=10, generating 11 consecutive latent space vector sampling points. curr z is the latent space vector of the current anomalous state; target To optimize the obtained target latent space vector.

[0050] Each interpolated sampling point is concatenated with the current item embedding vector and input into the decoder to obtain the corresponding reconstructed feature vector. After denormalization, a multi-step smooth control path is formed. The execution cycle of each control step in the control path is 30 seconds.

[0051] 3.5 Monitoring and termination of the recovery process.

[0052] During the execution of the control path, the real-time reconstruction error is continuously monitored. If the reconstruction error of five consecutive real-time sampling points is less than the optimal anomaly detection threshold, the system is determined to have returned to normal, and the recovery control is terminated. If the reconstruction error is still greater than the optimal anomaly detection threshold after the control path is executed, the process returns to the control target generation step to regenerate the control target and control path.

[0053] 4. This application also proposes a CVAE-based adaptive recovery system for milk powder drying tower anomalies, used to execute the above-described CVAE-based adaptive recovery method for milk powder drying tower anomalies, the system comprising: The offline training module is used to perform all the operations in the offline training phase described above: collecting the operating parameters of the spray drying tower and preprocessing them to obtain standardized feature vectors, constructing and training a conditional variational autoencoder model, and using the validation set to calculate the reconstruction error and determine the anomaly detection threshold; the model includes an item embedding layer, an encoder, and a decoder; during training, the item embedding vector is concatenated with the standardized feature vector and then input into the encoder, and the item embedding vector is concatenated with the latent space vector and then input into the decoder; The online operation module performs all operations of the online operation phase described above: It collects current operating parameters in real time and preprocesses them to obtain the current standardized feature vector; it inputs the current standardized feature vector and the current item embedding vector into the trained model to obtain the current reconstruction error and the current latent space vector; if the current reconstruction error is greater than the anomaly detection threshold, it is determined to be an abnormal operating condition; it constructs an objective function containing L2 norm constraints and physical process constraints using the current latent space vector as the initial solution, and optimizes the solution to obtain the target latent space vector; it inputs the target latent space vector and the current item embedding vector into the decoder to obtain the target reconstruction feature vector; if the difference between the target reconstruction feature vector and the current standardized feature vector meets a preset condition, it outputs the target reconstruction feature vector as the setpoint of the control system; otherwise, it performs linear interpolation from the current latent space vector to the target latent space vector in the latent space to generate a control path; it executes the control path and continuously monitors the real-time reconstruction error, determining whether to restore normal operation or regenerate the control target based on the monitoring results.

[0054] 5.1 Overview of the Implementation Examples.

[0055] This embodiment is based on actual production data from a dairy company's spray drying tower for milk powder. The drying tower has a designed capacity of 5 tons / hour and mainly produces whole milk powder and skim milk powder.

[0056] 5.2 Data Acquisition and Preprocessing.

[0057] Production records from April 2026 were collected, yielding approximately 600,000 valid samples, including about 570,000 samples from normal operating conditions and about 30,000 samples from abnormal operating conditions. The sampling period was 10 seconds. The data includes the following 8 key variables:

[0058] Table 1 The Zscore standardization method described above is used to preprocess each variable. The standardized data range is concentrated in the [3,3] interval, which effectively improves the stability and convergence speed of model training.

[0059] The normal operating condition data was divided into a training set and a validation set in a 9:1 ratio. The training set contained approximately 513,000 samples, and the validation set contained approximately 57,000 samples. All abnormal operating condition data (approximately 30,000 samples) were added to the validation set and used to calculate the anomaly detection threshold and evaluate the model performance.

[0060] 5.3 CVAE Model Construction and Training.

[0061] 5.3.1 Model architecture design.

[0062] Encoder structure: Input layer: 8-dimensional (feature vector) + 16-dimensional (item embedding) = 24-dimensional; Hidden layer 1: 128-dimensional, ReLU activation function; Hidden layer 2: 64-dimensional, ReLU activation function; Hidden layer 3: 32-dimensional, ReLU activation function; Output layer: 16 dimensions (mean 8 dimensions + variance 8 dimensions); Decoder structure: Input layer: 8-dimensional (latent vectors) + 16-dimensional (item embeddings) = 32-dimensional; Hidden layer 1: 32-dimensional, ReLU activation function; Hidden layer 2: 64-dimensional, ReLU activation function; Hidden layer 3: 128-dimensional, ReLU activation function; Output layer: 8-dimensional; Item embedding layer: Two items are encoded using a trainable 16-dimensional embedding matrix, and the embedding vectors are automatically learned during training.

[0063] 5.3.2 Loss Function.

[0064] Using belt The variational autoencoder loss function for coefficients: Where L is the lower bound loss value of the evidence. Indicates the approximate posterior distribution The expected value of the following mathematical expression The latent space is an approximate posterior distribution of the encoder output. Let z be the trainable network parameters of the encoder, z be the latent space vector, and x be the normalized feature vector of the input. The log-likelihood value is the output of the decoder. These are the trainable network parameters for the decoder; To balance the reconstruction loss with the preset weighting coefficient of the KL divergence regularization term, this embodiment uses a value of 1.0, D KL is the KL divergence operator; p(z) is the prior distribution of the latent space, which follows a standard normal distribution.

[0065] 5.3.3 Training process.

[0066] Optimizer: Adam optimizer, with an initial learning rate of 1e4; Batch size: 256; Training epochs: 100 epochs; Learning rate decay: The learning rate is halved every 20 epochs; Hardware environment: NVIDIA RTX 3090 GPU, CUDA 12.4; Training time: Approximately 6 hours; During training, the loss function error is monitored on the validation set. Training is terminated early when the validation error no longer decreases after 10 consecutive epochs.

[0067] 5.4 Determination of anomaly detection threshold.

[0068] 5.4.1 Calculation of reconstruction error.

[0069] Calculate the reconstruction error for each sample on the validation set: , where e recon x represents the reconstruction error of a single sample, where n is the preset feature dimension; i For the standardized input value of the i-th running parameter, The reconstructed value of the i-th running parameter output by the decoder is n, which is 8 in this embodiment.

[0070] 7.4.2 Threshold selection method.

[0071] The optimal threshold was determined using ROC curve analysis. 1. Remove duplicates from the reconstruction errors on the validation set and sort them in descending order to generate a candidate threshold list; 2. Iterate through each candidate threshold and calculate the corresponding True Positive Rate (TPR) and False Positive Rate (FPR). 3. Plot the ROC curve and select the threshold corresponding to the point in the upper left corner of the curve that is closest to (0,1) (at which point TPRFPR is the largest) as the optimal threshold; 4. In this embodiment, the optimal threshold is 1.23, corresponding to TPR=0.9672 and FPR=0.0182.

[0072] 7.5 Online running test.

[0073] 7.5.1 Test dataset.

[0074] The test set was selected from actual production data in May 2026, containing approximately 43,000 samples, of which approximately 41,000 were under normal operating conditions and approximately 2,000 were under abnormal operating conditions. Abnormal operating conditions included temperature drift, negative pressure fluctuations, and abnormal flow rates.

[0075] 7.5.2 Test Indicators.

[0076]

[0077] Table 2 Experimental results show that, compared with the traditional threshold method and PCA method, this application can significantly improve the true positive rate and reduce the false positive rate, and can automatically recover within minutes (PCA and the traditional threshold method require manual intervention for adjustment).

[0078] 7.6 Typical Case Analysis.

[0079] Case 1: Slow and abnormal drift in intake air temperature.

[0080] Anomaly Description: From 14:30 to 15:00 on May 15, 2026, the inlet air temperature slowly rose from 185℃ to 192℃ (drift of 7℃), which is a typical minor anomaly. Detection process: At 14:35, the system detected a reconstruction error of 1.25 (exceeding the threshold of 1.23), and after three consecutive confirmations, it was determined to be an abnormal operating condition; Control target generation: The calculated target state is an inlet air temperature of 185℃ and a feed flow rate of 5200 kg / h. Control path generation: Generate 10 interpolation points, with a control cycle of 30 seconds; Recovery process: By gradually reducing the air intake flow rate (from 120,000 kg / h to 115,000 kg / h) and increasing the feed flow rate (from 4,800 kg / h to 5,200 kg / h), the system will be restored to normal within 12 minutes; Recovery result: After recovery, the reconstruction error was reduced to 0.85, and the system ran stably.

[0081] The technical scope of this application is not limited to the contents of the above specification. Those skilled in the art can make various modifications and variations to the above embodiments without departing from the technical concept of this application, and all such modifications and variations should fall within the scope of this application.

Claims

1. A method for adaptive recovery of anomalies in a milk powder drying tower based on CVAE, characterized in that, Includes an offline training phase and an online execution phase; Offline training phase: Collect the operating parameters of the spray drying tower and preprocess them to obtain standardized feature vectors; A conditional variational autoencoder model is constructed and trained. The model includes an item embedding layer, an encoder, and a decoder. During training, the item embedding vector is concatenated with the normalized feature vector and then input into the encoder, and the item embedding vector is concatenated with the latent space vector and then input into the decoder. The reconstruction error is calculated using the validation set and the anomaly detection threshold is determined. During the online operation phase: Real-time acquisition of current operating parameters and preprocessing to obtain the current standardized feature vector; inputting the current standardized feature vector and the current item embedding vector into the trained model to obtain the current reconstruction error and the current latent space vector. If the current reconstruction error is greater than the anomaly detection threshold, it is determined to be an abnormal operating condition; using the current latent space vector as the initial solution, constructing an objective function containing L2 norm constraints and physical process constraints, and optimizing the solution to obtain the target latent space vector; inputting the target latent space vector and the current item embedding vector into the decoder to obtain the target reconstruction feature vector. If the difference between the target reconstruction feature vector and the current standardized feature vector meets the preset conditions, the target reconstruction feature vector is output as the setpoint of the control system; otherwise, linear interpolation is performed in the latent space from the current latent space vector to the target latent space vector to generate a control path; executing the control path and continuously monitoring the real-time reconstruction error, and determining whether to restore normal operation or regenerate the control target based on the monitoring results.

2. The adaptive recovery method for anomalies in a milk powder drying tower based on CVAE according to claim 1, characterized in that, During the offline training phase, the collected operating parameters include inlet air temperature, inlet air flow rate, feed temperature, feed flow rate, exhaust air temperature, negative pressure inside the tower, static air temperature, and static air flow rate. Z-score standardization is used for preprocessing, which involves subtracting the mean of each variable from its original value in the training set and then dividing by the standard deviation to obtain a standardized feature vector. Normal operating condition data is split into a training set and a validation set according to a preset ratio, while all abnormal operating condition data is added to the validation set.

3. The adaptive recovery method for anomalies in a milk powder drying tower based on CVAE according to claim 1, characterized in that, When constructing the conditional variational autoencoder model, the encoder maps the concatenated vector to the mean and variance of the latent space distribution, and obtains the latent space vector through reparameterized sampling; the item embedding layer uses a trainable embedding matrix to encode milk powder items.

4. The adaptive recovery method for anomalies in a milk powder drying tower based on CVAE according to claim 1, characterized in that, The specific architecture of the conditional variational autoencoder model is as follows: Item embedding layer: Outputs item embedding vectors in the item embedding dimension; Encoder: The input is the encoder input dimension vector, which is the result of concatenating the standardized feature vector of the input feature dimension and the item embedding vector of the item embedding dimension. It contains ReLU activated hidden layers of the encoder's first hidden layer dimension, the encoder's second hidden layer dimension, and the encoder's third hidden layer dimension in sequence. The output layer is the encoder output dimension, where the first input feature dimension is the mean of the latent space distribution and the second input feature dimension is the logarithm of the variance of the latent space distribution. Decoder: The input is the latent space vector of the input feature dimension and the item embedding vector of the item embedding dimension, which are concatenated into the decoder input dimension vector. It successively contains the ReLU activated hidden layers of the encoder's third hidden layer dimension, the encoder's second hidden layer dimension, and the encoder's first hidden layer dimension. The output layer is the reconstructed feature vector of the input feature dimension.

5. The adaptive recovery method for anomalies in a milk powder drying tower based on CVAE according to claim 1, characterized in that, During the offline training phase, the formula for calculating the reconstruction error is: , Among them, e recon x represents the reconstruction error of a single sample, where n is the preset feature dimension; i For the standardized input value of the i-th running parameter, The reconstructed value of the i-th running parameter output by the decoder; The method for determining the anomaly detection threshold is as follows: the reconstruction errors of all samples in the validation set are deduplicated and sorted in descending order to generate a candidate threshold list. The corresponding true positive rate and false positive rate are calculated by traversing each candidate threshold. The threshold that maximizes the difference between the true positive rate and the false positive rate is selected as the optimal anomaly detection threshold.

6. The adaptive recovery method for anomalies in a milk powder drying tower based on CVAE according to claim 1, characterized in that, When training the conditional variational autoencoder model, the loss function is a band loss function. The variational autoencoder loss function for the coefficients is calculated using the following formula: Where L is the lower bound loss value of the evidence. Indicates the approximate posterior distribution The expected value of the following mathematical expression The latent space is an approximate posterior distribution of the encoder output. Let z be the trainable network parameters of the encoder, z be the latent space vector, and x be the normalized feature vector of the input. The log-likelihood value is the output of the decoder. These are the trainable network parameters for the decoder; To balance the reconstruction loss with the preset weighting coefficients of the KL divergence regularization term, D KL is the KL divergence operator; p(z) is the prior distribution of the latent space, which follows a standard normal distribution.

7. The adaptive recovery method for anomalies in a milk powder drying tower based on CVAE according to claim 1, characterized in that, During the online operation phase, the sampling period for the operation parameters is a preset sampling period. The preprocessing of the current operation parameters collected in real time adopts the same Z-score standardization method as the offline training phase. The mean and standard deviation of the training set are used to standardize the current operation parameters to obtain the current standardized feature vector.

8. The adaptive recovery method for anomalies in a milk powder drying tower based on CVAE according to claim 1, characterized in that, The formula for calculating the objective function is as follows: Where Loss is the objective function value. The L2 norm constraint term is used to ensure that the latent vector conforms to the standard normal prior distribution; f is the physical process constraint term, decoder(z, e) curr ( ) is to combine the latent space vector z with the current item embedding vector e curr The concatenated feature vector is input into the decoder to obtain the reconstructed feature vector; x curr This is the current standardized feature vector; The physical process constraints include at least the following: Less than the first preset single temperature adjustment threshold; The feed temperature is below the preset upper limit. T milk_decoder To decode the feed temperature in the state vector, T milk_curr The current feed temperature, The preset conditions are that the difference between the inlet air temperature in the target reconstructed feature vector and the current inlet air temperature is less than the second preset single temperature adjustment threshold, and the difference between the feed temperature in the target reconstructed feature vector and the current feed temperature is less than the third preset single temperature adjustment threshold.

9. The adaptive recovery method for anomalies in a milk powder drying tower based on CVAE according to claim 1, characterized in that, The formula for calculating the control path using linear interpolation in the latent space is: , where z k Let z be the latent space vector of the k-th interpolation sampling point, where k is the sampling point index, ranging from 0 to N; N is the preset total interpolation step size, generating N+1 consecutive sampling points; curr z is the latent space vector of the current anomalous state; target To optimize the obtained target latent space vector, the execution cycle of each control step in the control path is a preset control step execution cycle.

10. A CVAE-based adaptive recovery system for anomalies in a milk powder drying tower, characterized in that, For executing the CVAE-based adaptive recovery method for milk powder drying tower anomalies as described in any one of claims 1 to 9, the system comprises: The offline training module is used to perform all the operations of the offline training phase in claim 1: collecting the operating parameters of the spray drying tower and preprocessing them to obtain standardized feature vectors, constructing and training a conditional variational autoencoder model, and using the validation set to calculate the reconstruction error and determine the anomaly detection threshold; the model includes an item embedding layer, an encoder, and a decoder; during training, the item embedding vector is concatenated with the standardized feature vector and then input into the encoder, and the item embedding vector is concatenated with the latent space vector and then input into the decoder; The online operation module is used to perform all operations in the online operation phase of claim 1: real-time acquisition of current operating parameters and preprocessing to obtain the current standardized feature vector; inputting the current standardized feature vector and the current item embedding vector into the trained model to obtain the current reconstruction error and the current latent space vector; if the current reconstruction error is greater than the anomaly detection threshold, it is determined to be an abnormal operating condition; constructing an objective function containing L2 norm constraints and physical process constraints with the current latent space vector as the initial solution, and optimizing the solution to obtain the target latent space vector; inputting the target latent space vector and the current item embedding vector into the decoder to obtain the target reconstruction feature vector; if the difference between the target reconstruction feature vector and the current standardized feature vector meets the preset conditions, the target reconstruction feature vector is output as the setpoint of the control system; otherwise, linear interpolation is performed in the latent space from the current latent space vector to the target latent space vector to generate a control path; executing the control path and continuously monitoring the real-time reconstruction error, and determining whether to restore normal or regenerate the control target based on the monitoring results.