Tobacco detection method, device, equipment, medium and product based on multi-source data fusion

By acquiring tobacco shred data through a gas chromatography-surface acoustic wave detector and an electronic nose sensor array, and then performing feature fusion, the data is input into a target classification model. This solves the problems of subjectivity and low efficiency in existing tobacco shred odor detection methods, and achieves highly efficient and automated tobacco shred detection.

CN121476478BActive Publication Date: 2026-05-12CHINA TOBACCO SICHUAN IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TOBACCO SICHUAN IND CO LTD
Filing Date
2026-01-07
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing methods for detecting the aroma of tobacco rely on subjective sensory evaluation, which suffers from high subjectivity, high cost, and low efficiency. There is an urgent need for a method that can improve the efficiency of tobacco aroma detection.

Method used

采用多源数据融合的方法,通过气相色谱-声表面波检测仪和电子鼻传感器阵列获取烟丝的化学组成和气味指纹数据,进行特征融合后输入目标分类模型进行烟丝检测。

Benefits of technology

It achieves automated and efficient tobacco shred detection, ensuring accurate identification, and by leveraging the advantages of both types of data, it improves detection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121476478B_ABST
    Figure CN121476478B_ABST
Patent Text Reader

Abstract

The application relates to a tobacco detection method, device, equipment, medium and product based on multi-source data fusion. The method comprises the following steps: obtaining first detection data and second detection data of to-be-detected tobacco; wherein the first detection data is obtained by detecting a gas chromatography-sound surface wave detector, and the second detection data is obtained by detecting an electronic nose sensor array; performing feature fusion based on the first detection data and the second detection data to obtain fused features; taking the fused features as input of a target classification model, performing tobacco detection by the target classification model, and obtaining a tobacco detection result. The method can improve the efficiency of tobacco odor detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of gas detection technology, and in particular to a method, apparatus, equipment, medium and product for detecting tobacco shreds using multi-source data fusion. Background Technology

[0002] The aroma quality of finished tobacco is one of the core indicators that determines the final sensory quality and brand style of cigarette products. Currently, the evaluation and classification of the aroma of finished tobacco mainly relies on the subjective sensory evaluation method: this method relies on professionally trained evaluators to describe and score the aroma of tobacco through manual smelling.

[0003] However, subjective sensory evaluation methods suffer from high subjectivity, high cost, and low efficiency. Therefore, there is an urgent need for a method to detect tobacco shreds quickly. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, equipment, medium, and product for tobacco odor detection that can improve the efficiency of tobacco odor detection by multi-source data fusion, addressing the aforementioned technical problems.

[0005] Firstly, this application provides a method for detecting tobacco shreds using multi-source data fusion, including:

[0006] Acquire first and second detection data of the tobacco to be tested; wherein, the first detection data is obtained by gas chromatography-surface acoustic wave detector, and the second detection data is obtained by electronic nose sensor array.

[0007] Feature fusion is performed based on the first detection data and the second detection data to obtain fused features;

[0008] The fused features are used as input to the target classification model, which then performs tobacco detection to obtain the tobacco detection results.

[0009] In one embodiment, the training process of the target classification model includes:

[0010] The sample fusion features of the sample tobacco and the detection results of the reference tobacco are obtained; wherein, the sample fusion features are obtained by fusing the first detection data and the second detection data of the sample tobacco.

[0011] The sample fusion features are used as input to multiple classification models, which then perform tobacco detection to obtain the predicted tobacco detection results for each model. Each of the multiple classification models has different model parameters.

[0012] Based on the reference tobacco detection results and the predicted tobacco detection results corresponding to each of the classification models, the classification accuracy of each of the classification models is determined.

[0013] The target classification model is obtained by iterating based on the classification accuracy of each classification model and multiple sets of model parameters corresponding to the multiple classification models.

[0014] In one embodiment, the step of iterating based on the classification accuracy of each of the classification models and multiple sets of model parameters corresponding to the multiple classification models to obtain the target classification model includes:

[0015] The first model population is constructed based on multiple classification models described above;

[0016] Based on the classification accuracy of each classification model in the k-th model population, the genetic classification model for the k-th round is determined from the multiple classification models; where k is a positive integer.

[0017] Based on the model parameters of the genetic classification model in the kth round, parameter crossover and parameter mutation are performed to obtain the (k+1)th model population;

[0018] If k equals M, determine the target classification model with the highest classification accuracy from the Mth model population; where M is a positive integer greater than 1.

[0019] If k is less than M, increment k by 1 and return to determine the genetic classification model for the kth round from the multiple classification models based on the classification accuracy of each classification model in the kth model population.

[0020] In one embodiment, obtaining the sample fusion features of the sample tobacco includes:

[0021] Obtain the first and second test data of the sample tobacco;

[0022] Feature sampling is performed on the data features corresponding to the first detection data and the second detection data respectively to obtain a first feature population; the first feature population includes multiple feature subsets, and each feature subset includes multiple data features;

[0023] The sample fusion features of the sample tobacco are obtained by iterating through multiple feature subsets in the first feature population based on the classification fitness of the feature subsets.

[0024] In one embodiment, the step of iterating through multiple feature subsets from the first feature population based on the classification fitness of the feature subsets to obtain the sample fusion features of the sample tobacco includes:

[0025] Based on the classification fitness of multiple feature subsets in the i-th feature population, the genetic feature subset of the i-th round is determined from the multiple feature subsets;

