Object code integrated tracing method

Through the integrated traceability method of integrating QR codes and product information, a unique product ID code is generated and printed on the product packaging, solving the problems of product traceability and anti-serialization, realizing all-round traceability and anti-serialization management of product information, and simplifying the operation process.

CN120278731APending Publication Date: 2025-07-08ANHUI THREE SQUIRRELS ELECTRONICS BUSINESS
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510333476.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

The existing technology cannot effectively solve the integration control of product traceability information and QR codes, and cannot realize the anti-cargo management of one thing and one code, which is inconvenient to operate.

Method used

The integrated traceability method of integrating QR codes and product information is adopted. A unique product ID code is generated through a distributed ID generation algorithm, and it matches the production information of each link of the product in the database. The generated ID code is converted into a QR code and printed on the outer packaging of the product. The user obtains product information by scanning the code to call the service interface.

Benefits of technology

It realizes all-round traceability and anti-carriage management of product information, ensures that each product has a unique QR code, facilitates users to quickly understand product production information, reduces the possibility of ID code duplication, and simplifies the operation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120278731A_ABST
    Figure CN120278731A_ABST
Patent Text Reader

Abstract

The invention discloses an object code integrated tracing method, which comprises the following steps of: in a commodity production process, acquiring information of each link in the commodity production process; obtaining a unique commodity ID code by adopting an ID code automatic generation algorithm, and storing the commodity ID code and the production information of each link of the commodity in a database in a matching manner; converting the ID code of the commodity and the service interface into a two-dimensional code, and placing the two-dimensional code on an outer package of the commodity; a user scans the two-dimensional code of the commodity to call the service interface, and the service interface is configured to query the production information of each link of the commodity corresponding to the ID code of the commodity from the database through the network and feed back the production information to the user terminal. The system has the advantages that the two-dimensional code and the commodity information are fused to solve the problems of commodity tracing and commodity fleeing management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of commodity information traceability, and particularly to a method for integrated traceability of product codes and information. Background Art

[0002] After a product is sold, the management of the product's flow direction is a matter that enterprises need to pay attention to. Because goods in different regions often have different requirements, if there is cross-region selling, it is very unfavorable for the management of enterprise products. Therefore, enterprises often need to monitor anti-cross-region selling of goods.

[0003] On the consumer side, consumers often obtain anti-counterfeiting and production information of products through a system, which is convenient for understanding and tracing the production of products. To achieve this purpose, the prior art often uses a traceability code to query on a specific web page. This method is cumbersome to operate, requires querying on a specific web page, and is inconvenient to use. With the development of two-dimensional code technology, integrating two-dimensional codes into traceability can simplify the operation of users. However, the prior art cannot solve the integration control between product traceability information and two-dimensional codes. Summary of the Invention

[0004] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a method for integrated traceability of product codes and information, which is used to solve the problems of product traceability and cross-region selling management by integrating two-dimensional codes and product information.

[0005] To achieve the above purpose, the technical solution adopted by the present invention is as follows: A method for integrated traceability of product codes and information, including: during the production process of a product, obtaining information on each link in the production process of the product; using an ID code automatic generation algorithm to obtain a unique product ID code, and storing the product ID code in a database in a manner that matches the production information of each link of the product;

[0006] Converting the product ID code and service interface into a two-dimensional code and placing the two-dimensional code on the outer packaging of the product;

[0007] A user scans the two-dimensional code of the product to call the service interface, and the service interface is configured to query the production information of each link of the product corresponding to the product ID code in the database through the network and feedback it to the user terminal.

[0008] The information on each link in the production process of the product includes the product origin, processing parameters, and origin information.

[0009] The ID code automatic generation algorithm uses a distributed ID generation algorithm to generate ID code information and bind it to product information.

[0010] The distributed ID generation algorithm includes dividing the ID code into four components, each component is implemented according to the corresponding rules, and the digital codes obtained by the four components are combined to form the ID code.

[0011] The ID code is divided into four components, including: a sign bit part, a timestamp part, a working machine ID part, and a serial number part;

[0012] Among them, the sign bit part occupies 1 bit, and its value is fixed at 0;

[0013] The timestamp part is used to record timestamp information to ensure the uniqueness and chronological order of the ID;

[0014] The working machine ID part includes a 5-bit data center ID and a 5-bit working node ID, which are used to identify different data centers and working nodes;

[0015] The serial number part is used to represent the serial numbers of multiple IDs generated within the same millisecond.

[0016] The product ID code is formed by combining the sign bit part, the timestamp part, the working machine ID part, and the serial number part from left to right.

