A method for pre-setting the proportion of flavoring in a cut tobacco flavoring mode
By constructing an integrated model and an online update mechanism, the problem of inaccurate prediction of flavoring ratio in batch flavoring mode was solved, achieving stability and uniformity of flavoring and improving the quality of tobacco.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-14
- Publication Date
- 2026-03-20
AI Technical Summary
In the tobacco processing technology, the inaccurate estimation of the flavoring ratio in the batch flavoring mode leads to low stability and integrity of the flavoring, which affects the quality of the finished tobacco.
An ensemble model is constructed by training multiple base models and assigning weights to perform anomaly detection on online streaming data, calculating the incense ratio, and updating the model and adjusting the weights online to improve prediction accuracy.
It improves the uniformity and precision of flavoring, reduces the randomness of flavoring ratio settings, ensures the stability and integrity of flavoring, and enhances the quality control of tobacco.
Smart Images

Figure CN117281282B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a method for pre-setting a flavoring proportion in a batch flavoring mode of tobacco processing, and belongs to the field of industrial big data analysis. BACKGROUND
[0002] In a tobacco processing procedure, a flavoring procedure is used as the last procedure to adjust tobacco aroma and improve sensory quality. There are two common ways of adding flavoring sugar in the flavoring procedure, namely, proportion flavoring and batch flavoring. In proportion flavoring, flavoring sugar is added according to a fixed proportion of instantaneous flow of inlet material; in batch flavoring, a whole batch of flavoring sugar to be added is prepared in advance, and the flavoring amount of the whole batch is kept constant regardless of the weight difference between batches. At present, the batch flavoring mode is generally used for flavoring. In the batch flavoring mode, if the cumulative weight of batches is not accurately estimated, a reasonable flavoring proportion cannot be given, so that flavoring sugar is used up or there is still a large amount of remaining flavoring sugar at the end of production, which affects the stability and integrity of batch flavoring and further affects the quality of finished tobacco.
[0003] At present, there are two ways to set the flavoring proportion in the batch flavoring mode: 1. Process personnel calculate the average of the cumulative weight of the flavoring inlet of historical batches, and calculate the flavoring proportion by combining the weight of the flavoring sugar required in the process standard; 2. Process personnel calculate the "weight reduction coefficient" (weight reduction coefficient = cumulative weight of flavoring inlet / cumulative weight of outlet of previous procedure) according to the cumulative weight of the outlet of the previous procedure and the cumulative weight of the flavoring inlet of historical batches, and calculate the flavoring proportion by combining the cumulative weight of the outlet of the previous procedure of the current production batch, the weight of the flavoring sugar required in the process standard. The first way uses the average of the cumulative weight of the flavoring inlet of historical batches as the estimated value of the current production batch, ignoring the differences between batches; the second way considers the differences between batches, but the differences in environmental temperature and humidity, tobacco moisture, storage time, etc. will affect the "weight reduction coefficient", so using the "weight reduction coefficient" to estimate the cumulative weight of the flavoring inlet also has obvious defects.
[0004] Therefore, a method for pre-setting a flavoring proportion in a batch flavoring mode of tobacco processing is proposed, which predicts the cumulative weight of the flavoring inlet by constructing an integrated model, calculates the flavoring proportion, reduces the randomness of the prediction of the cumulative weight of the flavoring inlet and the setting of the flavoring proportion, and avoids the influence of data quality problems. SUMMARY
[0005] In order to overcome the problems in the background art, the present application proposes a method for pre-setting the flavoring ratio in a batch flavoring mode, a large amount of historical data is used to train multiple base models, an integrated model is constructed, and weights are assigned; online stream data is subjected to anomaly detection, and different ways are selected to output the cumulative weight prediction value of the flavoring inlet according to the anomaly detection results; at the same time, model mismatch is avoided, and the model is updated online and the model weight is adjusted, improving the generalization of the model. The problem of low stability and integrity of flavoring caused by inaccurate estimation of cumulative weight at the inlet and unreasonable setting of flavoring ratio in the batch flavoring mode is solved.
[0006] In order to overcome the problems in the background art, the present application proposes a method for pre-setting the flavoring ratio in a batch flavoring mode, a large amount of historical data is used to train multiple base models, an integrated model is constructed, and weights are assigned; online stream data is subjected to anomaly detection, and different ways are selected to output the cumulative weight prediction value of the flavoring inlet according to the anomaly detection results; at the same time, model mismatch is avoided, and the model is updated online and the model weight is adjusted, improving the generalization of the model. The problem of low stability and integrity of flavoring caused by inaccurate estimation of cumulative weight at the inlet and unreasonable setting of flavoring ratio in the batch flavoring mode is solved.
[0007] A method for pre-setting the flavoring ratio in a batch flavoring mode includes the following steps:
[0008] Step 1, business research and data collection, research the production process of the flavoring process and the previous process, find the variables that affect the cumulative weight at the flavoring inlet, and export the historical batch data from the existing MES business system;
[0009] Step 2, establishment of an integrated model (Ensemble model), based on historical batch data, training of different structure flavoring inlet cumulative weight prediction base model, forming an integrated model;
[0010] Step 3, online data stream processing, as production proceeds, continuously collecting batch-level stream data of the production process, selecting parameters used in the integrated model from each new data sample, performing data cleaning and anomaly detection;
[0011] Step 4, cumulative weight prediction at the flavoring inlet, based on the results of step three anomaly detection, solving the cumulative weight prediction value at the flavoring inlet, and calculating the recommended flavoring ratio;
[0012] Step 5, model updating and model weight adjustment, after the batch production is completed, complete batch data is obtained, the integrated model is updated, and the model weight is adjusted.
[0013] Preferably, in step 2, before the establishment of the integrated model, the historical batch data obtained in step one is subjected to outlier rejection and feature selection to obtain a data set for modeling, and the training set, validation set and test set are divided according to the actual production order of the samples.
[0014] Preferably, the integrated model in step 2 is a linear base model trained using the training set and the validation set, including recursive least squares, online centering least squares, adaptive recursive least squares, ridge regression model, and a nonlinear base model including decision tree model, random forest model, online neural network model, and the selected linear base model and nonlinear base model are combined into an integrated model in the form of:
[0015]
[0016] wherein f(x) is the integrated model, G(x) is the base model, M is the number of base models, and θ is the weight of the base model.
[0017] Preferably, the weight distribution method of the integrated model in step 2 is that the weight of each base model is distributed according to its performance on the test set, and the performance of the model on the test set is described by the mean absolute error (MAE) of the predicted value and the actual value, and the mathematical expression for calculating the weight of the base model is:
[0018]
[0019] wherein R m is the absolute error (MAE) of each base model on the test set.
[0020] Preferably, the batch-level online data stream processing method in step 3 is to obtain the data of the previous process of the batch to be perfumed, and to arrange the parameters used by the integrated model therefrom as the input vector of the model:
[0021] X = [x1, …, x n ] (3)
[0022] wherein n is the number of input variables of the integrated model;
[0023] Then, the input vector X is subjected to anomaly detection, and the input vector X is labeled as "normal" or "abnormal" according to the detection result.
[0024] Preferably, the vector X anomaly detection method is to determine whether there is a null value in the input vector X, if there is a null value, the input vector X is labeled as "abnormal"; if there is no null value, the second round of anomaly detection is continued, the second round of anomaly detection is realized by an anomaly detection model, which is constructed by K-Nearest Neighbor algorithm or Isolation Forest algorithm, if the second round of anomaly detection fails, the input vector X is labeled as "abnormal", otherwise, the input vector X is labeled as "normal".
[0025] Preferably, the cumulative weight prediction method of the flavoring entry in step 4 is that if the input vector X in step three is marked as "normal", the integrated model f(x) is called to obtain the flavoring entry cumulative weight prediction value y=f(x), and then the optimal flavoring ratio is calculated by combining the weight of the flavoring sugar material required to be added in the process standard:
[0026] k=K / y (4)
[0027] In the formula, k represents the flavoring ratio, K represents the weight of the flavoring sugar material, and y represents the flavoring entry cumulative weight prediction value;
[0028] If the input vector X is marked as "abnormal", the integrated model fails at this time, and the weight reduction coefficient is calculated according to the front process outlet cumulative weight and the flavoring entry cumulative weight of the historical batch, and the flavoring ratio is calculated by combining the front process outlet cumulative weight of the current production batch and the weight of the flavoring sugar material required to be added in the process standard.
[0029] Preferably, the model updating and model weight adjusting method in step 5 is that when a new batch production is completed, all parameter data of the batch used by the integrated model are obtained, and the abnormal detection and marking are performed on the data, and the abnormal detection and marking method is the same as the method described in step three; the trigger threshold of model updating is taken to judge whether the length of the batch data marked as "normal" is greater than or equal to the trigger threshold, if not, the model updating and model weight adjusting are not performed, and the process is ended; if yes, the model parameters of each base model are recursively updated using the data, and the weights of the base models are adjusted according to the actual prediction performance of the base models on the data.
[0030] The beneficial effects of the present application are:
[0031] The present application greatly improves the uniformity and precision of the flavoring and feeding, and significantly improves the quality control of the tobacco, predicts the cumulative weight of the tobacco flavoring process entry by the integrated model (Ensemble model), and recommends the flavoring ratio, fully considers the influence of various parameters in the production process on the cumulative weight of the flavoring entry, reduces the randomness of the cumulative weight prediction and the flavoring ratio setting of the flavoring entry, detects the input data for abnormality before predicting the cumulative weight of the flavoring entry, and selects different ways to output the cumulative weight prediction value of the flavoring entry according to the abnormal detection result, effectively avoids the influence of the data quality problem in the actual production process on the cumulative weight prediction of the flavoring entry, improves the model prediction accuracy, and performs online self-updating and model weight adjustment on the model after production, realizes the iterative updating of the model, optimizes the prediction accuracy of the model, and improves the generalization of the model. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 is a flow chart of the flavoring ratio pre-setting method of the present application;
[0033] Figure 2 This is a comparison chart of the predicted and actual cumulative weight of the flavored food sample from this invention.
[0034] Figure 3 This is a comparison chart showing the effect of the pre-setting method for adding fragrance ratio in this invention before and after its implementation. Detailed Implementation
[0035] To make the objectives, technical solutions, and beneficial effects of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, so as to facilitate understanding by those skilled in the art.
[0036] like Figure 1 As shown, a method for pre-setting the fragrance ratio in a silk-making batch fragrance mode includes the following steps:
[0037] Step 1, Business Research and Data Collection: Study the production process of the flavoring process and its preceding processes, identify variables that may affect the cumulative weight of the flavoring entry point, and export a large amount of historical batch data from the existing business system (MES production information management system).
[0038] Step 2, Ensemble Model Construction: First, preprocessing operations such as outlier removal and feature selection are performed on a large amount of historical batch data to obtain the dataset used for modeling. Second, the dataset is split into training, validation, and test sets in a 6:2:2 ratio. Then, multiple linear base models are trained using the training and validation sets, including Recursive Least Squares (RLS), Online Center Normalized Least Squares (OCNLMS), Adaptive Recursive Least Squares (AdaRLS), and Ridge Regression; as well as multiple nonlinear base models including decision tree models, random forest models, and online neural network models. The final ensemble model is a linear combination of the base models, represented as follows:
[0039]
[0040] In the formula, f(x) is the ensemble model, G(x) is the base model, M is the number of base models, and θ is the weight of the base model.
[0041] Finally, the weights of each base model are allocated based on its performance on the test set, with higher weights assigned to base models that perform better on the test set. The model's performance on the test set is described by the mean absolute error (MAE) between the predicted and actual values. The initial weight allocation for each base model is expressed as follows:
[0042]
[0043] wherein each of the base models has an average absolute error (MAE) on the test set, denoted R1, …, R M .
[0044] Step 3, online data stream processing: first, the pre-sequence data of the batch to be produced is obtained, and the parameters used by the integrated model are sorted out from the pre-sequence data as the input vector of the model
[0045] X = [x1, …, x n ] (3)
[0046] wherein n is the number of input variables of the integrated model.
[0047] Secondly, the input vector X is subjected to anomaly detection to determine whether there is a null value in the input vector X. If there is a null value, the input vector X is marked as “abnormal”. If there is no null value, the second round of anomaly detection is continued, which is constructed by K- nearest neighbor algorithm or isolated forest algorithm. If the second round of anomaly detection fails, the input vector X is marked as “abnormal”. Otherwise, the input vector X is marked as “normal”.
[0048] Step 4, prediction of cumulative weight at fragrance entry: if the input vector X is marked as “normal” in step three, the integrated model f(x) is called to obtain the predicted value y = f(x) of the cumulative weight at the fragrance entry, and then the optimal fragrance ratio k is calculated by combining the fragrance sugar weight K required in the process standard
[0049] k = K / y (4)
[0050] wherein k represents the fragrance ratio, K represents the fragrance sugar weight, and y represents the predicted value of the cumulative weight at the fragrance entry;
[0051] If the input vector X is marked as “abnormal”, the integrated model fails at this time, and the cumulative weight at the fragrance entry of the current batch is predicted based on the actual value of the cumulative weight at the fragrance entry and the actual value of the cumulative weight at the exit of the previous process of the historical batch, i.e. the tare coefficient (tare coefficient = cumulative weight at fragrance entry / cumulative weight at exit of previous process) is calculated, and the fragrance ratio is calculated by combining the cumulative weight at the exit of the previous process of the current production batch and the fragrance sugar weight required in the process standard.
[0052] Step 5, model updating and model weight adjustment: first, when a new batch of production is completed, all parameter data of the batch used by the integrated model, including model input and model output, are obtained, and the abnormality detection and marking are performed on the parameter data, the abnormality detection and marking method is the same as the method described in step 3, and the batch data is stored. Secondly, the trigger threshold for model updating is L, and it is judged whether the length of the batch data marked as "normal" is greater than or equal to L. If it is not satisfied, the model updating and model weight adjustment are not performed, and the process is ended. If it is satisfied, the L batches of data are used to update the model parameters of each base model recursively. At the same time, the weights of the base models are adjusted according to the actual prediction performance of the base models on the L batches of data, and the weight adjustment strategy is also represented as:
[0053]
[0054] wherein the mean absolute error (MAE) of each base model on the L batches of data is denoted as R1,…,R M .
[0055] As Figure 2 is a comparison chart of the predicted value and the actual value of the cumulative weight of the perfuming inlet predicted by the method of the present application in the present embodiment, wherein the horizontal coordinate is the batch, and the vertical coordinate is the cumulative weight of the perfuming inlet. The black line represents the predicted value of the cumulative weight of the perfuming inlet, and the gray line represents the actual value of the cumulative weight of the perfuming inlet. It can be seen that the predicted value can accurately capture the trend of the actual value. After calculation, the Pearson correlation coefficient between the predicted value and the actual value in the chart is 0.842, indicating that the prediction effect is very good.
[0056] As Figure 3 shown is the comparison of the effect before and after the application of the intelligent recommended perfuming proportion by the method of the present application in the present embodiment. The absolute deviation of the actual amount and the standard amount of the perfuming agent is used for evaluation. The horizontal coordinate is the date by day, and the vertical coordinate is the average value of the absolute deviation of the actual amount and the standard amount of the perfuming agent. It can be seen that the absolute deviation of the actual amount and the standard amount of the perfuming agent gradually decreases after the method of the present application is put into use, from an average of 0.01958 kg before the method is put into use to an average of 0.01336 kg after the method is put into use, greatly improving the uniformity and precision of the perfuming, and playing a key role in improving the weight control of the whole production line.
[0057] Finally, it should be pointed out that the above preferred embodiments are only used to illustrate the technical solutions of the present application and not to limit it. Although the present application has been described in detail through the above preferred embodiments, those skilled in the art should understand that various changes can be made in form and details without departing from the scope defined by the claims of the present application.
Claims
1. A method for pre-setting the fragrance ratio in a silk-making batch fragrance addition mode, characterized in that, Includes the following steps: Step 1: Business research and data collection. Study the production process of the flavoring process and its preceding processes, identify variables that affect the cumulative weight of the flavoring entry point, and export historical batch data from the existing MES business system. Step 2: Establish the ensemble model. Based on historical batch data, train base models for predicting the cumulative weight of the flavored inlet with different structures to form an ensemble model. Step 3, online data stream processing: As production progresses, batch-level stream data of the production process is continuously collected. From each new data sample, the parameters used in the integrated model are selected, and data cleaning and anomaly detection are performed. Step 4, Predict the cumulative weight of the flavoring inlet: Based on the anomaly detection results in Step 3, calculate the predicted value of the cumulative weight of the flavoring inlet, and simultaneously calculate the recommended flavoring ratio; wherein, the predicted cumulative weight of the flavoring inlet is calculated as follows: if the input vector X is marked as "normal" in Step 3, then the ensemble model is invoked. The predicted cumulative weight of flavored food was obtained. Then, combining the weight of flavoring ingredients required by the process standards, the optimal flavoring ratio is calculated: In the formula, Indicates the proportion of flavoring added. Indicates the weight of the flavoring ingredients. This indicates the predicted cumulative weight of the flavored food. If the input vector If marked as "abnormal", the integrated model fails. Instead, the weight factor is calculated based on the cumulative weight of the previous process exit and the cumulative weight of the flavoring entrance in the historical batch. The flavoring ratio is then calculated by combining the cumulative weight of the previous process exit in the current production batch and the weight of the flavoring material required to be added according to the process standard. Step 5, Model Update and Model Weight Adjustment: After batch production is completed, obtain the complete batch data, update the integrated model, and adjust the model weights simultaneously. Specifically, the model update and weight adjustment involves: after each new batch production is completed, obtaining all parameter data used by the integrated model for that batch, performing anomaly detection and marking on it using the same method as described in Step 3; taking the trigger threshold for model updates, and determining whether the length of the batch data marked as "normal" is greater than or equal to the trigger threshold. If not, no model update and model weight adjustment are performed, and the process ends; if so, this batch of data is used to recursively update the model parameters of each base model, and simultaneously, the weights of the base models are adjusted based on their actual prediction performance in this batch of data.
2. The method for pre-setting the fragrance ratio in a silk-making batch fragrance mode according to claim 1, characterized in that: In step 2, before the integrated model is established, outlier removal and feature selection are performed on the historical batch data obtained in step 1 to obtain the dataset used for modeling, and the training set, validation set and test set are divided according to the actual production order of the samples.
3. The method for pre-setting the fragrance ratio in a silk-making batch fragrance mode according to claim 1, characterized in that: In step 2, the ensemble model is formed by training linear base models using training and validation sets, including recursive least squares, online center-normalized least squares, adaptive recursive least squares, and ridge regression models, as well as nonlinear base models including decision tree models, random forest models, and online neural network models. The selected linear and nonlinear base models are then linearly combined to form the ensemble model, as shown below: In the formula, For the ensemble model, As the base model, The number of base models, The weights of the base model.
4. The method for pre-setting the fragrance ratio in a silk-making batch fragrance mode according to claim 3, characterized in that: In step 2, the weight allocation method for the ensemble model is as follows: the weights of each base model are allocated based on its performance on the test set. The model's performance on the test set is described by the mean absolute error between the predicted and actual values. The mathematical expression for calculating the base model weights is: In the formula, This represents the absolute error of each base model on the test set.
5. The method for pre-setting the fragrance ratio in a silk-making batch fragrance mode according to claim 1, characterized in that: The batch-level online data stream processing method in step 3 involves acquiring the preceding process data of the batch about to be flavored, extracting the parameters used by the integrated model, and using them as the model's input vector. In the formula, The number of input variables for the ensemble model; Then, for the input vector Perform anomaly detection, and adjust the input vector based on the detection results. Mark as "normal" or "abnormal".
6. The method for pre-setting the fragrance ratio in a silk-making batch fragrance mode according to claim 5, characterized in that, The input vector Perform anomaly detection, including: Determine the input vector Does the input vector contain null values? If it does, change the input vector. Mark as "abnormal"; if no null value exists, continue processing. A second round of anomaly detection is performed, implemented by an anomaly detection model, using either the K-nearest neighbors algorithm or the isolated forest algorithm. If the second round of anomaly detection fails, the input vector is... Mark as "abnormal", otherwise, the input vector Marked as "normal".
Citation Information
Patent Citations
Control method for synthesizing tobacco primary processing flavoring accuracy calculated value
CN102626255A
Method for improving feeding precision of leaves in production of tobacco primary processing
CN107510089A