QR code online association management method and packaging machine association system
By printing unique identification QR codes on the packaging line and implementing high-speed scanning and batch reading, combining multiple encryption and distributed storage, the traditional packaging line traceability and data security problems are solved, and efficient product traceability and data security are achieved. , reduces production error rate and brand risk.
Patent Information
- Application Number
- CN202411167737.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-11-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional packaging production lines lack effective product traceability mechanism, which makes it difficult to quickly locate quality problems, increasing recall costs and brand risks, and QR code identification and association methods cannot achieve accurate traceability in high-speed production environments, and data security and reliability are insufficient. .
By printing unique identification QR codes on small boxes and bars, using high-speed scanning and batch code reading technologies to achieve rapid identification and association of QR codes, using multiple encryption and distributed storage technologies to ensure data security, and real-time analysis and Visualize the production status.
It improves production line efficiency, realizes full-process product traceability from production to sales, reduces error rate, improves product quality consistency and management accuracy, and ensures data security and reliability.
Smart Images

Figure CN118691294B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of two-dimensional code management, and in particular to a two-dimensional code online association management method and a packaging machine association system. Background Art
[0002] With the popularization of product traceability systems and consumers' increasing attention to product quality information, QR code technology plays an increasingly important role in product packaging and information management. Traditional packaging production lines often lack effective product traceability mechanisms and cannot achieve full-chain traceability from production to sales. In this case, once a quality problem occurs, it is difficult to quickly locate the source and scope of the problem, increasing recall costs and brand risks. At the same time, in existing packaging systems, the association between small boxes and strip boxes often relies on manual operation or simple mechanical matching, which is prone to incorrect association or missed association, affecting the accuracy and reliability of product traceability.
[0003] In addition, in a high-speed production environment, traditional QR code recognition and association methods cannot complete product traceability without a product traceability system. Especially in each station of the packaging machine, how to achieve high-speed and accurate QR code scanning, decoding and association, as well as how to handle abnormal situations, are technical problems that need to be solved urgently. At the same time, the security and reliability of QR code data is also an important issue. How to achieve data encryption, verification and distributed storage in the production process to prevent data from being tampered with or lost is also the focus of current research. Summary of the invention
[0004] The present invention provides a two-dimensional code online association management method and a packaging machine association system, which are used to realize data association by reading the two-dimensional codes of small boxes and strip boxes, so as to meet the product chain traceability from production to sales.
[0005] In a first aspect, the present invention provides a two-dimensional code online association management method, the two-dimensional code online association management method comprising:
[0006] Generate a unique identification QR code according to the product information, and print the QR code on one side of the small box and the strip box respectively, so as to obtain a small box with an identification and a strip box with an identification;
[0007] In the conveying channel of the packaging machine, the small boxes with labels are scanned at high speed to obtain the QR code data of the small boxes, and then decoded, verified and rejected to obtain the small boxes that pass the quality inspection;
[0008] In the stacking station of the packaging machine, the small boxes that have passed the quality inspection are batch-read to obtain a small box group QR code data set and perform association analysis to obtain an initial association result, and the small boxes that have passed the quality inspection are packaged with the strip boxes with the mark to obtain the packaged strip boxes;
[0009] Scan the QR code of the packaged strip box to obtain the strip box QR code data and perform matching verification and rejection operations to obtain the correctly associated strip box and box strip association results;
[0010] Perform deep verification and encryption on the correctly associated strips and boxes and the results of strips and boxes association, obtain encrypted data packets and perform distributed storage to obtain an associated database;
[0011] The associated database is analyzed in real time and status warning is carried out to obtain production status report and status warning information and to display them visually through a human-computer interaction interface.
[0012] In a second aspect, the present invention provides a packaging machine association system, the packaging machine association system comprising:
[0013] A packaging machine, a code reader bracket, a code reader, and a cabinet, wherein the code reader bracket is installed on the packaging machine and is used to support the code reader; the code reader includes code readers arranged at the No. 1 station, the No. 2 station, and the No. 3 station, which are respectively used to read the two-dimensional codes of small boxes and strip boxes; a display and an industrial computer are arranged in the cabinet, wherein the industrial computer is used to control the operation of the system and establish a two-dimensional code association relationship between the strip box and the small box to which it belongs; wherein the code reader at the No. 1 station is arranged at the conveying channel of the front section of the packaging machine, and is used to perform quality inspection and code reading on the small box two-dimensional code; the code reader at the No. 2 station is arranged at the stacking station in the packaging machine, and is used to perform associated code reading on the small box two-dimensional code at the No. 2 station; the code reader at the No. 3 station is arranged on the strip box lifting channel, and is used to perform associated code reading on the packaged strip box two-dimensional code; the industrial computer is also used to control the rejection of small boxes and strip boxes that cannot be correctly read and for which the associated relationship is incorrectly established.
[0014] In the technical solution provided by the present invention, by implementing high-speed scanning and batch code reading at different stations of the packaging machine, the rapid identification and association of the two-dimensional codes of the small box and the strip box are realized, and the operation efficiency of the production line is greatly improved. The multiple encryption and distributed storage technology are adopted to ensure the security and reliability of the two-dimensional code data, and effectively prevent the data from being tampered with or lost. By establishing the precise association between the small box and the strip box, the comprehensive traceability from a single small box to the entire strip box is realized, which greatly improves the accuracy and efficiency of product quality management. Real-time detection and elimination of unqualified products effectively reduce the error rate in the production process and improve the consistency of product quality. Through real-time data analysis and visual display, intuitive and timely production status information is provided for production management personnel, which is adapted to different product specifications and production speeds, can be flexibly applied to various packaging production lines, and improves the adaptability and scalability of the production system. Through the automated two-dimensional code association and verification process, human operation errors are greatly reduced, and the accuracy and reliability of the production process are improved. It provides a reliable data basis for the management of the entire life cycle of the product, which is conducive to the realization of full quality traceability from production to sales. The unique identification given on the outer packaging of the small box and the strip box follows the principle of one package and one code, and adopts the QR code system. During the strip box packaging process, the QR codes of the small boxes and strip boxes are read, and the QR code association relationship between the strip box and the small boxes to which it belongs is established. The small boxes and strip boxes that fail to correctly read the box and bar QR codes and have incorrectly established "box-strip" association relationships are discarded. To solve the problem that the original model cannot realize the product traceability function, the QR codes are printed on the small boxes and strip boxes, and the QR codes of the small boxes and strip boxes are read to realize data association, so as to meet the product chain traceability from production to sales.
[0015] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0016] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0018] Figure 1 A schematic diagram of an embodiment of a method for online association management of a QR code in an embodiment of the present invention;
[0019] Figure 2 Schematic diagram of the QR code printing surface of the small box in an embodiment of the present invention;
[0020] Figure 3 Schematic diagram of the two-dimensional code printing surface of the strip box in an embodiment of the present invention;
[0021] Figure 4 is a schematic diagram of a cantilever touch screen according to an embodiment of the present invention;
[0022] Figure 5 This is a schematic diagram of a code reader bracket for station No. 1 in an embodiment of the present invention;
[0023] Figure 6 Schematic diagram of a code reader bracket for the second station in an embodiment of the present invention;
[0024] Figure 7 Schematic diagram of the code reader bracket for station No. 3 in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] The terms "including" and "having" and any variations thereof mentioned in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device end including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or device ends.
[0027] To facilitate understanding of this embodiment, a two-dimensional code online association management method disclosed in an embodiment of the present invention is first described in detail. Figure 1 As shown, the method comprises the following steps:
[0028] Step 101: Generate a unique identification QR code according to product information, and print the QR code on one side of the small box and the strip box respectively, to obtain a small box with an identification and a strip box with an identification;
[0029] It is understandable that the execution subject of the present invention may be a packaging machine associated system, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking the server as the execution subject as an example.
[0030] Specifically, the product information is hashed to obtain a hash value of a fixed length. The hash value is used as the basis of the initial data to ensure that the QR code of each product is unique and irreversible. The initial QR code data is generated according to the hash value, and the data is formatted to meet the basic requirements for QR code generation. The initial QR code data is XOR-encrypted to increase the security and anti-counterfeiting ability of the data. The XOR encryption process performs bit operations on the initial data and a randomly generated key, so that the generated QR code data is difficult to be reverse-decoded even if it is intercepted. After the encryption is completed, the mode selection is performed according to the encrypted QR code data to determine the best encoding mode, which includes analyzing the length and complexity of the data to select the most suitable QR code version and fault tolerance level to ensure that the QR code can be accurately read under different printing quality and scanning environments. The encrypted QR code data is encoded according to the optimal encoding mode to generate the encoded QR code data. The encoded QR code data is matrix-converted to convert it into a dot matrix graphic of the QR code to generate multiple candidate QR codes. Each candidate QR code represents a different graphical representation, which is used as a reference in the subsequent printing process. Scoring is performed on multiple candidate QR codes, and the scoring criteria are usually based on multiple indicators such as readability, redundancy, and damage resistance of the QR code. The optimal QR code is selected through scoring. A graphical QR code is generated based on the optimal QR code to obtain a unique identification QR code, which is used for product identity authentication and anti-counterfeiting. The first and second printed surfaces of the small box are coordinate-located to obtain the printing position of the small box, and a high-precision printing device is used to print a QR code on the small box according to the printing position of the small box to obtain a small box with an identification. Similarly, the third and fourth printed surfaces of the strip box are coordinate-located to obtain the strip box printing position, and a QR code is printed on the strip box according to the strip box printing position to obtain a strip box with an identification.
[0031] Among them, the first printing surface and the second printing surface of the small box are three-dimensionally modeled to generate a surface model of the small box, which depicts the geometric shape and surface characteristics of the small box. After the model is generated, feature point extraction is performed to obtain a feature point set on the surface of the small box, which represents some important positions on the surface of the small box, such as edges, corners, and midlines. Principal component analysis is performed on the feature point set on the surface of the small box to identify the main axis direction of the small box, and a local coordinate system of the small box is established based on the main axis direction. The coordinate system helps define the specific position on the surface of the small box. The local coordinate system is rotated and transformed to align with the first coordinate system of the packaging machine to ensure the accuracy and consistency of the printing operation. After the alignment of the coordinate system is completed, the coordinates of the center points of the first printing surface and the second printing surface of the small box are calculated to determine the first printing reference point, which is the starting point of the printing operation. The first printing reference point is offset calculated to define the printing area of the two-dimensional code. According to the surface size of the small box and the standard size of the two-dimensional code, the size of the two-dimensional code is adjusted to ensure that it fits properly in the printing area, and the image of the two-dimensional code will not be affected by deformation or distortion and scanning recognition. The resolution of the adapted two-dimensional code image is adjusted to match the resolution requirement of the actual printing device, and a two-dimensional code image at the printing resolution is generated. According to the generated two-dimensional code image at the printing resolution, a first printing control parameter is formulated to instruct the printing device on how to accurately print the two-dimensional code on the surface of the small box. By controlling the parameters, the two-dimensional code printing operation is performed on the first printing surface and the second printing surface of the small box, respectively, to obtain a small box with a logo.
[0032] Among them, the third printing surface and the fourth printing surface of the strip box are laser scanned to generate high-precision point cloud data of the strip box surface, reflecting the shape and characteristics of the strip box surface. The point cloud data is plane fitted to obtain the first plane equation of the third printing surface and the second plane equation of the fourth printing surface. These two plane equations are used to describe the geometric characteristics of the printing surface. The intersection calculation of the first plane equation and the second plane equation is performed to obtain the edge equation of the strip box, which defines the boundary between the two printing surfaces on the strip box. The main axis direction of the strip box is determined according to the edge equation. The main axis direction is an important reference for alignment during the printing process. By confirming the main axis direction, the consistency and standardization of the two-dimensional code printing are ensured. According to the main axis direction of the strip box, the coordinate system of the strip box is constructed, and it is standardized and transformed with the coordinate system of the packaging machine to obtain a second coordinate system that matches the operation of the packaging machine. According to the second coordinate system, the geometric centers of the third printing surface and the fourth printing surface are calculated. These center points are defined as the second printing reference points, which are the starting reference positions when printing the two-dimensional code. The safety boundary calculation is performed on the printing reference points to set the effective printing area. This area ensures that the position of the two-dimensional code printed on the surface of the strip box will neither exceed the printable range nor affect the overall aesthetics and packaging integrity of the strip box. Based on the size and shape of the effective printing area, the two-dimensional code image to be printed is generated, the size and resolution of the two-dimensional code are adjusted to adapt to the actual printing conditions, and the corresponding second printing control parameters are formulated. These control parameters include details such as the printing position, size, and resolution to ensure that the two-dimensional code is clear and easy to scan after printing. According to the generated second printing control parameters, the two-dimensional code printing operation is performed on the third printing surface and the fourth printing surface of the strip box respectively to obtain a strip box with a logo.
[0033] Step 102: In the conveying channel of the packaging machine, the small boxes with the logo are scanned at high speed to obtain the two-dimensional code data of the small boxes, and the decoding verification and rejection operations are performed to obtain the small boxes that pass the quality inspection;
[0034] Specifically, the speed of the conveying channel of the packaging machine is detected to obtain the conveying speed data. The target scanning frequency is calculated according to the conveying speed data to ensure that the scanning frequency of the code reader matches the speed of the conveying channel and can accurately capture the two-dimensional code on each small box. The high-speed code reader is configured according to the target scanning frequency, and the working parameters of the code reader are adjusted to meet the high-speed scanning requirements. After the configuration is completed, the code reader is synchronized with the phase point of the original machine to ensure the accuracy of the reading timing and generate a trigger signal. According to the trigger signal, the small box with the mark is scanned at high speed to obtain the original scanned image. The original scanned image is edge detected and perspective transformed to eliminate deformation and noise in the image to obtain the corrected two-dimensional code image. The corrected two-dimensional code image is binarized to enhance the contrast of the image, and the module is extracted to generate a small box two-dimensional code matrix. By performing error correction decoding on the small box two-dimensional code matrix, possible scanning errors are corrected to obtain accurate decoded two-dimensional code data. The decoded two-dimensional code data is judged for validity to generate a two-dimensional code validity mark, and the small boxes are classified into valid small boxes and invalid small boxes according to the mark. For valid small boxes, decrypt their QR code data to obtain the product information of the small boxes, and compare this information with the preset product specifications to verify whether the small boxes meet the specification requirements and generate specification matching results. According to the specification matching results and the QR code validity mark, the system generates a rejection instruction to form a list of small boxes to be rejected. To ensure the smooth progress of the rejection process, the small boxes in the list are sorted to form a rejection execution sequence. According to the rejection execution sequence, the original machine rejection device is controlled to perform the rejection operation to ensure that each small box that does not meet the requirements is correctly rejected, and the rejection operation results are recorded to obtain small boxes that pass the quality inspection. These small boxes meet the quality standards and can continue the subsequent packaging and distribution process.
[0035] Step 103: In the stacking station of the packaging machine, the small boxes that have passed the quality inspection are batch-read to obtain a small box group QR code data set and perform association analysis to obtain an initial association result, and the small boxes that have passed the quality inspection are packaged with the strip boxes with the labels to obtain packaged strip boxes;
[0036] Specifically, the stacking station of the packaging machine is spatially positioned to determine the position of the small box during the stacking process and obtain the stacking coordinates of the small box. According to the coordinate information, the working position of the batch code reader is set to cover the batch code reading trigger area, and trigger sensors are installed in the area. These sensors are used to detect the position of the small box and start the batch code reader to obtain a batch scan image. The acquired batch scan image is segmented to separate the QR code area of each small box, and then the QR code area is decoded in parallel to obtain a QR code data set of the small box group. In order to ensure the uniqueness and correctness of the data, the QR code duplication check is performed on the QR code data set of the small box group. If a duplicate QR code is found, it is marked and a list of abnormal QR codes is generated, which helps to identify and exclude products with abnormal data. Each QR code in the QR code data set of the small box group is compared with the preset rules to evaluate its compliance with the rules. These rules may include factors such as the format of the QR code and the consistency of the content. For QR codes that do not meet the preset rules, they are marked and a list of QR codes that do not meet the rules is generated. Combine the abnormal QR code list and the non-compliant QR code list to generate the initial association result, and classify the small box groups according to the initial association result to obtain qualified small box groups and unqualified small box groups. Further process the qualified small box groups to generate strip box packaging instructions, which specify the packaging method and requirements of the small box groups. According to the generated strip box packaging instructions, call the packaging mechanism, arrange the qualified small box groups to perform strip box packaging operations, and generate a packaging operation sequence. Execute the packaging operation sequence, accurately package the qualified small box groups with the marked strip boxes, and obtain the packaged strip boxes.
[0037] Step 104, scan the QR code of the packaged strip box to obtain the strip box QR code data and perform matching verification and rejection operations to obtain the correctly associated strip box and box strip association results;
[0038] Specifically, the strip box lifting channel of the packaging machine is spatially positioned to determine the specific position of the strip box during the scanning process and obtain the strip box scanning position. According to the strip box scanning position, the strip box reader is installed and an appropriate strip box scanning trigger area is set to ensure that each strip box can be accurately scanned when passing through the area. Trigger sensors are set in the strip box scanning trigger area, which are responsible for detecting the entry of the strip box and generating a strip box scanning trigger signal. The strip box reader is started according to the trigger signal to capture the QR code image on the strip box. The obtained strip box QR code image is processed and effective strip box data is screened to remove invalid or incomplete image parts to ensure the accuracy of the data and obtain clear strip box QR code data. The strip box QR code data is decrypted to extract the product information contained in the strip box. The product information includes the identification data and other key information of the small box group for subsequent matching verification. According to the extracted strip box product information, the corresponding small box QR code data is extracted from the previously generated small box group QR code data set to form an expected associated small box data set. The expected associated small box data set is matched and calculated with the strip box QR code data to evaluate their matching degree. The matching calculation evaluates the accuracy and completeness of the association by comparing the small box QR code in the strip box with the expected small box group QR code. The matching result is determined by comparing the box-strip matching degree with a threshold. According to the matching result, the strip boxes are classified into correctly associated strip boxes and abnormally associated strip boxes. The association identification is generated for the correctly associated strip boxes, and the box-strip association results are recorded to ensure that these strip boxes can be accurately identified in subsequent tracking and management. For abnormally associated strip boxes, a rejection instruction is generated, and the original machine rejection device is controlled to perform the strip box rejection operation to ensure that unqualified or incorrectly associated products do not enter the next stage of logistics.
[0039] Step 105, deeply verify and encrypt the correctly associated strip boxes and the strip box association results, obtain the encrypted data packets and perform distributed storage to obtain the association database;
[0040] Specifically, integrity check and screening are performed on the correctly associated strip boxes to ensure that the data of each strip box is complete and undamaged, so as to form a valid strip box data set. The valid strip box data set is cross-validated with the strip box association result to evaluate the consistency and accuracy of the data, and the association consistency index is calculated according to the verification result. Threshold comparison is performed according to the association consistency index to judge the matching degree of the data, obtain the deep verification result, and classify according to these results to generate the corresponding association identification data. The generated association identification data, strip box QR code data and small box group QR code data set are packaged to form a comprehensive association data packet. In order to increase the traceability and management convenience of the data, metadata annotation is performed on the associated data packet according to the production information, such as production batch, timestamp, etc., to form an annotated associated data packet. In order to protect the security and privacy of the data, the annotated associated data packet is symmetrically encrypted to form primary encrypted data to ensure that the data is not easily illegally accessed during transmission and storage. The primary encrypted data is asymmetrically encrypted using a preset key to enhance the security of the data and obtain an encrypted data packet. The encrypted data packet is data fragmented to split it into multiple small pieces of data to improve the flexibility and security of data storage and transmission. According to the preset distributed storage strategy, storage locations are allocated for these data shards, and a detailed storage allocation plan is formulated. According to the plan, the data shards are transmitted to multiple distributed storage nodes, and these nodes are dynamically adjusted to optimize the storage structure and ensure efficient data access and load balancing. In order to facilitate rapid retrieval and management of data, the data in the optimized storage structure is indexed and a distributed index table is generated. These index tables allow the system to efficiently find and manage data scattered on different storage nodes. Based on the distributed index table, a complete associative database is built. The database not only stores all associated data, but also provides efficient data query and management functions to ensure that the system can process and verify the associated information of all strip boxes and small boxes in a timely and accurate manner.
[0041] Step 106: Perform real-time analysis and status warning on the associated database to obtain production status report and status warning information and visualize them through the human-computer interaction interface.
[0042] Specifically, real-time data collection is performed on the data in the associated database to generate the original data stream, including various parameters and QR code information in the production process. The original data stream is cleaned and preprocessed to remove outliers, fill in missing data and standardize the data to obtain a standardized data set. Time series analysis is performed on the standardized data set to capture the dynamic changes in the production process and generate a production trend curve, which depicts the changing trend of key indicators in production. According to the production trend curve, real-time production status data is calculated, which reflects the instant information of the current production status. Multi-dimensional cluster analysis is performed on the real-time production status data. By analyzing the performance of the data in different dimensions, the production status clustering results are obtained, which helps to identify normal production modes and potential abnormal modes. By comparing the cluster center and data distribution, possible abnormal modes are identified and related abnormal data sets are extracted. Root cause analysis is performed on the abnormal data set to identify the causes of potential problems, generate a potential problem list, and list various problems that may affect the production process. Risk assessment is performed on the potential problem list, and dynamic warning thresholds are set. These thresholds are determined based on the comparison of real-time data and historical data, and are used to judge the risk level of the production status. Compare the real-time production status data with the dynamic warning threshold to generate status warning information. This information includes potential risks and abnormal trends in the production process, which can alert operators in advance. Summarize the real-time production status data and status warning information, compile a production status report, and summarize the various indicators and current status of the production process. Perform visual template matching on the production status report to generate a visual configuration plan. According to the configuration plan, the production data is converted into interactive charts, which include curve charts, bar charts, pie charts and other forms, which can intuitively display data changes and warning information. The interactive charts are visualized through the human-computer interaction interface constructed by the industrial computer and the cantilever touch screen. Operators can view detailed information, filter data, adjust the display and other operations through the touch screen to achieve comprehensive monitoring and management of the production status.
[0043] In the embodiment of the present invention, by implementing high-speed scanning and batch code reading at different stations of the packaging machine, the rapid identification and association of the two-dimensional codes of the small box and the strip box are realized, and the operation efficiency of the production line is greatly improved. The multiple encryption and distributed storage technology are adopted to ensure the security and reliability of the two-dimensional code data, and effectively prevent the data from being tampered with or lost. By establishing the precise association between the small box and the strip box, the comprehensive traceability from a single small box to the entire strip box is realized, which greatly improves the accuracy and efficiency of product quality management. Real-time detection and elimination of unqualified products effectively reduce the error rate in the production process and improve the consistency of product quality. Through real-time data analysis and visual display, intuitive and timely production status information is provided for production management personnel, which is adapted to different product specifications and production speeds, can be flexibly applied to various packaging production lines, and improves the adaptability and scalability of the production system. Through the automated two-dimensional code association and verification process, human operation errors are greatly reduced, and the accuracy and reliability of the production process are improved. It provides a reliable data basis for the whole life cycle management of the product, which is conducive to the realization of full quality traceability from production to sales. The unique identification given on the outer packaging of the small box and the strip box follows the principle of one package and one code, and adopts the QR code system. During the strip box packaging process, the QR codes of the small boxes and strip boxes are read, and the QR code association relationship between the strip box and the small boxes to which it belongs is established. The small boxes and strip boxes that fail to correctly read the box and bar QR codes and have incorrectly established "box-strip" association relationships are discarded. To solve the problem that the original model cannot realize the product traceability function, the QR codes are printed on the small boxes and strip boxes, and the QR codes of the small boxes and strip boxes are read to realize data association, so as to meet the product chain traceability from production to sales.
[0044] In a specific embodiment, the process of executing step 101 may specifically include the following steps:
[0045] (1) Perform a hash operation on the product information to obtain a hash value of a fixed length, and generate the initial QR code data based on the hash value;
[0046] (2) XOR-encrypting the initial two-dimensional code data to obtain encrypted two-dimensional code data, and selecting a mode based on the encrypted two-dimensional code data to obtain the optimal encoding mode;
[0047] (3) Encoding the encrypted two-dimensional code data according to the optimal encoding mode to obtain encoded two-dimensional code data, and performing matrix conversion on the encoded two-dimensional code data to generate multiple candidate two-dimensional codes;
[0048] (4) Scoring multiple candidate QR codes to obtain the optimal QR code, and generating a graphical QR code based on the optimal QR code to obtain a unique identification QR code;
[0049] (5) Coordinate positioning is performed on the first printing surface and the second printing surface of the small box to obtain the printing position of the small box, and a two-dimensional code is printed on the small box according to the printing position of the small box to obtain a small box with a logo;
[0050] (6) Coordinate positioning is performed on the third printing surface and the fourth printing surface of the strip box to obtain the printing position of the strip box, and a two-dimensional code is printed on the strip box according to the printing position of the strip box to obtain a strip box with a logo.
[0051] Specifically, a hash operation is performed on the product information to ensure the uniqueness and confidentiality of the information. Assuming that the product information includes the product serial number, production date, production batch, etc., the hash function can be expressed as:
[0052] ;
[0053] Among them, H(P) is the hash value obtained by hashing the product information P. The length of the hash value is fixed to ensure that different product information is mapped to different hash values. The obtained hash value is used to generate the initial QR code data. The initial QR code data is usually a direct conversion of the hash value, but in order to increase the security of the data, the initial QR code data is XOR-encrypted. Assuming there is a randomly generated key κ, the encrypted QR code data D can be expressed as:
[0054]
[0055] Where D is the encrypted data, H(P) is the initial QR code data, and K is the encryption key. Represents XOR operation. XOR encryption is used to protect the content of the QR code data and prevent unauthorized access. Mode selection is performed based on the encrypted QR code data to select the optimal QR code encoding mode. The length and complexity of the data are analyzed to select the appropriate QR code version and error correction level. For example, the QR code version ranges from 1 to 40, each version can accommodate a different number of data modules, and the error correction level determines the redundancy and fault tolerance of the QR code. The purpose of selecting the optimal encoding mode is to maximize the security and storage capacity of the data while ensuring the readability of the data. Encode the encrypted QR code data according to the optimal encoding mode to obtain the encoded QR code data. These encoded data are matrix-converted to generate multiple candidate QR codes. Each candidate QR code represents a different graphical representation of the same data, which may include different error correction levels, module sizes, black and white dot distributions, etc. In order to select the best QR code image, multiple candidate QR codes are scored and calculated. These scoring criteria include the readability, fault tolerance, and space occupied by the QR code. The QR code with the highest score is selected as the optimal QR code, and the final graphical QR code is generated based on the optimal QR code to obtain a unique identification QR code. Print the unique identification QR code on the product packaging. Perform coordinate positioning on the first and second printed surfaces of the small box to ensure the accuracy and consistency of the QR code printing. Use positioning technology to obtain the reference coordinates on the printed surface and determine the specific printing position of the QR code. These coordinate information ensures the correct position of the QR code on the surface of the small box to avoid unreadable QR codes due to printing deviations. According to these small box printing positions, the QR code printing operation is performed to obtain a small box with an identification. Similarly, for the printing of the strip box, the third and fourth printed surfaces of the strip box are coordinate positioned to ensure that the QR code on the strip box can also be accurately positioned. The printing position of the strip box may be different from that of the small box, so a separate coordinate positioning step is required. Print the QR code based on the positioning results to ensure that each strip box has a uniquely identified QR code.
[0056] In a specific embodiment, the steps of performing coordinate positioning on the first printing surface and the second printing surface of the small box to obtain the printing position of the small box, and printing a two-dimensional code on the small box according to the printing position of the small box to obtain the small box with a logo may specifically include the following steps:
[0057] (1) Performing three-dimensional modeling on the first printed surface and the second printed surface of the small box to obtain a surface model of the small box, and extracting feature points from the surface model of the small box to obtain a set of surface feature points of the small box;
[0058] (2) Perform principal component analysis on the surface feature point set of the small box to obtain the principal axis direction, and establish the local coordinate system of the small box according to the principal axis direction;
[0059] (3) Rotate and transform the local coordinate system of the small box to obtain a first coordinate system corresponding to the packaging machine, and calculate the coordinates of the center points of the first printing surface and the second printing surface according to the first coordinate system to obtain a first printing reference point;
[0060] (4) performing an offset calculation on the first printing reference point to obtain a two-dimensional code printing area, and adjusting the size of the two-dimensional code according to the size of the two-dimensional code printing area to obtain an adapted two-dimensional code image;
[0061] (5) adjusting the resolution of the adapted two-dimensional code image to obtain a two-dimensional code image at a printing resolution, and generating a first printing control parameter according to the two-dimensional code image at the printing resolution;
[0062] (6) Printing two-dimensional codes on the first printing surface and the second printing surface respectively according to the first printing control parameter to obtain a small box with a logo.
[0063] like Figure 2 As shown, Figure 2 It is a schematic diagram of the QR code printed surface of the small box, the first printed surface is the B1 surface in the figure, and the second printed surface is the B2 surface in the figure.
[0064] Specifically, the small box is 3D scanned or a 3D model is generated using a computer-aided design (CAD) tool to capture the shape and surface features of the small box, obtain a 3D surface model of the small box, and obtain the precise geometric information of the small box, including size, shape, and curvature. Feature points are extracted from the surface model of the small box, including key positions such as the edges, corners, and surface midlines of the small box. Feature point extraction can be accomplished using automated algorithms such as edge detection or corner detection. Principal component analysis is performed on the extracted feature point set to determine the main direction of the data. Principal component analysis can find the main axis direction of the small box, which is the direction with the largest or most significant changes on the surface of the small box. The main axis direction is found by calculating the covariance matrix and solving the eigenvectors and eigenvalues. Suppose the feature point set is , the principal axis direction 'u' can be obtained by the following formula:
[0065]
[0066] in, is the covariance matrix of the feature point set x, is the eigenvector of the main axis direction. The main axis direction u provides the main direction of the small box. A local coordinate system of the small box is established according to the main axis direction. The origin of the local coordinate system is usually selected at a certain reference point of the small box, such as the bottom center point. The local coordinate system of the small box is rotated and transformed to align the local coordinate system to the first coordinate system of the packaging machine to ensure the correct positioning and alignment of the small box in the packaging machine. The coordinates of the local coordinate system are converted to the coordinates of the packaging machine through the rotation matrix. The coordinates of the center points of the first printing surface and the second printing surface of the small box are calculated according to the first coordinate system to obtain the first printing reference point. The first printing reference point is offset calculated to determine the specific printing area of the QR code. The selection of the offset depends on the actual size of the small box and the size of the QR code to ensure that the QR code can be printed completely and clearly on the surface of the small box. According to the size of the determined QR code printing area, the size of the QR code is adjusted to fit the printing area. This step usually involves a scaling operation to ensure that the QR code neither exceeds the printing area nor is too small to be scanned correctly. The resolution of the adapted QR code image is adjusted to meet the resolution requirements of the actual printing device. The printing resolution is usually higher than the display resolution, and the resolution is adjusted to ensure that the two-dimensional code is still clearly identifiable after printing. The first printing control parameter is generated according to the adjusted two-dimensional code image. The printing control parameter includes information such as the position, size, and resolution of the two-dimensional code, and these parameters will be transmitted to the printing device to control the printing process. According to the printing control parameters, the two-dimensional code is printed on the first printing surface and the second printing surface of the small box, respectively, to ensure that each small box has a unique logo.
[0067] In a specific embodiment, the execution step coordinates the third printing surface and the fourth printing surface of the strip box to obtain the strip box printing position, and prints the two-dimensional code on the strip box according to the strip box printing position to obtain the strip box with the mark. The process can specifically include the following steps:
[0068] (1) performing laser scanning on the third printing surface and the fourth printing surface of the strip box to obtain surface point cloud data of the strip box, and performing plane fitting on the surface point cloud data of the strip box to obtain a first plane equation of the third printing surface and a second plane equation of the fourth printing surface;
[0069] (2) Calculate the intersection of the first plane equation and the second plane equation to obtain the edge equation of the strip box, and determine the main axis direction of the strip box based on the edge equation;
[0070] (3) constructing a strip box coordinate system according to the main axis direction and performing a standardized transformation to obtain a second coordinate system corresponding to the packaging machine, and calculating the geometric centers of the third printing surface and the fourth printing surface according to the second coordinate system to obtain a second printing reference point;
[0071] (4) Calculating the safety boundary of the second printing reference point to obtain an effective printing area, and generating a two-dimensional code image to be printed and corresponding second printing control parameters according to the effective printing area;
[0072] (5) Printing the two-dimensional code on the third printing surface and the fourth printing surface respectively according to the second printing control parameter to obtain a strip box with a logo.
[0073] like Figure 3 As shown, Figure 3 It is a schematic diagram of the printed surface of the two-dimensional code of the strip box, the third printed surface is the C1 surface in the figure, and the fourth printed surface is the C2 surface in the figure.
[0074] Specifically, the third and fourth printed surfaces of the strip box are laser scanned to obtain their surface point cloud data. The use of laser scanning technology can accurately capture the geometric shape and features of the strip box surface. These data are recorded as point cloud data sets, representing the three-dimensional coordinates of each tiny point on the strip box surface. The plane fitting is performed on the strip box surface point cloud data, and the plane information is extracted from a large amount of point cloud data. The plane equations of the third and fourth printed surfaces are fitted respectively. Suppose the point cloud data is The fitted plane equation can be expressed as:
[0075]
[0076] in, are the parameters of the plane equation, is the coordinate of the point cloud data. By using the least squares method, find the best The values are used to fit the first plane equation of the third printing surface and the second plane equation of the fourth printing surface. The plane equations define the position and direction of the two printing surfaces of the strip box. The intersection calculation is performed on the two plane equations to obtain the edge equation of the strip box. The edge is the result of the intersection of two planes and marks the main axis direction of the strip box. By determining the main axis direction, the positioning and alignment of the strip box are standardized. Let the first plane equation and the second plane equation be:
[0077] ;
[0078] Its edge equation is:
[0079]
[0080] in, is the main axis direction vector, obtained by cross product of the plane normal vector. The main axis direction defines the long axis direction of the strip box, which is crucial for the positioning and printing direction of the strip box. According to the main axis direction, a local coordinate system of the strip box is constructed to describe the spatial position and direction of the strip box, and a standardized transformation is performed. Through rotation and translation operations, a second coordinate system is obtained, which is consistent with the coordinate system of the packaging machine, which is convenient for the operation of the printing equipment. In the second coordinate system, the geometric center of the third printing surface and the fourth printing surface is calculated to obtain the second printing reference point. These reference points are the key to determining the printing area of the two-dimensional code and define the starting position of the two-dimensional code on the strip box. The safety boundary calculation is performed on the printing reference point to determine the effective printing area. The calculation takes into account the edge and curvature of the strip box to ensure that the two-dimensional code does not exceed the printing area or is affected by the edge. According to the calculated effective printing area, the two-dimensional code image to be printed is generated, and the size of the two-dimensional code is adjusted according to the size of the printing area to ensure that the two-dimensional code image is clearly visible and not distorted on the surface of the strip box. The resolution of the two-dimensional code image is adjusted to match the resolution requirements of the actual printing equipment. According to the generated second printing control parameters, the two-dimensional code is printed on the third printing surface and the fourth printing surface respectively. These control parameters include information such as the position, size, rotation angle, etc. of the two-dimensional code, and a strip box with a logo is obtained.
[0081] In a specific embodiment, the process of executing step 102 may specifically include the following steps:
[0082] (1) Detect the speed of the conveying channel of the packaging machine to obtain the conveying speed data, and calculate the target scanning frequency based on the conveying speed data;
[0083] (2) configuring the high-speed barcode reader according to the target scanning frequency to obtain a configured barcode reader, and synchronizing the configured barcode reader with the phase point of the original machine to obtain a trigger signal;
[0084] (3) Scanning the small box with the logo at high speed according to the trigger signal to obtain the original scanned image, and performing edge detection and perspective transformation on the original scanned image to obtain the corrected QR code image;
[0085] (4) Binarizing and extracting the corrected two-dimensional code image to obtain a small box two-dimensional code matrix, and performing error correction decoding on the small box two-dimensional code matrix to obtain decoded two-dimensional code data;
[0086] (5) Determine the decoded two-dimensional code data to obtain the two-dimensional code validity mark, and classify the small boxes according to the two-dimensional code validity mark to obtain valid small boxes and invalid small boxes;
[0087] (6) Decrypt the QR code data of the valid small box to obtain the small box product information, and compare the small box product information with the preset product specifications to obtain the specification matching result;
[0088] (7) Generate a rejection instruction based on the specification matching result and the QR code validity mark, obtain a list of small boxes to be rejected, and sort the list of small boxes to be rejected to obtain a rejection execution sequence;
[0089] (8) Control the original machine’s rejection device according to the rejection execution sequence, obtain the rejection operation results, and record the rejection operation results, and finally obtain the small box that passes the quality inspection.
[0090] Specifically, first install a speed sensor on the conveying channel, which can monitor the speed of the conveyor belt in real time. Through the speed sensor, obtain the conveying speed data V, V represents the linear speed of the conveyor belt, usually in meters per second (m / s). Calculate the target scanning frequency f based on the conveying speed data to ensure that the high-speed code reader can accurately capture each small box with a mark passing by. Configure the high-speed code reader according to the calculated target scanning frequency. The configuration of the code reader includes adjusting its scanning speed and exposure time and other parameters to match the speed of the conveyor belt and the size of the small box, ensuring that the code reader can accurately capture the QR code on the small box at high speed. After the configuration is completed, synchronize the code reader with the original machine phase point of the packaging machine to obtain the trigger signal. The function of the trigger signal is to start scanning when the small box enters the scanning area of the code reader to ensure the accuracy of image capture. According to the trigger signal, the small box with the mark is scanned at high speed to obtain the original scanned image. These images may be distorted due to factors such as the tilt and curved surface of the small box, and the original scanned image needs to be processed. Perform edge detection to identify the boundary of the QR code area. Apply perspective transformation to correct the distorted QR code image to the front view The corrected QR code image is obtained. The basic formula of perspective transformation is:
[0091]
[0092] are the coordinates of the original image, are the corrected image coordinates, is the parameter of perspective transformation. Binarize the corrected QR code image to improve the contrast of the image and clearly separate the information in the QR code image. Then perform module extraction to identify the specific data module of the QR code and form a small box QR code matrix. Perform error correction decoding on the small box QR code matrix to parse the data in the QR code. Use the error correction capability of the QR code to repair possible errors in the scanning process to ensure the accuracy of decoding. After the decoded QR code data is judged, the validity mark of the QR code is obtained. The validity mark is used to determine whether the QR code data is complete and valid. According to this mark, the small box is classified into valid small box and invalid small box. For the valid small box, the QR code data is decrypted to extract the product information of the small box. The preset key is used in the decryption process to protect the security of the data and prevent counterfeiting. After obtaining the product information, it is compared with the preset product specifications to check whether the small box meets the specification requirements and obtain the specification matching result. According to the specification matching result and the QR code validity mark, a rejection instruction is generated to form a list of small boxes to be rejected. The list lists all small boxes that do not meet the specifications or have invalid QR codes. These small boxes need to be rejected to ensure product quality. Sort the list of small boxes to be rejected to form a rejection execution sequence to ensure that the rejection operation is carried out in an orderly manner to avoid confusion or omissions. According to the rejection execution sequence, control the original machine rejection device to perform the rejection operation. The rejection device removes unqualified small boxes from the conveyor belt according to the rejection instruction to ensure that only small boxes that meet quality standards enter the next link. Record the results of the rejection operation, which include the number of small boxes rejected, the reasons, and other information, and obtain the small boxes that pass the quality inspection.
[0093] In a specific embodiment, the process of executing step 103 may specifically include the following steps:
[0094] (1) Spatially locate the stacking station of the packaging machine to obtain the small box stacking coordinates, set the batch code reader according to the small box stacking coordinates, obtain the batch code reading trigger area, install the trigger sensor in the batch code reading trigger area and start the batch code reader to obtain the batch scan image;
[0095] (2) Perform image segmentation and parallel decoding on the batch scanned images to obtain a small box group QR code data set, and perform QR code duplication check and duplicate QR code marking on the small box group QR code data set to obtain an abnormal QR code list;
[0096] (3) Compare each QR code in the small box group QR code data set with the preset rules to obtain the rule compliance, and mark the QR codes that do not comply with the rules according to the rule compliance to obtain a list of QR codes that do not comply with the rules;
[0097] (4) Generate an initial association result based on the abnormal QR code list and the QR code list that does not meet the rules, and classify the small box groups according to the initial association result to obtain qualified small box groups and unqualified small box groups;
[0098] (5) Generate packaging instructions for the qualified small box group to obtain strip box packaging instructions, call the packaging mechanism according to the strip box packaging instructions to obtain a packaging operation sequence, and execute the packaging operation sequence to obtain a packaged strip box.
[0099] Specifically, by using a laser rangefinder, a visual sensor or other precision measuring equipment, the position of the small box on the stacking station is determined, and the stacking coordinates of the small box, that is, the position and direction of the small box in three-dimensional space, are obtained. These stacking coordinates include the X, Y, and Z axis positions of the small box, as well as the rotation angle relative to the packaging machine. According to the obtained stacking coordinates of the small box, the position and angle of the batch code reader are set so that it can cover the entire stacking area. The viewing angle, focal length and scanning frequency of the code reader are adjusted to ensure that a clear two-dimensional code image can be captured in the stacking area of the small box. Trigger sensors are installed in the batch code reading trigger area. The function of these sensors is to detect the entry of the small box and start the batch code reader at the appropriate time. The trigger sensor can be a photoelectric sensor, an infrared sensor, etc., which triggers the scanning operation of the code reader by detecting the occlusion or reflection of the object. When the small box enters the code reading trigger area, the trigger sensor starts the batch code reader, and the code reader starts to batch scan the stacked small boxes to obtain batch scan images. These images include the two-dimensional code areas of multiple small boxes stacked together. Image segmentation is performed on the batch scanned image to separate the two-dimensional code image part of each small box. Image segmentation can use image processing algorithms such as edge detection and region growing to extract each QR code from the background. The segmented QR code images are decoded in parallel to obtain a small box group QR code data set, which contains the QR code information of all small boxes, including product codes, production dates, etc. The small box group QR code data set is checked for QR code repeatability and repeated QR code marking to ensure the uniqueness of each QR code and prevent duplicate QR codes. The repeatability check compares each QR code data in the data set to identify the same QR code, mark the duplicate QR code, and form an abnormal QR code list. Each QR code in the small box group QR code data set is compared with the preset rules. The preset rules include the format of the QR code, data integrity, content legitimacy, etc. Through rule comparison, the rule compliance of each QR code is evaluated. For QR codes that do not meet the preset rules, they are marked to generate a list of QR codes that do not meet the rules. Based on the abnormal QR code list and the list of QR codes that do not meet the rules, an initial association result is generated, which contains the status information of all QR codes in the small box group, including normal, abnormal, and repeated states. According to the initial association results, the small box groups are classified into qualified small box groups and unqualified small box groups. The qualified small box group contains all QR code small boxes that meet the specifications and have no abnormalities, while the unqualified small box group includes all small boxes that are abnormal or do not meet the rules. For the qualified small box group, packaging instructions are generated. These instructions include specific operating steps on how to pack the qualified small boxes into strip boxes. The strip box packaging instructions contain information such as the arrangement order and quantity of the small boxes. According to these instructions, the packaging mechanism is called to generate a packaging operation sequence. The packaging operation sequence describes in detail how the packaging machine operates to complete the packaging of the strip boxes, including steps such as the placement of the small boxes and the sealing of the strip boxes.The packaging operation sequence is executed to complete the packing of the carton and obtain the packed carton. All the small boxes contained in these carton boxes have undergone strict quality inspection and data verification to ensure the consistency and traceability of the product.
[0100] In a specific embodiment, the process of executing step 104 may specifically include the following steps:
[0101] (1) The strip box lifting channel of the packaging machine is spatially positioned to obtain the strip box scanning position, and the strip box barcode reader is installed according to the strip box scanning position to obtain the strip box scanning trigger area;
[0102] (2) Setting a trigger sensor for the strip box scanning trigger area to obtain a strip box scanning trigger signal, and starting the strip box code reader according to the strip box scanning trigger signal to obtain a strip box two-dimensional code image;
[0103] (3) Screen the effective box data of the box QR code image to obtain the box QR code data, and decrypt the box QR code data to obtain the box product information;
[0104] (4) Extracting the corresponding number of small box QR code data from the small box group QR code data set according to the strip box product information to obtain the expected associated small box data set, and performing matching calculation on the expected associated small box data set and the strip box QR code data to obtain the box strip matching degree;
[0105] (5) Compare the matching degrees of the boxes and strips by threshold, obtain the matching results, and classify the strips and boxes according to the matching results to obtain the correctly associated strips and strips and the abnormally associated strips and boxes;
[0106] (6) Generate an association mark for the correctly associated strip boxes, obtain the box-strip association result, generate a rejection instruction for the abnormally associated strip boxes, and control the original machine's rejection device to perform the strip box rejection operation.
[0107] Specifically, precision measuring equipment, such as laser rangefinders or visual sensors, is used to determine the precise position of the strip box in the lifting channel. These devices can measure the coordinates of the strip box in three-dimensional space, that is, the strip box scanning position. According to the determined strip box scanning position, the strip box code reader is installed so that it can cover the two-dimensional code area of the strip box. This involves adjusting the position, angle and focal length of the code reader to ensure that a clear two-dimensional code image can be obtained when the strip box passes. Trigger sensors are set in the strip box scanning trigger area. The function of these sensors is to detect the position of the strip box and start the code reader at the right time. The trigger sensor can be a photoelectric sensor or an infrared sensor, which generates a trigger signal by detecting the occlusion or reflection of the strip box. When the strip box enters the scanning trigger area, the trigger sensor generates a trigger signal, starts the strip box code reader, and captures the two-dimensional code image on the strip box. The strip box two-dimensional code image is processed to filter out valid strip box data. Including image preprocessing, such as denoising, contrast enhancement, and extraction of the two-dimensional code area. The filtered strip box two-dimensional code data is decrypted to extract the product information of the strip box. The decryption process uses a preset key to ensure the security and integrity of the data. The strip box product information usually includes the serial number, production date, batch number, etc. of the small boxes contained in the strip box. According to the decrypted strip box product information, the corresponding number of small box QR code data is extracted from the small box group QR code data set to form the expected associated small box data set. The expected associated small box data set is matched with the strip box QR code data to obtain the box strip matching degree. The matching degree can be calculated by comparing each small box QR code in the strip box with the QR code in the expected small box data set to calculate the matching ratio or similarity. The matching degree calculation formula can be expressed as:
[0108]
[0109] Among them, E represents the matching degree, It is the QR code data of the small box in the strip box. is the QR code data in the expected associated small box dataset, is the matching function, when and When matching, otherwise is the total number of small boxes. The matching degree is compared with the threshold to obtain the matching result. If the matching degree is higher than the preset threshold, it is considered that the small box QR code in the strip box matches the expected data set well, and these strip boxes are classified as correctly associated strip boxes. Otherwise, they are classified as abnormally associated strip boxes. An associated identifier is generated for the correctly associated strip boxes, and the box strip association results are recorded. These identifiers are used for subsequent tracking and management to ensure that the small box information in each strip box can be accurately associated. For abnormally associated strip boxes, a rejection instruction is generated to control the original machine rejection device to perform the strip box rejection operation. The rejection device removes the abnormal strip boxes from the production line according to the instruction to ensure that the strip boxes entering the next link meet the requirements.
[0110] In a specific embodiment, the process of executing step 105 may specifically include the following steps:
[0111] (1) Perform integrity check and screening on the correctly associated strips and boxes to obtain a valid strip and box data set, and cross-validate the valid strip and box data set with the strip and box association results to obtain the association consistency index;
[0112] (2) Perform threshold comparison based on the association consistency index to obtain the deep verification results, and classify the deep verification results to generate association identification data;
[0113] (3) Packing the associated identification data, the strip box QR code data, and the small box group QR code data set to obtain an associated data package, and annotating the associated data package with metadata according to the production information to obtain an annotated associated data package;
[0114] (4) Symmetrically encrypting the associated data packet with the annotation to obtain primary encrypted data, and asymmetrically encrypting the primary encrypted data according to a preset key to obtain an encrypted data packet;
[0115] (5) Slicing the encrypted data packet to obtain a plurality of data slices, and allocating storage locations for the plurality of data slices according to a preset distributed storage strategy to obtain a storage allocation plan;
[0116] (6) Transmit data shards to distributed storage nodes according to the storage allocation plan, and dynamically adjust the storage nodes to obtain an optimized storage structure;
[0117] (7) Index the data in the optimized storage structure to obtain a distributed index table, and then build a corresponding associated database based on the distributed index table.
[0118] Specifically, integrity verification and screening are performed on the correctly associated strip boxes to check whether the number of small boxes in each strip box meets expectations, whether the QR code data is readable, and whether all small boxes have unique and correct identification. Through the inspection, a valid strip box data set is formed, which contains all verified small boxes and strip box information. The valid strip box data set is cross-validated with the box strip association result to confirm that the QR code data of all small boxes in the strip box is consistent with the records in the association result. The association result is usually generated during the production process, including the correspondence between the small box and the strip box. By comparing the QR code data and the associated records, the association consistency index is calculated. The association consistency index is a numerical value that indicates the degree of matching between the strip box and the small box during the verification process. Its calculation formula can be expressed as:
[0119]
[0120] Among them, M represents the association consistency index, It is the QR code data of the small box in the strip box. is the small box data in the association result, is the matching function, when and When matching, ,otherwise is the total number of small boxes in the strip box. According to the association consistency index, a threshold comparison is performed to determine the verification result of the strip box data. A threshold is set. If the association consistency index is lower than the threshold, it is considered that there is a problem with the strip box data and the deep verification result is unqualified; otherwise, it is qualified. After the deep verification result is classified, the association identification data is generated. These data are used to record the verification status of the strip box and provide a reference for subsequent production and management. The generated association identification data, strip box QR code data, and small box group QR code data set are packaged to form an associated data package, which contains all relevant verification information and product data to ensure that the product can be accurately tracked and verified in subsequent storage and use. In order to increase the traceability and management convenience of the data, the associated data package is annotated with metadata according to the production information, such as production batch, timestamp, etc., to form an annotated associated data package. The annotated associated data package is symmetrically encrypted to form primary encrypted data to ensure that the data is not easily illegally accessed during transmission and storage. The primary encrypted data is asymmetrically encrypted using a preset key to enhance the security of the data and obtain an encrypted data package. Asymmetric encryption usually uses a public key and a private key pair. Data encrypted by a public key can only be decrypted by the corresponding private key, which increases the security of the data. The encrypted data packet is sharded and split into multiple small pieces of data to improve the flexibility and security of data storage and transmission. According to the preset distributed storage strategy, storage locations are allocated to the data shards, and a detailed storage allocation plan is formulated. According to the plan, the data shards are transmitted to multiple distributed storage nodes. These storage nodes may be located in different geographical locations to ensure high availability and disaster recovery capabilities of the data. During the storage process, the storage nodes are dynamically adjusted to optimize the storage structure. This may include adjusting the distribution of data shards, adding or reducing storage nodes, etc., to ensure efficient operation of the system and fast access to data. The optimized storage structure not only improves the access speed of data, but also enhances the reliability of the system. The data in the optimized storage structure is indexed and a distributed index table is generated. The distributed index table contains the location information and related metadata of all data shards, enabling the system to efficiently find and manage data scattered on different storage nodes. Based on the distributed index table, a complete relational database is built.
[0121] In a specific embodiment, the process of executing step 106 may specifically include the following steps:
[0122] (1) Collect data from the associated database in real time to obtain the original data stream, and then clean and preprocess the original data stream to obtain a standardized data set;
[0123] (2) Perform time series analysis on the standardized data set to obtain the production trend curve, and calculate the real-time production status data based on the production trend curve;
[0124] (3) Perform multi-dimensional cluster analysis on real-time production status data to obtain production status clustering results, and identify abnormal patterns based on the production status clustering results;
[0125] (4) Extract abnormal data sets based on abnormal patterns, and perform root cause analysis on the abnormal data sets to obtain a list of potential problems;
[0126] (5) Conduct risk assessment on the potential problem list to obtain dynamic warning thresholds, and compare the real-time production status data with the dynamic warning thresholds to obtain status warning information;
[0127] (6) Summarize the real-time production status data and status warning information to obtain a production status report;
[0128] (7) Perform visual template matching on the production status report to obtain a visual configuration plan; generate an interactive chart based on the visual configuration plan;
[0129] (8) The interactive charts are visualized through the human-computer interaction interface constructed by the industrial computer and the cantilever touch screen.
[0130] like Figure 4 As shown, Figure 4 The schematic diagram of the cantilever touch screen is shown in FIG. The cantilever bracket 1 is connected to the top of the column and is a support arm extending horizontally. It is composed of multiple joints and can flexibly adjust the position and angle. The touch screen 2 is a display device installed at the end of the cantilever bracket 1 for human-computer interaction.
[0131] Specifically, a real-time data acquisition module is set up in the system, which can continuously extract the latest data from the associated database to form a raw data stream. These data include various parameters in the production process, such as temperature, pressure, speed, production quantity, etc. Through high-frequency data acquisition, it is ensured that subtle changes in the production process are captured. The raw data stream is cleaned and preprocessed to remove noise and outliers in the data, fill in missing data, and convert the data into a consistent format. Data cleaning can be achieved through various methods, such as statistical analysis, machine learning algorithms, etc. The preprocessed data forms a standardized data set. Time series analysis is performed on the standardized data set. By analyzing the time series data, the production trend curve is obtained to identify periodicity, trends and other time-related patterns in the data. By analyzing historical data, a production trend model is established to predict future production status. The production trend curve can be expressed as:
[0132]
[0133] in, Indicates time Production status data at all times, is a constant term, is the coefficient of the time trend term, is a periodic term, is the error term. By fitting historical data, the values of these parameters are estimated to obtain the production trend curve. According to the production trend curve, the real-time production status data is calculated. These data reflect the current production status, including production efficiency, equipment operation status, quality indicators, etc. The real-time production status data can identify abnormalities in the current production status by comparing with the trend curve. Multi-dimensional cluster analysis is performed on the real-time production status data to divide the production status data into different cluster groups to identify different states and patterns in the production process. Cluster analysis can use algorithms such as k-means and DBSCAN to obtain production status clustering results. The clustering results can help identify normal production states and abnormal production states. According to the clustering results, abnormal patterns are identified, which indicate possible problems in the production process. According to the abnormal patterns, abnormal data sets are extracted, and the abnormal data sets contain all data points that may cause production problems. These data points need to be further analyzed to find out potential problems. Root cause analysis is performed on the abnormal data sets, and statistical methods, regression analysis or machine learning algorithms are used to identify the root causes of the abnormalities and form a list of potential problems. Risk assessment is performed on the list of potential problems to evaluate the impact of these problems on the production process and obtain dynamic warning thresholds. The dynamic warning threshold is set according to the risk assessment results and is used to determine the risk level of the production status. By comparing the real-time production status data with the dynamic warning threshold, the status warning information is obtained. These warning information include possible risks, abnormal trends and production links that need attention. The real-time production status data and status warning information are summarized to form a production status report. The production status report comprehensively summarizes the various indicators, abnormal conditions and warning information in the production process to provide decision support for managers. Visual template matching is performed on the production status report to generate a visualization configuration scheme. The visualization configuration scheme includes the type, layout, color, etc. of the chart. According to the visualization configuration scheme, an interactive chart is generated. The interactive chart includes a production trend chart, a real-time status chart, an abnormal analysis chart, etc. These charts can intuitively display production data and warning information. Through the human-computer interaction interface constructed by the industrial computer and the cantilever touch screen, the operator can view detailed information, filter data, adjust the display, and other operations through the touch screen 2 to achieve comprehensive monitoring and management of the production status.
[0134] The above describes the online association management method of the two-dimensional code in the embodiment of the present invention. The following describes the association system of the packaging machine in the embodiment of the present invention. An embodiment of the association system of the packaging machine in the embodiment of the present invention includes:
[0135] Packaging machine, code reader bracket, code reader, cabinet, cable and communication line. The code reader bracket is installed on the packaging machine to support the code reader. The code reader includes code readers arranged at the No. 1 station, the No. 2 station and the No. 3 station, which are respectively used to read the QR codes of the small box and the strip box. The cabinet is provided with a display, an industrial computer and electrical components, wherein the industrial computer is used to control the operation of the system and establish the QR code association relationship between the strip box and the small box to which it belongs. The cable and communication line are used to connect various components to realize data transmission and communication.
[0136] Among them, the No. 1 station code reader bracket is as follows Figure 5 As shown, the code reader of the No. 1 station is set in the conveying channel of the front section of the packaging machine, which is used to inspect and read the QR code of the small box; the code reader bracket of the No. 1 station includes: the small box lifting channel 3: the main channel for the small box 4 to pass through, located on the right side of the whole structure. The small box 4: located in the lifting channel, is the target to be scanned and detected. The code reader bracket 5: an L-shaped support structure, used to fix and support the No. 1 station code reader 6. The No. 1 station code reader 6: installed at the end of the bracket, used to scan the QR code on the small box. Connection relationship: the code reader bracket 5 is connected to the small box lifting channel 3: the vertical part of the bracket is fixed to the side of the lifting channel. The No. 1 station code reader 6 is installed on the bracket: the No. 1 station code reader 6 is fixed at the end of the horizontal extension part of the bracket. The No. 1 station code reader 6 is aimed at the small box: the scanning surface of the No. 1 station code reader 6 faces the small box 4 in the lifting channel, so that the QR code on the small box 4 can be accurately scanned.
[0137] The No. 2 station code reader bracket is as follows Figure 6As shown, the code reader of the second station is set at the stacking station in the packaging machine, and is used to associate and read the small box two-dimensional code of the second station; the code reader bracket of the second station includes: code reader bracket 7: a horizontally extending support structure for fixing and supporting the code reader. Code reader 10 of the second station: installed on the code reader bracket 7, used to scan the two-dimensional code on the small box. Sensor bracket 8: an independent support structure for fixing the small box trigger sensor 9. Small box trigger sensor 9: installed on the sensor bracket 8, used to trigger code reading. Small box trigger sensor 9 (used to trigger code reading): another sensor shown at the bottom of the picture, also used to trigger the code reading process. Sensor bracket 12: a support structure for fixing the bottom small box trigger sensor 11. Connection relationship: code reader bracket 7 is fixed to the machine frame: one end of the bracket is connected to the upper structure of the machine. Code reader 10 of the second station is installed on the code reader bracket 7: the code reader is fixed to the free end of the bracket. Sensor bracket 8 is fixed to the machine frame: independent of code reader bracket 7. The small box trigger sensor 11 is mounted on a sensor bracket 12: located below the second station code reader 10, used to detect the presence of the small box and trigger code reading. The bottom small box trigger sensor 11 is mounted on another sensor bracket 12: located near the conveyor belt or conveying channel, used to detect the small box and trigger the code reading process.
[0138] The code reader bracket of the No. 3 station is as follows Figure 7 As shown, the code reader of the No. 3 station is set on the strip box lifting channel, which is used to associate and read the two-dimensional code of the packaged strip box; the No. 3 station code reader bracket includes: code reader bracket 16: an adjustable L-shaped support structure, used to fix and support the No. 3 station code reader 15. No. 3 station code reader 15: installed on the horizontal part of the code reader bracket 16, used to scan the two-dimensional code on the strip box. Strip box trigger sensor 13: installed on the vertical part of the code reader bracket 16, used to detect the strip box and trigger the code reading process. Trigger sensor 14: installed on the upper part of the machine frame, used to detect the position of the strip box on the conveyor belt. Connection relationship: The code reader bracket 16 is fixed on the machine frame: The vertical part of the bracket is connected to the main structure of the machine by bolts or other fixing methods. The No. 3 station code reader 15 is installed on the code reader bracket 16: The No. 3 station code reader 15 is fixed to the horizontal extension part of the bracket, and the angle and position can be adjusted. The cartridge trigger sensor 13 is mounted on the barcode reader bracket 16: located in the vertical part of the bracket, at a certain distance from the barcode reader 15 at the third station, for accurate triggering of the barcode reading process. The trigger sensor 14 is installed independently: fixed to the upper structure of the machine frame, separate from the barcode reader bracket 16. The barcode reader bracket 16 is adjustable: the bracket design allows fine adjustment in the vertical and horizontal directions to adapt to different sizes of cartridges and optimize the scanning angle.
[0139] The industrial computer is also used to control the removal of small boxes and strip boxes that cannot be correctly read or have incorrect association relationships.
[0140] Through the collaboration of the above components, by implementing high-speed scanning and batch code reading at different stations of the packaging machine, the rapid identification and association of the QR codes of small boxes and strip boxes are realized, which greatly improves the operating efficiency of the production line. The use of multiple encryption and distributed storage technology ensures the security and reliability of the QR code data and effectively prevents data from being tampered with or lost. By establishing a precise association between small boxes and strip boxes, comprehensive traceability from a single small box to the entire strip box is achieved, greatly improving the accuracy and efficiency of product quality management. Real-time detection and elimination of unqualified products effectively reduces the error rate in the production process and improves the consistency of product quality. Through real-time data analysis and visual display, it provides production management personnel with intuitive and timely production status information, adapts to different product specifications and production speeds, can be flexibly applied to various packaging production lines, and improves the adaptability and scalability of the production system. Through the automated QR code association and verification process, human operation errors are greatly reduced, and the accuracy and reliability of the production process are improved. It provides a reliable data basis for product life cycle management, which is conducive to the realization of full quality traceability from production to sales. The unique identification given on the outer packaging of small boxes and strip boxes follows the principle of one package and one code, and adopts the QR code system. During the strip box packaging process, the QR codes of the small boxes and strip boxes are read, and the QR code association relationship between the strip box and the small boxes to which it belongs is established. The small boxes and strip boxes that fail to correctly read the box and bar QR codes and have incorrectly established "box-strip" association relationships are discarded. To solve the problem that the original model cannot realize the product traceability function, the QR codes are printed on the small boxes and strip boxes, and the QR codes of the small boxes and strip boxes are read to realize data association, so as to meet the product chain traceability from production to sales.
[0141] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0142] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0143] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A QR code online association management method, characterized in that: The two-dimensional code online association management method comprises: A unique identification two-dimensional code is generated according to the product information, and the two-dimensional code is printed on one side of the small box and the strip box respectively, so as to obtain a small box with an identification and a strip box with an identification; specifically, the method comprises: performing a hash operation on the product information to obtain a hash value of a fixed length, and generating initial two-dimensional code data according to the hash value; performing XOR encryption on the initial two-dimensional code data to obtain encrypted two-dimensional code data, and performing mode selection according to the encrypted two-dimensional code data to obtain an optimal encoding mode; encoding the encrypted two-dimensional code data according to the optimal encoding mode to obtain encoded two-dimensional code data, and performing matrix conversion on the encoded two-dimensional code data to generate multiple candidate two-dimensional codes; and evaluating the multiple candidate two-dimensional codes. The first printing surface and the second printing surface of the small box are 3D-modeled to obtain a small box surface model, and feature points are extracted from the small box surface model to obtain a small box surface feature point set; principal component analysis is performed on the small box surface feature point set to obtain the main axis direction, and a small box local coordinate system is established according to the main axis direction; the small box local coordinate system is rotated and transformed to obtain a first coordinate system corresponding to the packaging machine, and the center point coordinates of the first printing surface and the second printing surface are calculated according to the first coordinate system to obtain a first printing reference point; the first printing reference point is offset calculated, A two-dimensional code printing area is obtained, and the size of the two-dimensional code is adjusted according to the size of the two-dimensional code printing area to obtain an adapted two-dimensional code image; the resolution of the adapted two-dimensional code image is adjusted to obtain a two-dimensional code image at a printing resolution, and a first printing control parameter is generated according to the two-dimensional code image at the printing resolution; two-dimensional codes are printed on the first printing surface and the second printing surface respectively according to the first printing control parameter to obtain a small box with a logo; a third printing surface and a fourth printing surface of the strip box are laser scanned to obtain point cloud data of the strip box surface, and the point cloud data of the strip box surface are plane fitted to obtain a first plane equation of the third printing surface and a second plane equation of the fourth printing surface; The first plane equation and the second plane equation are intersected to obtain the box edge equation, and the main axis direction of the box is determined according to the edge equation; a box coordinate system is constructed according to the main axis direction and a standardized transformation is performed to obtain a second coordinate system corresponding to the packaging machine, and the geometric centers of the third printing surface and the fourth printing surface are calculated according to the second coordinate system to obtain a second printing reference point; a safety boundary calculation is performed on the second printing reference point to obtain an effective printing area, and a two-dimensional code image to be printed and a corresponding second printing control parameter are generated according to the effective printing area; two-dimensional codes are printed on the third printing surface and the fourth printing surface respectively according to the second printing control parameter to obtain a box with a logo; In the conveying channel of the packaging machine, the small boxes with labels are scanned at high speed to obtain the QR code data of the small boxes, and then decoded, verified and rejected to obtain the small boxes that pass the quality inspection; In the stacking station of the packaging machine, the small boxes that have passed the quality inspection are batch-read to obtain a small box group QR code data set and perform association analysis to obtain an initial association result, and the small boxes that have passed the quality inspection are packaged with the strip boxes with the mark to obtain the packaged strip boxes; Scan the QR code of the packaged strip box to obtain the strip box QR code data and perform matching verification and rejection operations to obtain the correctly associated strip box and box-strip association results; specifically including: spatially positioning the strip box lifting channel of the packaging machine to obtain the strip box scanning position, and installing the strip box code reader according to the strip box scanning position to obtain the strip box scanning trigger area; setting a trigger sensor for the strip box scanning trigger area to obtain the strip box scanning trigger signal, and starting the strip box code reader according to the strip box scanning trigger signal to obtain the strip box QR code image; screening the strip box QR code image for effective strip box data to obtain the strip box QR code data, and matching the strip box QR code image with the strip box QR code. The data is decrypted to obtain the strip box product information; according to the strip box product information, a corresponding number of small box QR code data are extracted from the small box group QR code data set to obtain the expected associated small box data set, and the expected associated small box data set is matched and calculated with the strip box QR code data to obtain the box strip matching degree; the box strip matching degree is compared with a threshold value to obtain a matching result, and the strip boxes are classified according to the matching result to obtain correctly associated strip boxes and abnormally associated strip boxes; an associated identifier is generated for the correctly associated strip boxes to obtain a box strip association result, a rejection instruction is generated for the abnormally associated strip boxes, and the original machine rejection device is controlled to perform a strip box rejection operation; Perform deep verification and encryption on the correctly associated strips and boxes and the results of strips and boxes association, obtain encrypted data packets and perform distributed storage to obtain an associated database; The associated database is analyzed in real time and status warning is carried out to obtain production status report and status warning information and to display them visually through a human-computer interaction interface.
2. The two-dimensional code online association management method according to claim 1, characterized in that: In the conveying channel of the packaging machine, the small boxes with the logo are scanned at high speed to obtain the two-dimensional code data of the small boxes, and the decoding verification and rejection operations are performed to obtain the small boxes that pass the quality inspection, including: Performing speed detection on a conveying channel of the packaging machine to obtain conveying speed data, and calculating a target scanning frequency according to the conveying speed data; The high-speed code reader is configured according to the target scanning frequency to obtain a configured code reader, and the configured code reader is synchronized with the phase point of the original machine to obtain a trigger signal; Scanning the small box with the logo at high speed according to the trigger signal to obtain an original scanned image, and performing edge detection and perspective transformation on the original scanned image to obtain a corrected two-dimensional code image; Binarization processing and module extraction are performed on the corrected two-dimensional code image to obtain a small box two-dimensional code matrix, and error correction decoding is performed on the small box two-dimensional code matrix to obtain decoded two-dimensional code data; The decoded two-dimensional code data is judged to obtain a two-dimensional code validity identifier, and the small boxes are classified according to the two-dimensional code validity identifier to obtain valid small boxes and invalid small boxes; Decrypt the QR code data of the valid small box to obtain the small box product information, and compare the small box product information with the preset product specifications to obtain a specification matching result; Generate a rejection instruction according to the specification matching result and the two-dimensional code validity identifier, obtain a list of small boxes to be rejected, and sort the list of small boxes to be rejected to obtain a rejection execution sequence; The reject device of the original machine is controlled according to the reject execution sequence to obtain the reject operation result, and the reject operation result is recorded, and finally a small box that passes the quality inspection is obtained.
3. The two-dimensional code online association management method according to claim 1, characterized in that: In the stacking station of the packaging machine, the small boxes that have passed the quality inspection are batch-read to obtain a small box group QR code data set and perform association analysis to obtain an initial association result, and the small boxes that have passed the quality inspection are packaged with the strip boxes with the mark to obtain the packaged strip boxes, including: Perform spatial positioning on the stacking station of the packaging machine to obtain the small box stacking coordinates, and set a batch code reader according to the small box stacking coordinates to obtain a batch code reading trigger area, install a trigger sensor in the batch code reading trigger area and start the batch code reader to obtain a batch scan image; Performing image segmentation and parallel decoding on the batch scanned images to obtain a small box group two-dimensional code data set, and performing a two-dimensional code repeatability check and repeated two-dimensional code marking on the small box group two-dimensional code data set to obtain an abnormal two-dimensional code list; Compare each QR code in the small box group QR code data set with a preset rule to obtain a rule compliance degree, and mark the QR codes that do not comply with the rule according to the rule compliance degree to obtain a list of QR codes that do not comply with the rule; Generate an initial association result according to the abnormal two-dimensional code list and the two-dimensional code list that does not meet the rules, and classify the small box groups according to the initial association result to obtain qualified small box groups and unqualified small box groups; A packaging instruction is generated for the qualified small box group to obtain a strip box packaging instruction, a packaging mechanism is called according to the strip box packaging instruction to obtain a packaging operation sequence, and the packaging operation sequence is executed to obtain a packaged strip box.
4. The two-dimensional code online association management method according to claim 1, characterized in that: The method of deeply verifying and encrypting the correctly associated strip boxes and the strip box association results, obtaining an encrypted data packet and performing distributed storage to obtain an associated database includes: Performing integrity check and screening on the correctly associated strip boxes to obtain a valid strip box data set, and cross-validating the valid strip box data set with the strip box association result to obtain an association consistency index; Performing threshold comparison according to the association consistency index to obtain a deep verification result, and classifying the deep verification result to generate association identification data; Packing the associated identification data, the strip box two-dimensional code data and the small box group two-dimensional code data set to obtain an associated data packet, and annotating the associated data packet with metadata according to production information to obtain an annotated associated data packet; Symmetrically encrypt the associated data packet with the annotation to obtain primary encrypted data, and asymmetrically encrypt the primary encrypted data according to a preset key to obtain an encrypted data packet; Slicing the encrypted data packet to obtain a plurality of data slices, and allocating storage locations for the plurality of data slices according to a preset distributed storage strategy to obtain a storage allocation scheme; Transmitting data slices to distributed storage nodes according to the storage allocation scheme, and dynamically adjusting the storage nodes to obtain an optimized storage structure; Indexing is performed on the data in the optimized storage structure to obtain a distributed index table, and a corresponding associated database is constructed according to the distributed index table.
5. The two-dimensional code online association management method according to claim 1, characterized in that: The real-time analysis and status warning of the associated database are performed to obtain the production status report and status warning information and visualize them through the human-computer interaction interface, including: Performing real-time data collection on the associated database to obtain an original data stream, and performing data cleaning and preprocessing on the original data stream to obtain a standardized data set; Performing time series analysis on the standardized data set to obtain a production trend curve, and calculating real-time production status data based on the production trend curve; Performing multi-dimensional cluster analysis on the real-time production status data to obtain a production status clustering result, and identifying abnormal patterns based on the production status clustering result; Extracting an abnormal data set according to the abnormal pattern, and performing root cause analysis on the abnormal data set to obtain a potential problem list; Performing risk assessment on the potential problem list to obtain a dynamic warning threshold, and comparing the real-time production status data with the dynamic warning threshold to obtain status warning information; Summarizing the real-time production status data and the status warning information to obtain a production status report; Performing visualization template matching on the production status report to obtain a visualization configuration scheme; generating an interactive chart according to the visualization configuration scheme; The interactive chart is visualized by a human-computer interaction interface constructed through an industrial computer and a cantilever touch screen.
6. A packaging machine association system, characterized in that: Used to execute the two-dimensional code online association management method according to any one of claims 1 to 5, the packaging machine association system comprises: A packaging machine, a code reader bracket, a code reader, and a cabinet, wherein the code reader bracket is installed on the packaging machine and is used to support the code reader; the code reader includes code readers arranged at the No. 1 station, the No. 2 station, and the No. 3 station, which are respectively used to read the two-dimensional codes of small boxes and strip boxes; a display and an industrial computer are arranged in the cabinet, wherein the industrial computer is used to control the operation of the system and establish a two-dimensional code association relationship between the strip box and the small box to which it belongs; wherein the code reader at the No. 1 station is arranged at the conveying channel of the front section of the packaging machine, and is used to perform quality inspection and code reading on the small box two-dimensional code; the code reader at the No. 2 station is arranged at the stacking station in the packaging machine, and is used to perform associated code reading on the small box two-dimensional code at the No. 2 station; the code reader at the No. 3 station is arranged on the strip box lifting channel, and is used to perform associated code reading on the packaged strip box two-dimensional code; the industrial computer is also used to control the rejection of small boxes and strip boxes that cannot be correctly read and for which the associated relationship is incorrectly established.
