Cigarette brand identification method and device based on near-infrared spectrum and medium

CN118626927BActive Publication Date: 2026-08-11CHINA TOBACCO ZHEJIANG IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

然而,在线加工环境复杂多变,稳定性差,因此必须解决环境对在线光谱产生的潜在干扰;另,在实际制丝生产过程中,卷烟牌号种类繁多,又无疑增加了牌号预测的难度

Benefits of technology

[0016] By adopting the above technical solutions, the embodiments of this disclosure can achieve the following beneficial technical effects: In this disclosure, the combination of convolutional neural networks and machine learning models improves the accuracy and stability of identifying multiple tobacco brands; the use of convolutional neural networks to extract features from spectral data effectively reduces data dimensionality, avoids the curse of dimensionality, and improves recognition efficiency; the method is simple and easy to implement, with high accuracy and stability, and can be applied not only in laboratories but also in online near-infrared cigarette brand identification and automated production in the tobacco industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626927B_ABST
    Figure CN118626927B_ABST
Patent Text Reader

Abstract

This disclosure relates to a near-infrared spectroscopy method, apparatus, and medium for cigarette brand identification, belonging to the field of cigarette brand identification technology. The method includes: acquiring real-time online near-infrared spectra; using a pre-trained ResNeXt18-CNN-LightGBM hybrid model and based on the real-time online near-infrared spectra to obtain real-time online near-infrared spectral cigarette brand identification results. The training of the ResNeXt18-CNN-LightGBM hybrid model includes: collecting real-time online near-infrared spectra of tobacco samples; preprocessing the spectra; performing a first feature extraction on the preprocessed spectra using a constructed ResNeXt18 network model; reducing the dimensionality of the first extracted features; performing a second feature extraction on the dimensionality-reduced features using a custom three-layer CNN network model; and inputting the second extracted features into a LightGBM classifier model for cigarette brand classification. This disclosure improves the accuracy and stability of identifying multiple tobacco brands.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of cigarette brand identification technology, and in particular to a near-infrared spectroscopy cigarette brand identification method, device and medium. Background Technology

[0002] Cigarette brands are classifications based on product style characteristics and quality levels, developed from the foundation of cigarette brand development. Different brands have different leaf blends, flavorings, and other ingredients. Online classification and identification of cigarette brands is of great significance for cigarette brand management, production quality evaluation, and cigarette quality control.

[0003] Currently, researchers have utilized near-infrared spectroscopy combined with chemometric algorithms such as Support Vector Machine (SVM), Linear Discriminant Analysis (LDA), and Qualitative Partial Least Squares (DPLS) to construct various identification models for qualitative analysis of tobacco leaves. Qualitative analysis covers the classification and identification of cigarette brands, as well as the classification and identification of flue-cured tobacco by part grade, origin, and aroma style. For example, different cigarette brand classification and identification methods based on near-infrared spectroscopy include: a method for classifying and identifying five cigarette brands based on laboratory near-infrared spectroscopy and OPLS-DA; a method for identifying six cigarette brands using laboratory near-infrared spectroscopy technology based on firefly-optimized support vector machine parameters; and a method for identifying two cigarette brands using laboratory near-infrared spectroscopy based on S-KNN and IS-KNN. Methods for classifying and identifying tobacco leaves by different origins based on near-infrared spectroscopy include: a method for identifying the origin patterns of flue-cured tobacco leaves based on NIR-PCA-SVM combined technology, and a method for identifying the origin of domestic flue-cured tobacco based on principal component analysis and Mahalanobis distance; methods for classifying and identifying tobacco leaves by different grades based on near-infrared spectroscopy include: a near-infrared spectral model for classifying tobacco leaf grades based on DPLS, and a projection analysis model based on principal component analysis and Fisher's criterion (PPF) to classify the parts of tobacco leaves; methods for classifying and identifying the aroma style of tobacco leaves based on near-infrared spectroscopy include: a tobacco style identification method based on PCA-Mahalanobis distance, and a tobacco style feature classification method based on near-infrared spectral information and random forest.

