Method for identifying proportion of caramelized yellow spot components and tracing cause of yellow spot smoke

CN122882352APending Publication Date: 2026-10-09ZHENGZHOU TOBACCO RES INST OF CNTC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610890695.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

除了油脂污染外,水分、香料组分、糖料体系、虫渍残留物等同样会导致纸张表面出现黄斑,进一步增加了污染源识别的复杂性

Benefits of technology

[0044]本发明依托DESN对光谱时序特征的深度挖掘能力,结合MLP的高效分类特性,实现五类香糖渍的精准细分,适配香糖渍内部不同类型的精细化判别需求,以便后续对黄斑的成因进行进一步细分。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122882352A_ABST
    Figure CN122882352A_ABST
Patent Text Reader

Abstract

The application provides a method for identifying the component proportion of a sugar-stained yellow spot, comprising the following steps: obtaining a hyperspectral image of a paper sugar-stained yellow spot, wherein the wavelength range of the hyperspectral image is 400-1000 nm; screening the hyperspectral image by using a continuous projection algorithm to obtain core spectral features; capturing the time sequence dependence and dynamic change rule of the core spectral features by using an improved deep echo state network to obtain high-dimensional dynamic features; the weight of all leaky integration layers in the improved deep echo state network is obtained by back propagation training; and performing nonlinear mapping and dimension reduction on the high-dimensional dynamic features by using a multilayer perceptron to obtain the component proportion of the sugar-stained yellow spot. The application also provides a method for tracing the cause of a yellow spot based on the method for identifying the component proportion of a sugar-stained yellow spot, which provides a basis for closed-loop control of cigarettes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cigarette quality monitoring technology, specifically to a method for identifying the proportion of components in gum stains and tracing the causes of yellow stains in cigarettes. Background Technology

[0002] In the cigarette production process, various flavorings and sugars are widely used on the production line to impart specific aromas and flavors to the product. If these flavorings and sugars are improperly proportioned, sprayed unevenly, have residues in the pipelines, or are not thoroughly cleaned, they can easily contaminate the paper materials in contact with the equipment (such as cigarette paper, tipping paper, inner lining paper, and filter rod forming paper). Once the paper surface is contaminated with a mixture of flavorings and sugars in different proportions, yellow spots will form, affecting not only the product's appearance but also potentially causing inherent quality problems such as off-odors and changes in flammability, and in severe cases, leading to the scrapping of the entire batch of products.

[0003] Different flavorings and sugars exhibit significant differences in chemical composition, polarity, and reactivity, resulting in varying behaviors in paper, including penetration, diffusion, oxidative discoloration, and Maillard reactions. Furthermore, different mixing ratios can lead to significant differences in the appearance and aging characteristics of yellow stains. Accurately identifying the specific types of flavorings and sugars causing yellow stains and their mixing ratios is crucial for reverse-engineering errors in proportioning, determining pipeline residues or cleaning malfunctions, and implementing targeted process adjustments.

[0004] On the other hand, the causes of yellow stains on cigarettes are diverse throughout the entire chain of production, processing, storage, and distribution. In addition to oil contamination, moisture, flavoring components, sugar systems, and insect residues can also cause yellow stains on the paper surface, further increasing the complexity of identifying pollution sources.

[0005] Traditional detection technologies (such as visual identification and chemical titration analysis) have significant limitations in addressing the various pollution scenarios mentioned above: First, they are inefficient, with long processing times per sample, making them unsuitable for the online control requirements of large-scale production; second, their qualitative accuracy is insufficient, failing to accurately identify characteristic pollutant components; and third, their traceability capabilities are weak, making it difficult to establish the correlation between pollution causes and production processes, resulting in a lack of targeted control for yellow-spotted smoke. Therefore, constructing an efficient, accurate, and traceable yellow-spotted smoke pollution source identification technology system has become an urgent need in the tobacco industry's quality control field.

[0006] In order to solve the above problems, people have been seeking an ideal technological solution. Summary of the Invention

[0007] Therefore, it is necessary to provide a method for identifying the proportion of components in gum stains and tracing the causes of yellow stains in cigarette smoke, in order to address the aforementioned technical problems.

[0008] To achieve the above objectives, this invention proposes a method for identifying the proportion of components in gum stains. First, a continuous projection algorithm is used to select the most representative spectral features, significantly reducing data dimensionality. Then, relying on an improved deep echo state network leakage integrator structure, the temporal dependence and dynamic change patterns in the spectrum are deeply mined, enabling the capture of subtle spectral differences between different gum stains. Finally, a simple and computationally efficient MLP classification head is used to quickly map the extracted high-dimensional dynamic features into five subcategories. Overall, this method combines deep feature representation capabilities with lightweight deployment advantages, accurately and stably meeting the business needs for refined gum stain type identification.

[0009] Furthermore, this invention proposes an intelligent detection process that integrates computer vision and spectral analysis. Its core idea lies in achieving an organic combination of spatial localization and spectral identification, as well as the coordinated cooperation between pixel classification and region decision-making. By deeply integrating image segmentation technology from computer vision with sequence modeling technology from spectral analysis, this process constructs a complete technical chain from macroscopic localization to microscopic identification, from pixel judgment to region decision-making, and ultimately establishes a link between pollution causes and production processes, forming a complete technical closed loop.

[0010] To achieve the above objectives, the first aspect of the present invention provides a method for identifying the proportion of components in gum stains, comprising the following steps:

[0011] Obtain hyperspectral images of paper gum stains, wherein the hyperspectral image band is 400-1000nm;

[0012] The hyperspectral image is filtered using a successive projection algorithm to obtain core spectral features;

