Tobacco leaf curing stage identification method and system

By combining Mamba sequential modeling and Transformer encoder, local dynamic features and global features of the tobacco curing process are extracted, solving the accuracy and efficiency problems of tobacco curing stage identification in the existing technology and achieving more efficient tobacco curing stage identification.

CN121890770APending Publication Date: 2026-04-21HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAZHONG UNIV OF SCI & TECH
Filing Date
2026-03-11
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies struggle to simultaneously depict both the local dynamic changes and overall evolution of the tobacco curing process, and lack an adaptive filtering mechanism for key and background information, resulting in low accuracy and efficiency in identifying tobacco curing stages.

Method used

The Mamba sequential modeling module is used to extract local dynamic features from multi-source time series data. The adaptive dynamic gating fusion module is used for dynamic weighting. The Transformer encoder is used for global dependency modeling. The global features and local dynamic features are fused through the feature fusion module. Finally, the classifier outputs the recognition results of the baking stage.

Benefits of technology

It significantly improves the accuracy and stability of tobacco curing stage identification, reduces computational overhead, and enhances robustness and efficiency in complex curing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121890770A_ABST
    Figure CN121890770A_ABST
Patent Text Reader

Abstract

The invention provides a tobacco leaf curing stage identification method and system, and the method comprises the steps: obtaining multi-source time sequence data collected in a tobacco leaf curing process, the multi-source time sequence data comprising temperature, humidity and tobacco leaf water loss rate; inputting the multi-source time sequence data into the trained tobacco leaf curing stage identification model, and outputting a current curing stage; the tobacco leaf curing stage identification model comprises a Mama sequential modeling module used for extracting local dynamic features of multi-source time sequence data; the self-adaptive dynamic gating fusion module is used for dynamically weighting the local dynamic features to obtain key information features; the Transform encoder is used for carrying out global dependency modeling on the key information features to obtain global features; the feature fusion module is used for fusing the global features and the local dynamic features to obtain fused features; and the classifier is used for outputting a baking stage identification result according to the fusion features. The identification accuracy and efficiency of the tobacco leaf baking stage are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of tobacco leaf identification technology, specifically to a method and system for identifying tobacco leaf curing stages. Background Technology

[0002] Tobacco curing is a crucial step in tobacco production, directly impacting the appearance, color, internal chemical composition, and industrial usability of the tobacco leaves. In actual production, tobacco curing typically involves several stages, including yellowing, color setting, and drying, each with different temperature and humidity requirements. Currently, determining these curing stages relies heavily on manual experience. Curing personnel observe changes in the color and shape of the leaves, combined with parameters such as temperature and humidity within the curing barn, to make their judgments. This method suffers from high subjectivity, reliance on operator experience, and difficulty in standardization and large-scale replication. Judgment errors are particularly prone to occur during transitional stages, thus affecting the stability of curing quality.

[0003] With the widespread adoption of sensor technology and automated control equipment, multi-source time-series data such as temperature and humidity can be collected during the baking process. In existing technologies, to eliminate the strong subjectivity inherent in relying on human experience, traditional machine learning methods are used to analyze the baking process. However, these methods have the following limitations: 1. Existing machine learning methods mostly use a single model to model time-series data, making it difficult to simultaneously depict the local dynamic changes (such as instantaneous fluctuations in temperature and humidity) and the overall evolutionary patterns (such as transition features between stages) of the baking process, resulting in insufficient stage identification accuracy. 2. Existing deep learning solutions typically input all time-series features indiscriminately into subsequent networks, lacking an adaptive filtering mechanism for key and background information, leading to wasted computational resources and susceptibility to noise interference.

[0004] Therefore, there is an urgent need for a method and system for identifying the tobacco curing stage, which can simultaneously capture the local dynamic features and global evolution patterns of the tobacco curing process, and has the ability to adaptively filter key information, so as to improve the accuracy and efficiency of tobacco curing stage identification. Summary of the Invention

[0005] In view of this, it is necessary to provide a method and system for identifying the tobacco curing stage, in order to solve the technical problems in the existing technology that make it difficult to simultaneously depict the local dynamic changes and overall evolution of the curing process, and to input all temporal features into the subsequent network without discrimination, and lack an adaptive filtering mechanism for key information and background information, resulting in low accuracy and efficiency in identifying the tobacco curing stage.

