CN115392927A - Data tracing system and data tracing method based on block chain - Google Patents

Data tracing system and data tracing method based on block chain Download PDF

Info

Publication number
CN115392927A
CN115392927A CN202210938971.5A CN202210938971A CN115392927A CN 115392927 A CN115392927 A CN 115392927A CN 202210938971 A CN202210938971 A CN 202210938971A CN 115392927 A CN115392927 A CN 115392927A
Authority
CN
China
Prior art keywords
target
data
product
chain
index
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210938971.5A
Other languages
Chinese (zh)
Inventor
刘思瀚
徐石成
何光宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Neusoft Corp
Original Assignee
Neusoft Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Neusoft Corp filed Critical Neusoft Corp
Priority to CN202210938971.5A priority Critical patent/CN115392927A/en
Publication of CN115392927A publication Critical patent/CN115392927A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Data Mining & Analysis (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Medical Informatics (AREA)
  • Automation & Control Theory (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The system comprises a data tracing end and block chain link points in a block chain network, wherein the block chain link points corresponding to the same product processing stage form a node set of the product processing stage, and the block chain link points in each node set are used for storing first data of a first product at a first product stage into a storage space under a chain; storing a sub-index for tracing first data in a sub-chain of the node set, and storing access information of the sub-index into a main index of a first product; the data tracing end is used for determining a target product corresponding to the data to be traced, acquiring a target main index of the target product from a main chain, matching the target main index based on target product processing stage information corresponding to the data to be traced to obtain target access information, accessing a target sub-chain associated with the target access information to obtain a target sub-index, and acquiring the data to be traced from a storage space under the chain according to the target sub-index.

Description

Data tracing system and data tracing method based on block chain
Technical Field
The present disclosure relates to the field of information technology, and in particular, to a data tracing system and a data tracing method based on a block chain.
Background
The supply chain product tracing refers to a process of recording and inquiring information such as product state, attribute, position and the like by using an identification technology in the whole life cycle process of product manufacture, circulation, consumption and recovery, and aims to record product information data and promote information sharing among information systems in enterprises, between enterprises and users.
However, in a scenario such as a supply chain, the product types are multiple, the links are complex, the data tracing process faces greater challenges, and the data tracing efficiency is difficult to guarantee.
Disclosure of Invention
The present disclosure is directed to a data tracing system and a data tracing method based on a block chain, so as to solve the above related technical problems.
In order to achieve the above object, according to a first aspect of the embodiments of the present disclosure, there is provided a data tracing system based on a blockchain, including a data tracing end and a plurality of blockchain nodes in a blockchain network, where each blockchain node corresponds to a processing stage of a product, the blockchain nodes corresponding to the same product processing stage form a node set of the product processing stage, and the blockchain nodes in the node set are commonly identified to form a sub-chain of the blockchain network,
the block chain link points in each node set are used for storing first data of a first product in a first product stage to a storage space under a chain, and the first product stage is a product processing stage corresponding to the block chain nodes; saving a sub-index for tracing the first data in a sub-chain of the node set, and saving access information of the sub-index into a main index of the first product, wherein the main index is saved in a main chain of the block chain network, and the access information comprises information of the sub-chain to which the sub-index belongs and a first stage identifier of the first product stage;
the data tracing end is used for determining a target product corresponding to data to be traced, acquiring a target main index of the target product from the main chain, matching and acquiring target access information from the target main index based on target product processing stage information corresponding to the data to be traced, accessing a target sub-chain associated with the target access information to acquire a target sub-index, and acquiring the data to be traced from a storage space under the chain according to the target sub-index.
Optionally, the blockchain node has digital identity information registered in the main chain, the node set includes a production node set, any production node in the production node set is used for,
in response to the production of the first product, generating a first product identification for the first product, casting an NFT (Non-homogeneous Token) in the main chain based on the first product identification, a first digital identity of the production node, resulting in a main index of the first product, wherein an owner of the NFT includes the first digital identity.
Optionally, the block chain link points in the node set are used for saving the access information of the sub-index into the main index of the first product by:
adding access information of the sub-index into the NFT if an owner of the NFT includes a second digital identity of the blockchain node;
sending a permission request to an owner of the NFT when the owner of the NFT does not include the second digital identity, the permission request being used to obtain owner permission of the NFT, the permission request including the second digital identity.
Optionally, the block link point in the node set is used for saving a sub-index for tracing back the first data in a sub-chain of the node set by:
casting a child chain NFT in a child chain of the set of nodes based on a first product identification of the first product, a second digital identity of the blockchain node registered in the main chain, summary information of the first data, an access address of the first data, and access right configuration information of the first data, resulting in the child index;
wherein the owner of the child chain NFT comprises the second digital identity.
Optionally, the data tracing end is configured to obtain the data to be traced from the storage space under the link in the following manner:
acquiring a target sub-chain NFT associated with the target access information, and initiating a data acquisition request according to an access address of data to be traced in the target sub-chain NFT;
the block link point receiving the data acquisition request is used for verifying the access authority of the data tracing end according to the access authority configuration information of the data to be traced in the target sub-chain NFT; and sending the data to be traced back to the data tracing back end under the condition that the verification is passed.
Optionally, the block link points in the node set are used to construct leaf nodes, where each leaf node includes a hash table, and the leaf node stores a mapping relationship between the first stage identifier and a first product identifier of a first product; constructing an index tree according to the leaf nodes;
the data tracing end is used for determining a target product corresponding to the data to be traced in the following mode: acquiring processing stage information of a target product where data to be traced is located to obtain a target stage identifier; sending a query request to a target block chain node in the node set of the target product processing stage, wherein the query request comprises the target stage identification;
the target block chain link point is used for responding to the query request, querying a local index tree according to the target stage identifier, and sending a query result including the target product identifier to the data tracing end under the condition that the target product identifier corresponding to the target stage identifier is queried, wherein the target product identifier is used for the data tracing end to determine a target product corresponding to the data to be traced.
Optionally, the block chain node constructs the index tree by:
constructing a father leaf node aiming at each target leaf node pair, wherein the target leaf node pair comprises two adjacent leaf nodes with hash values, and the leaf nodes in different target leaf node pairs are different, the hash value of an initial storage position in a hash table of the leaf node is used as the hash value of the leaf node, and the hash value of the leaf node with the smaller hash value in the leaf node pair is used as the hash value of the father leaf node obtained through construction;
and taking the father leaf node adjacent to the hash value as a new target leaf node pair, and repeatedly executing the steps of constructing the father leaf node pair for each target leaf node pair until the root node of the index tree is obtained.
Optionally, the blockchain node stores a mapping relationship between the first stage identifier and the first product identifier of the first product by:
calculating a first hash value according to the first stage identification;
determining a first leaf node for storing the first product identifier and a storage position of the first product identifier in a hash table of the first leaf node according to the first hash value and the hash value of each leaf node;
saving the first product identifier to the storage location of the hash table.
Optionally, the target blockchain node is configured to query the local index tree by:
calculating a second hash value according to the target stage identifier;
matching the second hash value with the hash values of the leaf nodes of the index tree to obtain a target leaf node of which the hash value range covers the second hash value;
traversing a hash table of a target leaf node to obtain a target product identifier corresponding to the target stage identifier;
the target block chain node is further configured to, in the case that a target leaf node is not matched, send a target query request to a plurality of block chain nodes in a node set to which the target block chain node belongs, where the target query request is used for the plurality of block chain nodes to query a local index tree according to the second hash value;
and determining the target product identification according to the query results of the plurality of block chain nodes.
According to a second aspect of the embodiments of the present disclosure, there is provided a data tracing method, used in the data tracing system based on a block chain in any one of the above first aspects, the method including:
the block chain nodes in each node set store first data of a first product in a first product stage to a down-chain storage space, wherein the first product stage is a product processing stage corresponding to the block chain nodes;
the block chain node saves a sub index used for tracing the first data in a sub chain of the node set, and saves access information of the sub index into a main index of the first product, wherein the main index is saved in a main chain of the block chain network, and the access information comprises information of the sub chain to which the sub index belongs and a first stage identifier of the first product stage;
the data tracing end determines a target product corresponding to the data to be traced;
the data tracing end obtains a target main index of the target product from the main chain;
the data tracing end matches and obtains target access information from the target main index based on target product processing stage information corresponding to data to be traced;
the data tracing end accesses the target sub-chain associated with the target access information to obtain a target sub-index;
and the data tracing end acquires the data to be traced from the storage space under the chain according to the target sub-index.
Optionally, the blockchain node has digital identity information registered in the main chain, the set of nodes includes a set of production nodes, and the method includes:
any production node in the set of production nodes generates a first product identification for the first product in response to production of the first product;
the production node casting an NFT in the backbone based on the first product identification, a first digital identity of the production node, resulting in a primary index of the first product, wherein an owner of the NFT includes the first digital identity.
Optionally, the saving the access information of the sub-index into the main index of the first product includes:
adding access information of the sub-index into the NFT if an owner of the NFT includes a second digital identity of the blockchain node;
sending a permission request to an owner of the NFT when the owner of the NFT does not include the second digital identity, the permission request being used to obtain owner permission of the NFT, the permission request including the second digital identity.
Optionally, the saving, in the child chain of the node set, a child index for tracing back the first data includes:
casting a child chain NFT in a child chain of the set of nodes based on a first product identification of the first product, a second digital identity of the blockchain node registered in the main chain, summary information of the first data, an access address of the first data, and access right configuration information of the first data, resulting in the child index;
wherein the owner of the child chain NFT comprises the second digital identity.
Optionally, the obtaining, by the data tracing end, the data to be traced from the down-link storage space according to the target sub-index includes: the data tracing end obtains a target sub-chain NFT associated with the target access information, and initiates a data obtaining request according to an access address of data to be traced in the target sub-chain NFT;
the method further comprises the following steps: the block link point receiving the data acquisition request checks the access authority of the data tracing end according to the access authority configuration information of the data to be traced in the target sub-chain NFT; and sending the data to be traced to the data tracing end under the condition that the verification is passed.
Optionally, the method further comprises:
constructing leaf nodes by the block chain link points in the node set, wherein the leaf nodes comprise hash tables;
the block chain node stores the mapping relation between the first stage identifier and a first product identifier of a first product through the leaf node;
the block chain nodes construct an index tree according to the leaf nodes;
the data tracing end determines a target product corresponding to the data to be traced, and the method comprises the following steps:
the data tracing end obtains information of a target product processing stage where data to be traced is located to obtain a target stage identifier;
the data tracing end sends a query request to a target block chain node in the node set of the target product processing stage, wherein the query request comprises the target stage identification;
the method further comprises the following steps:
and the target block chain node responds to the query request, queries a local index tree according to the target stage identifier, and sends a query result including the target product identifier to the data tracing end under the condition that the target product identifier corresponding to the target stage identifier is queried, wherein the target product identifier is used for the data tracing end to determine a target product corresponding to the data to be traced.
Optionally, the block link points construct an index tree, including:
the block link node establishes a father leaf node aiming at each target leaf node pair, wherein the target leaf node pair comprises two adjacent leaf nodes with hash values, the leaf nodes in different target leaf node pairs are different, the hash value of an initial storage position in a hash table of the leaf node is used as the hash value of the leaf node, and the hash value of the leaf node with the smaller hash value in the leaf node pair is used as the hash value of the father leaf node;
and the block node nodes take father leaf nodes adjacent to the hash values as new target leaf node pairs, and the step of constructing the father leaf nodes for each target leaf node pair is repeatedly executed until the root nodes of the index tree are obtained.
Optionally, the storing, by the leaf node, a mapping relationship between the first stage identifier and a first product identifier of a first product by the blockchain node includes:
the block chain node calculates a first hash value according to the first stage identification;
determining, by a blockchain node, a first leaf node storing the first product identifier and a storage location of the first product identifier in a hash table of the first leaf node according to the first hash value and hash values of the leaf nodes;
block chaining point saving the first product identification to the storage location of the hash table.
Optionally, the querying a local index tree according to the target phase identifier includes:
the target block chain node calculates a second hash value according to the target stage identifier;
matching the second hash value with the hash values of the leaf nodes of the index tree by the target block link point to obtain a target leaf node of which the hash value range covers the second hash value;
traversing a hash table of a target leaf node by a target block link node to obtain a target product identifier corresponding to the target stage identifier;
the method further comprises the following steps: under the condition that a target leaf node is not matched, a target block chain node sends a target query request to a plurality of block chain nodes in a node set to which the target block chain node belongs, wherein the target query request is used for the plurality of block chain nodes to query a local index tree according to the second hash value;
and the target block chain node determines the target product identifier according to the query result of the plurality of block chain nodes.
In the above technical solution, a plurality of block chain nodes in the same product processing stage may form a node set of the product processing stage, and form the sub-chain of the product processing stage in a common manner. In this way, the blockchain node may save the data generated in the product processing stage into the down-chain storage space, save the sub-index of the data on the sub-chain, and maintain the access information of the sub-index into the main index of the corresponding product in the main chain. In this way, the data tracing end can obtain the main index of the product to be queried from the main chain, and further obtain the access information of the sub-indexes corresponding to each product processing stage under the main index. Therefore, the corresponding sub-chain can be accessed according to the data tracing requirement, so that the corresponding sub-index is obtained, and the data entity stored in the storage space under the chain is accessed according to the obtained sub-index, so that the data tracing is realized.
That is, a master index of products may be maintained in the master chain and maintained by each tile link point from which data is generated. For example, a chunk chain node may maintain access information for a sub-index of data generated by itself into the primary index. By the mode, the data generated by the product in each product processing stage can be correlated and intercommunicated, and the method is beneficial to traceability. Moreover, the main index maintains a tracing mode of the sub-index, and the sub-index maintains a tracing mode of the data entity under the chain, namely the data entity is still stored under the chain by each party, so that the technical scheme is also beneficial to ensuring the privacy and the safety of the data. Meanwhile, a multi-level data tracing mode of combining a main chain and a sub chain and combining an on-chain index and an off-chain data entity is adopted, so that the authority management and the authority control are facilitated, and the data security is further guaranteed.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
fig. 1 is a block diagram of a data tracing system based on a blockchain according to an exemplary embodiment of the present disclosure.
Fig. 2 is a schematic diagram of a data saving process according to an exemplary embodiment of the disclosure.
FIG. 3 is a schematic diagram of a leaf node, shown in an exemplary embodiment of the present disclosure.
FIG. 4 is a diagram illustrating an index tree according to an exemplary embodiment of the present disclosure.
Fig. 5 is a flowchart illustrating a data tracing method according to an exemplary embodiment of the disclosure.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
Before introducing the block chain-based data tracing system and the data tracing method of the present disclosure, an application scenario of the present disclosure is first introduced. Embodiments provided by the present disclosure may be used, for example, in various data tracing scenarios, such as lifecycle data tracing scenarios for various products, such as vehicles, cell phones, and so on.
In some data tracing scenarios, data of each stage of a product can be summarized to a central data end, and the central data end maintains and manages the data of the product. However, such a method faces a centralized risk, and problems such as centralized failure and data tampering may occur, thereby affecting the reliability of the data tracing result. In addition, in some scenarios, the links involved in the product may be complex, and in such a case, it is difficult for the central data end to correlate the data of each link. In addition, some data may also have privacy, which increases the data acquisition difficulty of the central data end, and further increases the tracing difficulty of related information. Meanwhile, the related data tracing mode also faces the problems of difficult authority management and great data right confirming difficulty.
To this end, the present disclosure provides a data tracing system based on a block chain, and fig. 1 is a block diagram of a data tracing system based on a block chain shown in the present disclosure, and referring to fig. 1, the system includes a data tracing end and a plurality of block chain nodes in a block chain network. Here, the block link points may be various stationary or movable computing devices, such as servers, laptops, tablets, and the like. The data tracing back end may be a node in the blockchain network (for example, a node in the plurality of blockchain nodes or a node other than the plurality of blockchain nodes), or may be a third-party device capable of interacting with the blockchain network, which is not limited in this disclosure.
In the system, each block link point corresponds to a processing stage of a product, the block link points corresponding to the same product processing stage form a node set of the product processing stage, and the block link points in the node set are commonly identified to form a sub-chain of the block chain network.
The processing stages of the product may include, for example, a supply stage, a manufacturing stage, a transportation stage, a sale stage, and the like, and in particular, the processing stages of the product may be divided based on application requirements.
As explained in connection with fig. 1, the block chain node 101 to block link point X may be, for example, a manufacturer node, i.e., a block link point corresponding to a manufacturer. The manufacturer nodes may agree on a sub-chain 1 that forms a blockchain network. The blockchain nodes 201 to blockchain node Y may be, for example, carrier nodes, which may be commonly identified to form a subchain 2 of the blockchain network. The blockchain nodes 301 to blockchain link points Z may be, for example, vendor nodes, which may be commonly identified to form a subchain 3 of the blockchain network. In addition, each block link point may also create a backbone of the block chain network by consensus or by participating in consensus.
In the system, the block chain link points in each node set are used for storing first data of a first product in a first product stage to a down-chain storage space, wherein the first product stage is a product processing stage corresponding to the block chain link points; saving a sub-index for tracing the first data in a sub-chain of the node set, and saving access information of the sub-index into a main index of the first product, wherein the main index is saved in a main chain of the block chain network, and the access information comprises information of the sub-chain to which the sub-index belongs and a first stage identifier of the first product stage.
Fig. 2 is a schematic diagram of a data saving process shown in the present disclosure. Taking the manufacturer node as an example, when the manufacturer node produces the first product, the manufacturer node may generate a first product identifier of the first product, store first data generated by the first product in a manufacturing stage in a local database, and generate a sub-index of the first data.
The generation of the sub-index is explained below. In some implementation scenarios, the manufacturer node may register its digital Identity in the backbone, and the digital Identity may include DID (Decentralized Identity), certificate information, public key information, encodeMethod (encryption method) information, and the like of the manufacturer node.
In this way, the manufacturer node may generate a sub-index of the first data in a manufacturer sub-chain of the set of manufacturer nodes. The sub-index may include, for example, a first product identification of the first product, a digital identity of the manufacturer node registered in the backbone, summary information of the first data, an access address of the first data, and access right configuration information of the first data.
In some embodiments, the sub-index may also be generated by casting the daughter chain NFT. In this case, the block link points in the node set in the system are used to save the sub-index for tracing back the first data in the sub-chain of the node set by:
casting a child chain NFT in a child chain of the set of nodes based on a first product identification of the first product, a second digital identity of the blockchain node registered in the main chain, summary information of the first data, an access address of the first data, and access right configuration information of the first data, resulting in the child index; wherein the owner of the child chain NFT comprises the second digital identity.
Following the above example of a manufacturer node, the manufacturer node may cast a sub-chain NFT according to a first product identifier, a digital identity registered in a main chain by the manufacturer node, summary information of the first data, an access address of the first data, and access right configuration information of the first data, thereby obtaining the sub-index.
Here, the summary information of the first data may be obtained by performing a summary calculation on the first data by a summary algorithm, for example. The access address of the first data, which may be set by the manufacturer node based on the application requirements, may point to, for example, a down-link storage system of the manufacturer node. As an example, the access authority configuration information may be set to be "readable by the administrator", in which case, the administrator can access the first data through the access address of the first data, and the other end cannot acquire the first data through the access address of the first data.
It should be noted that the data stored on the blockchain is in an open state, that is, the relevant participant of the blockchain can obtain the data. In this case, it is difficult to determine the attribution of the data on the chain, and there is no standardized way to determine the owner of the data (e.g., to which vendor). In data authorization, there is no effective basis for authorization and authorization determination.
In the above technical solution, the sub-chain NFT is cast by the related information of the first data (the first product identifier, the digital identity registered in the main chain by the manufacturer node, the summary information of the first data, the access address of the first data, and the access authority configuration information of the first data), and the digital identity of the manufacturer node is written in the owner information of the sub-chain NFT. In this way, the owner of the sub-chain NFT, that is, the owner of the data, can perform authorization and authorization management of the data using the standardized interface of the NFT technology and the access authority configuration information in the sub-chain NFT.
Moreover, there may be a plurality of owners of the child chain NFT, and the owners of the child chain NFT may also be added based on a standardized interface of the NFT technology. Therefore, compared with a certificate and other rights management modes, the NFT can adapt to a scene that a plurality of participants maintain a group of data together, namely, a data tracing scene that a product link is complex and the product is associated with multiple parties can be met.
It should be noted that, in addition to the above described manner of casting the daughter strand NFT, the daughter strand NFT may be cast in combination with other information according to the application requirements. Such information may include, but is not limited to: product identification token of a product corresponding to the data, time information time of the data, phase identification index of the data, description information description of the data, attribute information attributes of the data, access address URL (Uniform Resource locator) of the data, summary information digest of the data, owner information owener of the data, supervisor information surviver of the data, supervision policy survivor rule of the data, and access right configuration information traceRule of the data.
As an example, a daughter chain NFT cast by a manufacturer node may include the following information:
Figure BDA0003784709210000101
Figure BDA0003784709210000111
after a block link point in a node set saves a sub-index for tracing back the first data in a sub-chain of the node set, access information of the sub-index may be saved into a main index of the first product. Wherein the primary index is stored in a main chain of the blockchain network, and the access information comprises information of a sub-chain to which the sub-index belongs and a first stage identification of the first product stage.
Here, in some implementation scenarios, the primary index for the first product may not have been generated in the main chain, in which case the primary index for the first product may be generated first.
For example, in some embodiments, each blockchain node has digital identity information registered in the backbone, the set of nodes includes a set of production nodes, any production node in the set of production nodes is configured to,
generating a first product identifier of the first product in response to production of the first product, and casting an NFT (hereinafter referred to as a backbone NFT) in the backbone based on the first product identifier and a first digital identity of the production node to obtain a primary index of the first product, wherein an owner of the backbone NFT includes the first digital identity.
Here, the production node may include, for example, the manufacturer node in the above example. A manufacturer node may respond to production of a first product (e.g., production complete or add to a production sequence) to generate a first product identification for the first product, cast a backbone NFT in the backbone based on the first product identification, a first digital identity of the production node, and obtain a primary index for the first product. In this way, a production node may maintain sub-indexed access information into the main chain NFT of the first product.
Thus, by casting the backbone NFT and writing the digital identity of the manufacturer node into the owner information of the backbone NFT, the owner of the backbone NFT is the home for the data. On the basis, the standardized interface of the NFT technology can be utilized to carry out authorization and authority management on data.
In some implementations, the primary index of the first product already exists in the main chain, in which case the tile chain nodes in the set of nodes are used to save the access information of the sub-index into the primary index of the first product by:
adding access information of the sub-index into the NFT if an owner of the NFT includes a second digital identity of the blockchain node;
sending a permission request to an owner of the NFT when the owner of the NFT does not include the second digital identity, the permission request being used to obtain owner permission of the NFT, the permission request including the second digital identity.
For example, the blockchain node may obtain a main chain NFT of a first product to determine owner information for the main chain NFT. In the event that the owner information includes the second digital identity, i.e., the blockchain node is the owner of the main chain NFT of the first product, the blockchain node may maintain the sub-index into the main chain NFT. In the case that the owner information does not include the second digital identity, that is, the blockchain node is not the owner of the main chain NFT of the first product, the blockchain node may send a permission request to the owner of the NFT, the permission request being used to obtain owner permission of the NFT, the permission request including the second digital identity.
Here, each owner of the main chain NFT may, for example, verify the permission request according to a set authorization rule to determine whether the second digital identity meets an authorization condition. In the event that the second digital identity meets an authorization condition, the second digital identity may be added to owner information of the backbone NFT such that the blockchain nodes obtain common ownership of the backbone NFT.
In the event that common ownership of the main chain NFT is obtained, the blockchain node may maintain sub-index access information into the main chain NFT. As an example, the main chain NFT maintained by the blockchain node of each node set may include the following information:
{
"tokenId":"123456",
"description": this is a whole car tracing example ",
"NFTowner": manufacturer A, supplier A, carrier A, vendor A ",
"supply link access information" [ { "supply link number": 66080 xxxxxx ",
"data body": "supplier a",
the 'subchain': the "donor chain a" },
{ "supply stage number": 66081XXXXX ",
"data body": "supplier a",
a "daughter chain": "donor chain A" } ],
manufacturing link access information { "manufacturing link number:" L6T7752Z7NE0 xxxxxx ",
"data body": "manufacturer a",
the 'subchain': the "manufacturer sub-chain a" },
transport link access information { "transport link number": SF10394504 xxxxxx ",
"data body": "carrier a",
the 'subchain': the "carrier sub-chain a" },
the 'sales link access information' { 'sales link number': 'SF 10394504 XXXXX',
"data body": "vendor A",
the 'subchain': "vendor child chain a" },
}
referring to fig. 1, in the system, a data tracing end is configured to determine a target product corresponding to data to be traced, obtain a target primary index of the target product from the main chain, obtain target access information by matching from the target primary index based on target product processing stage information corresponding to the data to be traced, access a target sub-chain associated with the target access information to obtain a target sub-index, and obtain the data to be traced from a storage space under the chain according to the target sub-index.
The following describes a data tracing process at the data tracing end. In some implementation scenarios, the data tracing end knows the target product identification of the target product to be traced. In this case, the data tracing end may perform forward tracing according to the target product identifier.
Following the example of the main chain NFT, when the target product traced back by the data tracing back end is the first product (product identifier is 123456), and the stage of the traced back target product is a sales stage, the data tracing back end may match the target main index of the target product from the main chain according to the product identifier "123456", and match the target access information corresponding to the sales stage from the target main index:
"sales link number": SF10394504XXXXX ",
"data body": "vendor A",
the 'subchain': "distributor subchain A"
In this way, the data tracing end may obtain the data to be traced from the storage space under the link in the following manner:
and acquiring a target sub-chain NFT associated with the target access information, and initiating a data acquisition request according to an access address of data to be traced in the target sub-chain NFT.
For example, the data tracing end may access the vendor sub-chain a based on the target access information, and obtain the target sub-chain NFT with the product identifier "123456" from the vendor sub-chain a by matching based on the product identifier "123456". In this way, the data tracing end may initiate a data acquisition request according to the access address of the data to be traced in the target child chain NFT.
The block link point receiving the data acquisition request is used for verifying the access authority of the data tracing end according to the access authority configuration information of the data to be traced in the target sub-chain NFT; and sending the data to be traced back to the data tracing back end under the condition that the verification is passed.
For example, the access right configuration information in the target child chain NFT may include "market authority readable". In this case, the block link point may verify the access right of the data tracing end, and determine whether the identity information of the data tracing end matches the identity information of the market monitoring authority. In the case of successful matching, the blockchain node may send sales data of the product "123456" in the down-chain storage space to the data trace back end. And under the condition of failed matching, rejecting the data acquisition request of the data tracing end.
Through the mode, authority management and control can be carried out on the data tracing process, and the data tracing method is favorable for guaranteeing the safety of data.
In some implementation scenarios, what is known to the data tracing end may be a stage identifier of a certain product stage of a target product that needs to be traced, but lacks the target product identifier of the target product. In this case, the data tracing end can perform reverse tracing, so as to determine a target product corresponding to the data to be traced.
The procedure of backward tracing is exemplified below.
In a possible implementation manner, the data tracing end is configured to determine a target product corresponding to data to be traced by:
acquiring processing stage information of a target product where data to be traced is located to obtain a target stage identifier; and sending a query request to a target block chain node in the node set of the target product processing stage, wherein the query request comprises the target stage identification.
For example, the target product processing stage may be a selling stage, and the data tracing end may determine an identifier of the selling stage according to target product processing stage information (such as time information, location information, invoice information, and the like) to obtain the target stage identifier. In this way, the data tracing end may send a query request to a target blockchain node in the node set of the selling stage, where the query request includes the target stage identifier.
Here, the target block chain node may query, for example, a target product identifier of a target product corresponding to the target phase identifier according to the established index tree.
The process of constructing the index tree is explained below. In some implementation scenarios, the block chain node in the node set is used to construct a leaf node, the leaf node comprises a hash table, and a mapping relationship between the first stage identifier and a first product identifier of a first product is stored by the leaf node; and constructing an index tree according to the leaf nodes.
For example, the block chain node may preset a hash value address interval of a hash table, and divide the hash value address interval into a plurality of hash value address sub-intervals. In this way, a plurality of leaf nodes may be constructed, each leaf node being configured to hold data for one hash value address subinterval.
Fig. 3 is a schematic diagram of a leaf node shown in the present disclosure, which may include one or more (illustrated in multiple figures) hash tables. Each hash table may be provided with a corresponding freelist variable, which includes a head record pointer h-ptr, a num field, an overflow pointer of-ptr, and a link-r field. Wherein the head record pointer h-ptr is used to point to the top of the hash table, and the link-r field is used to point to the next hash table of the leaf node. When one leaf node reaches the preset capacity, a new leaf node can be generated, and the overflow pointer of-ptr points to the newly generated leaf node. In addition, the num field may be used to describe a hash value address interval of the hash table.
It should be understood that the hash table includes a storage location (e.g., a hash value address) determined by the hash value of a key, and a key value corresponding to the key stored at the storage location. The storage locations may be sorted based on the size of the hash value, and the num field describes the hash value address interval of each hash table. For example, when num is 10000, the hash value address range corresponding to the storage location of the hash table 1 is [ hash, hash +10000], and the hash is the hash value of the initial storage location of the hash table 1. Similarly, the address interval of the hash value corresponding to the storage location of the hash table 2 is [ hash +10000, hash +20000].
In this way, the block link point may store the mapping relationship between the first stage identifier and the first product identifier of the first product by:
calculating a first hash value according to the first stage identification;
determining a first leaf node for storing the first product identifier and a storage position of the first product identifier in a hash table of the first leaf node according to the first hash value and the hash value of each leaf node;
saving the first product identifier to the storage location of the hash table.
For example, when the first hash value is located in the hash value address interval [ hash, hash +10000], the first product identifier may be saved in an address at the first hash value in the hash table.
The block chain nodes can also construct an index tree according to the constructed leaf nodes. For example, the blockchain node may construct a parent leaf node for each target leaf node pair that includes two leaf nodes whose hash values are adjacent, and the leaf nodes included in different target leaf node pairs are all different. The hash value of the initial storage position in the hash table of the leaf node is used as the hash value of the leaf node, and the hash value of the leaf node with the smaller hash value in the leaf node pair is used as the hash value of the constructed father leaf node.
And taking the father leaf node adjacent to the hash value as a new target leaf node pair, and repeatedly executing the step of constructing the father leaf node for each target leaf node pair until the root node is obtained.
Fig. 4 is a schematic diagram of an index tree shown in the present disclosure, and a block chain node may construct 4 leaf nodes, for example. Where leaf node 1 and leaf node 2 may be considered as a set of leaf node pairs and leaf node 3 and leaf node 4 may be considered as a set of leaf node pairs. In this way, the hash values of leaf node 1 and leaf node 2 may be compared when determining the parent leaf nodes of leaf node 1 and leaf node 2. And taking the hash value of the initial storage position in the hash table of the leaf node as the hash value of the leaf node. For example, in the case where the leaf node 1 is the leaf node shown in fig. 3, the hash value of the start storage location may be used as the hash value of the leaf node 1. If the hash value of the leaf node 1 is smaller, the hash value of the leaf node 1 is used as the hash value of the parent leaf node (i.e., the leaf node 5).
In addition, the parent leaf nodes adjacent to the hash value may be used as new target leaf node pairs (e.g., leaf node 5 and leaf node 6), and the above steps of constructing the parent leaf node for each target leaf node pair may be repeatedly performed until the root node is obtained, so as to construct the index tree.
In this way, the target block chain node can query the product identification according to the established index tree. For example, a target block chain node may respond to a query request of a data trace back end, query a local index tree according to a target stage identifier in the query request, and send a query result including the target product identifier to the data trace back end when a target product identifier corresponding to the target stage identifier is queried, where the target product identifier is used by the data trace back end to determine a target product corresponding to the data to be traced back.
As an example, the target block link point may query the local index tree by:
calculating a second hash value according to the target stage identifier;
matching the second hash value with the hash values of the leaf nodes of the index tree to obtain a target leaf node of which the hash value range covers the second hash value;
and traversing the hash table of the target leaf node to obtain a target product identifier corresponding to the target stage identifier.
Wherein the hash value range of a leaf node may be determined based on the hash value of the leaf node and the num field in the leaf node. In some embodiments, the hash value range of the leaf node may also be determined according to the hash values of the adjacent leaf nodes, that is, when the second hash value is greater than the hash value of the leaf node a and less than the hash value of the adjacent leaf node of the leaf node a, it may be determined that the hash value range of the leaf node a covers the second hash value. In this way, the target product identifier corresponding to the target stage identifier may be obtained from the storage address "second hash value" by traversing the hash table of the target leaf node. Under the condition of obtaining the target product identifier, the data to be traced can be obtained in a forward tracing manner, wherein the forward tracing implementation manner refers to the description in the above embodiments, which is not described in detail in this disclosure.
In some scenarios, the target blockchain node may not match to the target leaf node. In this case, the target blockchain node may be configured to send a target query request to a plurality of blockchain nodes in the node set to which the target blockchain node belongs, where the target query request is used for the plurality of blockchain nodes to query a local index tree according to the second hash value;
and determining the target product identification according to the query results of the plurality of block chain nodes.
For example, a target blockchain node may send, by thread wake-up, an inquiry request to other blockchain nodes in the node set to which the target blockchain node belongs, where the inquiry request includes the second hash value. By the mode, data query can be performed by combining a plurality of block chain link points in the node set, so that the effect of parallel query is achieved, and the data query efficiency is improved.
Of course, in some implementation scenarios, the data tracing end may also send a query request to a plurality of or all nodes in the node set, so as to perform data query in combination with a plurality of block link points in the node set, thereby achieving the effect of parallel query. In this case, the target block link point may include a plurality or all of the nodes in the node set, which is not limited by the present disclosure.
In the above technical solution, a plurality of block chain nodes in the same product processing stage may form a node set of the product processing stage, and form the sub-chain of the product processing stage in a common manner. In this way, the blockchain node may save the data generated in the product processing stage into the down-chain storage space, save the sub-index of the data on the sub-chain, and maintain the access information of the sub-index into the main index of the corresponding product in the main chain. In this way, the data tracing end can obtain the main index of the product to be queried from the main chain, and further obtain the access information of the sub-indexes corresponding to each product processing stage under the main index. Therefore, the corresponding sub-chain can be accessed according to the data tracing requirement, so that the corresponding sub-index is obtained, and the data entity stored in the storage space under the chain is accessed according to the obtained sub-index, so that the data tracing is realized.
That is, a master index of products may be maintained in the master chain and maintained by each chunk link point that produces data. For example, a chunk chain node may maintain access information for a sub-index of data generated by itself into the primary index. By the mode, the data generated by the product in each product processing stage can be correlated and intercommunicated, and the method is beneficial to traceability. Moreover, the main index maintains a tracing mode of the sub-index, and the sub-index maintains a tracing mode of the data entity under the chain, namely the data entity is still stored under the chain by each party, so that the technical scheme is also beneficial to ensuring the privacy and the safety of the data. Meanwhile, a multi-level data tracing mode of combining a main chain and a sub chain and combining an on-chain index and an off-chain data entity is adopted, so that the authority management and the authority control are facilitated, and the data security is further guaranteed.
Based on the same inventive concept, the present disclosure also provides a data tracing method, which is used for the data tracing system based on the block chain provided by the present disclosure. Fig. 5 is a flow chart of a data tracing method illustrated in the present disclosure, and referring to fig. 5, the method includes:
in step S51, the block link nodes in each node set save the first data of the first product in the first product phase to the downlink storage space.
And the first product stage is a product processing stage corresponding to the block chain node.
In step S52, the block link point stores a sub-index for tracing back the first data in the sub-chain of the node set, and stores access information of the sub-index into the primary index of the first product.
The primary index is stored in a main chain of the block chain network, and the access information includes information of a sub-chain to which the sub-index belongs and a first stage identification of the first product stage.
In step S53, the data tracing end determines a target product corresponding to the data to be traced.
In step S54, the data trace back end obtains the target primary index of the target product from the main chain.
In step S55, the data tracing end matches the target access information from the target main index based on the target product processing stage information corresponding to the data to be traced.
In step S56, the data tracing end accesses the target sub-chain associated with the target access information to obtain a target sub-index.
In step S57, the data tracing end obtains the data to be traced from the storage space under the chain according to the target sub-index.
In the above technical solution, a plurality of block chain nodes in the same product processing stage may form a node set of the product processing stage, and form the sub-chain of the product processing stage in a common manner. In this way, the blockchain node may save the data generated in the product processing stage into the down-chain storage space, save the sub-index of the data on the sub-chain, and maintain the access information of the sub-index into the main index of the corresponding product in the main chain. In this way, the data tracing end can obtain the main index of the product to be queried from the main chain, and further obtain the access information of the sub-indexes corresponding to each product processing stage under the main index. Therefore, the corresponding sub-chain can be accessed according to the data tracing requirement, so that the corresponding sub-index is obtained, and the data entity stored in the storage space under the chain is accessed according to the obtained sub-index, so that the data tracing is realized.
That is, a master index of products may be maintained in the master chain and maintained by each chunk link point that produces data. For example, a chunk chain node may maintain access information for a sub-index of data generated by itself into the primary index. By the mode, the data generated by the product in each product processing stage can be correlated and intercommunicated, and the method is beneficial to traceability. Moreover, the main index maintains a tracing mode of the sub-index, and the sub-index maintains a tracing mode of the data entity under the chain, namely the data entity is still stored under the chain by each party, so that the technical scheme is also beneficial to ensuring the privacy and the safety of the data. Meanwhile, a multi-level data tracing mode that a main chain is combined with a sub-chain and an index on the chain is combined with a data entity under the chain is adopted, so that the authority management and the authority control are facilitated, and the safety of data is further guaranteed.
Optionally, the blockchain node registers digital identity information in the main chain, the node set includes a production node set, and the method includes:
any production node in the set of production nodes generates a first product identification for the first product in response to production of the first product;
the production node casts a non-homogeneous token NFT in the backbone based on the first product identification, a first digital identity of the production node, resulting in a primary index of the first product, wherein an owner of the NFT includes the first digital identity.
Optionally, the saving the access information of the sub-index into the main index of the first product includes:
adding access information of the sub-index into the NFT if an owner of the NFT includes a second digital identity of the blockchain node;
sending a permission request to an owner of the NFT when the owner of the NFT does not include the second digital identity, the permission request being used to obtain owner permission of the NFT, the permission request including the second digital identity.
Optionally, the saving, in the child chain of the node set, a child index for tracing back the first data includes:
casting a child chain NFT in a child chain of the set of nodes based on a first product identification of the first product, a second digital identity of the blockchain node registered in the main chain, summary information of the first data, an access address of the first data, and access right configuration information of the first data, resulting in the child index;
wherein the owner of the child chain NFT comprises the second digital identity.
Optionally, the obtaining, by the data tracing end, the data to be traced from the down-link storage space according to the target sub-index includes: the data tracing end obtains a target sub-chain NFT associated with the target access information, and initiates a data obtaining request according to an access address of data to be traced in the target sub-chain NFT;
the method further comprises the following steps: the block link point receiving the data acquisition request checks the access authority of the data tracing end according to the access authority configuration information of the data to be traced in the target sub-chain NFT; and sending the data to be traced to the data tracing end under the condition that the verification is passed.
Optionally, the method further comprises:
constructing leaf nodes by the block chain link points in the node set, wherein the leaf nodes comprise hash tables;
the block chain node stores the mapping relation between the first stage identifier and a first product identifier of a first product through the leaf node;
the block chain nodes construct an index tree according to the leaf nodes;
the data tracing end determines a target product corresponding to the data to be traced, and the method comprises the following steps:
the data tracing end obtains information of a target product processing stage where data to be traced is located to obtain a target stage identifier;
the data tracing end sends a query request to a target block chain node in the node set of the target product processing stage, wherein the query request comprises the target stage identification;
the method further comprises the following steps:
and responding to the query request by the target block chain node, querying a local index tree according to the target stage identifier, and sending a query result including the target product identifier to the data tracing end under the condition that the target product identifier corresponding to the target stage identifier is queried, wherein the target product identifier is used for the data tracing end to determine a target product corresponding to the data to be traced.
Optionally, the block link points construct an index tree, including:
the block link node establishes a father leaf node aiming at each target leaf node pair, wherein the target leaf node pair comprises two adjacent leaf nodes with hash values, the leaf nodes in different target leaf node pairs are different, the hash value of an initial storage position in a hash table of the leaf node is used as the hash value of the leaf node, and the hash value of the leaf node with the smaller hash value in the leaf node pair is used as the hash value of the father leaf node;
and the block node nodes take father leaf nodes adjacent to the hash values as new target leaf node pairs, and the step of constructing the father leaf nodes for each target leaf node pair is repeatedly executed until the root nodes of the index tree are obtained.
Optionally, the storing, by the leaf node, a mapping relationship between the first stage identifier and a first product identifier of a first product by the blockchain node includes:
the block chain node calculates a first hash value according to the first stage identification;
determining, by a blockchain node, a first leaf node storing the first product identifier and a storage location of the first product identifier in a hash table of the first leaf node according to the first hash value and hash values of the leaf nodes;
block chaining point saving the first product identification to the storage location of the hash table.
Optionally, the querying a local index tree according to the target phase identifier includes:
the target block chain node calculates a second hash value according to the target stage identifier;
matching the second hash value with the hash values of the leaf nodes of the index tree by the target block link point to obtain a target leaf node of which the hash value range covers the second hash value;
a target block chain node traverses a hash table of a target leaf node to obtain a target product identifier corresponding to the target stage identifier;
the method further comprises the following steps: under the condition that a target leaf node is not matched, a target block chain node sends a target query request to a plurality of block chain nodes in a node set to which the target block chain node belongs, wherein the target query request is used for the plurality of block chain nodes to query a local index tree according to the second hash value;
and the target block chain node determines the target product identifier according to the query result of the plurality of block chain nodes.
As to the above method steps, the specific implementation manner thereof has been described in detail in the above system embodiment, and for the sake of brevity of the description, details of the method steps are not described herein in this disclosure.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-mentioned data tracing method when executed by the programmable apparatus.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that, in the foregoing embodiments, various features described in the above embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, various combinations that are possible in the present disclosure are not described again.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure as long as it does not depart from the gist of the present disclosure.

Claims (10)

1. A data tracing system based on a block chain is characterized by comprising a data tracing end and a plurality of block chain nodes in a block chain network, wherein each block chain link point corresponds to a processing stage of a product, the block chain link points corresponding to the same product processing stage form a node set of the product processing stage, the block chain link points in the node set are commonly identified to form a sub-chain of the block chain network,
the block chain link points in each node set are used for storing first data of a first product in a first product stage to a storage space under a chain, and the first product stage is a product processing stage corresponding to the block chain nodes; saving a sub-index for tracing the first data in a sub-chain of the node set, and saving access information of the sub-index into a main index of the first product, wherein the main index is saved in a main chain of the block chain network, and the access information comprises information of the sub-chain to which the sub-index belongs and a first stage identifier of the first product stage;
the data tracing end is used for determining a target product corresponding to data to be traced, acquiring a target main index of the target product from the main chain, matching and acquiring target access information from the target main index based on target product processing stage information corresponding to the data to be traced, accessing a target sub-chain associated with the target access information to acquire a target sub-index, and acquiring the data to be traced from a storage space under the chain according to the target sub-index.
2. The blockchain-based data tracing system of claim 1, wherein said blockchain nodes have digital identity information registered in said backbone, said set of nodes comprising a set of production nodes, any production node in said set of production nodes configured to,
in response to production of the first product, generating a first product identification for the first product, casting a non-homogeneous token, NFT, in the backbone based on the first product identification, a first digital identity for the production node, resulting in a primary index for the first product, wherein an owner of the NFT includes the first digital identity.
3. The blockchain-based data tracing system of claim 2, wherein the blockchain link points in the set of nodes are used to save the access information of the sub-index into the main index of the first product by:
adding access information of the sub-index into the NFT if an owner of the NFT includes a second digital identity of the blockchain node;
sending a permission request to an owner of the NFT when the owner of the NFT does not include the second digital identity, the permission request being used to obtain owner permission of the NFT, the permission request including the second digital identity.
4. The system according to claim 1, wherein the block chain based data tracing system is configured to save a sub-index for tracing back the first data in a sub-chain of the node set by:
casting a child chain NFT in a child chain of the set of nodes based on a first product identification of the first product, a second digital identity of the blockchain node registered in the main chain, summary information of the first data, an access address of the first data, and access right configuration information of the first data, resulting in the child index;
wherein the owner of the child chain NFT comprises the second digital identity.
5. The data tracing system based on the block chain as claimed in claim 4, wherein the data tracing end is configured to obtain the data to be traced from the down-chain storage space by:
acquiring a target sub-chain NFT associated with the target access information, and initiating a data acquisition request according to an access address of data to be traced in the target sub-chain NFT;
the block link point receiving the data acquisition request is used for verifying the access authority of the data tracing end according to the access authority configuration information of the data to be traced in the target sub-chain NFT; and sending the data to be traced to the data tracing end under the condition that the verification is passed.
6. The system according to any one of claims 1 to 5, wherein the block chain link points in the node set are used to construct leaf nodes, a leaf node comprising a hash table, and a mapping relationship between the first stage identifier and the first product identifier of the first product is stored by the leaf node; constructing an index tree according to the leaf nodes;
the data tracing end is used for determining a target product corresponding to the data to be traced in the following mode: acquiring processing stage information of a target product where data to be traced is located to obtain a target stage identifier; sending a query request to a target block chain node in a node set of a target product processing stage, wherein the query request comprises the target stage identification;
the target block chain link point is used for responding to the query request, querying a local index tree according to the target stage identifier, and sending a query result including the target product identifier to the data tracing end under the condition that the target product identifier corresponding to the target stage identifier is queried, wherein the target product identifier is used for the data tracing end to determine a target product corresponding to the data to be traced.
7. The blockchain based data tracing system of claim 6, wherein the blockchain nodes construct the index tree by:
constructing a father leaf node aiming at each target leaf node pair, wherein the target leaf node pair comprises two adjacent leaf nodes with hash values, and the leaf nodes in different target leaf node pairs are different, the hash value of an initial storage position in a hash table of the leaf node is used as the hash value of the leaf node, and the hash value of the leaf node with the smaller hash value in the leaf node pair is used as the hash value of the father leaf node obtained through construction;
and taking the father leaf node adjacent to the hash value as a new target leaf node pair, and repeatedly executing the steps of constructing the father leaf node pair for each target leaf node pair until the root node of the index tree is obtained.
8. The blockchain-based data tracing system of claim 6, wherein the blockchain node stores the mapping of the first stage identification and the first product identification of the first product by:
calculating a first hash value according to the first stage identification;
determining a first leaf node for storing the first product identifier and a storage position of the first product identifier in a hash table of the first leaf node according to the first hash value and the hash value of each leaf node;
saving the first product identifier to the storage location of the hash table.
9. The blockchain based data tracing system of claim 6, wherein said target blockchain node is configured to query a local index tree by:
calculating a second hash value according to the target stage identifier;
matching the second hash value with the hash values of the leaf nodes of the index tree to obtain a target leaf node of which the hash value range covers the second hash value;
traversing a hash table of a target leaf node to obtain a target product identifier corresponding to the target stage identifier;
the target block chain node is further configured to, in the case that a target leaf node is not matched, send a target query request to a plurality of block chain nodes in a node set to which the target block chain node belongs, where the target query request is used for the plurality of block chain nodes to query a local index tree according to the second hash value;
and determining the target product identification according to the query results of the plurality of block chain nodes.
10. A data tracing method for use in the block chain based data tracing system of any one of claims 1 to 9, the method comprising:
the block chain nodes in each node set store first data of a first product in a first product stage to a down-chain storage space, wherein the first product stage is a product processing stage corresponding to the block chain nodes;
the block chain node saves a sub index used for tracing the first data in a sub chain of the node set, and saves access information of the sub index into a main index of the first product, wherein the main index is saved in a main chain of the block chain network, and the access information comprises information of the sub chain to which the sub index belongs and a first stage identifier of the first product stage;
the data tracing end determines a target product corresponding to the data to be traced;
the data tracing end obtains a target main index of the target product from the main chain;
the data tracing end matches and obtains target access information from the target main index based on target product processing stage information corresponding to the data to be traced;
the data tracing end accesses the target sub-chain associated with the target access information to obtain a target sub-index;
and the data tracing end acquires the data to be traced from the storage space under the chain according to the target sub-index.
CN202210938971.5A 2022-08-05 2022-08-05 Data tracing system and data tracing method based on block chain Pending CN115392927A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210938971.5A CN115392927A (en) 2022-08-05 2022-08-05 Data tracing system and data tracing method based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210938971.5A CN115392927A (en) 2022-08-05 2022-08-05 Data tracing system and data tracing method based on block chain

Publications (1)

Publication Number Publication Date
CN115392927A true CN115392927A (en) 2022-11-25

Family

ID=84118912

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210938971.5A Pending CN115392927A (en) 2022-08-05 2022-08-05 Data tracing system and data tracing method based on block chain

Country Status (1)

Country Link
CN (1) CN115392927A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117539962A (en) * 2024-01-09 2024-02-09 腾讯科技(深圳)有限公司 Data processing method, device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117539962A (en) * 2024-01-09 2024-02-09 腾讯科技(深圳)有限公司 Data processing method, device, computer equipment and storage medium
CN117539962B (en) * 2024-01-09 2024-05-14 腾讯科技(深圳)有限公司 Data processing method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US11425108B2 (en) Blockchain-based service data encryption methods and apparatuses
CN111159288B (en) Method, system, device and medium for storing, verifying and realizing chained structure data
CN111460395B (en) Shared data storage and copyright protection tracing method and system
CN109189962B (en) License service implementation system based on block chain
CN108681965B (en) Block chain network transaction processing method and device for offline node
CN109829326B (en) Cross-domain authentication and fair audit de-duplication cloud storage system based on block chain
CN110912707B (en) Block chain-based digital certificate processing method, device, equipment and storage medium
CN109189751B (en) Data synchronization method based on block chain and terminal equipment
CN108734028B (en) Data management method based on block chain, block chain link point and storage medium
US20230316273A1 (en) Data processing method and apparatus, computer device, and storage medium
CN109255056B (en) Data reference processing method, device, equipment and storage medium of block chain
CN110324331B (en) Block chain-based identity authentication method for safety and stability control terminal of power system
CN110989922B (en) Distributed data storage method and system
TW202026983A (en) Credibility verification method of alliance chain, system, device and apparatus
CN110620776B (en) Data transfer information transmission method and device
CN109766724A (en) Data evidence storing method based on block chain
CN112818056A (en) Log security sharing method, system and device of block chain
CN115392927A (en) Data tracing system and data tracing method based on block chain
CN114612115A (en) Industrial product traceability information storage method, traceability method and device based on block chain
CN110910110A (en) Data processing method and device and computer storage medium
CN109858285B (en) Block chain data processing method, device, equipment and medium
CN112488834B (en) Node management method, node management device, electronic equipment and readable storage medium
CN115694847A (en) Equipment management method, system and device
CN115589298B (en) Method, device, system, equipment and medium for verifying information of block chain
CN111565173A (en) Intelligent contract management method and device for block chain system and hardware equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination