Freeze-drying process control method and system based on data analysis
Through the lyophilization process control method based on data analysis, using data preprocessing and principal component analysis, combined with the pre-trained lyophilization control model, the precise control of the lyophilization equipment is achieved, solving the problem of low intelligence in the existing technology, and improving the lyophilization efficiency and product quality.
Patent Information
- Application Number
- CN202510268955.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-06-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing lyophilization control technology relies on manual experience, resulting in low intelligence in the lyophilization process and low equipment efficiency, making it difficult to achieve optimal control.
Using a lyophilization process control method based on data analysis, the temperature, humidity and pressure data in the lyophilization box are collected, pre-processed and principal component analysis are performed, and input into the pre-trained lyophilization control model to predict key parameters, and the lyophilization equipment is controlled based on the predicted parameters and actual data.
It improves the intelligence of the freeze-drying process, achieves more accurate equipment control, and improves the consistency of freeze-drying efficiency and product quality.
Smart Images

Figure CN120122444A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of freeze-drying control, and particularly to a freeze-drying process control method and system based on data analysis. Background Art
[0002] Freeze-drying technology, namely lyophilization, is a technology for protecting perishable substances and plays an indispensable role in industries such as food, medicine, and biological products. With the increasing demand for high-quality, high-stability, and long-shelf-life products in the global market, the development of advanced freeze-drying technology has become particularly urgent. However, there are currently many challenges in the field of freeze-drying control technology. First of all, in order to ensure the quality and efficiency of the freeze-drying process, it is necessary to accurately control key parameters such as temperature, humidity, and pressure inside the freeze-drying chamber. Secondly, due to the large number of variables involved in the freeze-drying process and the complex interrelationships between the variables, it is difficult to achieve optimal control solely relying on manual experience. Therefore, how to accurately predict and regulate the dynamic relationships between these factors has become the key to improving the level of freeze-drying technology.
[0003] In an existing technology, first, by introducing an electro-induced nucleation method, effective nucleation of the product is ensured under specified temperature conditions, thereby forming a larger and uniformly distributed internal pore structure. These pores help reduce the resistance encountered during sublimation and accelerate the speed of the entire drying process. Then, during the sublimation drying process, differential scanning calorimetry (DSC) is relied on to determine the ideal heating curve. At the same time, an online monitoring system is deployed to monitor the temperature change of the product in real time. This system instantaneously adjusts the heating power according to the monitored data to ensure that regardless of how the material characteristics or environmental factors change, appropriate treatment can be obtained, maintaining an efficient and stable drying environment and ensuring the consistency of product quality. Then, it enters the desorption drying stage. Based on the understanding of the material characteristics, the heating temperature and duration are reasonably set to completely remove the unfrozen moisture while avoiding damage caused by overheating.
[0004] However, in the existing technology, most processes are based on manual experience for parameter adjustment, with strong subjectivity, and there is no judgment operation based on data analysis, ultimately resulting in a low level of intelligence in the freeze-drying process and low efficiency of freeze-drying equipment. Summary of the Invention
[0005] The present invention provides a freeze-drying process control method and system based on data analysis to improve the level of intelligence of the freeze-drying process and thereby improve the freeze-drying efficiency.
[0006] In a first aspect, to solve the above technical problems, the present invention provides a freeze-drying process control method based on data analysis, including:
[0007] Collecting temperature data, humidity data, and pressure data inside the freeze-drying chamber;
[0008] Preprocess the temperature data, the humidity data, and the pressure data to obtain preprocessed data;
[0009] Perform feature analysis on the preprocessed data by using the principal component analysis method to obtain feature data;
[0010] Input the feature data into a pre-trained freeze-drying control model to obtain prediction parameters, where the prediction parameters include a predicted temperature, a predicted humidity, and a predicted pressure;
[0011] Control a freeze-drying device according to the prediction parameters, the temperature data, the humidity data, and the pressure data.
[0012] In an alternative embodiment, the preprocessing the temperature data, the humidity data, and the pressure data to obtain preprocessed data includes:
[0013] Based on the median criterion, fill in the null values in the temperature data, the humidity data, and the pressure data to obtain complete filled data;
[0014] Identify outliers in the filled data by using the Tukey post hoc test algorithm, and remove the outliers by using the standard score algorithm to obtain normal value data;
[0015] Perform normalization processing on the normal value data to obtain preprocessed data.
[0016] In an alternative embodiment, the performing feature analysis on the preprocessed data by using the principal component analysis method to obtain feature data includes:
[0017] Calculate a covariance matrix according to the preprocessed data;
[0018] Perform eigen decomposition on the covariance matrix to obtain eigenvalues and corresponding eigenvectors;
[0019] Select the eigenvectors corresponding to the top x largest eigenvalues as principal component data, where x is a preset number of principal components;
[0020] Perform a linear transformation on the preprocessed data according to the principal component data to obtain feature data.
[0021] In an alternative embodiment, the training process of the freeze-drying control model includes:
[0022] Construct an initial prediction model by using the ridge regression analysis method according to pre-stored historical feature data and pre-stored actual target values;
[0023] Optimize the initial prediction model through K-fold cross-validation based on the historical feature data to obtain an optimized prediction model;
[0024] Further optimize the optimized prediction model through the Bayesian optimization algorithm to obtain an initial freeze-drying control model;
[0025] Input the historical feature data into the input layer of the initial freeze-drying control model for training to obtain the predicted value data output by the output layer of the initial freeze-drying control model;
[0026] Substitute the predicted value data and the actual target value into the loss function to calculate the loss value and obtain the loss value data;
[0027] Calculate the gradient output by the initial freeze-drying control model according to the loss value data, and forward the gradient layer by layer through the chain rule to calculate the gradient of each layer of parameters to obtain the gradient data;
[0028] Update the parameters of each layer of the initial freeze-drying control model according to the gradient data and the preset learning rate;
[0029] Iteratively update the parameters of each layer repeatedly until when the number of training times of the initial freeze-drying control model is greater than the preset number of times, or when the loss value data of the initial freeze-drying control model is less than the preset loss threshold, it is determined that the training is completed to obtain a freeze-drying control model.
[0030] In an optional implementation manner, the optimizing the initial prediction model through K-fold cross-validation based on the historical feature data to obtain an optimized prediction model includes:
[0031] Divide the historical feature data into K subsets on average, where K represents the preset number of folds;
[0032] Select one of the subsets as the validation set, and the remaining subsets as the training set;
[0033] Use the training set to train the initial prediction model, and use the validation set to evaluate the performance of the initial prediction model to obtain performance metrics;
[0034] Repeat K - 1 times to select different subsets as the validation set, the remaining subsets as the training set, and perform model training to obtain the corresponding performance metrics;
[0035] Calculate the average value and standard deviation of the K performance metrics, and match the preset hyperparameter configuration according to the average value and standard deviation;
[0036] Construct an optimized prediction model according to the hyperparameter configuration.
[0037] In an alternative embodiment, constructing an initial prediction model based on the pre-stored historical feature data and the pre-stored actual target values through ridge regression analysis includes:
[0038] The method for constructing the initial prediction model is as follows:
[0039]
[0040] Solve for the optimized weights using the following formula:
[0041]
[0042] where represents the loss function, X i represents the data of the i-th row of the historical feature data matrix, y i represents the i-th actual target value, λ represents the preset regularization parameter, represents the optimized weight vector, β j represents the j-th weight in the weight vector before optimization, n represents the number of actual target values, p represents the number of weights, X represents the historical feature data matrix, X T represents the transpose matrix of the historical feature data matrix, I represents the preset identity matrix, and y represents the vector of actual observed values output by the initial linear model.
[0043] In an alternative embodiment, controlling the freeze-drying equipment according to the prediction parameters, the temperature data, the humidity data, and the pressure data includes:
[0044] Calculate the deviation between the prediction parameters and the temperature data, the humidity data, and the pressure data to obtain deviation data; wherein, the prediction parameters include predicted temperature, predicted humidity, and predicted pressure;
[0045] Calculate the correlation between the freeze-drying time and the temperature, humidity, and pressure based on the deviation data to obtain correlation data;
[0046] Calculate the optimal freeze-drying time based on the deviation data and the correlation data;
[0047] Adjust the operating state of the freeze-drying equipment according to the prediction parameters and the optimal freeze-drying time;
[0048] where the correlation is calculated using the following formula:
[0049]
[0050] where the optimal freeze-drying time is calculated using the following formula:
[0051]
[0052] where ΔT represents the temperature deviation, represents the average value of the pre - stored historical temperature deviations, and t fi represents the i - th historical freeze - drying time, represents the average value of the historical freeze - drying times, ΔH represents the humidity deviation, represents the average value of the pre - stored historical humidity deviations, ΔP represents the pressure deviation, represents the average value of the pre - stored historical pressure deviations, and t 0 represents the previous historical optimal freeze - drying time, represents the correlation coefficient between the freeze - drying time and the temperature, represents the correlation coefficient between the freeze - drying time and the humidity, represents the correlation coefficient between the freeze - drying time and the pressure, and t opt represents the optimal freeze - drying time.
[0053] In a second aspect, the present invention provides a freeze - drying process control system based on data analysis, including:
[0054] A data acquisition module, configured to acquire temperature data, humidity data, and pressure data inside the freeze - drying chamber;
[0055] A data pre - processing module, configured to pre - process the temperature data, the humidity data, and the pressure data to obtain pre - processed data;
[0056] A feature analysis module, configured to perform feature analysis on the pre - processed data by using the principal component analysis method to obtain feature data;
[0057] A prediction analysis module, configured to input the feature data into a pre - trained freeze - drying control model to obtain prediction parameters, where the prediction parameters include predicted temperature, predicted humidity, and predicted pressure;
[0058] A control output module, configured to control the freeze - drying equipment according to the prediction parameters, the temperature data, the humidity data, and the pressure data.
[0059] In a third aspect, the present invention further provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the freeze - drying process control method according to any one of the above.
[0060] In a fourth aspect, the present invention further provides a computer - readable storage medium, where the computer - readable storage medium includes a stored computer program. When the computer program runs, it controls the device where the computer - readable storage medium is located to execute the freeze - drying process control method according to any one of the above.
[0061] Compared with the prior art, the present invention has the following beneficial effects:
[0062] The present invention discloses a freeze-drying process control method based on data analysis, including collecting temperature data, humidity data, and pressure data in a freeze-drying chamber; preprocessing the temperature data, the humidity data, and the pressure data to obtain preprocessed data; performing feature analysis on the preprocessed data by a principal component analysis method to obtain feature data; inputting the feature data into a pre-trained freeze-drying control model to obtain prediction parameters, where the prediction parameters include predicted temperature, predicted humidity, and predicted pressure; and controlling a freeze-drying device according to the prediction parameters, the temperature data, the humidity data, and the pressure data. By collecting temperature, humidity, and pressure data in the freeze-drying chamber, preprocessing the data, extracting feature data using principal component analysis, and inputting the feature data into a trained model to predict key parameters (temperature, humidity, and pressure), the system can more accurately control the operation of the freeze-drying device according to these prediction parameters and the actually collected data, thereby improving the degree of intelligence of the freeze-drying process and further improving the freeze-drying efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 is a schematic flowchart of a freeze-drying process control method based on data analysis provided by the first embodiment of the present invention;
[0064] Figure 2 is a schematic structural diagram of a freeze-drying process control system based on data analysis provided by the second embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0065] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0066] Refer to Figure 1 , the first embodiment of the present invention provides a freeze-drying process control method based on data analysis, including the following steps:
[0067] S11, collecting temperature data, humidity data, and pressure data in a freeze-drying chamber;
[0068] S12, preprocessing the temperature data, the humidity data, and the pressure data to obtain preprocessed data;
[0069] S13, performing feature analysis on the preprocessed data by a principal component analysis method to obtain feature data;
[0070] S14. Input the feature data into a pre-trained freeze-drying control model to obtain prediction parameters, where the prediction parameters include predicted temperature, predicted humidity, and predicted pressure.
[0071] S15. Control the freeze-drying equipment according to the prediction parameters, the temperature data, the humidity data, and the pressure data.
[0072] In step S11, collect the temperature data, humidity data, and pressure data inside the freeze-drying chamber.
[0073] These data are obtained through sensors installed inside the freeze-drying chamber, including temperature sensors, humidity sensors, and pressure sensors. The temperature sensor is responsible for monitoring and recording the temperature changes at each moment during the freeze-drying process; the humidity sensor is used to capture the moisture content in the air to ensure that the humidity is within an appropriate range; and the pressure sensor's task is to monitor the pressure state inside the freeze-drying chamber, which is crucial for maintaining a vacuum environment.
[0074] In step S12, preprocess the temperature data, the humidity data, and the pressure data to obtain preprocessed data.
[0075] In a specific implementation, the preprocessing of the temperature data, the humidity data, and the pressure data to obtain preprocessed data includes:
[0076] Based on the median criterion, fill in the null values in the temperature data, the humidity data, and the pressure data to obtain complete filled data;
[0077] Identify outliers in the filled data through the Tukey post hoc test algorithm and remove the outliers using the standard score algorithm to obtain normal value data;
[0078] Normalize the normal value data to obtain preprocessed data.
[0079] Specifically, first, in the null value filling stage, for the missing value problems in the temperature data, humidity data, and pressure data, the median criterion is used for replacement; this means that for each set of time series data, if there are missing values, the median value of all non-missing values in this time series is used to fill these missing positions. For example, the temperature data within a certain time period is T = {t 1 ,t 2 ,...,t n}, where t n represents the temperature reading at the nth time point. If t k is a null value, the median value of this data set is used to fill it. Replace t k , that is:
[0080]
[0081] Here, represents the median of the remaining temperature data after removing any known null values, and null represents a null value. The same method is applied to the humidity data and pressure data to obtain the complete filled dataset D′ = {T′, H′, P′}, where T′, H′, and P′ represent the temperature data, humidity data, and pressure data after null value filling, respectively.
[0082] Next, enter the outlier identification and removal stage. Based on the Tukey post hoc test algorithm, first, starting from the filled temperature data, humidity data, and pressure data, these values will be sorted into an ordered list respectively. This means that all observations are arranged in ascending order to form a new sequence. For example, for a set of temperature data, this set of data needs to be sorted in ascending order first to obtain the ordered temperature sequence T sorted = {t′ 1 , t′ 2 ,..., t′ n}, where t′ i represents the temperature reading at the i-th position after sorting.
[0083] Next, according to the length n of the sorted data, determine the specific positions of the first quartile (Q1) and the third quartile (Q3). When considering the sample size, if n is odd, then Q1 is located at the position of and Q3 is located at the position of ; if n is even, then Q1 is located at the position of and Q3 is located at the position of . When the calculated position is not an integer, linear interpolation is usually used to estimate the corresponding quartile value. For example, if the calculated position of Q1 is 2.75, it means that Q1 should be between the second and third elements and closer to the third element. At this time, the formula Q1 = 0.25×t′ 2 + 0.75×t′ 3 can be used for estimation.
[0084] Once the positions of Q1 and Q3 are determined, the corresponding values can be directly read from the sorted dataset as these two quartiles. Then, the interquartile range (IQR) is obtained through a simple subtraction operation, that is, IQR = Q3 - Q1. This difference reflects the range of the middle 50% of the data and is an important indicator to measure the dispersion degree of the data distribution
[0085] After obtaining the IQR, the next step is to set the criteria for outlier detection - the upper and lower bounds. According to Tukey's method, the lower bound is defined as LowerBound = Q1 - 1.5 × IQR, and the upper bound is UpperBound = Q3 + 1.5 × IQR. Any observation less than the lower bound or greater than the upper bound will be considered a potential outlier.
[0086] After identifying potential outliers, the z-score can be further used to confirm which are indeed outliers. The z-score is used to measure how many standard deviations an observation is away from the mean, and its calculation formula is where x i represents the i-th sample value, μ is the sample mean, σ is the sample standard deviation, and the sample includes temperature data, humidity data, and pressure data after null value filling. When the z-score of an observation exceeds a pre-set threshold (usually 3 or -3), it is determined as an outlier and removed from the dataset to ensure that the remaining data in the dataset are all normal value data. At this time, the normal value dataset is D″ = {T″, H″, P″}, where T″, H″, and P″ represent normal value temperature data, normal value humidity data, and normal value pressure data respectively.
[0087] Q1, Q3, and IQR are all statistics dynamically calculated based on the characteristics of the original dataset itself, rather than pre-set fixed parameters. Through the above process, not only can outliers be accurately located and processed, but also the overall structural characteristics of the data can be maintained without being damaged, thus providing a more reliable basis for subsequent data analysis. This method is particularly suitable for datasets with obvious skewed distributions or a small number of extreme values, because it can effectively reduce the impact of outliers on the overall analysis results while retaining the authenticity and integrity of the data.
[0088] Finally, after completing the above two steps, the normal value data needs to be normalized. The purpose of normalization is to enable data of different magnitudes to be compared on the same scale, thus avoiding the phenomenon that some features dominate other features due to larger numerical values. The method adopted in this embodiment is min-max normalization, that is, linearly transforming the original data into the [0, 1] interval, and the formula is as follows:
[0089]
[0090] Here, x represents a data value of a feature (temperature, humidity, pressure) in the normal value data, x min and x maxThey represent the minimum and maximum values of the feature in the entire dataset respectively. In this way, the preprocessed data after normalization is finally obtained, and these data will be used for further analysis and modeling work. This preprocessing not only improves the data quality but also lays a solid foundation for subsequent operations. At this time, the preprocessed dataset is D″′ = {T″′, H″′, P″′}, where T″′, H″′, and P″′ represent the preprocessed temperature data, preprocessed humidity data, and preprocessed pressure data respectively.
[0091] In step S13, feature analysis is performed on the preprocessed data by the principal component analysis method to obtain feature data.
[0092] In a specific implementation manner, the performing feature analysis on the preprocessed data by the principal component analysis method to obtain feature data includes:
[0093] Calculating the covariance matrix according to the preprocessed data;
[0094] Performing eigenvalue decomposition on the covariance matrix to obtain eigenvalues and corresponding eigenvectors;
[0095] Selecting the eigenvectors corresponding to the top x largest eigenvalues as the principal component data, where x is the preset number of principal components;
[0096] Performing a linear transformation on the preprocessed data according to the principal component data to obtain feature data.
[0097] Specifically, first, a variable matrix X is constructed, where each row represents a sample and each column corresponds to a feature.
[0098] Next, the covariance matrix C is calculated. The covariance matrix is a square matrix of size n×n, where n represents the number of features (temperature, humidity, pressure). The element C of the covariance matrix ij is defined as the covariance between the i-th feature and the j-th feature, and the calculation formula is:
[0099]
[0100] where, x ki and x kj represent the values of the k-th sample on the i-th and j-th features respectively, μ i and μ j represent the averages of the i-th and j-th features respectively, and N represents the total number of samples. When i = j, the covariance is actually the variance of the feature itself. The complete covariance matrix C can be constructed through the above formula.
[0101] Then, eigendecomposition is performed based on the obtained covariance matrix C. This step involves solving the eigenvalue problem of the covariance matrix, that is, finding λ (eigenvalue) and v (eigenvector) that satisfy the following conditions:
[0102] Cv=λv
[0103] Find a set of non-zero vectors v and the corresponding scalar λ, so that the result of multiplying v by the covariance matrix C on the left is equal to v itself multiplied by the predetermined constant λ. Solving this set of equations can obtain a series of different eigenvalues and their corresponding eigenvectors. These eigenvalues reflect the degree of data dispersion in their respective directions, while the eigenvectors indicate the directions along which the data is most widely distributed. Therefore, among all possible directions, those directions that can capture the most changes are selected as new coordinate axes, which are the so-called "principal components".
[0104] Furthermore, the eigenvectors corresponding to the first x largest eigenvalues are selected to form a new matrix P, where x is the number of principal components to be retained. The selection is based on the fact that larger eigenvalues mean more information is retained in the corresponding principal components. This not only reduces the dimension, but also preserves the main features of the original data as much as possible. For example, if the original data set has 10 features, but only the first 3 principal components contain most of the information, then x=3 can be selected to reduce the dimension without significantly losing important information.
[0105] Finally, the preprocessed data is linearly transformed according to the selected principal component data to obtain the feature data after dimensionality reduction. This transformation can be completed by the following matrix multiplication:
[0106] Y=XP
[0107] Here, X represents the preprocessed data matrix, and P represents the matrix composed of the selected eigenvectors. Each column in the feature data matrix Y after dimensionality reduction represents the new representation of a sample after PCA transformation, and each row corresponds to a new feature or principal component. Since the eigenvectors in P have been orthogonalized and sorted from large to small, the columns in Y are also independent of each other and arranged in descending order of importance. In this way, an effective mapping from high-dimensional space to low-dimensional space is achieved, while ensuring that the converted data can still well reflect the essential characteristics of the original data.
[0108] By applying PCA technology (principal component analysis technology) to preprocessed data, not only can the data dimension be effectively reduced, but also redundant information can be removed, thereby improving the efficiency and accuracy of subsequent data analysis or model training.
[0109] In step S14, the characteristic data is input into a pre-trained freeze-drying control model to obtain prediction parameters, wherein the prediction parameters include predicted temperature, predicted humidity and predicted pressure.
[0110] In a specific implementation manner, the training process of the freeze-drying control model includes:
[0111] Construct an initial prediction model through ridge regression analysis according to the pre-stored historical feature data and the pre-stored actual target value;
[0112] Optimize the initial prediction model through K-fold cross-validation according to the historical feature data to obtain an optimized prediction model;
[0113] Further optimize the optimized prediction model through the Bayesian optimization algorithm to obtain an initial freeze-drying control model;
[0114] Input the historical feature data into the input layer of the initial freeze-drying control model for training to obtain the predicted value data output by the output layer of the initial freeze-drying control model;
[0115] Substitute the predicted value data and the actual target value into the loss function to calculate the loss value to obtain the loss value data;
[0116] Calculate the gradient output by the initial freeze-drying control model according to the loss value data, and forward the gradient layer by layer through the chain rule to calculate the gradient of each layer of parameters to obtain the gradient data;
[0117] Update the parameters of each layer of the initial freeze-drying control model according to the gradient data and the preset learning rate;
[0118] Repeatedly iterate to update the parameters of each layer until when the training times of the initial freeze-drying control model are greater than the preset times, or when the loss value data of the initial freeze-drying control model is less than the preset loss threshold, it is determined that the training is completed to obtain the freeze-drying control model.
[0119] In a specific implementation manner, the optimizing the initial prediction model through K-fold cross-validation according to the historical feature data to obtain an optimized prediction model includes:
[0120] Divide the historical feature data into K subsets on average, where K represents the preset number of folds;
[0121] Select one of the subsets as the validation set, and the remaining subsets as the training set;
[0122] Use the training set to train the initial prediction model, and use the validation set to evaluate the performance of the initial prediction model to obtain the performance index;
[0123] Repeat K - 1 times to select different subsets as the validation set, the remaining subsets as the training set, and perform model training to obtain the corresponding performance indexes;
[0124] Calculate the mean and standard deviation of the K performance metrics, and match the preset hyperparameter configuration according to the mean and standard deviation;
[0125] Construct an optimized prediction model according to the hyperparameter configuration.
[0126] In a specific implementation manner, the constructing of the initial prediction model by using the ridge regression analysis method based on the pre-stored historical feature data and the pre-stored actual target values includes:
[0127] The construction method of the initial prediction model is as follows:
[0128]
[0129] Solve for the optimized weights through the following formula:
[0130]
[0131] where, represents the loss function, X i represents the data of the i-th row of the historical feature data matrix, y i represents the i-th actual observation value, λ represents the preset regularization parameter, represents the optimized weight vector, β j represents the j-th weight in the weight vector before optimization, n represents the number of output variables of the initial linear model, p represents the number of weights, X represents the historical feature data matrix, X T represents the transpose matrix of the historical feature data matrix, I represents the preset identity matrix, and y represents the vector of actual observation values output by the initial linear model.
[0132] In step S14, the feature data is input into the pre-trained freeze-drying control model to obtain prediction parameters, and these prediction parameters include predicted temperature, predicted humidity, and predicted pressure. To achieve this goal, the construction of the freeze-drying control model has undergone optimization and adjustment in multiple stages.
[0133] First, when constructing the initial prediction model, the ridge regression analysis method is adopted. This process is based on the pre-stored historical feature data (denoted as matrix X) and the corresponding actual target values (denoted as vector y), aiming to find a weight vector that can minimize the following loss function of
[0134]
[0135] where, X i represents the data of the i-th row of the historical feature data matrix, y irepresents the i-th actual target value, λ represents the regularization parameter, which is used to prevent overfitting, and β j represents the weight of the j-th in the weight vector before optimization, n represents the number of actual target values, and p represents the number of weights. The optimized weight vector can be obtained by solving the following formula
[0136]
[0137] where X T is the transpose matrix of X, and I represents the identity matrix. This formula ensures that while considering all features, it also restricts the model complexity through the regularization term, thereby improving the generalization ability.
[0138] Next, in order to further improve the model performance, K-fold cross-validation is used to optimize the initial prediction model. Specifically, the historical feature data is evenly divided into K subsets, and each subset takes turns as the validation set, while the remaining K - 1 subsets are combined into the training set. For each iteration, the model is trained using the training set, and the performance of the model is evaluated using the validation set, and the corresponding performance metrics are recorded. For example, if K is set to 5, then there will be five rounds of training and validation, and each round will generate a set of performance metrics. Finally, the average value and standard deviation of these K performance metrics are calculated, and based on this, the best hyperparameter configuration is selected, and then a better prediction model is constructed.
[0139] Subsequently, in order to further improve the model accuracy, the Bayesian optimization algorithm is introduced to re-optimize the aforementioned optimized prediction model to generate the initial freeze-drying control model. Bayesian optimization is an efficient black-box optimization method, which is suitable for finding the global optimal solution of complex functions, especially effective in the case of a large parameter space and high evaluation cost. This method constructs a probability model (such as a Gaussian process) of the objective function and uses the acquisition function to guide the search process to gradually approach the optimal solution.
[0140] After obtaining the initial freeze-drying control model, the next step is the process of fully training it. During this process, the historical feature data is passed as input to the input layer of the model, and after a series of linear or nonlinear transformations, the prediction value is finally given by the output layer. In order to measure the difference between the model prediction result and the true value, a loss function L is defined, such as the mean square error (MSE), absolute error. The loss value calculated by the loss function reflects the size of the prediction error under the current model parameter settings. In order to minimize this loss value, the backpropagation algorithm is used to calculate the gradient of each layer's parameters with respect to the loss value. According to the chain rule, the gradient information is propagated forward layer by layer starting from the output layer until all layer parameters are updated. Each update is carried out according to the following rules:
[0141]
[0142] Here, θ represents the model parameters, η represents the learning rate, which determines the step size, and represents the gradient of the loss value L with respect to the parameter θ. As the number of iterations increases, the model continuously adjusts its own parameters until the preset maximum number of iterations is reached or the loss value is lower than a certain threshold. At this time, the model is considered to have converged, that is, the final freeze-drying control model is obtained.
[0143] Finally, input the feature data into the trained freeze-drying control model to obtain prediction parameters, where the prediction parameters include predicted temperature, predicted humidity, and predicted pressure.
[0144] In step S15, control the freeze-drying equipment according to the prediction parameters, the temperature data, the humidity data, and the pressure data.
[0145] In a specific implementation manner, the controlling the freeze-drying equipment according to the prediction parameters, the temperature data, the humidity data, and the pressure data includes:
[0146] Calculate the deviations between the prediction parameters and the temperature data, the humidity data, and the pressure data to obtain deviation data; where the prediction parameters include predicted temperature, predicted humidity, and predicted pressure;
[0147] Calculate the correlations between the freeze-drying time and temperature, humidity, and pressure according to the deviation data to obtain correlation data;
[0148] Calculate the optimal freeze-drying time according to the deviation data and the correlation data;
[0149] Adjust the operating state of the freeze-drying equipment according to the prediction parameters and the optimal freeze-drying time;
[0150] Among them, the correlation is calculated by the following formula:
[0151]
[0152] Among them, the optimal freeze-drying time is calculated by the following formula:
[0153]
[0154] Among them, ΔT represents the temperature deviation, represents the average value of the pre-stored historical temperature deviations, t fi represents the i-th historical freeze-drying time, represents the average value of the historical freeze-drying times, ΔH represents the humidity deviation, represents the average value of the pre-stored historical humidity deviations, ΔP represents the pressure deviation, represents the average value of the pre - stored historical pressure deviation, t 0 represents the last historical optimal freeze - drying time represents the correlation coefficient between the freeze - drying time and temperature represents the correlation coefficient between the freeze - drying time and humidity represents the correlation coefficient between the freeze - drying time and pressure, t opt represents the optimal freeze - drying time
[0155] Specifically, in order to achieve effective control of the freeze - drying equipment, it is first necessary to calculate the deviation between the prediction parameters and the actually measured temperature data, humidity data, and pressure data. Here, the prediction parameters refer to the predicted temperature, predicted humidity, and predicted pressure values obtained through a previously trained freeze - drying control model; while the actually measured data comes from the current environmental conditions collected in real - time by sensors. The deviation calculation formula is as follows:
[0156] ΔT = T pred −T act
[0157] ΔH = H pred −H act
[0158] ΔP = P pred −P act
[0159] Wherein, T pred , H pred , P pred respectively represent the predicted temperature, humidity, and pressure; T act , H act , P act respectively represent the actually measured temperature, humidity, and pressure. These deviation values reflect the difference between the predicted value and the actual situation, and are the basis for subsequent adjustments.
[0160] Next, based on the deviation data, further analyze the correlation between the freeze - drying time and temperature, humidity, and pressure. This step aims to quantify the influence degree of different factors on the freeze - drying process, so as to guide how to optimize the freeze - drying time and condition settings. Specifically, the Pearson correlation coefficient formula is used to measure the strength of the linear relationship between variables. For the correlation between temperature, humidity, and pressure and the freeze - drying time respectively, the following formulas are applied for calculation:
[0161]
[0162] Wherein, ΔT represents the temperature deviation represents the average value of the pre - stored historical temperature deviation, t fi represents the i - th historical freeze - drying time represents the average value of the historical freeze - drying time, ΔH represents the humidity deviation represents the average value of the pre - stored historical humidity deviation, and ΔP represents the pressure deviation. represents the average value of the pre - stored historical pressure deviation. represents the correlation coefficient between the freeze - drying time and temperature. represents the correlation coefficient between the freeze - drying time and humidity. represents the correlation coefficient between the freeze - drying time and pressure.
[0163] Then, combining the deviation data and the correlation data, the optimal freeze - drying time is calculated using the weighted summation method. This method takes into account the influence weights of each factor on the freeze - drying time, that is, the correlation coefficients, and applies these weights to the corresponding deviations to determine the optimal adjustment amount. The formula for the optimal freeze - drying time is as follows:
[0164]
[0165] Here, t 0 represents the optimal freeze - drying time in the previous historical record and serves as the initial reference value. This formula means that if the deviation of a certain factor (such as temperature) is large and its influence on the freeze - drying time is strong (i.e., the absolute value of the correlation coefficient is large), then this factor will play a more important role in the adjustment process.
[0166] Finally, according to the calculated prediction parameters and the optimal freeze - drying time t opt , the operating state of the freeze - drying equipment is adjusted. This means that it may be necessary to change the working mode or parameter settings of the equipment, such as adjusting the heating power, vacuum degree, or cooling rate, to ensure that the freeze - drying process can be completed within the most suitable time while ensuring that the product quality meets the expected standards.
[0167] The following describes the working process of the present invention by taking a relatively common scenario as an example. The specific implementation manner of the present invention refers to Figure 1 , a freeze - drying process control method based on data analysis, including the following steps:
[0168] In a specific implementation case, in order to prepare a microneedle patch containing supramolecular micelles, solution preparation was first carried out. Weigh 1 gram of glycyrrhizic acid and add it to 99 grams of phosphate - buffered saline (pH = 7.4) for dispersion, and heat it in a water bath at 80 degrees Celsius for 30 seconds until a transparent solution is formed. Subsequently, take out 10 grams from this solution and mix it well with 65 grams of deionized water, where the temperature of the deionized water is about 80 degrees Celsius. Then, add 25 grams of low - molecular - weight sodium hyaluronate (molecular weight less than 10000 Da) to this mixed solution and stir until completely dissolved, ensuring that the content of sodium hyaluronate in the final solution is 25% and the content of glycyrrhizic acid is 0.1%.
[0169] After the solution preparation, the above solution was dropped onto the surface of the PDMS microneedle mold to ensure complete coverage. It was placed in a vacuum drying oven and evacuated for 30 minutes. This step not only filled the mold with the solution but also removed the air bubbles in the solution.
[0170] After that, the microneedle mold filled with the solution was transferred to a freeze-drying device. Through data analysis of the freeze-drying process parameters and prediction by an optimization model, the optimal freeze-drying time was determined to be 24 hours, the predicted temperature was maintained at -50 °C, the predicted humidity was controlled at 5%, and the predicted pressure was set at 0.1 mbar. The selection of these parameters was based on deviation analysis and correlation calculation of temperature, humidity, and pressure data to achieve the best freeze-drying effect and ensure the consistency and efficiency of product quality.
[0171] After the freeze-drying process was completed, the microneedles and their molds were successfully separated, and the preparation of the microneedle patch was completed. Throughout the process, through intelligent data analysis methods and precise parameter control, the efficiency and quality of the freeze-drying process were improved, ensuring the stable performance of the microneedle patch.
[0172] Refer to Figure 2 , the second embodiment of the present invention provides a freeze-drying process control system based on data analysis, including:
[0173] A data acquisition module for acquiring temperature data, humidity data, and pressure data inside the freeze-drying chamber;
[0174] A data preprocessing module for preprocessing the temperature data, the humidity data, and the pressure data to obtain preprocessed data;
[0175] A feature analysis module for performing feature analysis on the preprocessed data by means of principal component analysis to obtain feature data;
[0176] A prediction analysis module for inputting the feature data into a pre-trained freeze-drying control model to obtain prediction parameters, where the prediction parameters include predicted temperature, predicted humidity, and predicted pressure;
[0177] A control output module for controlling the freeze-drying device according to the prediction parameters, the temperature data, the humidity data, and the pressure data. It should be noted that a freeze-drying process control device based on data analysis provided in an embodiment of the present invention is used to execute all the process steps of a freeze-drying process control method based on data analysis in the above embodiment, and their working principles and beneficial effects correspond one by one, so they will not be elaborated here.
[0178] An embodiment of the present invention also provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a freeze-drying process control program based on data analysis. When the processor executes the computer program, the steps in the above-mentioned embodiments of each freeze-drying process control method based on data analysis are implemented, such as Figure 1 the step S11 shown. Alternatively, when the processor executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are implemented, such as a freeze-drying process control module based on data analysis.
[0179] Exemplarily, the computer program may be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0180] The electronic device may be a computing device such as a desktop computer, a notebook, a palm computer, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the above components are only examples of the electronic device and do not constitute a limitation on the electronic device. It may include more or fewer components than the above, or combine certain components, or different components. For example, the electronic device may further include input / output devices, network access devices, a bus, etc.
[0181] The so-called processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the electronic device and connects various parts of the entire electronic device through various interfaces and lines.
[0182] The memory can be used to store the computer program and / or modules. By running or executing the computer program and / or modules stored in the memory, and invoking the data stored in the memory, the processor can implement various functions of the electronic device. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0183] Among them, if the modules / units integrated in the electronic device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-mentioned embodiment methods of the present invention, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, an executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disc, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0184] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided by the present invention, the connection relationships between the modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0185] The specific embodiments described above further elaborate on the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. In particular, for those skilled in the art, any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A freeze-drying process control method based on data analysis, characterized in that: Executed by the controller, including: Collect temperature data, humidity data, and pressure data in the freeze-drying chamber; Preprocessing the temperature data, the humidity data and the pressure data to obtain preprocessed data; Performing feature analysis on the preprocessed data by a principal component analysis method to obtain feature data; Inputting the characteristic data into a pre-trained freeze-drying control model to obtain prediction parameters, wherein the prediction parameters include predicted temperature, predicted humidity and predicted pressure; The freeze drying equipment is controlled according to the predicted parameters, the temperature data, the humidity data and the pressure data.
2. The freeze-drying process control method based on data analysis according to claim 1, characterized in that: The preprocessing of the temperature data, the humidity data and the pressure data to obtain preprocessed data includes: Based on the median criterion, the empty values in the temperature data, the humidity data and the pressure data are filled to obtain complete filled data; The outliers are identified on the filled data by Tukey post hoc test algorithm, and the outliers are removed by standard score algorithm to obtain normal value data; The normal value data is normalized to obtain preprocessed data.
3. The freeze-drying process control method based on data analysis according to claim 1, characterized in that: The method of performing feature analysis on the preprocessed data by a principal component analysis method to obtain feature data includes: Calculating a covariance matrix based on the preprocessed data; Performing eigendecomposition according to the covariance matrix to obtain eigenvalues and corresponding eigenvectors; Select the eigenvectors corresponding to the first x largest eigenvalues as principal component data, where x is the preset number of principal components; The preprocessed data is linearly transformed according to the principal component data to obtain feature data.
4. The freeze-drying process control method based on data analysis according to claim 1, characterized in that: The training process of the freeze-drying control model includes: According to the pre-stored historical feature data and the pre-stored actual target value, an initial prediction model is constructed by using the ridge regression analysis method; Perform K-fold cross validation to optimize the initial prediction model based on the historical feature data to obtain an optimized prediction model; Further optimizing the optimization prediction model by using a Bayesian optimization algorithm to obtain an initial freeze-drying control model; Inputting the historical feature data into the input layer of the initial freeze-drying control model for training, and obtaining the predicted value data output by the output layer of the initial freeze-drying control model; Substituting the predicted value data and the actual target value into the loss function to calculate the loss value, thereby obtaining the loss value data; Calculating the gradient of the output of the initial freeze-drying control model according to the loss value data, and transferring the gradient forward layer by layer through the chain rule, calculating the gradient of each layer parameter, and obtaining gradient data; Update the parameters of each layer of the initial freeze-drying control model according to the gradient data and the preset learning rate; The parameters of each layer are updated repeatedly and iteratively until the training times of the initial freeze-drying control model are greater than the preset times, or when the loss value data of the initial freeze-drying control model is less than the preset loss threshold, the training is determined to be completed and the freeze-drying control model is obtained.
5. The freeze-drying process control method based on data analysis according to claim 4, characterized in that: The step of performing K-fold cross validation to optimize the initial prediction model according to the historical feature data to obtain an optimized prediction model includes: Dividing the historical feature data into K subsets on average, where K represents a preset folding number; Select one of the subsets as the validation set and the remaining subsets as the training set; Using the training set to train the initial prediction model, and using the validation set to evaluate the performance of the initial prediction model to obtain a performance indicator; Repeat K-1 times to select different subsets as validation sets, and the remaining subsets as training sets, and perform model training to obtain corresponding performance indicators; Calculate the mean and standard deviation of the K performance indicators, and match the preset hyperparameter configuration according to the mean and standard deviation; An optimized prediction model is constructed according to the hyperparameter configuration.
6. The freeze-drying process control method based on data analysis according to claim 4, characterized in that: The initial prediction model is constructed by a ridge regression analysis method based on the pre-stored historical feature data and the pre-stored actual target value, including: The initial prediction model is constructed as follows: The optimized weight is solved by the following formula: in, represents the loss function, X i Represents the data in the i-th row of the historical feature data matrix, y i represents the i-th actual target value, λ represents the preset regularization parameter, represents the optimized weight vector, β j represents the jth weight in the weight vector before optimization, n represents the number of actual target values, p represents the number of weights, X represents the historical feature data matrix, X T represents the transposed matrix of the historical feature data matrix, I represents the preset identity matrix, and y represents the actual observation value vector output by the initial linear model.
7. The freeze-drying process control method based on data analysis according to claim 1, characterized in that: The method of controlling the freeze-drying equipment according to the predicted parameters, the temperature data, the humidity data and the pressure data comprises: Calculating the deviation between the predicted parameters and the temperature data, the humidity data and the pressure data to obtain deviation data; wherein the predicted parameters include predicted temperature, predicted humidity and predicted pressure; Calculating the correlation between freeze-drying time and temperature, humidity and pressure according to the deviation data to obtain correlation data; Calculating the optimal freeze-drying time according to the deviation data and the correlation data; Adjusting the operating state of the freeze-drying equipment according to the predicted parameters and the optimal freeze-drying time; The correlation is calculated by the following formula: Among them, the optimal freeze-drying time is calculated by the following formula: Where ΔT represents the temperature deviation, Indicates the average value of the historical temperature deviation stored, t fi represents the i-th historical freeze-drying time, represents the average historical freeze-drying time, ΔH represents the humidity deviation, It indicates the average value of the historical humidity deviation stored in advance, ΔP indicates the pressure deviation, represents the average value of the pre-stored historical pressure deviation, t0 represents the last historical optimal freeze-drying time, represents the correlation coefficient between freeze-drying time and temperature, represents the correlation coefficient between freeze-drying time and humidity, Represents the correlation coefficient between freeze-drying time and pressure, t opt Indicates the optimal freeze-drying time.
8. A freeze-drying process control system based on data analysis, characterized in that: include: Data acquisition module, used to collect temperature data, humidity data, and pressure data in the freeze-drying chamber; A data preprocessing module, used for preprocessing the temperature data, the humidity data and the pressure data to obtain preprocessed data; A feature analysis module, used to perform feature analysis on the preprocessed data by a principal component analysis method to obtain feature data; A prediction analysis module, used for inputting the characteristic data into a pre-trained freeze-drying control model to obtain prediction parameters, wherein the prediction parameters include predicted temperature, predicted humidity and predicted pressure; A control output module is used to control the freeze-drying equipment according to the predicted parameters, the temperature data, the humidity data and the pressure data.
9. An electronic device, characterized in that: It comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the freeze-drying process control method based on data analysis as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the freeze-drying process control method based on data analysis according to any one of claims 1 to 7.
Citation Information
Patent Citations
Oil well yield increase measure optimization and effect prediction method based on deep learning
CN116861800A
Method for predicting optimal harvesting time of Chinese yam based on marker metabolite model of machine learning
CN117169388A
Calibration method of vacuum freeze dryer
CN117664218A
Artificial intelligence data analysis method and system based on machine learning
CN118428493A
Intelligent drying time prediction method based on big data analysis
CN118520319A
Cited By
Rotary freeze-drying control method and system
CN121411135A
Plant exosome lyophilization environment control method based on temperature and humidity decoupling
CN122632942A