[0006] To address the aforementioned technical problems, in a first aspect, the present invention provides a method for identifying the tobacco leaf curing stage, comprising: Acquire multi-source time-series data collected during the tobacco curing process, including temperature, humidity, and tobacco leaf water loss rate; The multi-source time-series data is input into the trained tobacco curing stage recognition model, and the current curing stage is output. The tobacco curing stage identification model includes: The Mamba sequential modeling module is used to extract local dynamic features from the multi-source time-series data. An adaptive dynamic gating fusion module is used to dynamically weight the local dynamic features to obtain key information features; A Transformer encoder is used to perform global dependency modeling on the key information features to obtain global features; The feature fusion module is used to fuse the global features with the local dynamic features to obtain fused features; A classifier is used to output the baking stage identification result based on the fused features.

[0007] In one possible implementation, acquiring the multi-source time-series data collected during the tobacco curing process includes: A tobacco leaf curing data warehouse is built based on MySQL. The data warehouse adopts a layered architecture, including an operational data storage layer, a data detail layer, a data service layer, and an application data storage layer. Collect multi-source raw data during the tobacco curing process and store the multi-source raw data in the operational data storage layer; The multi-source raw data in the operational data storage layer is cleaned and standardized to generate detailed data, and the detailed data is stored in the data detail layer. The detailed data in the data detail layer is lightly aggregated according to a preset theme to generate service data, and the service data is stored in the data service layer. Based on the identification requirements, the service data is extracted from the data service layer to generate target data, and the target data is stored in the application data storage layer. The multi-source time-series data is extracted from the application data storage layer.

[0008] In one possible implementation, the construction of the tobacco curing data warehouse based on MySQL includes: The Kettle data integration tool is used to perform extraction, cleaning, transformation and loading of the multi-source raw data, and the operation data storage layer, data detail layer, data service layer and application data storage layer in the data warehouse are automatically updated through task scheduling; Integrate the Kettle scheduling task and the data warehouse access interface under the Spring Boot framework to support the business system's automated invocation of baking data.

[0009] In one possible implementation, the Mamba sequential modeling module includes multiple cascaded selective state space units, each of which includes a cascaded selective state space block and a root mean square normalization layer. The selective state space block is used to perform state space modeling on the multi-source time series data and extract initial local dynamic features. The root mean square normalization layer is used to normalize the initial local dynamic features to obtain the local dynamic features.

[0010] In one possible implementation, the local dynamic features are dynamically weighted to obtain key information features, including: Calculate the attention weights among local features at different time steps; The key information features are obtained by weighting and aggregating the local dynamic features according to the attention weights.

[0011] In one possible implementation, the attention weights are: ; In the formula, Local dynamic features at time step j Local dynamic features at the i-th time step Attention weights; , It is a learnable linear mapping matrix.

[0012] In one possible implementation, the Transformer encoder is composed of a stack of first Transformer blocks and second Transformer blocks, which perform global dependency modeling on the key information features to obtain global features, including: Add positional encoding to the key information features to obtain positional encoded features; The location-encoded features are input into the first Transformer block, and processed by a multi-head self-attention mechanism and a feedforward neural network to obtain the first intermediate features; The first intermediate feature is input into the second Transformer block, and after processing by a multi-head self-attention mechanism and a feedforward neural network, the global feature is obtained.

[0013] In one possible implementation, the fusion feature is: ; ; In the formula, Features of fusion; For global features; For gating weights; Key information features; To balance the hyperparameters of linear fusion and nonlinear residual information; It is a local dynamic feature; For residual calculation; This is for concatenation operations.

[0014] In one possible implementation, the classifier includes a multilayer perceptron and an activation function layer; The multilayer perceptron is used to perform multilayer fully connected transformation on the fused features to obtain classification features; The activation function layer is used to perform non-linear activation on the classification features and output the tobacco curing stage category.

