A blockchain traceability method, apparatus, system, computing device, and storage medium

By constructing a traceability catalog chain and an identity and authorization authentication chain, generating cross-chain traceability requests, and using smart contracts to obtain traceability information, the problem of existing technologies being unable to perform structured and accurate traceability of products and materials is solved, achieving reliable end-to-end traceability.

CN115330400BActive Publication Date: 2026-05-29CHINA MOBILE GROUP DESIGN INST +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA MOBILE GROUP DESIGN INST
Filing Date
2021-04-26
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing blockchain traceability solutions are insufficient to meet the structural traceability requirements of components and raw materials at all levels in complex BOM (Bill of Materials) products in the manufacturing industry. Furthermore, the authenticity and reliability of information uploads and updates cannot be guaranteed, making it difficult for participants in downstream stages to obtain reliable end-point traceability information.

Method used

By constructing a traceability catalog chain, generating cross-chain traceability requests carrying traceability codes, using an identity and authorization authentication chain for identity authentication, and obtaining traceability information through smart contracts, a mapping relationship between traceability codes and traceability chains is established to achieve accurate traceability of products and materials.

Benefits of technology

It achieves precise correlation between products and materials at all levels, ensuring the reliability and accuracy of traceability information, enabling participants at all levels to obtain reliable traceability information, and supporting end-to-end traceability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115330400B_ABST
    Figure CN115330400B_ABST
Patent Text Reader

Abstract

The application discloses a kind of blockchain traceability method, device, system, computing device and storage medium, the method includes: selecting traceability target from pre-constructed traceability directory chain, generates the cross-chain traceability request of target traceability code carrying with traceability target;Traceability directory chain includes the traceability code of product and the traceability code of each level material in product;Each traceability code is associated with corresponding traceability chain;Cross-chain traceability request is initiated to target traceability code corresponding target traceability chain, identity permission authentication chain is used for identity permission authentication;After identity permission authentication passes, obtain the traceability information in target traceability chain.The method realizes the traceability code mapping and cross-chain information interaction between traceability directory chain and traceability chain, reaches end-to-end accurate traceability, solves the technical problems that product and its each level material structure, accuracy and reliability traceability cannot be traced in prior art, and each level participant in product circulation link is difficult to obtain credible source traceability information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and specifically to a blockchain traceability method, apparatus, system, computing device, and storage medium. Background Technology

[0002] Blockchain technology is a novel distributed infrastructure and computing paradigm that utilizes a block-chain data structure to authenticate and store data, distributed consensus algorithms to generate and update data, cryptography to ensure the security of data transmission and access, and smart contracts composed of automated script code to program and manipulate data. In a blockchain system, transaction data generated by each participant is packaged into a data block, which is arranged sequentially in chronological order to form a chain. Each participant possesses the same data chain, ensuring information immutability, preventing data forgery, and data traceability. With the rise of consortium blockchain technology, blockchain technology is increasingly being applied to product traceability and anti-counterfeiting applications.

[0003] Existing blockchain traceability solutions primarily focus on the on-chain storage, querying, and authentication of traceability information throughout the product's production and distribution process, as well as methods for generating query identifiers. Most existing technologies concentrate on anti-counterfeiting and traceability applications at the product granularity level, making it difficult to meet the structural traceability needs of manufacturers in the manufacturing industry for products with complex BOM (Bill of Material) systems, including intermediate components and raw materials. In actual production and operation, each process stage has relevant business codes, and existing technologies do not address the issues of connection and association with these business codes, thus failing to match the actual multi-entity process operations in reality.

[0004] Bill of Materials (BOM) information is a file describing the product structure in a data format, usually presented as a tree structure. It is a computer-readable product structure data file and the primary document in ERP (Enterprise Resource Planning) systems. Currently, there are few applications combining BOM structure with blockchain technology for traceability. Therefore, the authenticity and reliability of information uploads and updates cannot be guaranteed. Furthermore, current technologies do not address precise traceability to the supplier level based on BOM; they rely solely on centralized information from the manufacturing company, making it difficult for downstream participants and consumers to obtain reliable end-point traceability information. Summary of the Invention

[0005] In view of the above problems, the present invention is proposed to provide a blockchain traceability method, apparatus, system, computing device and storage medium that overcomes or at least partially solves the above problems.

[0006] According to one aspect of the present invention, a blockchain traceability method is provided, comprising:

[0007] A traceability target is selected from a pre-built traceability catalog chain, and a cross-chain traceability request carrying the target traceability code is generated; wherein, the traceability catalog chain includes the product's traceability code and the traceability codes of each level of materials in the product; each traceability code is associated with a corresponding traceability chain;

[0008] Initiate the cross-chain tracing request to the target tracing chain corresponding to the target tracing code, and use the identity and permission authentication chain to perform identity and permission authentication;

