Product authentication tracing method and system based on block chain

By encrypting product authentication information in the blockchain system and generating a unique identification code, using smart contracts to verify traceability information and dynamically adjust path weights, the problems of data incompleteness and inconsistency in the product traceability system are solved, the reliability and transparency of product authentication are achieved, and user trust and data security are enhanced.

CN120725690APending Publication Date: 2025-09-30周琳丽
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510816124.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

In the existing blockchain-based product traceability system, the incompleteness and inconsistency of data uploaded and verified by participants lead to insufficient effectiveness and reliability of the system, and reduce the trust of enterprises and users in the system.

Method used

Product authentication information is encrypted through a hash algorithm to generate a unique identification code. Smart contracts are used to automatically verify traceability information, dynamically adjust path weights, optimize paths based on historical path density and user behavior popularity, and perform hierarchical encryption on sensitive information to generate a visual traceability path map.

Benefits of technology

It achieves tamper-proof and traceability of authentication data, improves the automation and credibility of the traceability process, enhances product transparency and brand credibility, ensures corporate data privacy and security, and provides intuitive full-process product tracking information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120725690A_ABST
    Figure CN120725690A_ABST
Patent Text Reader

Abstract

The invention relates to the field of product authentication and traceability, and discloses a block chain-based product authentication and traceability method and system, and the method comprises the steps: obtaining the authentication information of a product, carrying out the encryption processing of data through a Hash algorithm, and uploading the processed authentication information to a block chain system; based on the product identification code, calling an intelligent contract deployed in a block chain network, and performing automatic verification on the traceability information uploaded by each participation node in the product circulation link; collecting traceability information corresponding to the product identification code, and uploading the traceability information to a block chain system in sequence; based on the tracing information, dividing information bound with the product identification code into common information and sensitive information, performing encryption processing on the sensitive information according to an authority strategy, and generating a hierarchical access data representation structure; and based on the encrypted data representation structure, generating a visual traceability path diagram of the product in combination with each time node and the product circulation path. The method has the advantage of improving the traceability of the authentication information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of product authentication and tracing, and specifically to a blockchain-based product authentication and tracing method and system. Background Art

[0002] In a product traceability system, ensuring the active participation of businesses and users at all stages, and compliant data upload and verification, is crucial for effective traceability. However, existing blockchain-based traceability systems still face issues with incomplete and inconsistent data upload and verification by participants. While the decentralized nature of blockchain ensures data transparency and immutability, it also requires a high level of cooperation and compliance among all participants. In practice, the level of participation and willingness of businesses and users to upload data are often influenced by various factors, including technical barriers, cost pressures, profit drivers, and privacy protection. Participants may struggle to accurately upload and verify product data due to a lack of adequate technical support or training, or fail to update information on time due to cost constraints. Some businesses may also have concerns about the transparency of the system, fearing that exposing their sensitive data to a public blockchain could undermine trust in the system. Therefore, it is necessary to design blockchain-based product authentication and traceability methods and systems that enhance the traceability of authentication information. Summary of the Invention

[0003] (1) Technical Problems Solved In response to the shortcomings of the existing technology, the present invention provides a product authentication and traceability method and system based on blockchain, which has the advantages of ensuring the effectiveness and reliability of the product traceability system and solves the problems in the above-mentioned background technology.

[0004] (2) Technical solution To achieve the above-mentioned purpose of ensuring the effectiveness and reliability of the product traceability system, the present invention provides the following technical solution: a blockchain-based product authentication and traceability method, comprising the following steps: Obtain product authentication information, encrypt the data using a hash algorithm, and upload the processed authentication information to the blockchain system to generate an on-chain record. Generate and bind a unique product identification code for each product; Based on the product identification code, the smart contract deployed in the blockchain network is called to automatically verify the traceability information uploaded by each participating node in the product circulation link. The smart contract assigns a path weight to each node and dynamically adjusts the weight distribution of the traceability path; Collect traceability information corresponding to product identification codes and upload them to the blockchain system in sequence. Combined with the node density of the historical path graph and the popularity of user behavior, the path nodes are automatically aggregated and split. Based on the traceability information, the information bound to the product identification code is divided into general information and sensitive information. The sensitive information is encrypted according to the permission policy to generate a data representation structure with hierarchical access. Based on the encrypted data representation structure, combined with each time node and product flow path, a visual traceability path diagram of the product is generated.