[0004] The traditional chemometric methods and machine learning models mentioned above have certain limitations when processing high-dimensional spectral data. For example, firstly, even with two random sets of classification data, PLS-DA can clearly distinguish between the two classes, meaning it is prone to overfitting; secondly, some distance-based algorithms (such as KNN) and certain classifiers (such as support vector machines) may encounter performance bottlenecks when processing high-dimensional data; thirdly, the curse of dimensionality: as the data dimensionality increases, the required number of samples grows exponentially, however, in practical applications, obtaining a large number of labeled samples is usually very difficult and expensive; fourthly, feature selection is difficult: features in high-dimensional spectral data may not all be useful or relevant, and selecting the most suitable feature subset is a challenge because not all features contribute to the prediction or classification task.

[0005] Although current laboratory near-infrared spectroscopy has improved detection speed, it remains an offline detection method with latency issues, unable to directly guide online production. Using online near-infrared technology to predict cigarette brands offers unique advantages over traditional laboratory near-infrared methods, including real-time and non-destructive testing, and can be used to guide online production. However, the online processing environment is complex, variable, and unstable, necessitating the resolution of potential environmental interference with online spectra. Furthermore, the wide variety of cigarette brands involved in actual cigarette manufacturing undoubtedly increases the difficulty of brand prediction. Summary of the Invention

[0006] This disclosure proposes a near-infrared spectroscopy method, apparatus, and medium for identifying cigarette brands to solve the aforementioned technical problems.

[0007] According to a first aspect of this disclosure, a near-infrared spectral cigarette brand identification method is provided. The method includes: acquiring real-time online near-infrared spectra; using a pre-trained ResNeXt18-CNN-LightGBM hybrid model and based on the real-time online near-infrared spectra to obtain real-time online near-infrared spectral cigarette brand identification results, wherein training the ResNeXt18-CNN-LightGBM hybrid model includes: collecting real-time online near-infrared spectra of tobacco samples; preprocessing the spectra; performing a first feature extraction on the preprocessed spectra using a constructed ResNeXt18 network model; reducing the dimensionality of the first extracted features; performing a second feature extraction on the dimensionality-reduced features using a custom three-layer CNN network model; and inputting the second extracted features into a LightGBM classifier model for cigarette brand classification.

[0008] In some embodiments, the preprocessing of the spectrum includes: according to the formula:

[0009] The spectrum is subjected to a standard normal variable transformation, where x i,kx represents the k-th wavelength value of the spectrum of the i-th sample. i Let x represent the mean of the k-th wavelength value of the spectrum of the i-th sample, where k = 1, 2, ..., m, m represents the number of wavelength points, and i = 1, 2, ..., n, n represents the number of samples. i,SNV This represents the transformed spectrum.

[0010] In some embodiments, constructing the ResNet18 network model includes: the ResNet18 network model uses grouped convolutions to first slice the input data into multiple groups of features; then performing convolution operations on each group of features; using the same topology in each branch of the network; and then combining it with a residual network, as expressed in the following expression: Where C represents the number of groups, T i This represents a series of convolution operations.

[0011] In some embodiments, the dimensionality reduction of the features extracted in the first extraction includes: sampling the features extracted in the first extraction at interval points.

[0012] In some embodiments, the structure of the custom three-layer CNN network model includes: batch normalization, a first convolutional layer, a first max pooling layer, a second convolutional layer, a second max pooling layer, a third convolutional layer, a third max pooling layer, and a fully connected layer.