[0015] Secondly, the present invention also provides a tobacco leaf curing stage identification system, comprising: A multi-source time-series data acquisition unit is used to acquire multi-source time-series data collected during the tobacco curing process, wherein the multi-source time-series data includes temperature, humidity and tobacco leaf water loss rate; The tobacco curing stage identification unit is used to input the multi-source time-series data into the trained tobacco curing stage identification model and output the current curing stage. The tobacco curing stage identification model includes: The Mamba sequential modeling module is used to extract local dynamic features from the multi-source time-series data. An adaptive dynamic gating fusion module is used to dynamically weight the local dynamic features to obtain key information features; A Transformer encoder is used to perform global dependency modeling on the key information features to obtain global features; The feature fusion module is used to fuse the global features with the local dynamic features to obtain fused features; A classifier is used to output the baking stage identification result based on the fused features.

[0016] The beneficial effects of this invention are as follows: The tobacco curing stage identification method provided by this invention extracts local dynamic features of time-series data through the Mamba sequence modeling module, capturing the instantaneous change patterns of temperature and humidity during the curing process; and performs global dependency modeling of key information through a Transformer encoder, characterizing the long-range correlation between different time steps and different curing stages. In other words, this invention can identify tobacco curing stages based on local dynamic features and global features, enabling the classifier to simultaneously perceive the detailed fluctuations and overall evolutionary trends of the curing process, significantly improving the accuracy and stability of stage identification.

[0017] Furthermore, this invention sets up an adaptive dynamic gating fusion module to dynamically weight and filter local dynamic features, thereby obtaining key information features and avoiding redundant information from entering the computationally intensive Transformer encoder. This reduces computational overhead while improving the model's sensitivity to key temporal features, thus improving the efficiency and accuracy of tobacco curing stage identification.

[0018] Furthermore, this invention uses a feature fusion module to perform residual fusion of the global features output by the Transformer encoder with the local dynamic features. This not only highlights the contribution of key temporal information to stage discrimination, but also preserves the original information through residual connection, preventing information loss during the extraction of key information and improving robustness in complex and non-stationary real-world baking scenarios. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A schematic flowchart of an embodiment of the tobacco curing stage identification method provided by the present invention; Figure 2 A schematic diagram of an embodiment of the tobacco curing stage identification model provided by the present invention; Figure 3 For the present invention Figure 1 A schematic diagram of an embodiment of step S101; Figure 4 A schematic diagram of an embodiment of the present invention for performing global dependency modeling on key information features to obtain global features; Figure 5 This invention provides a confusion matrix for identifying the tobacco curing stage. Figure 6 This is a schematic diagram of an embodiment of the tobacco curing stage identification system provided by the present invention. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0022] It should be understood that the illustrative drawings are not drawn to scale. The flowcharts used in this invention illustrate operations implemented according to some embodiments of the invention. It should be understood that the operations in the flowcharts may be implemented out of order, and steps without logical contextual relationships may be reversed or performed simultaneously. Furthermore, those skilled in the art, guided by the content of this invention, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor systems and / or microcontroller systems.

[0023] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0024] This invention provides a method and system for identifying the tobacco curing stage, which will be described below.

[0025] Figure 1 This is a schematic flowchart of an embodiment of the tobacco curing stage identification method provided by the present invention. Figure 2 A schematic diagram of an embodiment of the tobacco curing stage identification model provided by the present invention is shown below. Figure 1 and Figure 2 As shown, the methods for identifying the tobacco curing stage include: S101. Acquire multi-source time-series data collected during the tobacco curing process. The multi-source time-series data includes temperature, humidity, and tobacco leaf water loss rate. S102. Input the multi-source time series data into the trained tobacco curing stage recognition model and output the current curing stage.

[0026] It should be noted that the trained tobacco curing stage recognition model is a model that has been trained on a sample set and has passed verification and whose recognition performance meets the requirements.

[0027] The tobacco curing stage identification model includes: The Mamba sequential modeling module is used to extract local dynamic features from multi-source time series data. The adaptive dynamic gating fusion module is used to dynamically weight local dynamic features to obtain key information features; The Transformer encoder is used to perform global dependency modeling on key information features to obtain global features; The feature fusion module is used to fuse global features with local dynamic features to obtain fused features; A classifier is used to output the baking stage identification results based on the fused features.

[0028] It should be understood that the tobacco curing stage identification method in this embodiment of the invention can be implemented in any device based on the tobacco curing stage identification method, such as tobacco control equipment. Specifically, the tobacco curing stage identification method is stored in the aforementioned device as a pre-programmed program. When the device is started, the program is invoked, and the tobacco curing stage identification method is implemented.