[0013] An improved deep echo state network is used to capture the temporal dependence and dynamic change of core spectral features to obtain high-dimensional dynamic features; the weights of all leakage integration layers in the improved deep echo state network are obtained through backpropagation training.

[0014] By using a multilayer perceptron to perform nonlinear mapping and dimensionality reduction on high-dimensional dynamic features, the component ratios of gum-stained yellow spots were obtained.

[0015] Specifically, the proposed method for identifying the proportion of components in yellow stains on cigarette cigarettes is a feature selection, temporal feature mining, and classification discrimination combination modeling method for the subdivision and classification of five types of yellow stains on cigarette cigarettes. It includes the SPA continuous projection algorithm, Deep Echo State Network (DESN), and Multilayer Perceptron (MLP), referred to as the SPA-DESN-MLP model. The core relies on DESN's ability to deeply mine spectral temporal features and combines it with the efficient classification characteristics of MLP to achieve accurate subdivision of the five types of yellow stains, adapting to the fine discrimination needs of different types of yellow stains within the yellow stain.

[0016] DESN, as the core feature extraction module, has the core advantage of accurately capturing the temporal dependence and dynamic change patterns of spectral features. Its core is a leakage integrator structure, which performs layer-by-layer projection and nonlinear transformation on the core spectral features after SPA screening through trainable input weights, hidden state weights, and leakage rate. By using the leakage integral update mechanism to retain historical hidden state information, it can deeply mine the subtle temporal differences contained in the spectral features of gum stains. Compared with traditional static feature extraction methods, it can extract more discriminative dynamic features, laying the core feature foundation for the subdivision of the five types of gum stains. At the same time, through Dropout regularization and batch normalization, it effectively avoids model overfitting and improves the stability of feature extraction.

[0017] As the final classification core, the core advantage of MLP lies in achieving efficient and refined classification of dynamic features: the high-dimensional dynamic features extracted by DESN are input into the classification head composed of multiple fully connected layers. Through the ReLU activation function and hierarchical Dropout, the feature differences of the five types of gum stains are nonlinearly mapped and dimensionality reduced. Compared with complex classification networks, MLP has a simple structure and high computational efficiency, which can quickly complete the classification and discrimination of the five types of gum stains. Furthermore, through hierarchical regularization to balance the model's fitting ability and generalization ability, it ultimately achieves high-precision and high-stability subdivision of the five types of gum stains, meeting the business needs of accurate identification of gum stain types.

[0018] To achieve the above objectives, a second aspect of the present invention provides a method for tracing the causes of yellow-spotted smoke, comprising the following steps:

[0019] Acquire hyperspectral data of yellow-spot smoke in the 400-1000 nm band; generate pseudo-color images based on the hyperspectral data and convert them to the HSV color space;

[0020] The HSV color space is processed based on spatial localization steps to obtain the background area, filter area and cigarette body area. The cigarette body area is then identified based on the Unet network to obtain the suspected yellow spot area and normal cigarette tissue.

[0021] The following steps were used to identify gum stains in suspected macular regions: the continuous spectral curve of each pixel was extracted and its first derivative was calculated; the probability of each pixel’s contamination category was obtained by using a trained SPA-GWO-SVM classifier; the contamination categories include water stains, gum stains, oil stains, and insect stains; the categories of all pixels in each suspected macular region were counted, and the category with the larger proportion was the contamination category of that region.

[0022] If the stain is caused by chewing gum, the method for identifying the proportion of chewing gum components in the stain described in the first aspect is used to identify the proportion of chewing gum components in the stain and determine the cause of the stain based on the proportion of chewing gum components.

[0023] This solution proposes a two-level intelligent detection process integrating computer vision and spectral analysis. First, a semantic segmentation model is used to semantically segment the hyperspectral image, decomposing the complex cigarette hyperspectral image into four semantic parts: background, filter tip, normal cigarette tissue, and suspected macular region. This step achieves precise localization of the detection target and focuses computational resources on key suspected areas, eliminating interference from irrelevant backgrounds. Further, within the located region of interest (normal cigarette tissue and macular region), the continuous spectral curve of each pixel is extracted. A bidirectional long short-term memory network (BiLSTM) is used to model the temporal dependency of the spectral sequence, and an attention mechanism is combined to focus on key discriminative bands, achieving end-to-end mapping from raw spectral data to contamination categories. Further, to overcome the instability of single-pixel classification and fully utilize the prior knowledge that macular regions typically appear as patches in space, a post-processing workflow based on connected component analysis is introduced. Through a probability-weighted voting mechanism, classification evidence from all pixels within a contamination patch is integrated to make a collective decision, thereby obtaining a more stable and reasonable region-level classification result, initially screening regions where the contamination category is oil. Finally, for areas contaminated with oil, the method for determining the proportion of gum components in the gum stains described in the first aspect is used to identify the proportion of gum components in the gum stains, and to determine whether the yellow stains are caused by fragrance or sugar based on the proportion of gum components.

[0024] To achieve the above objectives, a third aspect of the present invention provides a device for identifying the proportion of components in gum stains, comprising:

[0025] The image acquisition module is configured to acquire a hyperspectral image of a gum stain yellow spot, wherein the hyperspectral image has a wavelength range of 400-1000 nm.

[0026] The feature filtering module is configured to use a successive projection algorithm to filter the hyperspectral image to obtain core spectral features;

[0027] The high-dimensional dynamic feature extraction module is configured to capture the temporal dependence and dynamic change law of core spectral features using an improved deep echo state network to obtain high-dimensional dynamic features; the weights of all leakage integral layers in the improved deep echo state network are obtained through backpropagation training.