[0005] Preferably, the process of encrypting data using a hash algorithm is as follows: The prepared data is input into the hash algorithm, which calculates the original data and converts it into a unique, fixed-length hash value. The generated hash value is uploaded to the blockchain system. The user enters the product identification code to access the hash value in the blockchain, verify whether the data has been tampered with, re-hash the original data, and compare the hash values ​​to see if they are consistent. If the hash values ​​are consistent, it means the data has not been tampered with; If the hash values ​​are inconsistent, it means that the data has been tampered with.

[0006] Preferably, the process of dynamically adjusting the weight distribution of the tracing path is: In the product circulation process, each participating node uploads traceability information related to the product in sequence. The smart contract evaluates the performance of each node in real time based on the information behavior uploaded by the node. Based on the evaluation performance, the smart contract assigns an initial path weight to each node. The path weight is determined by whether the node uploads information in a timely manner.

[0007] Preferably, the process of determining whether the node uploads information in a timely manner is: Whenever a participating node uploads traceability information, the upload timestamp of the information is automatically recorded. An upload time limit is set for each link based on business needs. Each time data is uploaded, it is compared with the current time to determine how much time has passed since the upload timestamp. If the time difference is greater than the preset upload time limit, the information is considered to be uploaded untimely; If the time difference is less than or equal to the preset upload time limit, the information is considered to be uploaded in time.

[0008] Preferably, the process of automatically aggregating and splitting path nodes is as follows: The blockchain records the historical data of all path nodes, calculates the node density by counting the historical frequency of the nodes, and determines whether to aggregate the nodes based on the node density and user behavior popularity. If the density or user popularity of the nodes is greater than the threshold, these nodes are merged into an aggregation node; If the density or user popularity of a node is less than or equal to a threshold, these nodes are split into multiple child nodes.

[0009] Preferably, the process of generating the hierarchical access data representation structure is: Identify sensitive information fields based on preset permission policies and set access permission levels for different categories of sensitive information; encrypt the information using the corresponding encryption algorithm based on the permission level of the sensitive information; and construct a hierarchical access data structure containing access control tags. The data structure is used to support field-level permission control and hierarchical decryption operations.

[0010] Preferably, the process of generating a visual traceability path diagram of a product is: According to each link in the product circulation process, the time node is determined. Each link in the path is associated with a specific time node. Each node and path information will be recorded and associated with the product traceability information. Based on the decrypted information, a visual traceability path map is constructed.

[0011] The blockchain-based product authentication and traceability system includes: Authentication information processing module: collects and processes the initial authentication information of the product and encrypts the authentication information through a hash algorithm; Smart contract verification module: Based on the generated product identification code, it calls the smart contract deployed in the blockchain network to automatically verify the traceability information of each participating node; Path optimization module: collects circulation process information related to product identification codes and uploads it to the chain in chronological order to form a multi-node product circulation path; Hierarchical encryption module: identifies the sensitivity of the collected traceability information, encrypts the sensitive information, and generates a hierarchical access data representation structure; Visual traceability path generation module: combines each time node with the product flow path to generate a visual traceability path diagram for the product.

