A commodity traceability management method and system based on a consortium chain
Patent Information
- Application Number
- CN202611013616.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-08
- Publication Date
- 2026-10-27
AI Technical Summary
[0004]本申请的目的是提供一种基于联盟链的商品溯源管理方法及系统,用于解决现有技术存在溯源数据易伪造、多主体数据孤岛严重且隐私保护与信息透明,导致溯源链路可信性差、安全性低的技术问题
通过响应商品在生产环节完成赋码,获取商品唯一物理标识,并基于预设的哈希加盐规则计算生成全局唯一的溯源标识,将商品注册信息作为初始存证数据上链存储至联盟链;在所述商品依次经历供应链中多个预设业务流转环节时,采集所述商品在各业务流转环节下产生的状态变更数据,将所述状态变更数据与对应的环节身份信息关联,作为新增的溯源存证数据写入所述联盟链,其中,所述环节身份信息为与各业务流转环节一一对应的预定义环节标识符;根据所述联盟链提供的多参与方权限隔离架构,对请求访问所述联盟链中溯源存证数据的不同参与方进行权限校验,限定各参与方仅能访问授权范围内的溯源存证数据。达到了通过哈希加盐赋码与通道级权限隔离,实现商品全链路状态标签化存证与溯源标识永久锁定,提高了溯源数据的可信性和安全性的技术效果。
Smart Images