[0026] Based on the genetic feature subset, feature crossover and feature mutation operations are performed to obtain the (i+1)th feature population;

[0027] If i equals N, based on the classification fitness of multiple feature subsets in the Nth feature population, determine the target feature subset with the highest classification fitness, and obtain the sample fusion features of the sample tobacco.

[0028] If i is less than N, increment i by 1 and return to the previous step to perform classification fitness based on multiple feature subsets in the i-th feature population, and determine the genetic feature subset of the i-th round from the multiple feature subsets, where i is a positive integer and N is a positive integer greater than 1.

[0029] In one embodiment, the first detection data is a sequence of response values ​​obtained by a surface acoustic wave sensor after column separation by the gas chromatograph-surface acoustic wave detector; the second detection data is an electrical signal response spectrum generated by the electronic nose sensor array.

[0030] Secondly, this application also provides a multi-source data fusion tobacco detection device, comprising:

[0031] The acquisition module is used to acquire first detection data and second detection data of the tobacco to be tested; wherein, the first detection data is data obtained by gas chromatography-surface acoustic wave detector, and the second detection data is data obtained by electronic nose sensor array.

[0032] The feature fusion module is used to perform feature fusion based on the first detection data and the second detection data to obtain fused features;

[0033] The detection module is used to take the fused features as input to the target classification model, and the target classification model performs tobacco shred detection to obtain the tobacco shred detection result.

[0034] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.

[0035] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0036] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.

[0037] The aforementioned multi-source data fusion method, apparatus, equipment, medium, and product for tobacco shred detection obtains first detection data through gas chromatography-surface acoustic wave detection, which reflects the chemical composition of the tobacco shreds to be tested. Second detection data is obtained through an electronic nose sensor array, which reflects the odor fingerprint of the tobacco shreds. Subsequently, the first and second detection data are fused to obtain fused features, achieving information complementarity between the two sets of data. These fused features are then used as input to a target classification model, which performs tobacco shred detection to obtain the results. This approach leverages the advantages of both types of data, achieving automatic detection while ensuring accuracy, thus improving detection efficiency. Attached Figure Description

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

[0039] Figure 1 This is an application environment diagram of a multi-source data fusion method for tobacco detection in one embodiment.

[0040] Figure 2 This is a flowchart illustrating a multi-source data fusion method for tobacco detection in one embodiment.

[0041] Figure 3 This is a schematic diagram illustrating the training process of a target classification model in one embodiment;

[0042] Figure 4 This is an application flowchart of a multi-source data fusion method for tobacco detection in one embodiment;

[0043] Figure 5 This is a schematic diagram of the detection data involved in one embodiment;

[0044] Figure 6 This is a schematic diagram illustrating the feature iteration involved in one embodiment;

[0045] Figure 7 This is a schematic diagram illustrating feature evaluation using a confusion matrix in one embodiment;

[0046] Figure 8 This is a schematic diagram of the feature selection results involved in one embodiment;

[0047] Figure 9 This is a schematic diagram of the feature selection results involved in yet another embodiment;

[0048] Figure 10 This is a structural block diagram of a tobacco shred detection device that integrates multi-source data fusion in one embodiment.

[0049] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0051] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0052] The multi-source data fusion method for tobacco detection provided in this application can be applied to, for example... Figure 1 The application environment shown is illustrated. Terminal 101 communicates with server 102 via a network. A data storage system can store the data that server 102 needs to process. The data storage system can be integrated onto server 102, or it can be located in the cloud or on another network server.

[0053] When it is necessary to test the tobacco shreds, the tester can initiate a tobacco shred testing task through terminal 101 and input the first and second test data of the tobacco shreds to be tested. Then, terminal 101 sends the received first and second test data to server 102. After server 102 obtains the first and second test data of the tobacco shreds to be tested, it performs feature fusion based on the first and second test data to obtain fused features. The fused features are used as input to the target classification model, and the target classification model performs tobacco shred testing to obtain the tobacco shred testing result.

[0054] Terminal 101 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, and projection equipment. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. Server 102 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0055] In one exemplary embodiment, such as Figure 2 As shown, a multi-source data fusion method for tobacco shred detection is provided, which is then applied to... Figure 1 Taking the server in the example, the explanation includes the following steps 201 to 203. Wherein:

[0056] Step 201: Obtain first and second detection data of the tobacco to be tested; wherein, the first detection data is obtained by gas chromatography-surface acoustic wave detector, and the second detection data is obtained by electronic nose sensor array.

[0057] Among them, the gas chromatography-surface acoustic wave detector is an analytical instrument. Its core principle is to separate complex organic mixtures into pure components through a gas chromatography column, and then use a surface acoustic wave sensor to detect the change in sound wave frequency caused by gas adsorption, so as to realize rapid quantitative analysis of trace gases.

[0058] Furthermore, the first detection data is a sequence of response values ​​obtained by a surface acoustic wave sensor after separation by a gas chromatograph-surface acoustic wave detector. The response value sequence refers to the separation of the gas mixture in the chromatographic column according to physical properties such as boiling point and polarity due to differences in adsorption / desorption capacity, forming a component stream in the time dimension. The different elution times of different components cause the gas concentration input to the sensor to change dynamically over time, resulting in a series of sensor response values ​​that change over time, forming a response value sequence.