[0012] (3) Beneficial effects Compared with the existing technology, the present invention provides a product authentication and traceability method and system based on blockchain, which has the following beneficial effects: The present invention achieves tamper-proof and traceability of authentication data by encrypting and uploading product authentication information to the chain and binding it with a unique identifier; based on smart contracts, it automatically verifies traceability data and allocates path weights, thereby improving the automation and credibility of the traceability process; it dynamically optimizes path nodes by combining historical path density and user behavior popularity, enhancing the logical clarity and user experience of the traceability information display; it encrypts and classifies sensitive information through permission strategies, thereby ensuring the privacy and security of enterprise data; and the resulting visual traceability path map can provide end users with intuitive and reliable full-process product tracking information, comprehensively improving product transparency and brand credibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 Schematic diagram of the method of the present invention; Figure 2 It is a structural schematic diagram of the present invention. DETAILED DESCRIPTION

[0014] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only 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 making any creative efforts shall fall within the scope of protection of the present invention. Example

[0015] See also Figure 1 As shown, the blockchain-based product authentication and tracing method according to an embodiment of the present invention includes the following steps: S1: Obtain product authentication information, encrypt the data using a hash algorithm, and upload the processed authentication information to the blockchain system to generate a chain record. Generate and bind a unique product identification code for each product.

[0016] The process of encrypting data using the hash algorithm in S1 is as follows: Collect product-related certification information, including but not limited to the product's production date, batch number, quality inspection results, shipping information, etc. This information can be in various formats such as text, numbers, and images, depending on the required certification dimensions; The SHA-256 algorithm is selected because it has strong security and wide applicability, and the generated hash value is 256 bits; Input the prepared data into the hash algorithm. At this stage, the hash algorithm will calculate the original data and convert it into a unique, fixed-length hash value; A hash algorithm uses a mathematical function to process input data and generate a fixed-length hash value with the following characteristics: Uniqueness: For different input data, the hash value generated by the hash algorithm is unique; Irreversibility: The original data cannot be deduced from the hash value, which is irreversible; Collision protection: The probability of two different input data generating the same hash value is extremely small; The generated hash value is uploaded to the blockchain system along with related information, such as product identification code, manufacturer, etc. In the blockchain, each transaction record contains the hash value of the data and related information, which ensures that the data cannot be tampered with. The hash value is permanently recorded in the blockchain. Each time the data is updated or uploaded, a new hash value is generated to record the entire process of product authentication information. By entering the product identification code, users access the hash value in the blockchain and verify whether the data has been tampered with. They only need to re-hash the original data and compare whether the hash values ​​are consistent. If they are consistent, it means that the data has not been tampered with; if they are inconsistent, it means that the data has been tampered with.

[0017] The process of generating and binding a unique product identification code for each product in S1 is as follows: After product authentication information is processed, a unique product identification code must be generated for each product. This code is typically an algorithmically generated string that uniquely identifies each product. This code can be generated by combining elements such as a UUID, timestamp, batch number, and serial number to ensure a unique identifier for each product. For example, combining the product's production date, batch number, and production line information to generate the code: P20250410-BATCH12345-001.

[0018] S2: Based on the product identification code, the smart contract deployed in the blockchain network is called to automatically verify the traceability information uploaded by each participating node in the product circulation link. The smart contract assigns a path weight to each node and dynamically adjusts the weight distribution of the traceability path.

[0019] The process of automatically verifying the traceability information uploaded by each participating node in the product circulation link in S2 is as follows: Each product is bound to a unique product identification code after it is produced. During the product circulation process, nodes involved in each link need to upload relevant traceability information. When submitting traceability information, each participating node will first use the product identification code as an index and initiate a request to the smart contract through the blockchain network, passing the traceability data that needs to be verified and the corresponding product identification code; Smart contracts are deployed on the blockchain and can accept data requests submitted by nodes and verify them according to pre-set rules. After receiving the node request, the smart contract will query the relevant data records already existing in the blockchain based on the passed product identification code, such as on-chain records and historical traceability information; The smart contract will automatically verify the submitted data according to the set verification rules. The verification rules include: Completeness check: Ensures that the submitted data contains all required information fields.

[0020] Timeliness check: Verify whether the data upload time is consistent with the reasonable time range of the product circulation process, for example, whether the transportation information is uploaded within a reasonable time limit.

