CN113746638B - NFT storage method, NFT restoration method, computer device, and storage medium - Google Patents

NFT storage method, NFT restoration method, computer device, and storage medium Download PDF

Info

Publication number
CN113746638B
CN113746638B CN202111033387.7A CN202111033387A CN113746638B CN 113746638 B CN113746638 B CN 113746638B CN 202111033387 A CN202111033387 A CN 202111033387A CN 113746638 B CN113746638 B CN 113746638B
Authority
CN
China
Prior art keywords
nft
fragment
verification
index
fragmentation
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.)
Active
Application number
CN202111033387.7A
Other languages
Chinese (zh)
Other versions
CN113746638A (en
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.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei Technology Co Ltd
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 Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN202111033387.7A priority Critical patent/CN113746638B/en
Publication of CN113746638A publication Critical patent/CN113746638A/en
Application granted granted Critical
Publication of CN113746638B publication Critical patent/CN113746638B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3218Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using proof of knowledge, e.g. Fiat-Shamir, GQ, Schnorr, ornon-interactive zero-knowledge proofs
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides an NFT storage method, an NFT restoration method, computer equipment and a storage medium, wherein the method comprises the following steps: executing a first configuration transaction, and storing first authentication parameters for authenticating each NFT fragment of a first NFT into an NFT fragment authentication contract; executing a first verification transaction, inputting a first fragmentation hash, a first fragmentation index, first certification information and a first verification parameter submitted by the first verification transaction into a verification algorithm of a zero-knowledge certification circuit for verification: if the verification fails, recording a first verification result of the first NFT fragment verified by the first verification transaction request, which is not the first NFT fragment corresponding to the first fragment index of the first NFT, to the block chain; and if the first NFT fragment passes the verification, recording a second verification result of the NFT fragment corresponding to the first NFT fragment index of the first NFT fragment to the block chain. The method and the device realize the reduction of the leakage risk of the original data of the digital assets marked by the NFT, and can verify the data on the block chain on the premise of not disclosing the original data.

Description

NFT storage method, NFT restoration method, computer device, and storage medium
Technical Field
The present application relates to the field of block chain technology, and in particular, to an NFT storage method, an NFT restoration method, a computer device, and a storage medium.
Background
The NFT is called Non-feather Token in english, i.e. Non-homogeneous Token, and has the characteristics of inseparability, irreplaceability, uniqueness, etc.
Correspondingly, a homogenous token is a token where each token is identical, e.g. one token and another token, which are identical without any difference;
current NFTs are applied in such a way that each unique NFT can be marked as a proprietary tag of a unique digital asset, e.g., NFT 1 NFT as a digital avatar ownership tag 2 As an ownership token for a virtual cat in a game, etc.
The above-described scheme has a problem in that, when a digital asset marked by an NFT is a digital asset that needs to be kept secret, for example, a recipe, a trade secret, etc., an owner of the NFT is at risk of various types of theft online or offline if the original data of the digital asset is stored locally, and lacks a means of verifying data on a blockchain without disclosing the original data if the original data of the digital asset is stored in various types of storage servers. For example, the first user stores a fragment of original data of a certain digital asset in the server a, and when the first user needs to restore the digital asset, the first user cannot obtain a correct fragment from the server a, at this time, the first user and the second user may perform a word, the server a considers that the first user stores wrong data from the beginning, and the first user considers that the server a loses his data.
Disclosure of Invention
In view of the above-mentioned deficiencies or inadequacies in the prior art, it would be desirable to provide an NFT storage method, an NFT restore method, a computer device, and a storage medium that reduce the risk of leakage of raw data of an NFT tagged digital asset, while allowing verification of the data on a blockchain without disclosing the raw data.
In a first aspect, the present invention provides an NFT storage method applicable to a blockchain node, where a blockchain is deployed with an NFT slice verification contract, and the NFT slice verification contract is configured with a zero-knowledge proof circuit for verifying NFT slices, and the method includes:
executing a first configuration transaction, and storing first authentication parameters for authenticating each NFT segment of a first NFT into an NFT segment authentication contract; the first verification parameter is generated by a user side of a first NFT holder according to a generation algorithm of a zero knowledge proof circuit and a tree root of a first Mercker tree after a plurality of NFT fragments are generated from original data of a digital asset corresponding to the first NFT by using fragment hash of each NFT fragment as a leaf node;
executing a first verification transaction, inputting a first fragmentation hash, a first fragmentation index, first certification information and a first verification parameter submitted by the first verification transaction into a verification algorithm of a zero-knowledge certification circuit for verification:
if the verification fails, recording a first verification result of the first NFT fragment verified by the first verification transaction request, which is not the first NFT fragment corresponding to the first fragment index of the first NFT, to the block chain;
and if the first NFT fragment passes the verification, recording a second verification result of the NFT fragment corresponding to the first NFT fragment index of the first NFT fragment to the block chain.
The first verification transaction is generated by the first storage service terminal by packaging after receiving a first NFT fragment sent by the user terminal, and the first fragmentation hash and the first fragmentation index are respectively the fragmentation hash and the fragmentation index of the first NFT fragment received by the first storage service terminal;
the first certification information is generated by a first storage service terminal by taking the first fragmentation hash and the first fragmentation index as public input of a certification algorithm of a zero-knowledge certification circuit and taking a first NFT fragmentation and a first Merck path of the first NFT fragmentation in a first Merck tree as private input of the certification algorithm;
the first verification result is used for the first storage service end to prove that the received first NFT fragment has errors to the user end and to obtain the first NFT fragment again;
and the second verification result is used for the first storage service terminal to confirm that the first NFT fragment is stored without error.
In a second aspect, the present invention provides an NFT restoring method applied to a blockchain node, where raw data of a digital asset corresponding to a first NFT is sharedly stored in a plurality of storage servers by using the NFT storage method according to the first aspect, the method includes:
and executing a second verification transaction, and inputting a second shard hash, a second shard index, second certification information and a first verification parameter submitted by the second verification transaction into a verification algorithm of the zero-knowledge certification circuit for verification:
if the verification fails, recording a third verification result of the first NFT fragment verified by the second verification transaction request, which is not the NFT fragment corresponding to the second fragment index of the first NFT, to the block chain;
and if the verification is passed, recording a fourth verification result of the NFT fragment corresponding to the second fragment index of the first NFT fragment to the block chain.
The second verification transaction is generated by packaging the first NFT fragment sent back by the first storage server after the user receives the first NFT fragment, and the second fragmentation hash and the second fragmentation index are respectively the fragmentation hash and the fragmentation index of the first NFT fragment sent back by the first storage server received by the user;
the second certification information is generated by the user side by taking the hash of the second fragment and the index of the second fragment as public input of a certification algorithm and taking the first NFT fragment and the first Merckel path as private input of the certification algorithm;
the third verification result is used for the user side to prove that the first NFT fragment sent back to the first storage server side is wrong;
and the fourth verification result is used for the user side to confirm that the first NFT fragment is error-free, and to restore the original data of the digital asset corresponding to the first NFT according to the first NFT fragment and other error-free NFT fragments.
In a third aspect, the present invention further provides an NFT storage method applied to a user end, where a blockchain is deployed with an NFT slice authentication contract, and the NFT slice authentication contract is configured with a zero-knowledge proof circuit for authenticating an NFT slice, where the method includes:
generating a plurality of NFT fragments according to original data of digital assets corresponding to the first NFT;
using the fragment hash of each NFT fragment as a leaf node to generate a first Merck tree;
generating a first verification parameter according to a generation algorithm of a zero-knowledge proof circuit and a tree root of a first Merck tree;
generating a first configuration transaction comprising a first verification parameter in a packaging mode, sending the first configuration transaction to a block chain network for being executed by a block chain node, and storing the first verification parameter into an NFT fragmentation verification contract;
each NFT fragment is respectively sent to at least one storage server, so that a first storage server receiving the first NFT fragment:
using a first fragmentation hash of the received first NFT fragmentation and a first fragmentation index of the received first NFT fragmentation as public input of a certification algorithm of a zero-knowledge certification circuit, and using a first Merck path of the first NFT fragmentation and the first NFT fragmentation in a first Merck tree as private input of the certification algorithm to generate first certification information; and the number of the first and second groups,
packaging and generating a first verification transaction comprising a first fragment hash, a first fragment index and first verification information and sending the first verification transaction to a block chain network for execution by a block chain node, and inputting the first fragment hash, the first fragment index, the first verification information and a first verification parameter into a verification algorithm of a zero-knowledge verification circuit for verification:
if the verification fails, recording a first verification result of the first NFT fragment verified by the first verification transaction request, which is not the first NFT fragment corresponding to the first fragment index of the first NFT, onto the block chain;
and if the first NFT fragment passes the verification, recording a second verification result of the NFT fragment corresponding to the first NFT fragment index of the first NFT fragment to the block chain.
The first verification result is used for the first storage service side to prove that the received first NFT fragment has errors to the current user side and to reacquire the first NFT fragment;
and the second verification result is used for the first storage service terminal to confirm that the first NFT fragment is stored without error.
In a fourth aspect, the present invention further provides an NFT restoring method applicable to a user terminal, where original data of a digital asset corresponding to a first NFT is stored in a plurality of storage service terminals in a fragmented manner by using the NFT storage method according to the third aspect, the method includes:
respectively sending NFT fragment downloading requests to each storage server storing each NFT fragment;
in response to receiving a first NFT fragment sent back by a first storage service end, taking a second fragment hash of the received first NFT fragment and a second fragment index of the received first NFT fragment as public inputs of an attestation algorithm, and taking the received first NFT fragment and a first Merck path as private inputs of the attestation algorithm, generating second attestation information;
packaging to generate a second verification transaction comprising a second shard hash, a second shard index and second certification information, and sending the second verification transaction to the block chain network for the block chain node to execute, and inputting the second shard hash, the second shard index, the second certification information and the first verification parameter into a verification algorithm for verification:
if the verification fails, recording a third verification result of the first NFT fragment verified by the second verification transaction request, which is not the NFT fragment corresponding to the second fragment index of the first NFT, onto the block chain;
if the first NFT fragment passes the verification, recording a fourth verification result of the NFT fragment corresponding to the second fragment index of the first NFT fragment to the block chain;
responding to the obtained third verification result, proving that the sent first NFT fragment is wrong to the first storage server, and downloading the first NFT fragment to the first storage server or another storage server again;
and in response to obtaining the fourth verification result, restoring the original data of the digital asset corresponding to the first NFT according to the first NFT fragment and other error-free NFT fragments.
In a fifth aspect, the present invention further provides an NFT storage method applied to a storage service, where a blockchain is deployed with an NFT slice verification contract, and the NFT slice verification contract is configured with a zero-knowledge proof circuit for verifying an NFT slice, where the method includes:
in response to receiving a first NFT fragment sent by a first user end, taking a first fragment hash of the received first NFT fragment and a first fragment index of the received first NFT fragment as public input of a proving algorithm of a zero-knowledge proving circuit, and taking a first Merck path corresponding to the first NFT fragment and the first NFT fragment as private input of the proving algorithm to generate first proving information;
packaging to generate a first verification transaction comprising a first fragment hash, a first fragment index and first verification information and sending the first verification transaction to a block chain network for execution by a block chain node, and inputting the first fragment hash, the first fragment index, the first verification information and a first verification parameter into a verification algorithm of a zero-knowledge proof circuit for verification:
if the verification fails, recording a first verification result of the first NFT fragment verified by the first verification transaction request, which is not the first NFT fragment corresponding to the first fragment index of the first NFT, to the block chain;
if the first NFT fragment passes the verification, recording a second verification result of the NFT fragment corresponding to the first NFT fragment index of the first NFT fragment to the block chain;
responding to the obtained first verification result, proving that the received first NFT fragment has errors to the user side, and obtaining the first NFT fragment again;
and in response to obtaining the second verification result, confirming that the first NFT fragment is not mistakenly stored.
The first authentication parameter is generated by a user side of a first NFT holder by generating a plurality of NFT fragments from raw data of a digital asset corresponding to the first NFT, generating a first Mercker tree by using fragment hash of each NFT fragment as a leaf node, generating the first Mercker tree according to a generation algorithm of a zero-knowledge proof circuit and a tree root of the first Mercker tree, and storing the first authentication parameter in an NFT fragment authentication contract through configuration transaction.
In a sixth aspect, the present invention further provides an NFT restoring method applicable to a storage service, where raw data of a digital asset corresponding to a first NFT is stored in several storage services in a fragmented manner by using the NFT storage method according to the fifth aspect, where the method includes:
responding to a received NFT fragment downloading request sent by a first user end, sending the first NFT fragment to the first user end, so that the first user end:
using the hash of the second fragment of the received first NFT fragment and the index of the second fragment of the received first NFT fragment as public inputs of an attestation algorithm, and using the received first NFT fragment and a first Merckel path as private inputs of the attestation algorithm to generate second attestation information; and (c) a second step of,
packaging to generate a second verification transaction comprising a second shard hash, a second shard index and second certification information, and sending the second verification transaction to the block chain network for the block chain node to execute, and inputting the second shard hash, the second shard index, the second certification information and the first verification parameter into a verification algorithm for verification:
if the verification fails, recording a third verification result of the first NFT fragment verified by the second verification transaction request, which is not the NFT fragment corresponding to the second fragment index of the first NFT, to the block chain;
and if the verification is passed, recording a fourth verification result of the NFT fragment corresponding to the second fragment index of the first NFT fragment to the block chain.
The third verification result is used for the first user terminal to prove that the first NFT fragment sent back to the current storage service terminal has errors;
and the fourth verification result is used for restoring the original data of the digital asset corresponding to the first NFT by the first user end according to the first NFT fragment and other NFT fragments confirmed to be error-free.
In a seventh aspect, the present invention also provides a computer device comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform a method provided according to embodiments of the present invention.
In an eighth aspect, the present invention also provides a storage medium storing a computer program that causes a computer to execute the method provided according to the embodiments of the present invention.
The NFT storage method, the NFT restoration method, the computer device, and the storage medium provided in the embodiments of the present invention configure, in the intelligent contract, the zero-knowledge proof circuit for verifying the NFT segment, and the verification parameter generated by the tree root of the merkel tree generated by using the segment hash of each NFT segment as a leaf node, so that the storage server/user side can verify whether the stored/stored data is incorrect by the intelligent contract without disclosing the original data, thereby finally reducing the risk of leakage of the original data of the digital asset marked by the NFT, and simultaneously, can verify the data on the block chain without disclosing the original data.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a flowchart of an NFT storage method applied to a blockchain node according to an embodiment of the present invention.
Fig. 2 is a flowchart of an NFT reduction method applied to a block chain node according to an embodiment of the present invention.
Fig. 3 is a flowchart of an NFT storage method applicable to a user end according to an embodiment of the present invention.
Fig. 4 is a flowchart of an NFT recovery method for a user equipment according to an embodiment of the present invention.
Fig. 5 is a flowchart of an NFT storage method applied to a storage server according to an embodiment of the present invention.
Fig. 6 is a flowchart of an NFT recovery method applied to a storage service according to an embodiment of the present invention.
Fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a flowchart of an NFT storage method applied to a blockchain node according to an embodiment of the present invention.
As shown in fig. 1, in this embodiment, the present invention provides an NFT storage method applicable to a blockchain node, including:
s11: executing a first configuration transaction, and storing first authentication parameters for authenticating each NFT fragment of a first NFT into an NFT fragment authentication contract; the first verification parameter is generated by a user side of a first NFT holder according to a generation algorithm of a zero knowledge proof circuit and a tree root of a first Mercker tree after a plurality of NFT fragments are generated from original data of a digital asset corresponding to the first NFT by using fragment hash of each NFT fragment as a leaf node;
s131: executing a first verification transaction, inputting a first fragmentation hash, a first fragmentation index, first certification information and a first verification parameter submitted by the first verification transaction into a verification algorithm of a zero-knowledge certification circuit for verification:
if the verification fails, step S133 is executed: recording a first verification result of an NFT fragment corresponding to a first NFT fragment which is not a first fragment index of a first NFT and is verified by a first verification transaction request to a block chain;
if the verification is passed, step S135 is executed: and recording a second verification result of the NFT fragment corresponding to the first fragment index of the first NFT fragment as the first NFT fragment on the blockchain.
The first verification transaction is generated by the first storage service terminal by packaging after receiving a first NFT fragment sent by the user terminal, and the first fragmentation hash and the first fragmentation index are respectively the fragmentation hash and the fragmentation index of the first NFT fragment received by the first storage service terminal;
the first certification information is generated by a first storage service terminal by taking the first fragmentation hash and the first fragmentation index as public input of a certification algorithm of a zero-knowledge certification circuit and taking a first NFT fragmentation and a first Merck path of the first NFT fragmentation in a first Merck tree as private input of the certification algorithm;
the first verification result is used for the first storage service end to prove that the received first NFT fragment has errors to the user end and to obtain the first NFT fragment again;
and the second verification result is used for the first storage service terminal to confirm that the first NFT fragment is stored without error.
In the present application, the zero knowledge proof circuit is verified based on the following principle:
1. the hash value of NFT shards = = shard hash;
2. fragmentation hash the merckel path corresponding to NFT fragmentation = = merckel root;
3. the shard index should correspond to the merkel path (the merkel path for each shard hash is different).
Those skilled in the art will understand how to generate a zero knowledge proof circuit according to the above verification principle in a zero knowledge proof architecture, the generated zero knowledge proof circuit including a generation algorithm Setup (), a proof algorithm pro (), and a verification algorithm Verify (). The detailed process is not described herein.
NFT is held by user B as follows 3 ,NFT 3 The method shown in fig. 1 is exemplarily illustrated for marking a recipe a that needs to be kept secret, and the user b stores the raw data of the recipe a by the method shown in fig. 1.
The user end of the user B firstly obtains the original data according to the formula A A Generating several NFT slices, e.g., 16 NFT slice data A1 -data A16
Before the 16 NFT shards are stored in a plurality of storage servers, configuration of verification parameters needs to be performed on an NFT shard verification contract:
slicing data with NFT' s A1 -data A16 Sharded hash-hash (data) of A1 )-hash(data A16 ) Generating a first Merck tree as a leaf node;
proof of the Generation Algorithm Setup () of the Circuit from zero knowledge and the root of the first Merck Tree 1 Generating a first verification parameter ver _ key 1
Setup(root 1 )→ver_key 1
The packaging generation comprises a first verification parameter ver _ key 1 And sent to the blockchain network, tx 1.
In step S11, the tile link point performs tx1 with NFT slice verification contract, which will be used to verify NFT 3 First authentication parameter ver _ key of each NFT fragment 1 Stored into the NFT shard validation contract.
Preferably, the block chain node can verify whether tx 1's send account is NFT when tx1 is executed 3 The holder of (2): otherwise, not storing the first verification parameter ver _ key 1
After the configuration of the authentication parameters is completed, the user side of the user B slices 16 NFT data A1 -data A16 Respectively to several storage servers (preferably each NFT fragment is stored to multiple storage servers).
Data slicing with NFT A1 Storage to storage server B is an example:
the user end of the user B fragments the NFT data A1 And its sharded hash (data) A1 ) The slice index 1 Merkel path merkle path 1 And sending the data to a storage server B. The fragment hash can be generated by the storage server B without being sent.
After receiving the information, the storage server B uses the first shareholder (data) A1 ) First index 1 As the public input of the proof algorithm save () of the zero-knowledge proof circuit, and slicing the data with the first NFT A1 First merkel path of first NFT fragment in first merkel tree 1 As a private input of the proof algorithm pro (), first proof information pro is generated 1
Prove(hash(data A1 )、index 1 ,data A1 、merkle_path 1 )→prove 1
Then repackaging generates a hash (data) including the first fragment A1 ) First index 1 And first proof information cave 1 And sent to the blockchain network, tx 2.
In step S131, the block link point performs tx2 through the NFT sharding validation contract, and hashes (data) the first shard submitted by tx2 A1 ) First index 1 And first proof information cave 1 And, tx2 request validation NFT fragmentation data A1 Corresponding NFT 3 Corresponding verification parameter ver _ key 1 Inputting a verification algorithm Verify () of the zero knowledge proof circuit for verification:
Verify(hash(data A1 )、index 1 ,prove 1 ,ver_key 1 )→Yes/No;
when the output result of the verification algorithm Verify () is No, the verification fails, and step S133 is executed: NFT fragmentation that requests authentication for tx2 is not NFT 3 The first index of 1 Recording a first verification result of each NFT fragment to a block chain;
when the output result of the verification algorithm Verify () is Yes, the verification is passed, and step S135 is executed: the NFT slice that authenticates the tx2 request is the NFT 3 The first index of 1 And recording a second verification result of each NFT fragment to the block chain.
When the storage server B acquires the first verification result from the block chain, the storage server B proves that the NFT fragment sent by the storage server B is wrong to the user side of the user B according to the execution result of tx2, and acquires the data to the user side of the user B again A1 And the like;
when the storage server B acquires the second verification result from the block chain, the storage server B confirms that the data sent by the user end of the user B is error-free and stores the data A1 Etc. (which may specifically be stored encrypted or in other ways commonly used in the art).
Data slicing NFT A1 Storing the NFT fragments to other storage servers, or storing other NFT fragments to a plurality of storage servers and the NFT fragment data A1 The process of storing to the storage server B is the same, and is not described in detail.
Preferably, the user B can also initiate a challenge to any storage server at any time, for example, challenge whether the storage server B stores the NFT fragment data according to an agreement A1 At this time, the storage server B can prove that it fulfills the agreed storage obligation by packaging and generating a verification transaction and sending the verification transaction to the blockchain network. The generation process and the execution process of the verification transaction are completely the same as those of the tx2, and are not repeated.
In the embodiment, the zero knowledge proof circuit for verifying the NFT fragments is deployed in the intelligent contract, and the verification parameters generated by the tree root of the merkel tree generated by taking the fragment hash of each NFT fragment as a leaf node are configured in the intelligent contract, so that the storage server can verify whether the data to be stored is wrong or not through the intelligent contract on the premise of not disclosing the original data, the risk of leakage of the original data of the digital asset marked by the NFT is finally reduced, and meanwhile, the data can be verified on the block chain on the premise of not disclosing the original data.
Fig. 2 is a flowchart of an NFT reduction method applied to a block chain node according to an embodiment of the present invention. As shown in fig. 2, in this embodiment, the present invention further provides an NFT restoring method applicable to a blockchain node, where raw data of a digital asset corresponding to a first NFT is stored in several storage servers in a fragmented manner by using an NFT storage method shown in fig. 1, where the method includes:
s211: and executing a second verification transaction, and inputting a second shard hash, a second shard index, second certification information and a first verification parameter submitted by the second verification transaction into a verification algorithm of the zero-knowledge certification circuit for verification:
if the verification fails, step S213 is executed: recording a third verification result of the first NFT fragment verified by the second verification transaction request, which is not the NFT fragment corresponding to the second fragment index of the first NFT, to the blockchain;
if the verification is passed, step S215 is executed: and recording a fourth verification result of the NFT fragment corresponding to the second fragment index of the first NFT fragment to the blockchain.
The second verification transaction is generated by packaging the first NFT fragment sent back by the first storage server after the user receives the first NFT fragment, and the second fragmentation hash and the second fragmentation index are respectively the fragmentation hash and the fragmentation index of the first NFT fragment sent back by the first storage server received by the user;
the second certification information is generated by the user side by taking the second shard hash and the second shard index as public input of the certification algorithm and taking the first NFT shard and the first Mercker path as private input of the certification algorithm;
the third verification result is used for the user side to prove that the first NFT fragment sent back to the first storage service side is wrong;
and the fourth verification result is used for the user side to confirm that the first NFT fragment is error-free, and to restore the original data of the digital asset corresponding to the first NFT according to the first NFT fragment and other error-free NFT fragments.
In particular, the user side, also with user b, will beNFT 3 Corresponding raw data of formula A A Partitioned into 16 NFT sliced data A1 -data A16 And storing each NFT segment to a plurality of storage servers, for example, the user side of user b is used to restore the NFT in the following 3 Corresponding data A For example, the method shown in FIG. 2 is illustrated.
Restore data when needed A And then, the user side of the user B sends NFT fragment downloading requests to the storage service sides respectively. Those skilled in the art will appreciate that when multiple storage servers store the same NFT shard, for example, storage server B and storage server C both store data A1 At this time, the NFT fragment download request may be sent to only one of the storage servers.
The user side of the user B sends download data to the storage server side B A1 The NFT fragmentation download request is as follows:
storage service terminal B verifies whether user B is NFT 3 After the holder (those skilled in the art can understand the relevant verification process, and do not expand in particular), the NFT is sliced into data A1 And its sharded hash (data) A1 ) Index of slice 1 Merkel path 1 And sending the data to the user side of the user B. Specifically, in this embodiment, for example, the user side of the user b does not store any data after the fragmentation storage, in other embodiments, the user side of the user b may reserve data such as the fragmentation index and the mercker path after the fragmentation storage, and the storage service side may only send the NFT fragmentation data at this time A1
After receiving the information, the user end of the user B uses a second sharded hash (data) A1 ) Second index 1 As the public input of the proof algorithm save () of the zero-knowledge proof circuit, and slicing the data with the first NFT A1 First Merckle path merkle _ path 1 As a private input of the proof algorithm pro (), second proof information pro is generated 2
Prove(hash(data A1 )、index 1 ,data A1 、merkle_path 1 )→prove 2
Then repackaging generates a hash (data) including a second slice A1 ) Second index 1 And second proof information cave 2 And sent to the blockchain network, tx 3.
In step S211, the block link point performs tx3 through the NFT sharding validation contract, and hashes (data) the second shard submitted by tx3 A1 ) Second index 1 And second proof information cave 2 And, tx3 request verified NFT sliced data A1 Corresponding NFT 3 Corresponding verification parameter ver _ key 1 Inputting a verification algorithm Verify () of the zero knowledge proof circuit for verification:
Verify(hash(data A1 )、index 1 ,prove 2 ,ver_key 1 )→Yes/No;
when the output result of the verification algorithm Verify () is No, the verification fails, and step S213 is executed: NFT fragmentation requiring authentication of tx3 is not NFT 3 The first index of 1 Recording a third verification result of each NFT fragment to the block chain;
when the output result of the verification algorithm Verify () is Yes, the verification is passed, and step S215 is executed: the NFT fragment that authenticates the tx3 request is the NFT 3 The first index of 1 And recording a fourth verification result of each NFT fragment to the block chain.
When the user side of the user B acquires the third verification result from the block chain, the user side of the user B proves that the downloaded NFT fragment is wrong to the storage service side B according to the execution result of tx3, and downloads the data to the storage service side B again A1 Or, download data to another storage server C A1
When the user end of the user B acquires the fourth verification result from the blockchain, the user end of the user B confirms the data downloaded from the storage server end B A1 Error-free and finally confirming the downloaded 16 NFT fragmented data A1 -data A16 After all are correct, according to the data A1 -data A16 Reducing NFT 3 Corresponding raw data of formula A A
In the embodiment, the zero-knowledge proof circuit for verifying the NFT fragments is deployed in the intelligent contract, and the verification parameters generated by the root of the mercker tree generated by using the fragment hash of each NFT fragment as the leaf node are configured in the intelligent contract, so that the user side can verify whether the data stored in the storage server is wrong or not through the intelligent contract on the premise of not disclosing the original data, the risk of leakage of the original data of the digital assets marked by the NFT is finally reduced, and meanwhile, the data can be verified on the block chain on the premise of not disclosing the original data.
Fig. 3 is a flowchart of an NFT storage method applicable to a user side according to an embodiment of the present invention. The method illustrated in fig. 3 may be performed in conjunction with the method illustrated in fig. 1.
As shown in fig. 3, in this embodiment, the present invention further provides an NFT storage method applied to a user end, where a blockchain is deployed with an NFT slice authentication contract, and the NFT slice authentication contract is configured with a zero-knowledge proof circuit for authenticating an NFT slice, where the method includes:
s31: generating a plurality of NFT fragments according to original data of digital assets corresponding to a first NFT;
s33: using the fragment hash of each NFT fragment as a leaf node to generate a first Merck tree;
s35: generating a first verification parameter according to a generation algorithm of the zero-knowledge proof circuit and a tree root of a first Merckel tree;
s37: generating a first configuration transaction comprising a first verification parameter in a packaging mode, sending the first configuration transaction to a block chain network for execution by a block chain node, and storing the first verification parameter into an NFT fragmentation verification contract;
s39: each NFT fragment is sent to at least one storage server respectively, so that a first storage server receiving a first NFT fragment can:
using a first fragmentation hash of the received first NFT fragmentation and a first fragmentation index of the received first NFT fragmentation as public input of a certification algorithm of a zero-knowledge certification circuit, and using a first Merck path of the first NFT fragmentation and the first NFT fragmentation in a first Merck tree as private input of the certification algorithm to generate first certification information; and the number of the first and second groups,
packaging to generate a first verification transaction comprising a first fragment hash, a first fragment index and first verification information and sending the first verification transaction to a block chain network for execution by a block chain node, and inputting the first fragment hash, the first fragment index, the first verification information and a first verification parameter into a verification algorithm of a zero-knowledge proof circuit for verification:
if the verification fails, recording a first verification result of the first NFT fragment verified by the first verification transaction request, which is not the first NFT fragment corresponding to the first fragment index of the first NFT, onto the block chain;
and if the first NFT fragment passes the verification, recording a second verification result of the NFT fragment corresponding to the first NFT fragment index of the first NFT fragment to the block chain.
The first verification result is used for the first storage service side to prove that the received first NFT fragment has errors to the current user side and to reacquire the first NFT fragment;
and the second verification result is used for the first storage service terminal to confirm that the first NFT fragment is stored without error.
The NFT storage principle of the method shown in fig. 3 can refer to the method shown in fig. 1, and is not described herein again.
Fig. 4 is a flowchart of an NFT recovery method for a user equipment according to an embodiment of the present invention. The method illustrated in fig. 4 may be performed in conjunction with the method illustrated in fig. 2.
As shown in fig. 4, in this embodiment, the present invention further provides an NFT restoring method applicable to a user end, where raw data of a digital asset corresponding to a first NFT is stored in a plurality of storage service ends in a fragmented manner by using the NFT storage method according to the third aspect, where the method includes:
s41: respectively sending NFT fragment downloading requests to each storage server for storing each NFT fragment;
s43: in response to receiving a first NFT fragment sent back by a first storage service end, taking a second fragment hash of the received first NFT fragment and a second fragment index of the received first NFT fragment as public inputs of an attestation algorithm, and taking the received first NFT fragment and a first Merck path as private inputs of the attestation algorithm, generating second attestation information;
s45: packaging to generate a second verification transaction comprising a second shard hash, a second shard index and second certification information, and sending the second verification transaction to the block chain network for the block chain node to execute, and inputting the second shard hash, the second shard index, the second certification information and the first verification parameter into a verification algorithm for verification:
if the verification fails, recording a third verification result of the first NFT fragment verified by the second verification transaction request, which is not the NFT fragment corresponding to the second fragment index of the first NFT, onto the block chain;
if the first NFT fragment is verified, recording a fourth verification result of the NFT fragment corresponding to the second fragment index of the first NFT fragment to the block chain;
in response to acquisition of the third verification result, step S47 is performed: the first storage server side proves that the sent first NFT fragment is wrong, and the first NFT fragment is downloaded to the first storage server side or another storage server side again;
in response to acquiring the fourth verification result, step S49 is performed: and restoring the original data of the digital asset corresponding to the first NFT according to the first NFT fragment and other NFT fragments confirmed to be error-free.
The NFT reduction principle of the method shown in fig. 4 can refer to the method shown in fig. 2, and is not described herein again.
Fig. 5 is a flowchart of an NFT storage method applied to a storage server according to an embodiment of the present invention. The method shown in fig. 3 may be performed in conjunction with the methods shown in fig. 1 and 3.
As shown in fig. 5, in this embodiment, the present invention further provides an NFT storage method applied to a storage service, where a blockchain is deployed with an NFT slice verification contract, and the NFT slice verification contract is configured with a zero-knowledge proof circuit for verifying an NFT slice, where the method includes:
s51: in response to receiving a first NFT fragment sent by a first user end, taking a first fragment hash of the received first NFT fragment and a first fragment index of the received first NFT fragment as public input of a certification algorithm of a zero-knowledge certification circuit, and taking a first Merck path corresponding to the first NFT fragment and the first NFT fragment as private input of the certification algorithm, so as to generate first certification information;
s53: packaging to generate a first verification transaction comprising a first fragment hash, a first fragment index and first verification information and sending the first verification transaction to a block chain network for execution by a block chain node, and inputting the first fragment hash, the first fragment index, the first verification information and a first verification parameter into a verification algorithm of a zero-knowledge proof circuit for verification:
if the verification fails, recording a first verification result of the first NFT fragment verified by the first verification transaction request, which is not the first NFT fragment corresponding to the first fragment index of the first NFT, onto the block chain;
if the first NFT fragment is verified, recording a second verification result of the NFT fragment corresponding to the first fragment index of the first NFT to the block chain;
in response to acquiring the first verification result, step S55 is performed: the first NFT fragment received is proved to be wrong to the user side, and the first NFT fragment is obtained again;
in response to acquiring the second verification result, step S57 is performed: and confirming that the first NFT fragment is stored without error.
The first authentication parameter is generated by a user side of a first NFT holder by generating a plurality of NFT fragments from raw data of a digital asset corresponding to the first NFT, generating a first Mercker tree by using fragment hash of each NFT fragment as a leaf node, generating the first Mercker tree according to a generation algorithm of a zero-knowledge proof circuit and a tree root of the first Mercker tree, and storing the first authentication parameter in an NFT fragment authentication contract through configuration transaction.
The NFT reduction principle of the method shown in fig. 5 can also refer to the method shown in fig. 1, and is not described herein again.
Fig. 6 is a flowchart of an NFT recovery method applied to a storage service according to an embodiment of the present invention. The method shown in fig. 6 may be performed in conjunction with the methods shown in fig. 2 and 4.
As shown in fig. 6, in this embodiment, the present invention further provides an NFT restoring method applied to a storage server, where raw data of a digital asset corresponding to a first NFT is stored in several storage servers in a fragmented manner by using the NFT storage method according to the fifth aspect, where the method includes:
s61: responding to a received NFT fragment downloading request sent by a first user end, sending the first NFT fragment to the first user end, so that the first user end can:
using the received second segment hash of the first NFT segment and the received second segment index of the first NFT segment as public input of a certification algorithm, and using the received first NFT segment and the first Mercker path as private input of the certification algorithm, and generating second certification information; and the number of the first and second groups,
packaging to generate a second verification transaction comprising a second shard hash, a second shard index and second certification information, and sending the second verification transaction to the block chain network for the block chain node to execute, and inputting the second shard hash, the second shard index, the second certification information and the first verification parameter into a verification algorithm for verification:
if the verification fails, recording a third verification result of the first NFT fragment verified by the second verification transaction request, which is not the NFT fragment corresponding to the second fragment index of the first NFT, to the block chain;
and if the verification is passed, recording a fourth verification result of the NFT fragment corresponding to the second fragment index of the first NFT fragment as the first NFT fragment on the block chain.
The third verification result is used for the first user side to prove that the sent back first NFT fragment is wrong to the current storage service side;
and the fourth verification result is used for restoring the original data of the digital asset corresponding to the first NFT by the first user end according to the first NFT fragment and other NFT fragments confirmed to be free of errors.
The NFT reduction principle of the method shown in fig. 6 can also refer to the method shown in fig. 2, and is not described herein again.
Fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
As shown in fig. 7, as another aspect, the present application also provides a computer apparatus 700 including one or more Central Processing Units (CPUs) 701 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data necessary for the operation of the device 700 are also stored. The CPU701, ROM702, and RAM703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to an embodiment of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present application.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each unit may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of a unit or module does not in some way constitute a limitation of the unit or module itself.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (8)