[0028] The proportion recognition module is configured to use MLP to perform nonlinear mapping and dimensionality reduction on high-dimensional dynamic features to obtain the component proportions of the gum-stained yellow spots.

[0029] This solution creates an intelligent detection system that integrates computer vision and spectral analysis. Its core design concept is to enable precise spatial positioning and in-depth spectral identification, and to achieve synergistic effects between pixel-level fine classification and regional comprehensive decision-making. By integrating image segmentation technology and spectral feature analysis technology across dimensions, it constructs a full-chain technical architecture that ranges from macro-region locking to micro-component identification, and from single-pixel feature judgment to multi-pixel region decision-making.

[0030] This process mainly covers the following three core stages:

[0031] (1) Spatial localization stage: Based on hyperspectral image data, an RGB pseudo-color image is calculated, and then a color space threshold segmentation algorithm is used to separate the background area. Based on the overall pixel value of the cigarette holder and the known length specifications of the cigarette holder, the cigarette holder area and the cigarette body area of ​​the whole cigarette are determined. Its advantages are that it is extremely fast, requires no training, and consumes few resources, which is conducive to carrying out subsequent research on real-time detection of yellow spots on cigarettes.

[0032] (2) Spectral identification stage: Within the located region of interest - the macula, the continuous spectral curve of each pixel is extracted and the first derivative spectrum is calculated. First, based on the Successive Projections Algorithm (SPA) - Grey Wolf Optimizer (GWO) - Support Vector Machine (SVM) model, the four categories of water, gum, oil and insects are traced to clarify the cause of the macula.

[0033] (3) Subdivision stage: If it is determined to be a gum stain yellow spot, the spectral data is entered into SPA-DESN-MLP for further proportional identification to determine the cause.

[0034] To achieve the above objectives, a fourth aspect of the present invention provides a device for tracing the causes of yellow-spotted smoke, comprising:

[0035] The image acquisition module is configured to acquire hyperspectral images of yellow smoke, wherein the hyperspectral image has a wavelength range of 400-1000 nm.

[0036] The image conversion module is configured to generate an RGB pseudo-color image based on a hyperspectral image and convert it to the HSV color space;

[0037] The image segmentation module is configured to process the HSV color space based on the spatial localization step to obtain the background region, filter region and cigarette body region, and to identify the cigarette body region based on the Unet network to obtain the suspected macular region and normal cigarette tissue.

[0038] The gum stain yellow stain determination module is configured to identify gum stain yellow stains in suspected yellow stain areas based on the following steps: extracting the continuous spectral curve of each pixel and performing first-order differentiation; obtaining the contamination category probability of each pixel through a trained SPA-GWO-SVM classifier; the contamination categories include water stains, gum stains, oil stains, and insect stains; and statistically analyzing the categories of all pixels in each suspected yellow stain area, with the category having the largest proportion being the contamination category of that area.

[0039] The device for tracing the causes of yellow spots is the component ratio identification device for gum stains described in the third aspect, used to identify the component ratio of gum stains and determine the cause of yellow spots based on the gum component ratio.

[0040] To achieve the above objectives, a fifth aspect of the present invention provides a computer device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; and the processor is used to execute the program stored in the memory to implement the step of identifying the proportion of components in gum stains as described in the first aspect, or to implement the step of the method for tracing the causes of yellow stains as described in the second aspect.

[0041] To achieve the above objectives, a sixth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the step of identifying the proportion of components in gum stains as described in the first aspect, or the step of the method for tracing the causes of yellow stains as described in the second aspect.

[0042] To achieve the above objectives, the seventh aspect of the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the step of identifying the proportion of components in gum stains as described in the first aspect, or the step of the method for tracing the causes of yellow stains as described in the second aspect.

[0043] The beneficial effects of this invention are as follows:

[0044] This invention leverages DESN's ability to deeply mine spectral temporal features and combines it with the efficient classification characteristics of MLP to achieve precise subdivision of five types of gum stains. It adapts to the need for refined discrimination of different types of gum stains, so as to further subdivide the causes of yellow spots in the future.

[0045] Furthermore, this invention constructs a collaborative analysis framework of fine spatial domain segmentation and precise spectral domain classification: First, the HSV color space is processed based on a color space threshold segmentation algorithm to obtain the background region, filter region, and cigarette body region. Then, the cigarette body region is identified based on a pre-trained yellow spot region recognition model to obtain suspected yellow spot regions and normal cigarette tissue. Next, the region contamination category is identified based on a trained SPA-GWO-SVM classifier. For yellow spot cigarette regions identified as having a sugar stain contamination category, the SPA-DESN-MLP model is used for further subdivision to accurately identify the proportions of five sugar ingredients on the yellow spot cigarette. Furthermore, based on the ingredient proportions, the contamination type of the yellow spot cigarette is determined to be either flavoring or sugar, providing an efficient and reliable deep learning solution for quality inspection in the tobacco industry. Attached Figure Description

[0046] Figure 1 This is a flowchart illustrating the method for identifying the proportion of components in gum stains as described in Embodiment 1 of the present invention;

[0047] Figure 2 This is a flowchart illustrating the method for tracing the causes of yellow-spotted smoke as described in Embodiment 2 of the present invention;

[0048] Figure 3 This is a flowchart illustrating the method for tracing the causes of yellow-spotted smoke as described in Embodiment 2 of the present invention;

[0049] Figure 4 This is a schematic diagram of the SE-UNET network of the present invention. Detailed Implementation

[0050] This invention uses the SPA-DESN-MLP model to subdivide the yellow stains on paper with gum stains, accurately identifying the proportions of five types of gum on the stains. It provides an efficient and reliable deep learning solution for quality inspection in the tobacco industry, and offers a powerful quantitative and visualization tool for rapid location of pollution sources, cause analysis, and quality control throughout the entire cigarette production process.