[0017] Convert the generated ID code to the BigInteger type, then convert it to a string in base 36, and convert it to uppercase.

[0018] In the product production stage, through the reading machine to identify and compare the two-dimensional codes on the outer packaging bag and the packaging box of the product, the products with consistent two-dimensional codes are transported to the corresponding packaging boxes; if it is detected that the two-dimensional code on the packaging box is inconsistent with the two-dimensional code on the product packaging bag inside the box, an alarm reminder is issued.

[0019] The production information of each link of the bound product includes one or more combinations of origin data, raw material storage data, production process data, sub-packaging process data, warehousing link data, and transportation link data.

[0020] The production information of each link of the bound product automatically collects data through sensors and stores it.

[0021] The advantages of the present invention are as follows: By integrating two-dimensional codes and product information, it solves the problems of product traceability and anti-channel conflict management. It is convenient to comprehensively understand and trace product information and is also conducive to anti-channel conflict management; at the same time, the item and the ID code are in one-to-one correspondence. The ID code generation algorithm adopted can meet the ID generation requirements of up to 500,000 levels, reducing the possibility of ID code duplication and realizing the requirement of one item one code; a service interface is set in the two-dimensional code, and by scanning the code to call the service interface, the product information corresponding to the ID code can be queried, which is simple and convenient, and can be realized by scanning the code. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The following briefly describes the content expressed in each drawing of the specification of the present invention and the marks in the drawings:

[0023] Figure 1 This is the flowchart of the control method of the present invention;

[0024] Figure 2 This is the schematic diagram of the ID code generation rule of the present invention.

[0025] The reference numerals in the figure are respectively: 1, sign bit part; 2, timestamp part; 3, working machine ID part; 4, serial number part. Detailed implementation manners

[0026] Next, with reference to the accompanying drawings, through the description of the optimal embodiments, the detailed implementation manners of the present invention will be further described in detail.

[0027] In order to solve the problem of traceability of commodity information and provide consumers with a method to view commodity traceability information by scanning a code; at the same time, to solve the problem of cross-region sales of commodities during the sales process, a one-item-one-code solution needs to be implemented. The one-item-one-code solution needs to solve two technical problems: one is the unique correspondence between the item and the code, and the other is the rapid generation of the code. For this solution, the following is included:

[0028] As Figure 1 shown, a method for integrated traceability of item and code includes: during the production process of commodities, obtaining information on each link in the production process of commodities; the information on each link in the production process of commodities includes the place of origin of commodities, processing parameters, and place of origin information. This information is convenient for users to view production information, facilitating a better understanding and traceability of commodities, and can also facilitate commodity manufacturers to trace and check cross-region sales of commodities.

[0029] The production information of each link of the bound commodity specifically includes: one or more combinations of origin data, raw material storage data, production process data, sub-packaging process data, warehousing link data, and transportation link data. The production information of each link of the bound commodity automatically collects data through sensors and stores it. The realization of fully automated data collection and storage is convenient for automatic integrated storage, realizing an automated and intelligent factory, and obtaining more real and reliable data.

[0030] The data source is specifically:

[0031] Overseas origin data: The geographical location, climate conditions, soil temperature and humidity, environmental temperature and humidity, CO2, PM2.5, illuminance, air pressure, yield, and origin introduction of the origin are entered in advance;

[0032] Domestic origin data: For domestic origins, data can be collected by installing environmental monitoring sensors on-site, and for overseas origins, basic meteorological information of the origin and customs quarantine reports can be entered.

[0033] Raw material storage: Install temperature and humidity sensors in the cold storage, control the temperature between 3 - 5 degrees Celsius and the humidity between 50 - 60%, and transmit the temperature and humidity data every 3 hours;

[0034] Raw material screening: Use an X-ray machine to screen out bad seeds, empty shells, etc. in the pecans, and through the device's own network module, transmit the detection quantity and results, as well as the preset recognition parameters of the device itself;

[0035] Finished product screening: Install an additional network DTU on the metal detector to collect the immediate parameters of the metal detector and the number of foreign objects removed;

[0036] Production process: Install sensors on the greening furnace and the baking machine respectively or conduct PLC data collection, and transmit the temperature and speed to the cloud for storage every 5 minutes.

[0037] Packaging process: Manually enter the processing order information, including the processing order number, team, production task, and production time.

[0038] Warehousing link: Obtain the finished product warehousing time and warehouse name according to the system's barcode scanning.

[0039] Transportation link: One portable temperature sensor is allocated for each vehicle and sent along with the goods, recording the temperature and humidity during transportation, and uploading the data when received at the destination warehouse.