1. An NFT storage method, wherein a blockchain deploys an NFT slice authentication contract configured with zero knowledge proof circuitry for authenticating NFT slices, the method being applicable to a blockchain node, the method comprising:
executing a first configuration transaction, and storing first authentication parameters for authenticating each NFT segment of a first NFT into the NFT segment authentication contract; generating, by the user side of the first NFT holder, a plurality of NFT fragments from raw data of a digital asset corresponding to the first NFT, and generating a first mercker tree by using a fragment hash of each NFT fragment as a leaf node according to the generation algorithm of the zero-knowledge proof circuit and a tree root of the first mercker tree, where the first authentication parameter is generated by the user side of the first NFT holder;
executing a first verification transaction, inputting a first slice hash, a first slice index, first certification information and a first verification parameter submitted by the first verification transaction into a verification algorithm of the zero-knowledge certification circuit for verification:
if the verification fails, recording a first verification result of the first NFT fragment verified by the first verification transaction request, which is not the NFT fragment corresponding to the first fragment index of the first NFT, onto a blockchain;
if the first NFT fragment passes the verification, recording a second verification result of the NFT fragment corresponding to the first fragment index of the first NFT to a block chain;
the first authentication transaction is generated by a first storage service end by packaging after receiving a first NFT fragment sent by the user end, where the first fragmentation hash and the first fragmentation index are a fragmentation hash and a fragmentation index of the first NFT fragment received by the first storage service end, respectively;
the first attestation information is generated by the first storage service end by using the first fragmentation hash and the first fragmentation index as public inputs of an attestation algorithm of the zero-knowledge attestation circuit, and using the first NFT fragmentation and a first merkel path of the first NFT fragmentation in the first merkel tree as private inputs of the attestation algorithm;
the first verification result is used for the first storage service end to prove to the user end that the received first NFT segment has a fault and to reacquire the first NFT segment;
and the second verification result is used for the first storage service end to confirm that the first NFT fragment is stored without error.
2. An NFT reduction method, wherein raw data of a digital asset corresponding to a first NFT is sharded and stored in a number of storage servers by the NFT storage method according to claim 1, the NFT reduction method is applied to a block chain node, and the NFT reduction method includes:
executing a second verification transaction, and inputting a second shard hash, a second shard index, second certification information and the first verification parameter submitted by the second verification transaction into a verification algorithm of the zero-knowledge certification circuit for verification:
if the verification fails, recording a third verification result of the first NFT fragment verified by the second verification transaction request, which is not the NFT fragment corresponding to the second fragment index of the first NFT, onto the blockchain;
if the first NFT fragment passes the verification, recording a fourth verification result of the NFT fragment corresponding to the second fragment index of the first NFT fragment to a block chain;
the second verification transaction is generated by the user side after receiving the first NFT fragment sent back by the first storage service side, and the second shard hash and the second shard index are respectively the shard hash and the shard index of the first NFT fragment sent back by the first storage service side and received by the user side;
the second attestation information is generated by the user side by taking the second fragmentation hash and the second fragmentation index as public input of the attestation algorithm and taking the first NFT fragmentation and the first merkel path as private input of the attestation algorithm;
the third verification result is used for the user side to prove that the sent back first NFT fragment is wrong to the first storage service side;
and the fourth verification result is used for the user side to confirm that the first NFT fragment is error-free, and restore the original data of the digital asset corresponding to the first NFT according to the first NFT fragment and other error-free NFT fragments.
3. An NFT storage method, wherein a blockchain is deployed with an NFT slice authentication contract configured with zero knowledge proof circuitry for authenticating NFT slices, the method being applicable to a user side, the method comprising:
generating a plurality of NFT fragments according to original data of digital assets corresponding to the first NFT; using the fragment hash of each NFT fragment as a leaf node to generate a first Merck tree;
generating a first verification parameter according to a generation algorithm of the zero-knowledge proof circuit and a tree root of the first Merck tree;
generating a first configuration transaction comprising the first verification parameter in a packaging mode, sending the first configuration transaction to a blockchain network for being executed by a blockchain node, and storing the first verification parameter into the NFT fragmentation verification contract;
respectively sending each NFT fragment to at least one storage service end, so that a first storage service end receiving a first NFT fragment:
taking a first fragmentation hash of the received first NFT fragmentation and a first fragmentation index of the received first NFT fragmentation as public inputs of a certification algorithm of the zero-knowledge certification circuit, and taking a first Mercker path of the first NFT fragmentation and the first NFT fragmentation in the first Mercker tree as private inputs of the certification algorithm, so as to generate first certification information; and the number of the first and second groups,
packaging and generating a first verification transaction comprising the first shard hash, the first shard index and the first certification information, and sending the first verification transaction to a blockchain network for being executed by blockchain nodes, and inputting the first shard hash, the first shard index, the first certification information and the first verification parameter into a verification algorithm of the zero-knowledge proof circuit for verification:
if the verification fails, recording a first verification result of the first NFT fragment verified by the first verification transaction request, which is not the NFT fragment corresponding to the first fragment index of the first NFT, onto a blockchain;
if the first NFT fragment is verified, recording a second verification result of the NFT fragment corresponding to the first fragment index of the first NFT to a block chain;
the first verification result is used for the first storage service side to prove that the received first NFT fragment has errors to the current user side and to reacquire the first NFT fragment;
and the second verification result is used for the first storage service end to confirm that the first NFT fragment is stored without error.
4. An NFT recovery method, wherein raw data of a digital asset corresponding to a first NFT is stored in a number of storage servers in a fragmentation manner according to the NFT storage method in claim 3, the NFT recovery method is applicable to a user side, and the NFT recovery method includes:
respectively sending NFT fragment downloading requests to each storage server storing each NFT fragment;
in response to receiving a first NFT fragment sent back by the first storage service, generating second attestation information with a second fragment hash of the received first NFT fragment and a second fragment index of the received first NFT fragment as public inputs of the attestation algorithm, and with the received first NFT fragment and the first merkel path as private inputs of the attestation algorithm;
packaging and generating a second verification transaction comprising the second shard hash, the second shard index and the second certification information and sending the second verification transaction to a blockchain network for being executed by blockchain nodes, and inputting the second shard hash, the second shard index, the second certification information and the first verification parameter into the verification algorithm for verification:
if the verification fails, recording a third verification result of the first NFT fragment verified by the second verification transaction request, which is not the NFT fragment corresponding to the second fragment index of the first NFT, onto the blockchain;
if the first NFT fragment passes the verification, recording a fourth verification result of the NFT fragment corresponding to the second fragment index of the first NFT fragment to a block chain;
responding to the obtained third verification result, proving that the sent first NFT fragment is wrong to the first storage server, and downloading the first NFT fragment to the first storage server or another storage server again;
and in response to obtaining the fourth verification result, restoring the original data of the digital asset corresponding to the first NFT according to the first NFT fragment and other error-free NFT fragments.
5. An NFT storage method, wherein a blockchain deploys an NFT shard validation contract configured with zero-knowledge proof circuitry for validating NFT shards, the method being applicable to a storage service, the method comprising:
in response to receiving a first NFT fragment sent by a first user, taking a first fragment hash of the received first NFT fragment and a first fragment index of the received first NFT fragment as public inputs of a certification algorithm of the zero-knowledge certification circuit, and taking a first mercker path corresponding to the first NFT fragment and the first NFT fragment as private inputs of the certification algorithm, to generate first certification information;
packaging and generating a first verification transaction comprising the first shareholder, the first shareholder and the first certification information, and sending the first verification transaction to a blockchain network for being executed by blockchain nodes, and inputting the first shareholder, the first certification information and a first verification parameter into a verification algorithm of the zero-knowledge certification circuit for verification:
if the first verification transaction request fails to verify, recording a first verification result of the first NFT fragment verified by the first verification transaction request, which is not the NFT fragment corresponding to the first fragment index of the first NFT, onto the blockchain;
if the first NFT fragment is verified, recording a second verification result of the NFT fragment corresponding to the first fragment index of the first NFT to a block chain;
in response to acquiring the first verification result, the fact that the received first NFT fragment has an error is proved to the user side, and the first NFT fragment is acquired again;
responding to the obtained second verification result, and confirming that the first NFT fragment is stored without error;
the first authentication parameter is generated by a user side of the first NFT holder by generating a plurality of NFT fragments from raw data of a digital asset corresponding to the first NFT, generating a first mercker tree by using a fragment hash of each NFT fragment as a leaf node, generating the first mercker tree according to a generation algorithm of the zero knowledge proof circuit and a tree root of the first mercker tree, and storing the first authentication parameter in an NFT fragment authentication contract through configuration transaction.
6. An NFT recovery method, wherein raw data of a digital asset corresponding to a first NFT is sharded and stored in a number of storage servers by the NFT storage method according to claim 5, the NFT recovery method is applicable to the storage servers, and the NFT recovery method includes:
in response to receiving an NFT segment download request sent by the first user equipment, sending the first NFT segment to the first user equipment, so that the first user equipment:
generating second certification information by taking a second fragmentation hash of the received first NFT fragmentation and a second fragmentation index of the received first NFT fragmentation as public inputs of the certification algorithm and taking the received first NFT fragmentation and the first Merck path as private inputs of the certification algorithm; and (c) a second step of,
packaging to generate a second verification transaction comprising the second shard hash, the second shard index and the second certification information, and sending the second verification transaction to a block chain network for execution by a block chain node, and inputting the second shard hash, the second shard index, the second certification information and the first verification parameter into the verification algorithm for verification:
if the verification fails, recording a third verification result of the first NFT fragment verified by the second verification transaction request, which is not the NFT fragment corresponding to the second fragment index of the first NFT, onto the blockchain;
if the first NFT fragment is verified, recording a fourth verification result of the NFT fragment corresponding to the second fragment index of the first NFT to a block chain;
the third verification result is used for the first user terminal to prove that the first NFT fragment sent back to the current storage service terminal has errors;
and the fourth verification result is used for restoring the original data of the digital asset corresponding to the first NFT by the first user end according to the first NFT fragment and other NFT fragments confirmed to be error-free.
7. A computer device, the device comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-6.
8. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-6.
CN202111033387.7A 2021-09-03 2021-09-03 NFT storage method, NFT restoration method, computer device, and storage medium Active CN113746638B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111033387.7A CN113746638B (en) 2021-09-03 2021-09-03 NFT storage method, NFT restoration method, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111033387.7A CN113746638B (en) 2021-09-03 2021-09-03 NFT storage method, NFT restoration method, computer device, and storage medium

