Tobacco leaf curing control method and device, electronic equipment and storage medium
By combining the features of tobacco leaf images and baking parameters, the system automatically predicts temperature and humidity setpoints, solving the problem of inaccurate temperature and humidity control in traditional tobacco leaf baking and improving baking quality and precision.
Patent Information
- Application Number
- CN202311460436.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-03
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2043-11-03
AI Technical Summary
In the traditional tobacco curing process, the experience and technical level of curing engineers vary, resulting in low accuracy in temperature and humidity control, which can easily lead to premature or delayed operation and affect the quality of tobacco curing.
By acquiring image features and baking parameter features based on tobacco leaf images and baking parameters of the target tobacco leaves, analyzing their correlation and importance, performing feature fusion, predicting temperature and humidity setpoints, and achieving automatic control.
It improves the accuracy of temperature and humidity control in tobacco curing, ensures curing quality, and reduces the workload and errors caused by manual intervention.
Smart Images

Figure CN117582016B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer vision, and particularly relates to a tobacco leaf baking control method and device, electronic equipment and a storage medium. BACKGROUND
[0002] Tobacco leaf baking is an important link in the tobacco production process, and its purpose is to promote the yellowing and drying of tobacco leaves. The quality of baking directly determines the value of cigarettes. The temperature change and humidity change of tobacco leaves during the baking process are very important to the baking quality of tobacco leaves. Therefore, it is necessary to control the temperature and humidity of the baking room in real time during the baking process of tobacco leaves to ensure the baking quality of tobacco leaves.
[0003] In the baking process, the traditional control of the temperature and humidity of tobacco leaf baking requires a baking engineer to observe the morphological characteristics of tobacco leaves through an observation window at regular intervals, judge the state of the tobacco leaves, and adjust the temperature and humidity index in the baking room according to the state of the tobacco leaves. However, due to the uneven experience and technical level of the baking engineer, the accuracy of judging the state of the tobacco leaves according to the morphological characteristics of the tobacco leaves is affected, and then the accuracy of the baking temperature and humidity control operation is affected, which may cause the baking temperature and humidity control operation to be ahead of or lag behind, thereby causing baking operation errors and affecting the baking quality of tobacco leaves. SUMMARY
[0004] Based on the above needs, the present application provides a tobacco leaf baking control method and device, electronic equipment and a storage medium, which can realize automatic control of the temperature and humidity of tobacco leaf baking and improve the accuracy of the temperature and humidity control of tobacco leaf baking.
[0005] To achieve the above object, the present application provides the following technical scheme:
[0006] According to a first aspect of the present application, a tobacco leaf baking control method is provided, comprising:
[0007] Based on the tobacco leaf image of the target tobacco leaf and at least two baking parameters, the image features and baking parameter features of the target tobacco leaf are obtained;
[0008] By analyzing the correlation between the image features and the baking parameter features and the importance of each baking parameter of the target tobacco leaf, the image features and the baking parameter features are fused to obtain the fusion features of the target tobacco leaf;
[0009] According to the fusion features of the target tobacco leaf, a temperature set value and / or a humidity set value are determined, and the temperature set value and / or the humidity set value are used to adjust the temperature and / or humidity during tobacco baking.
[0010] Optionally, based on the tobacco leaf image of the target tobacco leaf and the at least two curing parameters, an image feature and a curing parameter feature of the target tobacco leaf are obtained, including:
[0011] An image feature extraction is performed on the tobacco leaf image of the target tobacco leaf to obtain the image feature of the target tobacco leaf.
[0012] A text expansion is performed on each of the curing parameters of the target tobacco leaf to obtain a curing parameter text of the target tobacco leaf, and all the curing parameter texts are spliced to obtain a curing parameter text sequence of the target tobacco leaf; the text expansion is used to expand the curing parameter information into a text in a set expression mode.
[0013] A text feature extraction is performed on the curing parameter text sequence to obtain the curing parameter feature of the target tobacco leaf.
[0014] Optionally, the curing parameters of the target tobacco leaf include quality parameters of the target tobacco leaf and / or curing environment parameters of the target tobacco leaf.
[0015] The quality parameters of the target tobacco leaf include at least one of a tobacco leaf variety, a tobacco leaf growth site, and a tobacco leaf maturity, and the curing environment parameters of the target tobacco leaf include at least one of a curing temperature data, a curing humidity data, a fan speed, and a damper size.
[0016] Optionally, the process of obtaining the tobacco leaf maturity of the target tobacco leaf includes:
[0017] According to the initial image of the target tobacco leaf, the tobacco leaf maturity of the target tobacco leaf is determined; wherein the initial image of the target tobacco leaf is an image of the target tobacco leaf before curing.
[0018] Optionally, the image feature and the curing parameter feature are fused to obtain a fusion feature of the target tobacco leaf by analyzing the correlation between the image feature and the curing parameter feature and the importance of each of the curing parameters of the target tobacco leaf, including:
[0019] The feature elements in the image feature that are related to the curing parameter feature are enhanced by analyzing the correlation between the image feature and the curing parameter feature to obtain a first feature of the target tobacco leaf.
[0020] The features of each of the curing parameters in the curing parameter feature are weighted by analyzing the importance of each of the curing parameters of the target tobacco leaf to obtain a second feature of the target tobacco leaf.
[0021] The first feature and the second feature are fused to obtain the fusion feature of the target tobacco leaf.
[0022] Optionally, by analyzing the correlation between the image features and the baking parameter features, the feature elements in the image features related to the baking parameter features are enhanced to obtain the first features of the target tobacco leaves, including:
[0023] The image features and the baking parameter features are respectively mapped to the same dimension feature space to obtain mapped image features and mapped baking parameter features;
[0024] The dot product of the mapped image features and the mapped baking parameter features is normalized to obtain a correlation matrix between the image features and the baking parameter features;
[0025] The image features are weighted according to the correlation matrix to obtain the first features of the target tobacco leaves.
[0026] Optionally, by analyzing the importance of each baking parameter of the target tobacco leaves, the features of each baking parameter in the baking parameter features are weighted to obtain the second features of the target tobacco leaves, including:
[0027] Based on the self-attention mechanism, the attention weights of the features of each baking parameter in the baking parameter features are determined;
[0028] Based on the attention weights of the features of each baking parameter, the features of each baking parameter in the baking parameter features are weighted to obtain the second features of the target tobacco leaves.
[0029] Optionally, based on the tobacco leaf image of the target tobacco leaves and at least two baking parameters, the image features and the baking parameter features of the target tobacco leaves are obtained, by analyzing the correlation between the image features and the baking parameter features, and the importance of each baking parameter of the target tobacco leaves, the image features and the baking parameter features are fused to obtain the fusion features of the target tobacco leaves, and the temperature set value and / or the humidity set value are determined according to the fusion features of the target tobacco leaves, including:
[0030] The tobacco leaf image of the target tobacco leaves and the at least two baking parameters of the target tobacco leaves are input into a pre-trained tobacco baking temperature and humidity prediction model to obtain the temperature set value and / or the humidity set value;
[0031] The tobacco leaf baking temperature and humidity prediction model is configured to: based on a tobacco leaf image of a target tobacco leaf and at least two baking parameters, acquire image features and baking parameter features of the target tobacco leaf; by analyzing the correlation between the image features and the baking parameter features, and the importance of each baking parameter of the target tobacco leaf, perform feature fusion on the image features and the baking parameter features to obtain fusion features of the target tobacco leaf; and determine a temperature set value and / or a humidity set value according to the fusion features of the target tobacco leaf.
[0032] According to a second aspect of the embodiments of the present application, a tobacco leaf baking control device is provided, including:
[0033] a feature acquisition module configured to: based on a tobacco leaf image of a target tobacco leaf and at least two baking parameters, acquire image features and baking parameter features of the target tobacco leaf;
[0034] a feature fusion module configured to: by analyzing the correlation between the image features and the baking parameter features, and the importance of each baking parameter of the target tobacco leaf, perform feature fusion on the image features and the baking parameter features to obtain fusion features of the target tobacco leaf;
[0035] a temperature and humidity determination module configured to: determine a temperature set value and / or a humidity set value according to the fusion features of the target tobacco leaf, the temperature set value and / or the humidity set value being used to adjust the temperature and / or the humidity during tobacco baking.
[0036] According to a third aspect of the embodiments of the present application, an electronic device is provided, including a memory and a processor.
[0037] The memory is connected with the processor and is configured to store a program.
[0038] The processor is configured to realize the tobacco leaf baking control method by running the program in the memory.
[0039] According to a fourth aspect of the embodiments of the present application, a storage medium is provided, and the storage medium stores a computer program. When the computer program is executed by a processor, the tobacco leaf baking control method is realized.
[0040] The tobacco curing control method proposed in this application obtains image features and curing parameter features of the target tobacco leaf based on an image of the target tobacco leaf and at least two curing parameters. By analyzing the correlation between the image features and the curing parameter features, and the importance of each curing parameter of the target tobacco leaf, feature fusion is performed to obtain the fused features of the target tobacco leaf. Based on the fused features of the target tobacco leaf, temperature and / or humidity setpoints are determined. Using the technical solution of this application, temperature and humidity setpoints can be predicted directly based on the tobacco leaf image and curing parameters, realizing automatic temperature and humidity control of tobacco leaf curing. Furthermore, when predicting temperature and humidity setpoints, the method combines the tobacco leaf state reflected in the tobacco leaf image and the curing parameters related to the temperature and humidity of the target tobacco leaf. This multimodal data combination improves the accuracy of temperature and humidity setpoint prediction, thereby improving the temperature and humidity control precision of tobacco leaf curing. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0042] FIG. 1 A flowchart illustrating a method for controlling tobacco curing provided in an embodiment of this application;
[0043] FIG. 2 A schematic diagram of the image feature weighting enhancement process provided in the embodiments of this application;
[0044] FIG. 3 A schematic diagram of the process flow for weighted enhancement of baking parameter features provided in the embodiments of this application;
[0045] FIG. 4 This is a schematic diagram of the structure of the tobacco curing temperature and humidity prediction model provided in the embodiments of this application;
[0046] FIG. 5 This is a schematic diagram of the structure of a tobacco curing control device provided in an embodiment of this application;
[0047] FIG. 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0048] The technical scheme of the embodiment of the present application is applicable to the application scene of tobacco leaf baking, and is specifically used in the application scene of temperature and humidity control in the process of tobacco leaf baking. By adopting the technical scheme of the embodiment of the present application, the temperature and humidity of tobacco leaf baking can be automatically controlled, and the temperature and humidity setting value is predicted in combination with the tobacco leaf state reflected in the tobacco leaf image of the target tobacco leaf and the baking parameter related to the baking temperature and humidity of the target tobacco leaf, so that the temperature and humidity control precision of tobacco leaf baking is improved.
[0049] Tobacco leaf baking is an important link in the process of tobacco production, and the quality of baking directly determines the value of cigarettes. In the traditional tobacco leaf baking process, baking is generally divided into three stages of yellowing period, color fixing period and dry tendon period, and each stage is further divided into several small stages. The temperature change and humidity change of tobacco leaf in the baking process are very important for the baking quality of tobacco leaf. For different stages and different baking environments, different temperatures and humidities need to be set to bake tobacco leaf. Therefore, it is necessary to control the temperature and humidity of the baking room in real time during the baking process of tobacco leaf to ensure the baking quality of tobacco leaf.
[0050] At present, the control of baking temperature and humidity in the process of tobacco leaf baking is realized by a baking engineer who observes the form features of tobacco leaf from an observation window at regular time intervals, judges the state of tobacco leaf, and adjusts the temperature and humidity index in the baking room according to the state of tobacco leaf. This method not only brings a large workload to the baking engineer, but also makes the baking temperature and humidity adjustment operation ahead or lag due to the uneven experience and technical level of the baking engineer, or there is a certain error in the adjusted temperature and humidity index, thereby causing baking operation failure and affecting the baking quality of tobacco leaf.
[0051] Based on this, the present application proposes a tobacco leaf baking control method, which can realize automatic control of the baking temperature and humidity of tobacco leaf, and predict the temperature and humidity setting value in combination with the tobacco leaf state reflected in the tobacco leaf image of the target tobacco leaf and the baking parameter related to the baking temperature and humidity of the target tobacco leaf, thereby solving the problem of low accuracy of the baking temperature and humidity control operation in the prior art.
[0052] The technical scheme in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0053] Exemplary method
[0054] Referring to FIG. 1 The embodiment of the present application proposes a tobacco leaf baking control method. The method comprises:
[0055] S101, based on the tobacco image of the target tobacco leaf and the at least two baking parameters, obtaining the image feature and the baking parameter feature of the target tobacco leaf.
[0056] For the baking temperature and humidity of the tobacco leaf, the state of the tobacco leaf, the quality of the tobacco leaf and the current baking environment are all related, therefore, the tobacco image and the baking parameter of the target tobacco leaf need to be collected in the embodiment, the tobacco image of the target tobacco leaf can reflect the state of the tobacco leaf and the current baking stage of the tobacco leaf, wherein the tobacco image of the target tobacco leaf can be collected by an image collection device, such as an RGB camera, and the collected tobacco image is preferably an RGB image.
[0057] In the embodiment, the baking parameter of the target tobacco leaf is at least two, and the baking parameter of the target tobacco leaf includes the quality parameter of the target tobacco leaf and / or the baking environment parameter of the target tobacco leaf. The quality parameter of the target tobacco leaf includes at least one of tobacco variety, tobacco growth position and tobacco maturity. Different tobacco varieties, different tobacco growth positions or different tobacco maturities also show certain differences in the change speed of the tobacco state during the baking process, and the control of the temperature and humidity during the baking process also has certain differences. Therefore, the tobacco variety, the tobacco growth position and the tobacco maturity have certain influences on the control of the temperature and humidity during the baking process of the tobacco leaf. The tobacco variety and the tobacco growth position are information input by the staff who bake the tobacco leaf in advance, and the tobacco maturity can also be input by the staff in advance. The initial image of the target tobacco leaf can also be used to determine the tobacco maturity of the target tobacco leaf, and the specific steps are as follows:
[0058] First, the image of the target tobacco leaf before baking is collected as the initial image of the target tobacco leaf; then, the initial image of the target tobacco leaf is input into a pre-trained tobacco maturity recognition model, the tobacco maturity recognition model extracts the image features of the initial image of the target tobacco leaf, and classifies the extracted initial image features of the target tobacco leaf to predict the tobacco maturity of the target tobacco leaf.
[0059] The tobacco maturity recognition model is obtained by recognizing the maturity of tobacco through pre-collected tobacco samples. The tobacco sample includes an initial image of the sample tobacco and a true maturity label of the sample tobacco. The initial image of the sample tobacco is an image of the sample tobacco before being baked. The initial image of the sample tobacco is input into the tobacco maturity recognition model. The tobacco maturity recognition model recognizes the initial image of the sample tobacco, determines the image features of the sample tobacco, classifies the image features, determines the predicted maturity of the sample tobacco, and finally calculates the loss function based on the predicted maturity of the sample tobacco and the true maturity label of the sample tobacco. The model parameters of the tobacco maturity recognition model are adjusted according to the loss function, and the training is iterated until the loss function reaches the preset loss function standard range.
[0060] In addition, the tobacco variety and the growth position of the target tobacco can also be identified by pre-training corresponding recognition models, so that the staff does not need to manually input information, thereby improving the convenience of tobacco baking control. The training process of the recognition model corresponding to the tobacco variety and the growth position of the tobacco is the same as that of the tobacco maturity recognition model, and will not be described in detail in this embodiment.
[0061] The baking environment parameters of the target tobacco include at least one of baking temperature data, baking humidity data, fan speed, and damper size. The baking temperature data represents the current baking temperature of the target tobacco, which can be collected by a temperature sensor or determined by a dry bulb in the baking house. The baking humidity data represents the current baking humidity of the target tobacco, which can be collected by a temperature sensor or determined by a wet bulb in the baking house. The fan speed represents the gear size of the fan in the baking house, and the damper size represents the angle value of the damper in the baking house.
[0062] After obtaining the tobacco image and baking parameters of the target tobacco, the image features and baking parameter features of the target tobacco are obtained based on the tobacco image and baking parameters of the target tobacco. The specific steps are as follows:
[0063] First, the image features of the target tobacco image are extracted to obtain the image features of the target tobacco.
[0064] In this embodiment, the image features of the target tobacco image are extracted by an image feature extraction algorithm to obtain the image features of the target tobacco. The image features can be extracted by an image feature extraction network, such as a convolution layer in a Resnet network. The image features of the target tobacco can reflect the state of the target tobacco and the baking stage.
[0065] Secondly, each curing parameter of the target tobacco leaf is textually expanded to obtain a curing parameter text of the target tobacco leaf, and all the curing parameter texts are spliced to obtain a curing parameter text sequence of the target tobacco leaf.
[0066] In this embodiment, the collected curing parameters can be directly used as texts for text feature extraction, and the obtained text features can be used as the curing parameter features. In order to extract more information, each curing parameter of the target tobacco leaf needs to be textually expanded to expand the curing parameter information into a text in a set expression manner to obtain a curing parameter text of the target tobacco leaf. For example, if the tobacco variety of the collected target tobacco leaf is "Zhongyan 100", the curing parameter text obtained after textually expanding the tobacco variety parameter is "tobacco variety is Zhongyan 100", if the tobacco growth position of the collected target tobacco leaf is "upper tobacco", the curing parameter text obtained after textually expanding the tobacco growth position parameter is "tobacco growth position is upper tobacco", if the maturity of the collected target tobacco leaf is "still mature", the curing parameter text obtained after textually expanding the tobacco maturity parameter is "tobacco maturity is still mature", if the curing temperature data of the target tobacco leaf is collected by using the dry bulb of the curing barn, the curing temperature data of the collected target tobacco leaf is "38 degrees", the curing parameter text obtained after textually expanding the tobacco curing temperature data parameter is "curing barn dry bulb temperature is 38 degrees", if the curing humidity data of the target tobacco leaf is collected by using the wet bulb of the curing barn, the curing humidity data of the collected target tobacco leaf is "36 degrees", the curing parameter text obtained after textually expanding the tobacco curing humidity data parameter is "curing barn wet bulb temperature is 36 degrees", if the fan speed data of the collected target tobacco leaf of the curing barn is "high speed", the curing parameter text obtained after textually expanding the curing barn fan speed data parameter is "curing barn fan speed is high speed", and if the size data of the collected target tobacco leaf of the curing barn air door is "30 degrees", the curing parameter text obtained after textually expanding the curing barn air door size data parameter is "curing barn air door angle is 30 degrees". The text expansion in this embodiment can use the prompt operation.
[0067] In this embodiment, all the curing parameters are textually expanded, and all the curing parameter texts are spliced together to obtain a curing parameter text sequence. For example, the curing parameter texts of the above-mentioned curing parameters are spliced together to obtain a curing parameter text sequence "tobacco variety is Zhongyan 100, tobacco growth position is upper tobacco, tobacco maturity is still mature, curing barn dry bulb temperature is 38 degrees, curing barn wet bulb temperature is 36 degrees, curing barn fan speed is high speed, and curing barn air door angle is 30 degrees".
[0068] Thirdly, text features are extracted from the curing parameter text sequence to obtain the curing parameter features of the target tobacco leaf.
[0069] This embodiment utilizes a text feature extraction algorithm to extract text features from the text sequence of baking parameters, obtaining the text sequence features as the baking parameter features of the target tobacco leaf. Specifically, this embodiment can employ a BERT network for text feature extraction. For example, the text sequence of baking parameters is X = [x1, ..., x...]. i ], x i ∈R e x i This represents the text sequence and positional embedding of the baking parameters, where e represents the feature dimension. The baking parameter features of the target tobacco leaf are H = [h1, ..., h...]. i ],H∈R L×e Where L represents the number of baking parameter texts contained in the baking parameter text sequence, and the text feature of each baking parameter text is represented by h. i =Bert(x) i ).
[0070] S102. By analyzing the correlation between image features and baking parameter features, as well as the importance of each baking parameter of the target tobacco leaf, feature fusion is performed on the image features and baking parameter features to obtain the fused features of the target tobacco leaf.
[0071] In this embodiment, the tobacco leaf state and baking stage, as well as the quality and current baking environment of the target tobacco leaf, are all related to the temperature and humidity adjustment during the baking process. The image features of the target tobacco leaf reflect its state and baking stage, while the baking parameters reflect its quality and / or current baking environment. Therefore, when adjusting the temperature and humidity during the baking process, it is necessary to fuse the image features and baking parameter features of the target tobacco leaf, and predict the temperature and humidity settings based on the fused features. When fusing the image features and baking parameter features, different baking parameters have different effects on temperature and humidity. Different feature elements in the image features also exhibit varying degrees of fusion with the baking parameter features. Therefore, this embodiment needs to analyze the correlation between the image features and the baking parameter features, as well as the importance of each baking parameter of the target tobacco leaf, before fusing the image features and baking parameter features to obtain the fused features of the target tobacco leaf. The specific steps are as follows:
[0072] First, by analyzing the correlation between image features and baking parameter features, the feature elements in the image features that are related to the baking parameter features are enhanced to obtain the first feature of the target tobacco leaf.
[0073] Different baking parameters have different degrees of correlation with the image features of the target tobacco leaves. Therefore, in this embodiment, the feature elements in the image features of the target tobacco leaves that have a correlation with the baking parameter features are enhanced according to the degrees of correlation, so that the image features of the target tobacco leaves and the baking parameter features have a greater degree of correlation when fused.
[0074] In this embodiment, the correlation between the image features and the baking parameter features is analyzed, and the degrees of correlation between the image features and the baking parameter features are used as weights of the image features to perform a weighting operation on each feature element in the image features, so that the feature elements with a strong correlation with the baking parameter features are enhanced, and the feature elements with a weak correlation are weakened, thereby obtaining the first features of the target tobacco leaves.
[0075] Secondly, the importance of each baking parameter of the target tobacco leaves is analyzed, and a weighting operation is performed on the features of each baking parameter in the baking parameter features to obtain the second features of the target tobacco leaves.
[0076] In this embodiment, different baking parameters of the target tobacco leaves have different degrees of contribution to the adjustment of the temperature and humidity of the baking room. The higher the contribution of the baking parameter, the higher the importance of the baking parameter. For example, the current baking temperature data and baking humidity data of the baking room are more important for the adjustment of the temperature and humidity thereafter, while the growth position of the tobacco leaves is relatively less important. Therefore, in this embodiment, the importance of each baking parameter of the target tobacco leaves is analyzed, and the importance of each baking parameter is used as the weight of each baking parameter to perform a weighting operation on the features of each baking parameter in the baking parameter features, thereby obtaining the second features of the target tobacco leaves.
[0077] Thirdly, the first features and the second features are fused to obtain the fusion features of the target tobacco leaves.
[0078] In this embodiment, the first features and the second features are fused to obtain the fusion features of the target tobacco leaves, thereby realizing the fusion of multi-modal features and improving the accuracy of the prediction of the temperature and humidity of the target tobacco leaves. Specifically, the first features and the second features are fused by multiplying the inner product, i.e., the dot product between the first features and the second features is used as the fusion features of the first features and the second features.
[0079] S103, determining the temperature set value and / or the humidity set value according to the fusion features of the target tobacco leaves.
[0080] After determining the fusion feature of the target tobacco leaf in this embodiment, the fusion feature of the target tobacco leaf is analyzed to predict the temperature setting value and / or the humidity setting value that need to be adjusted under the current condition. The temperature and humidity prediction model can be pre-trained, and the trained temperature and humidity prediction model is used to predict the temperature setting value and / or the humidity setting value according to the fusion feature of the target tobacco leaf.
[0081] For training of the temperature and humidity prediction model, first, training samples need to be collected, the training samples including sample tobacco leaf images and sample baking parameters of sample tobacco leaves, and each set of training samples is labeled with a corresponding temperature label and / or humidity label. Image features of the sample tobacco leaf images in each set of training samples are extracted to obtain sample tobacco leaf image features, and features of the sample baking parameters in each set of training samples are extracted to obtain sample baking parameter features. The extraction methods of the sample tobacco leaf image features and the sample baking parameter features are the same as the extraction methods of the image features and the baking parameter features of the target tobacco leaf described above, and this embodiment will not be specifically described. Then, the sample tobacco leaf image features and the sample baking features corresponding to each set of training samples are fused to obtain sample fusion features. The fusion method of the sample tobacco leaf image features and the sample baking features is the same as the fusion method of the image features and the baking parameter features of the target tobacco leaf, and this embodiment will not be specifically described. Finally, the sample fusion features are input into the temperature and humidity prediction model, the temperature and humidity prediction model predicts a predicted temperature setting value and / or a predicted humidity setting value, and based on the predicted temperature setting value and / or the predicted humidity setting value and the corresponding temperature label and / or humidity label, a loss function is calculated, and the model parameters of the temperature and humidity prediction model are adjusted according to the loss function.
[0082] After predicting the temperature setting value and / or the humidity setting value in this embodiment, the temperature setting value and / or the humidity setting value are sent to the controller of the curing house. The controller controls the temperature of the curing house so that the dry-bulb temperature of the curing house reaches the temperature setting value (or so that the temperature sensor of the curing house reaches the temperature setting value), and / or the controller controls the humidity of the curing house so that the wet-bulb temperature of the curing house reaches the humidity setting value. At this time, the humidity setting value is the wet-bulb temperature (or the humidity sensor of the curing house reaches the humidity setting value, and at this time, the humidity setting value is humidity data).
[0083] It can be seen from the above introduction that the tobacco curing control method proposed in the embodiments of the present application obtains image features and curing parameter features of the target tobacco leaf based on a tobacco leaf image of the target tobacco leaf and at least two curing parameters; the image features and the curing parameter features are fused by analyzing the correlation between the image features and the curing parameter features and the importance of each curing parameter of the target tobacco leaf, to obtain fusion features of the target tobacco leaf; and the temperature set value and / or the humidity set value are determined according to the fusion features of the target tobacco leaf. By adopting the technical solution of the embodiments, the temperature and humidity set values can be directly predicted according to the tobacco leaf image and the curing parameters of the target tobacco leaf, the temperature and humidity of the tobacco leaf curing are automatically controlled, and when the temperature and humidity set values are predicted, the accuracy of the temperature and humidity set value prediction is improved by combining the tobacco leaf state reflected in the tobacco leaf image of the target tobacco leaf and the curing parameters related to the curing temperature and humidity of the target tobacco leaf, and the multi-modal data combination, so as to improve the temperature and humidity control precision of the tobacco leaf curing.
[0084] As an optional implementation, referring to FIG. 8, the first feature of the target tobacco leaf is obtained by analyzing the correlation between the image features and the curing parameter features and enhancing the feature elements related to the curing parameter features in the image features, and specifically includes: FIG. 2
[0085] S201, map the image features and the curing parameter features to the same dimension feature space respectively to obtain mapped image features and mapped curing parameter features.
[0086] In the embodiments, a low-dimensional feature space is set in advance, and the image features and the curing parameter features are mapped to the low-dimensional feature space, so that the dimension reduction operation of the image features and the curing parameter features is realized, the mapped image features and the mapped curing parameter features are obtained, and the feature dimensions of the mapped image features and the mapped curing parameter features are the same. Specifically, the feature mapping formula is as follows:
[0087] g j =relu(W g a j +b g )
[0088] k i =relu(W k h i +b k )
[0089] Wherein, a j represents the image features of the target tobacco leaf, g j represents the mapped image features of the target tobacco leaf, W g represents the weight of the image feature mapping, b g represents the bias of the image feature mapping, h i indicates a baking parameter feature of the target tobacco leaf, k i indicates a mapped baking parameter feature of the target tobacco leaf, W k indicates a weight of the baking parameter feature mapping, b k indicates a bias quantity of the baking parameter feature mapping.
[0090] S202, normalize the dot product of the mapped image feature and the mapped baking parameter feature to obtain a correlation matrix between the image feature and the baking parameter feature.
[0091] The embodiment determines the correlation between the image feature and the baking parameter feature by performing the dot product operation between the mapped image feature and the mapped baking parameter feature, and then normalizes the dot product of the mapped image feature and the mapped baking parameter feature to convert the correlation between the image feature and the baking parameter feature into a correlation matrix between the image feature and the baking parameter feature. The correlation matrix indicates the correlation between the image feature and the baking parameter feature. Specifically, the normalization operation formula is as follows:
[0092] β j,i = softmax(g j k i T )
[0093] wherein β j,i indicates the correlation matrix between the image feature and the baking parameter feature, g j k i T indicates the dot product of the mapped image feature and the mapped baking parameter feature, and softmax indicates the normalization operation function.
[0094] S203, weight the image feature according to the correlation matrix to obtain a first feature of the target tobacco leaf.
[0095] The embodiment takes the correlation matrix between the image feature and the baking parameter feature as a weight to weight the image feature, so that the feature elements in the image feature can be enhanced or weakened according to the correlation between the image feature and the baking parameter feature, and a first feature of the target tobacco leaf is obtained. Specifically, the formula for weighting the image feature according to the correlation matrix is as follows:
[0096] r j = β j,i a j
[0097] wherein r j indicates the first feature of the target tobacco leaf, β j,i indicates the correlation matrix between the image feature and the baking parameter feature, and a jAn image feature representing the target tobacco leaf.
[0098] As an optional implementation, referring to FIG. 3 As shown, by analyzing the importance of each curing parameter of the target tobacco leaf, the feature of each curing parameter in the curing parameter feature is weighted to obtain a second feature of the target tobacco leaf, specifically including:
[0099] S301, based on the self-attention mechanism, determining the attention weight of the feature of each curing parameter in the curing parameter feature.
[0100] The present embodiment can learn the contribution of the feature of each curing parameter in the curing parameter feature to the curing parameter feature by using the self-attention mechanism, thereby capturing the importance of the feature of each curing parameter and taking the importance of the feature of each curing parameter as the attention weight of the feature of each curing parameter. Among them, the present embodiment sets several layers of nonlinear activation layers to realize the learning of the self-attention mechanism, inputs the curing parameter feature into the nonlinear activation layers, each layer of nonlinear activation layers can learn the importance of the feature of each curing parameter, and finally, the feature output by the last layer of nonlinear activation layers is taken as the importance of the feature of each curing parameter learned finally. The present embodiment converts the importance of the feature of each curing parameter into an attention weight matrix by normalization operation, that is, the attention weight matrix represents the importance of the feature of each curing parameter. Specifically, the formula for determining the attention weight is as follows:
[0101] z m,i =tanh(W m h i +b m )
[0102] α i =softmax(z m0,i )
[0103] Wherein, z m,i represents the importance of the feature of each curing parameter output by the mth layer of nonlinear activation layer, h i represents the curing parameter feature of the target tobacco leaf, W m represents the weight of the mth layer of nonlinear activation layer, b m represents the bias of the mth layer of nonlinear activation layer, z m0,i represents the importance of the feature of each curing parameter output by the last layer of nonlinear activation layer, α i represents the attention weight matrix corresponding to the curing parameter feature, and softmax represents the normalization operation function.
[0104] S302, based on the attention weight of each roasting parameter feature, performing a weighting operation on each roasting parameter feature in the roasting parameter feature to obtain a second feature of the target tobacco leaf.
[0105] The embodiment utilizes the attention weight of each roasting parameter feature in the attention weight matrix to perform a weighting operation on each roasting parameter feature in the roasting parameter feature, thereby obtaining the second feature of the target tobacco leaf, so that the roasting parameter feature with a higher importance degree in the roasting parameter feature is enhanced. Specifically, the formula for performing a weighting operation on the roasting parameter feature is as follows:
[0106] t i =α i h i
[0107] wherein t i represents the second feature of the target tobacco leaf, a i represents the attention weight matrix corresponding to the roasting parameter feature, h i represents the roasting parameter feature of the target tobacco leaf.
[0108] As an optional implementation, in another embodiment of the present application, in order to improve the convenience of predicting the temperature setting value and / or the humidity setting value of roasting, the present embodiment can pre-train an end-to-end tobacco leaf roasting temperature and humidity prediction model. The tobacco leaf image of the target tobacco leaf and at least two roasting parameters are input into the pre-trained tobacco leaf roasting temperature and humidity prediction model, which first obtains the image feature and the roasting parameter feature of the target tobacco leaf based on the tobacco leaf image of the target tobacco leaf and the at least two roasting parameters, then performs feature fusion on the image feature and the roasting parameter feature by analyzing the correlation between the image feature and the roasting parameter feature, and the importance degree of each roasting parameter of the target tobacco leaf, to obtain the fusion feature of the target tobacco leaf, and finally determines the temperature setting value and / or the humidity setting value according to the fusion feature of the target tobacco leaf.
[0109] The training process of the end-to-end tobacco leaf roasting temperature and humidity prediction model includes:
[0110] First, the sample tobacco leaf image and at least two sample roasting parameters of the sample tobacco leaf are collected, and the sample tobacco leaf image and the sample roasting parameters are input into the tobacco leaf roasting temperature and humidity prediction model, or the sample roasting parameter text sequence corresponding to the sample tobacco leaf image and the sample roasting parameters is input into the tobacco leaf roasting temperature and humidity prediction model, wherein the sample roasting parameter text sequence corresponding to the sample roasting parameters is a text sequence obtained by text expansion of the sample roasting parameters, and the specific execution manner is the same as the manner of obtaining the roasting parameter text sequence of the target tobacco leaf, which will not be described in detail.
[0111] Then, based on the predicted temperature setpoint and / or predicted humidity setpoint output by the tobacco curing temperature and humidity prediction model, and the actual temperature data and / or actual humidity data corresponding to the sample tobacco leaves, a loss function is calculated. Based on the loss function, the model parameters of the tobacco curing temperature and humidity prediction model are adjusted. Through iterative training, the loss function is trained until it reaches the preset loss function range.
[0112] Through the above training method, an end-to-end tobacco curing temperature and humidity prediction model can be obtained. This model can directly predict the temperature setpoint and / or humidity setpoint based on the tobacco leaf image of the target tobacco leaf and at least two curing parameters, thus improving the convenience of predicting the temperature and humidity of tobacco curing.
[0113] As an optional implementation, see [link to implementation details]. FIG. 4 As shown in another embodiment of this application, an end-to-end tobacco curing temperature and humidity prediction model is disclosed, comprising: a feature extraction network A, a feature extraction network B, a visual attention module, a self-attention module, and a fully connected layer. The tobacco leaf image of the target tobacco leaf is processed by the feature extraction network A to extract image features, resulting in image features of the target tobacco leaf. The curing parameters of the target tobacco leaf are extended through textualization to obtain a text sequence of curing parameters, which is then processed by the feature extraction network B to extract textual features, resulting in curing parameter features of the target tobacco leaf. The visual attention module maps the image features and curing parameter features to a feature space of the same dimension, obtaining mapped image features and mapped curing parameter features. The dot product of the mapped image features and mapped curing parameter features is normalized to obtain a correlation matrix between the image features and the curing parameter features. The image features are weighted according to the correlation matrix to obtain the first feature of the target tobacco leaf. The self-attention module determines the attention weight of each curing parameter feature in the curing parameter features based on a self-attention mechanism. Based on the attention weight of each curing parameter feature, the features of each curing parameter in the curing parameter features are weighted to obtain the second feature of the target tobacco leaf. The dot product of the first and second features of the target tobacco leaf is used as the fused feature of the target tobacco leaf and input into the fully connected layer. The fully connected layer determines the temperature and / or humidity setpoints based on the fused features of the target tobacco leaf. The fully connected layer in the tobacco leaf curing temperature and humidity prediction model is configured with multiple layers, and the terminal fully connected layer can have two neurons: one for outputting the temperature setpoint and the other for outputting the humidity setpoint. In this embodiment, feature extraction network A preferably uses a ResNet network, discarding the network after the fully connected layer at the end. In this embodiment, feature extraction network B preferably uses a BERT network.
[0114] Exemplary apparatus
[0115] Correspondingly, the application also provides a tobacco leaf baking control device, which is shown in FIG. 5 The device comprises a feature acquisition module 100, a feature fusion module 110, and a temperature and humidity determination module 120.
[0116] The feature acquisition module 100 is configured to acquire image features and baking parameter features of the target tobacco leaf based on the tobacco leaf image of the target tobacco leaf and the at least two baking parameters.
[0117] The feature fusion module 110 is configured to perform feature fusion on the image features and the baking parameter features by analyzing the correlation between the image features and the baking parameter features and the importance of each baking parameter of the target tobacco leaf, to obtain fusion features of the target tobacco leaf.
[0118] The temperature and humidity determination module 120 is configured to determine a temperature set value and / or a humidity set value according to the fusion features of the target tobacco leaf, the temperature set value and / or the humidity set value being used to adjust the temperature and / or the humidity during tobacco baking.
[0119] As can be seen from the above description, the tobacco leaf baking control device provided by the application can directly predict the temperature and humidity set values according to the tobacco leaf image and the baking parameters of the target tobacco leaf, thereby achieving automatic control of the temperature and humidity during tobacco baking. In addition, when predicting the temperature and humidity set values, the tobacco leaf state reflected in the tobacco leaf image of the target tobacco leaf and the baking parameters related to the baking temperature and humidity of the target tobacco leaf are combined, and multi-modal data is combined, which can improve the accuracy of the prediction of the temperature and humidity set values, thereby improving the control precision of the temperature and humidity during tobacco baking.
[0120] As an optional implementation manner, in another embodiment of the application, the feature acquisition module 100 comprises an image feature extraction unit, a text expansion unit, and a text feature extraction unit.
[0121] The image feature extraction unit is configured to perform image feature extraction on the tobacco leaf image of the target tobacco leaf to obtain the image features of the target tobacco leaf.
[0122] The text expansion unit is configured to perform text expansion on each baking parameter of the target tobacco leaf to obtain baking parameter texts of the target tobacco leaf, and splice all the baking parameter texts to obtain a baking parameter text sequence of the target tobacco leaf. The text expansion is used to expand the baking parameter information into texts in a set expression manner.
[0123] The text feature extraction unit is configured to perform text feature extraction on the baking parameter text sequence to obtain the baking parameter features of the target tobacco leaf.
[0124] As an optional implementation, in another embodiment of the present application, it is disclosed that the curing parameters of the target tobacco leaves include quality parameters of the target tobacco leaves and / or curing environment parameters of the target tobacco leaves.
[0125] The quality parameters of the target tobacco leaves include at least one of a tobacco leaf variety, a tobacco leaf growth position and a tobacco leaf maturity, and the curing environment parameters of the target tobacco leaves include at least one of a curing temperature data, a curing humidity data, a fan rotating speed and a damper size.
[0126] As an optional implementation, in another embodiment of the present application, it is disclosed that the process of obtaining the tobacco leaf maturity of the target tobacco leaves includes:
[0127] According to the initial image of the target tobacco leaves, the tobacco leaf maturity of the target tobacco leaves is determined; wherein the initial image of the target tobacco leaves is an image of the target tobacco leaves before curing.
[0128] As an optional implementation, in another embodiment of the present application, it is disclosed that the feature fusion module 110 includes a first feature obtaining unit, a second feature obtaining unit and a fusion unit.
[0129] The first feature obtaining unit is configured to enhance feature elements related to the curing parameter features in the image features by analyzing the correlation between the image features and the curing parameter features, to obtain the first features of the target tobacco leaves.
[0130] The second feature obtaining unit is configured to perform a weighting operation on features of each of the curing parameters in the curing parameter features by analyzing the importance of each of the curing parameters of the target tobacco leaves, to obtain the second features of the target tobacco leaves.
[0131] The fusion unit is configured to perform feature fusion on the first features and the second features, to obtain the fusion features of the target tobacco leaves.
[0132] As an optional implementation, in another embodiment of the present application, it is disclosed that the first feature obtaining unit is specifically configured to:
[0133] map the image features and the curing parameter features to the same dimension feature space respectively, to obtain mapped image features and mapped curing parameter features;
[0134] perform a normalization operation on the dot product of the mapped image features and the mapped curing parameter features, to obtain a correlation matrix between the image features and the curing parameter features;
[0135] perform a weighting operation on the image features according to the correlation matrix, to obtain the first features of the target tobacco leaves.
[0136] As an optional implementation, in another embodiment of the present application, it is disclosed that the second feature obtaining unit is specifically configured to:
[0137] determine an attention weight of each feature of the roasting parameter in the roasting parameter feature based on the self-attention mechanism;
[0138] perform a weighting operation on the features of each roasting parameter in the roasting parameter feature based on the attention weight of each feature of the roasting parameter, to obtain a second feature of the target tobacco leaf.
[0139] As an optional implementation, in another embodiment of the present application, the tobacco leaf roasting control device of the embodiment comprises a model prediction module.
[0140] The model prediction module is configured to input a tobacco leaf image of a target tobacco leaf and at least two roasting parameters of the target tobacco leaf into a pre-trained tobacco leaf roasting temperature and humidity prediction model to obtain a temperature setting value and / or a humidity setting value.
[0141] The tobacco leaf roasting temperature and humidity prediction model is configured to obtain an image feature and a roasting parameter feature of the target tobacco leaf based on the tobacco leaf image and the at least two roasting parameters of the target tobacco leaf, perform feature fusion on the image feature and the roasting parameter feature by analyzing the correlation between the image feature and the roasting parameter feature and the importance of each roasting parameter of the target tobacco leaf, obtain a fusion feature of the target tobacco leaf, and determine the temperature setting value and / or the humidity setting value according to the fusion feature of the target tobacco leaf.
[0142] The tobacco leaf roasting control device provided by the embodiment belongs to the same application concept as the tobacco leaf roasting control method provided by the above-mentioned embodiments of the present application, can execute the tobacco leaf roasting control method provided by any of the above-mentioned embodiments of the present application, and has the corresponding function modules and beneficial effects of executing the tobacco leaf roasting control method. Technical details not described in detail in the embodiment can be referred to the specific processing content of the tobacco leaf roasting control method provided by the above-mentioned embodiments of the present application, which will not be described here.
[0143] Exemplary electronic device
[0144] Another embodiment of the present application also provides an electronic device, as shown in FIG. 6 The device comprises:
[0145] a memory 200 and a processor 210;
[0146] The memory 200 is connected with the processor 210, and is configured to store a program.
[0147] The processor 210 is configured to realize the tobacco leaf roasting control method disclosed in any of the above-mentioned embodiments by running the program stored in the memory 200.
[0148] In particular, the electronic device can further include a bus, the communication interface 220, the input device 230, and the output device 240.
[0149] The processor 210, the memory 200, the communication interface 220, the input device 230, and the output device 240 are connected to each other through the bus.
[0150] The bus can include a path that transmits information between the components of the computer system.
[0151] The processor 210 can be a general-purpose processor such as a central processing unit (CPU), a microprocessor, or the like, or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs of the present application. It can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0152] The processor 210 can include a main processor and can further include a baseband chip, a modem, or the like.
[0153] The memory 200 stores programs for executing the technical solutions of the present application, and can also store an operating system and other key services. Specifically, the program can include program code, and the program code includes computer operation instructions. More specifically, the memory 200 can include read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (RAM), other types of dynamic storage devices that can store information and instructions, disk storage, flash, and the like.
[0154] The input device 230 can include a device that receives data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor, and the like.
[0155] The output device 240 can include a device that allows information to be output to a user, such as a display screen, a printer, a speaker, and the like.
[0156] The communication interface 220 can include a device using any transceiver to communicate with other devices or communication networks, such as Ethernet, a radio access network (RAN), a wireless local area network (WLAN), and the like.
[0157] The processor 210 executes the programs stored in the memory 200, and invokes other devices, which can be used to implement each step of any tobacco curing control method provided by the above-mentioned embodiments of the present application.
[0158] Exemplary computer program product and storage medium
[0159] In addition to the above-mentioned methods and devices, the embodiments of the present application can also be computer program products, which include computer program instructions, which, when executed by a processor, cause the processor to perform the steps of the tobacco curing control method according to various embodiments of the present application described in the above-mentioned “Exemplary Methods” section of the specification.
[0160] The computer program product can be written in any combination of one or more programming languages, including an object-oriented programming language such as Java, C++, etc., and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0161] In addition, the embodiments of the present application can also be storage media, which store computer programs, and the computer programs are executed by a processor to perform the steps of the tobacco curing control method according to various embodiments of the present application described in the above-mentioned “Exemplary Methods” section of the specification.
[0162] For each of the above-mentioned method embodiments, in order to simply describe, it is expressed as a combination of a series of actions, but those skilled in the art should know that the present application is not limited by the order of the described actions, because according to the present application, certain steps can be performed in other order or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0163] It should be noted that each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between each embodiment can be referred to each other. For device embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.
[0164] The steps in the method of each embodiment of the present application can be adjusted, combined and deleted in sequence according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.
[0165] The modules and sub-modules in the apparatus and terminal in the embodiments of the present application can be combined, divided, and deleted according to actual needs.
[0166] In several embodiments provided in the present application, it should be understood that the disclosed terminal, apparatus, and method can be implemented by other ways. For example, the terminal embodiments described above are only illustrative, for example, the division of the modules or sub-modules is only a logical function division, and actual implementation can have another division manner, for example, a plurality of sub-modules or modules can be combined or integrated into another module, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed ones can be indirect coupling or communication connection through some interfaces, apparatuses, or modules, and can be electrical, mechanical, or other forms.
[0167] The modules or sub-modules described as separate components can or can not be physically separated, and the components of the modules or sub-modules can or can not be physical modules or sub-modules, that is, can be located in one place, or can be distributed to a plurality of network modules or sub-modules. Some or all of the modules or sub-modules can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0168] In addition, each functional module or sub-module in each embodiment of the present application can be integrated in one processing module, or each module or sub-module can exist physically, or two or more modules or sub-modules can be integrated in one module. The integrated module or sub-module can be realized in the form of hardware or software functional module or sub-module.
[0169] The skilled person can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software, or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in general terms in the above description. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0170] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software executed by a processor, or in a combination of the two. A software unit can reside in RAM, flash memory, ROM, electrically programmable ROM (EPROM or EEPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. The storage medium can be loaded into the execution system by a manufacturer, a seller, or a user of an electronic system.
[0171] Finally, it should be noted that the terms "first", "second", and the like, herein do not denote any order, quantity, combination, or importance, but rather are used to distinguish one element from another, and are more especially used for the purpose of identification in claims. Also, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a... " does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0172] The above description of disclosed embodiments provides enabling teaching for a person skilled in the art to realize or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and general principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Therefore, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A tobacco curing control method characterized by, The method comprises the following steps: image feature extraction is performed on a tobacco leaf image of a target tobacco leaf to obtain image features of the target tobacco leaf; textual expansion is performed on each curing parameter of the target tobacco leaf to obtain a curing parameter text of the target tobacco leaf, and all the curing parameter texts are spliced to obtain a curing parameter text sequence of the target tobacco leaf, and text feature extraction is performed on the curing parameter text sequence to obtain curing parameter features of the target tobacco leaf; the textual expansion is used to expand the curing parameter information into a text in a set expression mode; by analyzing the correlation between the image features and the curing parameter features, the feature elements related to the curing parameter features in the image features are enhanced to obtain first features of the target tobacco leaf; by analyzing the importance of each curing parameter of the target tobacco leaf, the features of each curing parameter in the curing parameter features are weighted to obtain second features of the target tobacco leaf; the first features and the second features are fused to obtain fusion features of the target tobacco leaf; according to the fusion features of the target tobacco leaf, a temperature setting value and / or a humidity setting value are determined, and the temperature setting value and / or the humidity setting value are used to adjust the temperature and / or the humidity during tobacco curing.
2. The method of claim 1, wherein, The curing parameters of the target tobacco leaf include quality parameters of the target tobacco leaf and / or curing environment parameters of the target tobacco leaf. The quality parameters of the target tobacco leaf include at least one of a tobacco leaf variety, a tobacco leaf growth site and a tobacco leaf maturity, and the curing environment parameters of the target tobacco leaf include at least one of curing temperature data, curing humidity data, fan speed and damper size.
3. The method of claim 2, wherein the tobacco leaf maturity of the target tobacco leaf is obtained by: determining the tobacco leaf maturity of the target tobacco leaf according to an initial image of the target tobacco leaf, wherein the initial image of the target tobacco leaf is an image of the target tobacco leaf before curing.
4. The method of claim 1, wherein, By analyzing the correlation between the image features and the curing parameter features, the feature elements related to the curing parameter features in the image features are enhanced to obtain first features of the target tobacco leaf, which comprises: mapping the image features and the curing parameter features to the same dimension feature space respectively to obtain mapped image features and mapped curing parameter features; performing a dot product normalization operation on the mapped image features and the mapped curing parameter features to obtain a correlation matrix between the image features and the curing parameter features; performing a weighting operation on the image features according to the correlation matrix to obtain the first features of the target tobacco leaf.
5. The method of claim 1, wherein, By analyzing the importance of each curing parameter of the target tobacco leaf, the features of each curing parameter in the curing parameter features are weighted to obtain second features of the target tobacco leaf, which comprises: based on a self-attention mechanism, attention weights of the features of each curing parameter in the curing parameter features are determined. The attention weight based on the characteristics of each roasting parameter is used to weight each roasting parameter in the roasting parameter characteristics, to obtain the second characteristics of the target tobacco leaf.
6. The method of claim 1, wherein, The image feature of the target tobacco leaf is extracted from the tobacco leaf image of the target tobacco leaf, the text expansion of each roasting parameter of the target tobacco leaf is performed to obtain the roasting parameter text of the target tobacco leaf, and all the roasting parameter texts are spliced to obtain the roasting parameter text sequence of the target tobacco leaf. The text feature of the roasting parameter text sequence is extracted to obtain the roasting parameter characteristics of the target tobacco leaf. The correlation between the image feature and the roasting parameter characteristics is analyzed, the feature elements related to the roasting parameter characteristics in the image feature are enhanced, and the first characteristics of the target tobacco leaf are obtained. The importance of each roasting parameter of the target tobacco leaf is analyzed, the characteristics of each roasting parameter in the roasting parameter characteristics are weighted, and the second characteristics of the target tobacco leaf are obtained. The first characteristics and the second characteristics are fused to obtain the fusion characteristics of the target tobacco leaf. According to the fusion characteristics of the target tobacco leaf, the temperature setting value and / or the humidity setting value are determined, including: The tobacco leaf image of the target tobacco leaf and at least two roasting parameters of the target tobacco leaf are input into a pre-trained tobacco leaf roasting temperature and humidity prediction model to obtain the temperature setting value and / or the humidity setting value. The tobacco leaf roasting temperature and humidity prediction model is used to extract the image feature of the target tobacco leaf from the tobacco leaf image of the target tobacco leaf, to obtain the image feature of the target tobacco leaf. The text expansion of each roasting parameter of the target tobacco leaf is performed to obtain the roasting parameter text of the target tobacco leaf, and all the roasting parameter texts are spliced to obtain the roasting parameter text sequence of the target tobacco leaf. The text feature of the roasting parameter text sequence is extracted to obtain the roasting parameter characteristics of the target tobacco leaf. The correlation between the image feature and the roasting parameter characteristics is analyzed, the feature elements related to the roasting parameter characteristics in the image feature are enhanced, and the first characteristics of the target tobacco leaf are obtained. The importance of each roasting parameter of the target tobacco leaf is analyzed, the characteristics of each roasting parameter in the roasting parameter characteristics are weighted, and the second characteristics of the target tobacco leaf are obtained. The first characteristics and the second characteristics are fused to obtain the fusion characteristics of the target tobacco leaf. According to the fusion characteristics of the target tobacco leaf, the temperature setting value and / or the humidity setting value are determined.
7. A tobacco curing control apparatus, characterized by, It includes: The feature acquisition module is used to extract the image feature of the target tobacco leaf from the tobacco leaf image of the target tobacco leaf to obtain the image feature of the target tobacco leaf. The text expansion of each roasting parameter of the target tobacco leaf is performed to obtain the roasting parameter text of the target tobacco leaf, and all the roasting parameter texts are spliced to obtain the roasting parameter text sequence of the target tobacco leaf. The text feature of the roasting parameter text sequence is extracted to obtain the roasting parameter characteristics of the target tobacco leaf. The text extension is used to extend the baking parameter information into text conforming to a set expression mode; The feature fusion module is configured to: enhance feature elements related to the baking parameter features in the image features by analyzing the correlation between the image features and the baking parameter features, to obtain first features of the target tobacco leaves; perform weighting operation on features of each baking parameter in the baking parameter features by analyzing the importance of each baking parameter of the target tobacco leaves, to obtain second features of the target tobacco leaves; and perform feature fusion on the first features and the second features, to obtain fused features of the target tobacco leaves; The temperature and humidity determination module is configured to determine a temperature set value and / or a humidity set value according to the fused features of the target tobacco leaves, the temperature set value and / or the humidity set value being used to adjust the temperature and / or the humidity during tobacco baking.
8. An electronic device, comprising: Comprise: a memory and a processor; The memory is connected with the processor and is used to store programs; The processor is used to realize the tobacco baking control method in any one of claims 1 to 6 by running the programs in the memory.
9. A storage medium, characterized by The storage medium has a computer program stored thereon, and the computer program is executed by the processor to realize the tobacco baking control method in any one of claims 1 to 6.
Citation Information
Patent Citations
Tobacco leaf maturity state probability calculation method based on image analysis
CN113919443A
Flue-cured tobacco process stage prediction method and system based on model fusion
CN114997463A