[0040] Use the ID code automatic generation algorithm to obtain a unique product ID code. The ID code is unique and can achieve a one-to-one correspondence with the product.

[0041] Then match the product ID code with the production information of each link of the product and store it in the server database;

[0042] Develop a service interface URL, connect to the server through the service interface URL, and query the server database through the service interface to obtain the database query result;

[0043] Convert the product ID code and the service interface into a QR code and place the QR code on the outer packaging of the product. When the user scans the QR code with a mobile phone or other scanning device, the ID code is parsed out. At the same time, the service interface is called to query the product information corresponding to the ID code from the server and obtain the product information feedback to display the product information. The user realizes the call of the service interface by scanning the product QR code. The service interface is configured to query the production information of each link of the product corresponding to the product ID code from the database through the network and feedback it to the user terminal. The user terminal device can be a mobile phone, a smart meter, or other devices with a scanning function.

[0044] In this solution, the ID code automatic generation algorithm uses a distributed ID generation algorithm to generate ID code information and bind it to product information. The distributed ID generation algorithm divides the ID code into four components, each of which is implemented according to corresponding rules, and the digital codes obtained from the four components are combined to form the ID code.

[0045] Dividing the ID code into four components includes: a sign bit part, a timestamp part, a working machine ID part, and a sequence number part;

[0046] Among them, the sign bit part occupies 1 bit, and its value is fixed at 0;

[0047] The timestamp part is used to record timestamp information to ensure the uniqueness and time orderliness of the ID;

[0048] The working machine ID part includes a 5-bit data center ID and a 5-bit working node ID, which are used to calibrate different data centers and working nodes;

[0049] The sequence number part is used to represent the sequence numbers of multiple IDs generated within the same millisecond.

[0050] The product ID code is formed by combining the sign bit part, the timestamp part, the working machine ID part, and the sequence number part from left to right.

[0051] In order to avoid inconsistencies between products and packaging boxes during the production stage, during the product production stage, the reading machine identifies and compares the QR codes on the outer packaging bag and the packaging box of the product, and conveys the products with consistent QR codes to the corresponding packaging boxes; if it is detected that the QR code on the packaging box is inconsistent with the QR code on the product packaging bag inside the box, an alarm reminder will be issued.

[0052] The ID automatic generation algorithm of this solution consists of the following parts, as Figure 2 shown:

[0053] Sign bit: 1 bit. Since the generated IDs are all positive numbers, the highest bit is fixed at 0.

[0054] Timestamp: 41 bits, used to record the difference in timestamps (millisecond level). The 41-bit timestamp can be used for 69 years, and this timestamp ensures the uniqueness and time orderliness of the ID.

[0055] Working machine ID: 10 bits, including a 5-bit data center ID (datacenter Id) and a 5-bit working node ID (worker I d), which can be deployed on 1024 nodes. The data center ID is used to identify different data centers, and the working node ID is used to identify different working nodes in the same data center. This can ensure that the IDs generated by each node are unique.

[0056] Serial number: 12 digits, used to record different IDs generated within the same millisecond. The 12-digit serial number supports each node to generate 4096 ID serial numbers per millisecond.

[0057] Working principle

[0058] Timestamp: Records the time when the ID is generated, usually the offset relative to a custom "epoch" time. Since the timestamp is monotonically increasing, the generated IDs are also monotonically increasing.

[0059] Machine identifier: By combining the data center ID and the working node ID, the machine that generates the ID can be uniquely identified.

[0060] Serial number: Within the same millisecond, multiple unique IDs are generated through an incrementing serial number. When the serial number reaches the maximum value (4095), it will wrap around to 0 and wait for the next millisecond to continue generating IDs.

[0061] The ID generation algorithm adopted in this solution has the following characteristics:

[0062] Global uniqueness: Through the combination of timestamp, machine identifier, and serial number, it can be ensured that the generated IDs are unique globally.

[0063] Time orderliness: Since the ID contains timestamp information, the order of generation time can be roughly judged according to the size of the ID.

[0064] High efficiency: It relies on bit operations to construct IDs, and these operations are very fast on modern CPUs, so it can meet the requirements for ID generation in high-concurrency scenarios.

[0065] Scalability: Allows the system to be extended by configuring the data center identifier and machine identifier to adapt to system requirements of different scales.

[0066] When implementing the one object one code solution in this scheme, first initialize the parameters and objects: receive the input parameters and create necessary objects such as StringBuffer, SnowflakeMakeDTO, etc.

[0067] Secondly, verify the input: check whether the necessary fields are empty or meet the requirements (such as the number of code generation must be a number).