[0013] According to a second aspect of this disclosure, a near-infrared spectral cigarette brand identification device is provided, comprising: an acquisition module for acquiring real-time online near-infrared spectra; and an identification module for obtaining real-time online near-infrared spectral cigarette brand identification results based on the real-time online near-infrared spectra using a pre-trained ResNeXt18-CNN-LightGBM hybrid model, wherein training the ResNeXt18-CNN-LightGBM hybrid model includes: acquiring real-time online near-infrared spectra of tobacco samples; preprocessing the spectra; performing a first feature extraction on the preprocessed spectra using a constructed ResNeXt18 network model; reducing the dimensionality of the first extracted features; performing a second feature extraction on the dimensionality-reduced features using a custom three-layer CNN network model; and inputting the second extracted features into a LightGBM classifier model for cigarette brand classification.

[0014] According to a third aspect of this disclosure, a near-infrared spectroscopy cigarette brand identification device is provided, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute the near-infrared spectroscopy cigarette brand identification method as described above based on instructions stored in the memory.

[0015] According to a fourth aspect of this disclosure, a computer-storeable medium is provided having computer program instructions stored thereon, which, when executed by a processor, implement the near-infrared spectroscopy cigarette brand identification method as described above.

[0016] By adopting the above technical solutions, the embodiments of this disclosure can achieve the following beneficial technical effects: In this disclosure, the combination of convolutional neural networks and machine learning models improves the accuracy and stability of identifying multiple tobacco brands; the use of convolutional neural networks to extract features from spectral data effectively reduces data dimensionality, avoids the curse of dimensionality, and improves recognition efficiency; the method is simple and easy to implement, with high accuracy and stability, and can be applied not only in laboratories but also in online near-infrared cigarette brand identification and automated production in the tobacco industry. Attached Figure Description

[0017] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the specification, serve to explain the principles of this disclosure.

[0018] This disclosure can be more clearly understood with reference to the accompanying drawings and the following detailed description.

[0019] Figure 1 This is a flowchart illustrating a near-infrared spectroscopy cigarette brand identification method according to some embodiments of the present disclosure.

[0020] Figure 2 This shows the raw near-infrared spectrum of tobacco shreds according to some embodiments of the present disclosure.

[0021] Figure 3 This shows an online near-infrared SNV preprocessing spectrum of tobacco shreds according to some embodiments of the present disclosure.

[0022] Figure 4 This is a schematic diagram illustrating the ResNeXt18 module group structure according to some embodiments of the present disclosure.

[0023] Figure 5 This is a schematic diagram illustrating the structure of a CNN-LightGBM classifier model according to some embodiments of the present disclosure.

[0024] Figure 6 This is a diagram illustrating the overall framework of a ResNeXt18-CNN-LightGBM hybrid model according to some embodiments of the present disclosure.

[0025] Figure 7 This illustrates an online near-infrared spectral feature map extracted by a feature extraction module according to some embodiments of the present disclosure.

[0026] Figure 8 This is a graph showing a comparison of the accuracy of different methods according to some embodiments of this disclosure.

[0027] Figure 9 This is a block diagram illustrating a near-infrared spectroscopy cigarette brand identification device according to some embodiments of the present disclosure.

[0028] Figure 10 This is a block diagram illustrating a near-infrared spectroscopy cigarette brand identification device according to other embodiments of the present disclosure.

[0029] Figure 11 This is a block diagram illustrating a computer system for implementing some embodiments of the present disclosure. Detailed Implementation

[0030] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.

[0031] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.

[0032] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.

[0033] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0034] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.

[0035] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0036] Currently, traditional chemometric methods and machine learning models have certain limitations when processing high-dimensional spectral data. For example, firstly, even with two random sets of classification data, PLS-DA can clearly distinguish between the two classes, meaning it is prone to overfitting; secondly, some distance-based algorithms (such as KNN) and certain classifiers (such as support vector machines) may encounter performance bottlenecks when processing high-dimensional data; thirdly, the curse of dimensionality: as the data dimensionality increases, the required number of samples grows exponentially, however, in practical applications, obtaining a large number of labeled samples is usually very difficult and expensive; fourthly, feature selection is difficult: features in high-dimensional spectral data may not all be useful or relevant, and selecting the most suitable subset of features is a challenge because not all features contribute to the prediction or classification task.