[0009] After identity and authorization authentication is successful, the traceability information in the target traceability chain is obtained using a smart contract.

[0010] According to another aspect of the present invention, a blockchain traceability device is provided, comprising:

[0011] The request generation module is used to select a traceability target from a pre-built traceability catalog chain and generate a cross-chain traceability request carrying the target traceability code of the traceability target; wherein, the traceability catalog chain includes the traceability code of the product and the traceability codes of each level of materials in the product; each traceability code is associated with a corresponding traceability chain;

[0012] The tracing initiation module is used to initiate the cross-chain tracing request to the target tracing chain corresponding to the target tracing code, and to perform identity and permission authentication using the identity and permission authentication chain;

[0013] The traceability module is used to obtain traceability information from the target traceability chain using a smart contract after identity and authorization authentication is passed.

[0014] According to another aspect of the present invention, a blockchain traceability system is provided, including the aforementioned blockchain traceability device; and,

[0015] The underlying environment for blockchain applications, used to enable users to join the consortium blockchain after obtaining authorization;

[0016] The public node resource pool module is used to build a public node resource pool and divide each public node into multiple accounting nodes;

[0017] The unified business gateway module is used to interact with smart contracts deployed on public nodes through a unified business gateway, and to share data between the traceability catalog chain and the traceability chain.

[0018] According to another aspect of the present invention, a computing device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;

[0019] The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the above-described blockchain traceability method.

[0020] According to another aspect of the present invention, a computer storage medium is provided, the storage medium storing at least one executable instruction that causes a processor to perform an operation corresponding to the blockchain tracing method described above.

[0021] According to a blockchain traceability method, apparatus, system, computing device, and storage medium of the present invention, a cross-chain traceability request carrying the target traceability code is generated by selecting a traceability target from a pre-constructed traceability catalog chain. The traceability catalog chain includes the product's traceability code and the traceability codes of each level of materials within the product. Each traceability code is associated with a corresponding traceability chain. A cross-chain traceability request is initiated to the target traceability chain corresponding to the target traceability code, and identity authentication is performed using an identity and permission authentication chain. After successful identity and permission authentication, traceability information in the target traceability chain is obtained using a smart contract. This invention achieves precise association between products and their respective levels of materials based on the traceability catalog chain. By initiating cross-chain traceability requests on the traceability chain using the product's traceability code and the traceability codes of each level of materials within the product, this invention realizes traceability code mapping and cross-chain information interaction between the traceability catalog chain and the traceability chain, achieving end-to-end precise traceability. This solves the technical problems in the prior art where the structure, accuracy, and reliability of products and their respective levels of materials cannot be traced, and where participants at various levels in the product circulation process find it difficult to obtain reliable source traceability information.

[0022] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0023] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0024] Figure 1 A flowchart of a blockchain traceability method provided by an embodiment of the present invention is shown;

[0025] Figure 2 This diagram illustrates the correspondence between the traceability directory chain and BOM information provided in an embodiment of the present invention.

[0026] Figure 3This diagram illustrates the traceability chain construction process provided in an embodiment of the present invention.

[0027] Figure 4 This diagram illustrates the structure of a blockchain traceability device according to an embodiment of the present invention.

[0028] Figure 5 This diagram illustrates the structure of a blockchain traceability system provided in an embodiment of the present invention.

[0029] Figure 6 A schematic diagram of the structure of a computing device provided in an embodiment of the present invention is shown. Detailed Implementation

[0030] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

[0031] Figure 1 A flowchart illustrating an embodiment of a blockchain traceability method according to the present invention is shown, as follows: Figure 1 As shown, the method includes the following steps:

[0032] Step S110: Based on the product's bill of materials information in the enterprise management system, determine the materials at each level of the product, and construct a tree structure based on the materials at each level of the product.

[0033] The ERP system stores the product's BOM (Bill of Materials) information. Based on the product's BOM information in the ERP system, the materials at each level of the product are determined, and a tree structure is constructed based on the materials at each level of the product. The materials at each level of the product can include the finished product itself, intermediate components or raw materials used in the production of the product, etc. In this embodiment, the finished product itself is collectively referred to as the product; the intermediate components or raw materials used in the production of the product are collectively referred to as materials.

[0034] Step S120: Set traceability codes for the product and its materials at all levels according to the preset coding rules, obtain the traceability catalog chain, and store the traceability codes in the shared ledger.

[0035] Figure 2 This is a schematic diagram illustrating the correspondence between the traceability directory chain and BOM information provided in this embodiment, as follows: Figure 2As shown, a tree structure of traceability catalog chain is constructed by the manufacturer based on BOM information. Following preset coding rules, each level of material in the product corresponds to a unique traceability code as an information index label. These traceability codes are stored in blocks in a shared ledger and are agreed upon with suppliers at all levels, including raw material suppliers, second-tier suppliers, and first-tier suppliers. Specifically, the traceability code is generated based on production index information or traceability index information, as well as information in the BOM structure tree. If the material is self-produced, the production index information points to necessary traceability information such as the processes and quality involved in the production of the product or material. If the material is outsourced or procured, the traceability index information points to secondary traceability information from procurement, production, to delivery by the supplier. The BOM structure tree information points to the product's material structure information. Each level of product and material, as long as it involves procurement and delivery, has a unique traceability code.

[0036] In this step, to accurately obtain key information about each material in the ERP system, the traceability catalog chain is directly linked to the BOM information in the ERP, thereby ensuring that the ERP system and the traceability catalog chain interact based on a unique mapping relationship. For example... Figure 2 As shown, to ensure the accuracy and uniqueness of traceability information, in the tree structure of the traceability catalog chain, each intermediate component forms a sub-catalog containing a complete end-to-end traceability structure. Conversely, secondary sub-catalogs that meet the definition of the traceability catalog chain can be added to the parent catalog chain using a BOM (Bill of Materials) mapping. The traceability catalog chain is stored in a consortium blockchain within the traceability blockchain environment. Any complex product can have its own dedicated traceability catalog chain established, containing traceability index information for all levels of materials within the product, thus ensuring the accuracy and uniqueness of traceability information.

[0037] To facilitate access to material information at all levels of the traceability catalog chain, a smart contract for automatic indexing of the traceability catalog chain is established. Read and write permissions are set for suppliers at each level, and their identity authentication and permission information is stored in the identity and permission authentication chain. After authenticating their identity and permissions through the identity and permission authentication chain, suppliers at each level read the traceability catalog chain information within their authorized scope. The intermediate components or raw materials they provide directly use the read traceability code as the material's traceability information index tag, establishing a direct traceability relationship with the final product. When users need to retrieve material traceability information from other associated traceability chains, they can use the automatic indexing smart contract to point to the corresponding traceability code and retrieve the data through the traceability chain, thereby establishing an end-to-end traceability chain from the material structure to the supply chain flow of products, intermediate components, and raw materials.

[0038] Step S130: For each traceability code in the traceability catalog chain, each business circulation sub-link end transmits the traceability information of the product or material corresponding to the traceability code in each business circulation sub-link to the blockchain, thereby constructing the traceability chain corresponding to the traceability code.

[0039] In this embodiment, the product goes through several business sub-links from production completion to commercial distribution, including distribution processing, warehousing and logistics, channel sales, after-sales service and recycling. Each business sub-link is often operated by different business entities, resulting in differentiated business process codes (such as distribution processing codes, logistics material codes, sales codes and recycling codes) in different business sub-links. These business process codes are the core data of the business system, and full traceability of the entire business process can be achieved based on the business process codes.

[0040] In one optional approach, the business flow chain includes n business flow sub-chain terminals, where n > 1; step S130 further includes: each business flow sub-chain terminal enters the traceability code of the product or material in the corresponding business flow sub-chain, and performs identity and authorization authentication using the identity and authorization authentication chain; after the identity and authorization authentication is passed, the traceability information up to the previous block is read and verified; after the verification is passed, the business process code of the business flow sub-chain terminal is entered, and the hash value of the traceability information in the business flow sub-chain and the business process code are uploaded to the block. A new block is generated in the blockchain and encrypted to obtain the hash encryption information of the new block. The connection of the traceability code is updated to point to the hash encryption information of the new block. Specifically, the first business circulation sub-link end encrypts the hash value of the traceability information and the business process code in the corresponding business circulation sub-link to obtain the hash encryption information of the new block. The t-th business circulation sub-link end encrypts the hash value of the traceability information, the business process code, and the hash encryption information of the previous block in the corresponding business circulation sub-link to obtain the hash encryption information of the new block, where 1 < t ≤ n.

[0041] In one alternative approach, before uploading the hash value of the traceability information and the business process code in the business circulation sub-link to the blockchain to generate a new block, the method further includes: using a smart contract to retrieve the traceability information corresponding to the business process code from the business information system as the traceability information in the business circulation sub-link, and calculating the hash value of the traceability information in the business circulation sub-link.

[0042] Based on the above steps, each product and its various levels of materials are assigned a unique traceability label, namely a traceability code, which corresponds one-to-one with the smallest packaging of the product or material. Therefore, the traceability code can serve as the entry point of the traceability chain, binding key traceability information of each business circulation sub-link with the business process code and placing it on the traceability chain. This establishes a precise correspondence between the traceability code and the traceability chain, business circulation sub-links, and business process codes, enabling bidirectional connection between the product or material traceability information of each participant (including suppliers or sellers) and their own business information systems and operational processes.

