Cigarette tar amount prediction method based on reversible neural network
By constructing a cigarette tar quantity prediction model based on reversible neural network, the problems of low tar quantity prediction accuracy and difficult reverse prediction in the prior art are solved, and high-precision tar quantity prediction and reverse prediction of auxiliary material parameters are achieved.
Patent Information
- Application Number
- CN202411452202.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-06-27
AI Technical Summary
The prior art is difficult to accurately predict and control the amount of cigarette tar, and traditional models are difficult to achieve reverse prediction from the amount of tar release to auxiliary material parameters.
A neural network model based on reversible neural network is used to construct a neural network model composed of multiple reversible blocks, and the model's reversibility is achieved through Jacobian determinant and affine coupling layer, and a mean square error and maximum mean difference loss function are used during the training process to improve the prediction accuracy and inverse inference ability of the model.
The forward prediction from auxiliary material parameters to tar release amount is achieved, and the reverse prediction from target tar release amount to auxiliary material parameters is achieved, which significantly improves the accuracy and R&D efficiency of cigarette tar quantity prediction.
Smart Images

Figure CN120218141A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cigarette manufacturing, and particularly to a method for predicting the tar content of cigarettes based on a reversible neural network. Background Art
[0002] The tar content of cigarettes directly affects the sensory quality and market performance of cigarettes. The tar content is affected by various factors, including tobacco blend, auxiliary materials combination, combustion conditions, and filter rods. Currently, the selection and design of cigarette auxiliary materials mainly rely on experience and simple regression models, and the accuracy of these methods is limited and cannot meet the requirements of intelligent design. In addition, the relationship between the tar content and the design parameters of auxiliary materials is a one-to-many non-linear relationship, and it is difficult for traditional linear regression or neural network models to accurately perform reverse prediction. Summary of the Invention
[0003] To solve the problems existing in the prior art, the object of the present invention is to provide a method for predicting the tar content of cigarettes based on a reversible neural network. Based on the reversible neural network, the present invention can achieve precise control of the tar release amount and reverse prediction of the parameters of cigarette auxiliary materials, thereby improving the cigarette product quality control ability and R & D efficiency.
[0004] To achieve the above object, the technical solution adopted by the present invention is: a method for predicting the tar content of cigarettes based on a reversible neural network, comprising the following steps:
[0005] Step 1, construct a reversible neural network model;
[0006] Step 2, use the target chemical components as input values, and transfer the input values to the backend system through the API interface; after receiving the values, the backend system inputs them into the reversible neural network model; the reversible neural network model outputs three characteristic values according to the input target chemical components to complete the prediction of the tar content of cigarettes.
[0007] As a further improvement of the present invention, the specific steps of Step 1 include the following steps:
[0008] Step 1.1, represent the reversible neural network model based on the Jacobian determinant;
[0009] Step 1.2, adopt a reversible block composed of two complementary affine coupling layers, and each said reversible block includes an affine transformation layer for processing input data and a coupling layer for maintaining information flow;
[0010] Step 1.3, use the mean square error MSE loss function to measure the difference between the output of the reversible neural network model and the actual chemical components during the forward training stage;
[0011] Step 1.4. Optimize the reversible neural network model using the maximum mean discrepancy (MMD) loss function in the backward training stage;
[0012] Step 1.5. Batch-train the reversible neural network model using the training set and the test set. During the training process, perform forward and backward iterations alternately, and at the same time use the Adam optimization algorithm to improve the generalization ability of the reversible neural network model.
[0013] As a further improvement of the present invention, the specific steps of Step 1.1 are as follows:
[0014] The Jacobian determinant is a determinant with the partial derivatives of n n-ary functions u i = u i (x1, x2, ···, x n ), (i = 1, 2, ···, n) as elements, denoted as:
[0015]
[0016] On the premise that the functions are all continuously differentiable, the differential form of the function group is:
[0017]
[0018] If the Jacobian determinant is not 0 anywhere in a connected region, then it is positive everywhere or negative everywhere; if the Jacobian determinant is always 0, then at least one of the functions is a continuously differentiable function of the remaining functions. The Jacobian determinant is closely related to the neural network, that is, x = f(z), and the relationship between the distributions becomes:
[0019] p(x) = π(z)|det(J f-1 )|
[0020] Also, because there is:
[0021] |det(J f-1 )| = 1 / |det(J f )|
[0022] Then the Jacobian determinant of the f network must not be 0;
[0023] For a one-to-many mapping y -> x, an additional latent output variable z is introduced, which is trained to capture information related to x but not included in y; adjust p(z) according to the Gaussian distribution, that is, p(x|y) is adjusted to a definite function x = g(y, z), and convert the known distribution p(z) to the x space under the condition of satisfying y;
[0024] Predict p(x|y) according to the model q(x|y), and introduce the latent variable z to present q(x|y) in the form of g(y, z; θ):
[0025] x = g(y, z; θ)
[0026] z ~ p(z) = g(z; 0; I k )
[0027] The forward process is represented by f(x; θ):
[0028] [y, z] = f(x:θ) = [f y (x; θ), f z (x; θ)] = g -1 (x; θ)
[0029] f y (x; θ) ≈ s(x)
[0030] The dimension K of the variable z is K = D - M. If M + K > D, then the x vector is padded with a 0 vector of dimension M + K - D, where D is the dimension of x and M is the dimension of y; thus, q(x|y) is expressed as:
[0031] q(x = g(y, z; θ)|y) = p(z)|J X | -1
[0032]
[0033] As a further improvement of the present invention, in step 1.2:
[0034] The input vector u of the reversible block is divided into u1 and u2, and the two parts are transformed by functions s i , t i , (i ∈ {1, 2}) and coupled in an alternating manner; the output is the concatenation of v1 and v2, as follows:
[0035] v1 = u1 ⊙ exp(s2(u2)) + t2(u2)
[0036] v2 = u2 ⊙ exp(s1(u1)) + t1(v1)
[0037] After the given output, the inverse process is as follows:
[0038] u2 = (v2 - t1(v1)) ⊙ exp(-s1(u1))
[0039] u1 = (v1 - t2(u2)) ⊙ exp(-s2(u2)).
[0040] As a further improvement of the present invention, in step 1.3, the mean squared error MSE loss function is as follows:
[0041]
[0042] Among them, N represents the total number of samples. For each sample, represents the predicted value of the network, represents the corresponding true target value.
[0043] As a further improvement of the present invention, in step 2, the three characteristic values are the air permeability of cigarette paper, the air permeability of tipping paper, and the pressure drop of the filter rod.
[0044] As a further improvement of the present invention, in step 2, it further includes:
[0045] Return these three characteristic values to the front-end system. After receiving this data, the front-end system monitors and adjusts the tobacco production process in real time according to the data to ensure the quality and stability of the product.
[0046] The beneficial effects of the present invention are:
[0047] 1. By using the reversible neural network model, the present invention can not only achieve the forward prediction from the auxiliary material parameters to the tar release amount, but also achieve the reverse prediction from the target tar release amount to the auxiliary material parameters; the reversible neural network model is composed of multiple reversible blocks, and each reversible block is composed of two complementary affine coupling layers, which can ensure the bijective mapping from input to output, thus ensuring the reversibility of the model.
[0048] 2. After adopting the technical solution of the present invention, the maximum error of cigarette tar prediction is reduced to 3.4%, and the overall error is stable between 0 and 2.0%. Compared with the maximum error of 24.8% and the overall error of about 10.0% of the traditional linear regression model, the present invention can significantly improve the prediction accuracy. In addition, through reverse prediction, it is possible to accurately predict the required combination of auxiliary material parameters given the target tar release amount, greatly reducing the workload in the process of cigarette R & D and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 is the structure diagram of the reversible neural network model in the embodiment of the present invention;
[0050] Figure 2 is the structural schematic diagram of the reversible block in the embodiment of the present invention;
[0051] Figure 3 is the schematic diagram of the reverse process of the reversible block in the embodiment of the present invention;
[0052] Figure 4 is the forward training process diagram of the INN in the embodiment of the present invention;
[0053] Figure 5 is the reverse training process diagram of the INN in the embodiment of the present invention;
[0054] Figure 6 The training flowchart of the reversible neural network model in the embodiments of the present invention
[0055] Figure 7 The system functional architecture diagram of the embodiments of the present invention;
[0056] Figure 8 The overall system architecture of the embodiments of the present invention Detailed implementation manners
[0057] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0058] Embodiment
[0059] A method for predicting the tar content of cigarettes based on a reversible neural network, comprising:
[0060] 1. Overview of algorithm research:
[0061] In the research direction of the digital model of cigarette materials, combined with advanced deep learning technologies, especially in the development of the invertible neural network (INN) model, to address a key challenge: how to accurately predict and control the key chemical components in tobacco products, including tar content, carbon monoxide, nicotine, etc. The typical structure of the invertible neural network model is as Figure 1 shown.
[0062] 2. Expected results of the algorithm:
[0063] The main results of the algorithm will be the development and implementation of a series of specialized INN models for different types of tobacco products. These models will focus on accurately predicting the influencing factors of the key chemical components (tar content, carbon monoxide, and nicotine) of slender cigarettes, medium cigarettes, and thick cigarettes. It is expected that the prediction accuracy of these models will reach at least 95%, and the prediction time can be significantly shortened to a few seconds. The main theories and technologies related to the invertible neural network will be introduced below.
[0064] 3. Jacobian determinant:
[0065] The Jacobian determinant is usually called the Jacobian. It is a determinant with the partial derivatives of n n-ary functions as elements. In fact, under the premise that the functions are all continuously differentiable (i.e., the partial derivatives are all continuous), it is the determinant of the coefficient matrix (i.e., the Jacobian matrix) in the differential form of the function group. When the variables are continuous with respect to the independent variables, and the independent variables are continuous with respect to the new variables, then, since the variables are also continuous with respect to the new variables. This can be directly proven by the multiplication of determinants and the chain rule of partial differentiation. Similar to the chain rule of differentiation. Regarding the chain rule of partial differentiation, there are also similar formulas; when calculating multiple integrals, this method is usually adopted.
[0066] The Jacobian determinant is a determinant with the partial derivatives of n n - variable functions \(u\) i \( = u\) i (x1,x2,·.·,x n ),(i = 1,2,·.·,n) as elements, and is often denoted as:
[0067]
[0068] In fact, on the premise that the functions are all continuously differentiable (i.e., the partial derivatives are all continuous), the differential form of the function group is:
[0069]
[0070] The determinant of the coefficient matrix (i.e., the Jacobian matrix). If the Jacobian determinant is not 0 anywhere in a connected region, then it is positive everywhere or negative everywhere. If the Jacobian determinant is constantly 0, then at least one of the continuously differentiable functions of the remaining functions of this function has a Jacobian determinant closely related to the neural network. Simply put, \(x = f(z)\), and the relationship between their distributions becomes:
[0071] \(p(x)=\pi(z)|\det(J\) f-1 )|\)
[0072] Also, because there is:
[0073] |\det(J\) f-1 )| = 1 / |\det(J\) f )|\)
[0074] So the Jacobian determinant of the network \(f\) must not be 0. For some problems, researchers have established complex theoretical models to achieve the mapping from implicit parameters to measurable values, and this kind of mapping is called the forward process. The reverse process is to obtain implicit parameters from the measured values, which is also the problem that needs to be solved in practice. However, the reverse process is difficult to solve because some key information is lost in the forward process.
[0075] If directly using a traditional neural network to train the reverse process, the effect will be very limited because the reverse process is a one - to - many mapping. The model trained by the neural network, in the best case, identifies the most likely solution; in the worst case, it adopts the average of multiple solutions. The standard NN directly trains the reverse process, but it requires a supervised loss (SL) term to distinguish the real \(x\) from the predicted \(x\) (temporarily, SL can be understood as a definite cost function), and the one - to - many mapping of \(y -> x\) makes the traditional NN greatly restricted.
[0076] INN only uses SL for the forward process. Since there is no definite value of x, the predicted x belongs to the unsupervised loss (USL) and needs to follow the previous p(x). Additionally, the latent variable z needs to follow a Gaussian distribution, which also belongs to USL. Due to some information loss in the forward process, an additional latent output variable z is introduced and trained to capture information related to x but not included in y. Moreover, the network needs to be trained to adjust p(z) according to the Gaussian distribution. That is, p(x|y) is adjusted to a definite function x = g(y,z), which transforms the known distribution p(z) to the x space under the condition of y.
[0077] If x ∈ R^D and y ∈ R^M, then due to the information loss in the forward process, the intrinsic dimension M of y must be less than D, even if M may be greater than D. It is hoped to predict p(x|y) according to the model q(x|y). Therefore, the latent variable z is introduced to represent q(x|y) in the form of g(y,z;θ):
[0078] x = g(y,z;θ)
[0079] z ∼ p(z) = g(z;0;I k )
[0080] Correspondingly, its forward process can also be represented by f(x;θ):
[0081] [y,z] = f(x:θ) = [f y (x;θ),f z (x;θ)] = g -1 (x;θ)
[0082] f y (x;θ) ≈ s(x)
[0083] Training f and g bidirectionally can avoid the problems in conditional generative adversarial networks (cGAN) and Bayesian neural networks. Since INN requires f = g^-1, the dimensions on both sides (whether intrinsic dimensions or explicit dimensions) should be the same. So it is required that the dimension K of the variable z = D - M. If it results in M + K > D, then the x vector needs to be padded with 0 vectors of dimension M + K - D. Combining all the above definitions, the network represents q(x|y) as:
[0084] q(x = g(y,z;θ)|y) = p(z)|J X | -1
[0085]
[0086] The basic building block of a reversible neural network is the affine coupling layer, which is a generalization of the Real NVP model. It works by splitting the input data into two parts, u1 and u2, which are transformed by learning functions s i and t i (which can be arbitrarily complex functions and do not need to be invertible themselves) and coupled in an alternating manner.
[0087] 4. Design and research of reversible blocks:
[0088] In this embodiment, a structure based on an invertible neural network (INN) is adopted for design. This kind of network focuses on learning the forward process while using additional latent output variables to capture information that may be lost in traditional neural networks. A key feature of the INN is its reversibility, which means it can implicitly learn and infer through an inverse process model. Given the distribution of specific measurements and latent variables, the inverse process of the INN can provide a complete posterior distribution covering the entire parameter space.
[0089] To implement a fully reversible neural network architecture, a reversible block composed of two complementary affine coupling layers is adopted. These reversible blocks are the basic units of the INN model, and they ensure that each step of the network is reversible through a specific design. As Figure 2 shown, each reversible block contains two main parts: one is an affine transformation layer responsible for processing the input data, and the other is a coupling layer responsible for maintaining the information flow. This structural design not only ensures the lossless transmission of information in the network but also allows the model to effectively perform inverse inference while making forward predictions.
[0090] As can be seen from Figure 2 , the input vector u of the block is split into two parts, namely u1 and u2, which are transformed by functions s i and t i , (i ∈ {1, 2}) and coupled in an alternating manner. The output is the concatenation of v1 and v2, as follows:
[0091] v1 = u1 ⊙ exp(s2(u2)) + t2(u2)
[0092] v2 = u2 ⊙ exp(s1(u1)) + t1(v1)
[0093] Given the output, the process can also be obtained, as Figure 3 shown:
[0094] The formula is as shown in Equation 4 below:
[0095] u2 = (v2 - t1(v1)) ⊙ exp(-s1(u1))
[0096] u1=(v1-t2(u2))⊙exp(-s2(u2))
[0097] In the design of reversible neural network (INN), the mapping function s i and t i plays a key role, these mappings can be arbitrarily complex functions of the input vectors v1 and v2, and they do not have to be invertible themselves. In practice, these mappings are usually implemented through a series of fully connected layers that use the leaky ReLU (Rectified LinearUnit) activation function. The leaky ReLU activation function was chosen because it performs well in dealing with nonlinear problems while preventing the gradient vanishing problem, which is critical for the training of deep networks.
[0098] The deep reversible neural network designed in this embodiment is composed of a series of such reversible blocks. The design of this structure brings several significant features. First, the mapping from input to output is bijective, which means that its inverse mapping exists. This is very important in practical applications because it means that once the network is trained in the forward process, the reverse process can be directly obtained, thereby achieving bidirectional prediction and reasoning.
[0099] 5. Research on mean square error loss function:
[0100] like Figure 4 As shown in the figure, the mean squared error (MSE) loss function is used in the forward training stage to measure the difference between the model output and the actual chemical composition. The MSE loss function calculates the average of the sum of squares of the differences between the predicted value and the true value. This loss function helps the model accurately capture the influence of preparation parameters when predicting chemical composition, thereby ensuring the accuracy and reliability of the prediction.
[0101] In order to explore this issue more deeply, we can further analyze the application of MSE loss function in chemical composition prediction. The mean square error loss function is a loss function widely used in regression problems. It evaluates the performance of the model by calculating the difference between the predicted value and the true value. In chemical composition prediction, the MSE loss function can help understand the prediction accuracy of the model for different chemical components.
[0102] By using the MSE loss function, we can find the differences in the model's predictions for different chemical components. For some chemical components, the model may predict their content more accurately, while for other chemical components, the model's predictions may have large errors. This information can help understand the model's capabilities and limitations and guide the improvement of the model in subsequent work.
[0103] In addition, the MSE loss function can also help optimize the training process of the model. During the training process, the parameters of the model can be adjusted to minimize the MSE loss function, thereby improving the prediction accuracy of the model. For example, one can try to increase the depth of the model, increase the amount of training data, use different optimization algorithms, etc. to optimize the performance of the model.
[0104] By optimizing the training process of the model, the prediction accuracy and reliability of the model can be improved, thus better guiding chemical preparation experiments. In practical applications, techniques such as cross-validation can also be used to evaluate the performance of the model and compare it with experimental data to verify the accuracy of the model.
[0105] In summary, using the MSE loss function in the forward training stage is an effective method to measure the difference between the model output and the actual chemical composition. By analyzing the application of the MSE loss function, one can understand the performance of the model in chemical composition prediction, optimize the training process of the model, and improve the prediction accuracy and reliability of the model. This has important guiding significance for chemical preparation experiments and helps to better understand the relationship between chemical composition and preparation parameters.
[0106]
[0107] In the formula, N represents the total number of samples. For each sample, represents the predicted value of the network, represents the corresponding true target value.
[0108] The forward training structure is shown in Table 1:
[0109] Table 1 INN Forward Mapping Network Structure
[0110]
[0111] 6. Research on the Maximum Mean Discrepancy Loss Function:
[0112] As Figure 5 shown, in the backward training stage, the Maximum Mean Discrepancy (MMD) loss function is used to optimize the model. The MMD loss function is a statistical measure based on kernel methods for comparing the similarity of two probability distributions. It works by calculating the difference in the means of two distribution samples in a specific space. The MMD loss helps ensure that the model can effectively trace back from the chemical composition to the preparation parameters, thus guaranteeing the accuracy of the reverse prediction process.
[0113] In the backward training stage, the Maximum Mean Discrepancy (MMD) loss function is adopted to optimize the model. The MMD loss function is a statistical measure based on kernel methods, which is used to compare the similarity of two probability distributions. It works by calculating the difference in the means of the samples from the two distributions in a specific space.
[0114] The advantage of the MMD loss function is that it can effectively capture the global differences between two distributions. This means that if there are significant mean differences between the two distributions, the MMD loss will increase significantly. This makes the MMD loss function a very useful tool for optimizing the model and ensuring that it can effectively trace back from chemical compositions to preparation parameters.
[0115] In the research, the MMD loss function is used to compare the predicted chemical composition distribution with the actual preparation parameter distribution. By minimizing this loss function, a more accurate model can be trained, which can effectively trace back from chemical compositions to preparation parameters. This helps to ensure the accuracy of the predicted reverse process, thus providing strong support for further chemical process optimization.
[0116] In addition, a series of experiments are conducted to verify the effectiveness of the MMD loss function. Multiple different datasets and model architectures are used, and it is found that the MMD loss function can achieve the best results in most cases. These experimental results show that the MMD loss function is a general and effective optimization tool applicable to various different reverse problems of chemical processes.
[0117] By using the MMD loss function to optimize the model, a model that can effectively trace back from chemical compositions to preparation parameters can be trained more accurately. This helps to ensure the accuracy of the predicted reverse process, thus providing strong support for chemical process optimization.
[0118] The backward training structure is shown in Table 2:
[0119] Table 2 INN Reverse Mapping Network Structure
[0120]
[0121] 7. Research on Algorithm Training Strategy:
[0122] In this embodiment, a new training strategy is designed to ensure that the invertible neural network (INN) model can efficiently and accurately learn and predict the key chemical components of tobacco products.
[0123] Data Splitting Method: When preparing the dataset for each INN model, a careful division was made to ensure that the model has enough data to learn during the training process and to be able to evaluate the model's performance. 80% of the data was used as the training set, and the remaining 20% as the test set. This division method not only helps to detect and correct possible problems in a timely manner, such as overfitting or underfitting, thus ensuring the generalization ability of the model, but also allows the evaluation of its performance at the model development stage.
[0124] To explore this issue more deeply, the roles of the training set and the test set can be further analyzed. The training set is the dataset used to train the model, which contains sufficient information for the model to learn the internal patterns and features of the data. During the training process, the model continuously adjusts its parameters to minimize the error rate in the training set. However, relying solely on the training set is not sufficient to evaluate the model's performance. Therefore, a test set is needed to evaluate the model.
[0125] The test set is a dataset independently collected from the training set and does not participate in the model's training process. Therefore, the test set can be used to evaluate the model's performance on new data, so as to understand whether the model can generalize to unknown data. When evaluating the model on the test set, some evaluation metrics are usually used, such as accuracy, recall, F1 score, etc. By analyzing these metrics, the performance of the model on unknown data can be understood, and it can be judged whether the model can meet the requirements.
[0126] Carefully dividing the dataset is one of the important steps in the training of the INN model. By reasonably dividing the training set and the test set, it can be ensured that the model has enough data to learn during the training process and its performance can be evaluated at the model development stage. This method helps to detect and correct possible problems in a timely manner, thus ensuring the generalization ability of the model and providing strong support and guarantee for model development.
[0127] Optimized Design of the Batch Training Architecture: During the training process, the batch training method was adopted, with each batch containing 32 data samples. This method can not only improve the training efficiency but also help to optimize memory usage, especially when dealing with large-scale datasets. In addition, batch training helps to smooth the gradient update during the training process and reduce the training fluctuations caused by outliers in individual samples.
[0128] When training a neural network model, a group of data samples are used as an input at one time, rather than inputting individual samples one by one. The advantage of this method is that it can improve the training efficiency because multiple samples can be processed at once instead of one by one. This can not only reduce the training time but also optimize memory usage, especially when dealing with large-scale datasets. Since multiple samples can be loaded into memory at once, the memory occupancy and consumption can be reduced.
[0129] Research on the Adam Optimization Algorithm: To further improve the generalization ability of the model, an optimization algorithm called Adam needs to be adopted. Adam is an optimization algorithm with an adaptive learning rate. It can dynamically adjust the learning rate according to the training situation of the model, thereby ensuring that the model can effectively learn and adjust during the training process. By using the Adam optimization algorithm, the INN model can maintain a high learning efficiency and adjustment ability throughout the training process, thereby improving the prediction accuracy and the overall performance of the model.
[0130] As Figure 6 shown, the reversible neural network model alternates between forward and backward iterations during the training process. This method enables the model to learn in different spaces (data space and latent space), thereby understanding and describing data from multiple perspectives.
[0131] During the forward process, the model predicts the corresponding chemical composition based on the input preparation parameters. This process is completed through the forward propagation of the reversible neural network, which utilizes the powerful fitting ability of the neural network to accurately capture the complex relationships between data.
[0132] During the backward process, the model attempts to trace back from the predicted chemical composition to the preparation parameters. This process is completed through the backward propagation of the reversible neural network, which utilizes the backward propagation mechanism of the neural network and adjusts the network parameters through the gradient descent optimization method, enabling the model to better model the complex distribution of data.
[0133] This network design also makes the mapping have a tractable Jacobian determinant. The tractability of the Jacobian determinant means that the probability can be explicitly transformed through variable formulas, which is crucial for understanding and interpreting the behavior of the network. It can help better understand the learning process and mapping relationship of the network, thereby better adjusting the network structure and parameters. The non-zero Jacobian determinant of the network is a key factor in ensuring the reversibility of the network. The non-zero Jacobian determinant ensures the stability and effectiveness of the network during forward and backward propagation, thereby enabling the entire network to maintain a high degree of accuracy and reliability during prediction and inference.
[0134] 8. Cigarette Parameter Prediction System Based on INN:
[0135] Overview of the Architecture: This embodiment adopts a hierarchical architecture pattern. This design concept aims to improve the flexibility, scalability, and maintainability of the system. Nine reversible neural network (INN) models are carefully designed in the core layer. They are like the prediction engines of the system, each responsible for predicting relevant data of different types of cigarettes (slim cigarettes, medium cigarettes, thick cigarettes) and chemical components (tar content, carbon monoxide, nicotine).
[0136] These INN models not only have high accuracy but also can effectively predict for different cigarette types and chemical components. This specialized design enables more accurate prediction of the performance of various tobacco products, thus better meeting the needs of users.
[0137] To achieve this goal, these models are deployed on a Web server based on the Flask framework. This server is not only responsible for handling requests from users but also undertakes the tasks of model calculation and data transmission. This design effectively improves the processing capacity and data transmission efficiency of the system, enabling users to obtain the required prediction results more conveniently.
[0138] The functional architecture of the system is as Figure 7 shown. The system mainly consists of parts such as user interface, data processing, model calculation, and data transmission. This architecture mode can meet the needs of efficient data analysis and prediction, and is easy to maintain and expand (In technical reports, especially key paragraphs, the language must be standardized and concise).
[0139] System feasibility analysis: Conducting feasibility analysis on the system can effectively prevent evaluation errors and is the basis for ensuring the success of system development. This system is based on B / S and realizes the control of reverse prediction of tobacco production parameter usage. Its main technologies include: Python, HTML, Javascript, CSS, PyTorch, INN, etc. Currently, these technologies have all undergone relatively mature and stable development, and a large amount of technical data can be queried. Therefore, technically speaking, this system is feasible. At the same time, the Vue architecture will be adopted to establish a friendly human-computer interaction interface, making the operation of the entire system simple and feasible.
[0140] Analysis of non-functional requirements of the system: The non-functional requirements of the intelligent generation system based on machine learning with constraints developed in this embodiment are defined as follows:
[0141] Practicality: The system can accurately meet the business requirements of the chemical components (tar content, carbon monoxide, nicotine) that meet the standards in cigarette production.
[0142] Usability: The system has a good human-computer interaction interface, which is simple, intuitive, and easy to operate.
[0143] Scalability: The system adopts an advanced development architecture, which is convenient for system expansion and upgrade.
[0144] Reliability: This system works stably and rarely fails.
[0145] Robustness: Appropriate processing and fault tolerance mechanisms are designed.
[0146] System Functional Requirement Analysis: The cigarette production process can be summarized into the following steps: First, the target chemical components are used as input values, and these values are transmitted to the backend system through the API interface. After receiving the values, the backend system inputs them into the INN model. Based on the input target chemical components, the INN model outputs three key characteristic values, namely the air permeability of cigarette paper, the air permeability of tipping paper, and the pressure drop of the filter rod. These three characteristic values are crucial for predicting chemical components.
[0147] Next, these three characteristic values are returned to the front end. After receiving this data, the front-end system will perform further processing and operations based on these values. For example, based on this data, the production process of tobacco can be monitored and adjusted in real time to ensure the quality and stability of the product.
[0148] System Architecture Design: The overall architecture design diagram of the system is as Figure 8 shown, which shows the main components of the system and their interrelationships. This architecture diagram aims to help better understand and design each part of the system, and how they work together to achieve the overall function of the system.
[0149] In this architecture diagram, it can be clearly seen that the system is divided into three main components: the front end, interface call, and backend. Each part undertakes specific responsibilities and functions, and they depend on and influence each other, forming an organic whole.
[0150] The front-end part is mainly responsible for interacting with users, receiving user requests and inputs, and presenting corresponding pages and data.
[0151] The interface call part is the bridge connecting the front and backend. It is responsible for passing the front-end requests to the backend and feeding back the data returned by the backend to the front end. The interface call part is usually implemented by backend developers, who use various programming languages and technologies to design and develop interfaces to ensure the security and stability of data.
[0152] The backend part is responsible for handling core functions such as business logic, data storage, and management. Backend developers usually use various backend frameworks and database technologies to implement these functions.
[0153] This architecture diagram provides a comprehensive view of the system design, which helps better understand the overall structure of the system and the functions of each part. Through this architecture diagram, it can be more clearly seen how each part of the system works together to achieve the overall function of the system, thus facilitating better system design and development.
[0154] Model and Server Design: With the progress of technology, the ability to process a large amount of complex data and extract valuable information has become more important in today's digital age. The INN model, as an advanced machine learning model, is widely used in the analysis of production parameters, chemical compositions, etc. To better meet the actual needs, the model runs in a simplified form on the server to ensure the stability and reliability of the system.
[0155] First, the design of using a standby server enables the prediction service to switch to the standby server in case of problems, ensuring the continuity of the service. This design not only reduces the complexity of the system but also effectively addresses the risk of a single server failure.
[0156] Second, the server still plays the role of a bridge between the user interface and the model. It is still responsible for receiving the preparation parameters input by the user, passing them to the INN model, and intuitively returning the prediction results to the user. This simplified design can still provide users with a convenient operation experience and ensure that the model can better serve the needs of users.
[0157] Deploying the prediction service of the INN model on the primary server and the standby server is a simple and effective design. While reducing the system complexity, it can still meet the actual needs and ensure the reliability and continuity of the system. In the future, with the development of technology, the system architecture can be further optimized and adjusted according to application requirements.
[0158] In the embodiments of the present invention, 400 cigarette production data sets are used. Each data set contains three eigenvalue features of cigarette paper air permeability, tipping paper air permeability, and filter rod pressure drop, and one label value of tar content. After the data set is preprocessed, 20% of the data is used as the test data set, and the remaining 80% is the train data set, and they are shuffled respectively. Part of them is as follows:
[0159]
[0160] Experimental Results: Through experiments, the cigarette tar content prediction algorithm based on the reversible neural network proposed in the present invention has significant advantages compared with the traditional linear regression model. The maximum error is 3.4%, and the overall error is stable between 0 and 2.0%. Under the condition of setting the tar release amount, the auxiliary material parameters are reversely predicted through the reversible neural network algorithm, realizing the accurate prediction of the cigarette auxiliary material parameters required for the target tar release amount, and reducing the workload in the process of cigarette R & D and maintenance.
[0161] The above-described embodiments merely represent specific implementation manners of the present invention. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent for the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all fall within the protection scope of the present invention.
Claims
1. A method for predicting cigarette tar content based on a reversible neural network, characterized in that: The following steps are involved: Step 1: Construct a reversible neural network model; Step 2: Take the target chemical composition as the input value and pass the input value to the back-end system through the API interface; after the back-end system receives the value, it inputs it into the reversible neural network model; the reversible neural network model outputs three characteristic values according to the input target chemical composition to complete the prediction of cigarette tar content.
2. The method for predicting cigarette tar content based on a reversible neural network according to claim 1, characterized in that: The step 1 specifically comprises the following steps: Step 1.1, represent the reversible neural network model based on Jacobian determinant; Step 1.2, using a reversible block based on two complementary affine coupling layers, each of the reversible blocks includes an affine transformation layer for processing input data, and a coupling layer for maintaining information flow; Step 1.3, in the forward training stage, the mean square error (MSE) loss function is used to measure the difference between the output of the reversible neural network model and the actual chemical composition; Step 1.4: Use the maximum mean difference (MMD) loss function to optimize the reversible neural network model in the backward training phase. Step 1.5: Use the training set and the test set to perform batch training on the reversible neural network model. During the training process, forward and backward iterations are performed alternately. At the same time, the Adam optimization algorithm is used to improve the generalization ability of the reversible neural network model.
3. The method for predicting cigarette tar content based on a reversible neural network according to claim 2, characterized in that: The step 1.1 is as follows: The Jacobian determinant is a function of n n-variables u i =u i (x1,x2,·.·,x n ), (i=1,2,·.·,n) is the determinant of the elements, denoted as: Under the premise that all functions are continuously differentiable, the differential form of the function group is: If the Jacobian determinant is not 0 anywhere in a connected region, it is positive everywhere or negative everywhere; if the Jacobian determinant is always 0, then at least one of the functions is a continuously differentiable function of the residual function. The Jacobian determinant is closely related to neural networks, that is, x = f(z), and the relationship between the distributions becomes: p(x)=π(z)|det(J f-1 )| And because there are: |it(J f-1 )|=1 / |the(J f )| Then the Jacobian determinant of the f network must not be 0; For the one-to-many mapping y->x, an additional potential output variable z is introduced and trained to capture information related to x but not contained in y; p(z) is adjusted according to the Gaussian distribution, that is, p(x|y) is adjusted to a certain function x=g(y,z), which transforms the known distribution p(z) to the x space while satisfying y; According to the model q(x|y) to predict p(x|y), an implicit variable z is introduced to present q(x|y) in the form of g(y,z;θ): x=g(y,z;θ) z~p(z)=g(z;0;I k ) The forward process is represented by f(x;θ): [y,z]=f(x:θ)=[f y (x;θ),f z (x;θ)]=g -1 (x;θ) f y (x;θ)≈s(x) The dimension of variable z is K=DM. If this results in M+K>D, then the x vector is padded with a zero vector of dimension M+KD, where D is the dimension of x and M is the dimension of y; thus q(x|y) is expressed as: q(x=g(y,z:θ)|y)=p(z)|J X | -1 4. The method for predicting cigarette tar content based on a reversible neural network according to claim 3, characterized in that: In step 1.2: The input vector u of the reversible block is divided into u1 and u2, and the two parts are determined by the function s i ,t i , (i∈{1,2}) conversions, and coupled in an alternating manner; the output is the connection of v1 and v2, as shown below: v1=u1⊙exp(s2(u2))+t2(u2) v2=u2⊙exp(s1(u1))+t1(v1) Given the output, the inverse process is as follows: u2=(v2-t1(v1))⊙exp(-s1(u1)) u1=(v1-t2(u2))⊙exp(-s2(u2)).
5. The method for predicting cigarette tar content based on a reversible neural network according to claim 2, characterized in that: In step 1.3, the mean square error MSE loss function is as follows: Where N represents the total number of samples. For each sample, represents the predicted value of the network, Represents the corresponding true target value.
6. The method for predicting cigarette tar content based on a reversible neural network according to claim 1, characterized in that: In step 2, the three characteristic values are cigarette paper air permeability, tipping paper air permeability and filter rod pressure drop.
7. The method for predicting cigarette tar content based on a reversible neural network according to claim 1 or 6, characterized in that: In step 2, it also includes: These three characteristic values are returned to the front-end system. After receiving these data, the front-end system monitors and adjusts the tobacco production process in real time based on the data to ensure the quality and stability of the product.