[0037] Although current laboratory near-infrared spectroscopy has improved detection speed, it remains an offline detection method with latency issues, unable to directly guide online production. Using online near-infrared technology to predict cigarette brands offers unique advantages over traditional laboratory near-infrared methods, including real-time and non-destructive testing, and can be used to guide online production. However, the online processing environment is complex, variable, and unstable, thus requiring solutions to address potential environmental interference with online spectra. Furthermore, the wide variety of cigarette brands involved in actual cigarette manufacturing undoubtedly increases the difficulty of brand prediction.

[0038] In view of this, this disclosure proposes a near-infrared spectroscopy method, device, and medium for cigarette brand identification. By combining convolutional neural networks and machine learning models, the accuracy and stability of identifying multiple cigarette brands are improved. The use of convolutional neural networks to extract features from spectral data effectively reduces data dimensionality, avoids the curse of dimensionality, and improves identification efficiency. This method is simple and easy to implement, with high accuracy and stability. It can be applied not only in the laboratory but also in online near-infrared cigarette brand identification and automated production in the tobacco industry.

[0039] Figure 1 This is a flowchart illustrating a near-infrared spectroscopy cigarette brand identification method according to some embodiments of the present disclosure. Figure 1 As shown, the near-infrared spectroscopy cigarette brand identification method includes steps 110 to 120.

[0040] In step 110, the real-time near-infrared spectrum is acquired;

[0041] In step 120, the near-infrared spectral cigarette brand identification result is obtained using the pre-trained ResNeXt18-CNN-LightGBM hybrid model and based on the real-time near-infrared spectrum. The training of the ResNeXt18-CNN-LightGBM hybrid model includes: acquiring real-time online near-infrared spectra of tobacco samples; preprocessing the spectra; performing a first feature extraction on the preprocessed spectra using the constructed ResNeXt18 network model; reducing the dimensionality of the first extracted features; performing a second feature extraction on the dimensionality-reduced features using a custom three-layer CNN network model; and inputting the second extracted features into the LightGBM classifier model for cigarette brand classification.

[0042] In some embodiments, the spectrum is preprocessed, including:

[0043] According to the formula: The spectrum is subjected to a standard normal variable transformation, where x i,k x represents the k-th wavelength value of the spectrum of the i-th sample. i Let x represent the mean of the k-th wavelength value of the spectrum of the i-th sample, where k = 1, 2, ..., m, m represents the number of wavelength points, and i = 1, 2, ..., n, n represents the number of samples. i,SNV This represents the transformed spectrum.

[0044] In some embodiments, constructing the ResNet18 network model includes: the ResNet18 network model uses grouped convolutions to first slice the input data into multiple groups of features; then performing convolution operations on each group of features; using the same topology in each branch of the network; and then combining it with a residual network, as expressed in the following expression: Where C represents the number of groups, T i This represents a series of convolution operations.

[0045] In some embodiments, the dimensionality reduction of the features extracted in the first extraction includes: sampling the features extracted in the first extraction at interval points.

[0046] In some embodiments, the structure of the custom three-layer CNN network model includes: batch normalization, a first convolutional layer, a first max pooling layer, a second convolutional layer, a second max pooling layer, a third convolutional layer, a third max pooling layer, and a fully connected layer.

[0047] In some embodiments, the ResNeXt18-CNN-LightGBM hybrid network model has the following structure: ResNeXt18 extracts online near-infrared spectral features and performs feature dimensionality reduction; a custom 3-layer CNN network structure further extracts online near-infrared spectral features; and the lightweight gradient booster algorithm LightGBM uses the extracted features to perform a brand classification task.

[0048] This method uses a convolutional neural network to extract near-infrared spectral data features, and then inputs the extracted near-infrared spectral features into a machine learning model to identify cigarette brands.

