Deep learning-based tobacco leaf producing area detection method and device, medium and equipment
By combining sensor technology and deep learning algorithms, noise reduction and origin detection of tobacco leaf signals are achieved, which solves the problems of low efficiency and strong subjectivity in the existing technology, and improves the accuracy and efficiency of tobacco leaf source detection.
Patent Information
- Application Number
- CN202510100680.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-06-20
AI Technical Summary
The existing technology has problems such as low efficiency, strong subjectivity, expensive equipment, complex operation and difficult to pass on quickly when distinguishing flue-cured tobacco production areas, which affects the production progress, product stability and market competitiveness.
By combining sensor technology with deep learning algorithms, the tobacco leaf signal information collected by the preset sensor array is obtained, noise reduction processing is performed, and the origin detection is carried out based on the trained deep learning model, so as to achieve rapid and accurate identification of the tobacco leaf production.
It improves the accuracy and efficiency of tobacco leaf production area detection, reduces the interference of human factors, and achieves rapid and accurate identification of tobacco leaf production area.
Smart Images

Figure CN120180209A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of tobacco leaf origin detection. Specifically, it relates to a method, device, medium and equipment for tobacco leaf origin detection based on deep learning. Background Art
[0002] With the continuous development of the tobacco industry, flue-cured tobacco, as an important cash crop, shows significant differences in quality, flavor and chemical composition due to origin differences. Scientifically and accurately distinguishing the origin of flue-cured tobacco is of great significance for optimizing production standards, improving product consistency and meeting market demands. The unique aroma and taste of tobacco leaves from different origins are crucial for product quality and affect the competitiveness of end products.
[0003] Currently, methods for distinguishing the origin of flue-cured tobacco include sensory evaluation, physical and chemical analysis, isotope tracing, near-infrared spectroscopy and gas chromatography-mass spectrometry, etc. Although these methods can achieve a certain degree of origin differentiation, they each have many limitations. For example, physical and chemical analysis and isotope tracing require complex sample preparation and expensive equipment, and the process is cumbersome and time-consuming; near-infrared spectroscopy equipment is complex to operate and difficult to quickly detect in actual production; gas chromatography-mass spectrometry has high precision, but the instrument is expensive and cannot be widely applied to on-site detection. In addition, the differentiation of the origin of flue-cured tobacco in enterprises still relies on the manual inspection of experts. Although experts determine the origin of tobacco leaves based on experience combined with sensory evaluation, this method is inefficient, subjective and difficult to quickly inherit. Especially during the peak production period, it affects the production progress, and the results are not consistent enough, affecting the stability and market competitiveness of products. Summary of the Invention
[0004] The embodiments of the present disclosure at least provide a method, device, medium and equipment for tobacco leaf origin detection based on deep learning. By combining sensor technology and deep learning algorithms, the detection of tobacco leaf origin is realized, which not only improves the accuracy and efficiency of tobacco leaf origin detection, but also reduces the interference of human factors, and realizes the rapid and accurate identification of tobacco leaf origin.
[0005] The embodiments of the present disclosure provide a method for tobacco leaf origin detection based on deep learning, including:
[0006] Obtaining the tobacco leaf signal information collected by a preset sensor array; and performing noise reduction processing on the tobacco leaf signal information to obtain the tobacco leaf signal to be detected;
[0007] Performing origin detection on the tobacco leaf signal to be detected based on a trained deep learning model to obtain the target tobacco leaf origin corresponding to the tobacco leaf signal to be detected.
[0008] The embodiments of the present disclosure provide a device for tobacco leaf origin detection based on deep learning, including:
[0009] An information acquisition module, configured to acquire tobacco leaf signal information collected by a preset sensor array; and perform noise reduction processing on the tobacco leaf signal information to obtain a to-be-detected tobacco leaf signal;
[0010] A place of origin detection module, configured to perform place of origin detection on the to-be-detected tobacco leaf signal based on a trained deep learning model to obtain a target tobacco leaf place of origin corresponding to the to-be-detected tobacco leaf signal.
[0011] An embodiment of the present disclosure provides a computer device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device runs, the processor communicates with the memory through the bus. When the machine-readable instructions are executed by the processor, the method for detecting the place of origin of tobacco leaves based on deep learning as described in any of the above possible implementation manners is executed.
[0012] An embodiment of the present disclosure provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is run by a processor, the method for detecting the place of origin of tobacco leaves based on deep learning as described in any of the above possible implementation manners is implemented.
[0013] In the method, device, medium, and equipment for detecting the place of origin of tobacco leaves based on deep learning provided in the embodiments of the present disclosure, since the place of origin of tobacco leaves is realized by combining sensor technology and deep learning algorithms, and the arrangement mode of sensors is confirmed by simulating the airflow distribution under different sensor arrangement schemes based on a plurality of sensor devices in a sensor chamber through a fluid dynamics model and preset initial conditions; and the deep learning model is obtained by replacing the LSTM module with an xLSTM module on the basis of building an initial model and training with a training data set and a validation data set. In this way, by combining the signals collected by the optimized sensor array and the trained deep learning model, the detection of the place of origin of tobacco leaves can be realized, which not only improves the accuracy and efficiency of the detection of the place of origin of tobacco leaves, but also reduces the interference of human factors, and realizes the rapid and accurate identification of the place of origin of tobacco leaves.
[0014] To make the above objects, features, and advantages of the present disclosure more obvious and understandable, the following specifically enumerates preferred embodiments and, in conjunction with the accompanying drawings, makes a detailed description as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] To more clearly illustrate the technical solutions of the embodiments of the present disclosure, the accompanying drawings required to be cited in the embodiments will be briefly introduced below. The accompanying drawings herein are incorporated into the specification and form a part of this specification. These accompanying drawings show embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following accompanying drawings only show some embodiments of the present disclosure and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related accompanying drawings can be obtained based on these accompanying drawings without creative efforts.
[0016] Figure 1 Shows a flowchart of a tobacco leaf origin detection method based on deep learning provided by an embodiment of the present disclosure;
[0017] Figure 2 Shows a flowchart of a method for determining a preset sensor array provided by an embodiment of the present disclosure;
[0018] Figure 3 Shows a schematic diagram of a signal double noise reduction process provided by an embodiment of the present disclosure;
[0019] Figure 4 Shows a flowchart of a deep learning model training method provided by an embodiment of the present disclosure;
[0020] Figure 5 Shows a flowchart of a data prediction method provided by an embodiment of the present disclosure;
[0021] Figure 6 Shows a schematic structural diagram of a tobacco leaf origin detection device based on deep learning provided by an embodiment of the present disclosure;
[0022] Figure 7 Shows a schematic structural diagram of another tobacco leaf origin detection device based on deep learning provided by an embodiment of the present disclosure;
[0023] Figure 8 Shows a schematic structural diagram of a computer device provided by an embodiment of the present disclosure. Detailed implementation manners
[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are only a part rather than all of the embodiments of the present disclosure. Components of the embodiments of the present disclosure usually described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed present disclosure, but merely represents selected embodiments of the present disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of the present disclosure without creative efforts fall within the scope of protection of the present disclosure.
[0025] It should be noted that like reference numerals and letters denote like items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0026] As used herein, the term "and / or" merely describes an association relationship and indicates that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" as used herein means any one of a plurality or any combination of at least two of a plurality. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set composed of A, B, and C.
[0027] With the continuous development of the tobacco industry, flue-cured tobacco, as an important cash crop, exhibits significant differences in quality, flavor, and chemical composition due to different production areas. Scientifically and accurately distinguishing the production areas of flue-cured tobacco is of great significance for optimizing the production standards of tobacco products, improving product consistency, and meeting market demands.
[0028] It has been found through research that there are various methods for distinguishing the production areas of flue-cured tobacco. Common methods include sensory evaluation, physicochemical analysis, isotope tracing, near-infrared spectroscopy, and gas chromatography-mass spectrometry. Although these methods can achieve a certain degree of production area differentiation, there are also many limitations, such as complex sample preparation, expensive detection equipment, cumbersome sample pretreatment steps, insufficient analysis accuracy, slow response speed, or single function.
[0029] Meanwhile, in enterprise production, the distinction of the origin and grade of tobacco leaves still mainly relies on manual inspection by experts. Through long-term accumulated experience, experts combine sensory evaluation and simple physical and chemical indicators to determine the origin and grade of tobacco leaves. Although this method has a certain degree of reliability and applicability, there are significant efficiency bottlenecks in actual production. On the one hand, manual inspection usually takes a long time and is difficult to meet the needs of large-scale detection; on the other hand, the number of experts is limited, and their experience is difficult to quickly inherit and promote. This manual-dependent method is particularly prominent during the peak period of tobacco leaf processing, resulting in a significant slowdown in the production progress of enterprises. In addition, manual inspection may have a certain degree of subjectivity and errors, resulting in inconsistent determination results for tobacco leaves of the same origin or grade, affecting the stability and market competitiveness of products.
[0030] Based on the above research, in the embodiments of the present disclosure, a method, device, medium, and equipment for detecting the origin of tobacco leaves based on deep learning are provided. Specifically: First, obtain the tobacco leaf signal information collected by a preset sensor array; and perform noise reduction processing on the tobacco leaf signal information to obtain the tobacco leaf signal to be detected; perform origin detection on the tobacco leaf signal to be detected based on a trained deep learning model to obtain the target origin of the tobacco leaf signal corresponding to the tobacco leaf signal to be detected. By combining sensor technology and deep learning algorithms in this embodiment to achieve the detection of the origin of tobacco leaves, not only the accuracy and efficiency of the origin detection of tobacco leaves are improved, but also the interference of human factors is reduced, realizing the rapid and accurate identification of the origin of tobacco leaves.
[0031] To facilitate the understanding of this embodiment, the execution subject of the method for detecting the origin of tobacco leaves based on deep learning provided by the embodiments of the present disclosure is first introduced in detail. The execution subject of the method for detecting the origin of tobacco leaves based on deep learning provided by the embodiments of the present disclosure is a computer device. This computer device can be a server. Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, big data, and artificial intelligence platforms.
[0032] The following will describe in detail the method for detecting the origin of tobacco leaves based on deep learning provided by the embodiments of the present application with reference to the accompanying drawings. Refer to Figure 1 As shown, it is a flowchart of a method for detecting the origin of tobacco leaves based on deep learning provided by the embodiments of the present disclosure. The method for detecting the origin of tobacco leaves based on deep learning includes the following S101 - S102:
[0033] S101, obtain the tobacco leaf signal information collected by a preset sensor array; and perform noise reduction processing on the tobacco leaf signal information to obtain the tobacco leaf signal to be detected.
[0034] It is understandable that a sensor array refers to a system composed of multiple sensors. These sensors collect the physical or chemical properties of tobacco leaves through different measurement methods (such as spectroscopy, odor, electrical signals, etc.). Different sensors can work simultaneously or sequentially to collect information about tobacco leaves from multiple dimensions. Here, the tobacco leaf signal information can include the chemical composition content of tobacco leaves, physical properties (such as thickness, density), and electrical or optical signals converted from other minor differences that may reflect the characteristics of the origin.
[0035] Exemplarily, with reference to Figure 2 as shown, the preset sensor array is obtained through the following steps S201 - S204:
[0036] S201, determine multiple sensor arrangement schemes based on the sensor chamber and multiple sensor devices in the sensor chamber.
[0037] Here, the sensor chamber refers to an enclosed or semi - enclosed space specifically designed to accommodate and support multiple sensor devices, ensuring that the sensors can stably and accurately collect the signal information of the target object (i.e., tobacco leaves) without being interfered by the outside world. Here, Solid works software can be used to perform three - dimensional modeling of the sensor chamber, design and draw the optimal model of the sensor chamber, export the three - dimensional drawing of the model as a *.x_t or *.step compatible file, and import it into the ANSYS Fluent software.
[0038] Among them, the types of sensor devices can include spectral sensors (used to measure the spectral characteristics of tobacco leaves, such as reflectivity or absorptivity, to infer its chemical composition), odor sensors (used to detect volatile compounds released by tobacco leaves), electrical sensors (such as resistance or capacitance sensors, used to measure the physical properties of tobacco leaves such as humidity or density), etc. Different sensors in the sensor chamber can work simultaneously or sequentially to collect detailed information about tobacco leaves from multiple dimensions. For the multiple sensor devices in the sensor chamber, considering the interaction between sensors in the chamber, the effective utilization of the space in the chamber, and the potential impact of air flow on sensor measurement, multiple sensor arrangement schemes are determined. Each sensor arrangement scheme includes a sensor array for the arrangement of multiple sensors. Among them, each scheme can maximize the coverage range of the sensors through a specific arrangement method, that is, ensure that every corner in the chamber can be effectively monitored by at least one sensor, while improving the measurement accuracy and reducing the interference of errors and noise.
[0039] In some other embodiments, each sensor arrangement scheme can also include multiple groups of sensor arrays for the arrangement of the multiple sensors, which are not specifically limited here.
[0040] S202. For each of the sensor arrangement schemes, based on the hydrodynamic model and preset initial conditions, simulate the airflow distribution in the sensor air chamber of the sensor arrangement scheme to obtain an airflow simulation result.
[0041] It can be understood that in order to evaluate the actual effects of these sensor arrangement schemes, professional fluid simulation software such as ANSYS Fluent or COMSOL Multiphysics can be used to act as the hydrodynamic model. During the simulation process, corresponding initial conditions such as the inlet flow rate, outlet pressure, temperature, and humidity also need to be set according to the characteristics of the detection instrument itself to ensure that the detected simulation environment is as close as possible to the actual use environment and calculate the distribution of the airflow in the flow field.
[0042] In the present disclosure, when simulating the actual situation, the preset initial conditions are set to conditions such as an inlet flow rate of 800 ml / min and an outlet pressure of 1 MPa, aiming to simulate the airflow and pressure conditions that the sensor may encounter in the actual working environment, so as to achieve an accurate simulation and calculation of the distribution of the gas in the flow field.
[0043] Specifically, the hydrodynamic model will simulate the airflow distribution in the air chamber based on the preset initial conditions (such as airflow velocity, temperature, humidity, etc.). The airflow simulation result will provide a series of key indicators, including the airflow concentration difference (i.e., the difference in the volatile concentration detected by the sensor at different positions), the airflow concentration concentration value (i.e., the concentration of the volatile in the air chamber), the airflow coverage (i.e., the size of the area effectively detected by the sensor), and the sensitivity value of the sensor device (the response sensitivity of the sensor to the volatile). Here, for each sensor arrangement scheme, after using the hydrodynamic model and preset initial conditions to simulate and obtain the airflow simulation result, each airflow simulation result is saved (it can be saved in the.csv format). At the same time, the extracted airflow simulation result can be further processed, the data is cleaned to remove invalid and abnormal data points, and the sensor data is associated with the fluid data, and the sensor number corresponding to the position data.
[0044] In some other embodiments, the airflow simulation result may also include an airflow velocity vector diagram (intuitively showing the flow velocity and direction of the airflow in each direction), the eddy current and turbulence intensity (evaluating the instability and mixing degree in the airflow), the temperature gradient distribution (reflecting the temperature difference at different positions in the air chamber), the humidity distribution uniformity (ensuring the consistency of the humidity conditions in the air chamber), and the airflow stability analysis (evaluating the fluctuation of the airflow during long-term operation), etc., which are not specifically limited herein.
[0045] S203. Construct a sensor arrangement objective function and a sensor fitness objective function.
[0046] Here, considering the environment in the sensor chamber and the optimal position of the sensor device, a corresponding objective function is designed to determine the concentration difference, concentration concentration value, coverage range, and sensitivity value in the gas chamber as the main characteristic values. Among them, the objective function can be expressed as:
[0047]
[0048] Among them, ω1, ω2, ω3, ω4 represent weight factors, which need to be assigned according to the application environment; C var represents the airflow concentration difference in the sensor chamber; represents the maximum airflow concentration in the sensor chamber; C cen represents the airflow concentration concentration value in the sensor chamber; represents the maximum airflow concentration concentration value in the sensor chamber; A cov represents the airflow coverage range in the sensor chamber; represents the maximum airflow coverage range in the sensor chamber; S sen represents the sensitivity value of the sensor device in the sensor chamber; represents the maximum sensitivity value of the sensor device in the sensor chamber.
[0049] Among them, C i is the concentration at the i-th sensor position, is the average value of the concentrations at all sensor positions; N is the number of sensors; A i is the coverage range of the i-th sensor; s i is the sensitivity value of the i-th sensor.
[0050] Here, the positions of the sensors are encoded in real numbers. A new area is defined for the sensor positions, and the position of each sensor is represented by a pair of real numbers (x, y). Then, a set of codes is randomly generated using the coding mechanism. For each sensor layout scheme, fluid data.csv files are extracted from the hydrodynamic model according to the layout positions. Then, the fitness value of each sensor layout scheme is calculated using the sensor fitness objective function. Among them, the sensor fitness objective function can be expressed as:
[0051] F(x) = ω1·F var (x) + ω2·F cen (x) + ω3·F cov (x) + ω4·F sen (x);
[0052] Among them, F var(x) represents the characteristic of the airflow concentration difference in the sensor chamber; F cen (x) represents the characteristic of the airflow concentration central value in the sensor chamber; F cov (x) represents the characteristic of the airflow coverage range in the sensor chamber; F sen (x) represents the characteristic of the sensitive value of the sensor device in the sensor chamber.
[0053] S204. Based on the sensor layout objective function, the sensor fitness objective function, and the airflow simulation results corresponding to each sensor layout scheme, determine the target sensor layout scheme, and use the sensor array corresponding to the target sensor layout scheme as the preset sensor array.
[0054] Exemplarily, when determining the target sensor layout scheme, the present disclosure utilizes a genetic algorithm and adopts 12 groups of sensor arrays as initial candidates. Each group of arrays represents a specific set of sensor position coordinates (x, y, z), and these coordinates define the three-dimensional spatial position of the sensors in the sensor chamber. Among them, the genetic algorithm is a search algorithm that simulates natural selection and genetic mechanisms. It continuously iteratively optimizes the individuals in the population by simulating operations such as selection, crossover (hybridization), and mutation during the biological evolution process, thereby finding an approximate optimal solution. In the application scenario of the present disclosure, we regard each group of sensor arrays as an "individual", and all possible sensor position configurations constitute a huge "population".
[0055] Specifically, to initiate the genetic algorithm, the present disclosure first creates an initial population containing multiple random positions. These random positions represent the preliminary layout of the sensors in the chamber, and they form the starting point for the algorithm's search. Subsequently, these individuals are evaluated based on the above-mentioned constructed sensor layout objective function and sensor fitness objective function. During the iterative process of the genetic algorithm, the algorithm will continuously select individuals with higher fitness as parents, generate new offspring individuals through crossover operations, and will also perform mutation operations on the offspring individuals with a certain probability to increase the diversity of the population. In this way, as the number of iterations increases, the individuals in the population will gradually approach the optimal solution, that is, the best sensor array layout scheme. Finally, when the algorithm reaches the predetermined number of iterations or finds an individual that meets specific conditions, the present disclosure will select the individual with the highest fitness as the optimal solution, that is, determine the best sensor array layout scheme (i.e., the target sensor layout scheme). In this way, it is possible to maximize the coverage range of the sensors, improve the measurement accuracy, and reduce the interference of errors and noise, thereby providing stable and reliable data support for subsequent tobacco leaf signal information acquisition.
[0056] Among them, according to the characteristic F of the volatile concentration difference in the sensor chamber var(x), the optimal sensor location is chosen as the one with the smallest concentration difference in the gas chamber According to the characteristic F of the concentration value in the sensor gas chamber cen (x) The concentration concentration position in the gas chamber is selected as the optimal sensor location According to the characteristics of the sensor coverage in the sensor chamber F cov (x) The best choice is to maximize the coverage of the sensor According to the characteristic F of the sensitive value range of the selected sensor in the sensor array sen (x), the selected sensor can achieve the optimal sensor position
[0057] After determining the target sensor arrangement scheme (i.e., the optimal sensor array arrangement scheme), the purchased multiple gas metal oxide sensors are placed in the sensor array. At the same time, the arrangement positions of the sensors meet the optimized optimal sensor arrangement. The sensor array is used to collect signals of volatile substances and convert the collected data signals into digital signals.
[0058] It is understandable that in practical applications, tobacco leaf signals are often interfered by various noises during collection and transmission. These noises may come from environmental noise, errors in the equipment itself, or distortion in signal transmission, which seriously affects the subsequent analysis and judgment of tobacco leaf quality. Therefore, in order to improve the accuracy and reliability of tobacco leaf signal processing, the present disclosure proposes a dual noise reduction method to reduce the noise of the collected tobacco leaf signal information. Figure 3 As shown in the figure, the dual denoising method includes two levels: coarse-grained denoising and fine-grained denoising, which aims to gradually eliminate noise and improve the purity of the signal through different levels of processing methods. As the first layer of processing, the main purpose of coarse-grained denoising is to quickly remove those noise components with large amplitudes and significant impact on the signal; fine-grained denoising focuses more on removing subtle noise in the signal while maintaining the original characteristics of the signal as much as possible. The specific steps may include the following (1) to (3):
[0059] (1) performing coarse-grained denoising processing on the tobacco leaf signal information based on a median filtering method to obtain a first tobacco leaf signal to be detected;
[0060] (2) fusing the tobacco leaf signal information with the first tobacco leaf signal to be detected to obtain a second tobacco leaf signal to be detected;
[0061] (3) Performing fine-grained denoising processing on the second tobacco leaf signal to be detected based on a Kalman filtering method to obtain the tobacco leaf signal to be detected.
[0062] Specifically, in the coarse-grained denoising process, an efficient algorithm with relatively low computational complexity, such as the median filtering method, is adopted to preliminarily process the tobacco leaf signal information. Median filtering replaces the signal value at the center point by taking the median of the signal values within a local window, which can effectively remove impulse noise, salt-and-pepper noise, etc., thereby obtaining the first tobacco leaf signal to be detected. Here, in order to retain more features of the source data, the present disclosure uses a 5×5 filtering window and slides the window backward starting from the first point of the data. Each time it slides, the number of data points covered by the window is equal to the size of the window. When the window moves to a certain position of the data and covers it, all the data points within the window are extracted, and the data with large abnormal changes are excluded through the median method and overwritten on the original data. In addition, after coarse-grained denoising, the data after coarse-grained denoising can also be selected for its signal data, and the part that did not respond during the cleaning stage of the sensor during the acquisition process is cut off.
[0063] Immediately afterwards, in order to further optimize the denoising effect and retain more signal details, the dual denoising method enters the fine-grained denoising stage. First, the original tobacco leaf signal information is fused with the first tobacco leaf signal to be detected after coarse-grained denoising. This fusion operation can be achieved through weighted averaging or other appropriate signal processing techniques, aiming to combine the advantages of both, removing most of the noise while retaining the integrity of the signal. The fused signal is the second tobacco leaf signal to be detected, which serves as the input for fine-grained denoising. In this stage, the Kalman filtering method is used. This is a recursive filter based on the state space model, which can dynamically adjust the noise components in the signal through two steps of prediction and update according to the estimated value at the previous moment and the observed value at the current moment, achieving a more refined denoising process. Finally, the second tobacco leaf signal to be detected after being processed by the Kalman filtering method is the required tobacco leaf signal to be detected. This signal not only removes most of the noise but also retains the key features of the tobacco leaf signal, providing a more accurate and reliable data basis for subsequent signal analysis and tobacco leaf quality assessment.
[0064] Specifically, when performing fine-grained denoising on the data, the state equation and the observation equation can be modeled and established. The state equation can be expressed as:
[0065] x k =F k x k-1 +B k u k +w k ;
[0066] Wherein, x k is the state vector of the system at the moment; F k is the state transition matrix; B k is the control input matrix; u kis the control vector; w k is the process noise, which is usually assumed to be zero-mean Gaussian white noise with covariance Q k .
[0067] The observation equation can be expressed as:
[0068] z k = H k x k + v k ;
[0069] where z k is the observation vector at time step k; H k is the observation matrix; v k is the observation noise with covariance R k .
[0070] At the start of filtering, the covariance matrix and the initial state vector are initialized. At each time step, a prediction is made to predict the state at the next time step, state prediction; covariance prediction x k|k-1 = F k x k-1|k-1 + B k u k . After obtaining the new predicted data and then comparing it with the pre-processed data, the prediction result is corrected. In the Kalman gain, the measurement data is incorporated into the current estimated state to update the state x k|k = x k|k-1 + k k (z k - H k x k|k-1 ); update the covariance matrix P k|k = (I - K k H k )P k|k-1 . The current data prediction value is obtained by updating the estimated value, fed back into the data to obtain the current confidence level, and updated according to the confidence level
[0071] Meanwhile, the wavelet transform is used to extract the time domain, frequency domain, and time-frequency domain in the data, facilitating subsequent classification based on their characteristic information. Since different sensors have different voltage responses to the same substance, it is necessary to standardize the voltage signals. Part of the data is transformed into forms such as histograms and Q-Q plots to determine whether it satisfies the normal distribution. For the extremes in the data, through data transformation methods, it is made to satisfy the normal distribution. Using the formula the data is centered and scaled, transformed into a process with zero mean 0 and standard deviation 1, where x is the original data point; μ is the mean of the data; σ is the standard deviation of the data; x′ is the standardized data point. Then the standardized data is normalized using the formula Scale the data to the interval [0, 1], where x′ is the standardized data point; min(x′) is the minimum value of the standardized data; max(x′) is the maximum value of the standardized data; x″ is the finally normalized data point.
[0072] S102, perform origin detection on the to-be-detected tobacco leaf signal based on the trained deep learning model to obtain the target tobacco leaf origin corresponding to the to-be-detected tobacco leaf signal.
[0073] It can be understood that after obtaining the to-be-detected tobacco leaf signal, origin detection can be performed on it based on the trained deep learning model to obtain the target tobacco leaf origin corresponding to the to-be-detected tobacco leaf signal.
[0074] Exemplarily, referring to Figure 4 As shown, it is a flowchart of a deep learning model training method provided by an embodiment of the present disclosure, including the following S401 to S404:
[0075] S401, construct an initial deep learning model.
[0076] Here, the initial deep learning model includes a local feature extraction module, an LSTM module, and a data prediction module; the local feature extraction module is responsible for extracting key local feature information from the input tobacco leaf signal, the LSTM module further learns and memorizes this feature information using its powerful sequence processing ability, and the data prediction module makes a prediction on the origin of the tobacco leaf based on the processing results of the previous two.
[0077] S402, replace the LSTM module of the initial deep learning model with an xLSTM module to obtain a deep learning model to be trained.
[0078] It can be understood that in order to further improve the performance of the model, the present disclosure replaces the LSTM module with an xLSTM module. LSTM (Long Short-Term Memory Network) includes an input gate, a forget gate, an output gate, and a key part of the cell state, while xLSTM, as a variant of the LSTM model, introduces a gating mechanism with a new exponential activation function to replace the traditional sigmoid gating; in the gating calculation, the maximum value recording method is used to ensure data normalization and stabilization technology; a new memory structure is introduced, sLSTM (Single Memory Architecture) mixes scalar memory, scalar updates, and new memory, mLSTM (Matrix Memory) is fully parallelizable, with matrix memory and covariance update rules; the improved LSTM unit is integrated into the residual block, and the residual blocks are further stacked to form a complete network architecture, making it more robust and adaptable when processing complex and variable tobacco leaf signals.
[0079] Here, in the present disclosure, a novel exponential activation function gating is used to replace the sigmoid gating. where α is a hyperparameter used to control the steepness of the function; g(x) is the exponential activation function. The exponential activation function not only provides information filtering capabilities but also effectively manages the flow of information through the forget gate, input gate, and output gate, enabling the model to remain efficient and accurate when processing long sequence data. At the same time, the improved LSTM units are integrated into the residual blocks, such as the sLSTM residual block and the mLSTM residual block. In the sLSTM residual block, the scalar memory records the memory state at the current time step, c t = c t-1 + u t , where c t is the scalar memory at the current time step, c t-1 is the scalar memory at the previous time step, and μ t is the scalar update. The internal scalar is continuously updated with the input of data and the time step, u t = g(W u · [h t-1 , x t + b u ), where μ t is the scalar update; w u is the weight matrix; h t-1 is the hidden state at the previous time step; x t is the input at the current time step; b u is the bias term; g(x) is the exponential activation function. A new internal mixing mechanism is added to combine the current data input and the hidden state at the previous time step to generate a new state where is the new memory mixing, W c is the weight matrix, b c is the bias term, tanh is the hyperbolic tangent activation function, and the state update of the data is composed of the scalar memory, scalar update, and memory mixing. The hidden state is continuously updated according to the data accuracy h t = tanh(c t ), which is the hidden state at the current time step. The mLSTM residual block adds matrix units to enhance the management of data information, and improves the performance in terms of optimization calculation of the slope, response, peak area, and wave peak and other characteristic information of the collected data through the forget gate, input gate, and output gate. Specifically, in the forget gate f t = g(W f · [h t-1 , x t + b f ), input gate i t = g(W i · [h t-1 , xt +b i ) and the output gate o t = g(W o ·[h t-1 , x t +b o ), the characteristic information of data acquisition, with the help of the forget gate and the output gate, assists the memory unit to update in real time M t-1 is the matrix memory unit at the current time step; f t is the matrix memory unit at the previous time step; i t is the output of the forget gate; is the output of the input gate; is the candidate value of the new matrix memory, and the calculation formula is At the same time, continuously update the hidden state h t = o t ⊙tanh(M t ), h t is the hidden state at the current time step.
[0080] S403. Obtain the training data set and the validation data set.
[0081] Here, the training data set includes multiple training data, and the validation data set includes the validation data corresponding to each training data; these data sets contain a large number of tobacco leaf signals from different origins and their corresponding origin labels. The training data set is used for the learning process of the model, while the validation data set is used to evaluate the performance of the model during the training process to ensure that the model can accurately and stably identify the origin of the tobacco leaves.
[0082] Exemplarily, to ensure the quality of the training data set and the validation data set, the training data set and the validation data set can also be obtained by processing through the denoising method mentioned in step S101 to improve the clarity and accuracy of the signals and enhance the generalization ability of the model.
[0083] S404. Train the deep learning model to be trained based on the training data set and the validation data set to obtain the trained deep learning model.
[0084] Specifically, when training the deep learning model, the following steps (a) to (d) can be included:
[0085] (a) Extract local features from the training data set based on the local feature extraction module to obtain local feature information corresponding to each training data;
[0086] (b) Based on the xLSTM module, capture the long-term dependencies between the local feature information corresponding to each training data, and determine the prediction category corresponding to each training data based on the capture result and the data prediction module;
[0087] (c) Evaluate the deep learning model to be trained based on the prediction category corresponding to each training data and the validation data corresponding to each training data, and adjust the deep learning model to be trained based on the evaluation result;
[0088] (d) Continue to train the deep learning model to be trained based on the adjusted deep learning model, the training data set, and the validation data set until the training result meets the preset requirements to obtain the trained deep learning model.
[0089] It can be understood that when using the local feature extraction module to process the training data set, representative or key local feature information can be extracted from each training data as the basis for subsequent analysis, which can help the model better understand the content and structure of the data. Then, based on the xLSTM module, the model will capture the long-term dependencies between these local feature information, identifying the potential long-term correlations in the data. Finally, the captured long-term dependencies, together with the previously extracted local feature information, are sent to the data prediction module for further processing to determine the prediction category corresponding to each training data. After obtaining the prediction category corresponding to each training data, the prediction category of the model can be verified through the validation data corresponding to each training data, thereby quantifying the accuracy and generalization ability of the model. In this way, the evaluation result can be used as the basis for adjusting the model parameters, and through optimization algorithms such as backpropagation, the model can be continuously iteratively improved and gradually approach the optimal state. This process is repeated until the training result of the model reaches the preset accuracy or convergence standard. At this time, it can be considered that the model has fully learned the rules and patterns in the data, and then the training task of the deep learning model is completed to obtain the trained deep learning model.
[0090] In some possible embodiments, referring to Figure 5 As shown, after capturing the long-term dependencies between the local feature information corresponding to each training data based on the xLSTM module, the local feature information corresponding to each training data can also be fused with the capture result to obtain the global feature information corresponding to each training data; enabling the model to better understand the overall structure and interconnections of the data. After obtaining the global feature information corresponding to each training data, the prediction category corresponding to each training data can be determined based on the global feature information corresponding to each training data and the data prediction module.
[0091] Specifically, the present disclosure proposes a solution that combines deep learning prediction and machine learning prediction to predict the origin of tobacco leaves. That is, the data prediction module in the deep learning model proposed in the present disclosure includes a deep learning prediction module and a machine learning prediction module. When determining the prediction category corresponding to each training data based on the global feature information corresponding to each training data and the data prediction module, the following (I)-(IV) may be included:
[0092] (I) Perform clustering analysis on the global feature information corresponding to each training data;
[0093] (II) Based on the deep learning prediction module, perform deep learning prediction on the clustering analysis result to determine the first prediction category corresponding to each training data;
[0094] (IIII) Based on the machine learning prediction module, perform machine learning prediction on the clustering analysis result to determine the second prediction category corresponding to each training data;
[0095] (IV) For each training data, when the first prediction category and the second prediction category corresponding to the training data are the same, use the first prediction category or the second prediction category as the prediction category corresponding to the training data.
[0096] Here, the K-Means clustering algorithm is used to perform clustering analysis on these standardized feature information. The K-Means algorithm finds the optimal clustering centers through iteration, making the data points within the same cluster as similar as possible, while the data points between different clusters are as different as possible. Through the elbow method, we analyze the relationship between the number of clusters and the sum of squared errors within the clusters, and select the inflection point as the optimal number of clusters, which helps to identify groups of tobacco leaf samples with similar characteristics and provides a more refined data division for subsequent prediction.
[0097] Specifically, in the deep learning prediction module, a deep learning network (such as a convolutional neural network CNN or a recurrent neural network RNN, etc., specifically depending on the data characteristics) is used to further process the clustering analysis result. The deep learning model can automatically learn the high-level features of the data and extract the information that is most critical for the prediction task through multiple layers of non-linear transformations. In this step, the model maps the data in each cluster to the first prediction category, which reflects the preliminary judgment of the deep learning model on the origin of tobacco leaves.
[0098] In parallel, the machine learning prediction module adopts another strategy for prediction. Based on the clustering analysis results, Support Vector Machine (SVM) is selected as the machine learning algorithm due to its excellent performance in dealing with high-dimensional data and classification tasks. By defining the feature matrix and label vector, and dividing the dataset into training set and test set, the SVM model is trained using the training set data. In particular, the Radial Basis Function (RBF) is introduced to handle possible non-linear relationships and enhance the generalization ability of the model. Through grid search and cross-validation, the hyperparameters of SVM, such as the penalty parameter C and the kernel parameter γ, are systematically explored and optimized to ensure the best performance of the model on the test set. In this step, the output predicted by the trained machine learning prediction model is the second predicted category corresponding to each training data.
[0099] Finally, in the decision fusion stage, the first predicted category and the second predicted category of each training data are compared. When the two are consistent, it means that the deep learning model and the machine learning model reach a consensus on the prediction result of this sample, enhancing the reliability of the prediction result. At this time, this common predicted category is directly used as the final predicted category of this training data. When the two are inconsistent, model confidence evaluation can be adopted. Specifically, the prediction result of each model usually comes with a confidence level or probability score, which can reflect the prediction reliability of the model. If the confidence level of one of the models is significantly higher than the other, even if their predicted categories are inconsistent, the prediction result with a higher confidence level can still be selected as the final decision. A supplementary strategy of involving domain experts can also be used. When the prediction result has an important impact on business decisions, manual review can make the final decision based on the professional knowledge and experience of domain experts, combined with the prediction results of the model. The intervention of experts can not only make up for the deficiencies of the model, but also increase the accuracy and rationality of the decision. No specific limitation is made here.
[0100] In this way, by combining the processes of deep learning prediction and machine learning prediction, not only the effective data grouping of the K-Means clustering algorithm is utilized, but also high-precision prediction of the tobacco leaf origin is achieved through the high-level feature learning of the deep learning model and the classification accuracy of the SVM model.
[0101] In the embodiments of the present disclosure, the method, device, medium, and equipment for detecting the tobacco leaf origin based on deep learning. Since the tobacco leaf origin is realized by combining sensor technology and deep learning algorithms, and the arrangement of sensors is determined by simulating the airflow distribution under different sensor arrangement schemes based on multiple sensor devices in the sensor chamber through a fluid dynamics model and preset initial conditions; and the deep learning model is obtained by replacing the LSTM module with the xLSTM module on the basis of constructing an initial model and training it using a training data set and a validation data set. In this way, by combining the signals collected by the optimized sensor array and the trained deep learning model, the detection of the tobacco leaf origin can be realized, which not only improves the accuracy and efficiency of the tobacco leaf origin detection, but also reduces the interference of human factors and realizes the rapid and accurate identification of the tobacco leaf origin.
[0102] Those skilled in the art can understand that in the above method of the specific embodiment, the writing order of each step does not mean a strict execution order that constitutes any limitation on the implementation process, and the specific execution order of each step should be determined according to its function and possible internal logic.
[0103] Based on the same inventive concept, in the embodiments of the present disclosure, there is also provided a device for detecting the tobacco leaf origin based on deep learning corresponding to the method for detecting the tobacco leaf origin based on deep learning. Since the principle of solving problems by the device in the embodiments of the present disclosure is similar to the above method for detecting the tobacco leaf origin based on deep learning in the embodiments of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0104] Refer to Figure 6 As shown, it is a schematic diagram of a device 600 for detecting the tobacco leaf origin based on deep learning provided by the embodiments of the present disclosure. The device includes:
[0105] An information acquisition module 601, configured to acquire the tobacco leaf signal information collected by a preset sensor array; and perform noise reduction processing on the tobacco leaf signal information to obtain the to-be-detected tobacco leaf signal;
[0106] An origin detection module 602, configured to perform origin detection on the to-be-detected tobacco leaf signal based on a trained deep learning model to obtain a target tobacco leaf origin corresponding to the to-be-detected tobacco leaf signal.
[0107] In some possible embodiments, the information acquisition module 601 is further configured to:
[0108] Determine a plurality of sensor arrangement schemes based on the sensor chamber and a plurality of sensor devices in the sensor chamber; wherein each of the sensor arrangement schemes includes a sensor array for arranging a plurality of sensors.
[0109] For each of the sensor layout schemes, simulate the airflow distribution in the sensor air chamber of the sensor layout scheme based on the hydrodynamic model and the preset initial conditions to obtain the airflow simulation results; wherein, the airflow simulation results include the airflow concentration difference, the airflow concentration concentration value, the airflow coverage range, and the sensor device sensitivity value of the sensor air chamber;
[0110] Construct a sensor layout objective function and a sensor fitness objective function;
[0111] Based on the sensor layout objective function, the sensor fitness objective function, and the airflow simulation results corresponding to each of the sensor layout schemes, determine the target sensor layout scheme, and use the sensor array corresponding to the target sensor layout scheme as the preset sensor array;
[0112] The sensor layout objective function includes:
[0113]
[0114] wherein, ω1, ω2, ω3, ω4 represent weight factors; C var represents the airflow concentration difference of the sensor air chamber; represents the maximum airflow concentration of the sensor air chamber; C cen represents the airflow concentration concentration value of the sensor air chamber; represents the maximum airflow concentration concentration value of the sensor air chamber; A cov represents the airflow coverage range of the sensor air chamber; represents the maximum airflow coverage range of the sensor air chamber; S sen represents the sensor device sensitivity value of the sensor air chamber; represents the maximum sensor device sensitivity value of the sensor air chamber;
[0115] The sensor fitness objective function includes:
[0116] F(x) = ω1·F var (x) + ω2·F cen (x) + ω3·F cov (x) + ω4·F sen (x);
[0117] wherein, F var (x) represents the airflow concentration difference characteristic of the sensor air chamber; F cen (x) represents the airflow concentration concentration value characteristic of the sensor air chamber; F cov (x) represents the airflow coverage range characteristic of the sensor air chamber; F sen (x) represents the sensor device sensitivity value characteristic of the sensor air chamber.
[0118] In some possible embodiments, the information acquisition module 601 is specifically configured to:
[0119] Perform coarse-grained denoising processing on the tobacco leaf signal information based on the median filtering method to obtain a first tobacco leaf signal to be detected;
[0120] Fuse the tobacco leaf signal information with the first tobacco leaf signal to be detected to obtain a second tobacco leaf signal to be detected;
[0121] Perform fine-grained denoising processing on the second tobacco leaf signal to be detected based on the Kalman filtering method to obtain the tobacco leaf signal to be detected.
[0122] In some possible embodiments, referring to Figure 7 as shown, the device further includes:
[0123] A model construction module 603, configured to construct an initial deep learning model; wherein, the initial deep learning model includes a local feature extraction module, an LSTM module, and a data prediction module;
[0124] A model determination module 604, configured to replace the LSTM module of the initial deep learning model with an xLSTM module to obtain a deep learning model to be trained;
[0125] A data acquisition module 605, configured to acquire a training data set and a validation data set; wherein, the training data set includes a plurality of training data, and the validation data set includes validation data corresponding to each training data;
[0126] A model training module 606, configured to train the deep learning model to be trained based on the training data set and the validation data set to obtain the trained deep learning model.
[0127] In some possible embodiments, the model training module 606 is specifically configured to:
[0128] Extract local features from the training data set based on the local feature extraction module to obtain local feature information corresponding to each training data;
[0129] Capture the long-term dependence relationship between the local feature information corresponding to each training data based on the xLSTM module, and determine a prediction category corresponding to each training data based on the capture result and the data prediction module;
[0130] Evaluate the deep learning model to be trained based on the prediction category corresponding to each training data and the validation data corresponding to each training data, and adjust the deep learning model to be trained based on the evaluation result;
[0131] Continue to train the deep learning model to be trained based on the adjusted deep learning model to be trained, the training data set, and the validation data set until the training result meets the preset requirements, and obtain the trained deep learning model.
[0132] In some possible embodiments, the model training module 606 is further configured to:
[0133] Fuse the local feature information corresponding to each training data with the capture result to obtain global feature information corresponding to each training data;
[0134] The model training module 606 is specifically configured to:
[0135] Based on the global feature information corresponding to each training data and the data prediction module, determine the prediction category corresponding to each training data.
[0136] In some possible embodiments, the data prediction module includes a deep learning prediction module and a machine learning prediction module, and the model training module 606 is specifically configured to:
[0137] Perform clustering analysis on the global feature information corresponding to each training data;
[0138] Based on the deep learning prediction module, perform deep learning prediction on the clustering analysis result to determine the first prediction category corresponding to each training data;
[0139] Based on the machine learning prediction module, perform machine learning prediction on the clustering analysis result to determine the second prediction category corresponding to each training data;
[0140] For each training data, when the first prediction category and the second prediction category corresponding to the training data are the same, use the first prediction category or the second prediction category as the prediction category corresponding to the training data.
[0141] Based on the same technical concept, an embodiment of the present disclosure further provides a computer device. Refer to Figure 8 As shown, it is a schematic structural diagram of a computer device 800 provided by an embodiment of the present disclosure, including a processor 801, a memory 802, and a bus 803. Among them, the memory 802 is used to store execution instructions, including an internal memory 8021 and an external memory 8022; the internal memory 8021 here is also called the main memory, which is used to temporarily store the operation data in the processor 801 and the data exchanged with the external memory 8022 such as a hard disk. The processor 801 exchanges data with the external memory 8022 through the internal memory 8021.
[0142] In the embodiments of the present application, the memory 802 is specifically configured to store the application program code for executing the solution of the present application, and the processor 801 is used to control the execution. That is, when the computer device 800 runs, the processor 801 communicates with the memory 802 through the bus 803, so that the processor 801 executes the application program code stored in the memory 802, and further executes the method described in any of the foregoing embodiments.
[0143] Among them, the memory 802 may be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.
[0144] The processor 801 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0145] It can be understood that the structure schematically shown in the embodiments of the present application does not constitute a specific limitation on the computer device 800. In other embodiments of the present application, the computer device 800 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0146] The embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the method for detecting the origin of tobacco leaves based on deep learning described in the above method embodiments. Among them, the storage medium may be a volatile or non-volatile computer-readable storage medium.
[0147] The embodiments of the present disclosure also provide a computer program product, which carries program codes. The instructions included in the program codes can be used to execute the steps of the method for detecting the origin of tobacco leaves based on deep learning described in the above method embodiments. For details, please refer to the above method embodiments and will not be elaborated here.
[0148] Among them, the above computer program product can be specifically implemented in the form of hardware, software, or a combination thereof. In an optional embodiment, the computer program product is specifically embodied as a computer storage medium. In another optional embodiment, the computer program product is specifically embodied as a software product, such as a Software Development Kit (SDK), etc.
[0149] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems and devices described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here. In the several embodiments provided by the present disclosure, it should be understood that the disclosed systems and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some communication interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0150] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0151] In addition, in each embodiment of the present disclosure, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0152] When the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such an understanding, the technical solution of the present disclosure, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present disclosure. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs that can store program codes.
[0153] Finally, it should be noted that the above-mentioned embodiments are only specific implementation manners of the present disclosure, used to illustrate the technical solutions of the present disclosure, rather than limiting them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the art within the technical scope disclosed by the present disclosure can still modify the technical solutions recorded in the foregoing embodiments, or can easily think of changes, or perform equivalent replacements on some of the technical features; and these modifications, changes, or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should all be covered by the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.
Claims
1. A tobacco leaf origin detection method based on deep learning, characterized in that: include: Acquire tobacco leaf signal information collected by a preset sensor array; and performing noise reduction processing on the tobacco leaf signal information to obtain a tobacco leaf signal to be detected; Based on the trained deep learning model, the origin of the tobacco leaf signal to be detected is detected to obtain the target tobacco leaf origin corresponding to the tobacco leaf signal to be detected.
2. The method according to claim 1, characterized in that Before obtaining the tobacco leaf signal information collected by the preset sensor array, the method includes: Determining a plurality of sensor arrangement schemes based on a sensor chamber and a plurality of sensor devices in the sensor chamber; wherein each of the sensor arrangement schemes includes a sensor array for arranging the plurality of sensors; For each of the sensor arrangement schemes, the airflow distribution of the sensor air chamber in the sensor arrangement scheme is simulated based on the fluid dynamics model and the preset initial conditions to obtain an airflow simulation result; wherein the airflow simulation result includes the airflow concentration difference, airflow concentration concentration value, airflow coverage range and sensor device sensitivity value of the sensor air chamber; Construct sensor arrangement objective function and sensor fitness objective function; Determine a target sensor arrangement scheme based on the sensor arrangement objective function, the sensor fitness objective function, and the airflow simulation results corresponding to each of the sensor arrangement schemes, and use the sensor array corresponding to the target sensor arrangement scheme as the preset sensor array; The sensor arrangement objective function includes: Among them, ω1, ω2, ω3, ω4 are weight factors; C var It is expressed as the difference in airflow concentration in the sensor air chamber; Expressed as the maximum airflow concentration in the sensor air chamber; C cen It is expressed as the concentrated value of airflow concentration in the sensor air chamber; It is expressed as the maximum value of the airflow concentration in the sensor air chamber; A cov Expressed as the airflow coverage of the sensor air chamber; It is expressed as the maximum value of the airflow coverage of the sensor air chamber; S sen It is expressed as the sensitivity value of the sensor device of the sensor gas chamber; It is expressed as the maximum value of the sensor device sensitivity of the sensor gas chamber; The sensor fitness objective function includes: F(x)=ω1·F var (x)+ω2·F cen (x)+ω3·F cov (x)+ω4·F sen (x); Among them, F var (x) represents the airflow concentration difference characteristic of the sensor air chamber; F cen (x) represents the concentrated value characteristic of the airflow concentration in the sensor air chamber; F cov (x) represents the airflow coverage characteristic of the sensor air chamber; F sen (x) represents the sensitive value characteristic of the sensor device of the sensor chamber.
3. The method according to claim 1, characterized in that The performing noise reduction processing on the tobacco leaf signal information comprises: Performing coarse-grained denoising processing on the tobacco leaf signal information based on a median filtering method to obtain a first tobacco leaf signal to be detected; The tobacco leaf signal information is merged with the first tobacco leaf signal to be detected to obtain a second tobacco leaf signal to be detected; The second tobacco leaf signal to be detected is subjected to fine-grained denoising processing based on the Kalman filtering method to obtain the tobacco leaf signal to be detected.
4. The method according to claim 1, characterized in that Before predicting the origin of the tobacco leaf signal to be detected based on the trained deep learning model, the method includes: Constructing an initial deep learning model; wherein the initial deep learning model includes a local feature extraction module, an LSTM module and a data prediction module; The LSTM module of the initial deep learning model is replaced with an xLSTM module to obtain a deep learning model to be trained; Acquire a training data set and a verification data set; wherein the training data set includes a plurality of training data, and the verification data set includes verification data corresponding to each training data; The deep learning model to be trained is trained based on the training data set and the verification data set to obtain the trained deep learning model.
5. The method according to claim 4, characterized in that The training of the deep learning model to be trained based on the training data set and the verification data set includes: Performing local feature extraction on the training data set based on the local feature extraction module to obtain local feature information corresponding to each training data; Capturing the long-term dependency between the local feature information corresponding to each training data based on the xLSTM module, and determining the prediction category corresponding to each training data based on the capture result and the data prediction module; Evaluating the deep learning model to be trained based on the prediction category corresponding to each training data and the verification data corresponding to each training data, and adjusting the deep learning model to be trained based on the evaluation result; Based on the adjusted deep learning model to be trained, the training data set and the verification data set, the deep learning model to be trained continues to be trained until the training result meets the preset requirements, thereby obtaining the trained deep learning model.
6. The method according to claim 5, characterized in that After the xLSTM module is used to capture the long-term dependency between the local feature information corresponding to each training data, the method further includes: The local feature information corresponding to each training data is fused with the capture result to obtain the global feature information corresponding to each training data; The determining the prediction category corresponding to each training data based on the capture result and the data prediction module comprises: The predicted category corresponding to each training data is determined based on the global feature information corresponding to each training data and the data prediction module.
7. The method according to claim 6, characterized in that The data prediction module includes a deep learning prediction module and a machine learning prediction module, and the step of determining the prediction category corresponding to each training data based on the global feature information corresponding to each training data and the data prediction module includes: Performing cluster analysis on the global feature information corresponding to each training data; Performing deep learning prediction on the cluster analysis results based on the deep learning prediction module to determine a first prediction category corresponding to each of the training data; Performing machine learning prediction on the cluster analysis result based on the machine learning prediction module to determine a second prediction category corresponding to each of the training data; For each training data, when the first prediction category and the second prediction category corresponding to the training data are the same, the first prediction category or the second prediction category is used as the prediction category corresponding to the training data.
8. A tobacco origin detection device based on deep learning, characterized in that: include: An information acquisition module, used to acquire tobacco leaf signal information collected by a preset sensor array; and performing noise reduction processing on the tobacco leaf signal information to obtain a tobacco leaf signal to be detected; The origin detection module is used to perform origin detection on the tobacco leaf signal to be detected based on the trained deep learning model to obtain the target tobacco leaf origin corresponding to the tobacco leaf signal to be detected.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Multi-source data fusion cut tobacco detection method, device, equipment, medium and product
CN121476478A