[0043] Specifically, the business circulation chain includes n business circulation sub-chain terminals, each corresponding to a product circulation stage. Therefore, at any stage of product circulation, participants can input the traceability code of the product or material through the corresponding business circulation sub-chain terminal by scanning or other means. The identity and authorization of the participant are then authenticated by the identity and authorization authentication chain. After the identity and authorization are verified, the traceability information up to the previous block is read and verified. After verification, the user scans or inputs the business process code for that stage, obtains the corresponding traceability information and transaction information from the business information system, automatically calculates the hash value of the traceability information and transaction information, and uploads and encrypts the hash value and business process code to generate a new block. After the block is generated, the traceability code connection is updated to point to the encrypted information of the new block (i.e., the hash encrypted information of the new block), thus completing the on-chain traceability information of that stage.

[0044] Figure 3 The diagram illustrates the traceability chain construction process provided in this embodiment of the invention, as shown below. Figure 3As shown, the business circulation chain includes n business circulation sub-chain ends, such as the production and manufacturing sub-chain end, the processing and distribution sub-chain end, the logistics and transportation sub-chain end, the channel sales sub-chain end, and the after-sales recycling sub-chain end, etc.; the corresponding business process codes may include: product order code, processing code, logistics material code, product sales code, and recycling code, etc. Taking the product or material sales sub-link as an example, the distributor scans the product or material traceability code at the sub-link end of the sales channel. The identity and authorization authentication chain is used to authenticate the distributor's identity and authorization. After successful verification, the traceability information up to the previous block (corresponding to the previous sub-link of channel sales - logistics and transportation) is read and verified. After verification by hash value comparison, the distributor enters the business process code at the sub-link end of the sales business by scanning the product sales code. The smart contract automatically calculates the hash value of the traceability information of the corresponding sub-link of the sales channel. The hash value of the traceability information in the sub-link of the sales channel and the business process code (product sales code) are uploaded to the blockchain to generate a new block. The hash value of the traceability information in the sub-link of the sales channel, the business process code and the hash encryption information of the previous block are encrypted to obtain the hash encryption information of the new block. The connection of the traceability code is updated to point to the hash encryption information of the new block, so that the hash encryption information of the new block is directly associated with the traceability code of the product or material. In practical applications, based on the business process code of any business circulation sub-link, the traceability information corresponding to the business process code is automatically retrieved from the business information system through a smart contract, and a hash value is obtained. The hash value of the traceability information of the business circulation sub-link corresponding to the m-th block obtained through the asymmetric key is compared and verified with the hash value of the traceability information stored in the block. If the verification is successful, it proves that the traceability information is accurate.

[0045] For example, such as Figure 3 As shown, taking the sales channel as an example, the channel partner scans the traceability code at the sales channel sub-link end, pointing to block 3 generated by the logistics and transportation sub-link. After the channel partner passes the identity and authorization authentication chain, they use an asymmetric key (public key) to read block 3, obtaining the business process code of the logistics and transportation sub-link, the hash3 of traceability information 3, and the hash encryption information of block 2. At the same time, the business process code automatically maps to traceability information 3 and recalculates the hash. This hash is compared with hash3 to verify the traceability information and transaction information of the logistics and transportation sub-link. Similarly, this method is used to read and verify blocks 2 and 1, thereby obtaining the full-process traceability information from production and manufacturing to logistics and transportation.

[0046] Step S140: Select a tracing target from the pre-built tracing directory chain and generate a cross-chain tracing request carrying the target tracing code.

[0047] The traceability catalog chain includes the product's traceability code and the traceability codes of materials at each level within the product; each traceability code is associated with a corresponding traceability chain. The traceability target can be a product, or a material or intermediate component at a certain level of the product. The target traceability code refers to the traceability code of the traceability target.

[0048] Specifically, the traceability code directly points to and links to the traceability chain of the material, thereby mapping the traceability information of the material; then, through the traceability directory chain, the BOM tree structure information is accurately mapped and connected to establish the traceability relationship between the product and its associated materials (such as intermediate components and raw materials).

[0049] Step S150: Initiate a cross-chain tracing request to the target tracing chain corresponding to the target tracing code, and use the identity and permission authentication chain to perform identity and permission authentication.

[0050] Specifically, the identity and authorization authentication chain stores the identity authentication information and authorization information of each successfully registered user. Smart contracts are used to authenticate and retrieve this information. Users can include querying users (e.g., users purchasing products or materials) and participants in various processes. These participants can include suppliers at all levels, manufacturers, processors and distributors, third-party logistics providers, channel partners / consumers, and after-sales service providers. When a user needs to query traceability information for a target, they can select the target from a pre-built traceability directory chain, generate a cross-chain traceability request carrying the target's traceability code, and then initiate a cross-chain traceability request to the target traceability chain corresponding to the target traceability code. The identity and authorization authentication chain must then authenticate the user's identity and authorization based on the stored information. Users can only operate on smart contracts within their authorized scope.

[0051] Step S160: After identity and authorization authentication is passed, use the smart contract to obtain the traceability information in the target traceability chain.