[0049] Online near-infrared (NIR) equipment possesses real-time detection capabilities, thus generating an astonishing amount of spectral data in the tens of millions. In the actual online cigarette production process, the sample size varies significantly between different brands. To improve the efficiency of the deep learning model and more realistically simulate the actual online production situation, this embodiment specifically selected online near-infrared spectra of 18 different brands of tobacco shreds from the tobacco processing stage of the production line, based on the proportion of each brand in the total sample size during actual production, resulting in a total of 61,008 online near-infrared spectra; some of the original online near-infrared spectral data of the tobacco shreds are shown below. Figure 2 As shown.

[0050] Standard normal variation (SNV) was performed on the raw online near-infrared spectrum to reduce baseline drift. The preprocessed online near-infrared SNV spectrum of tobacco is shown below. Figure 3 As shown.

[0051] The preprocessed online near-infrared spectra were divided into a training set and a blind test set. The training set consisted of 42,698 online near-infrared spectral data points, while the other 18,310 online near-infrared spectral data points were used to test the accuracy of the model's prediction of brand information in the blind test.

[0052] Online near-infrared spectral features extracted by the ResNeXt18 network model, with data shape (number of samples, 1024).

[0053] The online near-infrared spectral features extracted by the ResNeXt18 network model above are sampled in a dimensionality reduction manner every 4 points. The shape of the dimensionality-reduced online near-infrared spectral feature data is (number of samples, 256).

[0054] The dimensionality-reduced online near-infrared spectral features are then fed into a custom 3-layer CNN network for a second feature extraction. The network structure is as follows: Batch Normalization: Receives the dimensionality-reduced online near-infrared spectral features extracted by the ResNeXt18 network and performs batch normalization; Convolutional Layer 1 (Conv1D): Has 128 convolutional kernels with a kernel size of (13,1) and a stride of 3, performing convolution on the online near-infrared spectral features; Max Pooling Layer 1 (MaxPooling1D): Has a pooling window size of 2 and a stride of 2, performing pooling on the output of Convolutional Layer 1; Convolutional Layer 2 (Conv1D): Has... There are 256 convolutional kernels with a kernel size of (13, 128) and a stride of 1, which convolve the above online near-infrared spectral features; MaxPooling1D: pooling window size of 2 and stride of 2, pooling the output of convolutional layer 2; Convolutional layer 3 (Conv1D): has 512 convolutional kernels with a kernel size of (13, 256) and a stride of 1, which convolve the above online near-infrared spectral features; MaxPooling1D: pooling window size of 2 and stride of 2, pooling the output of convolutional layer 3; Fully connected layer (Flatten): flattens the above input into a one-dimensional vector.

[0055] The features extracted from the above 3-layer CNN network model have a data shape of (number of samples, 512), as follows: Figure 7 As shown, the data is fed into the LightGBM classifier model for brand classification training. A schematic diagram of this 3-layer CNN-LightGBM classifier model is shown below. Figure 5 As shown.

[0056] The hyperparameters of the LightGBM classifier model are set as follows: the maximum number of leaf nodes (num_leaves) in each decision tree is set to 31; the minimum number of data samples in a leaf node (min_data_in_leaf) is set to 20 to prevent overfitting; the step size for updating model weights in each iteration (learning_rate) is set to 0.1; feature_fraction is set to 1.0 to consider all features in each iteration; and bagging_fraction is set to 1.0 to use all data samples in each iteration.

[0057] The overall framework diagram of the ResNeXt18-CNN-LightGBM hybrid model is shown above. Figure 6The model structure and the output data shape of each layer are shown in Table 1. The trained ResNeXt18-CNN-LightGBM hybrid model was used to perform grade classification prediction on online near-infrared spectral blind test data. The prediction results for 18 grades are shown in Table 2.

[0058] The classification results of 18 grades using four comparative models—a 3-layer CNN model, a LightGBM model, a KNN model, and a PLS-DA model—are shown in Tables 3, 4, 5, and 6, respectively.

