Export cigarette traceability code laser printing and quality inspection synchronous processing method
By generating unique traceability codes using high-precision sensors and convolutional neural networks, and combining infrared spectroscopy analysis and blockchain technology, the problem of separating cigarette traceability code printing from quality inspection has been solved, achieving simultaneous processing and efficient production.
Patent Information
- Application Number
- CN202511044231.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-10-31
AI Technical Summary
The existing separation of cigarette traceability code printing and quality inspection processes leads to information mismatch, incomplete traceability information, and low production efficiency, which affects product quality control and market competitiveness.
Data is collected by high-precision sensors and preprocessed using convolutional neural networks to generate unique traceability codes that are printed in real time. Simultaneously, quality inspection is performed, using an infrared spectrometer to detect components such as nicotine and tar. The data is stored in a distributed database and encrypted for verification. Blockchain technology is used to ensure data security and trigger an alarm mechanism to handle anomalies.
It enables the simultaneous processing of traceability codes and quality inspection, improving production efficiency and information accuracy, ensuring the integrity and security of traceability information, and promptly identifying and addressing quality issues.
Smart Images

Figure CN120875907A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of cigarette production and traceability, and more specifically, to a method for simultaneous laser printing and quality inspection of traceability codes for exported cigarettes. Background Technology
[0002] The export cigarette traceability code is an important identifier used to ensure the quality and safety of cigarette products. Based on advanced laser printing technology, it prints a unique code containing key information such as production batch, production time, and production line number on the cigarette packaging in real time. This traceability code not only makes it easy for consumers to verify the authenticity of cigarettes, but it is also a key tool for enterprises to achieve product quality traceability and management. By scanning the traceability code, relevant departments can quickly obtain detailed information such as the source of cigarette production, distribution path, and quality inspection reports, thereby effectively monitoring product quality and combating counterfeit and substandard products. Currently, the printing of traceability codes and quality inspection processes for cigarettes are often independent, significantly reducing production efficiency. Traceability code printing is typically performed independently at one stage of the production line, while quality inspection is conducted separately at another. The lack of real-time information exchange between the two not only increases the production cycle but can also lead to mismatches between traceability codes and quality inspection information, causing problems for subsequent product traceability and quality control. Furthermore, existing traceability codes often cannot synchronize with quality inspection results in real time, meaning the information carried by the traceability code may be incomplete and unable to fully reflect the true quality of the cigarettes. This weakens the effectiveness of the traceability code and affects the efficiency of quality control and traceability for exported cigarettes, potentially negatively impacting brand image and market competitiveness. Therefore, how to synchronize traceability code laser printing with quality inspection is of great significance. Summary of the Invention
[0003] This invention provides a method for simultaneous laser printing of traceability codes for exported cigarettes and quality inspection, which solves the problems of separation between traceability code printing and quality inspection processes, information mismatch, incomplete traceability information, and low production efficiency in the prior art. It enables simultaneous processing of traceability code laser printing and quality inspection, improves the convenience and synergy of traceability and quality inspection, and increases production efficiency.
[0004] To achieve the above objectives, the present invention provides the following technical solution:
[0005] A method for simultaneous laser printing and quality inspection of traceability codes for exported cigarettes includes:
[0006] High-precision sensors are used to collect cigarette production data, and convolutional neural networks are used to preprocess the production data to extract key features.
[0007] A unique traceability code is generated based on the preprocessed data, and the traceability code is printed on the cigarette packaging in real time using a high-precision laser printer.
[0008] While the traceability code is being printed, the cigarettes are being tested for quality using an infrared spectroscopy analyzer, and the results are being linked to the traceability code to generate complete traceability information.
[0009] The traceability information and quality inspection results are stored in a distributed database, and the stored data is encrypted and verified using blockchain.
[0010] When the traceability results do not meet the standards, an alarm mechanism is automatically triggered to stop production on the current production line and notify relevant personnel for handling.
[0011] Preferred options also include:
[0012] During the collection and preprocessing of the production data, the collected data is standardized to ensure that data collected by different sensors can be compared and analyzed on a uniform scale.
[0013] Preferably, generating a unique traceability code based on the preprocessed data includes:
[0014] The MD5 hash algorithm was used to generate the traceability code, which includes information such as production batch, production time and production line number.
[0015] Preferably, the quality detection of cigarettes using an infrared spectroscopy analyzer includes:
[0016] Cigarettes were subjected to spectral analysis using an infrared spectrometer, and the absorbance formula was applied: The absorbance of the cigarette is calculated, and then the harmful substances of nicotine and tar in the tobacco are accurately quantified based on the absorbance of the cigarette. Here, A is the absorbance, I is the transmitted light intensity, and I0 is the incident light intensity.
[0017] Preferably, storing the traceability information and quality inspection results in a distributed database includes:
[0018] The distributed database used is Cassandra, which is based on the formula: To determine the data partitions, traceability information and quality inspection results are evenly distributed across the partitions. Here, P(k) represents the data partition, k is the data key, and N is the total number of partitions. Here, is the hash function, and mod is the modulo operation.
[0019] Preferably, the Cassandra database uses a replication factor mechanism to back up data on multiple nodes to ensure data reliability and durability.
[0020] Preferably, the use of blockchain to encrypt and verify the stored data includes:
[0021] The consensus mechanism used by the blockchain is Proof-of-Work (PoW). This mechanism ensures the stability and security of the blockchain network by dynamically adjusting the mining difficulty. The formula for adjusting the mining difficulty is: Where D represents the adjusted difficulty, D0 represents the initial difficulty, and T represents the final difficulty. 目标 For the target block time, T 实际 This refers to the actual block time.
[0022] Preferred options also include:
[0023] When conducting quality testing on cigarettes, gas chromatography and liquid chromatography are used to detect various chemical components in cigarettes, including but not limited to harmful substances such as nicotine, tar, and carbon monoxide, as well as key indicators such as aroma components and moisture content. The test data are processed through quality scoring to generate a comprehensive quality score.
[0024] Preferably, the obtained detection data is processed through quality scoring to generate a comprehensive quality score, including:
[0025] Through the formula: The quality score of the cigarette is calculated, where Q represents the quality score of the cigarette, and w i Let x represent the weight of the i-th detection indicator. i is the actual score of the i-th detection indicator.
[0026] Preferably, the alarm mechanism adopts a comprehensive anomaly scoring mechanism, which is based on the formula: An anomaly score is calculated to quantify the degree of anomaly. An alarm is automatically triggered when the anomaly score exceeds a preset threshold, where S is the anomaly score and e is the threshold value. i Let be the score of the i-th abnormal indicator.
[0027] This invention provides a method for simultaneous laser printing and quality inspection of traceability codes for exported cigarettes. In the data acquisition and preprocessing stage, the use of high-precision sensors and convolutional neural networks ensures the accuracy of production data and the extraction of key features. Subsequently, a unique traceability code is generated based on the preprocessed data, and quality inspection is performed simultaneously with the printing of the traceability code. The quality inspection results are linked to the traceability code, and distributed databases and blockchain technology are used to encrypt and verify the stored data. Anomalies and alarms are triggered for quality inspection results that do not meet standards. This method solves the problems of separation between existing cigarette traceability code printing and quality inspection processes, information mismatch, incomplete traceability information, and low production efficiency. It enables simultaneous laser printing of traceability codes and quality inspection, improving the convenience and synergy of traceability and quality inspection, and increasing production efficiency. Attached Figure Description
[0028] To more clearly illustrate the specific embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below.
[0029] Figure 1 This is a schematic diagram of a method for simultaneous laser printing and quality inspection of traceability codes for exported cigarettes provided by the present invention. Detailed Implementation
[0030] To enable those skilled in the art to better understand the embodiments of the present invention, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and implementation methods.
[0031] To address the current problem of low efficiency caused by the separation of traceability code printing and quality inspection processes in cigarette manufacturing, which results in asynchronous traceability and quality information, this invention provides a method for simultaneous laser printing of traceability codes and quality inspection for exported cigarettes. This method solves the problems of separation of traceability code printing and quality inspection processes, information mismatch, incomplete traceability information, and low production efficiency in existing technologies. It enables simultaneous processing of traceability code laser printing and quality inspection, improving the convenience and synergy of traceability and quality inspection, and increasing production efficiency.
[0032] like Figure 1 As shown, a method for simultaneous laser printing and quality inspection of traceability codes for exported cigarettes includes:
[0033] S10: Collect cigarette production data through high-precision sensors, and preprocess the production data using a convolutional neural network to extract key features;
[0034] S20: Generate a unique traceability code based on the preprocessed data, and use a high-precision laser printer to print the traceability code on the cigarette packaging in real time;
[0035] S30: While printing the traceability code, the quality of the cigarettes is tested using an infrared spectroscopy analyzer, and the quality test results are linked with the traceability code to generate complete traceability information;
[0036] S40: Store the traceability information and quality inspection results in a distributed database, and use blockchain to encrypt and verify the stored data;
[0037] S50: When the traceability result does not meet the standard, an alarm mechanism is automatically triggered to stop the current production line and notify relevant personnel for handling.
[0038] Specifically, steps S10 to S30 achieve simultaneous processing of traceability code laser printing and quality inspection. During the data acquisition and preprocessing stage, the use of high-precision sensors and convolutional neural networks ensures the accuracy of production data and the extraction of key features. Subsequently, a unique traceability code is generated based on the preprocessed data, and quality inspection is performed simultaneously with traceability code printing. The quality inspection results are then linked to the traceability code. This process design not only significantly improves production efficiency but also ensures accurate correspondence between the traceability code and quality inspection information, avoiding information mismatch issues. Furthermore, step S30 explicitly proposes performing quality inspection simultaneously with traceability code printing and linking the inspection results to the traceability code to generate complete traceability information. This innovative design ensures that the traceability code not only contains basic production information but also embeds the specific results of quality inspection in real time. This comprehensively reflects the true quality of cigarettes, improving the effectiveness and practicality of the traceability code. Furthermore, through data storage and traceability in step S40, distributed databases and blockchain technology are used to encrypt and verify the stored data, ensuring the security and traceability of the traceability information. This design not only enhances data protection but also provides strong support for subsequent product traceability and quality control. Finally, addressing the possibility of product quality issues not being detected and handled promptly in the background technology, an anomaly handling and alarm mechanism is proposed in step S50. When the quality inspection results do not meet the standards, the system will automatically trigger the alarm mechanism, stop production on the current production line, and notify relevant personnel for handling. This design not only helps to promptly detect and resolve product quality problems but also improves the automation level and response speed of the production line.
[0039] In a preferred embodiment, the high-precision sensors in step S10 may be further configured as follows: These include a humidity sensor, a weight sensor, and a diameter measuring instrument, to provide comprehensive monitoring of the cigarette production environment and the cigarettes themselves. The collected data is processed using a specific standardized formula. Where x is the original data, μ is the mean, and σ is the standard deviation. This ensures that data collected by different sensors can be compared and analyzed on a uniform scale. In step S10, the convolutional neural network consists of an input layer, multiple convolutional layers, pooling layers, and fully connected layers, forming a deep learning framework. The activation function used in the convolutional layers is the ReLU function. In step S10, a high-precision sensor combination, including a humidity sensor, a weight sensor, and a diameter measuring instrument, is introduced to achieve comprehensive monitoring of the cigarette production environment and the cigarettes themselves. This combined data acquisition method not only improves the comprehensiveness and accuracy of the data but also provides a more reliable foundation for subsequent data preprocessing and traceability code generation. Through specific standardized processing formulas, data collected by different sensors can be compared and analyzed on a unified scale, further ensuring data comparability and consistency.
[0040] Step S10 details the structure of the convolutional neural network, including an input layer, multiple convolutional layers, pooling layers, and fully connected layers, forming a deep learning framework. This deep learning framework can automatically extract complex features from the data, improving the efficiency and accuracy of data preprocessing. In particular, the ReLU activation function used in the convolutional layers not only has non-linear characteristics but also accelerates the model's convergence speed and reduces training time. This design allows the convolutional neural network to better adapt to the complexity of cigarette production data, providing more accurate data support for traceability code generation.
[0041] The use of high-precision sensor combinations not only improves the comprehensiveness and accuracy of data acquisition but also provides strong support for quality control in the cigarette production process. Through comprehensive monitoring of the production environment and the cigarettes themselves, potential quality problems can be identified and resolved promptly, ensuring that exported cigarettes meet international standards and customer needs. Furthermore, the deep learning framework of convolutional neural networks can not only automatically extract data features but also improve the intelligence level of data preprocessing through continuous learning and optimization. This intelligent data processing method not only improves production efficiency but also provides strong support for the digital transformation of the cigarette industry.
[0042] In a preferred embodiment, the configuration can be further as follows: Step S20 uses the MD5 hash algorithm to generate the traceability code, specifically the formula: Traceability Code = MD5(Production Batch + Production Time + Production Line Number). Step S30 uses an infrared spectrometer employing high-precision spectral detection technology, which is determined by the formula: Where A is absorbance, I is transmitted light intensity, and I0 is incident light intensity; the absorbance directly reflects the light absorption characteristics of various chemical components in tobacco. Infrared spectroscopy analysis allows for precise quantification of harmful substances such as nicotine and tar in tobacco. In step S20, the MD5 hash algorithm is used to generate the traceability code. The MD5 hash algorithm has high uniqueness and irreversibility; even slight changes in the input data will result in completely different hash values, ensuring the uniqueness and non-replicability of the traceability code. Simultaneously, by setting the formula "Traceability Code = MD5(Production Batch + Production Time + Production Line Number)," key information such as production batch, production time, and production line number are integrated into the traceability code, ensuring information integrity and improving traceability convenience. This design not only avoids duplicate generation of traceability codes but also enhances their security and anti-counterfeiting capabilities.
[0043] Infrared spectroscopy analysis can directly reflect the light absorption characteristics of various chemical components in tobacco. By calculating the absorbance using specific formulas, the content of harmful substances such as nicotine and tar in tobacco can be accurately quantified. This high-precision detection technology not only improves the accuracy and reliability of quality testing but also provides strong data support for cigarette quality control. Furthermore, the use of infrared spectroscopy analyzers enables real-time monitoring and rapid feedback of cigarette quality, helping to promptly identify and resolve potential quality problems, thereby ensuring that exported cigarettes meet international standards and customer requirements.
[0044] The application of the MD5 hash algorithm not only enhances the security and uniqueness of traceability codes but also provides a more effective means of anti-counterfeiting and traceability for cigarette products. By scanning the traceability code, consumers can quickly obtain detailed information such as the cigarette's production source, distribution path, and quality inspection reports, effectively verifying the authenticity and quality of the cigarettes. Simultaneously, the high-precision detection technology of infrared spectroscopy analyzers provides strong support for quality supervision and standardized production in the cigarette industry. Through continuous optimization and improvement of detection technologies, the quality stability and market competitiveness of cigarettes can be further enhanced, promoting the sustainable development of the cigarette industry.
[0045] In a preferred embodiment, the blockchain technology in step S40 can be further configured as follows: the consensus mechanism adopted is PoW, which ensures the stability and security of the blockchain network by dynamically adjusting the mining difficulty. The formula for adjusting the mining difficulty is: ,in, The adjusted difficulty This is the initial difficulty level. For the target block time, The actual block generation time is the time when the network's computing power changes. This time, the actual block generation time may deviate from the target block generation time. In this case, the system automatically adjusts the mining difficulty according to the formula above to maintain a stable block generation rate. Step S40 introduces blockchain technology and specifically specifies the use of the PoW (Proof-of-Work) consensus mechanism. The PoW consensus mechanism ensures the stability and security of the blockchain network by dynamically adjusting the mining difficulty. The core of this mechanism lies in its ability to automatically adjust the mining difficulty based on changes in the network's computing power, thereby maintaining a stable block generation rate. This design not only effectively prevents malicious attackers from tampering with blockchain data by controlling a large amount of computing power but also ensures that the blockchain network can maintain stable operation when faced with fluctuations in computing power. Furthermore, blockchain technology using the PoW consensus mechanism also features decentralization, high transparency, and data immutability, providing more reliable and secure guarantees for the storage and tracing of traceability information.
[0046] The mining difficulty adjustment formula in the Proof-of-Work (PoW) consensus mechanism plays a crucial role in maintaining the stability of the blockchain network. This formula dynamically adjusts the mining difficulty by comparing the target block time with the actual block time, ensuring a stable block generation rate. When the network's computing power increases, the actual block generation time may shorten. In this case, the system automatically increases the mining difficulty according to the formula to prevent data congestion and security issues caused by excessively rapid block generation. Conversely, when the network's computing power decreases, the actual block generation time may lengthen. The system automatically decreases the mining difficulty according to the formula to ensure timely block generation and maintain stable network operation. This flexible mining difficulty adjustment mechanism not only improves the adaptability and robustness of the blockchain network but also provides strong support for the real-time storage and efficient traceability of traceability information. Furthermore, with continuous technological advancements and the expansion of application scenarios, the PoW consensus mechanism and its mining difficulty adjustment formula can be further explored and optimized in the future to better adapt to the specific needs of traceability information storage and tracing in the cigarette industry.
[0047] In a preferred embodiment, the configuration can be further as follows: In step S50, a machine learning model is used for quality classification and prediction. Specifically, the algorithm is random forest. The random forest algorithm improves the accuracy and robustness of classification by integrating the classification results of multiple decision trees. Its classification decision formula is: Where C(x) is the final classification result, h i (x) represents the classification result of the i-th decision tree.
[0048] The alarm mechanism in step S50 employs a comprehensive anomaly scoring system, which uses the formula: Where S is the anomaly score; w i e represents the weight of the i-th abnormal indicator; iLet be the score of the i-th abnormal indicator.
[0049] The system quantifies the degree of anomaly. When the anomaly score exceeds a preset threshold, the system automatically triggers an alarm and notifies relevant personnel via SMS and email, ensuring a rapid response and handling of the issue. In step S50, a machine learning model is introduced for quality classification and prediction, specifically using the Random Forest algorithm. The Random Forest algorithm effectively improves the accuracy and robustness of classification by integrating the classification results of multiple decision trees. Its classification decision formula comprehensively considers the output results of multiple decision trees, avoiding the overfitting and bias problems that may exist with a single decision tree. This design makes quality classification and prediction more comprehensive and accurate, helping to promptly identify and handle potential quality problems. Furthermore, the Random Forest algorithm can handle large amounts of data and complex features, adapting to the diverse and complex data characteristics of the cigarette production process.
[0050] The alarm mechanism in step S50 employs a comprehensive anomaly scoring system. This system quantifies the severity of anomalies by comprehensively considering multiple anomaly indicators through a formula. These anomaly indicators may include abnormalities in key parameters during the production process, non-compliance of quality inspection results with standards, etc. By incorporating these indicators into the comprehensive anomaly scoring system, anomalies in the production line can be assessed more comprehensively and objectively. When the anomaly score exceeds a preset threshold, the system automatically triggers an alarm and notifies relevant personnel via SMS, email, etc. This design not only improves the accuracy and timeliness of alarms but also ensures that problems can be responded to and handled quickly. Furthermore, the comprehensive anomaly scoring system can be continuously optimized and adjusted based on historical data and actual conditions to adapt to the needs of different production lines and products, further improving the stability of the production line and product quality.
[0051] In a preferred embodiment, the distributed database used in step S40 can be further configured as follows: the distributed database used in step S40 is a Cassandra database, and the Cassandra database uses the following formula to determine data partitions:
[0052] ;
[0053] Where P(k) is the data partition, k is the data key, and N is the total number of partitions;
[0054] The partitioning strategy uses a hash function to map data keys to a fixed range of values and then distributes the data evenly across partitions using a modulo operation. In step S40, Cassandra is used as the distributed database solution. Cassandra is renowned for its high availability and scalability, making it particularly suitable for handling the storage and access of large-scale data. By employing a specific partitioning strategy, Cassandra can use a hash function to map data keys to a fixed range of values and then distribute the data evenly across partitions using a modulo operation. This partitioning strategy not only improves data storage efficiency but also ensures load balancing for data access, avoiding access bottlenecks caused by centralized data storage. Therefore, using Cassandra can significantly improve the speed of data storage and access, meeting the high requirements for real-time data accuracy in cigarette production.
[0055] The introduction of the Cassandra database not only solved the problems of data storage and access efficiency but also brought other advantages. First, Cassandra supports a distributed architecture, easily handling the storage needs of massive amounts of data. In the cigarette production process, a large amount of production data, quality inspection data, etc., is generated, and this data needs to be stored and accessed in real time and accurately. Cassandra's distributed architecture enables it to easily handle this large-scale data storage requirement, ensuring data integrity and consistency. Second, Cassandra has high availability and fault tolerance, automatically handling node failures and data replication to ensure data reliability and durability. In the cigarette production process, any data loss or corruption can seriously affect product quality and production efficiency. Therefore, Cassandra's high availability and fault tolerance provide more reliable data protection for cigarette production. Finally, Cassandra also supports multiple data models and query methods, flexibly responding to different data needs and application scenarios. This allows Cassandra to play a greater role in the cigarette production process, providing more comprehensive and accurate data support for data analysis and decision support.
[0056] In a preferred embodiment, the quality inspection scoring system in step S30 may be further configured as follows: a weighted summation method is used, and the system uses the formula: ;
[0057] in, The quality score of cigarettes is a comprehensive quantitative indicator used to objectively evaluate the quality level of cigarettes. Indicates the first The weights of each detection indicator are pre-set based on the importance of each indicator to the quality of cigarettes, reflecting the relative contribution of different indicators to the quality evaluation. Then it represents the first The actual scores of each testing indicator are quantified based on the actual test results. The quality testing scoring system in step S30 employs a weighted summation method. This method, by comprehensively considering the scores and weights of multiple testing indicators, can more objectively and comprehensively assess the quality level of cigarettes. The quality score in the formula is a comprehensive quantitative indicator, calculated based on the actual scores of each testing indicator and preset weights. This avoids the one-sidedness of single-indicator evaluation and also reduces the influence of human factors on the evaluation results. This design makes the quality testing scoring more accurate and reliable, contributing to improving the quality control and supervision level of cigarette production.
[0058] The introduction of the weighted summation method not only solves the problems of bias and subjectivity in quality inspection scoring, but also brings other advantages. First, this method allows for flexible weighting of different inspection indicators, reflecting the relative contribution of each indicator in quality evaluation. In practical applications, the weights of each indicator can be reasonably set according to the specific needs of cigarette production and the importance of each indicator, making the quality score more consistent with reality. Second, the calculation process of the weighted summation method is relatively simple and clear, easy to understand and operate. This helps reduce the complexity and cost of quality inspection scoring and improves evaluation efficiency. Finally, this method also has a certain degree of scalability. With the continuous advancement of cigarette production technology and the continuous improvement of quality requirements, new inspection indicators can be continuously added and their corresponding weights adjusted to adapt to new quality evaluation needs. This scalability enables the quality inspection scoring system to continuously maintain its accuracy and effectiveness, providing strong support for quality control and supervision of cigarette production.
[0059] In a preferred embodiment, the Cassandra database in step S40 can be further configured such that it backs up data across multiple nodes using a replication factor mechanism to ensure data reliability and durability. When a node fails, other nodes can continue to provide services, ensuring uninterrupted system operation. Furthermore, Cassandra supports dynamically adding or removing nodes to respond to growth or reduction in business needs. Step S40 introduces the Cassandra database and, through its replication factor mechanism, implements data backup across multiple nodes. This mechanism ensures data reliability and durability; even if a node fails, other nodes can continue to provide services, thus guaranteeing uninterrupted system operation. This design effectively avoids the risk of data loss or corruption, improving the security and stability of data storage.
[0060] Cassandra's replication factor mechanism not only improves data reliability and durability but also brings other significant advantages. Firstly, Cassandra supports dynamically adding or removing nodes to flexibly respond to growth or reduction in business needs. This means that as business develops, the database's size and performance can be dynamically adjusted according to actual needs without worrying about the complexity of data migration or system restructuring. This flexibility allows Cassandra to better adapt to ever-changing market environments and business demands. Secondly, Cassandra's distributed architecture enables data to be stored and backed up across multiple geographical locations, thereby improving data disaster recovery and availability. Even if a node in one geographical location fails, nodes in other geographical locations can continue to provide services, ensuring business continuity and stability. This cross-regional data backup and disaster recovery capability is particularly important for critical industries such as cigarette production, effectively reducing business losses caused by data loss or system downtime.
[0061] In a preferred embodiment, the quality inspection step in step S30 can be further configured as follows: To achieve a comprehensive evaluation of cigarette quality, the quality inspection system, in addition to using an infrared spectrometer, integrates gas chromatography and liquid chromatography. This allows for the detection of various chemical components in cigarettes, including but not limited to harmful substances such as nicotine, tar, and carbon monoxide, as well as key indicators such as aroma components and moisture content. The detected data is processed using a weighted summation quality scoring system to generate a comprehensive quality score. This represents a significant improvement in the quality inspection step in step S30. By integrating infrared spectrometer, gas chromatography, and liquid chromatography, the quality inspection system can achieve a comprehensive evaluation of cigarette quality. This improvement not only expands the detection range to cover harmful substances such as nicotine, tar, and carbon monoxide, as well as key indicators such as aroma components and moisture content, but also improves the accuracy and reliability of the detection. The weighted summation quality scoring system processes the detected data to generate a comprehensive quality score, which objectively reflects the overall quality level of the cigarettes, providing strong support for quality control and supervision during the production process.
[0062] Integrating multiple detection methods allows the quality inspection system to gain a deeper understanding of the chemical composition and quality characteristics of cigarettes. Infrared spectroscopy is primarily used to detect organic compounds and functional groups in cigarettes, gas chromatography excels at separating and detecting volatile components, while liquid chromatography is suitable for separating and analyzing non-volatile components. The combined use of these three methods enables comprehensive detection and analysis of various chemical components in cigarettes, providing more accurate and comprehensive data support for quality assessment. Furthermore, the weighted summation quality scoring system not only considers the numerical value of each detection indicator but also weights them according to the importance of each indicator's impact on quality. This design makes the quality score more realistic and accurately reflects the quality level of cigarettes. Simultaneously, the adjustability of the quality scoring system allows it to adapt to the quality assessment needs of different cigarette brands and specifications, improving the system's flexibility and applicability.
[0063] This method for simultaneous laser printing and quality inspection of traceability codes for exported cigarettes is a comprehensive system that integrates multiple stages, including high-precision data acquisition, traceability code generation and laser printing, quality inspection and simultaneous processing, data storage and traceability, and anomaly handling and alarm. Its workflow begins with data acquisition and preprocessing. High-precision sensors (including humidity sensors, weight sensors, and diameter measuring instruments) are used to comprehensively collect data on the cigarette production environment and the cigarettes themselves. Convolutional neural networks are then used to preprocess this data and extract key features. This preprocessed data provides the foundation for subsequent traceability code generation and quality inspection.
[0064] In the traceability code generation and laser printing process, the system uses the MD5 hash algorithm to generate a unique traceability code based on the pre-processed data, and uses a high-precision laser printer to print the traceability code on the cigarette packaging in real time. This step ensures that each pack of cigarettes has a unique identification, which facilitates subsequent traceability and management.
[0065] The quality inspection and simultaneous processing stage is one of the core aspects of this method. While the traceability code is being printed, the system uses an infrared spectroscopy analyzer to conduct quality inspections on the cigarettes. The inspections include the content of harmful substances such as nicotine and tar, as well as key indicators such as aroma components and moisture content. In order to achieve a comprehensive evaluation of cigarette quality, the quality inspection system also integrates gas chromatography and liquid chromatography, which further improves the accuracy and comprehensiveness of the inspections. The data obtained from the inspections are processed by a weighted summation quality scoring system to generate a comprehensive quality score, which objectively reflects the quality level of the cigarettes.
[0066] The data storage and traceability process stores traceability information and quality inspection results in a distributed database and uses blockchain technology to encrypt and verify the stored data. The Cassandra database used here distributes the data evenly across the partitions through a specific partitioning strategy, which improves the data storage efficiency and access speed. At the same time, the replication factor mechanism of the Cassandra database ensures the reliability and durability of the data. Even if a node fails, other nodes can continue to provide services, ensuring the uninterrupted operation of the system.
[0067] Finally, in the anomaly handling and alarm process, when the quality inspection results do not meet the standards, the system will automatically trigger the alarm mechanism, stop the current production line, and notify relevant personnel to handle the issue via SMS, email, etc. In order to improve the accuracy and efficiency of anomaly handling, the system also uses machine learning models (such as the random forest algorithm) for quality classification and prediction, as well as a comprehensive anomaly scoring system to quantitatively evaluate the degree of anomaly.
[0068] In summary, this method of simultaneous laser printing and quality inspection of traceability codes for exported cigarettes integrates multiple advanced technologies and algorithms, enabling comprehensive monitoring and management of the cigarette production process, improving product quality and traceability efficiency, and providing strong support for the sustainable development of the cigarette industry.
[0069] As can be seen, this invention provides a method for simultaneous laser printing and quality inspection of traceability codes for exported cigarettes. In the data acquisition and preprocessing stage, the use of high-precision sensors and convolutional neural networks ensures the accuracy of production data and the extraction of key features. Subsequently, a unique traceability code is generated based on the preprocessed data, and quality inspection is performed simultaneously with the printing of the traceability code. The quality inspection results are associated with the traceability code, and distributed databases and blockchain technology are used to encrypt and verify the stored data. Anomalies and alarms are triggered for quality inspection results that do not meet standards. This method solves the problems of separation between existing cigarette traceability code printing and quality inspection processes, information mismatch, incomplete traceability information, and low production efficiency. It enables simultaneous laser printing of traceability codes and quality inspection, improving the convenience and synergy of traceability and quality inspection, and increasing production efficiency.
[0070] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Those skilled in the art can readily implement the present invention based on the accompanying drawings and the above description. However, any modifications, alterations, or variations made by those skilled in the art without departing from the scope of the present invention, utilizing the disclosed technical content, are equivalent embodiments of the present invention. Furthermore, any modifications, alterations, or variations made to the above embodiments based on the essential technology of the present invention are still within the protection scope of the present invention.
Claims
1. A method for simultaneous laser printing and quality inspection of traceability codes for exported cigarettes, characterized in that, include: High-precision sensors are used to collect cigarette production data, and convolutional neural networks are used to preprocess the production data to extract key features. A unique traceability code is generated based on the preprocessed data, and the traceability code is printed on the cigarette packaging in real time using a high-precision laser printer. While the traceability code is being printed, the cigarettes are being tested for quality using an infrared spectroscopy analyzer, and the results are being linked to the traceability code to generate complete traceability information. The traceability information and quality inspection results are stored in a distributed database, and the stored data is encrypted and verified using blockchain. When the traceability results do not meet the standards, an alarm mechanism is automatically triggered to stop production on the current production line and notify relevant personnel for handling.
2. The method for simultaneous laser printing and quality inspection of traceability codes for exported cigarettes according to claim 1, characterized in that, Also includes: During the collection and preprocessing of the production data, the collected data is standardized to ensure that data collected by different sensors can be compared and analyzed on a uniform scale.
3. The method for simultaneous laser printing and quality inspection of traceability codes for exported cigarettes according to claim 2, characterized in that, The process of generating a unique traceability code based on the preprocessed data includes: The MD5 hash algorithm was used to generate the traceability code, which includes information such as production batch, production time and production line number.
4. The method for simultaneous laser printing and quality inspection of traceability codes for exported cigarettes according to claim 3, characterized in that, The quality testing of cigarettes using an infrared spectroscopy analyzer includes: Cigarettes were subjected to spectral analysis using an infrared spectrometer, and the absorbance formula was applied: The absorbance of the cigarette is calculated, and then the harmful substances of nicotine and tar in the tobacco are accurately quantified based on the absorbance of the cigarette. Here, A is the absorbance, I is the transmitted light intensity, and I0 is the incident light intensity.
5. The method for simultaneous laser printing and quality inspection of traceability codes for exported cigarettes according to claim 4, characterized in that, The step of storing the traceability information and quality inspection results in a distributed database includes: The distributed database used is Cassandra, which is based on the formula: To determine the data partitions, traceability information and quality inspection results are evenly distributed across the partitions. Here, P(k) represents the data partition, k is the data key, and N is the total number of partitions. Here, is the hash function, and mod is the modulo operation.
6. The method for simultaneous laser printing and quality inspection of traceability codes for exported cigarettes according to claim 5, characterized in that, Cassandra database uses a replication factor mechanism to back up data across multiple nodes to ensure data reliability and durability.
7. The method for simultaneous laser printing and quality inspection of traceability codes for exported cigarettes according to claim 6, characterized in that, The use of blockchain to encrypt and verify stored data includes: The consensus mechanism used by the blockchain is Proof-of-Work (PoW). This mechanism ensures the stability and security of the blockchain network by dynamically adjusting the mining difficulty. The formula for adjusting the mining difficulty is: Where D represents the adjusted difficulty, D0 represents the initial difficulty, and T represents the final difficulty. 目标 For the target block time, T 实际 This refers to the actual block time.
8. The method for simultaneous laser printing and quality inspection of traceability codes for exported cigarettes according to claim 7, characterized in that, Also includes: When conducting quality testing on cigarettes, gas chromatography and liquid chromatography are used to detect various chemical components in cigarettes, including but not limited to harmful substances such as nicotine, tar, and carbon monoxide, as well as key indicators such as aroma components and moisture content. The test data are processed through quality scoring to generate a comprehensive quality score.
9. The method for simultaneous laser printing and quality inspection of traceability codes for exported cigarettes according to claim 8, characterized in that, The obtained test data is processed through quality scoring to generate a comprehensive quality score, including: Through the formula: The quality score of the cigarette is calculated, where Q represents the quality score of the cigarette, and w i Let x represent the weight of the i-th detection indicator. i is the actual score of the i-th detection indicator.
10. The method for simultaneous laser printing and quality inspection of traceability codes for exported cigarettes according to claim 9, characterized in that, The alarm mechanism adopts a comprehensive anomaly scoring mechanism, which is based on the following formula: An anomaly score is calculated to quantify the degree of anomaly. An alarm is automatically triggered when the anomaly score exceeds a preset threshold, where S is the anomaly score and e is the threshold value. i Let be the score of the i-th abnormal indicator.