[0051] The technical solution of the present invention will be further described in detail below through specific embodiments.

[0052] Example 1

[0053] This embodiment provides a method for identifying the proportion of components in gum-stained yellow spots, such as... Figure 1 As shown, it includes the following steps:

[0054] Step S1: Obtain a hyperspectral image of the paper gum stains, wherein the hyperspectral image has a wavelength range of 400-1000 nm.

[0055] Specifically, after obtaining the hyperspectral image of the paper gum stains, spatial neighborhood averaging, SG smoothing, and first derivative calculation are performed on the hyperspectral image in sequence.

[0056] Specifically, in this embodiment, when performing spatial neighborhood averaging, the average is calculated based on 3*3 spectra to suppress spatial noise and improve the representativeness of local spectra.

[0057] Step S2: Use the continuous projection algorithm to filter the hyperspectral image to obtain core spectral features.

[0058] Specifically, in this embodiment, when using the continuous projection algorithm to filter hyperspectral images, 50 bands are extracted.

[0059] Step S3: The improved deep echo state network is used to capture the temporal dependence and dynamic change law of the core spectral features to obtain high-dimensional dynamic features; the weights of all leakage integral layers in the improved deep echo state network are obtained through backpropagation training.

[0060] Step S4: The high-dimensional dynamic features are nonlinearly mapped and dimensionality reduced using MLP to obtain the component ratios of the gum-stained yellow spots. In this embodiment, the component ratios include five categories: 4:0, 3:1, 2:2, 1:3, and 0:4.

[0061] It is understood that this embodiment provides a feature selection-temporal feature mining-classification and discrimination combined modeling method for the subdivision and classification of five types of gum stains on cigarettes, namely SPA-DESN-MLP. The core relies on DESN's deep mining capabilities of spectral temporal features, combined with the efficient classification characteristics of MLP, to achieve accurate subdivision of the five types of gum stains, adapting to the refined discrimination needs of different types within the gum stains.

[0062] Specifically, DESN, as the core feature extraction module, has the core advantage of accurately capturing the temporal dependence and dynamic change patterns of spectral features: its core is a leakage integrator structure, which performs layer-by-layer projection and nonlinear transformation on the core spectral features after SPA screening through trainable input weights, hidden state weights, and leakage rate; it retains historical hidden state information by using the leakage integral update mechanism, which can deeply mine the subtle temporal differences contained in the spectral features of gum stains. Compared with traditional static feature extraction methods, it can extract more discriminative dynamic features, laying the core feature foundation for the subdivision of the five types of gum stains; at the same time, through Dropout regularization and batch normalization, it effectively avoids model overfitting and improves the stability of feature extraction.

[0063] As the final classification core, the core advantage of MLP lies in achieving efficient and refined classification of dynamic features: the high-dimensional dynamic features extracted by DESN are input into the classification head composed of multiple fully connected layers. Through the ReLU activation function and hierarchical Dropout, the feature differences of the five types of gum stains are nonlinearly mapped and dimensionality reduced. Compared with complex classification networks, MLP has a simple structure and high computational efficiency, which can quickly complete the classification and discrimination of the five types of gum stains. Furthermore, through hierarchical regularization to balance the model's fitting ability and generalization ability, it ultimately achieves high-precision and high-stability subdivision of the five types of gum stains, meeting the business needs of accurate identification of gum stain types.

[0064] In this specific embodiment, the SPA-DESN-MLP needs to be trained using a large number of training samples. Specifically, the steps for creating the training samples are as follows:

[0065] A microsyringe is used to aspirate 1 μL or 2 μL of a specific pretreated contaminated sample, which is then applied to predetermined sites on different types of paper using an external dotting method. The specific pretreated contaminated sample includes mixtures of flavoring agents in different proportions. It is understood that the more diverse the proportions learned by the SPA-DESN-MLP model, the more it helps improve the model's accuracy and reliability, thereby establishing a reliable model for discriminating the proportion of flavoring agent stains from the perspective of real yellow-stained smoke. Therefore, in this embodiment, five flavoring agent / flavoring agent ratios of 4:0, 3:1, 2:2, 1:3, and 0:4 are selected as contamination sources. Correspondingly, the lightweight sorting head also includes five sorting heads: a 4:0 sorting head, a 3:1 sorting head, a 2:2 sorting head, a 1:3 sorting head, and a 0:4 sorting head.

[0066] Specifically, to accurately simulate the interaction mechanisms between different flavoring material contaminants and tobacco components in real-world production scenarios, and to avoid spectral distortion caused by directly using pure contaminants, this embodiment implements a standardized pretreatment process for all specific pretreated contaminant samples. The core objective is to artificially construct and accelerate the interfacial interactions and chemical reactions between the contaminant and tobacco, preparing a simulated composite contaminant source that characterizes their combined chemical state. This ensures that the spectral features captured by subsequent hyperspectral detection originate from the actual chemical interactions between the contaminant and tobacco components, rather than simply physical adhesion effects.

[0067] The pretreatment process constructs a mixture system of pollutants and tobacco shreds according to a scientifically optimized ratio to realistically simulate the pollutant infiltration behavior in actual production. After thorough mixing at a ratio of 30 mL of flavoring pollutant to 3.0 g of tobacco shreds, the mixture is placed in a sealed container and thoroughly shaken or stirred until homogeneous. Similarly, after thorough mixing at a ratio of 30 mL of sugar pollutant to 3.0 g of tobacco shreds, the mixture is placed in a sealed container and thoroughly shaken or stirred until homogeneous.