[0052] In one optional approach, assuming the target traceability chain comprises m blocks, and the traceability code connection points to the hash encryption information of the m-th block (i.e., the end block of the target traceability chain); step S160 further includes: obtaining the hash encryption information of the m-th block of the target traceability chain; starting from i = m, decrypting the hash encryption information of the i-th block using an asymmetric key to obtain the hash value, business process code, and hash encryption information of the (i-1)-th block of the traceability information in the business flow sub-link corresponding to the i-th block; decrypting the hash value of the traceability information in the business flow sub-link corresponding to the i-th block to obtain the traceability information in the business flow sub-link corresponding to the i-th block; assigning i to i-1, and repeating the above steps until the traceability information in the business flow sub-link corresponding to the 1-th block is obtained.

[0053] In this step, after successful identity authentication, the hash encryption information of the m-th block of the target traceability chain is obtained. Starting from the m-th block, the hash encryption information of the m-th block is decrypted using an asymmetric key to obtain the hash value of the traceability information of the business circulation sub-link corresponding to the m-th block, the business process code, and the hash encryption information of the (m-1)-th block (i.e., the previous block). The hash value of the traceability information in the business circulation sub-link corresponding to the m-th block is decrypted to obtain the traceability information in the business circulation sub-link corresponding to the m-th block. Similarly, the hash encryption information of the previous block is decrypted step by step according to the above method until the traceability information in the business circulation sub-link corresponding to the first block is obtained, thereby realizing the information traceability of the entire traceability chain.

[0054] The method described in this embodiment constructs a traceability catalog chain based on product BOM information. This traceability catalog chain is a tree structure based on a consensus ledger, defining clear product and material information based on BOM information. Each node in the traceability catalog chain contains traceability index information for the product or material at that node. This index information serves as a traceability code, directly mapping to the traceability chain of the corresponding product or material information. This allows any traceability chain to associate traceability information and exchange data with its constituent sub-components and raw materials through the traceability catalog chain, thus establishing a one-to-one correspondence. This method organically combines product traceability with the business process codes of various business sub-links in product circulation, through business... The process code enables automatic reading of business data from each sub-link of the business circulation process, allowing for the hashing and on-chaining of traceability information. Subsequent hash comparisons verify the traceability information, further establishing a precise correspondence between the traceability code and each sub-link of the business circulation process. This achieves full-process traceability of product circulation while facilitating automatic integration of traceability information into the business systems and operational processes of participants in each sub-link, eliminating the need for secondary information entry and conversion. Based on the BOM information structure, this method establishes multiple traceability chains, which are automatically and accurately linked and mapped through a traceability directory chain, enabling cross-chain data retrieval and thus achieving long-chain traceability from product to material.

[0055] Figure 4 A schematic diagram of an embodiment of a blockchain traceability device according to the present invention is shown. Figure 4 As shown, the device includes: a traceability directory chain construction module 410, a traceability chain construction module 420, a request generation module 430, a traceability initiation module 440, and a traceability module 450.

[0056] The traceability catalog chain construction module 410 is used to determine the materials at each level of the product based on the bill of materials information of the product in the enterprise management system, construct a tree structure based on the materials at each level of the product, set traceability codes for the product and the materials at each level of the product according to the preset coding rules, obtain the traceability catalog chain, and store the traceability codes in the shared ledger.

[0057] The traceability chain construction module 420 is used to transmit the traceability information of the product or material corresponding to the traceability code in each business circulation sub-link to the blockchain for each traceability code in the traceability catalog chain, thereby constructing the traceability chain corresponding to the traceability code.

[0058] In one optional approach, the business flow chain includes n business flow sub-chain terminals, where n > 1; the traceability chain construction module 420 is further used for: each business flow sub-chain terminal entering the traceability code of the product or material in the corresponding business flow sub-chain, and performing identity and permission authentication using the identity and permission authentication chain; after successful identity and permission authentication, reading and verifying the traceability information up to the previous block; after successful verification, entering the business process code of the business flow sub-chain terminal, and uploading the hash value of the traceability information in the business flow sub-chain and the business process code. A new block is generated on the blockchain and encrypted to obtain the hash encryption information of the new block. The connection of the traceability code is updated to point to the hash encryption information of the new block. Specifically, the first business circulation sub-link end encrypts the hash value of the traceability information and the business process code in the corresponding business circulation sub-link to obtain the hash encryption information of the new block. The t-th business circulation sub-link end encrypts the hash value of the traceability information, the business process code, and the hash encryption information of the previous block in the corresponding business circulation sub-link to obtain the hash encryption information of the new block, where 1 < t ≤ n.

[0059] In an alternative approach, the traceability chain construction module 420 is further used to: utilize smart contracts to retrieve traceability information corresponding to business process codes from the business information system as traceability information in the business circulation sub-link, and calculate the hash value of the traceability information in the business circulation sub-link.