[0021] Compliance verification: Ensure that the uploaded data meets pre-set compliance requirements, for example, whether the product's quality certificate exists, whether the shipping information complies with regulations, etc.

[0022] The process of dynamically adjusting the weight distribution of the tracing path in S2 is as follows: In the product circulation process, each participating node uploads the traceability information related to the product in sequence; Smart contracts evaluate the performance of each node in real time based on the information uploaded by the node. Evaluation indicators include but are not limited to: Upload frequency: whether the node uploads traceability information on time.

[0023] Data compliance: Whether the uploaded traceability information complies with pre-set standards and regulations, such as whether the data format is correct and the content is complete.

[0024] Timeliness: Whether the node completes information upload within the specified time.

[0025] Behavior history: How the node has behaved in the past and whether there is a history of non-compliance.

[0026] Based on this performance evaluation, the smart contract assigns an initial path weight to each node. Weights are typically assigned based on node performance: nodes with high frequency and high compliance receive higher path weights because they adhere to the rules and upload valid information on time; nodes with low compliance and low timeliness receive lower path weights and may face penalties.

[0027] The initial weight distribution is defined by a set of rules. For example, nodes that upload data on time and meet compliance requirements receive 100% of the path weight, while nodes that upload data late or provide substandard data may receive 80% or less weight. The process of judging whether the information uploaded by the node is timely is as follows: Whenever a participating node uploads traceability information, the upload timestamp of the information is automatically recorded. The timestamp includes the specific time of the upload operation. An upload time limit is set for each link based on business needs. For example, information for a certain link should be uploaded within a certain time, such as 24 hours. The upload time limit varies based on the node type, product type, or process link. Each time data is uploaded, it is compared with the current time to determine how much time has passed since the upload timestamp. The calculation formula is: time difference = current time - upload timestamp. If the time difference is greater than the preset upload time limit, the information is considered to have been uploaded untimely. If the time difference is less than or equal to the preset upload time limit, the information is considered to have been uploaded in time. Based on this judgment, it is determined whether the information is compliant and meets the system's time requirements.

[0028] Smart contracts dynamically adjust the node's path weight based on real-time data feedback. For example, if a node consistently uploads compliant data on time, the smart contract will gradually increase the node's path weight. Conversely, if the node repeatedly violates regulations, the weight will be reduced. Dynamic adjustment logic: The smart contract dynamically adjusts node weights based on the following rules: Positive incentives: Nodes that frequently upload data on time and maintain compliance are rewarded, increasing their path weight. For example, if a node uploads compliant data on time three times in a row, its path weight may increase by 10%.

[0029] Negative penalties: Nodes that upload information late or in violation of regulations will be penalized by reducing the path weight. If a node uploads non-compliant data twice, the smart contract may reduce the path weight by 20%.

[0030] Weight adjustment cycle: Smart contracts can set weight adjustment cycles. For example, every month or after each production cycle, the smart contract will automatically evaluate and adjust the path weights of all nodes.

[0031] The path weights of all nodes are combined to form a complete product traceability path. In the traceability chain diagram, each node's weight influences its importance in the path diagram. Nodes with higher weights are prioritized in the path diagram, indicating greater information credibility. Smart contracts dynamically adjust the position of nodes in the traceability path based on their weights. For example, in historical records, nodes with higher weights may be displayed first, indicating their critical role in product traceability.

[0032] The technical solution of this embodiment is as follows: Based on the product identification code, the system invokes a smart contract deployed in the blockchain network to automatically verify the traceability information uploaded by each participating node during the product circulation process. The smart contract assigns an initial path weight to each node based on the frequency, compliance, and timeliness of the node's uploaded data, and dynamically adjusts the weight distribution of the traceability path based on the node's performance. The more timely and accurate the information uploaded by the node, the higher the path weight; vice versa. In this way, the smart contract ensures that the product traceability path consistently reflects the trustworthiness and performance of each node, thereby enhancing the transparency and reliability of the entire supply chain process. Through the smart contract's automatic verification and weight allocation, the traceability information provided by each node is guaranteed to be compliant, accurate, and timely, improving the transparency of the system. The dynamic adjustment of path weights enables the system to reflect the latest performance of each node in real time, improving the real-time and effectiveness of the product traceability path. The smart contract's incentive and penalty mechanisms encourage nodes to comply with the rules, improving the overall efficiency of the system and the enthusiasm of all participants. Automated verification and dynamic weight adjustment reduce the need for manual intervention, reduce the probability of errors, and enhance the availability and accuracy of the traceability system. Example