[0059] An electronic nose sensor array is an integrated detection module composed of various gas sensors (such as metal oxide semiconductor, electrochemical, and conductive polymer types) that have specific responses to different volatile organic compounds (VOCs). It achieves high sensitivity and wide range of identification of complex gas mixtures by simulating the mechanism of multiple receptors working together in the biological olfactory system.

[0060] Furthermore, the second detection data is the electrical signal response spectrum generated by the electronic nose sensor array; the electrical signal response spectrum is a dynamic data set of electrical parameters such as conductivity, capacitance or resistance that change over time due to surface adsorption / desorption reactions of each gas-sensitive element in the sensor array after contact with the target gas. It is usually presented in the form of a two-dimensional matrix, where the horizontal axis is time or sensor number and the vertical axis is electrical signal intensity, used to characterize the spatial distribution characteristics and concentration gradient information of gas components.

[0061] Step 202: Perform feature fusion based on the first detection data and the second detection data to obtain fused features.

[0062] In some embodiments, feature extraction can be performed on the first detection data and the second detection data respectively to obtain the first feature corresponding to the first detection data and the second feature corresponding to the second detection data. Then, the first feature and the second feature are aligned to the same feature space to obtain the aligned first feature and the aligned second feature. The aligned first feature and the aligned second feature are then weighted and fused to obtain the fused feature.

[0063] In other embodiments, the first detection data and the second detection data can be concatenated along the time dimension to obtain concatenated data. Then, feature extraction can be performed based on the concatenated data to obtain fused features.

[0064] In other embodiments, feature extraction can be performed on the first detection data and the second detection data respectively to obtain the first feature corresponding to the first detection data and the second feature corresponding to the second detection data. Then, some features are selected from the first feature and the second feature respectively and fused to obtain the fused feature.

[0065] Step 203: Use the fused features as input to the target classification model, and use the target classification model to detect tobacco shreds to obtain the tobacco shred detection results.

[0066] The results of tobacco testing can include the odor type and odor rating of the tobacco being tested.

[0067] The target classification model is pre-trained; in some embodiments, the target classification model may be obtained through supervised training; for example, sample fusion features of sample tobacco and detection results of reference tobacco can be obtained; the classification model performs tobacco detection based on the sample fusion features to obtain the predicted tobacco detection results corresponding to each classification model, calculates the model loss based on the predicted tobacco detection results and the reference tobacco detection results, and adjusts the parameters of the classification model through the model loss until the training termination condition is reached to obtain the target classification model; wherein, the training termination condition may be that the number of iterations reaches a threshold, or that the model loss is less than a loss threshold.

[0068] In other embodiments, other training methods may be used to obtain the target classification model; for example, reinforcement learning, self-supervised training, transfer learning, etc. The specific training method is not limited here.

[0069] In the aforementioned multi-source data fusion method for tobacco detection, first detection data is obtained through gas chromatography-surface acoustic wave detection, which reflects the chemical composition of the tobacco to be tested. Second detection data is obtained through an electronic nose sensor array, which reflects the odor fingerprint of the tobacco to be tested. Then, the first and second detection data are fused to obtain fused features, which achieve information complementarity between the first and second detection data. The fused features are used as input to a target classification model, which performs tobacco detection to obtain the tobacco detection result. This method achieves the synergistic use of the advantages of the two types of data, realizes automatic detection while ensuring recognition accuracy, and improves detection efficiency.

[0070] In one exemplary embodiment, such as Figure 3 As shown, the training process of the target classification model includes steps 301 to 304. Wherein:

[0071] Step 301: Obtain the sample fusion features of the sample tobacco and the detection results of the reference tobacco; wherein, the sample fusion features are obtained by fusing the first detection data and the second detection data of the sample tobacco.

[0072] The reference tobacco test results for the sample tobacco can be obtained by the evaluation personnel; it is understood that the reference tobacco test results and the predicted tobacco test results contain data of the same dimension; for example, if the reference tobacco test results include the odor level, then the predicted tobacco test results also include the odor level.

[0073] Step 302: The sample fusion features are used as input to multiple classification models, and the multiple classification models perform tobacco detection respectively to obtain the predicted tobacco detection results corresponding to each classification model; wherein, the multiple classification models have different model parameters.

[0074] Among them, multiple classification models are trained based on the same base model; it is understandable that the different model parameters of different classification models determine the differences in classification ability of different classification models.

[0075] Step 303: Based on the reference tobacco detection results and the corresponding predicted tobacco detection results of each classification model, determine the classification accuracy of each classification model.

[0076] The classification accuracy can be represented by the similarity between the reference tobacco detection results and the predicted tobacco detection results. The higher the similarity, the higher the classification accuracy; conversely, the lower the classification accuracy.

[0077] When the tobacco detection results include multiple detection items, corresponding detection weights can be set for different detection items. Then, the similarity between the reference tobacco detection results and the predicted tobacco detection results for each detection item is calculated separately. The similarity of each detection item is then weighted and summed according to the detection weight of each detection item to obtain the similarity between the reference tobacco detection results and the predicted tobacco detection results.

[0078] For example, the tobacco detection results can include both odor type and odor level. Based on this, the odor type can be given a higher weight and the odor level can be given a lower weight. This allows the classification model to focus more on the accuracy of odor type classification.

[0079] Step 304: Based on the classification accuracy of each classification model and the multiple sets of model parameters corresponding to multiple classification models, iterate to obtain the target classification model.