[0060] The request generation module 430 is used to select a traceability target from a pre-built traceability catalog chain and generate a cross-chain traceability request carrying the target traceability code. The traceability catalog chain includes the product's traceability code and the traceability codes of each level of materials within the product; each traceability code is associated with a corresponding traceability chain.

[0061] The tracing initiation module 440 is used to initiate a cross-chain tracing request to the target tracing chain corresponding to the target tracing code, and to perform identity and permission authentication using the identity and permission authentication chain.

[0062] The traceability module 450 is used to obtain traceability information from the target traceability chain using a smart contract after identity and authorization authentication is passed.

[0063] In one optional approach, the target traceability chain comprises m blocks, and the traceability code links point to the hash encryption information of the m-th block. The traceability module 450 is further configured to: obtain the hash encryption information of the m-th block of the target traceability chain; starting from i = m, decrypt the hash encryption information of the i-th block using an asymmetric key to obtain the hash value, business process code, and hash encryption information of the (i-1)-th block of the traceability information in the business flow sub-link corresponding to the i-th block; decrypt the hash value of the traceability information in the business flow sub-link corresponding to the i-th block to obtain the traceability information in the business flow sub-link corresponding to the i-th block; assign i to i-1, and repeat the above steps until the traceability information in the business flow sub-link corresponding to the 1-th block is obtained.

[0064] Using the device described in this embodiment, a traceability catalog chain is constructed based on product BOM information. This traceability catalog chain is a tree structure based on a consensus ledger, defining clear product and material information based on BOM information. Each node in the traceability catalog chain contains traceability index information for that node's product / intermediate component / raw material. This index information serves as a traceability code, directly mapping to the traceability chain of the corresponding product or material information. This allows any traceability chain to associate traceability information and exchange data with its constituent sub-components and raw materials through the traceability catalog chain, thus establishing a one-to-one correspondence. This device organically combines product traceability with the business process codes of various business sub-links in product circulation. The system automatically reads business data from each sub-link of the business circulation process through business process codes, enabling traceability information to be hashed and uploaded to the blockchain. Subsequent hash comparisons verify the traceability information, further establishing a precise correspondence between the traceability codes and each sub-link of the business circulation process. This allows for full-process traceability of the product circulation while facilitating automatic integration of traceability information into the business systems and operational processes of participants in each sub-link, eliminating the need for secondary information entry and conversion. Based on the BOM information structure, the device establishes multiple traceability chains, which are automatically and accurately linked and mapped through a traceability directory chain, enabling cross-chain data retrieval and thus achieving long-chain traceability from product to material.

[0065] Figure 5 A schematic diagram of an embodiment of the blockchain traceability system of the present invention is shown. Figure 5As shown, the system includes the aforementioned blockchain traceability device; a blockchain application underlying environment for enabling users to join the consortium blockchain after obtaining authorization; a public node resource pool module for building a public node resource pool and dividing each public node into multiple accounting nodes; and a unified business gateway module for interacting with smart contracts deployed on public nodes through a unified business gateway, and for data sharing between the traceability catalog chain and the traceability chain.

[0066] Specifically, this embodiment constructs a blockchain traceability system. This system includes a blockchain application underlying environment, which is a shared and universal blockchain underlying application consortium chain environment. The underlying technical architecture of this system unifies the Certificate Authority (CA), unified key algorithm module, standard SDK and API interface deployed in the blockchain application, and performs identity and permission authentication and traceability code invocation through a unified business gateway module. The standard software development kit (SDK) and application programming interface (API) are used to encapsulate the smart contracts of the blockchain underlying framework, thereby constructing a cross-chain relay mechanism to meet cross-chain information sharing and enable different traceability chains to accurately call information through the traceability directory chain.

[0067] The unified CA module typically adopts a tree-like CA structure. After users apply for CAs and permissions, the administrator uniformly issues the CAs. The unified key algorithm module is used to unify the key algorithm in the underlying environment of blockchain applications, ensuring that traceability chain applications of all parties can conveniently and securely share cross-chain data through asymmetric keys. The standard SDK and API interfaces are used to encapsulate the smart contracts related to the traceability chain into SDKs and APIs, providing them to users for direct calls. This allows users with different technical capabilities to easily and cost-effectively build their own traceability chains and facilitates reading information from other traceability chains through standard interfaces.

[0068] In one alternative approach, the public node resource pool module is also used to: deploy blockchain node software on cloud resources or servers to build a public node resource pool. Each public node can be divided into multiple accounting nodes through a channel mechanism corresponding to the selected underlying framework, thereby enabling the public node resource pool to support the establishment of multiple traceability chains based on consortium blockchains.

[0069] In one alternative approach, the unified business gateway module is also used to: support user identity and permission authentication, interaction with smart contracts deployed on public nodes, and cross-chain data sharing of applications through a unified business gateway.