[0068] The mixed samples were placed in sealed containers and aged at room temperature in the dark for 48 hours. This crucial step provides sufficient time for the pollutant to fully impregnate the tobacco, dissolve and extract soluble components (such as sugars and alkaloids), and for any potential slow, heterogeneous chemical reactions between the two. Its mechanism is consistent with the long-term cumulative effect of yellow stain formation in actual production, effectively recreating the chemical process in real-world pollution scenarios. After aging, the samples passed appearance and homogeneity tests and were ready for use in preparing training samples with different proportions. The entire pretreatment process requires strict control of environmental variables to ensure experimental repeatability and the traceability and reliability of the data.

[0069] Example 2

[0070] This embodiment provides a method for tracing the causes of yellow-spotted smoke, such as... Figure 2 and Figure 3 As shown, it includes the following steps:

[0071] Step S21: Obtain a hyperspectral image of the yellow-spot smoke, wherein the wavelength of the hyperspectral image is 400-1000nm; generate an RGB pseudo-color image based on the hyperspectral image and convert it to the HSV color space.

[0072] Step S22: The HSV color space is processed based on the color space threshold segmentation algorithm to obtain the background area, filter area and cigarette body area. The cigarette body area is then identified based on the pre-trained macular region recognition model to obtain the suspected macular region and normal cigarette tissue.

[0073] Specifically, processing the HSV color space based on the color space threshold segmentation algorithm includes:

[0074] The V channel of the HSV color space is Gaussian blurred, and the background area is separated using a color space thresholding algorithm; the V channel is the luminance channel. In one embodiment, the color space thresholding algorithm uses a fixed threshold of 15.

[0075] The mouthpiece area of ​​the entire cigarette is determined based on the overall pixel value of the mouthpiece and the known length specifications of the mouthpiece.

[0076] The cigarette holder region and the cigarette body region are determined based on the color space threshold segmentation algorithm and the known length specifications of the cigarette holder.

[0077] It is understandable that morphological closing operations are used to first expand and then erode the small holes in the mask and connect the broken cigarette areas; then morphological opening operations are used to remove small white noise points.

[0078] In special cases, some cigarettes may have tobacco shreds protruding from the end, affecting the identification of the cigarette's outline. Therefore, for each cigarette, its width distribution is analyzed: for horizontal cigarettes, the vertical height of each column is considered, and for vertical cigarettes, the horizontal width of each row is considered. The average width is calculated, and areas with a width less than half the average width are set as background to prevent tobacco shreds from being mistaken for cigarette body.

[0079] In the specific implementation process, the steps for obtaining the mouthpiece area include:

[0080] The steps to determine the cigarette's orientation and splitting ratio are as follows:

[0081] Determine whether the cigarette is placed horizontally or vertically based on the width and height of the circumscribed rectangle.

[0082] After determining the cigarette's direction, the mouthpiece length is set according to a fixed ratio. The ratio of mouthpiece length to cigarette body length is 2:3, meaning the mouthpiece occupies 40% of the total length.

[0083] Then, color verification is used to determine the mouthpiece end, as follows:

[0084] Take a candidate region (length = cigarette mouthpiece length) at each end of the cigarette stick and calculate the percentage of orange pixels in that region.

[0085] Choose the end with the orange portion exceeding the threshold of 0.3 and being larger as the mouthpiece.

[0086] Finally, based on the determined mouthpiece end and fixed proportions, draw a straight dividing line (perpendicular to the direction of the cigarette) to divide the cigarette area into two parts: the mouthpiece and the body.

[0087] To further enhance visualization, the final three-channel mask was filled with color: mouthpiece area → orange (39,127,255) (BGR); body area → light gray (209,209,209). The result was saved as a PNG image in the mask_segmented folder.

[0088] At this point, the output mask has accurately extracted the outline of the cigarette and divided it into two color blocks according to its physical structure.

[0089] Then, a model based on macular region recognition is trained, and the identified regions are drawn onto the mask to form the final cigarette + cigarette macular mask.

[0090] Typically, macular detection suffers from the following problems: macular spots are often weak, small, and have blurred boundaries; different contaminant sources can exhibit similar colors or brightness; surface texture, brightness, and paper-based differences in cylindrical cigarettes can interfere with threshold segmentation; it is necessary to distinguish four semantic regions: background, filter, normal, and suspected macular spots, rather than simply performing color segmentation. Furthermore, threshold segmentation may lead to misjudgments of some lighter-colored, poorly edged oil stains. Since multi-factor solutions emphasize detection accuracy, weak spot recognition, and semantic segmentation capabilities, this embodiment selects the preferred U-Net to perform pixel-level segmentation of suspected macular regions, thereby improving the localization accuracy and boundary integrity of weak macular regions.

[0091] U-Net employs a symmetrical encoder-decoder architecture. The encoder consists of four convolutional layers, each with two 3×3 kernels. Adjacent convolutional layers are downsampled using max pooling, and feature information is extracted through multiple convolutions and pooling operations. Correspondingly, the decoder performs four upsampling operations using transposed convolutions to restore the feature map to the original resolution. Skip links are used to fuse high-level semantic features with shallow features, preserving more information.

[0092] Because hyperspectral images often depict more complex scenes with varying target sizes and uneven distribution, an attention mechanism can be introduced to better utilize the effective information in the feature maps. This mechanism suppresses the use of useless information, increases the weight of important information, and improves the model's predictive performance. For details, please refer to... Figure 4 The SE-UNET network shown.

[0093] It is understandable that using image processing technology to quickly determine the cigarette mask can save time in generating the overall macular smoke mask. Since the shape and color of the macular region are extremely complex, a semantic segmentation model is used for further macular region identification to improve accuracy.