[0033] like Figure 1 As shown, the blockchain-based product authentication and traceability method also includes the following steps: S3: Collect the traceability information corresponding to the product identification code and upload it to the blockchain system in sequence. Combined with the node density of the historical path graph and the popularity of user behavior, the path nodes are automatically aggregated and split.

[0034] The process of automatically aggregating and splitting path nodes in S3 is as follows: The blockchain records the historical data of all path nodes, including the upload time, location, participants, and path density of each node. The historical path diagram shows the entire flow of products from production to end users, including the status, interaction, and time series of each node. Node density refers to the frequency of a particular node appearing within a certain time or space. A node with a higher density may mean that the node is more important in the product distribution process or appears more frequently. The system calculates the node density by counting the historical frequency of the node. The formula is: Where, is the density of node n, which indicates the activity or importance of the node. The higher the density, the more active or important the node is in the circulation process. is the number of occurrences of node n in a certain time window. T is the length of the time window. For example, if the update frequency of a certain link or a certain node is high within a certain time period, the density of the node is considered to be large. User behavior popularity refers to the degree of user attention to a node or path. It is usually measured by the user's access frequency, interactive behavior, query number, etc. The system calculates the node popularity based on user behavior data. If the traceability information of a node is frequently viewed or queried by users, it indicates that the node is highly popular. Based on node density and user behavior popularity, a threshold is set to determine whether to aggregate nodes. If the node density or user popularity is greater than the threshold, these nodes are merged into an aggregate node. Aggregating nodes reduces the complexity of the path diagram and helps users understand key circulation nodes more quickly. This simplifies user operations, especially when there is a large amount of information. Aggregation is usually based on similarities between nodes, such as the same geographical location, the same participants, or similar business processes. If the density or user popularity of a node is less than or equal to a threshold, these nodes will be split into multiple sub-nodes to improve the presentation of details. For example, a logistics node can be split into multiple more detailed sub-nodes to display more specific transportation information. The basis for splitting is the time difference, geographical distribution difference or product type difference between nodes. After splitting, users can view the detailed traceability information of each small node more accurately.

[0035] S4: Based on the traceability information, the information bound to the product identification code is divided into general information and sensitive information, the sensitive information is encrypted according to the permission policy, and a data representation structure with hierarchical access is generated.

[0036] The process of generating the data representation structure for hierarchical access in S4 is as follows: For sensitive information, use symmetric or asymmetric encryption algorithms to encrypt. When choosing an encryption algorithm, you need to consider the balance between performance and security. When encrypting, the key should be held by the appropriate user role. For asymmetric encryption, the public key is used for encryption and the private key is decrypted by the authorized user. For symmetric encryption, the key is only held by the authorized user. In the processed data, different access levels are assigned to general information and sensitive information, and sensitive data is encrypted; The resulting hierarchical access data structure takes a form similar to the following: General information: stored directly and accessible to all users.

[0037] Encrypted information: Sensitive information is stored in encrypted form, and only users with corresponding access rights are allowed to decrypt and access it.

[0038] The data representation structure consists of the following parts: Data field: Contains all relevant data items for product traceability, such as product name, manufacturer, production date, transportation records, etc.

[0039] Encryption flag: Each sensitive information field has an encryption flag, indicating whether it is encrypted and what permissions are required for decryption.

[0040] Access control identification: Set access control levels for each data field, such as "Public", "Enterprise Private", and "Confidential", and associate them with user roles.

