Intelligent decision-making method and system for tobacco leaf baking
By using knowledge graphs and incremental learning decision-making models in tobacco leaf baking, the problems of insufficient human experience and poor decision-making generalization in the tobacco leaf baking process are solved, and the quality of tobacco leaf baking and economic benefits are improved.
Patent Information
- Application Number
- CN202111545672.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-16
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2041-12-16
AI Technical Summary
During the baking process of tobacco leaves, due to high human experience requirements and many uncertain factors, the baking process is difficult to accurately control. The traditional decision-making method of extracting spatial characteristics of different colors is poor in generalization, and the deep learning model is complex to update, making it difficult to ensure the quality of tobacco leaves.
Using a decision-making model based on knowledge graph and incremental learning, data is collected through tobacco leaf image acquisition equipment, knowledge graphs are built for semantic search, baking strategies are inferred, and data comparison and model updates are performed on cloud servers to achieve continuous learning and decision-making Improve capability.
It improves the decision-making ability and quality of tobacco leaf baking, simplifies the model update process, reduces operational complexity, enhances the ability to adapt to new tobacco leaf data, and improves economic benefits.
Smart Images

Figure CN114331979B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of flue-cured tobacco curing, and in particular relates to an intelligent decision-making method and system for tobacco leaf baking. Background Art
[0002] Tobacco leaf baking is a strict process. Since the quality of tobacco leaves picked each time is different, tobacco leaf baking cannot be completely carried out according to the existing preset temperature curve. Tobacco leaf baking requires high human experience and there are many uncertain factors. The baking process is often not accurately controlled. Technicians are prone to misjudgment during baking, which leads to a reduction in the overall quality of tobacco leaves. The traditional decision-making method of extracting different color space features for classification has poor generalization; at the same time, the technical solution based on deep learning needs to be retrained when the model is updated, and the operation is complicated. Therefore, how to improve the decision-making ability of tobacco leaf baking and ensure baking quality is an urgent problem to be solved. Summary of the invention
[0003] The purpose of the present invention is to overcome the shortcomings of the prior art, provide an intelligent decision-making method and system for tobacco leaf baking, propose a decision-making model based on knowledge graph and incremental learning, have the ability of continuous learning, improve the decision-making ability when facing new tobacco leaf data, ensure the baking quality of tobacco leaves, and improve economic benefits.
[0004] The purpose of the present invention is achieved through the following technical solutions:
[0005] An intelligent decision-making system for tobacco leaf baking comprises a tobacco leaf image acquisition device, a decision model and a decision terminal thereof, and a cloud server.
[0006] The tobacco leaf image acquisition device comprises a camera and a full-spectrum lamp, and is used to acquire color images of tobacco leaves during the baking process.
[0007] The tobacco leaf image acquisition device is built into an insulating box, the camera is installed in the middle of the insulating box, the full-spectrum lamp is installed on both sides of the camera, and the camera and the full-spectrum lamp are separated from the high temperature and high humidity environment of the curing room by double-layer insulating glass.
[0008] The decision terminal is used to receive tobacco leaf images and baking data, determine the tobacco leaf baking status according to the stored decision model and return adjustment suggestions for the baking strategy. After the baking of the entire batch of tobacco leaves is completed, the tobacco leaf images and baking strategies are uploaded to the cloud server via the Internet.
[0009] The cloud server is used to receive tobacco leaf image data and baking strategies uploaded by the decision terminal, compare and judge the data with the data in the decision model and perform incremental learning, and return the newly learned decision model to the decision terminal for updating and upgrading.
[0010] The decision model is modeled by constructing a knowledge graph. First, the training images are collected through tobacco leaf image acquisition equipment, and experts are invited to annotate the data, including annotating the baking status and actual baking strategy of the tobacco leaf images; then the annotated information and tobacco leaf images are recorded in the knowledge graph to establish an entity semantic library. The operating principle of the decision model is that tobacco leaf images at the same baking stage are similar, and the tobacco leaf image data can be input into the tobacco leaf baking knowledge graph, and the knowledge graph uses semantic search to infer similar baking strategies.
[0011] An intelligent decision-making method for tobacco leaf baking is a decision-making model that uses knowledge graphs and incremental learning. The tobacco leaf image information during the baking process is collected by a tobacco leaf image acquisition device and transmitted to a decision terminal device; the decision terminal device inputs the image information into the decision model for knowledge reasoning to derive the tobacco leaf baking strategy; when a batch of tobacco leaves is baked, the baking data and manual evaluation are uploaded to the cloud server for model adjustment and upgrade, and the decision model of the decision terminal is updated. Figure 1 As shown, the specific steps include:
[0012] (1) Determine the required data based on the needs of tobacco leaf baking production;
[0013] (2) After obtaining the required data, determine the entity relationship entity triples of the knowledge graph;
[0014] (3) After determining the category to which each data belongs in the knowledge graph, store the data in the Neo4j graph database to construct the knowledge graph;
[0015] (4) Evidence-based reasoning of tobacco leaf baking knowledge graph to provide recommended baking strategies;
[0016] (5) After the baking is completed, the current tobacco leaf data is uploaded, including tobacco leaf pictures, baking strategies (including baking temperature, baking room humidity, baking time), and manual evaluation; and incremental learning is performed based on the manual evaluation, and new baking data is added to the knowledge graph, continuously enriching the tobacco leaf baking knowledge graph and providing a reasoning basis for subsequent similar situations.
[0017] In step (1), the required data include: tobacco leaf image data, temperature and humidity of the curing barn, curing time, and manual evaluation of the curing degree of the tobacco leaves after curing; preferably, it also includes the position of the tobacco leaves in the curing barn, specifically the upper, middle, and lower parts of the curing barn.
[0018] In step (2), the triples include entities, relations, and entities. Since there is little data related to tobacco leaf baking in actual operation, it is not necessary to use a computer to extract it. Therefore, it is easier to obtain entities and relations by manual induction; Figure 2 As shown, the entity relationship entity triples of the knowledge graph include:
[0019] (2-1) constructing entities, including tobacco leaves, image data, baking degree, temperature, humidity, time, baking position, and tobacco leaf baking evaluation, and using the above field information as entities in the relationship diagram;
[0020] (2-2) Constructing relationships: Constructing the triple relationships required for the knowledge graph based on the relationships between entities; including but not limited to:
[0021] Entity: tobacco leaf, relationship: manual evaluation, entity: tobacco leaf baking evaluation;
[0022] Entity: tobacco leaf, relationship: baking strategy, entity: temperature;
[0023] Entity: tobacco leaf, relationship: baking strategy, entity: humidity;
[0024] Entity: tobacco leaf, relationship: baking strategy, entity: time;
[0025] Entity: tobacco leaf, relationship: tobacco leaf data, entity: baking location;
[0026] Entity: tobacco leaf, relationship: tobacco leaf data, entity: image data;
[0027] Entity: Tobacco Leaf, Relationship: Tobacco Leaf Data, Entity: Roasting Degree.
[0028] In step (3), the image data needs to be converted into a feature vector Vi by the encoder, where Vi represents the i-th image feature vector. The encoder uses the image block method in the ViT model and performs lightweight adjustments, replacing the 16*16 ordinary convolution with a depth-separable convolution.
[0029] In step (4), the tobacco leaf baking knowledge graph evidence-based reasoning includes the following steps:
[0030] (4-1) The decision terminal converts the tobacco leaf image collected by the tobacco leaf image collection device into a feature vector v through an encoder;
[0031] (4-2) Input the feature vector v into the tobacco leaf baking knowledge graph, and compare it with the existing image feature vector Vi in the knowledge graph to calculate the cosine similarity;
[0032] (4-3) Match the image feature vector Vi with the highest similarity and recommend the corresponding baking strategy.
[0033] In step (4-2), the cosine similarity is used to calculate the similarity between two vectors. Two vector groups of 1200*768 are used for comparison. After calculating the cosine similarity of every two vectors, the average value is required.
[0034] In step (5), the incremental learning means that after the original model is trained, data from the actual tobacco leaf baking process is continuously collected and transmitted to the cloud server to determine whether new data appears. If new data appears in the cloud server, a new entity semantic relationship is established in the knowledge graph, the decision model is adjusted and upgraded, and the local server is updated to continue to serve the actual tobacco leaf baking production. The above process is repeated to continuously enhance the generalization ability and robustness of the model.
[0035] In step (5), after the tobacco is cured, the staff will manually evaluate the cured tobacco leaves. If the quality of the cured tobacco leaves meets the standards, the manual evaluation is positive. If the cured tobacco leaves are burnt, blackened, or do not meet the standards, the manual evaluation is negative.
[0036] When the manual evaluation is positive, the tobacco leaf baking data will not be changed and the manual evaluation will be added and uploaded to the cloud server; the cloud server will compare the received baking data with the data in the knowledge graph; the data comparison is calculated using cosine similarity, and the value of the cosine similarity calculation is between -1 and 1, where -1 is completely different and 1 is completely similar; the row vectors at the same position in the input vector group and the vector group in the knowledge graph are calculated to obtain the cosine similarity of the two vectors, which are added and the average value is calculated, and an artificial threshold (such as 0.8) is set to judge the degree of similarity between the new baking data and the data in the knowledge graph; when the similarity is lower than the artificial threshold, it means that the data has no similar data in the existing knowledge graph, and the baking data will be added to the knowledge graph. Conversely, when the similarity is higher than the artificial threshold, it means that the data has very similar data in the existing knowledge graph and needs to be discarded.
[0037] When the manual evaluation is negative, it is necessary to manually add and modify the baking strategy, and then upload it to the cloud server; when the cloud server receives a negative manual evaluation, it will add the data to the knowledge graph and delete the original corresponding baking strategy; after the knowledge graph is updated, the server will send an upgrade package back to the decision terminal to update the knowledge graph decision model of the decision terminal, thereby improving the scalability and effectiveness of the knowledge graph's support for flue-cured tobacco production decisions.
[0038] Compared with the prior art, the present invention has the following advantages and effects:
[0039] (1) The decision-making method of the present invention has the ability of continuous learning, and can continuously add various situations that occur in reality, thereby improving the decision-making ability when facing new tobacco leaf data, ensuring the baking quality of tobacco leaves and improving economic benefits.
[0040] (2) The present invention uses an encoder to convert an image into a feature vector group with richer feature information, makes lightweight adjustments during the encoder conversion process, uses a depth-separable convolution kernel, and reduces the amount of calculation and parameters.
[0041] (3) Compared with the existing decision-making scheme based on neural network, the present invention only needs to add new data to the tobacco leaf baking knowledge graph during upgrading and updating. The operation is simple, and the previously processed data does not need to be processed repeatedly. When learning new knowledge, the old knowledge will not be forgotten. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 The steps for constructing the knowledge graph of tobacco baking.
[0043] Figure 2 This is the structural diagram of the tobacco leaf roasting knowledge graph.
[0044] Figure 3 Decision making flow chart for tobacco leaf curing.
[0045] Figure 4 Update module for tobacco leaf curing knowledge graph. DETAILED DESCRIPTION
[0046] In order to facilitate the understanding of the present invention, the present invention will be described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be pointed out that, for those skilled in the art, without departing from the inventive concept, the present invention can also make some variations and improvements, which all belong to the protection scope of the present invention.
[0047] Example 1
[0048] The intelligent decision-making system for tobacco leaf baking of this embodiment includes a tobacco leaf image acquisition device, a decision model and a decision terminal thereof, and a cloud server. The tobacco leaf image acquisition device includes a wide-angle camera, a heat-insulating design and an adjustable full-spectrum lamp, which are used to obtain color images of tobacco leaves during baking. The tobacco leaf image acquisition device is built into an insulated box, the wide-angle camera is installed in the middle of the insulated box, and the adjustable full-spectrum lamp is installed on both sides of the camera. The camera and the full-spectrum lamp are separated from the high temperature and high humidity environment of the baking room by double-layer insulation glass (part of the insulation box), and anti-fog coating is applied to the glass in contact with the baking room to prevent water mist condensation. The decision terminal is used to receive tobacco leaf images and baking data, judge the tobacco leaf baking status according to the stored decision model, and return the adjustment suggestions of the baking strategy. After the baking of the whole batch of tobacco leaves is completed, the tobacco leaf pictures and baking strategies are uploaded to the cloud server via the Internet; after uploading, the decision terminal does not need to store the tobacco leaf data information to reduce the storage cost of the decision terminal. The cloud server is used to receive tobacco leaf image data and baking strategies uploaded by the decision terminal, compare and judge the data with the data in the decision model, perform incremental learning, and return the newly learned decision model to the decision terminal for updating and upgrading.
[0049] like Figure 3 As shown, during baking, the tobacco leaf image acquisition device collects tobacco leaf images and sends them to the decision terminal together with the baking room data. The data format of this embodiment is {baking room ID: 0001, baking batch: 0001, picture ID: 0056, picture data, shooting time: 21-6-25-13:15, shooting position: upper part, temperature: 42°C, humidity: 38%}. After receiving the data, the decision terminal will perform cosine similarity calculation on the picture data, match the picture data with the highest similarity in the tobacco leaf baking knowledge graph, and give the associated baking degree and baking strategy: {baking degree: 40%, recommended temperature: 42°C, recommended humidity: 38%, continue baking time: 6 hours}. The decision terminal will then add the baking degree and baking strategy into the original data {baking room ID: 0001, baking batch: 0001, picture ID: 0056, picture data, shooting time: 21-6-25-13:15, shooting position: upper part, temperature: 42℃, humidity: 38%, baking degree: 40%, recommended temperature: 42℃, recommended humidity: 38%, continued baking time: 6 hours}.
[0050] Example 2
[0051] The other steps are the same as those in Example 1. The data format of this example is {baking room ID: 0002, baking batch: 0002, picture ID: 0065, picture data, shooting time: 21-6-30-13:15, shooting position: upper part, temperature: 42°C, humidity: 38%}. After receiving the picture data, the decision terminal will perform cosine similarity calculation on the picture data, match the picture data with the highest similarity in the tobacco baking knowledge graph, and give the associated baking degree and baking strategy: {baking degree: 50%, recommended temperature: 46°C, recommended humidity: 38%, continue baking time: 6 hours}. The decision terminal will then add the baking degree and baking strategy to the original data {baking room ID: 0001, baking batch: 0001, picture ID: 0056, picture data, shooting time: 21-6-25-13:15, shooting position: upper part, temperature: 42℃, humidity: 38%, baking degree: 50%, recommended temperature: 46℃, recommended humidity: 38%, continued baking time: 6 hours}. The recommended temperature is inconsistent with the current temperature, and the decision terminal sends a message to the baking master to request to increase the baking room temperature. After the baking master receives the message and agrees to the request, the decision terminal will increase the baking room temperature to the recommended temperature.
[0052] Example 3
[0053] After the baking is completed, the baking master will evaluate the quality of the tobacco leaves. The manual evaluation of the quality of the baked tobacco leaves that meet the standards is positive, and the tobacco leaves that are baked, blackened, and other non-standard conditions are negative. The data grid is {baking room ID: 0002, baking batch: 0002, [picture ID: 0001, picture data, shooting time: 21-6-30-13:15, shooting position: upper part, temperature: 36℃, humidity: 36%, baking degree: 0%, recommended temperature: 36℃, recommended humidity: 36%, continued baking time: 2 hours;, ...; picture ID: 2850, picture data, shooting time: 21-7-5-13:15, shooting position: upper part, temperature: 60℃, humidity: 40%, baking degree: 80%, recommended temperature: 60℃, recommended humidity: 40%, continued baking time: 4 hours], manual evaluation: green tobacco}. The manual evaluation of green tobacco is a negative evaluation. Please ask the baking master to analyze the reasons and modify the corresponding recommendation strategy. The flue-cured green tobacco may not turn yellow enough during the yellowing stage, and the fire is switched too early. Modify the recommended strategy to extend the baking time in the yellowing stage, such as changing the continued baking time in the data [Picture ID: 0040, picture data, shooting time: 21-6-30-13:15, shooting position: top, temperature: 38°C, humidity: 37%, baking degree: 3%, recommended temperature: 38°C, recommended humidity: 37%, continued baking time: 2 hours] to 4 hours. After the modification is completed, the tobacco leaf data of this batch will be packaged and attached with manual evaluation and sent to the cloud server for upgrade and update. Figure 4 shown.
[0054] Among them, the image data needs to be converted into a feature vector Vi by the encoder, where Vi represents the i-th image feature vector. The encoder adopts the image segmentation method in the ViT model and makes lightweight adjustments, replacing the 16*16 ordinary convolution with a depth-separable convolution. The parameters of the depth-separable convolution adopt the knowledge distillation method, using the image segmentation part in the ViT pre-training model as the teacher model, and the distillation temperature T is set to 1, so that the depth-separable convolution kernel learns the knowledge of the ordinary convolution kernel in the ViT pre-training model. In this embodiment, the picture is an RGB color image with a uniform size of 640*480. Each image contains 3 matrix data of 640*480. After passing through the encoder, a feature vector group of 40*30*768 will be formed, which is then flattened to form a feature vector group of 1200*768.
[0055] The cloud server compares the received baking data with the data in the knowledge graph. Data comparison is also calculated using cosine similarity, and the value of cosine similarity calculation is between -1 and 1, where -1 is completely different and 1 is completely similar. The image data of this embodiment is converted into a 1200*768 feature vector group after passing through the encoder. The row vectors at the same position in the two vector groups are calculated to obtain the cosine similarity of the two vectors, which are added and the average value is calculated. An artificial threshold (0.8 is used in this embodiment) is set to determine the similarity between the new baking data and the data in the knowledge graph; when the similarity is lower than the artificial threshold, it means that the data has no similar data in the existing knowledge graph, and the baking data will be added to the knowledge graph. On the contrary, when the similarity is higher than the artificial threshold, it means that the data has very similar data in the existing knowledge graph and needs to be discarded.
[0056] The above descriptions are merely embodiments of the present invention, but the implementation methods of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention are equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. An intelligent decision-making method for tobacco leaf baking, characterized in that: It is a decision-making model that uses knowledge graphs and incremental learning. The tobacco leaf image information during the baking process is collected through tobacco leaf image acquisition equipment and transmitted to the decision-making terminal device. The decision-making terminal device inputs the image information into the decision-making model for knowledge reasoning to derive the tobacco leaf baking strategy. When a batch of tobacco leaves is baked, the baking data and manual evaluation are uploaded to the cloud server for model adjustment and upgrade, and the decision model of the decision terminal is updated. The specific steps include: (1) Determine the required data based on the needs of tobacco leaf baking production; (2) After obtaining the required data, determine the entity relationship entity triples of the knowledge graph; (3) After determining the category to which each data belongs in the knowledge graph, the data is stored in the Neo4j graph database to construct a knowledge graph. The image data is converted into a feature vector Vi by an encoder, where Vi represents the i-th image feature vector. The encoder uses the image block method in the ViT model and performs lightweight adjustments, replacing the 16*16 ordinary convolution with a depth-separable convolution. (4) Evidence-based reasoning of the tobacco leaf baking knowledge graph to provide a recommended baking strategy; the evidence-based reasoning of the tobacco leaf baking knowledge graph includes the following steps: (4-1) The decision terminal converts the tobacco leaf image collected by the tobacco leaf image collection device into a feature vector v through an encoder; (4-2) Input the feature vector v into the tobacco leaf baking knowledge graph, and compare it with the existing image feature vector Vi in the knowledge graph to calculate the cosine similarity; (4-3) Match the image feature vector Vi with the highest similarity and recommend the corresponding baking strategy; (5) After the baking is completed, the current tobacco leaf data is uploaded, including tobacco leaf pictures, baking strategies, and manual evaluations; incremental learning is performed based on manual evaluations, and new baking data is added to the knowledge graph, continuously enriching the tobacco leaf baking knowledge graph and providing a basis for reasoning for subsequent similar situations; The incremental learning means that after the original model is trained, data from the actual tobacco leaf baking process is continuously collected and transmitted to the cloud server to determine whether new data appears. If so, a new entity semantic relationship is established in the knowledge graph, the decision model is adjusted and upgraded, and the local server is updated to continue to serve the actual tobacco leaf baking production. Specifically, when the tobacco is baked, the staff will manually evaluate the baked tobacco leaves. If the quality of the baked tobacco leaves meets the standards, the manual evaluation is positive. If the baked tobacco leaves are burnt or blackened and do not meet the standards, the manual evaluation is negative. When the manual evaluation is positive, the tobacco leaf baking data will not be changed and the manual evaluation will be added and uploaded to the cloud server. The cloud server compares the received baking data with the data in the knowledge graph. The data comparison is calculated using cosine similarity, and the value of the cosine similarity calculation is between -1 and 1, where -1 is completely different and 1 is completely similar. The row vectors at the same position in the input vector group and the vector group in the knowledge graph are calculated to obtain the cosine similarity of the two vectors, which are added and the average value is calculated. An artificial threshold is set to judge the similarity between the new baking data and the data in the knowledge graph; when the similarity is lower than the artificial threshold, it means that there is no similar data in the existing knowledge graph, and the baking data will be added to the knowledge graph. On the contrary, when the similarity is higher than the artificial threshold, it means that there is very similar data in the existing knowledge graph and it is discarded; when the manual evaluation is negative, the baking strategy is manually added and modified, and then uploaded to the cloud server; when the cloud server receives a negative manual evaluation, it will add the data to the knowledge graph and delete the original corresponding baking strategy; after the knowledge graph is updated, the server will send an upgrade package back to the decision terminal to update the knowledge graph decision model of the decision terminal.
2. The intelligent decision-making method for tobacco leaf baking according to claim 1, characterized in that: In step (2), the entity relationship entity triples of the knowledge graph include: (2-1) Construct entities, including tobacco leaves, image data, baking degree, temperature, humidity, time, baking position, and tobacco leaf baking evaluation, and use the above field information as entities in the relationship diagram; (2-2) Construct relationships: Construct the triple relationships required for the knowledge graph based on the relationships between entities.
3. The intelligent decision-making method for tobacco leaf baking according to claim 2, characterized in that: The triple relationship includes: Entity: tobacco leaf, relationship: manual evaluation, entity: tobacco leaf baking evaluation; Entity: tobacco leaf, relationship: baking strategy, entity: temperature; Entity: tobacco leaf, relationship: baking strategy, entity: humidity; Entity: tobacco leaf, relationship: baking strategy, entity: time; Entity: tobacco leaf, relationship: tobacco leaf data, entity: baking location; Entity: tobacco leaf, relationship: tobacco leaf data, entity: image data; Entity: Tobacco Leaf, Relationship: Tobacco Leaf Data, Entity: Roasting Degree.
4. An intelligent decision-making system for tobacco leaf baking, characterized in that: The intelligent decision-making method for tobacco leaf baking as described in claim 1 includes a tobacco leaf image acquisition device, a decision model and a decision terminal thereof, and a cloud server; the tobacco leaf image acquisition device includes a camera and a full-spectrum lamp, which are used to obtain color images of tobacco leaves during the baking process; the decision terminal is used to receive tobacco leaf pictures and baking data, judge the tobacco leaf baking status according to the stored decision model and return adjustment suggestions for the baking strategy; the cloud server is used to receive the tobacco leaf picture data and baking strategy uploaded by the decision terminal, compare and judge the data with the data in the decision model and incrementally learn the data, and return the newly learned decision model to the decision terminal for updating and upgrading.
5. The intelligent decision-making system for tobacco leaf baking according to claim 4, characterized in that: The tobacco leaf image acquisition device is built into an insulating box, the camera is installed in the middle of the insulating box, the full-spectrum lamp is installed on both sides of the camera, and the camera and the full-spectrum lamp are separated from the high temperature and high humidity environment of the curing room by double-layer insulating glass.
Citation Information
Cited By
Tobacco leaf curing process intelligent decision-making system based on multi-source data fusion and AI algorithm
CN121526371A