[0080] Iterating on model parameters refers to generating new model parameters based on the current multiple sets of model parameters. For example, weighted summation, parameter interpolation, probability sampling, etc., are performed on the existing parameters to obtain new model parameters, which can then be used to determine a new classification model.

[0081] In the above embodiments, the classification accuracy is optimized by iterating the model parameters of the classification model to obtain the target classification model, thereby ensuring the classification accuracy of the target classification model.

[0082] In an exemplary embodiment, step 304 includes steps 401 to 405. Wherein:

[0083] Step 401: Construct the first model population based on multiple classification models.

[0084] The number of classification models is predetermined; furthermore, the number of models in the model population can be determined according to the complexity of the classification task. The more complex the classification task, the more models the model population contains.

[0085] In some embodiments, multiple random samplings can be performed on the model parameters of a base model to obtain multiple classification models.

[0086] Step 402: Based on the classification accuracy of each classification model in the k-th model population, determine the genetic classification model for the k-th round from multiple classification models; where k is a positive integer.

[0087] Specifically, based on a preset selection quantity, multiple classification models with the highest classification accuracy can be selected as the genetic classification models for the k-th round.

[0088] Step 403: Perform parameter crossover and parameter mutation based on the model parameters of the genetic classification model in the kth round to obtain the (k+1)th model population.

[0089] Specifically, based on the model parameters of the genetic classification model in round k, parameter crossover and parameter mutation are performed to obtain multiple sets of new model parameters. Multiple new classification models are determined based on the multiple sets of new model parameters. The multiple new classification models and the genetic classification model in round k constitute the (k+1)th model population.

[0090] The number of classification models contained in the (k+1)th model population can be the same as or different from the number of classification models contained in the kth model population.

[0091] Among them, parameter crossover refers to exchanging some parameters in multiple sets of model parameters corresponding to multiple genetic classification models to obtain new model parameters; parameter mutation directly applies random changes to the model parameters corresponding to a genetic classification model, introducing local exploration capabilities.

[0092] It is understandable that the genetic classification model in the kth round, as the model with the highest classification accuracy in the kth model population, means that its corresponding model parameters are suitable for the current classification task. Based on this, parameter crossover and mutation are performed on these model parameters, and the resulting new model parameters are also likely to be suitable for the current classification task. Thus, the model parameters can be enriched through parameter crossover and mutation, and model parameters that are more suitable for the current classification task can be explored.

[0093] Step 404: If k equals M, determine the target classification model with the highest classification accuracy from the Mth model population; where M is a positive integer greater than 1.

[0094] Understandably, during multiple iterations, model parameters with high classification accuracy will be continuously inherited, while model parameters with high classification accuracy will be continuously eliminated, thus enabling the final target classification model to have high classification accuracy for the current classification task.

[0095] Where M is the preset number of iterations; obviously, the more iterations, the better the training effect, but the longer the corresponding training time.

[0096] Step 405: If k is less than M, increment k by 1 and return to the previous step. Then, determine the genetic classification model for the kth round from multiple classification models based on the classification accuracy of each classification model in the kth model population.

[0097] In the above implementation, the target classification model most suitable for the current classification task is determined through multiple parameter iterations, ensuring the classification accuracy of the tobacco to be tested.

[0098] In some embodiments, step 301 includes steps 501 to 503. Wherein:

[0099] Step 501: Obtain the first and second detection data of the sample tobacco.

[0100] The first detection data of the sample tobacco was obtained by detecting the sample tobacco using a gas chromatography-surface acoustic wave detector; the second detection data was obtained by detecting the sample tobacco using an electronic nose sensor array.

[0101] Step 502: Feature sampling is performed on the data features corresponding to the first detection data and the second detection data respectively to obtain the first feature population; the first feature population includes multiple feature subsets, and each feature subset includes multiple data features.

[0102] In this context, a feature subset is a set of multiple features obtained from a single feature sampling; multiple feature subsets can be obtained through multiple feature samplings.

[0103] In some embodiments, the data features corresponding to the first detection data and the second detection data can be concatenated to obtain concatenated features. Then, multiple random samplings are performed from the concatenated features, and a feature subset is obtained each time. The first feature population is obtained by combining multiple feature subsets.

[0104] In other embodiments, to avoid an imbalance in the number of features of the two types of detection data during feature sampling, the sampling quantity of the two types of detection data can be set separately, and feature sampling can be performed on the data features corresponding to the first detection data according to the set sampling quantity to obtain a feature subset; through multiple sampling, the feature population corresponding to the first detection data is obtained, and feature sampling can be performed on the data features corresponding to the second detection data to obtain a feature subset; through multiple sampling, the feature population corresponding to the second detection data is obtained.

[0105] Of course, in other embodiments, the data features corresponding to the first detection data and the second detection data can be used as the first feature population.

[0106] Step 503: The sample fusion features of the sample tobacco shreds are obtained by iterating the features of multiple feature subsets in the first feature population based on the classification fitness of the feature subsets.

[0107] The classification fitness of a feature subset refers to the degree to which the features in the feature subset are adapted to the current classification task. Specifically, a lightweight classification model can be trained using the feature subset. Then, the classification ability of the lightweight classification model (such as classification accuracy, F1 score, etc.) can be evaluated using a test set. The higher the classification ability, the higher the classification fitness of the feature subset, which means that the feature subset is more adapted to the current classification task.