[0094] Step S23: Identify gum stains in suspected macular regions based on the following steps: extract the continuous spectral curve of each pixel and perform first-order differentiation; obtain the contamination category probability of each pixel through a trained SPA-GWO-SVM classifier; the contamination categories include water stains, gum stains, oil stains, and insect stains; count the categories of all pixels in each suspected macular region, and the category with the larger proportion is the contamination category of that region.

[0095] Specifically, in this embodiment, the SPA-GWO-SVM classifier is a feature selection, parameter optimization, and classification discrimination modeling method for the four categories of yellow stains on cigarettes (water stains, gum stains, oil stains, and insect stains). The core of the model is to balance the accuracy, robustness, and efficiency of classification by using spectral dimensionality reduction and intelligent parameter optimization. Furthermore, relying on the algorithmic characteristics of SVM, it can quickly output prediction results, which is suitable for the real-time requirements of industrial inspection.

[0096] SPA precisely selects core feature wavelengths from the full-band spectrum of 400-1000nm. Its core advantage lies in achieving efficient dimensionality reduction and effective feature purification of high-dimensional spectra: First, it constructs a correlation model between features and category labels based on PLS regression and calculates the weight of regression coefficients for each band; then, it uses continuous projection iteration to select the bands with the minimum collinearity with the selected features, accurately eliminating redundant noise and invalid bands. This avoids the curse of dimensionality from the root, significantly reduces the amount of subsequent computation, and retains the most discriminative spectral fingerprint features, laying a high-quality feature foundation for subsequent classification.

[0097] GWO intelligently optimizes the penalty coefficient C and kernel parameter gamma of the radial basis function of SVM. Its core advantage lies in achieving the globally optimal configuration of SVM parameters: it initializes a population of gray wolves with 20 parameter combinations, uses the 5-fold cross-validation error rate as the fitness function, and obtains the optimal parameters through 50 iterations of position updates of gray wolves in three levels of Alpha / Beta / Gamma. Compared with manual parameter tuning, it effectively avoids subjectivity and local optima problems, allowing the SVM model performance to reach the optimal state.

[0098] SVM, as the core of the final classification, has the advantage of achieving efficient nonlinear classification in a low-dimensional feature space: the core features reduced by SPA are mapped to a high-dimensional space through the radial basis kernel function, which easily solves the problem of linear inseparability of spectral features of various pollutants; combined with the optimal parameters optimized by GWO, the empirical risk and structural risk of the model can be accurately balanced, which not only ensures the classification accuracy of training samples, but also greatly improves the generalization ability to unknown samples, and finally achieves high-precision and high-stability differentiation of the four major types of pollutants.

[0099] Similarly, before training the SPA-GWO-SVM classifier, two-factor training samples are first prepared. The two-factor training samples include two-factor samples of mixed gum and water stains, as well as two-factor samples of insect stains, oil stains, oil and water, insect and water, and insect and oil.

[0100] The steps include:

[0101] Pretreatment of contaminant sources: For oil, moisture, spices and sugar contaminants, shake or stir thoroughly until the system is homogeneous, according to the ratio of 30 mL of contaminant to 3.0 g of tobacco. For insect stain contaminants, grind the insect stain contaminant into a homogeneous powder using a mortar and pestle, and then add a small amount of anhydrous ethanol. All mixed samples are placed in sealed containers and aged at room temperature and in the dark for 48 hours.

[0102] Two-factor sample preparation for gum blending:

[0103] The flavoring solution and sugar solution, which have been soaked in the corresponding brand of tobacco, are mixed in volume ratios of 4:0, 3:1, 2:2, 1:3, and 0:4.

[0104] Using a microsyringe, different proportions of the mixture were applied to the surface of the single-material cigarette at three application rates of 0.5 μL, 0.3 μL, and 0.1 μL.

[0105] Water stain two-factor sample preparation:

[0106] The flavoring solution and sugar solution, which had been soaked in the corresponding brand of tobacco, were mixed at a volume ratio of 2:2.

[0107] The extract obtained by soaking the corresponding brand of tobacco in purified water is mixed with the aforementioned 2:2 specification gum mixture solution at a volume ratio of 1:1.

[0108] The mixture was applied to the surface of a single-material cigarette using a microsyringe at doses of 0.5 μL, 0.3 μL, and 0.1 μL to simulate the complex yellow spots formed after water dissolves and enriches the gum components in a humid environment.

[0109] Two-factor sample preparation for insect stains:

[0110] The flavoring solution and sugar solution, which had been soaked in the corresponding brand of tobacco, were mixed at a volume ratio of 2:2.

[0111] The mixture was applied to the surface of a single-material cigarette using a micro-syringe at doses of 0.5 μL, 0.3 μL, and 0.1 μL, and insect stains were then applied in superimposed to simulate the combined contamination of insect stains and flavoring components.

[0112] Oil stain two-factor sample preparation:

[0113] The flavoring solution and sugar solution, which had been soaked in the corresponding brand of tobacco, were mixed at a volume ratio of 2:2.

[0114] The mixture was applied to the surface of single-material cigarettes at doses of 0.5 μL, 0.3 μL, and 0.1 μL using a microsyringe, and various oil-pretreated contaminated samples were applied in combination to simulate the combined contamination of oil stains and flavoring components.

[0115] Oil-water two-factor sample preparation:

[0116] Extracts obtained by soaking tobacco shreds of the corresponding brand in pure water were applied to the surface of single-material cigarettes at application rates of 0.5 μL, 0.3 μL, and 0.1 μL, respectively. Various oil-pretreated samples were then applied on top of each other to simulate the superimposed contamination of oil and water stains.

