Method for predicting water adding amount of tobacco leaf moistening machine
By constructing a machine learning-based water addition prediction model, the problem of inaccurate manual setting of water addition for leaf humidifiers was solved, achieving intelligent control and improving the quality and efficiency of tobacco production.
Patent Information
- Application Number
- CN202411133687.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2026-03-03
AI Technical Summary
Traditional leaf-moistening machines rely on manual settings for water addition, which cannot accurately adapt to changes in tobacco leaf type, environmental factors, and equipment, resulting in unstable production quality.
By collecting temperature and humidity data, machine learning algorithms are used to build linear regression and K-nearest neighbor models to optimize water addition prediction, and the final water addition is determined by combining manual calculation formulas.
It enables intelligent prediction of water addition for leaf conditioners, reducing manual intervention, improving production quality and efficiency, and avoiding incorrect water addition settings.
Smart Images

Figure FDA0004998721100000031 
Figure FDA0004998721100000032
Abstract
Description
Technical Field
[0001] This invention relates to the field of tobacco leaf moistening technology, and in particular to a method for predicting the amount of water added in a tobacco leaf moistening machine. Background Technology
[0002] Tobacco processing requires controlling the moisture content of tobacco leaves to ensure optimal quality and taste in the final product. Leaf moistening machines use methods such as spraying water or steam to humidify the tobacco leaves, thereby regulating their moisture content to meet the necessary production requirements. However, the moisture content varies among different types and varieties of tobacco leaves and is also affected by external environmental factors such as temperature, humidity, seasonal weather changes, and variations in processing equipment and procedures.
[0003] In the traditional process, the water addition amount of the leaf-humidifying machine can only be set manually. Due to the changes in the various factors mentioned above, the parameters for manually setting the water addition amount of the leaf-humidifying machine may be inaccurate, resulting in tobacco leaves that do not meet the process standards, requiring considerable effort to adjust later. Summary of the Invention
[0004] The technical problem to be solved by this invention is to provide a method for predicting the amount of water added to a tobacco leaf moistening machine, thereby realizing the intelligent prediction function of the amount of water added to the moistening machine, reducing labor costs, avoiding incorrect water addition settings, improving the quality of tobacco leaf production and processing, and increasing work efficiency.
[0005] This invention provides a method for predicting the amount of water added in a tobacco leaf-conditioning machine, comprising the following steps:
[0006] Step S1: Obtain the actual values of current temperature and humidity from the sensors in the workshop through the data acquisition software, and determine the current production status based on the actual temperature and humidity values;
[0007] Step S2: Determine the collection points and key parameters that affect the predicted water addition, and collect the parameters;
[0008] Step S3: Use the data set of parameters collected in S2 as the dataset for water addition prediction and perform data cleaning on the dataset through a program;
[0009] This includes handling missing values, handling duplicate data, and detecting and handling outliers;
[0010] Step S4: Perform data standardization and data segmentation;
[0011] Step S5: For production status of the first batch, use the K-nearest neighbor algorithm to build a linear regression model for prediction and optimize it;
[0012] For production status that is not the first batch, a predictive model is built using a linear regression algorithm and then optimized.
[0013] Step S6: Calculate the water volume according to the manual calculation formula, and calculate the average value with the water volume calculated by the optimized prediction model to determine the final water volume value of the leaf moistening machine.
[0014] In a specific embodiment of the present invention, in step S2, the collection point includes: a leaf moistening machine, a leaf feeder, and a CTD airflow drying machine;
[0015] The parameters of the leaf humidifier include: water added by the leaf humidifier, actual value of steam flow rate injected for leaf humidification, actual value of temperature gauge before leaf humidification, return air temperature for leaf humidification, leaf humidification temperature, and leaf humidification humidity.
[0016] The parameters of the blade feeder include: the opening degree of the steam valve at the feeding inlet, the instantaneous flow rate of feeding and water, the temperature at the feeder outlet, the humidity of the feeding, the feeding temperature, the moisture content at the feeding outlet, and the zero point of the moisture content at the feeding outlet.
[0017] The parameters of the CTD airflow drying machine include: the process gas temperature at the combustion furnace outlet and the moisture content at the CTD air classifier outlet.
[0018] 3. The method for predicting water addition in a tobacco leaf-conditioning machine according to claim 1, characterized in that, in step S3,
[0019] The missing value handling is specifically as follows: the training set data is filtered to select the data set with missing values. If multiple feature data values are missing in the same record, the sample is deleted. If the number of missing feature data values in the same sample is less than the threshold, the average value of the samples in the column is calculated by a function and the parameters with missing data are filled with data values to make the record valid.
[0020] The specific process of handling duplicate data is as follows: the data in the training set is checked, and if the data is found to be the same as the data, the duplicate records are directly removed.
[0021] Outlier detection and handling specifically involves: analyzing samples in the dataset to identify outlier data in the training dataset, calculating the median of non-missing values for columns that need to be filled, and replacing outliers.
[0022] In a specific embodiment of the present invention, step S4 specifically comprises:
[0023] The training set is standardized using the Z-score calculation method.
[0024] After standardization, the dataset is split into 80% training set and 20% test set.
[0025] In one specific embodiment of the present invention, in step S5, for the first batch of leaf-moistening machines, a linear regression model is built using the K-nearest neighbor algorithm to construct a prediction model, and the optimization method includes two approaches.
[0026] The first method is to: calculate the dataset that meets the requirements of the method, and calculate the first batch of production data according to the time period. If the data volume is insufficient, adjust the time period interval until a suitable dataset is obtained.
[0027] Using a defined dataset for training and cross-validation for evaluation, Euclidean distance was chosen as the distance metric in the K-nearest neighbor regression algorithm.
[0028] By cross-validation and considering the complexity of the prediction model, K is set to 3;
[0029] The optimized algorithm model was trained using the dataset.
[0030] Another approach is to perform statistical analysis on the dataset within the time period to determine if the number of samples in the dataset is too large. If the number of samples in the dataset is too large, continue with the following optimization steps; otherwise, use the first method for prediction.
[0031] The dataset samples are screened to remove samples with high similarity, resulting in an optimized dataset;
[0032] By using cross-validation and evaluating the prediction model, a K value of 5 was set to avoid overfitting.
[0033] Construct a KD Tree to optimize the performance of the model algorithm;
[0034] The optimized model is trained using an optimized dataset.
[0035] In a specific embodiment of the present invention, in step S5, for leaf-moistening machines that are not in the first batch of production, a prediction model is built using a linear regression algorithm, and the optimization method is as follows:
[0036] Set the loss function of the linear regression model to mean squared error:
[0037] Where n is the number of samples; y i It is the true value of the i-th sample; It is the predicted value of the i-th sample;
[0038] Set model training parameters;
[0039] The optimization algorithm for the model is set to stochastic gradient descent;
[0040] If a large dataset is generated in continuous production, to avoid oscillations and divergences during model training, the optimization algorithm is adjusted to Adam, which improves the accuracy and stability of the model algorithm by adaptively adjusting the learning rate.
[0041] The training set samples are fed into the linear regression model for training.
[0042] In one specific embodiment of the present invention, the model training parameters are set as follows: epoch value is set to 100, and batch_size is set to 32.
[0043] In a specific embodiment of the present invention, the formula for manually calculating the amount of water added in step S6 is:
[0044] V=(164-L1) / 10+(L2 / 100)+(v1 / W*100);
[0045] Where V: predicted water addition; L1: actual process gas temperature at the outlet of the drying machine combustion furnace; L2: instantaneous flow rate of material and water addition; v1: set flow rate of water addition for the previous batch of leaf moistening; W: set flow rate for the electronic scale.
[0046] Compared with the prior art, the method for predicting water addition in a tobacco leaf moistening machine according to the present invention has the following advantages:
[0047] Beneficial effects:
[0048] (1) The parameters for intelligently predicting the water addition of the leaf-moistening machine have been realized, breaking through the bottleneck that the water addition of the intelligent leaf-moistening machine is difficult to set properly during online production;
[0049] (2) Through machine learning and neural network models, the appropriate amount of water added to the leaf humidifier can be quickly inferred from historical data, reducing manual calculation and avoiding situations where the amount of water added to the leaf humidifier cannot be determined in many cases and where the amount of water added by manual experience is significantly different from the actual ideal amount of water added; thereby improving work efficiency and improving the quality of tobacco processing. Detailed Implementation
[0050] To further understand the present invention, embodiments of the present invention are described below in conjunction with examples. However, it should be understood that these descriptions are only for further illustrating the features and advantages of the present invention, and not for limiting the present invention.
[0051] An embodiment of the present invention discloses a method for predicting the water addition amount of a tobacco leaf conditioner, comprising the following steps:
[0052] Step S1: Obtain the actual values of current temperature and humidity from the sensors in the workshop through the data acquisition software. Determine the current production status based on the actual temperature and humidity values, i.e., determine whether it is the first batch of production or not.
[0053] The first batch of production refers to a situation where the interval between the completion of the previous batch and the start of the next batch exceeds one day. At this time, the temperature, humidity, and other parameters of the leaf-curing machine have not yet reached a stable state, and the production pattern is relatively unstable.
[0054] Non-first-batch production means that after the first batch of leaf-moistening machines finish production, subsequent batches can continue to be produced without any downtime for several days. At this time, the temperature and humidity parameters of the leaf-moistening machine and other equipment reach a relatively stable state, and then the next batch of materials can be produced continuously, resulting in a relatively stable production pattern.
[0055] Step S2: Determine the collection points and key parameters that affect the predicted water addition, and collect the parameters;
[0056] The collection points include: leaf moistening machine, leaf feeder and CTD airflow drying machine;
[0057] The parameters of the leaf humidifier include: water added by the leaf humidifier, actual value of steam flow rate injected for leaf humidification, actual value of temperature gauge before leaf humidification, return air temperature for leaf humidification, leaf humidification temperature, and leaf humidification humidity.
[0058] The parameters of the blade feeder include: the opening degree of the steam valve at the feeding inlet, the instantaneous flow rate of feeding and water, the temperature at the feeder outlet, the humidity of the feeding, the feeding temperature, the moisture content at the feeding outlet, and the zero point of the moisture content at the feeding outlet.
[0059] The parameters of the CTD airflow drying machine include: the process gas temperature at the combustion furnace outlet and the moisture content at the CTD air classifier outlet.
[0060] Extract the key parameter setting values from the database to prepare the prediction dataset;
[0061] Step S3: Use the data set of parameters collected in S2 as the dataset for water addition prediction and perform data cleaning on the dataset through a program. The specific steps are as follows;
[0062] Missing value handling: The training set data is filtered to identify the dataset with missing values. If multiple feature data values are missing in the same record, the sample is deleted. If the number of missing feature data values in the same sample is less than the threshold, the average value of the samples in that column is calculated using a function, and the missing data parameters are filled with data values to make the record valid.
[0063] Duplicate data processing: Detect duplicate data in the training set; if duplicate records are found, remove them directly.
[0064] Outlier detection and handling: Outlier detection and handling specifically involves: analyzing samples in the dataset to identify outlier data in the training dataset, calculating the median of non-missing values for columns that need to be filled, and replacing outliers.
[0065] Step S4: Perform data standardization and data segmentation;
[0066] The Z-score calculation method is used to standardize the training set data to ensure the model convergence speed, prevent overfitting, and improve model performance.
[0067] The Z-score calculation method is as follows: Where μ is the mean; X i Sample observations; σ represents the standard deviation of the observed sample;
[0068] After standardization, the dataset is split into 80% training set and 20% test set.
[0069] Step S5: For production status of the first batch, use the K-nearest neighbor algorithm to build a linear regression model for prediction and optimize it;
[0070] Specifically, there are two methods. The first method is used when the interval between the end of the previous production batch and the start of the next batch is long, the production batch pattern is extremely unstable, and the ambient temperature, humidity, and other parameters have changed significantly compared to before the production stoppage. In this case, the algorithm is optimized by performing the following steps:
[0071] The dataset required by the method is calculated, and the initial production data volume is calculated according to the time period. If the data volume is insufficient, the time period interval is adjusted until a suitable amount of dataset is obtained.
[0072] The algorithm is trained using a defined dataset and evaluated through cross-validation. To improve the performance of the algorithm and the accuracy of the predicted values, Euclidean distance is chosen as the distance metric in the K-nearest neighbor regression algorithm.
[0073] European distance: The distance from point x to point y;
[0074] By cross-validation and considering the complexity of the prediction model, K is set to 3; where K is the number of "nearest neighbors" for predicting new data points.
[0075] The optimized algorithm model was trained using the dataset.
[0076] Another approach, for datasets with multiple initial production runs within a time period and a large number of samples, would lead to overfitting when using the model algorithm in Method 1. Therefore, the algorithm for Method 2 is optimized by the following steps:
[0077] Statistical analysis is performed on the dataset within the time period to determine if the number of samples in the dataset is too large. If the number of samples in the dataset is too large, the following steps are continued for optimization; otherwise, the first method is used for prediction.
[0078] The dataset samples are screened to remove samples with high similarity, resulting in an optimized dataset;
[0079] By cross-validation and evaluating the prediction model, a K value of 5 is set to avoid overfitting; k=5 is a suitable value that can prevent the model from overfitting.
[0080] Constructing a KD Tree optimizes the performance of the model algorithm and improves efficiency;
[0081] The optimized model is trained using an optimized dataset.
[0082] For production status that is not the first batch, a predictive model is built using a linear regression algorithm and then optimized.
[0083] Non-first-batch production is characterized by continuous production over a period of time, concentrated data, stable and numerous feature samples, and stable environmental temperature and humidity conditions. To address these characteristics, the model is optimized using the following steps:
[0084] Set the loss function of the linear regression model to mean squared error:
[0085] Where n is the number of samples; y i It is the true value of the i-th sample; It is the predicted value of the i-th sample;
[0086] Set the model training parameters; after evaluating the loss curve and cross-validation results multiple times, setting the epoch value to 100 and the batch_size to 32 is optimal.
[0087] epoch: represents the process of passing the entire training dataset through the neural network once, that is, one forward propagation and one backward propagation;
[0088] batch_size: The amount of data processed at one time during model training;
[0089] To avoid low model performance, the optimization algorithm for the model is set to stochastic gradient descent, which allows the model to randomly select a small batch of samples to calculate and update model parameters in each iteration to improve model performance.
[0090] If a large dataset is generated in continuous production, in order to avoid oscillations and divergences during model training, the optimization algorithm can be adjusted to adaptive moment estimation (Adam) to improve the accuracy and stability of the model algorithm by adaptively adjusting the learning rate.
[0091] The training set samples are fed into the linear regression model for training.
[0092] By inputting the predicted parameters into the trained model, the calculated water addition amount is the predicted water addition amount.
[0093] Step S6: Calculate the water volume according to the manual calculation formula, and calculate the average value with the water volume calculated by the optimized prediction model to determine the final water volume value of the leaf moistening machine.
[0094] The formula for manually calculating the amount of water to be added is:
[0095] V=(164-L1) / 10+(L2 / 100)+(v1 / W*100);
[0096] Where V: predicted water addition; L1: actual process gas temperature at the outlet of the drying machine combustion furnace; L2: instantaneous flow rate of material and water addition; v1: set flow rate of water addition for the previous batch of leaf moistening; W: set flow rate for the electronic scale.
[0097] The above description of the embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
[0098] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for predicting water addition in a tobacco leaf-conditioning machine, characterized in that, Includes the following steps: Step S1: Obtain the actual values of current temperature and humidity from the sensors in the workshop through the data acquisition software, and determine the current production status based on the actual temperature and humidity values; Step S2: Determine the collection points and key parameters that affect the predicted water addition, and collect the parameters; Step S3: Use the data set of parameters collected in S2 as the dataset for water addition prediction and perform data cleaning on the dataset through a program; This includes handling missing values, handling duplicate data, and detecting and handling outliers; Step S4: Perform data standardization and data segmentation; Step S5: For production status of the first batch, use the K-nearest neighbor algorithm to build a linear regression model for prediction and optimize it; For production status that is not the first batch, a predictive model is built using a linear regression algorithm and then optimized. Step S6: Calculate the water volume according to the manual calculation formula, and calculate the average value with the water volume calculated by the optimized prediction model to determine the final water volume value of the leaf moistening machine.
2. The method for predicting water addition in a tobacco leaf moistening machine according to claim 1, characterized in that, In step S2, the collection points include: a leaf moistening machine, a leaf feeder, and a CTD airflow drying machine; The parameters of the leaf humidifier include: water added by the leaf humidifier, actual value of steam flow rate injected for leaf humidification, actual value of temperature gauge before leaf humidification, return air temperature for leaf humidification, leaf humidification temperature, and leaf humidification humidity. The parameters of the blade feeder include: the opening degree of the steam valve at the feeding inlet, the instantaneous flow rate of feeding and water, the temperature at the feeder outlet, the humidity of the feeding, the feeding temperature, the moisture content at the feeding outlet, and the zero point of the moisture content at the feeding outlet. The parameters of the CTD airflow drying machine include: the process gas temperature at the combustion furnace outlet and the moisture content at the CTD air classifier outlet.
3. The method for predicting water addition in a tobacco leaf-conditioning machine according to claim 1, characterized in that, In step S3 The missing value handling is specifically as follows: the training set data is filtered to select the data set with missing values. If multiple feature data values are missing in the same record, the sample is deleted. If the number of missing feature data values in the same sample is less than the threshold, the average value of the samples in the column is calculated by a function and the parameters with missing data are filled with data values to make the record valid. The specific process of handling duplicate data is as follows: the data in the training set is checked, and if the data is found to be the same as the data, the duplicate records are directly removed. Outlier detection and handling specifically involves: analyzing samples in the dataset to identify outlier data in the training dataset, calculating the median of non-missing values for columns that need to be filled, and replacing outliers.
4. The method for predicting water addition in a tobacco leaf-conditioning machine according to claim 1, characterized in that, Step S4 specifically involves: The training set is standardized using the Z-score calculation method. After standardization, the dataset is split into 80% training set and 20% test set.
5. The method for predicting water addition in a tobacco leaf-conditioning machine according to claim 1, characterized in that, In step S5, for the first batch of leaf-moistening machines, a linear regression model is built using the K-nearest neighbor algorithm to construct a prediction model, and the optimization methods include two types. The first method is to: calculate the dataset that meets the requirements of the method, and calculate the first batch of production data according to the time period. If the data volume is insufficient, adjust the time period interval until a suitable dataset is obtained. Using a defined dataset for training and cross-validation for evaluation, Euclidean distance was chosen as the distance metric in the K-nearest neighbor regression algorithm. By cross-validation and considering the complexity of the prediction model, K is set to 3; The optimized algorithm model was trained using the dataset. Another approach is to perform statistical analysis on the dataset within the time period to determine if the number of samples in the dataset is too large. If the number of samples in the dataset is too large, continue with the following optimization steps; otherwise, use the first method for prediction. The dataset samples are screened to remove samples with high similarity, resulting in an optimized dataset; By using cross-validation and evaluating the prediction model, a K value of 5 was set to avoid overfitting. Construct a KD Tree to optimize the performance of the model algorithm; The optimized model is trained using an optimized dataset.
6. The method for predicting water addition in a tobacco leaf-conditioning machine according to claim 1, characterized in that, In step S5, for leaf-moistening machines that are not in the first batch of production, a prediction model is built using a linear regression algorithm, and the optimization method is as follows: Set the loss function of the linear regression model to mean squared error: Where n is the number of samples; y i It is the true value of the i-th sample; It is the predicted value of the i-th sample; Set model training parameters; The optimization algorithm for the model is set to stochastic gradient descent; If a large dataset is generated in continuous production, to avoid oscillations and divergences during model training, the optimization algorithm is adjusted to Adam, which improves the accuracy and stability of the model algorithm by adaptively adjusting the learning rate. The training set samples are fed into the linear regression model for training.
7. The method for predicting water addition in a tobacco leaf-conditioning machine according to claim 6, characterized in that, The model training parameters are set as follows: epoch value is set to 100, batch_size is set to 32.
8. The method for predicting water addition in a tobacco leaf-conditioning machine according to claim 1, characterized in that, In step S6, the formula for manually calculating the amount of water added is: V=(164-L1) / 10+(L2 / 100)+(v1 / W*100); Where V: predicted water addition; L1: actual process gas temperature at the outlet of the drying machine combustion furnace; L2: instantaneous flow rate of material and water addition; v1: set flow rate of water addition for the previous batch of leaf moistening; W: set flow rate for the electronic scale.