[0108] In some embodiments, feature iteration refers to generating new features based on the current features, such as performing weighted summation, concatenation, probability sampling, etc., on existing features to obtain new features.

[0109] In some embodiments, when the data features corresponding to the first detection data and the second detection data are sampled separately, feature iteration can be performed on the feature population corresponding to the first detection data to obtain a first feature iteration result, and feature iteration can be performed on the feature population corresponding to the second detection data to obtain a second feature iteration result. Finally, the sample fusion features of the sample tobacco are obtained by combining the first feature iteration result and the second feature iteration result.

[0110] In the above embodiments, feature iteration can select the most suitable features for the current classification task from the data features corresponding to the first detection data and the second detection data, thereby avoiding interference from invalid features, improving the representation ability of the fused features for the classification task, and thus improving the classification accuracy of the classification model.

[0111] In some embodiments, step 503 may include steps 601 to 604. Wherein:

[0112] Step 601: Based on the classification fitness of multiple feature subsets in the i-th feature population, determine the genetic feature subset of the i-th round from the multiple feature subsets.

[0113] Specifically, based on a preset selection quantity or a preset ratio, multiple feature subsets with the highest classification fitness can be selected as the genetic feature subset for the i-th round.

[0114] Step 602: Perform feature crossover and feature mutation operations based on the genetic feature subset to obtain the (i+1)th feature population.

[0115] Feature crossover refers to the exchange of some features in multiple genetic feature subsets to obtain a new feature subset; feature mutation directly applies random changes to the features in a genetic feature subset, introducing local exploration capabilities.

[0116] Step 603: If i equals N, based on the classification fitness of multiple feature subsets in the Nth feature population, determine the target feature subset with the highest classification fitness, and obtain the sample fusion features of the sample tobacco.

[0117] In some embodiments, the sample fusion features of the sample tobacco shreds can be obtained by splicing or fusing the features included in the target feature subset.

[0118] Step 604: If i is less than N, increment i by 1 and return to perform classification fitness based on multiple feature subsets in the i-th feature population to determine the genetic feature subset of the i-th round from multiple feature subsets, where i is a positive integer and N is a positive integer greater than 1.

[0119] In the above embodiments, the fusion feature best suited to the current classification task can be obtained through the feature genetic algorithm, thereby improving the classification accuracy based on the fusion feature.

[0120] In some of these embodiments, please refer to Figure 4 , Figure 4 An application flowchart relating to an embodiment of this application is shown, including 701 to 705. Wherein:

[0121] 701, Data Measurement Module. Specifically, the VOC characteristic data of three tobacco samples (A, B, and C) are measured using GC-SAW (Gas Chromatography - Surface Acoustic Wave) and an electronic nose (E-nose).

[0122] like Figure 5 As shown, Figure 5 Figure a illustrates a schematic diagram of the second detection data collected by the electronic nose. Specifically, a 128-channel electronic nose is used to collect VOC odor data from the finished tobacco product. The detection data of each channel sensor is shown in the figure. Within a sampling time of 160 seconds, a VOC feature map of the finished tobacco product sample is generated. The horizontal axis represents the sampling time (in seconds, s), and the vertical axis represents the sensor response result (in ohms, Ω), i.e., the signal response intensity of the sensor. Different horizontal lines in the figure correspond to different sensors in the electronic nose. It can be seen that through the multiple channel sensors of the electronic nose, different types of VOC odor data can be detected, ensuring the richness of VOC information contained in the second detection data.

[0123] like Figure 5 As shown in b, Figure 5Figure b shows a schematic diagram of the first detection data. Specifically, GC-SAW was used to collect VOC odor data of different finished tobacco products. Within a 25-second sampling period, VOC feature maps of different finished tobacco samples were generated. The three axes represent sampling time (in seconds), signal response intensity (in Hertz per second, Hz / s), and sample number, respectively. It can be seen that the signal response intensity of the same tobacco sample shows a dynamic trend with the sampling time, reflecting the instability of its VOC release process. At the same time, the signal response intensity of different finished tobacco samples is also different under the same sampling time, reflecting that there are essential differences in the VOC composition and content of different finished tobacco samples.

[0124] 702, Data Preprocessing Module. This module transforms raw, multi-source, heterogeneous data into a unified, well-organized, and clearly categorized standardized dataset through the standardization, labeling, and fusion processes described above.

[0125] Standardization refers to preprocessing the raw VOC data of tobacco samples to remove outliers and fill in missing values. Then, the Z-score standardization method is used to normalize the raw data to eliminate biases caused by different feature units. The Z-score formula is as follows: In the formula, z is the standardized feature value, x is the original feature value, and u is the mean of the feature across all samples. This represents the standard deviation of the feature.

[0126] Defining a sample label means assigning a unique classification label to each sample based on its category attribute, in order to construct a label vector for supervised learning.

[0127] Feature fusion schemes refer to the process of splicing and combining feature subsets from different instruments along the feature dimension according to a predefined fusion strategy to generate a fused feature set for subsequent feature selection.

[0128] 703, Feature Selection Module. For example, the preprocessed and fused original high-dimensional feature set is first binary encoded to initialize a population of candidate feature subsets. Then, the population is optimized through an iterative evolutionary cycle: its fitness function is defined as the average accuracy of k-fold cross-validation based on a Support Vector Machine (SVM) classifier, used to evaluate the classification performance of each feature subset; the selection operation is based on a roulette wheel strategy, retaining high-quality individuals; the crossover probability (0.8) and coefficient of variation (0.01) are introduced into new gene combinations and random variations to maintain population diversity and explore new solution spaces. The evolutionary process continues until a preset number of iterations (100) is reached, ultimately outputting the optimal feature subset, i.e., the fused features.

