Abnormal detection method and system for cigarette key index label noise and storage medium
By constructing a spatiotemporal dual-channel detection model and utilizing historical time-series data of cigarettes and semi-supervised collaborative training, the problems of label noise and spatiotemporal coupling in cigarette detection were solved, achieving more efficient anomaly detection and root cause diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA TOBACCO ZHEJIANG IND CO LTD
- Filing Date
- 2026-01-13
- Publication Date
- 2026-05-12
AI Technical Summary
Existing cigarette detection methods rely on manual thresholds, which leads to label noise, and do not consider the spatiotemporal coupling characteristics of the cigarette-making process, thus limiting the accuracy of anomaly detection and root cause diagnosis.
A spatiotemporal dual-channel detection model is constructed. By acquiring historical time-series data of cigarettes, correlation analysis and preprocessing are performed. Temporal and spatial classifiers are constructed using gated recurrent units and graph attention networks. Combined with a semi-supervised collaborative training strategy, the anomaly detection performance is improved.
It improves the accuracy and robustness of cigarette anomaly detection, can analyze anomaly patterns from time and space dimensions, effectively locate key influencing factors, and enhance the interpretability and accuracy of detection.
Smart Images

Figure CN122020286A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial process anomaly detection technology, specifically to a spatiotemporal dual-channel anomaly detection method, system, and storage medium for label noise of key indicators of cigarettes. Background Technology
[0002] As industrial production continues to advance towards large-scale, intelligent, and green manufacturing, the complexity of process control and optimization is constantly increasing. Against the backdrop of increasingly fierce competition in the cigarette market, cigarette quality has become a crucial component of a company's core competitiveness. The cigarette-making process, as the final processing step before the product leaves the factory, has a decisive impact on the quality of the finished cigarette. Draw resistance and ventilation are two key indicators for evaluating cigarette quality: excessive draw resistance or insufficient ventilation weakens the inhalation experience, while insufficient draw resistance or excessive ventilation may lead to insufficient aroma. Therefore, these two indicators are not only important bases for product quality assessment but also key monitoring signals for identifying abnormalities in the production process. Currently, the industry generally uses Cigarette Inspection Systems (CIS), which use manually set draw resistance and ventilation thresholds to reject cigarettes that exceed the limits. However, this experience-based threshold-based detection method has significant limitations, including high equipment dependence, single monitoring indicators, and the inability to analyze the root causes of anomalies. More importantly, manual thresholds are highly subjective, easily leading to missed or false detections, inevitably resulting in noise on the labels and thus compromising the stability of quality control. In recent years, with the rapid advancement of digital transformation in factories, data-driven anomaly detection methods have received widespread attention. The development of neural networks and deep learning technologies has enabled models to accurately predict or reconstruct normal operating data, autonomously learning normal patterns from massive amounts of process data without relying on prior domain knowledge, and has been applied in cigarette anomaly detection tasks. However, such methods typically rely on reliable normal / abnormal labels. In actual cigarette production, to balance production capacity and product quality, the anomaly thresholds for draw resistance and ventilation are often set manually, inevitably introducing label noise, thus limiting the effectiveness of these models in real industrial scenarios.
[0003] On the other hand, the coiling process is essentially a typical spatiotemporally coupled production system: in the time dimension, the coiling machine performs continuous large-scale production, and there is a significant time-series dependency between process parameters; in the spatial dimension, different process units form a complex nonlinear coupling structure due to production mechanisms and linkages, and are closely related to key quality indicators.
[0004] To address the aforementioned label noise problem, there is an urgent need to develop a spatiotemporal anomaly detection method for noisy labels in order to improve the detection performance and robustness of the model under complex production conditions. Summary of the Invention
[0005] The purpose of this invention is to provide a spatiotemporal dual-channel anomaly detection method, system, and storage medium for label noise, a key indicator of cigarettes, to solve the technical problems in the prior art where cigarette detection relies on manual thresholds, resulting in label noise, and data-driven methods are limited, and the spatiotemporal coupling characteristics of the cigarette-making process are not considered, thus restricting the accuracy of anomaly detection and root cause diagnosis.
[0006] To achieve the above objectives, embodiments of the present invention provide a method for detecting anomalies in the noise of key indicator labels on cigarettes, including: Acquire historical time-series data of cigarettes and perform correlation analysis to obtain a dataset of related indicators; The dataset of related indicators is preprocessed to obtain a training sample set; A spatiotemporal dual-channel detection model is constructed to obtain the prediction probabilities of the temporal classifier and the spatial classifier. The spatiotemporal dual-channel detection model was trained using a training sample set; A trained spatiotemporal dual-channel detection model is used to detect real-time collected cigarette sample data to obtain detection results.
[0007] Optionally, preprocessing the correlation index dataset to obtain a training sample set includes: The dataset of related indicators is divided into sliding window segments to obtain a sliding window sample set; Obtain the out-of-limit rate for each sliding window sample; Based on the sample out-of-limit rate, the correlation index dataset is divided into a clean sample set with high confidence and a labeled sample set with low confidence, which are used as training sample sets.
[0008] Optionally, a spatiotemporal dual-channel detection model is constructed to obtain the predicted probabilities of the temporal classifier and the spatial classifier, including: A time classifier is constructed using gated recurrent units to obtain the hidden states of all time steps; The hidden state is input into the attention mechanism to obtain attention weights; Calculate the corresponding prior attention weights for the suction resistance based on the process values of the suction resistance corresponding to the key indicators. The corrected attention weight is obtained based on the attention weight and the prior attention weight of the attraction resistance; The hidden states at all time steps are aggregated using the modified attention weights to obtain a temporal representation of the process. The predicted probability of the time classifier is obtained based on the temporal representation of the process.
[0009] Optionally, the corresponding prior attention weights for attracting resistance are calculated based on the process values of the attracting resistance corresponding to the key indicators, including: Calculate the distance between the process value and the standard value for each suction resistance; Map the distance to a non-negative prior score; The prior scores are normalized to obtain the attracting prior attention weights.
[0010] Optionally, a spatiotemporal dual-channel detection model is constructed to obtain the predicted probabilities of the temporal classifier and the spatial classifier, including: A spatial classifier is constructed using a graph attention network, the spatial classifier comprising a graph structure learning layer and a graph information propagation layer; The graph structure learning layer is used to obtain a learnable adjacency matrix; A sparsification method is used to obtain strongly correlated neighbor nodes in the adjacency matrix, resulting in a simplified learning graph structure; The sequence of the coiling process is embedded as process knowledge into the graph structure to obtain a learnable dynamic adjacency matrix; The initial features of each node in the learnable dynamic adjacency matrix are updated using the graph information propagation layer to obtain a spatial representation. The spatial classifier prediction probability is obtained based on the spatial representation.
[0011] Optionally, embedding the coiling process sequence as process knowledge into the graph structure to obtain a learnable dynamic adjacency matrix includes: Based on formula (1), a process mask matrix is constructed according to the sequence of the splicing process. (1) in, This is a process mask matrix, representing that only when the variable... Belongs to the process And variables Belongs to the next process hour, =1; The learnable dynamic adjacency matrix is obtained according to formula (2). (2) in, It is a learnable dynamic adjacency matrix. This is the graph structure. It represents the Hadamardi (or Hadama) stack.
[0012] Optionally, training the spatiotemporal dual-channel detection model using a training sample set includes: The spatiotemporal dual-channel detection model is semi-supervised and co-trained using a low-confidence sample set from the training sample set. The spatiotemporal dual-channel detection model is trained in a supervised manner using a high-confidence sample set from the training sample set.
[0013] Optionally, semi-supervised co-training of the spatiotemporal dual-channel detection model using a low-confidence sample set from the training sample set includes: The semi-supervised loss function is obtained according to formulas (3) to (6). (3) (4) (5) (6) in, For cross-entropy loss, The mean squared error loss for pseudo-labeled samples. For regularization loss, For semi-supervised loss functions, For the first Cross-entropy loss for each sample, This represents the current channel's prediction results for unlabeled samples in the low-confidence sample set. This is the prediction result for unlabeled samples in a low-confidence sample set using a dual-channel approach. For batch size, The total number of categories, For a labeled sample set, This is a sample set of pseudo-labels. This indicates the predicted probability of the current channel. for The weighting coefficients, for The weighting coefficients.
[0014] On the other hand, the present invention also provides an anomaly detection system for noise in key indicator labels of cigarettes, the system including a processor configured to perform any of the methods described above.
[0015] In another aspect, the present invention also provides a computer-readable storage medium storing instructions that, when executed by a processor, implement any of the methods described above.
[0016] The beneficial effects of this invention are: This invention addresses the challenge of anomaly detection for two key control indicators—draw resistance and ventilation—during cigarette rolling under label noise conditions. It provides a spatiotemporal dual-channel anomaly detection method for key indicator label noise and constructs a spatiotemporally heterogeneous dual-channel semi-supervised collaborative training framework. First, high-confidence clean samples are screened using the out-of-limit ratio of key indicators within a periodic window, providing reliable supervision signals for the model. In the temporal dimension, a temporal classifier combined with the process values of key indicators models a sequence dependency structure. In the spatial dimension, a spatial classifier combined with the process sequence models the process coupling relationships between variables. Through this collaborative training strategy, the model can improve its anomaly recognition capability from both spatiotemporal perspectives. To deeply analyze anomaly patterns in the rolling process, the proposed spatiotemporal classifier provides interpretability analysis from both temporal and spatial dimensions, effectively locating time segments and process variables that have a crucial impact on anomaly identification. Compared with existing anomaly detection methods, this invention demonstrates superior performance in both anomaly detection and interpretability, more accurately depicting the operational state of the rolling process, and has significant application value in cigarette production.
[0017] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings: Figure 1 A flowchart of an anomaly detection method for noise in a key indicator label of a cigarette according to an embodiment of the present invention; Figure 2 A flowchart illustrating a method for preprocessing a dataset of related indicators according to an embodiment of the present invention; Figure 3 A flowchart of a method for obtaining prediction probabilities using a time classifier according to an embodiment of the present invention; Figure 4 A flowchart of a method for calculating the corresponding a priori attention weight of the aspiration resistance based on the process value of the aspiration resistance corresponding to the key index, according to an embodiment of the present invention. Figure 5 A flowchart of a method for obtaining spatial classifier prediction probabilities according to an embodiment of the present invention; Figure 6 This is a schematic diagram of a spatiotemporal heterogeneous dual-channel semi-supervised collaborative training framework according to an embodiment of the present invention; Figure 7 This is a schematic diagram illustrating the interpretability of the time dimension according to an embodiment of the present invention; Figure 8 This is a schematic diagram illustrating the spatial dimensional interpretability according to an embodiment of the present invention. Detailed Implementation
[0019] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.
[0020] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application all comply with relevant laws and regulations. In the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.
[0021] like Figure 1 The diagram shows a flowchart of an anomaly detection method for noise in key indicator labels of cigarettes according to an embodiment of the present invention. Figure 1 The detection method may include the following steps: In step S10, historical time-series data of cigarettes are acquired and correlation analysis is performed to obtain a dataset of related indicators; In step S11, the correlation index dataset is preprocessed to obtain a training sample set; In step S12, a spatiotemporal dual-channel detection model is constructed to obtain the prediction probability of the temporal classifier and the prediction probability of the spatial classifier. In step S13, the spatiotemporal dual-channel detection model is trained using the training sample set; In step S14, the trained spatiotemporal dual-channel detection model is used to detect the real-time collected cigarette sample data to obtain the detection results.
[0022] In such Figure 1 In the anomaly detection method for key indicator label noise of cigarettes shown, step S10 is used to acquire historical time-series data of cigarettes and perform correlation analysis to obtain a dataset of related indicators. Historical time-series data of individual cigarettes from the cigarette-making section are collected, and a set of process parameters significantly related to the two key indicators of cigarette draw resistance and ventilation is constructed through correlation analysis, serving as input features for the model. In this embodiment, the specific method for acquiring the dataset of related indicators in step S10 can be of various forms known to those skilled in the art. In one example of this invention, step S10 may involve first collecting historical time-series data of individual cigarettes from the cigarette-making section. ,in This represents the length of the original sequence, i.e., the number of time steps. The feature dimension is each time step. ( ) is a 3D feature vectors. To determine the input features of the model, the original dataset needs to be analyzed. Feature selection can be performed; specifically, in this example, the specific method for feature selection could be Spearman linear correlation analysis. Nonlinear correlation analysis with random forest In the original dataset The correlation coefficients and importance scores between all indicators and key quality indicators (suction resistance, ventilation) are calculated, and indicators with values greater than a preset threshold are selected as the set of process parameters associated with the key indicators. The aforementioned indicators relate to the supply of tobacco shreds. Tobacco rolling Cigarette forming Production process indicators and outcome indicators.
[0023] Based on the above analysis Specifically, this involves: VE suction tape tension pressure, VE large fan negative pressure, VE small fan pressure, VE primary air separation pressure, suction tape start position, suction tape actual position, SE tape tension pressure, SE total air source pressure, sealing device temperature, SE spider hand small fan pressure, actual weight of tobacco stick, compacted end position, tobacco segment value 1, tobacco segment value 2, tobacco segment value 3, tobacco segment value 4, tobacco segment value 5, tobacco temperature, tobacco moisture content, SRM calculation speed, MAX total air source pressure, MAX large fan pressure, tipping paper heating temperature, rubbing board heating temperature, tipping status, tobacco empty end detection value, tobacco OTIS detection value, average value of capping air source, suction resistance value, and ventilation value. This method screens out the following parameters in three processes: 1 variable, used as model input features In this example, the original sequence length... Number of original variables Filter out the number of input features .
[0024] Step S11 is used to preprocess the correlation index dataset to obtain a training sample set. By designing a clean sample separation layer, sliding window samples are generated from the model input feature data and assigned initial labels. A clean set with high confidence and a label set with low confidence are selected, and the dataset is standardized to obtain the model's input training set. In this embodiment, the specific method for preprocessing the correlation index dataset in step S11 can be of various forms known to those skilled in the art. In one example of this invention, step S11 may include, for example... Figure 2 The steps shown are described in this. Figure 2 In this context, step S11 may include: In step S20, the correlation indicator dataset is divided into sliding window segments to obtain a sliding window sample set; In step S21, the sample out-of-limit rate of each sliding window sample is obtained; In step S22, the association index dataset is divided into a clean sample set with high confidence and a label sample set with low confidence based on the sample over-limit rate, which are used as training sample sets.
[0025] In such Figure 2 In the method shown, step S20 is used to obtain the sliding window sample set. Specifically, in this example, the sliding window operation can be performed to obtain the sliding window sample set. Set the sliding window size to The sliding step size is , No. A sliding window sample is defined as: (7) Each sample Including window size Historical information. Among them, the total number of samples. Determined by the following formula: (8) Step S21 is used to obtain the sample out-of-limit rate for each sliding window sample. Specifically, in this example, the process standard range of the key indicator, suction resistance, can be denoted as... The process standard range for ventilation is: For sliding window sample sets Based on the aforementioned manually determined upper and lower limit thresholds of the indicators Calculate the out-of-limit rate for all samples, that is, the proportion of the timestamp of any indicator exceeding the limit to the sliding window length, based on... Design a clean sample separation layer. Specifically, using a probability distribution function... The quantile is defined as the dividing threshold: (9) Step S22 is used to divide the correlation index dataset into a high-confidence clean sample set and a low-confidence label sample set based on the sample out-of-limit rate, which will serve as the training sample set. Specifically, in this example, if the sample out-of-limit rate falls within the interval... If the sample falls within the interval, it is considered a clean and normal sample; These are then considered clean outlier samples, thus yielding a high-confidence clean set. ,in, This represents the number of high-confidence samples. Furthermore, to perform preliminary labeling on the remaining samples, the boundary between normal and abnormal is defined as follows: If the sample is located If it is located in, it is considered a noise anomaly sample; These are considered normal noise samples, thus obtaining a low-confidence label set. ,in, The number of low-confidence samples. This represents the one-hot encoded label corresponding to the sample. It's the number of categories. Finally, input the model... Each feature dimension is independently standardized by performing maximum and minimum values to eliminate differences in the units of measurement of variables.
[0026] In this example, the sliding window size Sliding step size ,category The process standard range for key indicator absorption resistance. The process standard range for ventilation is: High-confidence clean sets and low-confidence label sets were collected separately. and One sample.
[0027] Step S12 constructs a spatiotemporal dual-channel detection model to obtain the predicted probabilities of the temporal classifier and the spatial classifier. In this example, the specific method for constructing the spatiotemporal dual-channel detection model can be to use a gated recurrent unit (GRU) and a graph attention network (GAT) as the basic data-driven model. These parameters serve as the parameters for the entire data-driven model. The model's input is... ,Depend on It consists of 10 samples.
[0028] In this example, the specific method for obtaining the predicted probability of the time classifier in step S12 can be of various forms known to those skilled in the art. In one example of the present invention, the specific method for obtaining the predicted probability of the time classifier may include, for example... Figure 3 The steps shown are described in this. Figure 3 In this process, obtaining the predicted probability of the time classifier can include: In step S30, a time classifier is constructed using a gated loop unit to obtain the hidden states of all time steps; In step S31, the hidden state is input into the attention mechanism to obtain attention weights; In step S32, the corresponding prior attention weight of the attraction resistance is calculated based on the process value of the attraction resistance corresponding to the key indicator. In step S33, the corrected attention weight is obtained based on the attention weight and the prior attention weight of the attraction resistance; In step S34, the hidden states of all time steps are aggregated using a modified attention weighting method to obtain a temporal representation of the process. In step S35, the predicted probability of the time classifier is obtained based on the process time series characterization.
[0029] In such Figure 3 In the method shown, step S30 is used to obtain the hidden states of all time steps. Specifically, in this example, a time classifier is built on the time channels. The label status of a sample is determined by using temporal representations extracted from the time dimension of the sequence. First, given a sliding window sample... ,in, For sequence length, For feature dimension. Time data And the hidden state of the previous moment. , The hidden state dimension is used to hide the temporal classifier, and both are input into the GRU layer to extract temporal hidden state features. The calculations are performed using formulas (10) to (13): (10) (11) (12) (13) in, For different gating weight matrices, For the corresponding bias terms; and They represent and hyperbolic tangent activation function; express Product is used in element-wise multiplication operations. To reset the door, determine how many (The hidden state of the previous time step) needs to be reset; To update the doors, determine how many. To retain the current state, and how much new information needs to be added; As a candidate hidden state, based on the current input And after the door was reset and filtered To produce a new memory; The final hidden state after information fusion is achieved through... Preserve some old memories, through Add a portion of newly produced candidate memories.
[0030] Then, all moments After inputting into a multi-layer GRU, the hidden state representation of the sliding window sample is obtained: (14) in, Indicates the first The hidden states of all time steps output by the layer GRU.
[0031] Step S31 is used to input the hidden state into the attention mechanism to obtain attention weights. Specifically, in this example, a learnable query vector can be used. Collect valid information at various time points and calculate attention weights: (15) in, This represents the attention weight of the time classifier for each time point. The larger the value, the more important the time point is considered by the classifier.
[0032] Furthermore, since suction resistance is a key indicator, its process value can reflect abnormal states to some extent. Therefore, it is necessary to incorporate the process value of suction resistance into the calculation of prior attention weights to correct the learnable attention weights. This makes the corrected weights more interpretable. Step S32 calculates the corresponding prior attention weights for the attraction resistance based on the process values of the attraction resistance corresponding to the key indicators. The specific method for calculating the prior attention weights for attraction resistance in step S32 can take many forms known to those skilled in the art. In one example of this invention, step S32 may include, for example... Figure 4 The steps shown are described in this. Figure 4 In this context, step S32 may include: In step S40, the distance between the process value and the standard value of each suction resistance is calculated; In step S41, the distance is mapped to a non-negative prior score; In step S42, the prior scores are normalized to obtain the attracting prior attention weights.
[0033] In such Figure 4 In the method shown, step S40 is used to determine the standard value of the suction resistance according to the process standard. For the original dataset The only set of suction resistance values that appear in Calculate its value compared with the standard value. Distance: (16) in, This indicates the degree of deviation between the suction resistance value and the standard value. This indicates the total number of possible values for the pull-in resistance.
[0034] To ensure distance from standard value The farther the attraction value (potential outlier), the higher the attention weight it receives. Step S41 introduces a quadratic function with an upward opening to adjust the distance... Mapped to non-negative prior scores, and calculated according to formula (17): (17) in, Indicates the first Prior fractions of each suction resistance value; It is an adjustable temperature coefficient used to adjust the model's sensitivity to distance deviations.
[0035] Step S42 is used to normalize all prior scores to the [0,1] interval: (18) in, Indicates the first Prior attention weights for each resistance value ( Therefore, the prior attention weight distribution of the attraction resistance is obtained. .
[0036] Step S33 is used to obtain the corrected attention weights based on the attention weights and the prior attention weights of the attraction resistance. Specifically, in this example, the corrected attention weights are obtained from the prior attention weight distribution of the attraction resistance. Input Sample for Query Prior attention weights corresponding to the middle suction resistance The attention weights are corrected using formula (19): (19) in, For the corrected attention weights, This indicates an adjustable weighting coefficient. The attention weights are obtained through step S31.
[0037] Step S34 is used for By weighted aggregation of the hidden states at each time point, a temporal representation of the process is obtained. : (20) Step S35 is used to characterize the process timing. Linear mapping to predicted probability : ,(twenty one) in, These are the weights and bias parameters of the linear transformation layer. It is the predicted probability output by the time classifier. This is the number of output categories.
[0038] In this example, the time classifier hides the state dimension. Set to 64, GRU layer number Set to 1, standard suction resistance value Setting it to 153 represents the total number of possible values for the pull-in resistance. Set to 135, temperature coefficient Set to 0.8, Set it to 0.7.
[0039] In this example, the specific method for obtaining the spatial classifier prediction probability in step S12 can be of various forms known to those skilled in the art. In one example of the present invention, the specific method for obtaining the spatial classifier prediction probability may include, for example... Figure 5 The steps shown are described in this. Figure 5 In this process, obtaining the predicted probability of the time classifier can include: In step S50, a spatial classifier is constructed using a graph attention network. The spatial classifier includes a graph structure learning layer and a graph information propagation layer. In step S51, a graph structure learning layer is used to obtain a learnable adjacency matrix; In step S52, a sparsification method is used to obtain strongly correlated neighbor nodes in the adjacency matrix, resulting in a simplified learning graph structure. In step S53, the coil splicing process sequence is embedded as process knowledge into the graph structure to obtain a learnable dynamic adjacency matrix; In step S54, the initial features of each node in the learnable dynamic adjacency matrix are aggregated and updated using the graph information propagation layer to obtain a spatial representation. In step S55, the spatial classifier prediction probability is obtained based on the spatial representation.
[0040] In such Figure 5 In the method shown, steps S50 and S51 are used to construct a spatial classifier on the spatial channel. The spatial representation extracted using spatial dimensions is used to determine the label status of samples. This classifier mainly consists of a graph structure learning layer and a graph information propagation layer. Specifically, in this example, the input could be a given time series sample. ,in, Indicates the first Sliding window samples of several variables are used, and in the graph structure learning layer, the variables are treated as nodes in the graph structure, defining a learnable adjacency matrix. This is used to model spatial dependencies between variables, and its calculation method is as follows: ,(twenty two) in, It is the node embedding matrix of the trainable model. Hiding the state dimension for the spatial classifier; , All are nonlinear activation functions.
[0041] Step S52 is used to obtain strongly correlated neighbor nodes in the adjacency matrix using a sparsity method, resulting in a simplified learning graph structure. Specifically, in this example, a top-k sparsity technique is introduced during the learning of the dynamic graph, reducing the number of strongly correlated neighbor nodes in the adjacency matrix. Middle node Neighbor side set Sort the nodes by similarity from highest to lowest, and retain the top k strongly correlated neighbor nodes to simplify the learning graph structure, specifically represented as follows: ,(twenty two) in, Indicates: If node It is a node If the first k neighbors exist, then there is a path from node . Pointing to node The neighboring side.
[0042] Step S53 is used to embed the coiling process sequence as process knowledge into the graph structure to obtain a learnable dynamic adjacency matrix. The coiling process sequence is also embedded as process knowledge into the edges of the graph structure to enhance the model's ability to extract node features. Specifically, in this example, the production process sequence of the coiling operation can be represented as: ,in, , , These represent the three processes: tobacco supply, tobacco stick rolling, and cigarette forming. This represents the material flow direction of the process. Therefore, the graph structure can be defined as a directed graph, and the sparsed matrix can be processed according to the process to which each variable belongs. The following processing steps are taken to incorporate process knowledge and obtain an interpretable graph structure: (2) in, Represents a dynamic adjacency matrix that conforms to process sequence constraints. This is a process mask matrix, and its specific form is as follows: (1) in, ; This indicates that only edges pointing from upstream process variable i to downstream process variable j are allowed.
[0043] Obtain a learnable dynamic adjacency matrix Then, in step S54, the initial features of each node in the learnable dynamic adjacency matrix are aggregated and updated using the graph information propagation layer to obtain a spatial representation. Specifically, in this example, each node is updated using GAT aggregation in the graph information propagation layer. initial features This method is used to capture spatial dependencies between variables, and its main formula is as follows: ,(twenty three) ,(twenty four) (25) (26) in, For edge weights, For attention weights, For nodes The set of neighboring nodes, For learnable parameters, This represents a vector concatenation operation. For nodes The new feature vector is updated after the neighbor information is aggregated by the GAT layer.
[0044] Furthermore, after After feature aggregation operations in the layer GAT, the final node feature representation is obtained. Subsequently, average pooling is used to aggregate all node features to obtain a spatial representation: (27) in, The size represents the number of nodes. This is a spatial representation of the input sample.
[0045] Step S55 is used to linearly map the spatial representations aggregated from the spatial channels to the predicted probabilities. : (28) in, These are the weights and bias parameters of the linear transformation layer. It is the predicted probability output by the spatial classifier.
[0046] In this example, the spatial classifier hides the state dimension. Set to 64, the number of GAT layers. Set to 2 and k to 5, meaning each node only retains its first 5 neighboring nodes for aggregating and updating node characteristics.
[0047] Step S13 is used to train the spatiotemporal dual-channel detection model using the training sample set, such as... Figure 6 The diagram illustrates a spatiotemporal heterogeneous dual-channel semi-supervised collaborative training framework according to one embodiment of the present invention. The spatiotemporal dual-channel classifier is trained for a specified number of epochs using the training set. The model parameters are optimized by minimizing the joint loss function until the model converges. The training set of the model includes a clean set with high confidence. and low confidence label set This invention targets low-confidence tag sets. For each sample, a spatiotemporally heterogeneous dual-channel semi-supervised collaborative training strategy is employed, consisting of a data partitioning phase and a semi-supervised training phase; targeting high-confidence clean sets... For each sample, supervised training is used. Specifically, the method for model training in step S13 includes: In step S60, the spatiotemporal dual-channel detection model is semi-supervised and co-trained using a low-confidence sample set from the training sample set. In step S61, the spatiotemporal dual-channel detection model is trained in a supervised manner using a high-confidence sample set from the training sample set.
[0048] Step S60 is used to perform semi-supervised co-training of the spatiotemporal dual-channel detection model. In this example, data partitioning is required first, which aims to split the data from the low-confidence label set. The method identifies potentially clean samples from noisy samples. Since noisy samples typically exhibit higher loss in the early stages of training, this method uses a bimodal Gaussian mixture model (GMM) to fit the cross-entropy loss in order to distinguish between the two types of samples.
[0049] First, using All labeled samples in the dataset are specified for the temporal channel (TC) and spatial channel (SC). Warm-up training for the first round. After the model training is complete, calculate the cross-entropy loss for all samples: (29) in, Indicates the first The cross-entropy loss value of each sample. Indicates the first One input sample, This indicates its corresponding real label. This represents the predicted probability of TC or SC.
[0050] Subsequently, the GMM was used to fit the sample loss distributions of TC and SC with bimodal patterns (resulting in GMM1 and GMM2), and their posterior probability expressions are as follows: (30) The GMM parameters, i.e., the mixing coefficients, are fitted using the expectation-maximization algorithm. Mean and variance. Calculate the clean posterior probability of the sample: (31) in, Indicates a given first Cross-entropy loss value of each sample Subsequently, the sample originated from the first... The probability of a Gaussian component. It is a Gaussian component with a small sample loss. For sample dimensions. A threshold is set. When a sample is clean, the probability is... At this point, the sample is considered a noise sample, and its corresponding label will be discarded. Therefore, within each epoch, the dataset... Divided into tagged sets (Possibly clean) and unlabeled sets (Possibly noise): (32) (33) To avoid overfitting of the two learning channels to specific noisy samples during the warm-up phase, TC and SC are trained and updated independently, each using GMM to partition the dataset. To obtain the next stage and .
[0051] After the data partitioning is completed, the partitioned data is divided using the TC phase. The division with SC Dataset, training model There are 10 epochs. In each epoch, both channels participate in training, and each channel learns using samples partitioned by the other channel's GMM. For the specified channel (TC or SC) currently being trained, it trains on a mini-batch of samples each time. Its training data includes labeled samples and unlabeled samples, denoted as _____. , ;in It refers to the batch size.
[0052] First, for labeled samples, use the prediction results of the current channel. Its real label Tag co-refinement is performed to obtain weighted soft tags. Its expression is as follows: (34) Secondly, for unlabeled samples, a dual-channel joint guessing method is adopted, by... and Constructing pseudo-labels from prediction results Its expression is as follows: (35) Therefore, we can obtain the set of labeled samples participating in training in the current mini-batch. and pseudo-label sample set Both are then input into the currently selected channel to train the model.
[0053] Furthermore, the cross-entropy loss of labeled samples in this mini-batch is defined. Mean squared error loss of pseudo-labeled samples and regularization loss The expression is as follows: (3) (4) (5) in, For cross-entropy loss, The mean squared error loss for pseudo-labeled samples. For regularization loss, For the first Cross-entropy loss for each sample, This represents the current channel's prediction results for unlabeled samples in the low-confidence sample set. This is the prediction result for unlabeled samples in a low-confidence sample set using a dual-channel approach. For batch size, The total number of categories, For a labeled sample set, This is a sample set of pseudo-labels. This represents the predicted probability of the current channel.
[0054] comprehensive , and The loss function, thus yielding the semi-supervised loss function of the constructed model, is: (6) in, For semi-supervised loss functions, for The weighting coefficients, for The penalty weighting coefficient.
[0055] Step S61 is used to perform supervised training on the spatiotemporal dual-channel detection model. In this example, the supervised training phase uses a high-confidence clean set. Training the model Each round provides reliable label anchors for model training, preventing the model from overlearning noisy labels. Specifically, for the dataset... For each mini-batch within the range, the supervised loss is defined as: (36) in, Indicates the first Cross-entropy loss for each sample.
[0056] Loss due to semi-supervision and supervised losses Construct the total loss function, whose expression is: (37) After initializing the model parameters, the total loss function is used as the optimization objective, and the model parameters are updated synchronously through backpropagation. This continues until the preset number of training rounds is reached, obtaining the optimal model parameters after training. In this example, the total number of training epochs for the model can be set to 150, where Set to 30, Set to 120; threshold It can be set to 0.5, batch size Set to 64, Set to 2, Set to 1.
[0057] Step S14 is used to detect the real-time collected cigarette sample data using the trained spatiotemporal dual-channel detection model to obtain detection results. Specifically, the real-time collected single cigarette sample is input into the trained spatiotemporal dual-channel classifier, and the prediction results of the two classifiers are fused to determine the quality anomaly of the sample, and further anomaly cause analysis is performed. In this example, online anomaly detection mainly includes the following steps: First, data of a length of [length missing] was collected in real time from the actual industrial site. Single cigarette data And as described in step S10, only the data related to key indicators are retained in the single cigarette data. There are several characteristic variables. Then, max-min normalization is performed on each variable: (38) in, Indicates the first The timestamp of the first The normalized values of each variable.
[0058] Further, as described in step S11, a sliding window method is used to generate... The test set consists of 10 test samples. The data dimension of each sample is In this example, the test set sample length is... , , A total of One test sample.
[0059] Train the spatiotemporal dual-channel classifier according to step S13, optimize the network parameters, and obtain the optimal model parameters. Input online test set samples. Once the optimal model has been trained, it outputs prediction results in both channels: (39) in, Indicates the first The ensemble prediction probability of each test sample. and These represent the category prediction probabilities of the time channel and the spatial channel outputs, respectively.
[0060] Finally, take The index of the location with the highest predicted probability is used as the predicted label category for the sample. (40) in, Indicates the first Predicted label results for each test sample; Label 0 indicates a normal sample, and label 1 indicates an abnormal sample.
[0061] If the first If a test sample is identified as an anomalous sample, the corresponding temporal attention distribution is returned in step S12. Spatial adjacency matrix Used for anomaly cause analysis. Specifically, such as... Figure 7 and Figure 8 As shown, the time dimension is represented by attention distribution. The timestamps of key anomalies in the sample can be identified; the spatial dimension is determined through the adjacency matrix. Extract the neighboring nodes of key indicators (suction resistance, ventilation), and assign the neighboring nodes according to the corresponding graph attention weights. Sort the values in descending order and output the top-3 indicators as the anomaly explanation results. In this example, the top-3 anomaly indicators for this sample are: 6 - SE tape tension pressure, 14 - cigarette segment value 3, and 25 - cigarette empty head detection value.
[0062] To more clearly demonstrate the superiority of the complementary spatiotemporal dual-channel classifier designed in this invention in anomaly detection tasks, classic traditional machine learning models (XGBoost, RF) and deep learning baseline models (CNN, LSTM) were used as comparison models to verify the effectiveness and robustness of the proposed method in noisy label scenarios. Furthermore, MLP-HDCT is a simplification of the proposed method, replacing the heterogeneous spatiotemporal dual-channel with two MLP networks with identical structures, further validating the effectiveness of constructing the heterogeneous dual-channel network. Using 500 collected test samples as input samples (with real labels annotated by experts), the performance comparison of each model is shown in Table 1: Table 1 Comparison of Evaluation Indicators for Different Models
[0063] As shown in Table 1, the proposed method outperforms the suboptimal MLP-HDCT model in all metrics. Specifically, accuracy is improved by 6.3%, precision by 10.1%, recall by 4.9%, and F1 score by 7.6%. The main reason for this performance improvement is that the MLP-HDCT method uses a homogeneous network to construct dual channels, resulting in similar fitting capabilities and a single classification perspective, limiting its resistance to noisy labels. Furthermore, XGBoost, RF, CNN, and LSTM models all perform poorly under noisy label conditions. Unlike existing technologies, the spatiotemporal dual-channel classifier proposed in this invention not only has stronger anomaly detection performance but also explains the causes of anomalies from both temporal and spatial dimensions, thus exhibiting stronger robustness and superior detection results.
[0064] On the other hand, the present invention also provides an anomaly detection system for noise in key indicator labels of cigarettes, the system including a processor configured to perform any of the methods described in the anomaly detection method for noise in key indicator labels of cigarettes.
[0065] In another aspect, the present invention also provides a computer-readable storage medium storing instructions that, when executed by a processor, implement any of the methods described in the anomaly detection method for cigarette key indicator label noise.
[0066] The beneficial effects of this invention are: This invention addresses the challenge of anomaly detection for two key control indicators—draw resistance and ventilation—during cigarette rolling under label noise conditions. It provides a spatiotemporal dual-channel anomaly detection method for key indicator label noise and constructs a spatiotemporally heterogeneous dual-channel semi-supervised collaborative training framework. First, high-confidence clean samples are screened using the out-of-limit ratio of key indicators within a periodic window, providing reliable supervision signals for the model. In the temporal dimension, a temporal classifier combined with the process values of key indicators models a sequence dependency structure. In the spatial dimension, a spatial classifier combined with the process sequence models the process coupling relationships between variables. Through this collaborative training strategy, the model can improve its anomaly recognition capability from both spatiotemporal perspectives. To deeply analyze anomaly patterns in the rolling process, the proposed spatiotemporal classifier provides interpretability analysis from both temporal and spatial dimensions, effectively locating time segments and process variables that have a crucial impact on anomaly identification. Compared with existing anomaly detection methods, this invention demonstrates superior performance in both anomaly detection and interpretability, more accurately depicting the operational state of the rolling process, and has significant application value in cigarette production.
[0067] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0068] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0069] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0070] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0071] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0072] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0073] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0074] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0075] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for detecting anomalies in the noise of key indicator labels on cigarettes, characterized in that, The detection method includes: Acquire historical time-series data of cigarettes and perform correlation analysis to obtain a dataset of related indicators; The dataset of related indicators is preprocessed to obtain a training sample set; A spatiotemporal dual-channel detection model is constructed to obtain the prediction probabilities of the temporal classifier and the spatial classifier. The spatiotemporal dual-channel detection model was trained using a training sample set; A trained spatiotemporal dual-channel detection model is used to detect real-time collected cigarette sample data to obtain detection results.
2. The detection method according to claim 1, characterized in that, Preprocessing the aforementioned correlation index dataset to obtain a training sample set includes: The dataset of related indicators is divided into sliding window segments to obtain a sliding window sample set; Obtain the out-of-limit rate for each sliding window sample; Based on the sample out-of-limit rate, the correlation index dataset is divided into a clean sample set with high confidence and a labeled sample set with low confidence, which are used as training sample sets.
3. The detection method according to claim 1, characterized in that, A spatiotemporal dual-channel detection model is constructed to obtain the prediction probabilities of the temporal classifier and the spatial classifier, including: A time classifier is constructed using gated recurrent units to obtain the hidden states of all time steps; The hidden state is input into the attention mechanism to obtain attention weights; Calculate the corresponding prior attention weights for the suction resistance based on the process values of the suction resistance corresponding to the key indicators. The corrected attention weight is obtained based on the attention weight and the prior attention weight of the attraction resistance; The hidden states at all time steps are aggregated using the modified attention weights to obtain a temporal representation of the process. The predicted probability of the time classifier is obtained based on the temporal representation of the process.
4. The detection method according to claim 3, characterized in that, The corresponding prior attention weights for attraction resistance are calculated based on the process values of attraction resistance corresponding to the key indicators, including: Calculate the distance between the process value and the standard value for each suction resistance; Map the distance to a non-negative prior score; The prior scores are normalized to obtain the attracting prior attention weights.
5. The detection method according to claim 1, characterized in that, A spatiotemporal dual-channel detection model is constructed to obtain the prediction probabilities of the temporal classifier and the spatial classifier, including: A spatial classifier is constructed using a graph attention network, which includes a graph structure learning layer and a graph information propagation layer. The graph structure learning layer is used to obtain a learnable adjacency matrix; A sparsification method is used to obtain strongly correlated neighbor nodes in the adjacency matrix, resulting in a simplified learning graph structure; The sequence of the coiling process is embedded as process knowledge into the graph structure to obtain a learnable dynamic adjacency matrix. The initial features of each node in the learnable dynamic adjacency matrix are updated using the graph information propagation layer to obtain a spatial representation. The spatial classifier prediction probability is obtained based on the spatial representation.
6. The detection method according to claim 5, characterized in that, Embedding the coiling process sequence as process knowledge into the graph structure to obtain a learnable dynamic adjacency matrix includes: Based on formula (1), a process mask matrix is constructed according to the sequence of the splicing process. ,(1) in, This is a process mask matrix, representing that only when the variable... It belongs to the process And variables Belongs to the next process hour, =1; The learnable dynamic adjacency matrix is obtained according to formula (2). ,(2) in, It is a learnable dynamic adjacency matrix. This is the graph structure. It represents the Hadamardi (or Hadama) stack.
7. The detection method according to claim 1, characterized in that, Training the spatiotemporal dual-channel detection model using a training sample set includes: The spatiotemporal dual-channel detection model is semi-supervised and co-trained using a low-confidence sample set from the training sample set. The spatiotemporal dual-channel detection model is trained in a supervised manner using a high-confidence sample set from the training sample set.
8. The detection method according to claim 7, characterized in that, Semi-supervised co-training of the spatiotemporal dual-channel detection model using the low-confidence sample set in the training sample set includes: The semi-supervised loss function is obtained according to formulas (3) to (6). ,(3) ,(4) ,(5) ,(6) in, For cross-entropy loss, The mean squared error loss for pseudo-labeled samples. For regularization loss, For semi-supervised loss functions, For the first Cross-entropy loss for each sample, This represents the prediction result of the current channel for unlabeled samples in the low-confidence sample set. To predict the results of unlabeled samples in a low-confidence sample set using a dual-channel approach, For batch size, The total number of categories, For a labeled sample set, This is a sample set of pseudo-labels. This indicates the predicted probability of the current channel. for The weighting coefficients, for The weighting coefficients.
9. An anomaly detection system for noise in key indicator labels of cigarettes, characterized in that, The system includes a processor configured to perform the method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a processor, implement the method as described in any one of claims 1 to 8.