[0029] Compared with existing technologies, the tobacco curing stage identification method provided in this invention extracts local dynamic features from time-series data through the Mamba sequence modeling module, capturing the instantaneous change patterns of temperature and humidity during the curing process; and performs global dependency modeling on key information through a Transformer encoder to characterize the long-range correlations between different time steps and different curing stages. In other words, this invention can identify tobacco curing stages based on local dynamic features and global features, enabling the classifier to simultaneously perceive the detailed fluctuations and overall evolutionary trends of the curing process, significantly improving the accuracy and stability of stage identification.

[0030] Furthermore, in this embodiment of the invention, an adaptive dynamic gating fusion module is set to dynamically weight and filter local dynamic features, thereby obtaining key information features and avoiding redundant information from entering the computationally intensive Transformer encoder. This reduces computational overhead while improving the model's sensitivity to key temporal features, thus improving the efficiency and accuracy of tobacco curing stage identification.

[0031] Furthermore, this embodiment of the invention sets up a feature fusion module to perform residual fusion of the global features output by the Transformer encoder with the local dynamic features. This not only highlights the contribution of key temporal information to stage discrimination, but also preserves the original information through residual connection, preventing information loss during the key information extraction process and improving robustness in complex and non-stationary real-world baking scenarios.

[0032] In practical applications, multi-source time-series data originates from dispersed systems such as sensors or manual records. These systems exhibit inconsistent data formats and varying quality, and lack a unified storage and management mechanism. This makes it difficult to efficiently obtain high-quality, standardized time-series data for subsequent model training and applications. Directly using unprocessed raw multi-source data for model training can negatively impact model accuracy due to issues such as data noise, missing values, and inconsistent units. Furthermore, the lack of hierarchical data storage methods makes it difficult to support the varying granularity requirements of different business scenarios (such as real-time monitoring, historical analysis, and model training).

[0033] To solve this technical problem, in some embodiments of the present invention, such as Figure 3 As shown, step S101 includes: S301. Construct a tobacco curing data warehouse based on MySQL. The data warehouse adopts a layered architecture, including the Operational Data Store (ODS), Data Warehouse Detail (DWD), Data Warehouse Service (DWS), and Application Data Store (ADS). S302. Collect multi-source raw data during the tobacco curing process and store the multi-source raw data to the operational data storage layer; S303. Clean and standardize the multi-source raw data in the operation data storage layer to generate detailed data, and store the detailed data in the data detail layer; S304. Perform light aggregation on the detailed data in the data detail layer according to the preset theme to generate service data, and store the service data in the data service layer; S305. Based on the identification requirements, extract service data from the data service layer, generate target data, and store the target data in the application data storage layer; S306. Extract multi-source time-series data from the application data storage layer.

[0034] This invention first stores multi-source raw data through the ODS layer, and then cleans and standardizes the multi-source data through the DWD layer, ensuring high quality and consistency of the time-series data input to the model, thereby improving the accuracy of subsequent stage identification from the source. Secondly, through light aggregation in the DWS layer and on-demand customization in the ADS layer, data and business scenarios are decoupled, satisfying the model's data extraction needs while avoiding redundant processing of underlying data, thus improving data utilization efficiency. Furthermore, the layered architecture ensures that the entire data chain from data acquisition to model input is traceable and reusable, providing stable and reliable data support for the tobacco curing stage identification model.

[0035] Furthermore, the layered architecture decouples data granularity from business scenarios. Specifically: the ODS layer stores multi-source raw data at its original granularity, meeting the needs of data traceability and raw record query; the DWD layer cleanses the data while maintaining fine granularity, supporting fine-grained historical data analysis; the DWS layer performs light aggregation according to preset topics to generate service data with medium granularity, meeting the needs of real-time monitoring scenarios for rapid query response; and the ADS layer customizes specific data according to requirements, meeting the granularity requirements of feature engineering for machine learning tasks.

[0036] It should be noted that the training process of the tobacco curing stage identification model also obtains data from the data warehouse. Therefore, step S305 also includes adding data labels to the target data so that the data stored in the data service layer is sample data carrying data labels, which facilitates direct model training.