Publications (2)

Publication Number Publication Date
CN113746638A CN113746638A (en) 2021-12-03
CN113746638B true CN113746638B (en) 2023-04-07

Family

ID=78735594

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111033387.7A Active CN113746638B (en) 2021-09-03 2021-09-03 NFT storage method, NFT restoration method, computer device, and storage medium

Country Status (1)

Country Link
CN (1) CN113746638B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023102641A1 (en) * 2021-12-07 2023-06-15 Ureeqa Inc. A system and method for enforceable and divisible tokenization of property
CN114553515A (en) * 2022-02-17 2022-05-27 支付宝(杭州)信息技术有限公司 Block chain based NFT asset inspection method, service processing method and hardware
CN117527244A (en) * 2022-07-28 2024-02-06 马上消费金融股份有限公司 Data processing method, data verification method, data processing device, electronic equipment and storage medium
CN115018522B (en) * 2022-08-08 2022-10-25 环球数科集团有限公司 NFT (network File transfer protocol) source tracing anti-counterfeiting system based on block chain

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110300173A (en) * 2019-06-28 2019-10-01 杭州复杂美科技有限公司 Decentralization date storage method, verification method, equipment and storage medium
CN112968881A (en) * 2021-02-01 2021-06-15 杭州复杂美科技有限公司 Block chain anonymous voting method, computer device and storage medium

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108241968B (en) * 2017-03-26 2020-08-14 杭州复杂美科技有限公司 Method for leading processor to participate block chain consensus
CN112292682A (en) * 2018-04-20 2021-01-29 维沙尔.古普塔 Decentralized document and entity verification engine
CN109919614A (en) * 2019-02-28 2019-06-21 北京科技大学 A kind of method for protecting intelligent contract privacy using zero-knowledge proof in block chain
CN110311782B (en) * 2019-04-29 2020-04-14 山东工商学院 Zero-knowledge proof method, system and storage medium for personal information
CN110336672B (en) * 2019-04-29 2020-07-28 山东工商学院 Method, system and storage medium for citizen privacy protection based on zero-knowledge proof
CN110321735B (en) * 2019-04-29 2021-04-13 山东工商学院 Business handling method, system and storage medium based on zero knowledge certification
CN111159288B (en) * 2019-12-16 2023-04-28 郑杰骞 Method, system, device and medium for storing, verifying and realizing chained structure data
CN111242617B (en) * 2020-01-02 2022-05-10 支付宝(杭州)信息技术有限公司 Method and apparatus for performing transaction correctness verification
CN111428268B (en) * 2020-03-24 2022-08-02 山东大学 V2G transaction privacy protection method, device and system based on block chain
CN111683058A (en) * 2020-05-18 2020-09-18 国科微城市智能科技(南京)有限责任公司 Data storage system based on block chain and storage method thereof
CN111698092B (en) * 2020-05-29 2023-07-21 湖南天河国云科技有限公司 File storage proving method, system and medium based on zero knowledge proving and block chain
CN111966976A (en) * 2020-07-22 2020-11-20 复旦大学 Anonymous investigation method based on zero knowledge proof and block chain
CN112149187B (en) * 2020-11-25 2024-04-05 支付宝(杭州)信息技术有限公司 Method and device for processing traceability information based on blockchain
CN112732676B (en) * 2021-01-12 2023-12-05 库珀科技集团有限公司 Block chain-based data migration method, device, equipment and storage medium
CN112865980A (en) * 2021-02-01 2021-05-28 杭州复杂美科技有限公司 Block chain encryption voting method, computer device and storage medium
CN112819466A (en) * 2021-02-20 2021-05-18 广东卓启云链科技有限公司 Digital certificate processing method and device, terminal equipment and storage medium
CN113095827B (en) * 2021-04-09 2023-11-28 杭州复杂美科技有限公司 Anonymous multiple signature method, computer device, and storage medium
CN113256290B (en) * 2021-05-14 2023-04-18 杭州链网科技有限公司 Decentralized encrypted communication and transaction system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110300173A (en) * 2019-06-28 2019-10-01 杭州复杂美科技有限公司 Decentralization date storage method, verification method, equipment and storage medium
CN112968881A (en) * 2021-02-01 2021-06-15 杭州复杂美科技有限公司 Block chain anonymous voting method, computer device and storage medium