[0041] Traceability information includes general information and sensitive information. Sensitive information is identified and classified based on preset permission policies, and the corresponding access rights levels for various sensitive fields are determined. Sensitive information is encrypted using corresponding encryption algorithms, including but not limited to symmetric encryption, asymmetric encryption, or hash encryption, and a hierarchical access data representation structure is constructed in combination with access control metadata. The structure supports the embedding of field-level permission tags, allowing different visitors to access only field content within the corresponding permission level based on their business role or system permissions. This enables controllable sharing and trusted verification of blockchain traceability data while ensuring the security of sensitive information.

[0042] S5: Based on the encrypted data representation structure, combined with each time node and the product flow path, a visual traceability path diagram of the product is generated.

[0043] The process of generating a visual traceability path diagram of the product by combining each time node with the product flow path in S5 is as follows: Time nodes are determined for each link in the product flow process. These time nodes include: production start / end time, warehousing and transportation time, distributor receipt time, and sales time. From the original production site of the product to the final consumer, including intermediate logistics warehousing and distributors, each link in the path is associated with a specific time node. Each node and path information will be recorded and linked to the product traceability information. Based on the decrypted information, the system will construct a visual traceability path diagram. The path diagram contains the timestamp, location, and participant information of each link. The nodes represent the key links in the product flow, such as manufacturers, warehouses, and distributors, and the path shows the flow of products from one link to the next. Path map elements include: Node: Represented as a node in the diagram, the node displays relevant information such as link name, participant information, operation time, etc.

[0044] Path: The connecting lines between nodes represent the flow of products from one link to another. The path can be marked with the time or process identification of the flow.

[0045] Information layering: Different layers are set in the path map based on the sensitivity and access rights of the information. Public information is displayed on the outermost layer of the map, while sensitive information is hidden in areas that require authorization.

[0046] Interactive display: The product traceability path diagram is designed to be interactive. Users can view detailed certification information and specific details of the product circulation process by clicking on different nodes and paths.

[0047] As the product's circulation progresses, new traceability information is continuously uploaded to the blockchain. The system automatically updates the traceability path map based on this newly uploaded information. Whenever a product reaches a new flow node, the paths and nodes in the map are dynamically added or updated. Based on the node density of the historical path map and the popularity of user behavior, the system can dynamically adjust the path map's display format. For example, nodes with high circulation volume on the path can be highlighted, and path nodes that users are most interested in will be displayed first. Example

[0048] See also Figure 2 As shown, the blockchain-based product authentication and traceability system according to an embodiment of the present invention includes: Authentication information processing module: collects and processes the initial authentication information of the product and encrypts the authentication information through a hash algorithm; Smart contract verification module: Based on the generated product identification code, it calls the smart contract deployed in the blockchain network to automatically verify the traceability information of each participating node; Path optimization module: collects circulation process information related to product identification codes and uploads it to the chain in chronological order to form a multi-node product circulation path; Hierarchical encryption module: identifies the sensitivity of the collected traceability information, encrypts the sensitive information, and generates a hierarchical access data representation structure; Visual traceability path generation module: combines each time node with the product flow path to generate a visual traceability path diagram for the product.

[0049] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.

[0050] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. The product authentication and traceability method based on blockchain is characterized by: The following steps are involved: Obtain product authentication information, encrypt the data using a hash algorithm, and upload the processed authentication information to the blockchain system to generate an on-chain record. Generate and bind a unique product identification code for each product; Based on the product identification code, the smart contract deployed in the blockchain network is called to automatically verify the traceability information uploaded by each participating node in the product circulation link. The smart contract assigns a path weight to each node and dynamically adjusts the weight distribution of the traceability path; Collect traceability information corresponding to product identification codes and upload them to the blockchain system in sequence. Combined with the node density of the historical path graph and the popularity of user behavior, the path nodes are automatically aggregated and split. Based on the traceability information, the information bound to the product identification code is divided into general information and sensitive information. The sensitive information is encrypted according to the permission policy to generate a data representation structure with hierarchical access. Based on the encrypted data representation structure, combined with each time node and product flow path, a visual traceability path diagram of the product is generated.