[0129] like Figure 6As shown, Figure 6 Figure a shows a schematic diagram of feature iteration on the first detection data. Figure 6 Figure b shows a schematic diagram of feature iteration on the second detection data. Figure 6 Figure c shows a schematic diagram of feature iteration by fusing the first and second detection data.

[0130] Specifically, for 60-dimensional GC-SAW data and 128-dimensional electronic nose data, the algorithm selected 30 and 57 features respectively. It can be seen that as the number of generations increases, the classification accuracy shows a stable upward trend, eventually converging to the optimal solution. After 100 generations of evolution, the algorithm efficiently selected the key feature combinations that distinguish the three types of tobacco aromas, significantly reducing the feature dimensionality.

[0131] like Figure 7 As shown, Figure 7 The diagram illustrates the results of feature evaluation. After optimization and screening using a genetic algorithm in the feature selection module... Figure 7 Figure 'a' shows the confusion matrix optimized using a genetic algorithm based solely on SAW detection data. This matrix illustrates the relationship between the classification model's predictions and the true values. In each matrix, rows represent the true class, and columns represent the predicted class. The numbers in the matrix represent the number of samples, reflecting the correspondence between the true and predicted classes. Taking the first row as an example, it shows that for samples with a true class of 1, there are 23 samples predicted as class 1, 3 samples predicted as class 2, and 4 samples predicted as class 3. Therefore, the classification accuracy for samples with a true class of 1 can be calculated. Figure 7 Figure b shows the confusion matrix optimized using a genetic algorithm based solely on electronic nose detection data. This matrix illustrates the relationship between the classification model's predictions and the actual results. In each matrix, rows represent the true class, and columns represent the predicted class. The numbers in the matrix represent the number of samples, reflecting the correspondence between the true and predicted classes. Taking the first row as an example, it represents samples with a true class of 1, 23 samples with a predicted class of 1, 0 samples with a predicted class of 2, and 7 samples with a predicted class of 3. Thus, the classification accuracy for samples with a true class of 1 can be calculated. The evaluation results based on leave-one-out cross-validation show that, after feature selection, the classification accuracy of electronic nose and GC-SAW technology on finished tobacco VOC data is 70.0% and 78.9%, respectively.

[0132] like Figure 8As shown, the feature selection results based on the genetic algorithm demonstrate that for 60-dimensional GC-SAW data and 128-dimensional electronic nose data, the algorithm selects 30 and 57 features respectively, enabling the model to achieve optimal classification accuracy while compressing dimensionality. This result verifies the effectiveness of the genetic algorithm in eliminating feature redundancy and improving model efficiency.

[0133] In other embodiments, such as Figure 9 As shown, Figure 9 The diagram illustrates the result of feature selection in another embodiment. The 128-dimensional feature signal output from the electronic nose sensor array is fused with the 60-dimensional feature signal from gas chromatography analysis to form a 188-dimensional joint feature vector. All features are then Z-score standardized to eliminate dimensional differences. Subsequently, a genetic algorithm is used to screen redundant features from the fused high-dimensional features. The genetic algorithm population size is set to 50 individuals, the number of generations to 100, the crossover probability to 0.8, and the mutation probability to 0.01. The fitness function is the SVM classification accuracy using k-fold cross-validation (k=5), and the algorithm is run five times independently to ensure stability. The optimal feature subset is obtained, significantly reducing the feature dimension from the original 188 dimensions to 83 dimensions. This effectively eliminates redundant features while retaining key information for VOC odor identification in finished tobacco, improving the training efficiency and generalization performance of the classification model. Based on this feature selection result, a fast and accurate VOC odor classification model for finished tobacco is constructed.

[0134] 704, Model Training Module. Used to build and train a multi-classification model, accurately classifying the optimal feature subset after feature selection. First, it receives the optimal feature subset data output by the feature selection module; then, it uses a leave-one-out cross-validation strategy for model training and testing. In each iteration, a single sample is used as the test set, and all other samples are used as the training set.

[0135] The model training employs a multi-class classification model based on Support Vector Machines (SVM). Specifically, a Radial Basis Function (RBF) is used as the kernel function, with the expression [expression omitted], where the kernel parameters are automatically set based on the input data using the auto mode. The optimization objective of the SVM model is to minimize [classification value omitted], where the penalty parameter C is set to 15 to balance model complexity and tolerance for misclassification. For the classification problem of three classes (A, B, and C), a one-to-one encoding strategy is adopted, constructing three binary SVM sub-models, which are then integrated using majority voting to make the final multi-class classification decision.

[0136] 705. Evaluation Output Module. Leave-one-out cross-validation is used to evaluate the performance of the trained classification model. Specifically, each sample in the dataset is iterated through, with each individual sample used as the test set and all other samples used as the training set, ensuring that each sample is used for testing exactly once. In each validation, the trained multi-class support vector machine model is used to predict the class label of the test sample, and the prediction results for all samples are accumulated. Based on the complete prediction results and the true labels, a confusion matrix is ​​calculated to visually represent the classification effect, and then the overall classification accuracy is calculated. To evaluate the algorithm's stability, convergence curves and confusion matrix heatmaps are generated, completing a comprehensive performance evaluation of the entire classification system.