[0037] In the process of tobacco curing data management based on data warehouse, data extraction, cleaning, transformation and loading (ETL) usually relies on manual operation or independent scheduled scripts, lacking a unified scheduling and management mechanism. This results in untimely data updates, high maintenance costs, and data quality being easily affected by human error. At the same time, various business systems (such as real-time monitoring platforms, historical data analysis systems, and model training services) need to directly access the databases at each layer of the data warehouse, resulting in high coupling between systems and inconsistent interfaces. When the database structure changes or new business systems need to be added, the data access logic needs to be repeatedly developed, resulting in poor scalability and maintainability.

[0038] To solve this technical problem, in some embodiments of the present invention, step S301 includes: Kettle's data integration tools are used to perform extraction, cleaning, transformation, and loading of multi-source raw data, and task scheduling is used to achieve automatic updates of the operational data storage layer, data detail layer, data service layer, and application data storage layer in the data warehouse. Integrate Kettle's scheduling tasks and data warehouse access interfaces under the Spring Boot framework to support automated calls to baking data by business systems.

[0039] This invention integrates the Kettle data integration tool with the Spring Boot framework to achieve automated data warehouse updates and unified data access for business systems. Specifically: First, by utilizing Kettle's ETL job and task scheduling mechanism, the cleansing, transformation, and loading processes from multi-source raw data to ODS, DWD, DWS, and ADS layers are automatically completed, ensuring timely and accurate data warehouse updates and significantly reducing manual intervention and maintenance costs. Second, by integrating Kettle scheduling tasks into the Spring Boot framework and encapsulating a unified data warehouse access interface, all business systems can obtain the required data through standardized APIs, achieving decoupling between data storage and business applications. When the data warehouse structure is adjusted or new business scenarios are added, only the internal implementation of the interface needs to be modified without altering the code of each business system, significantly improving the scalability, maintainability, and data service efficiency of the data warehouse.

[0040] In some embodiments of the present invention, such as Figure 2 As shown, the Mamba sequential modeling module includes multiple cascaded selective state space units, each of which includes cascaded selective state space blocks and root mean square normalization layers. Selective state-space blocks are used to perform state-space modeling on multi-source time-series data and extract initial local dynamic features. The root mean square normalization layer is used to normalize the initial local dynamic features to obtain the local dynamic features.

[0041] In a specific embodiment of the present invention, the Mamba sequential modeling module includes four cascaded selective state space units.

[0042] Specifically, the process of selective state space blocks is as follows: Suppose that the multivariate inputs collected at time step t during the tobacco curing process are: ; Where T t H t and D t These represent temperature, humidity, and tobacco leaf water loss rate, respectively.

[0043] First, a linear mapping layer maps the original input features to a unified model dimension d. model =128: ; H0 is then input to a sequential modeling module consisting of four cascaded selective state space blocks (MambaBlocks): ; The root mean square normalization layer focuses on modeling the local dynamic features and short-term temporal dependencies of parameter changes during tobacco curing. The resulting local dynamic features are as follows: ; In the formula, F t Let be the local dynamic feature at time step t.

[0044] The embodiments of the present invention can stabilize the training process and alleviate gradient fluctuations by normalizing the initial local dynamic features.

[0045] In some embodiments of the present invention, local dynamic features are dynamically weighted to obtain key information features, including: Calculate the attention weights among local features at different time steps; The key information features are obtained by weighting and aggregating local dynamic features based on attention weights.

[0046] The calculation process for attention weights is as follows: First, a feature correlation analysis is performed on the local dynamic features to calculate the correlation between local dynamic features at different time steps. The correlation calculation formula is as follows: ; In the formula, For the i-th time step and the local dynamic features at the j-th time step The correlation between them.

[0047] It should be noted that the correlation reflects the consistency of the state change trend at different baking times, providing a statistical basis for the generation of dynamic weights.

[0048] Secondly, an attention weight matrix is ​​constructed based on similarity. The local dynamic features are transformed using a learnable linear mapping matrix, and attention weights across time steps are generated using a non-linear activation function. Specifically, the attention weights are: ; In the formula, Local dynamic features at time step j Local dynamic features at the i-th time step Attention weights; , It is a learnable linear mapping matrix.

[0049] In a specific embodiment of the present invention, the key information features can be represented as follows: ; In the formula, These are key information features.

[0050] The adaptive dynamic gating fusion module of this invention dynamically generates gating weights by modeling the correlation between local dynamic features at different time steps, thereby enabling intelligent differentiation between key information and background information. This allows it to adaptively focus on time step features that are more critical to the current baking stage, while suppressing redundant or noisy information, thus improving the accuracy and efficiency of tobacco baking stage identification.