[0070] In one alternative approach, the traceability chain further includes a business code management module, an information upload module, an information retrieval module, an information verification module, and a traceability directory chain docking module.

[0071] like Figure 5 As shown, based on this blockchain traceability system, taking the data interaction between product traceability chain A and intermediate component traceability chain A1 as an example, the method to achieve cross-chain data transfer and complete end-to-end traceability is as follows: The user of traceability chain A performs identity authentication through the unified business gateway module; selects intermediate component A1 through the traceability directory chain, automatically retrieves the traceability code of component A1, and links to the A1 traceability chain through the traceability code; initiates a transaction request for cross-chain access to traceability information to traceability chain A1, and the requested permission is returned to the identity authentication chain; after successful identity authentication, the traceability information of traceability chain A1 is obtained through the unified key algorithm module using the unified key algorithm and through a smart contract. The traceability information is returned to traceability chain A through the unified business gateway module and re-encrypted to generate a new block, enabling the user of traceability chain A to trace the key information of A1; similarly, intermediate component traceability chain A1 can trace its raw material M1.

[0072] It should be noted that the traceability directory chain mapping in this embodiment is a relatively flat traceability structure. The upper-level traceability chain can directly trace all intermediate and final traceability information under its association, combined with... Figure 2 As shown, traceability chain A can directly trace the traceability information of raw materials M1 and M2 without going through the step-by-step calls of traceability chains A1 and A2. Furthermore, within the traceability directory chain, a higher-level traceability code can only be associated with its subordinate sub-sequences, and cannot trace across sub-sequences; for example, sequence A1 cannot trace the relevant traceability information of sequence A2.

[0073] The system described in this embodiment is deployed in the underlying environment of blockchain applications and includes core modules such as a unified business gateway module, an identity and authorization authentication chain, a traceability directory chain, and a public node resource pool. It uses a unified CA for certificate issuance, a unified key algorithm module, and a standard SDK / API module. The SDK / API module integrates standard interfaces for smart contracts. Multiple traceability chains can be easily deployed through this system, and users can achieve low-cost and high-efficiency data calls between multiple traceability chains through the unified business gateway module.

[0074] This invention provides a non-volatile computer storage medium storing at least one executable instruction that can execute a blockchain traceability method in any of the above-described method embodiments.

[0075] Executable instructions can specifically be used to cause the processor to perform the following operations:

[0076] Select a traceability target from a pre-built traceability catalog chain and generate a cross-chain traceability request carrying the target traceability code; wherein, the traceability catalog chain includes the product's traceability code and the traceability codes of each level of materials in the product; each traceability code is associated with a corresponding traceability chain;

[0077] Initiate a cross-chain tracing request to the target tracing chain corresponding to the target tracing code, and use the identity and permission authentication chain to perform identity and permission authentication;

[0078] After identity and authorization authentication is successful, the traceability information in the target traceability chain is obtained using a smart contract.

[0079] Figure 6 The diagram shows a structural schematic of an embodiment of the computing device of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the computing device.

[0080] like Figure 6 As shown, the computing device may include:

[0081] Processor, Communications Interface, Memory, and Communications Bus.

[0082] The processor, communication interface, and memory communicate with each other via a communication bus. The communication interface is used to communicate with other network elements, such as clients or other servers. The processor executes programs, specifically the steps described in one embodiment of the blockchain traceability method.

[0083] Specifically, the program may include program code, which includes computer operation instructions.

[0084] The processor may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The server may include one or more processors of the same type, such as one or more CPUs; or it may include processors of different types, such as one or more CPUs and one or more ASICs.

[0085] Memory is used to store programs. Memory may include high-speed RAM, and may also include non-volatile memory, such as at least one disk drive.

[0086] Specifically, the program can be used to cause the processor to perform the following operations:

[0087] Select a traceability target from a pre-built traceability catalog chain and generate a cross-chain traceability request carrying the target traceability code; wherein, the traceability catalog chain includes the product's traceability code and the traceability codes of each level of materials in the product; each traceability code is associated with a corresponding traceability chain;

[0088] Initiate a cross-chain tracing request to the target tracing chain corresponding to the target tracing code, and use the identity and permission authentication chain to perform identity and permission authentication;

[0089] After identity and authorization authentication is successful, the traceability information in the target traceability chain is obtained using a smart contract.

[0090] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the content of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

[0091] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0092] Similarly, it should be understood that, in order to simplify the invention and aid in understanding one or more of the various inventive aspects, features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.

[0093] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0094] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.

[0095] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components according to the embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0096] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

Claims