[0137] An SVM multi-classification model was constructed using the optimal feature subset, and the performance was evaluated using leave-one-out cross-validation. Experimental results show that the fusion method achieves a classification accuracy of 86.7% for the three tobacco odors, which is superior to the single electronic nose (70.0%) or GC-SAW (78.89%) methods.

[0138] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0139] Based on the same inventive concept, this application also provides a tobacco detection device for implementing the tobacco detection method involving multi-source data fusion as described above. The solution provided by this device is similar to the implementation described in the above method. Therefore, the specific limitations of one or more embodiments of the tobacco detection device for multi-source data fusion provided below can be found in the limitations of the tobacco detection method for multi-source data fusion described above, and will not be repeated here.

[0140] In one exemplary embodiment, such as Figure 10 As shown, a multi-source data fusion tobacco detection device 900 is provided, comprising:

[0141] The acquisition module 901 is used to acquire first detection data and second detection data of the tobacco to be tested; wherein, the first detection data is data obtained by gas chromatography-surface acoustic wave detector, and the second detection data is data obtained by electronic nose sensor array.

[0142] The feature fusion module 902 is used to perform feature fusion based on the first detection data and the second detection data to obtain fused features.

[0143] The detection module 903 is used to take the fused features as input to the target classification model, and the target classification model performs tobacco shred detection to obtain the tobacco shred detection result.

[0144] In one embodiment, the multi-source data fusion tobacco detection device 900 includes a model training module for acquiring sample fusion features of sample tobacco and reference tobacco detection results. The sample fusion features are obtained by fusing first and second detection data of the sample tobacco. The sample fusion features are used as input to multiple classification models, which then perform tobacco detection to obtain predicted tobacco detection results for each model. Each classification model has different model parameters. Based on the reference tobacco detection results and the predicted tobacco detection results of each classification model, the classification accuracy of each model is determined. The target classification model is obtained by iterating based on the classification accuracy of each model and multiple sets of model parameters corresponding to the multiple classification models.

[0145] In one embodiment, the model training module is specifically used to construct a first model population based on multiple classification models; determine the genetic classification model for the kth round from multiple classification models based on the classification accuracy of each classification model in the kth model population; where k is a positive integer; perform parameter crossover and parameter mutation on the model parameters of the genetic classification model for the kth round to obtain the (k+1)th model population; if k equals M, determine the target classification model with the highest classification accuracy from the Mth model population; where M is a positive integer greater than 1; if k is less than M, increment k by 1 and return to execute the determination of the genetic classification model for the kth round from multiple classification models based on the classification accuracy of each classification model in the kth model population.

[0146] In one embodiment, the multi-source data fusion tobacco detection device 900 includes a feature selection module for acquiring first detection data and second detection data of sample tobacco; performing feature sampling on the data features corresponding to the first detection data and the second detection data respectively to obtain a first feature population; the first feature population includes multiple feature subsets, each feature subset including multiple data features; and performing feature iteration based on the classification fitness of the multiple feature subsets in the first feature population to obtain the sample fusion features of the sample tobacco.

[0147] In one embodiment, the feature selection module is specifically used to determine the genetic feature subset for the i-th round from multiple feature subsets based on the classification fitness of multiple feature subsets in the i-th feature population; perform feature crossover and feature mutation operations based on the genetic feature subset to obtain the (i+1)-th feature population; if i equals N, determine the target feature subset with the highest classification fitness based on the classification fitness of multiple feature subsets in the N-th feature population to obtain the sample fusion feature of the sample tobacco; if i is less than N, increment i by 1 and return to execute the determination of the genetic feature subset for the i-th round from multiple feature subsets based on the classification fitness of multiple feature subsets in the i-th feature population, where i is a positive integer and N is a positive integer greater than 1.

[0148] In one embodiment, the first detection data is a sequence of response values ​​obtained by a surface acoustic wave sensor after column separation by a gas chromatograph-surface acoustic wave detector; the second detection data is an electrical signal response spectrum generated by an electronic nose sensor array.

[0149] Each module in the aforementioned multi-source data fusion tobacco detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.

[0150] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 11 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores detection data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a multi-source data fusion method for tobacco detection.

[0151] Those skilled in the art will understand that Figure 11The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0152] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described above.

[0153] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0154] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method described above.

[0155] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0156] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0157] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0158] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for detecting tobacco shreds using multi-source data fusion, characterized in that, The method includes: Acquire first and second detection data of the tobacco to be tested; wherein, the first detection data is obtained by gas chromatography-surface acoustic wave detector, and the second detection data is obtained by electronic nose sensor array. Feature fusion is performed based on the first detection data and the second detection data to obtain fused features; The fused features are used as input to the target classification model, which then performs tobacco shred detection to obtain the tobacco shred detection result. The training process of the target classification model includes: The sample fusion features of the sample tobacco and the detection results of the reference tobacco are obtained; wherein, the sample fusion features are obtained by fusing the first detection data and the second detection data of the sample tobacco. The sample fusion features are used as input to multiple classification models, which then perform tobacco detection to obtain the predicted tobacco detection results for each model. Each of the multiple classification models has different model parameters. Based on the reference tobacco detection results and the predicted tobacco detection results corresponding to each of the classification models, the classification accuracy of each of the classification models is determined. The target classification model is obtained by iterating based on the classification accuracy of each classification model and multiple sets of model parameters corresponding to the multiple classification models. The acquisition of sample fusion features of the sample tobacco includes: Obtain the first and second detection data of the sample tobacco; Feature sampling is performed on the data features corresponding to the first detection data and the second detection data respectively to obtain a first feature population; the first feature population includes multiple feature subsets, and each feature subset includes multiple data features; The sample fusion features of the sample tobacco are obtained by iterating through multiple feature subsets in the first feature population based on the classification fitness of the feature subsets.