[0051] In specific embodiments of the present invention, such as Figure 2 As shown, the Transformer encoder is composed of a stacked first Transformer block and a second Transformer block, then as follows: Figure 4 As shown, global dependency modeling is performed on key information features to obtain global features, including: S401. Add location coding to the key information features to obtain location-coded features; S402. Input the position encoding features into the first Transformer block, and process them through a multi-head self-attention mechanism and a feedforward neural network to obtain the first intermediate features; S403. Input the first intermediate feature into the second Transformer block, and process it through a multi-head self-attention mechanism and a feedforward neural network to obtain the global feature.

[0052] In a specific embodiment of the present invention, the multi-head self-attention mechanism is an 8-head self-attention mechanism.

[0053] Specifically, in the Transformer encoder, the multi-head self-attention mechanism is used to capture the long-range dependencies between different time steps in the key information feature sequence. By computing in parallel with multiple attention heads, the intrinsic correlation patterns of time series data are learned from different representation subspaces, enabling the model to simultaneously focus on cross-time step interaction information in multiple dimensions such as temperature rise trends and humidity decrease rates. The feedforward neural network performs nonlinear transformations independently on each time step, and deeply processes and abstracts the features output by the attention layer through dimensionality increase-activation-dimensionality reduction operations, thereby enhancing the model's ability to express complex time series patterns.

[0054] The embodiments of the present invention, through the stacked structure of two Transformer blocks, can progressively extract temporal feature representations from local to global and from shallow to deep layers. While capturing the transfer patterns between different stages in the tobacco curing process, it also takes into account the dynamic change features within each stage, thereby effectively improving the accuracy and robustness of curing stage identification.

[0055] It should be noted that multi-head self-attention mechanism and feedforward neural network are conventional and mature structures of Transformer blocks, and are not specifically limited here.

[0056] In some embodiments of the present invention, the fusion feature is as follows: ; ; In the formula, Features of fusion; For global features; For gating weights; Key information features; To balance the hyperparameters of linear fusion and nonlinear residual information; It is a local dynamic feature; For residual calculation; This is for concatenation operations.

[0057] In some embodiments of the present invention, such as Figure 2 As shown, the classifier includes a multilayer perceptron and an activation function layer; Multilayer perceptrons are used to perform multilayer fully connected transformations on fused features to obtain classification features; The activation function layer is used to perform non-linear activation on the classification features and output the category of the tobacco curing stage.

[0058] Specifically, the activation function of the activation function layer is RuLU.

[0059] To avoid misjudgments due to abnormal fluctuations at individual time steps, which could lead to poor stability and accuracy of the recognition results, in some embodiments of the present invention, such as... Figure 2 As shown, the tobacco curing stage identification model also includes a global average pooling layer set between the feature fusion module and the classifier. The global average pooling layer is used to convert the fused features into a fixed-dimensional sequence-level representation.

[0060] This invention employs average pooling before classification to adapt to the input requirements of the classifier, while simultaneously extracting overall statistical features of the sequence by aggregating global information. Specifically, the fused feature sequence contains complete information from each time step after local modeling, gating, global dependency modeling, and residual fusion. Average pooling, by averaging the features across all time steps, effectively preserves the global trend and main components of the sequence, suppresses local fluctuations and noise interference, and enables the model to make stage-specific judgments based on comprehensive information from the entire baking process. This avoids misjudgments caused by abnormal fluctuations at individual time steps, thereby improving the stability and accuracy of the classification results.

