Tobacco shred sample generation model training method, sample generation method and related device
By constructing a GAN-based tobacco sample generation model, using BPNN generator and discriminator, the problem of insufficient samples during tobacco drying is solved, high-quality data generation is achieved, and the intelligence level of drying control is improved.
Patent Information
- Application Number
- CN202510287656.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-07-25
AI Technical Summary
During the tobacco drying process, due to the high data acquisition cost or frequent changes in production batches, it is difficult to obtain sufficient data of the process parameter sample data of the tobacco dryer, resulting in limited application of neural network models in drying control.
Generative adversarial network (GAN) is used to construct a tobacco sample generation model, and a three-layer fully connected backpropagation neural network (BPNN) is used as a generator and discriminator. By generating synthetic samples with high similarity to the real samples, and optimizing model parameters through loss functions until the probability that the sample generated by the generator is correctly recognized by the discriminator as a real sample is within the set threshold interval.
The training sample space is expanded, the applicability of the model and the accuracy and reliability of generating tobacco samples are improved, the problem of insufficient samples is solved, and the intelligence level of drying control is enhanced.
Smart Images

Figure CN120372277A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of tobacco processing, specifically to technical fields such as tobacco drying and neural network modeling, and particularly relates to a training method for a sample generation model of the process parameters of a tobacco dryer, a method for generating samples of the process parameters of a tobacco dryer, and related devices. Background Art
[0002] The drying process is one of the key links in tobacco processing, and its control quality directly affects the flavor and quality of the final product. Parameters such as temperature and humidity during the drying process need to be precisely controlled to ensure that the tobacco leaves reach the ideal moisture content and the best physical properties. However, due to the nonlinear and time-varying characteristics of the drying process, coupled with the complex industrial production environment, traditional methods based on experience such as proportional-integral-derivative (PID) control often fail to achieve the desired effect. Therefore, achieving precise control of the drying process has become an urgent problem in the industry.
[0003] With the development of artificial intelligence technology, especially the wide application of neural networks in pattern recognition and process control, researchers have begun to explore its application in drying control. As a classic feedforward neural network, the backpropagation neural network (BPNN) has been widely used in the modeling and control of complex industrial processes due to its powerful nonlinear mapping ability and adaptability. However, the performance of the neural network model depends on a large amount of high-quality training data. In actual production, due to the high cost of data acquisition or frequent changes in production batches, it is often difficult to obtain sufficient sample data of the process parameters of the tobacco dryer, thus limiting the further application of the neural network model in drying control. Summary of the Invention
[0004] This application provides a training method for a tobacco sample generation model, a sample generation method, and related devices to solve the problem of insufficient sample space of the process parameters of a tobacco dryer required when using a neural network model in a tobacco drying control scheme.
[0005] The technical solutions are as follows:
[0006] In a first aspect, a training method for a tobacco sample generation model is provided, including:
[0007] Determine the initialization model to be trained and the model parameters required for training; wherein, the initialization model is a generative adversarial network including a generator and a discriminator, and both the generator and the discriminator are three-layer fully connected backpropagation neural networks BPNN;
[0008] Obtain random noise data and real tobacco samples, and input the random noise data in the form of a noise vector into the BPNN network where the generator of the initialization model is located to generate tobacco synthetic samples with a set similarity to the real tobacco samples; the real tobacco samples are part of the real samples used to characterize the process parameters of the tobacco dryer.
[0009] Mix the tobacco synthetic samples and the real tobacco samples in equal proportion to obtain a tobacco training set, and input it into the BPNN network where the discriminator of the initialization model is located for discrimination evaluation, and output a probability value; the probability value is used to reflect the confidence of the discriminator in the authenticity of the tobacco synthetic samples.
[0010] If the probability value does not fall within the set probability threshold interval, repeatedly train the initialization model based on the loss function of the generator and the loss function of the discriminator to adjust and optimize the relevant parameters of the initialization model until the probability value output by the discriminator falls within the set probability threshold interval, and obtain a converged tobacco sample generation model.
[0011] In a possible implementation manner, the loss function of the generator is optimized through the following formula:
[0012]
[0013] where m represents the number of tobacco synthetic samples, and P(S(c i )) represents the probability that the discriminator classifies the i-th tobacco synthetic sample as true.
[0014] The loss function of the discriminator is optimized through the following formula:
[0015]
[0016] where P(x i ) represents the probability that the discriminator classifies the i-th real tobacco sample as true.
[0017] In a possible implementation manner, the vector dimension of the random noise data is the same as the input vector dimension of the first layer of the BPNN in the generator; or,
[0018] The absolute value of the difference between the vector dimension of the random noise data and the input vector dimension of the first layer of the BPNN in the generator is less than a set threshold, where the set threshold is a positive integer.
[0019] In a possible implementation manner, the process parameters of the tobacco dryer include some or all of the following: ventilation valve opening, drum wall temperature, dry leaf moisture content, hot air temperature, drum wall steam valve opening, circulating air steam valve opening, and cooling leaf moisture content.
[0020] In a second aspect, a method for generating a cut tobacco sample is provided, including:
[0021] Determine random noise data, where the dimension of the noise vector in the random noise data matches the dimension of the input vector of the first layer of the BPNN in the generator of the cut tobacco sample generation model;
[0022] Input the random noise data into the cut tobacco sample generation model, and the generator predicts and generates a cut tobacco sample representing the process parameters of the cut tobacco dryer; the cut tobacco sample is evaluated by the discriminator, and an effective probability indicating that the cut tobacco sample is a real sample is output;
[0023] Wherein, the cut tobacco sample generation model is trained based on the training method described in the first aspect.
[0024] In a third aspect, a training device for a cut tobacco sample generation model is provided, including:
[0025] A determination module, configured to determine an initialization model to be trained and model parameters required for training; wherein, the initialization model is a generative adversarial network including a generator and a discriminator, and both the generator and the discriminator are three-layer fully connected backpropagation neural networks BPNN;
[0026] A generation module, configured to obtain random noise data and real cut tobacco samples, and input the random noise data into the BPNN network where the generator of the initialization model is located in the form of a noise vector, and generate a synthetic cut tobacco sample having a set similarity with the real cut tobacco sample; the real cut tobacco sample is a part of the real sample used to represent the process parameters of the cut tobacco dryer;
[0027] A discrimination module, configured to mix the synthetic cut tobacco sample and the real cut tobacco sample in equal proportion to obtain a cut tobacco training set, and input the cut tobacco training set into the BPNN network where the discriminator of the initialization model is located for discrimination evaluation, and output a probability value; the probability value is used to reflect the confidence of the discriminator in the authenticity of the synthetic cut tobacco sample;
[0028] A training module, if the probability value does not fall within a set probability threshold interval, is configured to repeatedly train the initialization model based on the loss function of the generator and the loss function of the discriminator to adjust and optimize the relevant parameters of the initialization model until the probability value output by the discriminator falls within the set probability threshold interval, and a converged cut tobacco sample generation model is obtained.
[0029] In a fourth aspect, a cut tobacco sample generation device is provided, including:
[0030] A determination module, configured to determine random noise data, wherein the dimension of the noise vector in the random noise data matches the dimension of the vector input to the first layer of the BPNN in the generator of the cut tobacco sample generation model;
[0031] A generation module, configured to input the random noise data into a cut tobacco sample generation model, and predict and generate a cut tobacco sample representing the process parameters of a cut tobacco dryer by the generator; the cut tobacco sample is evaluated by a discriminator to output an effective probability characterizing that the cut tobacco sample is a real sample;
[0032] Wherein, the cut tobacco sample generation model is trained by the training method described in the first aspect.
[0033] In a fifth aspect, an electronic device is provided, including:
[0034] At least one processor; and
[0035] A memory communicatively connected to the at least one processor; wherein,
[0036] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the methods of the above aspects and any possible implementation manners.
[0037] In a sixth aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement the methods of the above aspects and any possible implementation manners.
[0038] In a seventh aspect, a computer program product is provided, including a computer program, and the computer program implements the methods of the above aspects and any possible implementation manners when being executed by a processor.
[0039] The beneficial effects of the technical solution provided by this application at least include:
[0040] As can be seen from the above technical solutions, the embodiments of the present application can determine the initialization model to be trained and the model parameters required for training; obtain random noise data and real tobacco samples, and input the random noise data into the BPNN network where the generator of the initialization model is located in the form of a noise vector to generate tobacco synthetic samples having a set similarity with the real tobacco samples; mix the tobacco synthetic samples and the real tobacco samples in equal proportion to obtain a tobacco training set, and input it into the BPNN network where the discriminator of the initialization model is located for discrimination evaluation to output a probability value; if the probability value does not fall within the set probability threshold interval, then repeatedly train the initialization model based on the loss function of the generator and the loss function of the discriminator to adjust and optimize the relevant parameters of the initialization model until the probability value output by the discriminator falls within the set probability threshold interval, and a converged tobacco sample generation model is obtained. Thus, by generating high-quality synthetic data to expand the training sample space, the applicability of the model is improved; and by repeatedly training with the optimized loss function to obtain a converged sample generation model, the accuracy and reliability of generating tobacco samples are improved.
[0041] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become easily understood through the following description. Brief Description of the Drawings
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0043] Figure 1 It is a schematic diagram of the steps of a method for training a tobacco sample generation model provided by an embodiment of the present application.
[0044] Figure 2 It is a schematic diagram of the steps of a method for generating tobacco samples provided by an embodiment of the present application.
[0045] Figure 3 It is a schematic flow diagram of the training process of a tobacco sample generation model and the process of generating tobacco samples provided by an embodiment of the present application.
[0046] Figures 4a - 4d It is a schematic diagram of the data results of experimental verification of a tobacco sample generation model provided by an embodiment of the present application.
[0047] Figure 5 It is a structural block diagram of a training device for a tobacco sample generation model provided by another embodiment of the present application.
[0048] Figure 6 It is a structural block diagram of a cut tobacco sample generating device provided by another embodiment of the present application.
[0049] Figure 7 It is a block diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0050] The exemplary embodiments of the present application will be described below with reference to the accompanying drawings. Various details of the embodiments of the present application are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, descriptions of well-known functions and structures are omitted below for clarity and conciseness.
[0051] Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts fall within the scope of protection of the present application.
[0052] It should be noted that the terminal devices involved in the embodiments of the present application may include, but are not limited to, intelligent devices such as mobile phones, personal digital assistants (PDAs), wireless handheld devices, and tablet computers (Tablet Computers); the display devices may include, but are not limited to, devices with display functions such as personal computers and televisions.
[0053] In addition, the term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.
[0054] In the field of drying control, the stability and quality of the drying process directly affect the flavor and quality of tobacco products. In recent years, more research has focused on exploring the application of intelligent control methods in the drying process. With the in-depth research, the problem of lack of relevant data in process control still exists, and generating high-quality synthetic data to improve the performance of the model in an undersampled environment has become a hot topic. However, the research on data generation methods for the drying process is still limited.
[0055] In view of this, the present application aims to solve the problem of insufficient samples in drying control by constructing a data generation model for the insufficient sample space of dryer process parameters based on BPNN. This model uses BPNN to construct a generative adversarial network model composed of a generator and a discriminator to achieve high-quality data generation. The inventive concept of the present application lies in: First, a data generation model for the insufficient sample space of process parameters based on BPNN is proposed, and the training sample space is expanded by generating high-quality synthetic data, thereby improving the applicability of the model. Second, a generator and a discriminator based on BPNN are designed, and their network structures and optimization strategies are analyzed in detail, improving the accuracy and reliability of the generated data. Third, the effectiveness of the proposed model in drying process control is verified through experiments. This shows the superiority of this method in dealing with the problem of insufficient tobacco cut samples and provides a new solution for the intelligent control of the tobacco cut drying process.
[0056] GAN is a powerful tool for data generation through adversarial training. Here, the basic framework of GAN is used to construct a data generation model to generate high-quality dryer process parameter samples.
[0057] Refer to Figure 1 As shown, it is a schematic diagram of the steps of a training method for a tobacco cut sample generation model provided by an embodiment of the present application. The execution subject of this training method can be a training device for a tobacco cut sample generation model. This training device can be a software module or a hardware device with data calculation, storage and other processing functions, such as electronic devices such as computers, tablets, smart phones, dialogue terminals, smart wearable devices, or software modules or units that can be integrally installed in these electronic devices. The present application does not limit this.
[0058] As Figure 1 shown, the training method for this tobacco cut sample generation model can include the following steps:
[0059] Step 102: Determine the initialization model to be trained and the model parameters required for training; wherein, the initialization model is a generative adversarial network including a generator and a discriminator, and both the generator and the discriminator are three-layer fully connected backpropagation neural networks BPNN.
[0060] The initialization model to be trained can be a generative adversarial network GAN, and this step can be regarded as the initialization process of the model. Specifically, it can include the initialization of the GAN network and the initialization of the parameters required for model training.
[0061] In this application, the designs of the discriminator and the generator are crucial for the quality and accuracy of the generated data. The task of the discriminator is to determine whether the generated data matches the distribution of the real data, while the generator aims to generate fake data that is consistent with the real data distribution. The main function of the discriminator is to perform binary classification between the fake samples generated by the generator and the real samples. The input of the discriminator is a dataset composed of a mixture of fake samples generated by the generator and real samples of the dryer process parameters, and there is a non-linear relationship between these data groups. The output value is a probability scalar indicating the likelihood that the generated fake sample data is classified as a real sample. Due to the complex non-linear relationship between these samples, the discriminator needs to have a certain non-linear mapping ability. Considering that the dimension of the data is relatively low and there are few features, a three-layer fully connected BPNN is used as the discriminator. This network structure can effectively handle simple binary classification tasks, while performing linear and non-linear feature mapping to ensure that the quality of the generated data meets the accuracy requirements. The goal of the generator is to generate fake data that is consistent with the real data distribution. To achieve this goal, the network structure of the generator must be able to formalize the characteristics of the fake dataset it generates and have a strong non-linear learning ability. Analyze the input and output data of the generator. The input consists of a set of randomly generated noise data with the same number as the real dataset, and the output is data that is closer to the real value after being processed by the generator network. Given that the input data is one-dimensional and relatively simple, the generator also selects a three-layer fully connected BPNN.
[0062] In the solution of this application, this BPNN has a strong non-linear mapping ability. Without knowing the internal relationship between the input and output variables, it automatically adjusts its structural parameters through training to establish a complex mapping relationship between the input and output. This feature is particularly suitable for dealing with non-linear features and complex data relationships in the dryer process parameters. Therefore, this application preferably uses a three-layer fully connected BPNN as the network structure of the generator and the discriminator.
[0063] Step 104: Obtain random noise data and real tobacco samples, and input the random noise data in the form of a noise vector into the BPNN network where the generator of the initialized model is located to generate tobacco synthetic samples with a set similarity to the real tobacco samples; the real tobacco samples are part of the real samples used to characterize the process parameters of the tobacco dryer.
[0064] In the solution of this application, random noise data can be randomly generated through various existing noise data generation schemes. These random noise data usually follow a Gaussian distribution or a uniform distribution and are transformed through the neural network of the generator, and a cut tobacco synthetic sample with characteristics similar to the real cut tobacco sample can be generated. Among them, the real cut tobacco sample can be a small part of the samples obtained from the actual cut tobacco drying process dataset and is used to train the generator and the discriminator. It should be understood that this small part of the samples is not sufficient as the training dataset for the drying control model.
[0065] Optionally, the vector dimension of the random noise data is the same as the vector dimension of the input vector of the first layer of the BPNN in the generator; or, the absolute value of the difference between the vector dimension of the random noise data and the vector dimension of the input vector of the first layer of the BPNN in the generator is less than a set threshold, where the set threshold is a positive integer. In short, the vector dimension of the random noise data is close to the vector dimension of the input vector of the first layer of the BPNN in the generator, and it can be the same, or one dimension less or more. For example, the set threshold can be 1 or 2, etc.
[0066] Step 106: Mix the cut tobacco synthetic sample and the real cut tobacco sample in equal proportion to obtain a cut tobacco training set, and input it into the BPNN network where the discriminator of the initialized model is located for discrimination and evaluation, and output a probability value; the probability value is used to reflect the confidence of the discriminator in the authenticity of the cut tobacco synthetic sample.
[0067] After that, a cut tobacco training set is obtained by mixing the cut tobacco synthetic sample generated by the generator and the real cut tobacco sample. Moreover, it is necessary to ensure that the cut tobacco synthetic sample and the real cut tobacco sample are mixed in equal proportion, that is, the number of cut tobacco synthetic samples is the same as the number of real cut tobacco samples.
[0068] Step 108: If the probability value does not fall within the set probability threshold interval, the initialized model is repeatedly trained based on the loss function of the generator and the loss function of the discriminator to adjust and optimize the relevant parameters of the initialized model until the probability value output by the discriminator falls within the set probability threshold interval, and a converged cut tobacco sample generation model is obtained.
[0069] In the solution of this application, the set probability threshold interval can be an interval with boundary values near 0.5. For example, [0.45, 0.55], or [0.43, 0.58], that is, the probability value is close to 0.5.
[0070] Optionally, the loss function of the generator is optimized through the following formula:
[0071]
[0072] Wherein, m represents the number of cut tobacco synthesis samples, and P(S(c i )) represents the probability that the discriminator classifies the i-th cut tobacco synthesis sample as true;
[0073] The loss function of the discriminator is optimized by the following formula:
[0074]
[0075] Wherein, P(x i ) represents the probability that the discriminator classifies the i-th cut tobacco real sample as true.
[0076] Optionally, in the solution of this application, the key cut tobacco dryer process parameters affecting the moisture content of tobacco leaves during the drying process include some or all of the following: the opening degree of the ventilation valve, the temperature of the drum wall, the moisture content of dry leaves, the hot air temperature, the opening degree of the steam valve on the drum wall, the opening degree of the steam valve of the circulating air, and the moisture content of the cooling leaves.
[0077] Referring to Figure 2 shown, it is a schematic diagram of the steps of a cut tobacco sample generation method provided by an embodiment of this application. The execution subject of this generation method can be a cut tobacco sample generation device, and this generation device can be a software module or a hardware device with data calculation, storage and other processing functions, such as electronic devices such as a computer, a tablet computer, a smart phone, a dialogue terminal, a smart wearable device, etc., or a software module or unit that can be integrally installed in these electronic devices. This application does not limit this.
[0078] As Figure 2 shown, this cut tobacco sample generation method may include the following steps:
[0079] Step 202: Determine random noise data, wherein the dimension of the noise vector in this random noise data matches the dimension of the input vector of the first layer of the BPNN in the generator of the cut tobacco sample generation model;
[0080] Step 204: Input the random noise data into the cut tobacco sample generation model, and the generator predicts and generates a cut tobacco sample representing the cut tobacco dryer process parameters; this cut tobacco sample is evaluated by the discriminator, and outputs the effective probability characterizing that this cut tobacco sample is a real sample; wherein, the cut tobacco sample generation model is trained by the training method described in steps 102-step 108.
[0081] Through the technical solution of this application, an initial model to be trained and the model parameters required for training are determined; random noise data and real tobacco samples are obtained, and the random noise data is input into the BPNN network where the generator of the initial model is located in the form of a noise vector to generate tobacco synthesis samples with a set similarity to the real tobacco samples; the tobacco synthesis samples and the real tobacco samples are mixed in equal proportion to obtain a tobacco training set, which is input into the BPNN network where the discriminator of the initial model is located for discrimination evaluation, and a probability value is output; if the probability value does not fall within the set probability threshold interval, the initial model is repeatedly trained based on the loss function of the generator and the loss function of the discriminator to adjust and optimize the relevant parameters of the initial model until the probability value output by the discriminator falls within the set probability threshold interval, and a converged tobacco sample generation model is obtained. Thus, by generating high-quality synthetic data to expand the training sample space, the applicability of the model is improved; and the converged sample generation model is obtained through repeated training using the optimized loss function, which improves the accuracy and reliability of generating tobacco samples.
[0082] Figure 3 As shown, it is a schematic flowchart of the training process of the tobacco sample generation model provided by this application and the tobacco sample generation process.
[0083] The training process may specifically include the following operations:
[0084] Data initialization: The initial stage of the data generation model involves the initialization of model parameters and the data set. First, a part of the samples are obtained from the actual drying process data set for training the generator and the discriminator. The parameters of the generator and the discriminator are initialized to random values to start the training process. Data initialization also includes preprocessing tasks such as normalization to ensure the efficient training of the generator and the discriminator.
[0085] Generate random noise vectors: The core task of the generator is to generate realistic data samples. To this end, the generator first takes random noise vectors as input. These random variables usually follow a Gaussian distribution or a uniform distribution and are transformed through the neural network of the generator to generate synthetic samples with characteristics similar to real data samples. The goal of the generator is to learn how to generate samples extremely similar to real data from these random noises.
[0086] Mix the generated samples with the real samples: The generated samples are mixed with the real samples to create a training data set for the discriminator to classify. The discriminator receives these mixed samples and is trained to distinguish between the generated samples and the real samples. Its task is to output a probability scalar value indicating the likelihood that the input sample is a real sample. This probability reflects the confidence of the discriminator in the authenticity of the sample.
[0087] Probability Mapping of the Discriminator: The discriminator maps the inputs of generated samples and real samples to a probability scalar value between 0 and 1. This scalar value represents the discriminator's judgment on whether the sample is real. Ideally, the generator hopes that the samples it generates are classified as real samples by the discriminator, so that the output probability of the discriminator is close to 1, while real samples should result in an output probability close to 0.
[0088] Adjusting the Training Objectives Based on the Discriminator Output: According to the probability scalar value output by the discriminator, adjust the training objectives of the generator and the discriminator. If the output probability of the discriminator is close to 0.5, it indicates that the generated samples are difficult to distinguish from real samples, suggesting that the output of the generator is acceptable. At this time, the generator continues the optimization process based on the current generator parameters. If the output probability of the discriminator significantly deviates from 0.5, it indicates that the quality of the generated samples is insufficient. Then, the loss function of the discriminator is fed back to the generator to adjust and optimize its parameters. Through this adversarial training process, the generator and the discriminator are continuously improved. The generator gradually improves the quality of the generated samples to better match the characteristics of real samples.
[0089] Due to the existence of within-group data correlation and between-group non-linear characteristics in the data of the insufficient sample space of the dryer process parameters, the loss function of the original GAN model is not applicable to the research topic of this study. Therefore, it is crucial to optimize the loss functions of the discriminator and generator models.
[0090] During the operation of the data generation model, the discriminator and generator models are alternately trained. After each iteration of the generator model is completed, the discriminator model is optimized to achieve the improvement of the overall model. The optimization process of the objective function of the model can be expressed by the following formula:
[0091]
[0092] x represents real samples, c is the sample generated by the generator. z0 represents the distribution of real samples, and z c represents the distribution of samples generated by the generator. P(x) represents the probability that the discriminator model classifies real samples as true, while P(S(c)) represents the probability that the discriminator model classifies generated samples as true. E represents the expectation symbol, where represents the expectation of real samples x, represents the expectation of generated samples c. s represents related to the generator, and p represents related to the discriminator.
[0093] The goal of the generator is to generate fake samples that can obtain the highest possible score from the discriminator, thus deceiving the discriminator to classify the fake samples as real samples. The loss function of the generator model can be expressed as:
[0094]
[0095] Among them, m represents the number of samples. The calculation of the discriminator loss function is as follows:
[0096]
[0097] For the discriminator in the data generation model, an unlabeled input x is obtained. Since there is no label and it is not known whether the input is a real sample or a generated fake sample, the contribution Q(x) of the data generation model loss function is given by the following formula:
[0098] Q(x) = -z0(x)logP(x) - z c (x)log[1 - P(X)] (4)
[0099] Let the derivative of Q(x) with respect to P(x) be zero, and we can get:
[0100]
[0101] Simplifying formula (5) gives the optimal discriminator:
[0102]
[0103] Analyzing the optimal discriminator, if Z0(x) = 0 and Z c (x) ≠ 0, the optimal discriminator sets the probability to 0, indicating that the discriminator misclassifies the real sample as a fake sample. If Z0(x) = Z c (x), the discriminator believes that the probability of the sample being real or fake is 50% each, and the output is 0.5. By introducing a similarity measure, the original generator loss function defined in GAN can be equivalently transformed into minimizing the Jensen-Shannon divergence (JS divergence) between the real distribution Z0 and the generated distribution Z c between
[0104]
[0105] KL represents the Kullback-Leibler divergence. For real samples and generated samples, the objective function at this time becomes:
[0106]
[0107] To solve the problem of vanishing gradients in the generator, the logarithmic operation is removed in the calculations of both the discriminator and the generator. The improved loss function is as follows:
[0108]
[0109] By repeatedly training and debugging the generator and discriminator formed by the generative adversarial network through the above formula (9), the training effects of the generator and discriminator can be improved, the problem of gradient disappearance in GAN can be overcome, and finally dryer process parameter data of higher quality can be generated.
[0110] The prediction process mainly includes the following operations:
[0111] Generate a random noise vector: This step can be similar to the steps in the training process and will not be elaborated here.
[0112] The generator predicts the cut tobacco samples.
[0113] Mix the cut tobacco samples with the real cut tobacco samples: This step can be similar to the steps in the training process and will not be elaborated here.
[0114] The discriminator evaluates the cut tobacco samples: Output the effective probability indicating that the cut tobacco sample is a real sample.
[0115] Furthermore, the effectiveness of the cut tobacco sample generation model is verified through experiments. In this application, the Matlab platform is used to train and verify the model. The dataset used in the experiment includes real dryer process parameter data and generated noise data. The real dataset consists of multiple dryer process parameter samples, which are collected from the actual operation process of the dryer and represent the real process conditions under various drying scenarios. The collection process of these data includes collecting process parameters from the actual production environment and then conducting detailed annotation and processing. The generated noise data is generated by the generator network with the aim of mimicking the characteristics of the real data distribution. By inputting random noise into the generator, the network learns to generate samples similar to the real data and continuously optimizes the quality of the generated data. These noise data are used to compare with the real samples during the training process to ensure that the generator can generate data as close as possible to the real samples. Import the real training samples into the Matlab environment and label all these real samples as "1", representing positive samples. At the same time, label the noise samples generated by the generator as "0", representing negative samples. This labeling setting can clearly distinguish between real data and generated data, thereby effectively training the discriminator and generator models.
[0116] Figure 4a Shows the fitting state of the cut tobacco sample generation model on the training set. Specifically, the 2 R value reaches 0.93705, which indicates that the generation model effectively captures the distribution characteristics of the sample data in the training set. An R 2 value close to 1 means that the generated sample data has a high correlation with the actual data in the training set, indicating that the model accurately learns and replicates the characteristics of the real data.
[0117] Figure 4bShows the fitting status of the cut tobacco sample generation model on the test set. The fitting curve of the data generation model on the test set indicates that the model also performs excellently on the test data, and the R 2 value reaches 0.9434. This result shows that even when applied to data not seen before, the generation model can accurately replicate the distribution characteristics of the real data, reflecting the strong generalization ability of the model.
[0118] Figure 4c Shows the fitting status of the cut tobacco sample generation model on the entire data set. The results show that the model is robust and generalizable on the entire data set. Through the analysis of the training set and the test set, the model maintains a high fitting accuracy in a wider sample space, and the R 2 value reaches 0.93915. This indicates that the model not only effectively captures the patterns in the training data, but also can extend these patterns when encountering unseen test data. Therefore, the quality and authenticity of the generated samples are retained. This consistency confirms the strong fitting ability of the model to the global data distribution, highlighting its generalization ability.
[0119] Figure 4d Shows the significance test of the cut tobacco samples generated based on the cut tobacco sample generation model. The H values of all process parameters are 0, and the p values are all greater than 0.05 (where the P value is a parameter used to determine the result of the hypothesis test. The P value refers to the probability of a result more extreme than the obtained sample observation result when the null hypothesis is true, and H is the null hypothesis). This indicates that at the specified significance level, there is not enough evidence to reject the null hypothesis. Therefore, it can be inferred that there is no significant statistical difference between the new data set and the original data set. Specifically, the significance test results of each process parameter show that the interpolated data is statistically consistent with the distribution of the original data. This result verifies the reliability of the data generation model, indicating that the generated interpolation has successfully learned and retained the data distribution characteristics of the original sample space. Therefore, the data generation model is proven to be highly reliable in filling the undersampled space and can effectively improve the integrity of the data set without changing the data distribution characteristics.
[0120] Experiments show that the model has significant effects in expanding the training sample space and improving drying control: (1) The fitting R 2 value of the constructed data generation model on the training set is 0.93705, and the R 2 value on the test set is 0.9434. This indicates that the model not only performs well in the training set, but also maintains a high prediction accuracy on the test set. (2) By integrating the data of the training set and the test set, the model maintains a high fitting accuracy in a wider sample space, and the R 2The value is 0.93915. This indicates that the model effectively captures the patterns in the training data and extends these patterns to unseen test data, ensuring the quality and authenticity of the generated samples. (3) The significance analysis shows that the H values of all process parameters are 0 and the p values are greater than 0.05, indicating that there is no significant statistical difference between the dataset generated by the model and the original dataset, thus verifying the reliability of the data generation model.
[0121] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0122] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0123] Figure 5 shows the structural block diagram of a training device for a cut tobacco sample generation model provided by an embodiment of the present application, as Figure 5As shown in the figure. The training device 500 of the cut tobacco sample generation model in this embodiment may include a determination module 501, a generation module 502, a discrimination module 503, and a training module 504. Among them, the determination module 501 is used to determine the initialization model to be trained and the model parameters required for training; among them, the initialization model is a generative adversarial network including a generator and a discriminator, and both the generator and the discriminator are three-layer fully connected backpropagation neural networks (BPNNs). The generation module 502 is used to obtain random noise data and real cut tobacco samples, and input the random noise data into the BPNN network where the generator of the initialization model is located in the form of a noise vector to generate cut tobacco synthetic samples having a set similarity with the real cut tobacco samples; the real cut tobacco samples are partial real samples used to characterize the process parameters of the cut tobacco dryer. The discrimination module 503 is used to mix the cut tobacco synthetic samples and the real cut tobacco samples in equal proportion to obtain a cut tobacco training set, and input it into the BPNN network where the discriminator of the initialization model is located for discrimination evaluation, and output a probability value; the probability value is used to reflect the confidence of the discriminator in the authenticity of the cut tobacco synthetic samples. If the probability value does not fall within the set probability threshold interval, the training module 504 is used to repeatedly train the initialization model based on the loss function of the generator and the loss function of the discriminator to adjust and optimize the relevant parameters of the initialization model until the probability value output by the discriminator falls within the set probability threshold interval, and a converged cut tobacco sample generation model is obtained.
[0124] It should be noted that part or all of the training device of the cut tobacco sample generation model in this embodiment may be an application located on the local terminal, or may also be a functional unit such as a plug-in or software development kit (SDK) set in the application located on the local terminal, or may also be a processing engine located in the network-side server, or may also be a distributed system located on the network side. The present application does not make special limitations on this.
[0125] It can be understood that the application may be a native program (nativeApp) installed on the local terminal, or may also be a web program (webApp) of a browser on the local terminal. The present application does not limit this.
[0126] Optionally, in a possible implementation manner of this embodiment, the loss function of the generator is optimized by the following formula:
[0127]
[0128] Among them, m represents the number of cut tobacco synthetic samples, and P(S(c i )) represents the probability that the discriminator classifies the i-th cut tobacco synthetic sample as true;
[0129] The loss function of the discriminator is optimized by the following formula:
[0130]
[0131] wherein, the P(x i ) represents the probability that the discriminator classifies the i-th real tobacco sample as true.
[0132] Optionally, in a possible implementation manner of this embodiment, the vector dimension of the random noise data is the same as the input vector dimension of the first layer of the BPNN in the generator; or,
[0133] the absolute value of the difference between the vector dimension of the random noise data and the input vector dimension of the first layer of the BPNN in the generator is less than a set threshold, where the set threshold is a positive integer.
[0134] Optionally, in a possible implementation manner of this embodiment, the process parameters of the tobacco dryer include some or all of the following: the opening degree of the ventilation valve, the temperature of the drum wall, the moisture content of the dry leaves, the hot air temperature, the opening degree of the steam valve on the drum wall, the opening degree of the steam valve of the circulating air, and the moisture content of the cooling leaves.
[0135] In this embodiment, through the technical solution of the present application, an initial model to be trained and model parameters required for training can be determined; random noise data and real tobacco samples are obtained, and the random noise data is input into the BPNN network where the generator of the initial model is located in the form of a noise vector to generate a tobacco synthetic sample having a set similarity with the real tobacco sample; the tobacco synthetic sample and the real tobacco sample are mixed in equal proportion to obtain a tobacco training set, and the tobacco training set is input into the BPNN network where the discriminator of the initial model is located for discrimination evaluation, and a probability value is output; if the probability value does not fall into the set probability threshold interval, the initial model is repeatedly trained based on the loss function of the generator and the loss function of the discriminator to adjust and optimize the relevant parameters of the initial model until the probability value output by the discriminator falls into the set probability threshold interval, and a converged tobacco sample generation model is obtained. Thus, by generating high-quality synthetic data, the training sample space is expanded, and the applicability of the model is improved; and by repeatedly training with the optimized loss function, a converged sample generation model is obtained, and the accuracy and reliability of generating tobacco samples are improved.
[0136] Figure 6 shows a structural block diagram of a tobacco sample generation device provided by an embodiment of the present application, as Figure 6As shown in the figure. The cut tobacco sample generation device 600 of this embodiment may include a determination module 601 and a generation module 602. Among them, the determination module 601 is used to determine random noise data, where the dimension of the noise vector in the random noise data matches the dimension of the vector input to the first layer of the BPNN in the generator of the cut tobacco sample generation model; the generation module 602 is used to input the random noise data into the cut tobacco sample generation model, and the generator predicts and generates a cut tobacco sample representing the process parameters of the cut tobacco dryer; the cut tobacco sample is evaluated by the discriminator to output the effective probability indicating that the cut tobacco sample is a real sample; among them, the cut tobacco sample generation model is based on Figure 1 The training method shown in the figure is trained and obtained.
[0137] An embodiment of the present application provides a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement the training method or the cut tobacco sample generation method of the cut tobacco sample generation model as described above.
[0138] An embodiment of the present application provides an electronic device, which includes a processor and a memory, and at least one instruction is stored in the memory, and the instruction is loaded and executed by the processor to implement the training method or the cut tobacco sample generation method of the cut tobacco sample generation model as described above.
[0139] In the technical solution of the present application, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information and other processing all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0140] Figure 7 FIG. shows a schematic block diagram of an exemplary electronic device 700 that can be used to implement the embodiments of the present application. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or claimed herein.
[0141] As Figure 7As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to computer programs stored in a read-only memory (ROM) 702 or computer programs loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0142] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, an optical disc, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0143] The computing unit 701 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 701 executes the various methods and processes described above, such as the training method or the tobacco cut filler sample generation method of the tobacco cut filler sample generation model. For example, in some embodiments, the training method or the tobacco cut filler sample generation method of the tobacco cut filler sample generation model can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the training method or the tobacco cut filler sample generation method of the tobacco cut filler sample generation model described above can be executed. Alternatively, in other embodiments, the computing unit 701 can be configured to execute the training method or the tobacco cut filler sample generation method of the tobacco cut filler sample generation model in any other appropriate manner (e.g., by means of firmware).
[0144] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems-on-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which may be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.
[0145] The program code for implementing the methods of this application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing device, such that the program codes, when executed by the processor or controller, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine, or entirely on the remote machine or server.
[0146] In the context of this application, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0147] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0148] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.
[0149] A computer system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The relationship between the client and the server is generated by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, or a server of a distributed system, or a server incorporating a blockchain.
[0150] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the disclosure of this application can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution disclosed in this application can be achieved, and no limitation is imposed herein.
[0151] The above specific implementation manners do not constitute a limitation on the protection scope of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application shall be included within the protection scope of this application.
Claims
1. A training method for a cut tobacco sample generation model, characterized in that, Including: Determine the initialization model to be trained and the model parameters required for training; wherein, the initialization model is a generative adversarial network including a generator and a discriminator, and both the generator and the discriminator are three-layer fully-connected backpropagation neural networks (BPNNs); Obtain random noise data and real tobacco samples, and input the random noise data in the form of a noise vector into the BPNN network where the generator of the initialization model is located to generate a synthetic tobacco sample with a set similarity to the real tobacco sample; the real tobacco sample is a partial real sample used to characterize the process parameters of a tobacco dryer; Mix the synthetic tobacco sample and the real tobacco sample in equal proportion to obtain a tobacco training set, and input it into the BPNN network where the discriminator of the initialization model is located for discrimination evaluation, and output a probability value; the probability value is used to reflect the confidence of the discriminator in the authenticity of the synthetic tobacco sample; If the probability value does not fall within the set probability threshold interval, repeatedly train the initialization model based on the loss function of the generator and the loss function of the discriminator to adjust and optimize the relevant parameters of the initialization model until the probability value output by the discriminator falls within the set probability threshold interval, and obtain a converged tobacco sample generation model.
2. The method according to claim 1, wherein The loss function of the generator is optimized through the following formula: Among them, m represents the number of tobacco cut filler synthesis samples, and P(S(c i )) represents the probability that the discriminator classifies the i-th tobacco cut filler synthesis sample as true; The loss function of the discriminator is optimized through the following formula: Among them, the P(x i ) represents the probability that the discriminator classifies the i-th true cut tobacco sample as true.
3. The method according to claim 1, wherein The vector dimension of the random noise data is the same as the dimension of the input vector of the first layer of the BPNN in the generator; or, The absolute value of the difference between the vector dimension of the random noise data and the dimension of the input vector of the first layer of the BPNN in the generator is less than a set threshold, where the set threshold is a positive integer.
4. The method according to any one of claims 1 to 3, characterized in that, The process parameters of the tobacco dryer include some or all of the following: ventilation valve opening, drum wall temperature, dry leaf moisture content, hot air temperature, drum wall steam valve opening, circulating air steam valve opening, and cooling leaf moisture content.
5. A method for generating a tobacco sample, characterized in that, Including: Determine random noise data, where the dimension of the noise vector in the random noise data matches the dimension of the input vector of the first layer of the BPNN in the generator of the tobacco sample generation model; Input the random noise data into the tobacco sample generation model, and the generator predicts and generates a tobacco sample representing the process parameters of the tobacco dryer; this tobacco sample is evaluated by the discriminator and outputs an effective probability indicating that this tobacco sample is a real sample; Wherein, the tobacco sample generation model is trained by the training method according to any one of claims 1-4.
6. A training device for a shredded tobacco sample generation model, characterized in that, Including: A determination module for determining the initialization model to be trained and the model parameters required for training; wherein, the initialization model is a generative adversarial network including a generator and a discriminator, and both the generator and the discriminator are three-layer fully-connected backpropagation neural networks BPNN; A generation module, configured to obtain random noise data and real tobacco samples, and input the random noise data in the form of a noise vector into the BPNN network where the generator of the initialization model is located, to generate tobacco synthetic samples having a set similarity with the real tobacco samples; the real tobacco samples are partial real samples used to characterize the process parameters of a tobacco dryer. A discrimination module, configured to mix the tobacco synthetic samples and the real tobacco samples in equal proportion to obtain a tobacco training set, and input the tobacco training set into the BPNN network where the discriminator of the initialization model is located for discrimination evaluation, and output a probability value; the probability value is used to reflect the confidence of the discriminator in the authenticity of the tobacco synthetic samples. A training module, if the probability value does not fall within a set probability threshold range, is configured to repeatedly train the initialization model based on the loss function of the generator and the loss function of the discriminator, to adjust and optimize the relevant parameters of the initialization model until the probability value output by the discriminator falls within the set probability threshold range, to obtain a converged tobacco sample generation model.
7. A cut tobacco sample generating device, characterized in that, Comprising: A determination module, configured to determine random noise data, wherein the dimension of the noise vector in the random noise data matches the dimension of the vector input to the first layer of the BPNN in the generator of the tobacco sample generation model. A generation module, configured to input the random noise data into the tobacco sample generation model, and the generator predicts and generates tobacco samples representing the process parameters of a tobacco dryer; the tobacco samples are evaluated by the discriminator and output an effective probability indicating that the tobacco samples are real samples. Wherein, the tobacco sample generation model is trained according to the training method described in any one of claims 1-4.
8. An electronic device, comprising: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method described in any one of claims 1-5.
9. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the method described in any one of claims 1-5.
10. A computer program product, comprising a computer program, where the computer program, when executed by a processor, implements the method described in any one of claims 1-5.