2. The method according to claim 1, characterized in that, The step of iterating based on the classification accuracy of each classification model and multiple sets of model parameters corresponding to the multiple classification models to obtain the target classification model includes: The first model population is constructed based on multiple classification models described above; Based on the classification accuracy of each classification model in the k-th model population, the genetic classification model for the k-th round is determined from the multiple classification models; where k is a positive integer. Based on the model parameters of the genetic classification model in the kth round, parameter crossover and parameter mutation are performed to obtain the (k+1)th model population; If k equals M, determine the target classification model with the highest classification accuracy from the Mth model population; where M is a positive integer greater than 1. If k is less than M, increment k by 1 and return to determine the genetic classification model for the kth round from the multiple classification models based on the classification accuracy of each classification model in the kth model population.

3. The method according to claim 1, characterized in that, The process of iterating through multiple feature subsets from the first feature population based on the classification fitness of the feature subsets to obtain the sample fusion features of the sample tobacco includes: Based on the classification fitness of multiple feature subsets in the i-th feature population, the genetic feature subset of the i-th round is determined from the multiple feature subsets; Based on the genetic feature subset, feature crossover and feature mutation operations are performed to obtain the (i+1)th feature population; If i equals N, based on the classification fitness of multiple feature subsets in the Nth feature population, determine the target feature subset with the highest classification fitness, and obtain the sample fusion features of the sample tobacco. If i is less than N, increment i by 1 and return to the previous step to perform classification fitness based on multiple feature subsets in the i-th feature population, and determine the genetic feature subset of the i-th round from the multiple feature subsets, where i is a positive integer and N is a positive integer greater than 1.

4. The method according to claim 1, characterized in that, The first detection data is a sequence of response values ​​obtained by the surface acoustic wave sensor after column separation by the gas chromatograph-surface acoustic wave detector; the second detection data is an electrical signal response spectrum generated by the electronic nose sensor array.

5. A multi-source data fusion tobacco shred detection device, characterized in that, The device includes: The acquisition module is used to acquire first detection data and second detection data of the tobacco to be tested; wherein, the first detection data is data obtained by gas chromatography-surface acoustic wave detector, and the second detection data is data obtained by electronic nose sensor array. The feature fusion module is used to perform feature fusion based on the first detection data and the second detection data to obtain fused features; The detection module is used to take the fused features as input to the target classification model, and the target classification model performs tobacco shred detection to obtain the tobacco shred detection result; A model training module is used to acquire sample fusion features of sample tobacco shreds and reference tobacco shred detection results. The sample fusion features are obtained by fusing first and second detection data of the sample tobacco shreds. These features are used as input to multiple classification models, which then perform tobacco shred detection to obtain predicted tobacco shred detection results for each model. Each classification model has different model parameters. Based on the reference tobacco shred detection results and the predicted tobacco shred detection results of each model, the classification accuracy of each model is determined. The target classification model is obtained by iterating based on the classification accuracy of each model and multiple sets of model parameters corresponding to the multiple classification models. The feature selection module is used to acquire first detection data and second detection data of the sample tobacco; to perform feature sampling on the data features corresponding to the first detection data and the second detection data respectively to obtain a first feature population; the first feature population includes multiple feature subsets, each of which includes multiple data features; and to perform feature iteration based on the classification fitness of the multiple feature subsets in the first feature population to obtain the sample fusion features of the sample tobacco.

6. The apparatus according to claim 5, characterized in that, The model training module is further configured to: construct a first model population based on multiple classification models; determine a genetic classification model for the kth round from the multiple classification models based on the classification accuracy of each classification model in the kth model population, where k is a positive integer; perform parameter crossover and parameter mutation based on the model parameters of the genetic classification model for the kth round to obtain the (k+1)th model population; if k equals M, determine the target classification model with the highest classification accuracy from the Mth model population, where M is a positive integer greater than 1; if k is less than M, increment k by 1 and return to execute the determination of a genetic classification model for the kth round from the multiple classification models based on the classification accuracy of each classification model in the kth model population.

7. The apparatus according to claim 5, characterized in that, The feature selection module is further configured to determine the genetic feature subset for the i-th round from the multiple feature subsets based on the classification fitness of the multiple feature subsets in the i-th feature population; and to perform feature crossover and feature mutation operations based on the genetic feature subsets to obtain the (i+1)-th feature population. If i equals N, based on the classification fitness of multiple feature subsets in the Nth feature population, determine the target feature subset with the highest classification fitness, and obtain the sample fusion features of the sample tobacco. If i is less than N, increment i by 1 and return to the previous step to perform classification fitness based on multiple feature subsets in the i-th feature population, and determine the genetic feature subset of the i-th round from the multiple feature subsets, where i is a positive integer and N is a positive integer greater than 1.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.