[0061] To verify the effectiveness of the tobacco curing stage identification model proposed in this embodiment of the invention, the actual tobacco curing stage and the predicted tobacco curing stage based on the tobacco curing stage identification model are compared. The comparison results are as follows: Figure 5 As shown, Figure 5 The rows (Actual category) represent the actual baking stage of the sample (e.g., yellowing stage, color-fixing stage, dry rib stage, etc., displayed here as 1-10, a total of 10 stages). The columns (Predictive category) represent the baking stage predicted by the tobacco baking stage identification model. Diagonal elements, i.e., cells with the same row and column number (e.g., 82 in row 1, column 1), indicate the number of samples correctly predicted by the model. Larger numbers and darker colors (refer to the color bar on the right; around 80 corresponds to a darker color) indicate a higher accuracy rate for that stage. Off-diagonal elements represent the number of samples incorrectly predicted by the model. For example, 1 in row 1, column 2 indicates that one sample that was actually in stage 1 was incorrectly predicted as stage 2. Figure 5 It can be seen that: First, the values ​​on the diagonal (82, 78, 95, 97, 90, 92, 88, 85, 83, 81) are all significantly larger than other values ​​in the same row, and are the darkest in color, indicating that the tobacco curing stage identification model has a high accuracy rate in identifying all 10 curing stages. Second, looking at the distribution of values ​​on the off-diagonal, errors mainly occur between adjacent stages (e.g., two instances of misidentifying stage 2 as stage 3, and two instances of misidentifying stage 5 as stage 6). This aligns with the actual physical process of tobacco curing—there are transitional intervals between adjacent stages, the feature changes are continuous, and it is difficult for the human eye to precisely define the boundaries. The tobacco curing stage identification model controls misidentification within adjacent stages, indicating that it has learned the evolutionary patterns between stages, rather than making random guesses. Third, the figure does not show errors such as misidentifying stage 1 as stage 5 that span multiple stages (the cells on the far end of the off-diagonal are all 0 or blank), indicating that the model accurately grasps the temporal logic of the curing process—stages can only evolve towards adjacent stages and will not jump. This verifies the Transformer encoder's ability to model global dependencies and the adaptive dynamic gating fusion module's ability to filter key information. In other words, the tobacco curing stage identification model proposed in this embodiment of the invention has good predictive performance.

[0062] In summary, the tobacco curing stage identification method proposed in this invention: 1. By constructing a MySQL-based data warehouse, it achieves unified management and long-term storage of multi-source heterogeneous curing data, improving data quality and traceability. 2. Through the integration of Kettle and Spring Boot, it automates the data extraction, cleaning, and loading processes, reducing manual maintenance costs. 3. By fusing a hybrid deep learning model combining Mamba and Transformer, it simultaneously characterizes the local dynamic features and global evolutionary laws of the curing process, improving the accuracy and stability of curing stage identification. 4. It is applicable to complex and non-stationary real-world tobacco curing scenarios, possessing significant engineering application value and promising prospects for widespread adoption.

[0063] On the other hand, embodiments of the present invention also provide a tobacco curing stage identification system, such as... Figure 6 As shown, the tobacco curing stage identification system 600 includes: The multi-source time-series data acquisition unit 601 is used to acquire multi-source time-series data collected during the tobacco curing process. The multi-source time-series data includes temperature, humidity and tobacco leaf water loss rate. The tobacco curing stage identification unit 602 is used to input multi-source time-series data into the trained tobacco curing stage identification model and output the current curing stage. The tobacco curing stage identification model includes: The Mamba sequential modeling module is used to extract local dynamic features from multi-source time series data. The adaptive dynamic gating fusion module is used to dynamically weight local dynamic features to obtain key information features; The Transformer encoder is used to perform global dependency modeling on key information features to obtain global features; The feature fusion module is used to fuse global features with local dynamic features to obtain fused features; A classifier is used to output the baking stage identification results based on the fused features.

[0064] The tobacco curing stage identification system 600 provided in the above embodiments can realize the technical solutions described in the above tobacco curing stage identification method embodiments. The specific implementation principles of each module or unit can be found in the corresponding content in the above tobacco curing stage identification method embodiments, and will not be repeated here.

[0065] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0066] The present invention has provided a detailed description of a method and system for identifying the tobacco curing stage. Specific examples have been used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the idea of ​​the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for identifying the tobacco leaf curing stage, characterized in that, include: Acquire multi-source time-series data collected during the tobacco curing process, including temperature, humidity, and tobacco leaf water loss rate; The multi-source time-series data is input into the trained tobacco curing stage recognition model, and the current curing stage is output. The tobacco curing stage identification model includes: The Mamba sequential modeling module is used to extract local dynamic features from the multi-source time-series data. An adaptive dynamic gating fusion module is used to dynamically weight the local dynamic features to obtain key information features; A Transformer encoder is used to perform global dependency modeling on the key information features to obtain global features; The feature fusion module is used to fuse the global features with the local dynamic features to obtain fused features; A classifier is used to output the baking stage identification result based on the fused features.