[0068] Then query the product information: query the detailed product information according to the product barcode.

[0069] Furthermore, adjust the number of code generation: adjust the final number of code generation based on the input quantity.

[0070] Final generated code: Use the given information to batch generate a specified number of IDs through the Snowflake algorithm, send them through the message queue, and store them in a list. Write the generated code into a string buffer, convert it into a byte array, and upload it to the OSS system to complete the generation of the ID code. According to the query result (whether the product exists), bind the code to the corresponding product attribute information and batch insert it into the database. Exception handling: When an exception occurs during the database insertion process, an alarm reminder can be issued or the alarm information can be sent to the work group. 1. Implement the rapid generation of 500,000 barcode information at one time based on the Snowflake algorithm and asynchronously bind the corresponding product information.

[0071] After the implementation of this solution, the business system generates code information, and the factory production converts the code information into a QR code and prints it on the packaging. Each packaging has a unique code information; when the user scans the QR code, the service interface is called to obtain the product production information corresponding to the code, which can solve the problem of product diversion during the sales process, effectively synchronize the product production information to consumers, enable consumers to fully understand the product production information during the use of the product, and ensure the safety and effectiveness of the product.

[0072] Adopting this solution has the following advantages:

[0073] 1. Effective traceability of commodity information: Record the information of the production process and then perform scan tracing through the QR code information on the product.

[0074] 2. Each commodity has specific QR code information. By scanning the code, the production and shipping information of the commodity can be understood, effective traceability can be carried out, and product diversion can be prevented.

[0075] Obviously, the specific implementation of the present invention is not limited by the above methods. As long as various non-substantive improvements are made using the method concept and technical solution of the present invention, they are all within the protection scope of the present invention.

Claims

1. An integrated traceability method for physical objects and codes, characterized in that: Including: During the commodity production process, obtain information on each link in the commodity production process; Use the ID code automatic generation algorithm to obtain a unique commodity ID code, and store the commodity ID code matched with the production information of each link of the commodity in the database; Convert the commodity ID code and the service interface into a two-dimensional code and place the two-dimensional code on the outer packaging of the commodity; The user realizes the invocation of the service interface by scanning the commodity two-dimensional code, and the service interface is configured to query the production information of each link of the commodity corresponding to the commodity ID code from the database through the network and feedback it to the user terminal.

2. The method for integrated traceability of physical code as claimed in claim 1, wherein: The information on each link in the commodity production process includes the place of origin of the commodity, processing parameters, and place of production information.

3. The one-to-one correspondence method for item code and object tracing according to claim 1, wherein: The ID code automatic generation algorithm uses a distributed ID generation algorithm to generate ID code information and bind it to product information.

4. The integrated item-code traceability method according to claim 3, characterized in that: The distributed ID generation algorithm includes dividing the ID code into four components, each component is implemented according to the corresponding rules, and the digital codes obtained by the four components are combined to form the ID code.

5. The integrated article code tracing method according to claim 4, wherein: Dividing the ID code into four components includes: a sign bit part, a timestamp part, a working machine ID part, and a serial number part; Among them, the sign bit part occupies 1 bit, and its value is fixed at 0; The timestamp part is used to record timestamp information to ensure the uniqueness and time orderliness of the ID; The working machine ID part includes a 5-bit data center ID and a 5-bit working node ID, which are used to calibrate different data centers and working nodes; The serial number part is used to represent the serial numbers of multiple IDs generated within the same millisecond.

6. The integrated item-code traceability method according to claim 5, characterized in that: The commodity ID code is formed by combining the sign bit part, the timestamp part, the working machine ID part, and the serial number part from left to right.

7. The method for integrated traceability of physical code as claimed in any one of claims 1-6, wherein: During the commodity production stage, through the recognition and comparison of the two-dimensional codes on the outer packaging bag and the commodity packing box by a code reading machine, the commodities with consistent two-dimensional codes are conveyed into the corresponding packing boxes; if it is detected that the two-dimensional code on the packing box is inconsistent with the two-dimensional code on the commodity packaging bag inside the box, an alarm reminder is issued.

8. A method for integrated traceability of physical objects and codes according to any one of claims 1-6, characterized in that: The production information of each link of the bound commodity includes one or more combinations of origin data, raw material storage data, production process data, sub-packaging process data, warehousing link data, and transportation link data.

9. A method for integrated tracing of physical objects and codes according to any one of claims 1-6, characterized in that: The production information of each link of the bound commodity automatically collects data through sensors and stores it.

Citation Information

Cited By

  • Approximate commodity identification method and device, equipment and medium

    CN121353711A