Product full-cycle information tracing system and tracing method based on two-dimensional code
By using dynamic encryption and blockchain notarization technologies, an immutable dynamic QR code is generated, which solves the problems of easy copying of static QR codes and easy tampering of centralized databases. This enables trusted notarization and traceability of product information throughout its entire lifecycle, improving data security and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NINGBO DAHONGYING UNIV
- Filing Date
- 2026-01-16
- Publication Date
- 2026-05-01
AI Technical Summary
Existing QR code-based traceability systems have significant technical limitations in terms of data security and anti-counterfeiting risks. Static QR codes are easily copied and tampered with, centralized databases have single-point-of-failure risks, and manual operation can easily lead to data reliability issues.
Employing dynamic encryption and blockchain notarization technologies, the system automatically collects data through sensors to generate a unique product identifier. It then uses HKDF and AES-GCM algorithms to generate a one-time encryption token, which is stored on the blockchain to generate an immutable dynamic QR code. The query and verification module performs dual verification to ensure the authenticity and integrity of the data.
It achieves dynamic security of QR codes, prevents copying and tampering, provides unforgeable security credentials, improves the credibility and regulatory efficiency of traceability data, and ensures the reliability and immutability of traceability information.
Smart Images

Figure CN121961603A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of QR code traceability technology, specifically to a product full-lifecycle information traceability system and method based on QR codes. Background Technology
[0002] As consumers increasingly demand higher product quality, safety, and transparency, and as the manufacturing industry needs to transform towards intelligence and digitalization, product lifecycle information traceability systems have become a key technological means to ensure supply chain security, improve quality management, and build consumer trust. QR codes, due to their advantages such as low cost, easy printing, and ease of reading, are widely used as carriers of product information and have become the core interface for reaching end users with traceability information.
[0003] Currently, QR code-based traceability systems have been applied in multiple industries. A typical implementation involves assigning a unique QR code identifier to each individual product or batch; during production, processing, warehousing, logistics, and sales, operators manually or using equipment associate key process data with the QR code and upload it to a centralized database; finally, consumers can scan the QR code to access some or all of the product's history information on a webpage or application.
[0004] However, existing systems of this type have significant technical limitations and security vulnerabilities in addressing the increasingly serious risks to data security and anti-counterfeiting. Firstly, most of them use static QR codes, and their encoded content is fixed and public; this makes the QR codes extremely easy to be copied, counterfeited or tampered with in batches; thus harming brand reputation and market order. Secondly, traditional traceability information is centrally stored in a centralized database built by the enterprise itself. However, this architecture has the risk of single point of failure, and internal personnel or external hackers theoretically have the ability to tamper with or delete historical records. Once maliciously tampered with, the entire traceability chain will fail, making it impossible to effectively trace responsibility and analyze the root cause of problems. Third, although some advanced systems have introduced sensors and automatic identification devices for data collection, the data binding operation still requires manual confirmation and triggering, which is prone to operational errors and threatens the reliability of source data and subsequent traceability information. Summary of the Invention
[0005] The purpose of this invention is to provide a product full-lifecycle information traceability system and method based on QR codes, which solves the technical problem of achieving reliable evidence storage during the dynamic encryption process of products throughout their entire lifecycle, reducing traceability data security risks and lowering anti-counterfeiting risks.
[0006] The objective of this invention can be achieved through the following technical solutions: A product lifecycle information traceability system based on QR codes includes: The data acquisition module is used to acquire key nodes throughout the product's entire lifecycle. It automatically collects process data, environmental data, and operational entity information associated with these key nodes through deployed sensors and automatic identification devices. The data processing module is used to receive, clean, and integrate process data, environmental data, and operational entity information associated with key nodes to generate a unique product identifier, and to build a structured full lifecycle digital archive through the unique product identifier. The dynamic encryption and traceability generation module is used to dynamically encrypt key nodes in the digital archive throughout its entire lifecycle and generate real-time QR codes. The query verification module is used to scan real-time QR codes and generate traceability information.
[0007] Preferably, the data processing module generates the product's unique identifier in the following way: Based on the product batch number B in the process data, the collection location L and timestamp T in the environmental data, and the responsible entity code C in the operation entity information, an irreversible unique identifier ID=En[SHA256(B,L,T,C)] is generated using a preset hash algorithm.
[0008] Preferably, the process of constructing a structured, full-lifecycle digital archive using a product's unique identifier is as follows: Create a data table in the database using the unique identifier ID as the primary key; Process data, environmental data, and operational entity information collected from different key nodes, after being cleaned and integrated, are stored as associated records in this data table according to their chronological order and node type; the schema definition for each associated record is as follows:
[0009] in, For the first Pattern information of each associated record, This represents the description information of the current node, where , For the currently associated key node type, For the currently associated timestamp, The currently associated time sequence number; This represents the standardized load, and , This represents the standardized critical node process data vector. This represents a standardized environmental data vector. This represents the standardized information about the operational entity. This forms a time-line indexed, full-lifecycle data chain, for each key node. After the data is cleared, records are generated and inserted into the database.
[0010] Preferably, the dynamic encryption and traceability generation module includes: A dynamic encryption engine is used to generate encrypted verification information based on the status information of digital archives. The evidence storage interface unit is used to generate a key node data digest based on the encrypted verification information and submit it to the trusted evidence storage network. The traceability code generation unit is used to extract information from the trusted evidence storage network and generate a two-dimensional traceability code containing verification information.
[0011] Preferably, the process by which the dynamic encryption engine generates encrypted verification information includes: Receive access requests from the query verification module; Extract the time factor and product identifier from the access request; By combining the real-time status values of products in the full lifecycle digital archive, a real-time valid dynamic token is generated through an encryption algorithm.
[0012] Preferably, the dynamic encryption and traceability generation module includes: The temporary session key is derived from the master key using an HMAC-based key derivation function (HKDF). :
[0013] in, Use random factors random factor Random numbers generated by a cryptographically secure random number generator; The system master key; fixed The string is used to distinguish the purpose of the key; Represents a cryptographic hash function; Serialize key parameters into a byte sequence according to a fixed format:
[0014] in, For the token plaintext, For serialization functions, A fixed-length identifier code; Dynamic timestamp; It is a random factor; For preset control flags; Use a temporary key to authenticate and encrypt the plaintext:
[0015] in, It is a ciphertext. For certification labels; For encryption functions; For related data and This indicates that the associated data is used to bind timestamps to prevent replay. Encode the encryption result into a transmission format:
[0016] in, For the final token; To generate an immutable evidence record, calculate the evidence record data digest:
[0017] in, For encrypted commitment; For hash functions; Will Submitted to a blockchain smart contract for notarization, and a transaction receipt is returned. ; Construct a query URL, encode it, and generate a dynamic QR code.
[0018] Preferably, the verification process of the scanned information generated by the query verification module includes: The temporary QR code obtained by scanning is parsed, the encoded data in the QR code is extracted, and the key parameter, which is the encryption token, is extracted from the encoded data. and blockchain transaction receipts ; Send a verification request for key parameters in a standard format to the dynamic encryption and traceability generation module: Determine if the timestamp of the verification encryption token is within the valid window. Inside: If not, an error message will be displayed; if yes, the corresponding key will be used. crypto tokens Perform AES-GCM decryption; and verify that the authentication tags are consistent. If so, extract the plaintext information; Upon receiving a successful verification response, the system retrieves the corresponding full lifecycle digital archive from the data processing module, integrates it, generates and displays a complete traceability information report to the user.
[0019] Preferably, the method for verifying whether the authentication labels are consistent is as follows: Using blockchain transaction receipts Query the blockchain network to verify the existence of the transaction: If not, the authentication labels are inconsistent; If so, then verify the data digest stored on the chain. Does it match the digest recalculated based on the decrypted information? If so, then the authentication labels are consistent; If not, the authentication labels are inconsistent.
[0020] A product lifecycle information traceability method based on QR codes, applied to a product lifecycle information traceability system based on QR codes, the method is as follows: S1. The data acquisition module acquires key nodes throughout the product's entire lifecycle and automatically collects process data, environmental data, and operational entity information associated with these key nodes through deployed sensors and automatic identification devices. S2. The data processing module receives, cleans, and integrates the process data, environmental data, and operating entity information associated with the key nodes to generate a unique product identifier, and constructs a structured full lifecycle digital archive through the unique product identifier. S3, the dynamic encryption and traceability generation module dynamically encrypts and generates real-time QR codes at key nodes in the full lifecycle digital archive. S4. The query and verification module scans the real-time QR code to generate traceability information.
[0021] The beneficial effects of this invention are: (1) The dynamic encryption and traceability generation module introduces timestamps and random numbers, uses HKDF and AES-GCM algorithms to dynamically generate one-time encryption tokens, and stores the key digest of the generation time independently and permanently through blockchain smart contracts. Finally, the dynamic token and blockchain storage receipt are jointly encoded to generate a unique QR code, which completely solves the anti-counterfeiting problem of static QR codes being infinitely copied from a physical perspective. At the same time, through the immutability of blockchain, it provides third-party technical notarization independent of the operator for the originality of traceability data, making each circulating QR code an unforgeable and publicly auditable security certificate.
[0022] (2) The query verification module does not directly query the data after scanning the QR code image. Instead, it first parses and separates the encrypted token and the blockchain transaction ID, and then performs the decryption verification of the dynamic token and the authenticity verification of the blockchain evidence in parallel. Only after both verifications are successfully passed will the system authorize the retrieval of the corresponding full lifecycle digital archive and present the data after integrating it with the "verified" status. The query verification module ensures that only requests carrying a legal and valid dynamic token, whose source has been permanently confirmed by the blockchain, can obtain core traceability information, preventing data theft by forging QR codes or replaying old codes.
[0023] (3) Through the mutual collaboration of the query verification module and the dynamic encryption and traceability generation module, a process of secure encryption and decoding of QR codes from issuance and verification to presentation is formed, which significantly improves the credibility of electronic data evidence and improves the efficiency of product supervision.
[0024] Of course, any product implementing this invention does not necessarily need to achieve all the advantages described above at the same time. Attached Figure Description
[0025] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a block diagram of a product lifecycle information traceability system based on QR codes according to the present invention; Figure 2 This is a schematic diagram of the sub-module structure of the dynamic encryption and traceability generation module of the present invention; Figure 3 This is a flowchart illustrating the steps of the method for generating encrypted verification information using the dynamic encryption engine of this invention. Figure 4 This is a flowchart illustrating the steps of a product lifecycle information traceability method based on QR codes according to the present invention. Detailed Implementation
[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] This enables robust and reliable evidence storage during the dynamic encryption process throughout the product lifecycle, reducing data security risks associated with traceability and mitigating counterfeiting risks. Please see Figure 1 As shown, the present invention is a product lifecycle information traceability system based on QR codes, comprising: The data acquisition module is used to acquire key nodes throughout the product's entire lifecycle. It automatically collects process data, environmental data, and operational entity information associated with these key nodes through deployed sensors and automatic identification devices. The data processing module is used to receive, clean, and integrate process data, environmental data, and operational entity information associated with key nodes to generate a unique product identifier, and to build a structured full lifecycle digital archive through the unique product identifier. The dynamic encryption and traceability generation module is used to dynamically encrypt key nodes in the digital archive throughout its entire lifecycle and generate real-time QR codes. The query verification module is used to scan real-time QR codes and generate traceability information.
[0029] In the above technical solution, the data acquisition module deploys IoT sensors (such as temperature and humidity sensors, GPS modules) and automatic identification devices (such as RFID readers, industrial cameras) at key nodes throughout the product's lifecycle, including production, processing, warehousing, and logistics. This allows for the automatic sensing of product arrival events without human intervention during product flow, and the real-time collection of associated multi-dimensional data. Process data includes equipment process parameters, environmental data includes geographical location and climate information, and operator information is automatically bound via employee badge sensing or biometric identification. This process achieves automated and structured data acquisition from the source, and through… The establishment of key nodes ensures the real-time nature and unitization of traceability information, improving the credibility of the data traceability chain. The data processing module receives raw heterogeneous data streams from each key node, first preprocessing the raw heterogeneous data streams, including clear execution, outlier identification, and unified dimensionality, and then standardizing and storing them. Based on the initial batch number, time stamp, and responsible entity code, an irreversible product unique identifier (ID) is generated using a cryptographic hash algorithm (such as SHA-256). Based on the product unique identifier, efficient query conditions can be provided for the integrity and consistency of subsequent technical traceability of product digital identity. When a user determines that a traceability QR code needs to be generated, the dynamic encryption and traceability generation module dynamically executes an identification process based on the product's unique identifier (ID). First, by combining the product's unique identifier (ID), the current high-precision timestamp, and a cryptographic random number, a one-time session key is generated using a key derivation function. This key information is then authenticated and encrypted, generating a time-sensitive and non-replayable dynamic token. Next, the key elements of this encryption event (token hash) are submitted to the blockchain network for immutable notarization, and a transaction receipt is obtained. Finally, the dynamic token and the blockchain transaction receipt are encoded into a real-time generated, unique encrypted QR code. Through the dynamic encryption and traceability generation module, the QR code for the entire product lifecycle information is dynamically encrypted to ensure timeliness and uniqueness, effectively preventing the impact of copying, recycling, and duplication. Furthermore, combined with blockchain notarization verification, it provides an independent, public, and non-repudiable third-party trusted proof for each QR code generation, avoiding the core security and anti-counterfeiting risks of traditional centralized traceability data potentially being tampered with in the background. This enables the traceability identifier to serve as a verifiable security credential. After a user scans a real-time QR code, the query verification module first parses and extracts the encrypted token and blockchain transaction receipt, then sends a verification request to the backend. The backend service executes two verifications in parallel: first, it decrypts and verifies the validity and timeliness of the dynamic token; second, it queries the blockchain based on the transaction identifier to independently verify the objective existence and completeness of the QR code generation record. Only after both verifications pass will the system retrieve the corresponding full-lifecycle digital file from the data processing module based on the authorized product ID in the token, integrate the file information with the successful blockchain verification status, and generate a final visual traceability report to return to the user. The query verification module enables verification before data confirmation, ensuring the security of data verification. For users, the final result is not only a traceability report but also reliable and authoritative proof that the blockchain evidence has been verified, enhancing the credibility of the traceability results. This effectively addresses users' concerns about the potential tampering of traceability information and provides regulatory authorities with a technically verifiable regulatory tool.
[0030] As one embodiment of the present invention, the data processing module generates a unique product identifier in the following way: Based on the product batch number B in the process data, the collection location L and timestamp T in the environmental data, and the responsible entity code C in the operation entity information, an irreversible unique identifier ID=En[SHA256(B,L,T,C)] is generated using a preset hash algorithm.
[0031] In the above technical solution, by extracting and splicing the product batch number (B), geographical location (L), timestamp (T) and responsible entity code (C), a digital identifier corresponding to the product entity is obtained as the product's unique identifier code; this solves the source problem of easy confusion and counterfeiting of products in the traceability system and establishes a feasible digital twin identity foundation.
[0032] As one embodiment of the present invention, the process of constructing a structured, full-lifecycle digital archive through a product's unique identifier is as follows: Create a data table in the database using the unique identifier ID as the primary key; Process data, environmental data, and operational entity information collected from different key nodes, after being cleaned and integrated, are stored as associated records in this data table according to their chronological order and node type; the schema definition for each associated record is as follows:
[0033] in, For the first Pattern information of each associated record, This represents the description information of the current node, where , For the currently associated key node type, For the currently associated timestamp, The currently associated time sequence number; This represents the standardized load, and , This represents the standardized critical node process data vector. This represents a standardized environmental data vector. This represents the standardized information about the operational entity. This forms a time-line indexed, full-lifecycle data chain, for each key node. After the data is cleared, records are generated and inserted into the database.
[0034] In the above technical solution, a database table is established using a unique identifier ID as the primary key, and the cleaned and integrated data from each key node is sorted according to node type. timestamp and global serial number Perform structured encapsulation to ensure that the key node description information in the current associated record's schema information is preserved. The uniformity is achieved, and the standardized load is obtained by standardizing the mapped product data. The standardized product data consists of: a standardized key process data vector. Standardized environmental data vectors and standardized operational entity information These product data raw data tuples Represented as:
[0035] in, Indicates a key node, and , This represents the total number of key nodes. Different key nodes represent different parts of the product's lifecycle. Nodes can be defined according to production, processing, warehousing, and logistics, with each product lifecycle divided into multiple different nodes. Each selected key node contains a process data vector. Environmental data vector and operating entity information ; where process data vector Environmental data vectors, such as equipment number, process parameters, operating market, and output, etc. Such as temperature, humidity, geographical location, timestamps, etc.; information of the operating entity. Such as operator ID, responsible department, and supplier code; for After cleaning and standardization ; Form standardized records , Then, the data is inserted into the database in chronological order. This process transforms massive, heterogeneous traceability data from a disordered accumulation to a time-series, structured organization, ensuring the integrity, inherent temporal logic, and efficient retrieval of all event records throughout the product's lifecycle. Finally, a timeline-indexed lifecycle data chain is formed, providing a framework for each key node. After the data is cleared, records are generated and inserted into the database.
[0036] As one embodiment of the present invention, please refer to Figure 2 As shown, the dynamic encryption and traceability generation module includes: A dynamic encryption engine is used to generate encrypted verification information based on the status information of digital archives. The evidence storage interface unit is used to generate a key node data digest based on the encrypted verification information and submit it to the trusted evidence storage network. The traceability code generation unit is used to extract information from the trusted evidence storage network and generate a two-dimensional traceability code containing verification information.
[0037] In the above technical solution, the dynamic encryption and traceability generation functions are divided into three collaborative sub-modules: dynamic encryption engine, evidence storage interface unit, and traceability code generation unit. This clarifies the division of labor and data flow path from generating encrypted information and performing trusted evidence storage to finally outputting QR codes. Furthermore, this modular architecture achieves the decoupling and refinement of security functions in the data encryption and traceability process, ensuring the tightness of each link in the encryption calculation, blockchain interaction, and code generation.
[0038] As one embodiment of the present invention, please refer to Figure 3 As shown, the process by which the dynamic encryption engine generates encrypted verification information includes: Receive access requests from the query verification module; Extract the time factor and product identifier from the access request; By combining the real-time status values of products in the full lifecycle digital archive, a real-time valid dynamic token is generated through an encryption algorithm.
[0039] The above technical solution further designs the specific technical process of the dynamic encryption engine generating encrypted verification information. By introducing high-precision timestamps and cryptographic random numbers as dynamic factors, HKDF is used to derive temporary session keys from the master key, and AES-GCM authentication encryption mode is used to encrypt plaintext containing information such as product IDs to generate ciphertext and authentication tags, which are finally encoded into dynamic tokens. This ensures that the security token corresponding to each traceability QR code is temporary, unique, and time-limited. From a cryptographic perspective, this solves the possibility of tokens being predicted, copied, or reused, and accurately addresses the security vulnerabilities of easy copying and replay attacks caused by static tokens or simple encryption.
[0040] As one embodiment of the present invention, the dynamic encryption and traceability generation module includes: The temporary session key is derived from the master key using an HMAC-based key derivation function (HKDF). :
[0041] in, Use random factors random factor Random numbers generated by a cryptographically secure random number generator; The system master key; fixed The string is used to distinguish the purpose of the key; Represents a cryptographic hash function; Serialize key parameters into a byte sequence according to a fixed format:
[0042] in, For the token plaintext, For serialization functions, A fixed-length identifier code; Dynamic timestamp; It is a random factor; For preset control flags; Use a temporary key to authenticate and encrypt the plaintext:
[0043] in, It is a ciphertext. For certification labels; For encryption functions; For related data and This indicates that the associated data is used to bind timestamps to prevent replay. Encode the encryption result into a transmission format:
[0044] in, For the final token; To generate an immutable evidence record, calculate the evidence record data digest:
[0045] in, For encrypted commitment; For hash functions; Will Submitted to a blockchain smart contract for notarization, and a transaction receipt is returned. ; Construct a query URL, encode it, and generate a dynamic QR code.
[0046] In the above technical solution, based on the generation of dynamic tokens, the hash digest of key parameters is further calculated. The transaction is then submitted to a blockchain smart contract for record-keeping, and a transaction receipt is obtained. ; Token With transaction receipt (i.e., blockchain transaction receipts) jointly encode to generate a unique dynamic QR code; achieving dual confirmation of dynamic tokens and blockchain evidence storage, not only ensuring the dynamic security of the QR code itself, but also providing independent, tamper-proof, and publicly verifiable third-party evidence for each QR code generation event through the blockchain; this fundamentally solves the core trust crisis of QR code authenticity being difficult to verify and the possibility that traceability data may be quietly tampered with in the background in a centralized system without being detected.
[0047] As one embodiment of the present invention, the verification process of the scanned information generated by the query verification module includes: The temporary QR code obtained by scanning is parsed, the encoded data in the QR code is extracted, and the key parameter, which is the encryption token, is extracted from the encoded data. and blockchain transaction receipts ; Send a verification request for key parameters in a standard format to the dynamic encryption and traceability generation module: Determine if the timestamp of the verification encryption token is within the valid window. Inside: If not, an error message will be displayed; if yes, the corresponding key will be used. crypto tokens Perform AES-GCM decryption; and verify that the authentication tags are consistent. If so, extract the plaintext information; Upon receiving a successful verification response, the system retrieves the corresponding full lifecycle digital archive from the data processing module, integrates it, generates and displays a complete traceability information report to the user.
[0048] In the above technical solution, this embodiment first parses the QR code to obtain the encryption token during verification. and blockchain transaction receipts Then, two verifications are performed in parallel: first, decryption and verification. The timeliness and completeness; secondly, through The system verifies the authenticity of the corresponding evidence by querying the blockchain; only when both are verified can the traceability data be retrieved and displayed; this process passes through multiple security gates; ensuring that only query requests carrying a legitimate and valid dynamic token whose generation process has been permanently verified by the blockchain can obtain sensitive traceability data, effectively solving the risks of impersonation and data theft from illegally forged query requests and replay attacks from tokens that have been leaked but identified as "legitimate".
[0049] Furthermore, the method for verifying whether the authentication labels are consistent is as follows: Using blockchain transaction receipts Query the blockchain network to verify the existence of the transaction: If not, the authentication labels are inconsistent; If so, then verify the data digest stored on the chain. Does it match the digest recalculated based on the decrypted information? If so, then the authentication labels are consistent; If not, the authentication labels are inconsistent.
[0050] In the above technical solution, this embodiment specifies the evidence verification process: utilizing Locate transactions on the blockchain and compare them with the summaries stored on the chain. The process ensures that the digest is completely consistent with the digest recalculated locally based on the decrypted information. This process enables offline and automated verification of the originality and integrity of traceability data. Instead of relying solely on trust in a centralized system, it uses cross-temporal comparison of cryptographic evidence to guarantee that the traceability information retrieved has not been tampered with by any party since its generation. This effectively solves the key problem of insufficient credibility and judicial acceptance of traceability data as electronic evidence in scenarios such as quality disputes and compliance audits.
[0051] Please see Figure 4 As shown, a product lifecycle information traceability method based on QR codes is applied to a product lifecycle information traceability system based on QR codes. The method is as follows: S1. The data acquisition module acquires key nodes throughout the product's entire lifecycle and automatically collects process data, environmental data, and operational entity information associated with these key nodes through deployed sensors and automatic identification devices. S2. The data processing module receives, cleans, and integrates the process data, environmental data, and operating entity information associated with the key nodes to generate a unique product identifier, and constructs a structured full lifecycle digital archive through the unique product identifier. S3, the dynamic encryption and traceability generation module dynamically encrypts and generates real-time QR codes at key nodes in the full lifecycle digital archive. S4. The query and verification module scans the real-time QR code to generate traceability information.
[0052] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and non-volatile computer storage media are basically similar to the method embodiments, and therefore described more simply; relevant parts can be referred to the descriptions of the method embodiments.
[0053] The above content is merely an example and illustration of the concept of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described or use similar methods to replace them, as long as they do not deviate from the concept of the invention or exceed the scope defined in this application, they should all fall within the protection scope of the present invention.
Claims
1. A product lifecycle information traceability system based on QR codes, characterized in that, include: The data acquisition module is used to acquire key nodes throughout the product's entire lifecycle. It automatically collects process data, environmental data, and operational entity information associated with these key nodes through deployed sensors and automatic identification devices. The data processing module is used to receive, clean, and integrate the process data, environmental data, and operating entity information associated with the key nodes to generate a unique product identifier, and to construct a structured full lifecycle digital archive through the unique product identifier. The dynamic encryption and traceability generation module is used to dynamically encrypt key nodes in the digital archive throughout its entire lifecycle and generate real-time QR codes. The query verification module is used to scan real-time QR codes and generate traceability information.
2. The product lifecycle information traceability system based on QR codes according to claim 1, characterized in that, The data processing module generates the unique product identifier in the following way: Based on the product batch number B in the process data, the collection location L and timestamp T in the environmental data, and the responsible entity code C in the operation entity information, an irreversible unique identifier ID=En[SHA256(B,L,T,C)] is generated using a preset hash algorithm.
3. The product lifecycle information traceability system based on QR codes according to claim 2, characterized in that, The process of constructing a structured, full-lifecycle digital archive using a product's unique identifier is as follows: A data table is created in the database using the unique identifier ID as the primary key; Process data, environmental data, and operational entity information collected from different key nodes, after being cleaned and integrated, are stored as associated records in this data table according to their chronological order and node type. The schema definition for each associated record is: ; in, For the first Pattern information of each associated record, This represents the description information of the current node, where , For the currently associated key node type, For the currently associated timestamp, The currently associated time sequence number; This represents the standardized load, and , This represents the standardized critical node process data vector. This represents a standardized environmental data vector. This represents the standardized information about the operational entity. This forms a time-line indexed, full-lifecycle data chain, for each key node. After the data is cleared, records are generated and inserted into the database.
4. The product lifecycle information traceability system based on QR codes according to claim 1, characterized in that, The dynamic encryption and traceability generation module includes: A dynamic encryption engine is used to generate encrypted verification information based on the status information of digital archives. The evidence storage interface unit is used to generate a key node data digest based on the encrypted verification information and submit it to the trusted evidence storage network. The traceability code generation unit is used to extract information from the trusted evidence storage network and generate a two-dimensional traceability code containing verification information.
5. A product lifecycle information traceability system based on QR codes according to claim 4, characterized in that, The process by which the dynamic encryption engine generates encrypted verification information includes: Receive access requests from the query verification module; Extract the time factor and product identifier from the access request; By combining the real-time status values of products in the full lifecycle digital archive, a real-time valid dynamic token is generated through an encryption algorithm.
6. A product lifecycle information traceability system based on QR codes according to claim 5, characterized in that, The dynamic encryption and traceability generation module includes: The temporary session key is derived from the master key using an HMAC-based key derivation function (HKDF). : ; in, Use random factors random factor Random numbers generated by a cryptographically secure random number generator; The system master key; fixed The string is used to distinguish the purpose of the key; Represents a cryptographic hash function; Serialize key parameters into a byte sequence according to a fixed format: ; in, For the token plaintext, For serialization functions, A fixed-length identifier code; Dynamic timestamp; It is a random factor; For preset control flags; Use a temporary key to authenticate and encrypt the plaintext: ; in, It is a ciphertext. For certification labels; For encryption functions; For related data and This indicates that the associated data is used to bind timestamps to prevent replay. Encode the encryption result into a transmission format: ; in, For the final token; To generate an immutable evidence record, calculate the evidence record data digest: ; in, For encrypted commitment; For hash functions; Will Submitted to a blockchain smart contract for notarization, and a transaction receipt is returned. ; Construct a query URL, encode it, and generate a dynamic QR code.
7. A product lifecycle information traceability system based on QR codes according to claim 1, characterized in that, The verification process of the scanned and generated information by the query verification module includes: The temporary QR code obtained by scanning is parsed, the encoded data in the QR code is extracted, and the key parameter, which is the encryption token, is separated from the encoded data. and blockchain transaction receipts ; Send a verification request for key parameters in a standard format to the dynamic encryption and traceability generation module: Determine if the timestamp of the verification encryption token is within the valid window. Inside: If not, an error message will be displayed; if yes, the corresponding key will be used. crypto tokens Perform AES-GCM decryption; and verify that the authentication tags are consistent: If so, extract the plaintext information; Upon receiving a successful verification response, the system retrieves the corresponding full lifecycle digital archive from the data processing module, integrates it, generates and displays a complete traceability information report to the user.
8. A product lifecycle information traceability system based on QR codes according to claim 7, characterized in that, The method for verifying whether the authentication labels are consistent is as follows: Using blockchain transaction receipts Query the blockchain network to verify the existence of the transaction: If not, the authentication labels are inconsistent; If so, then verify the data digest stored on the chain. Does it match the digest recalculated based on the decrypted information? If so, then the authentication labels are consistent; If not, the authentication labels are inconsistent.
9. A product lifecycle information traceability method based on QR codes, characterized in that, The method is applied to a product lifecycle information traceability system based on QR codes as described in any one of claims 1-8, wherein the method is as follows: S1. The data acquisition module acquires key nodes throughout the product's entire lifecycle and automatically collects process data, environmental data, and operational entity information associated with these key nodes through deployed sensors and automatic identification devices. S2. The data processing module receives, cleans, and integrates the process data, environmental data, and operating entity information associated with the key nodes to generate a unique product identifier, and constructs a structured full lifecycle digital archive through the unique product identifier. S3, the dynamic encryption and traceability generation module, dynamically encrypts and generates real-time QR codes at key nodes in the full lifecycle digital archive. S4. The query and verification module scans the real-time QR code to generate traceability information.