2. The method for identifying the tobacco curing stage according to claim 1, characterized in that, The acquisition of multi-source time-series data collected during the tobacco curing process includes: A tobacco leaf curing data warehouse is built based on MySQL. The data warehouse adopts a layered architecture, including an operational data storage layer, a data detail layer, a data service layer, and an application data storage layer. Collect multi-source raw data during the tobacco curing process and store the multi-source raw data in the operational data storage layer; The multi-source raw data in the operational data storage layer is cleaned and standardized to generate detailed data, and the detailed data is stored in the data detail layer. The detailed data in the data detail layer is lightly aggregated according to a preset theme to generate service data, and the service data is stored in the data service layer. Based on the identification requirements, the service data is extracted from the data service layer to generate target data, and the target data is stored in the application data storage layer. The multi-source time-series data is extracted from the application data storage layer.

3. The method for identifying the tobacco curing stage according to claim 2, characterized in that, The data warehouse for tobacco curing built based on MySQL includes: The Kettle data integration tool is used to perform extraction, cleaning, transformation and loading of the multi-source raw data, and the operation data storage layer, data detail layer, data service layer and application data storage layer in the data warehouse are automatically updated through task scheduling; Integrate the Kettle scheduling task and the data warehouse access interface under the Spring Boot framework to support the business system's automated invocation of baking data.

4. The method for identifying the tobacco curing stage according to claim 1, characterized in that, The Mamba sequential modeling module includes multiple cascaded selective state space units, each of which includes a cascaded selective state space block and a root mean square normalization layer. The selective state space block is used to perform state space modeling on the multi-source time series data and extract initial local dynamic features. The root mean square normalization layer is used to normalize the initial local dynamic features to obtain the local dynamic features.

5. The method for identifying the tobacco curing stage according to claim 1, characterized in that, The local dynamic features are dynamically weighted to obtain key information features, including: Calculate the attention weights among local features at different time steps; The key information features are obtained by weighting and aggregating the local dynamic features according to the attention weights.

6. The method for identifying the tobacco curing stage according to claim 5, characterized in that, The attention weights are: In the formula, Local dynamic features at time step j Local dynamic features at the i-th time step Attention weights; , It is a learnable linear mapping matrix.

7. The method for identifying the tobacco curing stage according to claim 1, characterized in that, The Transformer encoder is composed of a stacked first Transformer block and a second Transformer block. It performs global dependency modeling on the key information features to obtain global features, including: Add positional encoding to the key information features to obtain positional encoded features; The location-encoded features are input into the first Transformer block, and processed by a multi-head self-attention mechanism and a feedforward neural network to obtain the first intermediate features; The first intermediate feature is input into the second Transformer block, and after processing by a multi-head self-attention mechanism and a feedforward neural network, the global feature is obtained.

8. The method for identifying the tobacco curing stage according to claim 1, characterized in that, The fusion feature is: In the formula, Features of fusion; For global features; For gating weights; Key information features; To balance the hyperparameters of linear fusion and nonlinear residual information; It is a local dynamic feature; For residual calculation; This is for concatenation operations.

9. The method for identifying the tobacco curing stage according to claim 1, characterized in that, The classifier includes a multilayer perceptron and an activation function layer; The multilayer perceptron is used to perform multilayer fully connected transformation on the fused features to obtain classification features; The activation function layer is used to perform non-linear activation on the classification features and output the tobacco curing stage category.

10. A tobacco leaf curing stage identification system, characterized in that, include: A multi-source time-series data acquisition unit is used to acquire multi-source time-series data collected during the tobacco curing process, wherein the multi-source time-series data includes temperature, humidity and tobacco leaf water loss rate; The tobacco curing stage identification unit is used to input the multi-source time-series data into the trained tobacco curing stage identification model and output the current curing stage. The tobacco curing stage identification model includes: The Mamba sequential modeling module is used to extract local dynamic features from the multi-source time-series data. An adaptive dynamic gating fusion module is used to dynamically weight the local dynamic features to obtain key information features; A Transformer encoder is used to perform global dependency modeling on the key information features to obtain global features; The feature fusion module is used to fuse the global features with the local dynamic features to obtain fused features; A classifier is used to output the baking stage identification result based on the fused features.