[0059] The accuracy comparison of this method with four other comparative models (3-layer CNN model, LightGBM model, KNN model, and PLS-DA model) for classifying 18 grades is shown in the figure below. Figure 8 As shown.

[0060] Table 1: Structure of the ResNeXt18-CNN-LightGBM Hybrid Model

[0061]

[0062] Table 2: Prediction Results of ResNeXt18-CNN-LightGBM

[0063]

[0064] Table 3: CNN Prediction Results

[0065]

[0066] Table 4: LightGBM Prediction Results

[0067]

[0068] Table 5: KNN Prediction Results

[0069]

[0070] Table 6: PLS-DA Prediction Results

[0071]

[0072] In the near-infrared spectroscopy cigarette brand identification method of this disclosure, the combination of convolutional neural networks and machine learning models improves the accuracy and stability of identifying multiple cigarette brands. By using convolutional neural networks to extract features from spectral data, the data dimensionality is effectively reduced, avoiding the curse of dimensionality and improving identification efficiency. This method is simple and easy to implement, with high accuracy and stability. It can be applied not only in the laboratory but also in online near-infrared cigarette brand identification and automated production in the tobacco industry.

[0073] Figure 9 This is a block diagram illustrating a near-infrared spectroscopy cigarette brand identification device according to some embodiments of the present disclosure. Figure 9 As shown, the near-infrared spectroscopy cigarette brand identification device 900 includes an acquisition module 910 and an identification module 920.

[0074] The acquisition module 910 is configured to acquire real-time online near-infrared spectra;

[0075] The recognition module 920 is configured to use a pre-trained ResNeXt18-CNN-LightGBM hybrid model and the real-time online near-infrared spectrum to obtain real-time online near-infrared cigarette brand recognition results. The training of the ResNeXt18-CNN-LightGBM hybrid model includes: acquiring real-time online near-infrared spectra of tobacco samples; preprocessing the spectra; performing a first feature extraction on the preprocessed spectra using the constructed ResNeXt18 network model; reducing the dimensionality of the first extracted features; performing a second feature extraction on the dimensionality-reduced features using a custom three-layer CNN network model; and inputting the second extracted features into the LightGBM classifier model for cigarette brand classification.

[0076] In the apparatus of this disclosure, the combination of convolutional neural networks and machine learning models improves the accuracy and stability of identifying multiple tobacco brands; the use of convolutional neural networks to extract features from spectral data effectively reduces data dimensionality, avoids the curse of dimensionality, and improves recognition efficiency; the method is simple and easy to implement, with high accuracy and stability, and can be applied not only in the laboratory but also in online near-infrared cigarette brand identification and automated production in the tobacco industry.

[0077] Figure 10 This is a block diagram illustrating a near-infrared spectroscopy cigarette brand identification device according to other embodiments of the present disclosure. Figure 10 As shown, the near-infrared spectroscopy cigarette brand identification device 1000 includes a memory 1010 and a processor 1020 coupled to the memory 1010. The memory 1010 is used to store instructions for executing embodiments of the near-infrared spectroscopy cigarette brand identification method. The processor 1020 is configured to execute the near-infrared spectroscopy cigarette brand identification method in any of the embodiments of this disclosure based on the instructions stored in the memory 1010.

[0078] Figure 11 This is a block diagram illustrating a computer system for implementing some embodiments of the present disclosure. Figure 11 As shown, the computer system 1100 can be represented in the form of a general computing device. The computer system 1100 includes a memory 1110, a processor 1120, and a bus 1130 connecting different system components.

[0079] The memory 1110 may include, for example, system memory, non-volatile storage media, etc. The system memory may store, for example, an operating system, application programs, a boot loader, and other programs. The system memory may include volatile storage media, such as random access memory (RAM) and / or cache memory. The non-volatile storage media may store, for example, instructions for executing at least one of the corresponding embodiments of the near-infrared spectroscopy cigarette brand identification method. Non-volatile storage media include, but are not limited to, disk storage, optical storage, flash memory, etc.