Also Published As

Publication number Publication date
CN113746638A (en) 2021-12-03

Similar Documents

Publication Publication Date Title
CN113746638B (en) NFT storage method, NFT restoration method, computer device, and storage medium
US10790976B1 (en) System and method of blockchain wallet recovery
US10880310B2 (en) Method for proving retrievability of information
RU2506637C2 (en) Method and device for verifying dynamic password
US8595142B2 (en) Maintaining privacy for transactions performable by a user device having a security module
CN110177124B (en) Identity authentication method based on block chain and related equipment
US10678528B1 (en) Directory schema deployment with pipelines
CN104836784B (en) A kind of information processing method, client and server
US20160219045A1 (en) Method and System for Authenticating a User of a Device
CN114422134A (en) Data secure transmission method and equipment
US11757637B2 (en) Token node locking with signed fingerprints offloaded to clients
US20090083739A1 (en) Network resource access control methods and systems using transactional artifacts
CN111130798A (en) Request authentication method and related equipment
US8683188B2 (en) Reboot controller to prevent unauthorized reboot
CN114244530A (en) Resource access method and device, electronic equipment and computer readable storage medium
CN112291201A (en) Service request transmission method and device and electronic equipment
CN108846671B (en) Online secure transaction method and system based on block chain
CN115208669B (en) Distributed identity authentication method and system based on blockchain technology
CN113051585B (en) Data verification method and device, electronic equipment and storage medium
CN107148629B (en) Disposable Verification System
CN114117388A (en) Device registration method, device registration apparatus, electronic device, and storage medium
JP5793593B2 (en) Network authentication method for securely verifying user identification information
CN112615719A (en) Decentralized online contract signing method, device, equipment and medium
CN111522563A (en) Block chain-based terminal upgrade protection system and method
CN111552950A (en) Software authorization method and device and computer readable storage medium

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
GR01 Patent grant
GR01 Patent grant