1. A blockchain traceability method, characterized in that, include: A traceability target is selected from a pre-built traceability catalog chain, and a cross-chain traceability request carrying the target traceability code is generated; wherein, the traceability catalog chain includes the product's traceability code and the traceability codes of each level of materials in the product; each traceability code is associated with a corresponding traceability chain; Initiate the cross-chain tracing request to the target tracing chain corresponding to the target tracing code, and use the identity and permission authentication chain to perform identity and permission authentication; After identity and authorization authentication is successful, the traceability information in the target traceability chain is obtained using a smart contract; The method further includes: Based on the bill of materials information of the product in the enterprise management system, determine the materials at each level of the product, and construct a tree structure based on the materials at each level of the product; Traceability codes are set for the product and its various levels of materials according to preset coding rules to obtain a traceability catalog chain, and the traceability codes are stored in a shared ledger.

2. The method according to claim 1, characterized in that, The method further includes: For each traceability code in the traceability catalog chain, each business circulation sub-link transmits the traceability information of the product or material corresponding to the traceability code in each business circulation sub-link to the blockchain, thus constructing the traceability chain corresponding to the traceability code.

3. The method according to claim 2, characterized in that, The business circulation chain includes n business circulation sub-chain terminals, where n > 1; each business circulation sub-chain terminal transmits the traceability information of the product or material corresponding to the traceability code in its respective business circulation sub-chain to the blockchain, and the construction of the traceability chain corresponding to the traceability code further includes: Each business circulation sub-link end enters the traceability code of the product or material in the corresponding business circulation sub-link and uses the identity and permission authentication chain to perform identity and permission authentication. After identity and authorization authentication is successful, the traceability information up to the previous block is read and verified. After successful verification, the business process code of the business circulation sub-link is entered. The hash value of the traceability information in the business circulation sub-link and the business process code are uploaded to the blockchain to generate a new block and encrypted to obtain the hash encryption information of the new block. The connection of the traceability code is updated to point to the hash encryption information of the new block. Specifically, the first business circulation sub-link encrypts the hash value of the traceability information and the business process code in the corresponding business circulation sub-link to obtain the hash encryption information of the new block. The t-th business circulation sub-link encrypts the hash value of the traceability information, the business process code, and the hash encryption information of the previous block in the corresponding business circulation sub-link to obtain the hash encryption information of the new block, where 1 < t ≤ n.

4. The method according to claim 3, characterized in that, Before uploading the hash value of the traceability information in the business flow sub-link and the business process code to the blockchain to generate a new block, the method further includes: Using smart contracts, the traceability information corresponding to the business process code is retrieved from the business information system as the traceability information in the business circulation sub-link, and the hash value of the traceability information in the business circulation sub-link is calculated.

5. The method according to claim 3, characterized in that, The target tracing chain includes m blocks, and the connection of the tracing code points to the hash encryption information of the m-th block; The step of obtaining traceability information from the target traceability chain using a smart contract further includes: Obtain the hash encryption information of the m-th block of the target tracing chain; Starting from i=m, the hash encryption information of the i-th block is decrypted using an asymmetric key to obtain the hash value of the traceability information in the business circulation sub-link corresponding to the i-th block, the business process code, and the hash encryption information of the (i-1)-th block; the hash value of the traceability information in the business circulation sub-link corresponding to the i-th block is decrypted to obtain the traceability information in the business circulation sub-link corresponding to the i-th block. Assign i the value i-1, and repeat the above steps until the traceability information in the business circulation sub-link corresponding to the first block is obtained.

6. A blockchain traceability device, characterized in that, include: The request generation module is used to select a traceability target from a pre-built traceability catalog chain and generate a cross-chain traceability request carrying the target traceability code of the traceability target; wherein, the traceability catalog chain includes the traceability code of the product and the traceability codes of each level of materials in the product; each traceability code is associated with a corresponding traceability chain; The tracing initiation module is used to initiate the cross-chain tracing request to the target tracing chain corresponding to the target tracing code, and to perform identity and permission authentication using the identity and permission authentication chain; The traceability module is used to obtain traceability information from the target traceability chain using a smart contract after identity and authorization authentication is passed. The device further includes: The traceability catalog chain construction module is used to determine the materials at each level of the product based on the bill of materials information of the product in the enterprise management system, construct a tree structure based on the materials at each level of the product, set traceability codes for the product and the materials at each level of the product according to preset coding rules, obtain the traceability catalog chain, and store the traceability codes in the shared ledger.

7. A blockchain traceability system, characterized in that, Including the blockchain traceability device as described in claim 6; and, The underlying environment for blockchain applications, used to enable users to join the consortium blockchain after obtaining authorization; The public node resource pool module is used to build a public node resource pool and divide each public node into multiple accounting nodes; The unified business gateway module is used to interact with smart contracts deployed on public nodes through a unified business gateway, and to share data between the traceability catalog chain and the traceability chain.

8. A computing device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which causes the processor to perform an operation corresponding to a blockchain traceability method as described in any one of claims 1-5.

9. A computer storage medium, characterized in that, The storage medium stores at least one executable instruction, which causes the processor to perform an operation corresponding to a blockchain traceability method as described in any one of claims 1-5.