Figure CN122989126A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of commodity management technology, specifically to a commodity traceability management method and system based on consortium blockchain. Background Technology
[0002] Current product traceability systems mostly adopt centralized databases or basic blockchain architectures, which generally suffer from multiple defects such as easy forgery of traceability data, data silos among multiple entities in the supply chain, and difficulty in balancing privacy protection and information transparency. This results in insufficient credibility and a low overall security level throughout the traceability chain. Furthermore, centralized traceability platforms are controlled by a single enterprise or third party, allowing enterprises to arbitrarily tamper with production, logistics, and transaction records. They also lack a unified evidence storage and verification mechanism across the entire chain, making it easy for criminals to copy product identifiers and forge circulation information. Simultaneously, the production, warehousing, logistics, and retail entities in the supply chain deploy independent business systems, resulting in inconsistent data standards and a lack of interoperability, creating severe data silos. When tracing quality issues, multiple parties must manually verify the data, leading to numerous information gaps in the traceability chain and reducing its credibility. Overall, these systems fail to meet the traceability requirements for a reliable, secure, and closed-loop management system across the entire supply chain.
[0003] Existing technologies suffer from problems such as easily falsified traceability data, severe data silos among multiple entities, and poor privacy protection and information transparency, resulting in low credibility and security of the traceability chain. Summary of the Invention
[0004] The purpose of this application is to provide a product traceability management method and system based on consortium blockchain, which solves the technical problems of existing technologies, such as easy forgery of traceability data, serious data silos among multiple entities, and poor privacy protection and information transparency, resulting in poor credibility and low security of the traceability link.
[0005] In view of the above problems, this application provides a product traceability management method and system based on consortium blockchain.
[0006] The first aspect of this application provides a product traceability management method based on a consortium blockchain. This method includes: responding to a product completing coding during the production process, obtaining a unique physical identifier for the product, and calculating a globally unique traceability identifier based on a preset hash salting rule; storing the product registration information as initial evidence storage data on the consortium blockchain; collecting state change data generated by the product at each business flow stage as the product sequentially undergoes multiple preset business flow stages in the supply chain, associating the state change data with corresponding stage identity information, and writing it into the consortium blockchain as newly added traceability evidence storage data, wherein the stage identity information is a predefined stage identifier corresponding one-to-one with each business flow stage; and verifying the permissions of different participants requesting access to traceability evidence storage data in the consortium blockchain according to the multi-participant permission isolation architecture provided by the consortium blockchain, limiting each participant to accessing only traceability evidence storage data within its authorized scope.
[0007] Optionally, the system monitors transaction confirmation events occurring on the consortium blockchain. When it is determined that the supply chain process corresponding to the product has reached a preset termination event, the system performs an invalidation operation on the traceability identifier, making the traceability identifier no longer valid in the consortium blockchain.
[0008] Optionally, the product serial number (SN) and detailed attributes at the production coding node are extracted as the original input for hash calculation; a preset salt value for the current supply chain or product type is obtained, wherein the salt value includes one or more of random numbers, timestamps, and organization private keys; a hash algorithm is used to calculate the combination of the original input and the salt value to generate a hash value as a globally unique traceability identifier for the product.
[0009] Optionally, the multiple preset business flow steps include: product registration, product warehousing, product outbound, order creation, order delivery, order receipt, order listing, product transaction, and product cancellation.
[0010] Optionally, during the goods receiving or shipping process, information on changes in warehouse address and operator information can be captured as status change data; during the order creation process, information on the recipient, sender, and delivery list can be captured as status change data; during the order delivery process, information on the delivery person and the sequence of transit addresses can be captured as status change data; during the order signing process, the signing confirmation event and the signatory information can be captured as status change data; during the goods shelving process, information on the sales point address and the shelving time can be captured as status change data; and during the goods transaction process, information on the transaction participants, the transaction time, and the transaction amount can be captured as status change data.
[0011] Optionally, the state change data generated in the current business process, the digital signature of the operator, the trusted timestamp, and the hash of the previous blockchain transaction are packaged to construct a transaction proposal to be submitted; the transaction proposal is verified for consistency by the endorsement nodes in the consortium blockchain; after the consistency verification is passed, the transaction proposal is sorted and packaged by the consensus service and written into the distributed ledger as a transaction in the new block, thus completing the on-chain storage of traceability and evidence storage data.
[0012] Optionally, an independent alliance channel is created for a group of supply chain participants belonging to the same business privacy domain, and identity credentials based on digital certificates are issued to each participant; traceability and evidence storage data of different types of goods or different batches of goods are stored in different alliance channels, so that each alliance channel is isolated from each other; when any participant initiates a data access request for the target traceability and evidence storage data, the organization affiliation information in the participant's identity credentials is extracted, and it is verified whether the organization affiliation information matches the alliance channel where the target traceability and evidence storage data is located; if they match, the participant is allowed to access the target traceability and evidence storage data; if they do not match, the participant is denied access to the target traceability and evidence storage data.
[0013] Optionally, the channel configuration information of the target alliance channel where the target traceability and evidence storage data is located is obtained. The channel configuration information includes a set of certificates of all organizations authorized to join the corresponding channel. The organization certificate in the identity credentials held by the participant is compared with the set of certificates. If the organization certificate exists in the set of certificates, it is determined that the organization to which the participant belongs has been authorized to join the target alliance channel, and the matching is confirmed to be successful. After the matching is successful, the method further includes: determining the access granularity of the participant to the target traceability and evidence storage data according to the role type of the participant. The access granularity includes full data access, process-related data access, and de-identified summary data access.
[0014] Optionally, the logical state of the traceability identifier is marked as cancelled, and the block height and transaction hash corresponding to the invalidation operation are recorded. When the consensus node or verification node in the consortium blockchain receives a new state change write request for any traceability identifier, it first reads the current logical state of the traceability identifier. If the current logical state is cancelled, the consensus node or verification node rejects the new state change write request and returns a prompt message that the traceability identifier has expired. If the current logical state is valid, the state change write process for the traceability identifier continues.
[0015] A second aspect of this application provides a product traceability management system based on a consortium blockchain. The system includes: a traceability identifier generation module, used to respond to product coding during the production process, obtain a unique physical identifier for the product, and calculate a globally unique traceability identifier based on a preset hash salting rule, storing the product registration information as initial evidence data on the consortium blockchain; a data association module, used to collect state change data generated by the product at each preset business flow stage in the supply chain, associate the state change data with the corresponding stage identity information, and write it as new traceability evidence data into the consortium blockchain, wherein the stage identity information is a predefined stage identifier corresponding one-to-one with each business flow stage; and a permission verification module, used to perform permission verification on different participants requesting access to traceability evidence data in the consortium blockchain according to the multi-participant permission isolation architecture provided by the consortium blockchain, limiting each participant to access only traceability evidence data within the authorized scope.
[0016] One or more technical solutions provided in this application have at least the following technical effects or advantages: By responding to the product's coding during the production process, a unique physical identifier is obtained for the product. A globally unique traceability identifier is then calculated based on a preset hash salting rule. The product registration information is stored on the consortium blockchain as initial evidence. As the product sequentially undergoes multiple preset business flow stages in the supply chain, status change data generated at each stage is collected. This status change data is associated with the corresponding stage identity information and written into the consortium blockchain as new traceability evidence. The stage identity information consists of predefined stage identifiers that correspond one-to-one with each business flow stage. Based on the multi-participant permission isolation architecture provided by the consortium blockchain, permission verification is performed on different participants requesting access to the traceability evidence data in the consortium blockchain, limiting each participant to accessing only the traceability evidence data within their authorized scope. This achieves the technical effect of permanently locking the traceability identifier and enabling end-to-end status tagging of products through hash salting coding and channel-level permission isolation, thereby improving the reliability and security of traceability data.
[0017] The above description is merely an overview of the technical solution of this application. To better understand the technical means of this application and to facilitate its implementation according to the description, and to make the above and other objects, features, and advantages of this application more apparent, specific embodiments of this application are described below. It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent through the following description. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating a product traceability management method based on consortium blockchain, which is provided for this application.
[0020] Figure 2 This is a schematic diagram of a product traceability management system based on a consortium blockchain, which is provided for this application.
[0021] Explanation of the attached diagram labels: Traceability identifier generation module 11, data association module 12, and permission verification module 13. Detailed Implementation
[0022] This application provides a product traceability management method and system based on consortium blockchain, addressing the technical problems of existing technologies such as easily forged traceability data, severe data silos among multiple entities, and poor privacy protection and information transparency, leading to low credibility and security in the traceability chain. It achieves the technical effect of improving the credibility and security of traceability data by using hash salting and channel-level permission isolation to realize the full-chain status labeling and permanent locking of traceability identifiers.
[0023] The technical solutions of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. It should be understood that the present invention is not limited to the exemplary embodiments described herein. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention. It should also be noted that, for ease of description, only the parts related to the present invention are shown in the accompanying drawings, not all of them.
[0024] Example 1, as Figure 1 As shown, this application provides a product traceability management method based on consortium blockchain, which includes: The system responds by assigning codes to products during the production process, obtaining a unique physical identifier for each product, and calculating a globally unique traceability identifier based on preset hash salting rules. The product registration information is then stored on the consortium blockchain as initial evidence.
[0025] Furthermore, a globally unique traceability identifier is generated based on a preset hash salting rule, including: extracting the product serial number (SN) and details attributes at the production coding node as the original input for hash calculation; obtaining a preset salt value for the current supply chain or product type, wherein the salt value includes one or more of a random number, a timestamp, and an organization's private key; and using a hash algorithm to calculate the combination of the original input and the salt value to generate a hash value as the globally unique traceability identifier for the product.
[0026] Specifically, coding refers to attaching physical identifiers, such as production date, expiration date, and product serial number (SN), to the outer packaging or the product itself, using forms like QR codes, RFID tags, or plain text. The SN is a unique serial number assigned by the manufacturer within a production batch. After coding is completed during the production process, coding equipment at the production end, such as industrial barcode scanners, RFID readers, or manual input interfaces, collects the unique physical identifier of the product. This unique physical identifier includes at least the product serial number (SN) and may also include detailed attributes directly related to the product's identity, such as production date, expiration date, batch number, or product specifications, forming the basic identity description set of the product. Then, the unique physical identifier of the product is processed by concatenating the product serial number (SN) and its corresponding detailed attributes at the coding node during production according to a preset field order, forming the raw input data for hash calculation.
[0027] Based on the supply chain network or product type to which the current product belongs, a corresponding preset salt value is obtained from a pre-configured security parameter library. The salt value is a randomly or semi-randomly generated data string used to enhance the randomness and collision resistance of the hash result. The salt value includes one or more of the following: a random number, a timestamp of the current operation, and an organization's private key. The random number is a random string output by a random number generator, and the organization's private key is a fixed-length hash value derived from the organization's private key belonging to the current supply chain management party using a derivation algorithm. After obtaining the original input data and the salt value, they are combined according to preset concatenation rules, for example, generating a string to be calculated using the format: original input data + separator + salt value. This string is then input into a preset hash algorithm for calculation. The hash algorithm is SHA-256, SM3, or other collision-resistant cryptographic hash functions, thereby generating a unique hash value. This hash value serves as the globally unique traceability identifier for the product within the consortium blockchain system.
[0028] After generating a globally unique traceability identifier, the product registration information is encapsulated into initial evidence storage data. This product registration information includes at least the product's basic attributes, production information, coding time, and the globally unique traceability identifier, and is submitted to the consortium blockchain via a consortium blockchain client. After verification by endorsing nodes and confirmation by the consensus mechanism, this initial evidence storage data is written into the consortium blockchain's distributed ledger, forming the first blockchain record of the product traceability chain.
[0029] For example, dairy manufacturer A fills a batch of pure milk on its production line. Each carton of milk has a unique physical identifier printed on its outer packaging, containing: "Production Date: 2025-06-17, Expiry Date: 2025-09-17, SN Code: SN-MILK-8876". The unique physical identifier is read by a barcode scanner on the production line, parsed to obtain the original input, and the current timestamp is concatenated with a random number generated by a random number generator to form a composite salt value. The original input and the composite salt value are then concatenated to obtain a string to be hashed, and the SHA-256 algorithm is used to hash this string, obtaining a 256-bit hash value, which serves as the globally unique traceability identifier for the product. This globally unique traceability identifier is integrated with the product's registration information to form initial evidence data and stored on the consortium blockchain. When the milk carton is subsequently shipped, delivered, and put on the shelves for sale, a globally unique traceability identifier is used as an index identifier. Data from each stage is continuously added to its name to form a complete and reliable digital traceability trajectory. At any time, consumers can scan the QR code on the carton to query the entire chain information of the milk from production to sales through the consortium blockchain using this unique identifier.
[0030] By combining the physical identifier of a product with a cryptographic hash algorithm and a dynamic salt value, each product is assigned a globally unique traceability identifier on the blockchain that is unpredictable, non-repeatable, and difficult to forge. This provides a unified indexing basis for the subsequent on-chaining of status data for each link in the supply chain, and ensures that traceability records between different products will not be confused or collide. At the same time, it provides a deterministic anchor point for the subsequent addition of status data to each link in the supply chain.
[0031] As the product sequentially goes through multiple preset business flow stages in the supply chain, the status change data generated by the product in each business flow stage is collected. The status change data is associated with the corresponding stage identity information and written into the consortium blockchain as newly added traceability and evidence storage data. The stage identity information is a predefined stage identifier that corresponds one-to-one with each business flow stage.
[0032] Furthermore, the multiple preset business flow steps include: product registration, product warehousing, product outbound, order creation, order delivery, order receipt, order listing, product transaction, and product cancellation.
[0033] Furthermore, the system collects status change data for the goods at each stage of the business process, including: capturing warehouse address change information and operator information as status change data during the goods warehousing or outbound process; capturing consignee information, consignor information, and delivery goods list as status change data during the order creation process; capturing delivery personnel information and transit address sequence as status change data during the order delivery process; capturing the signature confirmation event and signatory information as status change data during the order signing process; capturing sales point address information and listing time as status change data during the goods shelving process; and capturing transaction participant information, transaction time, and transaction amount as status change data during the goods transaction process.
[0034] Specifically, the supply chain includes multiple pre-defined business flow stages: product registration, product warehousing, product outbound, order creation, order delivery, order receipt, order confirmation, product shelving, product transaction, and product cancellation. As a product sequentially passes through these stages, its globally unique traceability identifier is used as an index to continuously and automatically collect dynamic status change data generated at each stage. Specifically, during the product warehousing or outbound stage, when warehouse operators complete the warehousing confirmation or outbound shipment operation using a handheld terminal or barcode scanner, the warehouse address change information and operator information are obtained as status change data. The warehouse address change information records the target warehouse code and location address upon warehousing, and the source warehouse code and shipping location upon outbound. The operator information includes the operator's employee number, name, or digital identity identifier, used to record the changes in the product's physical storage location and the responsible person.
[0035] During the order creation phase, when a consumer places an order on an e-commerce platform or at a physical store, the system retrieves recipient information, sender information, and a list of delivered goods as status change data. Recipient information includes the recipient's name, contact number, and detailed delivery address. Sender information includes the name and code of the seller or shipping warehouse. The list of delivered goods includes each item in the order, its corresponding traceability identifier, and quantity, used to associate the goods with the specific sales order. During the order delivery phase, once the carrier's delivery person accepts the order and begins actual delivery, the system retrieves delivery person information and a sequence of transit addresses as status change data in real time, using location information uploaded by the logistics vehicle's GPS terminal or the delivery person's mobile app. Delivery person information includes the delivery person's name, employee ID, or digital identity. The sequence of transit addresses refers to a series of geographical coordinates or structured address lists from the shipping warehouse, passing through various distribution centers and transit stations until reaching the target city, used to record the complete logistics trajectory of the goods during transportation. During the order confirmation process, when the delivery person delivers the goods to the recipient and completes the confirmation, the confirmation event and the recipient's information are captured as status change data. The confirmation event includes the signing time and signing method, such as personal signing, signing on behalf of someone, or signing at a delivery station. The recipient's information is the recipient's name or an anonymous identifier. During the product shelving process, when products are moved from the temporary storage area to the sales shelf for consumers to choose from, the sales point address information, i.e., the store code or specific shelf number and the shelving time, is captured to record the product's terminal display location, facilitating accurate recall or near-expiration management in subsequent offline scenarios. During the product transaction process, when the consumer completes payment at the sales terminal, the transaction participant information, transaction time, and transaction amount are captured as status change data. The transaction participant information includes the merchant codes of both the buyer and seller and the anonymous identifier of the consumer.
[0036] By collecting real-time data on changes in the status of goods at each stage of the business process, the timeliness, accuracy, and completeness of traceability information are ensured.
[0037] Furthermore, the state change data is associated with the corresponding link identity information and written into the consortium blockchain as new traceability and evidence storage data. This includes: packaging the state change data generated in the current business link, the operator's digital signature, trusted timestamp, and the previous blockchain transaction hash to construct a transaction proposal to be submitted; verifying the consistency of the transaction proposal through the endorsement nodes in the consortium blockchain; and after passing the consistency verification, sorting and packaging the transaction proposal through the consensus service and writing it into the distributed ledger as a transaction in a new block, thus completing the on-chain storage of traceability and evidence storage data.
[0038] Specifically, after goods flow to any preset business flow stage, the system obtains the status change data generated in the current business stage. Simultaneously, it obtains the digital signature of the initiating company or operator of this operation. This digital signature, generated by encryption using the operator's local private key, uniquely identifies the operating entity and prevents third parties from forging business submission requests. The system obtains the current precise time from a trusted time source, such as an NTP server synchronized by the National Time Service Center or the timestamp service built into the blockchain network, generates a trusted timestamp, and packages the status change data generated in the current business stage, the operator's digital signature, the trusted timestamp, and the hash of the previous blockchain transaction according to a standard serialization format such as a protocol buffer or JSON, forming a transaction proposal to be submitted. The hash of the previous blockchain transaction is the block header hash value of the latest known block in the consortium blockchain. By chaining the current transaction to be submitted with the hash value of the previous block, any tampering with historical data will cause a chain reaction of changes in the hash values of all subsequent blocks, thus ensuring the irreversibility of the ledger data.
[0039] Consistency verification of transaction proposals is achieved through endorsement nodes in the consortium blockchain. Endorsement nodes are special nodes in the consortium blockchain network that are granted the authority to simulate execution and verification. They are deployed by different organizations, such as suppliers, logistics providers, retailers, consumers, and regulators, to form a multi-party joint verification mechanism. Upon receiving a transaction proposal, the endorsing nodes execute a multi-dimensional verification process in parallel. This includes at least verifying the digital signature using the submitter's public key, confirming that the signature was signed by the legitimate operator's private key and that the data has not been tampered with, verifying that the submitter's organization has been authorized to perform read and write operations in the current consortium channel, and confirming that the hash of the previous blockchain transaction referenced by the submitter does indeed correspond to the latest block in the current world state. Once all the above verifications are passed, each endorsing node digitally signs the transaction proposal and submits the verified transaction proposal to the consortium blockchain consensus service. The consensus service then sorts and packages the transaction proposals to be uploaded to the blockchain to generate a new block. Finally, the complete proposal, containing the state change data, signature, timestamp, and previous hash of the current binding link, is written as an independent transaction within the new block into the consortium blockchain distributed ledger. This completes the on-chain storage of traceability and evidence storage data for the current business link. Furthermore, the link identity information is a predefined link identifier that corresponds one-to-one with each business flow link, allowing for quick filtering of corresponding link business data during subsequent traceability queries.
[0040] By standardizing the data uploading process at each stage, using stage identifiers to distinguish various circulation records, and combining digital signatures, timestamps, and pre-hash verification to confirm the authenticity and validity of the data, multi-layered verification within the chain prevents data fraud, and connects the complete circulation records of goods, it provides a reliable data foundation for traceability, access control, and failure interception.
[0041] Based on the multi-participant permission isolation architecture provided by the consortium blockchain, permission verification is performed on different participants requesting access to traceability and evidence storage data in the consortium blockchain, limiting each participant to accessing only traceability and evidence storage data within the authorized scope.
[0042] Furthermore, based on the multi-participant permission isolation architecture provided by the consortium blockchain, permission verification is performed on different participants requesting access to traceability and evidence storage data in the consortium blockchain. This includes: creating independent consortium channels for a group of supply chain participants belonging to the same business privacy domain, and issuing identity credentials based on digital certificates to each participant; storing traceability and evidence storage data for different types of goods or different batches of goods in different consortium channels, thus isolating each consortium channel from the others; when any participant initiates a data access request for the target traceability and evidence storage data, extracting the organization affiliation information from the participant's identity credentials, and verifying whether the organization affiliation information matches the consortium channel where the target traceability and evidence storage data is located; if they match, allowing the participant to access the target traceability and evidence storage data; if they do not match, denying the participant access to the target traceability and evidence storage data.
[0043] Specifically, business privacy domains are defined based on supply chain business privacy boundaries. Upstream and downstream participants with interoperable business relationships and data sharing capabilities, such as fixed-cooperation manufacturers, distributors, logistics companies, and end-user merchants, are grouped into the same business privacy domain. A dedicated consortium blockchain channel is created for each independent privacy domain. Simultaneously, a unique digital certificate identity credential is issued to all supply chain participants. This digital certificate identity credential permanently stores the participant's organization name, institution code, business affiliation, and other core organizational information, serving as the sole basis for on-chain identity verification. Then, all on-chain product traceability and evidence storage data is partitioned and managed, categorized by product type and production batch. Product traceability data from different categories and batches are stored in independent consortium channels, with each channel physically isolated and unconnected to others, eliminating the risk of cross-domain data leakage at the storage level.
[0044] When any supply chain participant initiates an access request for traceability and evidence storage data of a target product, the organization affiliation information in the participant's digital certificate is automatically extracted. The permission configuration of the alliance channel to which the target traceability data belongs is accurately matched and verified. The data access request is only allowed if the requester's organization affiliation information has been authorized and included by the target channel. If the requester does not belong to the authorized organization of the target channel, the access request is directly blocked, strictly ensuring that each participant can only view traceability data within its own authorized scope.
[0045] By using a consortium blockchain with a multi-channel isolation architecture, the drawbacks of traditional fully public traceability data are avoided. Data is partitioned and isolated according to business privacy domains and product dimensions. Digital certificates are used to accurately verify the identities of participants and precisely control the data access scope of each entity, effectively protecting the business privacy of enterprises. While ensuring collaborative traceability of data from multiple parties in the supply chain, the risks of unauthorized data access across entities and domains are avoided.
[0046] Further, verifying whether the organization affiliation information matches the alliance channel where the target traceability and evidence storage data is located includes: obtaining the channel configuration information of the target alliance channel where the target traceability and evidence storage data is located, the channel configuration information containing a set of certificates of all organizations authorized to join the corresponding channel; comparing the organization certificate in the identity credentials held by the participant with the certificate set, if the organization certificate exists in the certificate set, then it is determined that the organization to which the participant belongs has been authorized to join the target alliance channel, confirming a successful match; wherein, after a successful match, the method further includes: determining the access granularity of the participant to the target traceability and evidence storage data according to the role type of the participant, the access granularity including full data access, process-related data access, and de-identified summary data access.
[0047] Specifically, after a participant initiates a data access request for traceability and enters the channel permission matching and verification stage, the on-chain storage path parameters of the target traceability evidence data are first read. These on-chain storage path parameters are fixed on-chain parameters written with the transaction when the product data is uploaded to the chain and bound to the product batch / category, used to accurately locate the target consortium channel corresponding to the traceability data. The channel configuration information of the target consortium channel is then retrieved. This information consists of configuration parameters pre-fixed and persistently stored on the chain when the consortium blockchain channel is created, including a set of public key certificates from all legally authorized organizations of the channel. Each piece of data in the certificate set is a unique and non-repeatable digital certificate of the organization, certified by a CA authority for each participating party. Finally, the organization certificate held by the access request initiator is extracted. This identity certificate is a digital certificate uniformly issued by the consortium blockchain management terminal when the participant joins the network, binding a unique organizational identity. It contains a fixed organization ID and public key information and cannot be forged or tampered with.
[0048] Then, the organization certificate in the identity credentials held by the participant is compared with the certificate set one by one. If a completely identical certificate record is found after the comparison, the organization affiliation is determined to be successfully matched, indicating that the participant has the legal access permission for this channel. Based on the successful channel access verification and confirmation of successful matching, the participant's preset role type parameters within the consortium blockchain are further retrieved. These role parameters are fixed permission parameters pre-configured by the platform and bound to the organization's identity, including multiple roles such as producer, warehousing provider, logistics provider, seller, consumer, and regulator. The corresponding data access granularity permission is automatically matched according to the role type. Full data access means that the participant can view all traceability evidence details of the product from production, warehousing, logistics to transaction cancellation. Link-related data access means that the participant can only view the status change evidence data corresponding to its own business link. De-identified summary data access means that the participant can only view the public traceability summary information after removing price, customer information, and enterprise private data. Finally, the access granularity after matching is used to constrain the data query scope of the participant, completing a layered and refined permission verification process, and limiting each participant to accessing only the traceability evidence data within the authorized scope.
[0049] For example, a dedicated food traceability alliance channel is channel CH001. The channel configuration includes a pre-stored set of authorized certificates: CERT01 for manufacturers, CERT02 for logistics companies, CERT03 for supermarket sales, and CERT04 for regulatory agencies. A supermarket seller holds a unique identity credential with a built-in organization certificate of CERT03, and its role is designated as a seller. When the supermarket requests to query traceability data for a specific batch of food, the system first locates the channel CH001 to which the data belongs and retrieves the CH001 authorized certificate whitelist. The supermarket's certificate CERT03 is then compared with the certificate set; if a match is found, access is deemed legitimate. Its role is then identified as a seller, and the preset access granularity is limited to process-related data. Therefore, the supermarket can only view data related to product listing and transaction records, and cannot view confidential full-volume data such as raw material parameters and factory costs, achieving precise hierarchical access control.
[0050] By adding precise certificate access verification and role-based access granularity control on the basis of channel isolation, the problem of consistent permissions for all participants in the same channel and excessive exposure of privacy data is avoided. By comparing fixed on-chain configuration parameters with certificates, unambiguous and automated permission verification is achieved, which accurately distinguishes the data viewing scope of different roles. While ensuring the legitimate collaborative traceability of the supply chain, sensitive data and user privacy are protected to the greatest extent.
[0051] The system monitors transaction confirmation events occurring on the consortium blockchain. When it determines that the supply chain process corresponding to the product has reached a preset termination event, it performs an invalidation operation on the traceability identifier, making the traceability identifier no longer valid in the consortium blockchain.
[0052] Furthermore, after executing the invalidation operation for the traceability identifier, the process further includes: marking the logical state of the traceability identifier as cancelled, and recording the block height and transaction hash corresponding to the invalidation operation. Specifically, when the consensus node or verification node in the consortium blockchain receives a new state change write request for any traceability identifier, it first reads the current logical state of the traceability identifier. If the current logical state is cancelled, the consensus node or verification node rejects the new state change write request and returns a message indicating that the traceability identifier has expired. If the current logical state is valid, the state change write process for the traceability identifier continues.
[0053] Specifically, the system continuously and asynchronously monitors transaction confirmation events across all nodes of the consortium blockchain. These transaction confirmation events are native on-chain events automatically pushed after the consortium blockchain's underlying consensus is completed, representing that a product's data has been endorsed, reached through consensus, and uploaded to the blockchain, serving as a trusted trigger data source for process judgment. Pre-configured supply chain termination events are configured in the business logic layer. These are manually predefined end-of-life events bound to the entire product lifecycle, including business nodes representing the complete end of product circulation, such as final receipt of the product and formal removal from shelves and cancellation of sales, used to determine whether a single product traceability link is complete. When the latest on-chain transaction corresponding to a product is detected as any of the above termination events, the system automatically determines that the product's supply chain process has ended, triggering the invalidation of the product's unique traceability identifier.
[0054] When executing a failure operation, firstly, in the status field corresponding to the on-chain traceability identifier, the logical status parameter of the traceability identifier is marked from valid modification to cancelled. The logical status is an on-chain readable and writable status field that is synchronously created and permanently associated with each traceability identifier during initialization, ensuring the consistency of the status result across the entire network. Simultaneously, the block height and transaction hash corresponding to this failure operation are recorded. The block height is the unique block number written to the new block for this failure transaction, and the transaction hash is the unique hash digest generated by this failure transaction. Both parameters are directly read from the on-chain consensus result and permanently written into the traceability identifier's memo storage information, retaining the failure certificate.
[0055] After the status cancellation and notarization are completed, all consensus nodes and verification nodes of the consortium blockchain, i.e., the underlying chain nodes responsible for transaction verification, block packaging, and legality determination, enable the pre-verification logic. When a consensus node or verification node in the consortium blockchain receives a new status change write request for any traceability identifier, it first reads the current logical status of the traceability identifier. If the query result is that it has been cancelled, the node directly intercepts the write request, refuses to add any new circulation data updates, and returns a standardized prompt message to the upper-layer business indicating that the traceability identifier has expired. If the read status is valid, it is allowed to proceed normally, and the complete status change write process of endorsement verification and consensus on-chain continues to be completed, eliminating the possibility of invalid goods being forged again from the bottom layer of the chain.
[0056] By automatically identifying the end point of commodity circulation through on-chain event monitoring, the invalidation status and credentials are solidified. The pre-verification capability of the underlying nodes of the consortium blockchain is used to intercept the illegal writing of invalidation identifiers, thereby preventing the artificial addition, tampering, and forgery of subsequent circulation data of completed commodities. This avoids the vulnerabilities of reusable identifiers and forged links in the traditional traceability system, and improves the credibility and security of commodity traceability management throughout the entire traceability chain.
[0057] Example 2 is based on the same inventive concept as the consortium blockchain-based product traceability management method described in the previous examples, such as... Figure 2 As shown, this application provides a product traceability management system based on a consortium blockchain, wherein the product traceability management system based on a consortium blockchain includes: The traceability identifier generation module 11 is used to respond to the product's coding during the production process, obtain the product's unique physical identifier, and calculate and generate a globally unique traceability identifier based on a preset hash salting rule. The product registration information is then stored on the consortium blockchain as initial evidence data. The data association module 12 is used to collect the product's status change data generated at each preset business flow stage in the supply chain, associate the status change data with the corresponding stage identity information, and write it into the consortium blockchain as new traceability evidence data. The stage identity information is a predefined stage identifier that corresponds one-to-one with each business flow stage. The permission verification module 13 is used to perform permission verification on different participants requesting access to traceability evidence data in the consortium blockchain according to the multi-participant permission isolation architecture provided by the consortium blockchain, limiting each participant to access only traceability evidence data within their authorized scope.
[0058] Furthermore, the system is also used to: monitor transaction confirmation events occurring on the consortium blockchain; and when it is determined that the supply chain process corresponding to the product has reached a preset termination event, perform an invalidation operation on the traceability identifier, so that the traceability identifier is no longer valid in the consortium blockchain.
[0059] Furthermore, the traceability identifier generation module 11 is also used to: extract the product serial number (SN) and details attributes at the production coding node as the original input for hash calculation; obtain the current supply chain or product type preset salt value, wherein the salt value includes one or more of random numbers, timestamps, and organization private keys; and use a hash algorithm to calculate the combination of the original input and the salt value to generate a hash value as the globally unique traceability identifier of the product.
[0060] Furthermore, the data association module 12 is also used for: the multiple preset business flow links include: product registration, product warehousing, product outbound, order creation, order delivery, order receipt, order signing, product listing, product transaction and product cancellation.
[0061] Furthermore, the data association module 12 is also used to: capture warehouse address change information and operator information as status change data during the goods warehousing or outbound process; capture consignee information, consignor information, and delivery goods list as status change data during the order creation process; capture delivery personnel information and transit address sequence as status change data during the order delivery process; capture the signature confirmation event and signatory information as status change data during the order signing process; capture sales point address information and listing time as status change data during the goods shelf-listing process; and capture transaction participant information, transaction time, and transaction amount as status change data during the goods transaction process.
[0062] Furthermore, the data association module 12 is also used to: package the state change data generated in the current business process, the digital signature of the operator, the trusted timestamp, and the hash of the previous blockchain transaction to construct a transaction proposal to be submitted; verify the consistency of the transaction proposal through the endorsement nodes in the consortium chain; after passing the consistency verification, sort and package the transaction proposal through the consensus service, and write it into the distributed ledger as a transaction in the new block, thus completing the on-chain storage of traceability and evidence storage data.
[0063] Furthermore, the permission verification module 13 is also used to: create independent alliance channels for a group of supply chain participants belonging to the same business privacy domain, and issue identity credentials based on digital certificates for each participant; store traceability and evidence storage data of different types of goods or different batches of goods in different alliance channels, so that each alliance channel is isolated from each other; when any participant initiates a data access request for the target traceability and evidence storage data, extract the organization affiliation information in the participant's identity credentials, and verify whether the organization affiliation information matches the alliance channel where the target traceability and evidence storage data is located; if they match, allow the participant to access the target traceability and evidence storage data; if they do not match, refuse the participant to access the target traceability and evidence storage data.
[0064] Furthermore, the permission verification module 13 is also used to: obtain the channel configuration information of the target alliance channel where the target traceability and evidence storage data is located, the channel configuration information including a set of certificates of all organizations authorized to join the corresponding channel; compare the organization certificate in the identity credential held by the participant with the certificate set, and if the organization certificate exists in the certificate set, determine that the organization to which the participant belongs has been authorized to join the target alliance channel, and confirm that the match is successful; wherein, after the match is successful, it also includes: determining the access granularity of the participant to the target traceability and evidence storage data according to the role type of the participant, the access granularity including full data access, process-related data access and de-identified summary data access.
[0065] Furthermore, the system is also used to: mark the logical state of the traceability identifier as cancelled, and record the block height and transaction hash corresponding to the invalidation operation, wherein, when the consensus node or verification node in the consortium blockchain receives a new state change write request for any traceability identifier, it first reads the current logical state of the traceability identifier; if the current logical state is cancelled, the consensus node or verification node rejects the new state change write request and returns a prompt message that the traceability identifier has expired; if the current logical state is valid, the state change write process for the traceability identifier continues to be executed.
[0066] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The product traceability management method and specific examples based on consortium blockchain in the foregoing embodiment one are also applicable to the product traceability management system based on consortium blockchain in this embodiment. Through the foregoing detailed description of the product traceability management method based on consortium blockchain, those skilled in the art can clearly understand the product traceability management system based on consortium blockchain in this embodiment. Therefore, for the sake of brevity, it will not be described in detail here.
[0067] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0068] Obviously, those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of this application.
Claims
1. A product traceability management method based on consortium blockchain, characterized in that, include: The product is assigned a unique physical identifier during the production process, and a globally unique traceability identifier is generated based on the preset hash salting rules. The product registration information is then stored on the consortium blockchain as the initial evidence data. As the product sequentially goes through multiple preset business flow stages in the supply chain, the status change data generated by the product in each business flow stage is collected. The status change data is associated with the corresponding stage identity information and written into the consortium blockchain as new traceability and evidence storage data. The stage identity information is a predefined stage identifier that corresponds one-to-one with each business flow stage. Based on the multi-participant permission isolation architecture provided by the consortium blockchain, permission verification is performed on different participants requesting access to traceability and evidence storage data in the consortium blockchain, limiting each participant to accessing only traceability and evidence storage data within the authorized scope.
2. The product traceability management method based on consortium blockchain according to claim 1, characterized in that, Also includes: The system monitors transaction confirmation events occurring on the consortium blockchain. When it determines that the supply chain process corresponding to the product has reached a preset termination event, it performs an invalidation operation on the traceability identifier, making the traceability identifier no longer valid in the consortium blockchain.
3. The product traceability management method based on consortium blockchain according to claim 1, characterized in that, A globally unique traceability identifier is generated based on a preset hash salting rule, including: Extract the product serial number (SN) and detailed attributes from the production coding node as the raw input for hash calculation; Obtain the preset salt value for the current supply chain or product type, where the salt value includes one or more of the following: random number, timestamp, and organization private key; A hash algorithm is used to calculate the combination of the original input and the salt value to generate a hash value as a globally unique traceability identifier for the product.
4. The product traceability management method based on consortium blockchain according to claim 1, characterized in that, The multiple preset business flow steps include: product registration, product warehousing, product outbound, order creation, order delivery, order receipt, order confirmation, product listing, product transaction, and product cancellation.
5. The product traceability management method based on consortium blockchain according to claim 1, characterized in that, Collect status change data of the product at each stage of the business process, including: During the goods receiving or shipping process, capture warehouse address change information and operator information as status change data; During the order creation process, recipient information, sender information, and a list of delivered goods are captured as status change data. During the order delivery process, the delivery person's information and the sequence of transit addresses are captured as status change data. During the order receipt process, the receipt confirmation event and the recipient's information are captured as status change data. During the product listing process, the sales point address information and listing time are captured as status change data; In the commodity transaction process, information on the transaction participants, transaction time, and transaction amount are captured as status change data.
6. The product traceability management method based on consortium blockchain according to claim 1, characterized in that, Associating the status change data with the corresponding link identity information and writing it into the consortium blockchain as newly added traceability and evidence storage data includes: Package the status change data generated in the current business process, the operator's digital signature, the trusted timestamp, and the hash of the previous blockchain transaction to construct a transaction proposal to be submitted; The transaction proposal is verified for consistency by the endorsing nodes in the consortium blockchain. After passing the consistency verification, the transaction proposal is sorted and packaged by the consensus service and written into the distributed ledger as a transaction in the new block, thus completing the on-chain storage of traceability and evidence data.
7. The product traceability management method based on consortium blockchain according to claim 1, characterized in that, Based on the multi-participant permission isolation architecture provided by the consortium blockchain, permission verification is performed on different participants requesting access to traceability and evidence storage data in the consortium blockchain, including: Create independent consortium channels for a group of supply chain participants belonging to the same business privacy domain, and issue digital certificate-based identity credentials to each participant; The traceability and evidence storage data of different types of goods or different batches of goods are stored in different alliance channels to isolate the alliance channels from each other. When any participant initiates a data access request for the target traceability and evidence storage data, the organization affiliation information in the participant's identity credentials is extracted, and it is verified whether the organization affiliation information matches the alliance channel where the target traceability and evidence storage data is located. If a match is found, the participant is allowed to access the target traceability and evidence storage data; if a match is not found, the participant is denied access to the target traceability and evidence storage data.
8. The product traceability management method based on consortium blockchain according to claim 7, characterized in that, Verifying whether the organization affiliation information matches the alliance channel where the target traceability and evidence storage data is located includes: Obtain the channel configuration information of the target alliance channel where the target traceability and evidence storage data is located. The channel configuration information includes a set of certificates of all organizations that have been authorized to join the corresponding channel. The organization certificate in the identity credentials held by the participant is compared with the certificate set. If the organization certificate exists in the certificate set, it is determined that the organization to which the participant belongs has been authorized to join the target alliance channel, and the matching is confirmed to be successful. Upon successful matching, the process further includes: determining the granularity of access to the target traceability and evidence storage data by the participating party based on the role type of the participating party, wherein the granularity of access includes full data access, process-related data access, and de-identified summary data access.
9. The product traceability management method based on consortium blockchain according to claim 2, characterized in that, After executing the invalidation operation for the traceability identifier, the process further includes: The logical state of the traceability identifier is marked as cancelled, and the block height and transaction hash corresponding to the invalid operation are recorded. When the consensus node or verification node in the consortium chain receives a new state change write request for any traceability identifier, it first reads the current logical state of the traceability identifier. If the current logical state is cancelled, the consensus node or verification node rejects the new state change write request and returns a prompt message that the traceability identifier has expired. If the current logical state is valid, then continue to execute the state change writing process for the traceability identifier.
10. A product traceability management system based on consortium blockchain, characterized in that, The steps for implementing the product traceability management method based on consortium blockchain according to any one of claims 1 to 9, wherein the product traceability management system based on consortium blockchain includes: The traceability identifier generation module is used to respond to the product's coding during the production process, obtain the product's unique physical identifier, and calculate and generate a globally unique traceability identifier based on the preset hash salting rules. The product registration information is then stored on the consortium blockchain as the initial evidence data. The data association module is used to collect the status change data of the product under each business flow link when the product goes through multiple preset business flow links in the supply chain, associate the status change data with the corresponding link identity information, and write it into the consortium blockchain as new traceability and evidence storage data. The link identity information is a predefined link identifier that corresponds one-to-one with each business flow link. The permission verification module is used to verify the permissions of different participants requesting access to traceability and evidence storage data in the consortium blockchain according to the multi-participant permission isolation architecture provided by the consortium blockchain, and to limit each participant to access traceability and evidence storage data within the authorized scope.