[0117] Preparation of insect-water dual-factor samples:

[0118] The extract obtained by soaking the corresponding brand of tobacco in pure water was applied to the surface of single-material cigarettes at a dot application rate of 0.5 μL, 0.3 μL, and 0.1 μL, and then a dot application of insect stain pre-treated contaminated samples was superimposed to simulate the superimposed contamination of insect stains and water stains.

[0119] Oilworm two-factor sample preparation:

[0120] Extracts obtained by soaking tobacco shreds of the corresponding brand in purified water were applied to the surface of single-material cigarettes at application rates of 0.5 μL, 0.3 μL, and 0.1 μL, respectively. Various oil-pretreated samples were then applied on top of each other to simulate the superimposed contamination of oil stains and insect stains.

[0121] It should be noted that all pollution sources in this embodiment are substances that are frequently encountered in the actual production, equipment maintenance and storage processes of cigarette manufacturing enterprises, ensuring the practical engineering significance of the research object.

[0122] Step S24: If it is a gum stain, the gum stain component ratio identification method described in Example 1 is used to identify the gum component ratio of the gum stain and determine the cause of the stain based on the gum component ratio.

[0123] Specifically, if the ratio of the flavoring sugar components is 4:0 or 3:1, the yellow spots are determined to be caused by the flavoring; if the ratio of the flavoring sugar components is 1:3 or 0:4, the yellow spots are determined to be caused by the sugar itself.

[0124] 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 of other steps.

[0125] Example 3

[0126] Based on the same inventive concept, this application also provides a device for identifying the proportion of components in gum stains to achieve the aforementioned method for identifying the proportion of components in gum stains. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the device for identifying the proportion of components in gum stains provided below can be found in the limitations of the method for identifying the proportion of components in gum stains described above, and will not be repeated here.

[0127] The gum stain component ratio identification device includes:

[0128] The image acquisition module is configured to acquire a hyperspectral image of a gum stain yellow spot, wherein the hyperspectral image has a wavelength range of 400-1000 nm.

[0129] The feature filtering module is configured to use a successive projection algorithm to filter the hyperspectral image to obtain core spectral features;

[0130] The high-dimensional dynamic feature extraction module is configured to capture the temporal dependence and dynamic change law of core spectral features using an improved deep echo state network to obtain high-dimensional dynamic features; the weights of all leakage integral layers in the improved deep echo state network are obtained through backpropagation training.

[0131] The proportion recognition module is configured to use MLP to perform nonlinear mapping and dimensionality reduction on high-dimensional dynamic features to obtain the component proportions of the gum stains; the component proportions include five categories: 4:0, 3:1, 2:2, 1:3, and 0:4.

[0132] Example 4

[0133] Based on the same inventive concept, this application also provides a device for tracing the causes of yellow-smeared smoke to implement the aforementioned method. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the device for tracing the causes of yellow-smeared smoke provided below can be found in the limitations of the method for tracing the causes of yellow-smeared smoke described above, and will not be repeated here.

[0134] like Figure 4 As shown, the device for tracing the causes of yellow-spotted smoke includes:

[0135] The image acquisition module is configured to acquire hyperspectral images of yellow smoke, wherein the hyperspectral image has a wavelength range of 400-1000 nm.

[0136] The image conversion module is configured to generate an RGB pseudo-color image based on a hyperspectral image and convert it to the HSV color space;

[0137] The image segmentation module is configured to process the HSV color space based on the spatial localization step to obtain the background region, filter region and cigarette body region, and to identify the cigarette body region based on the Unet network to obtain the suspected macular region and normal cigarette tissue.

[0138] The gum stain yellow stain determination module is configured to identify gum stain yellow stains in suspected yellow stain areas based on the following steps: extracting the continuous spectral curve of each pixel and performing first-order differentiation; obtaining the contamination category probability of each pixel through a trained SPA-GWO-SVM classifier; the contamination categories include water stains, gum stains, oil stains, and insect stains; and statistically analyzing the categories of all pixels in each suspected yellow stain area, with the category having the largest proportion being the contamination category of that area.

[0139] The device for tracing the cause of macular degeneration is the component ratio identification device for gum stains described in Example 3. It is used to identify the component ratio of gum stains and determine the cause of macular degeneration based on the component ratio of the gum.

[0140] Example 5

[0141] Based on the above embodiments, this embodiment provides a computer device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; the processor is used to execute the program stored in the memory to implement the step of identifying the proportion of components in gum stains as described in Embodiment 1, or to implement the step of the method for tracing the causes of yellow stains as described in Embodiment 2.

[0142] Example 6

[0143] Based on the above embodiments, this embodiment provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the step of identifying the proportion of components in gum stains as described in Embodiment 1, or the step of the method for tracing the causes of yellow stains as described in Embodiment 2.

[0144] Example 7

[0145] Based on the above embodiments, this embodiment provides a computer program product, including a computer program that, when executed by a processor, implements the step of identifying the proportion of components in gum stains as described in Embodiment 1, or the step of the method for tracing the causes of yellow stains as described in Embodiment 2.