[0080] The processor 1120 can be implemented using a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete hardware components such as discrete gates or transistors. Accordingly, each module, such as the acquisition module and the identification module, can be implemented by the central processing unit (CPU) running instructions in the memory to execute the corresponding steps, or by dedicated circuitry to execute the corresponding steps.

[0081] Bus 1130 can use any of the various bus architectures. For example, bus architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, and Peripheral Component Interconnect (PCI) bus.

[0082] The computer system 1100 may also include an input / output interface 1140, a network interface 1150, and a storage interface 1160. These interfaces 1140, 1150, and 1160, as well as the memory 1110 and processor 1120, can be connected via a bus 1130. The input / output interface 1140 provides a connection interface for input / output devices such as a monitor, mouse, and keyboard. The network interface 1150 provides a connection interface for various networked devices. The storage interface 1160 provides a connection interface for external storage devices such as floppy disks, USB flash drives, and SD cards.

[0083] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations thereof, can be implemented by computer-readable program instructions.

[0084] These computer-readable program instructions are provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable device to produce a machine, such that execution of the instructions by the processor produces means for implementing the functions specified in one or more boxes of the flowchart and / or block diagram.

[0085] These computer-readable program instructions may also be stored in a computer-readable storage medium. These instructions cause a computer to work in a particular manner to produce an article of manufacture, including instructions that implement the functions specified in one or more boxes in a flowchart and / or block diagram.

[0086] This disclosure may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects.

[0087] This disclosure combines convolutional neural networks and machine learning models to improve the accuracy and stability of identifying various tobacco brands. By using convolutional neural networks to extract features from spectral data, the data dimensionality is effectively reduced, avoiding the curse of dimensionality and improving recognition efficiency. This method is simple and easy to implement, with high accuracy and stability. It can be applied not only in the laboratory but also in online near-infrared cigarette brand identification and automated production in the tobacco industry.

[0088] This concludes the detailed description of the near-infrared spectroscopy method, apparatus, and medium for identifying cigarette brands according to this disclosure. To avoid obscuring the concept of this disclosure, some details known in the art have not been described. Those skilled in the art can fully understand how to implement the technical solutions disclosed herein based on the above description.

[0089] While specific embodiments of this disclosure have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this disclosure. Those skilled in the art should understand that modifications can be made to the above embodiments without departing from the scope and spirit of this disclosure. The scope of this disclosure is defined by the appended claims.

Claims

1. A method for identifying cigarette brands using near-infrared spectroscopy, characterized in that, The method includes: Acquire real-time online near-infrared spectra; Using a pre-trained ResNeXt18-CNN-LightGBM hybrid model and based on the real-time online near-infrared spectrum, real-time online near-infrared spectral cigarette brand recognition results are obtained. The training of the ResNeXt18-CNN-LightGBM hybrid model includes: acquiring real-time online near-infrared spectra of tobacco samples; preprocessing the spectra; performing a first feature extraction on the preprocessed spectra using the constructed ResNeXt18 network model; reducing the dimensionality of the first-extracted features; performing a second feature extraction on the dimensionality-reduced features using a custom three-layer CNN network model; and inputting the second-extracted features into the LightGBM classifier model for cigarette brand classification. The network structure of the custom three-layer CNN model is as follows: Batch standardization: Receive the online near-infrared spectral features extracted and dimensionality reduced by the ResNeXt18 network mentioned above, and perform batch standardization; Convolutional layer 1: It has 128 convolutional kernels with a kernel size of (13,1) and a stride of 3, and performs convolution on the above-mentioned online near-infrared spectral features; Max pooling layer 1: The pooling window size is 2 and the stride is 2. The output of convolutional layer 1 is pooled. Convolutional layer 2: It has 256 convolutional kernels with a kernel size of (13, 128) and a stride of 1, and performs convolution on the above-mentioned online near-infrared spectral features; Max pooling layer 2: The pooling window size is 2 and the stride is 2. The output of convolutional layer 2 is pooled. Convolutional layer 3: It has 512 convolutional kernels with a kernel size of (13,256) and a stride of 1, and performs convolution on the above-mentioned online near-infrared spectral features; Max pooling layer 3: The pooling window size is 2 and the stride is 2. The output of convolutional layer 3 is pooled. Fully connected layer: flattens the above input into a one-dimensional vector.