2. The product authentication and tracing method based on blockchain according to claim 1 is characterized in that: The process of encrypting data using a hash algorithm is as follows: The prepared data is input into the hash algorithm, which calculates the original data and converts it into a unique, fixed-length hash value. The generated hash value is uploaded to the blockchain system. The user enters the product identification code to access the hash value in the blockchain, verify whether the data has been tampered with, re-hash the original data, and compare the hash values ​​to see if they are consistent. If the hash values ​​are consistent, it means the data has not been tampered with; If the hash values ​​are inconsistent, it means that the data has been tampered with.

3. The product authentication and tracing method based on blockchain according to claim 1 is characterized in that: The process of dynamically adjusting the weight distribution of the traceability path is as follows: In the product circulation process, each participating node uploads traceability information related to the product in sequence. The smart contract evaluates the performance of each node in real time based on the information behavior uploaded by the node. Based on the evaluation performance, the smart contract assigns an initial path weight to each node. The path weight is determined by whether the node uploads information in a timely manner.

4. The product authentication and tracing method based on blockchain according to claim 1 is characterized in that: The process of judging whether the node uploads information in a timely manner is as follows: Whenever a participating node uploads traceability information, the upload timestamp of the information is automatically recorded. An upload time limit is set for each link based on business needs. Each time data is uploaded, it is compared with the current time to determine how much time has passed since the upload timestamp. If the time difference is greater than the preset upload time limit, the information is considered to be uploaded untimely; If the time difference is less than or equal to the preset upload time limit, the information is considered to be uploaded in time.

5. The product authentication and tracing method based on blockchain according to claim 1 is characterized in that: The process of automatically aggregating and splitting path nodes is as follows: The blockchain records the historical data of all path nodes, calculates the node density by counting the historical frequency of the nodes, and determines whether to aggregate the nodes based on the node density and user behavior popularity. If the density or user popularity of the nodes is greater than the threshold, these nodes are merged into an aggregation node; If the density or user popularity of a node is less than or equal to a threshold, these nodes are split into multiple child nodes.

6. The product authentication and tracing method based on blockchain according to claim 1 is characterized in that: The process of generating a hierarchical access data representation structure is: Identify sensitive information fields based on preset permission policies and set access permission levels for different categories of sensitive information; encrypt the information using the corresponding encryption algorithm based on the permission level of the sensitive information; and construct a hierarchical access data structure containing access control tags to support field-level permission control and hierarchical decryption operations.

7. The product authentication and tracing method based on blockchain according to claim 1 is characterized in that: The process of generating a visual traceability path diagram for a product is as follows: According to each link in the product circulation process, the time node is determined. Each link in the path is associated with a specific time node. Each node and path information will be recorded and associated with the product traceability information. Based on the decrypted information, a visual traceability path map is constructed.

8. A blockchain-based product authentication and traceability system, applied to the method according to claims 1-6, characterized in that: include: Authentication information processing module: collects and processes the initial authentication information of the product and encrypts the authentication information through a hash algorithm; Smart contract verification module: Based on the generated product identification code, it calls the smart contract deployed in the blockchain network to automatically verify the traceability information of each participating node; Path optimization module: collects circulation process information related to product identification codes and uploads it to the chain in chronological order to form a multi-node product circulation path; Hierarchical encryption module: identifies the sensitivity of the collected traceability information, encrypts the sensitive information, and generates a hierarchical access data representation structure; Visual traceability path generation module: combines each time node with the product flow path to generate a visual traceability path diagram for the product.

Citation Information

Cited By

  • Drug supply chain tracing management method and system based on block chain

    CN121836758A

  • Blockchain-based pharmaceutical supply chain traceability management method and system

    CN121836758B