[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them; although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications can still be made to the specific implementation of the present invention or equivalent substitutions can be made to some technical features without departing from the spirit of the technical solutions of the present invention, and all such modifications and substitutions should be covered within the scope of the technical solutions claimed in the present invention.

Claims

1. A method for identifying the proportion of components in gum-stained yellow spots, characterized in that, Includes the following steps: Obtain hyperspectral images of paper gum stains, wherein the hyperspectral image band is 400-1000nm; The hyperspectral image is filtered using a successive projection algorithm to obtain core spectral features; An improved deep echo state network is used to capture the temporal dependence and dynamic change of core spectral features, thereby obtaining high-dimensional dynamic features. The weights of all leakage integral layers in the improved deep echo state network are obtained through backpropagation training. By using a multilayer perceptron to perform nonlinear mapping and dimensionality reduction on high-dimensional dynamic features, the component ratios of gum-stained yellow spots were obtained.

2. The method for identifying the proportion of components in gum-stained yellow spots according to claim 1, characterized in that, After obtaining the hyperspectral image of the paper gum stains, spatial neighborhood averaging, SG smoothing, and first derivative calculations were performed on the hyperspectral image in sequence. When filtering the hyperspectral image using the continuous projection algorithm, 50 bands were extracted.

3. The method for identifying the proportion of components in gum-stained yellow spots according to claim 1 or 2, characterized in that: Before identifying gum stains on paper, prepare gum stain samples first: Pretreatment of pollution sources: For spice and sugar pollution sources, shake or stir thoroughly until the system is homogeneous, according to the ratio of 30 mL pollution source to 3.0 g tobacco shreds; place the mixed samples in a sealed container and let them stand and age for 48 hours at room temperature and in the dark. Two-factor sample preparation for gum blending: The flavoring solution and sugar solution, which have been soaked in the corresponding brand of tobacco, are mixed in volume ratios of 4:0, 3:1, 2:2, 1:3, and 0:

4. Using a microsyringe, different proportions of the mixture were applied to the surface of the single-material cigarette at three application rates of 0.5 μL, 0.3 μL, and 0.1 μL.

4. A method for tracing the causes of yellow-spotted smoke, characterized in that, Includes the following steps: Acquire hyperspectral data of yellow-spot smoke in the 400-1000 nm band; generate pseudo-color images based on the hyperspectral data and convert them to the HSV color space; The HSV color space is processed based on spatial localization steps to obtain the background area, filter area and cigarette body area. The cigarette body area is then identified based on the Unet network to obtain the suspected yellow spot area and normal cigarette tissue. The following steps were used to identify gum stains in suspected macular regions: the continuous spectral curve of each pixel was extracted and its first derivative was calculated; the probability of each pixel’s contamination category was obtained by using a trained SPA-GWO-SVM classifier; the contamination categories include water stains, gum stains, oil stains, and insect stains; the categories of all pixels in each suspected macular region were counted, and the category with the larger proportion was the contamination category of that region. If the stain is caused by chewing gum, the method for identifying the proportion of chewing gum components in the stain as described in any one of claims 1-3 shall be used to identify the proportion of chewing gum components in the stain and determine the cause of the stain based on the proportion of chewing gum components.

5. The method for tracing the origin of yellow-spotted smoke according to claim 4, characterized in that, Processing the HSV color space based on a color space threshold segmentation algorithm includes: Gaussian blur is applied to the V channel of the HSV color space, and the background area and cigarette area are separated using a color space threshold segmentation algorithm. Morphological closing and opening operations are applied sequentially to process the cigarette region; The cigarette holder region and the cigarette body region are determined based on the color space threshold segmentation algorithm and the known length specifications of the cigarette holder.

6. A device for identifying the proportion of components in gum-stained yellow spots, characterized in that, include: The image acquisition module is configured to acquire a hyperspectral image of a gum stain yellow spot, wherein the hyperspectral image has a wavelength range of 400-1000 nm. The feature filtering module is configured to use a successive projection algorithm to filter the hyperspectral image to obtain core spectral features; The high-dimensional dynamic feature extraction module is configured to capture the temporal dependence and dynamic change law of core spectral features using an improved deep echo state network to obtain high-dimensional dynamic features. The weights of all leakage integral layers in the improved deep echo state network are obtained through backpropagation training. The proportion recognition module is configured to use MLP to perform nonlinear mapping and dimensionality reduction on high-dimensional dynamic features to obtain the component proportions of the gum-stained yellow spots.

7. A device for tracing the origin of yellow-spotted smoke, characterized in that, include: The image acquisition module is configured to acquire hyperspectral images of yellow smoke, wherein the hyperspectral image has a wavelength range of 400-1000 nm. The image conversion module is configured to generate an RGB pseudo-color image based on a hyperspectral image and convert it to the HSV color space; The image segmentation module is configured to process the HSV color space based on the spatial localization step to obtain the background region, filter region and cigarette body region, and to identify the cigarette body region based on the Unet network to obtain the suspected macular region and normal cigarette tissue. The gum stain yellow stain determination module is configured to identify gum stain yellow stains in suspected yellow stain areas based on the following steps: extracting the continuous spectral curve of each pixel and performing first-order differentiation; obtaining the contamination category probability of each pixel through a trained SPA-GWO-SVM classifier; the contamination categories include water stains, gum stains, oil stains, and insect stains; and statistically analyzing the categories of all pixels in each suspected yellow stain area, with the category having the largest proportion being the contamination category of that area. The macular degeneration tracing device is the component ratio identification device for gum stains as described in claim 6, used to identify the component ratio of gum stains and determine the cause of macular degeneration based on the gum component ratio.

8. A computer device, characterized in that: It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When executing a program stored in memory, the processor implements the step of identifying the proportion of components in gum stains as described in any one of claims 1 to 3, or the step of the method for tracing the causes of yellow stains as described in any one of claims 4 to 5.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the step of identifying the proportion of components in the gum stains as described in any one of claims 1 to 3, or the step of the method for tracing the causes of yellow stains as described in any one of claims 4 to 5.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the step of identifying the proportion of components in gum stains as described in any one of claims 1 to 3, or the step of the method for tracing the causes of yellow stains as described in any one of claims 4 to 5.