2. The near-infrared spectroscopy cigarette brand identification method according to claim 1, characterized in that, The preprocessing of the spectrum includes: According to the formula: The spectrum is subjected to standard normal variable transformation, where x i,k x represents the k-th wavelength value of the spectrum of the i-th sample. i Let x represent the mean of the k-th wavelength value of the spectrum of the i-th sample, where k = 1, 2, ..., m, m represents the number of wavelength points, and i = 1, 2, ..., n, n represents the number of samples. i,SNV This represents the transformed spectrum.

3. The near-infrared spectroscopy cigarette brand identification method according to claim 1, characterized in that, The ResNeXt18 network model is constructed, including: The ResNet18 network model uses grouped convolutions, which first slice the input data into multiple groups of features; Perform convolution operations on each group of features separately; Using the same topology in each branch of the network, and then combining it with the residual network, the expression is: Where C represents the number of groups, T i This represents a series of convolution operations.

4. The near-infrared spectroscopy cigarette brand identification method according to claim 1, characterized in that, The dimensionality reduction of the features extracted in the first step includes: The features extracted in the first extraction are sampled at intervals.

5. A near-infrared spectroscopy cigarette brand identification device, characterized in that, include: The acquisition module is used to acquire real-time online near-infrared spectra. The recognition module is used to obtain real-time online near-infrared spectral cigarette brand recognition results based on the pre-trained ResNeXt18-CNN-LightGBM hybrid model and the real-time online near-infrared spectrum. The training of the ResNeXt18-CNN-LightGBM hybrid model includes: acquiring real-time online near-infrared spectra of tobacco samples; preprocessing the spectra; performing a first feature extraction on the preprocessed spectra using the constructed ResNeXt18 network model; reducing the dimensionality of the first extracted features; performing a second feature extraction on the dimensionality-reduced features using a custom three-layer CNN network model; and inputting the second extracted features into the LightGBM classifier model for cigarette brand classification. The network structure of the custom three-layer CNN model is as follows: Batch standardization: Receive the online near-infrared spectral features extracted and dimensionality reduced by the ResNeXt18 network mentioned above, and perform batch standardization; Convolutional layer 1: It has 128 convolutional kernels with a kernel size of (13,1) and a stride of 3, and performs convolution on the above-mentioned online near-infrared spectral features; Max pooling layer 1: The pooling window size is 2 and the stride is 2. The output of convolutional layer 1 is pooled. Convolutional layer 2: It has 256 convolutional kernels with a kernel size of (13, 128) and a stride of 1, and performs convolution on the above-mentioned online near-infrared spectral features; Max pooling layer 2: The pooling window size is 2 and the stride is 2. The output of convolutional layer 2 is pooled. Convolutional layer 3: It has 512 convolutional kernels with a kernel size of (13,256) and a stride of 1, and performs convolution on the above-mentioned online near-infrared spectral features; Max pooling layer 3: The pooling window size is 2 and the stride is 2. The output of convolutional layer 3 is pooled. Fully connected layer: flattens the above input into a one-dimensional vector.

6. A near-infrared spectroscopy cigarette brand identification device, characterized in that, include: Memory; as well as A processor coupled to the memory, the processor being configured to execute the near-infrared spectroscopy cigarette brand identification method as described in any one of claims 1 to 4, based on instructions stored in the memory.

7. A computer-storable medium, characterized in that, It stores computer program instructions, which, when executed by a processor, implement the near-infrared spectroscopy cigarette brand identification method as described in any one of claims 1 to 4.