CN113746638A - 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
CN113746638A
CN113746638A CN202111033387.7A CN202111033387A CN113746638A CN 113746638 A CN113746638 A CN 113746638A CN 202111033387 A CN202111033387 A CN 202111033387A CN 113746638 A CN113746638 A CN 113746638A
Authority
CN
China
Prior art keywords
nft
fragment
verification
index
hash
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.)
Granted
Application number
CN202111033387.7A
Other languages
Chinese (zh)
Other versions
CN113746638B (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 system 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 serve as an ownership label for a unique digital asset, e.g., NFT1NFT as a digital avatar ownership tag2As a 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 may perform a word, the server a considers that the first user stores incorrect data at 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 an NFT slice, the method including:
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;
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 as the first NFT fragment on 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 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 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 execution by a block chain node, and storing the first verification parameter into an NFT fragmentation verification contract;
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, 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 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 for 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 a certification algorithm, and taking the received first NFT fragment and a first Merck path as private inputs of the certification algorithm, generating second certification 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, to 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 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;
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 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 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 the NFT slice is equal to the slice hash;
2. segment hash NFT segment corresponding to an merckel path (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 follows3,NFT3The 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 AAGenerating several NFT slices, e.g., 16 NFT slice dataA1-dataA16
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' sA1-dataA16Sharded hash-hash (data) ofA1)-hash(dataA16) 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 Tree1Generating a first verification parameter ver \ ukey1
Setup(root1)→ver_key1
The packaging generation comprises a first verification parameter ver _ key1And sent to the blockchain network, tx 1.
In step S11, the tile link point performs tx1 with NFT shard verification contract, which will be used to verify NFT3First authentication parameter ver _ key of each NFT fragment1Stored into the NFT shard validation contract.
Preferably, tile chain node can verify that tx1 send account is NFT when tx1 is executed3The holder of (2): otherwise, not storing the first verification parameter ver _ key1
After the configuration of the authentication parameters is completed, the user side of the user B slices 16 NFT dataA1-dataA16Respectively to several storage servers (preferably each NFT slice is stored to multiple storage servers).
Data slicing with NFTA1Storage to storage server B is an example:
the user end of the user B fragments the NFT dataA1And its fragment hash (data)A1) Index of slice1Merkel path merkle path1And 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 index1As the public input of the proof algorithm save () of the zero-knowledge proof circuit, and slicing the data with the first NFTA1First merkle path merkle _ path of first NFT fragment in first merkle tree1As a private input of the proof algorithm pro (), first proof information pro is generated1
Prove(hash(dataA1)、index1,dataA1、merkle_path1)→prove1
Then repackaging generates a hash (data) including the first fragmentA1) First sliced indexindex1And first proof information cave1And sent to the blockchain network, tx 2.
In step S131, the chunk link point performs tx2 through the NFT shard validation contract, hashing (data) the first shard submitted by tx2A1) First index1And first proof information cave1And, tx2 request verified NFT sliced dataA1Corresponding NFT3Corresponding verification parameter ver _ key1Inputting a verification algorithm Verify () of the zero knowledge proof circuit for verification:
Verify(hash(dataA1)、index1,prove1,ver_key1)→Yes/No;
when the output result of the verification algorithm Verify () is No, the verification fails, and step S133 is executed: the NFT fragment that requests authentication at tx2 is not an NFT3The first index of1Recording 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 fragment that requests authentication at tx2 is the NFT3The first index of1And recording a second verification result of each NFT fragment to the block chain.
When the storage server B obtains the first verification result from the blockchain, the storage server B proves that the NFT fragment sent by the storage server B is incorrect to the user side of the user B according to the execution result of tx2, and obtains the data again to the user side of the user BA1And 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 dataA1Etc. (which may specifically be stored encrypted or in other ways commonly used in the art).
Data slicing NFTA1Storing the NFT fragments to other storage servers, or storing other NFT fragments to a plurality of storage servers and the NFT fragment dataA1The process of storing the data in the storage server B is the same, and is not described any more.
PreferablyUser B may also initiate a challenge to any storage server at any time, for example, challenge storage server B whether NFT fragment data is stored according to an agreementA1At 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 execution process of the verification transaction are completely the same as those of 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 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 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, finally the risk of leakage of the original data of the digital assets marked by the NFT is 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.
Specifically, NFT is also sent to the user side of user b3Corresponding raw data of formula AAPartitioned into 16 NFT sliced dataA1-dataA16And storing each NFT segment to a plurality of storage servers, for example, the user side of the user b restores the NFT3Corresponding dataAFor example, the method shown in FIG. 2 is illustrated.
Restore data when neededAAnd 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 dataA1At 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 BA1The NFT fragmentation download request is as follows:
storage service terminal B verifies whether user B is NFT3After the holder (those skilled in the art can understand the relevant verification process, and do not expand in particular), the NFT is sliced into dataA1And its fragment hash (data)A1)、Slice index1Merkel path merkle path1And 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 timeA1
After receiving the information, the user end of the user B uses a second sharded hash (data)A1) Second index1As the public input of the proof algorithm save () of the zero-knowledge proof circuit, and slicing the data with the first NFTA1First Merckle path merkle _ path1As a private input of the proof algorithm pro (), second proof information pro is generated2
Prove(hash(dataA1)、index1,dataA1、merkle_path1)→prove2
Then repackaging generates a hash (data) including a second sliceA1) Second index1And second proof information cave2And sent to the blockchain network, tx 3.
In step S211, the chunk chain node performs tx3 through the NFT sharding validation contract, hashing (data) the second shard submitted by tx3A1) Second index1And second proof information cave2And, tx3 request verified NFT sliced dataA1Corresponding NFT3Corresponding verification parameter ver _ key1Inputting a verification algorithm Verify () of the zero knowledge proof circuit for verification:
Verify(hash(dataA1)、index1,prove2,ver_key1)→Yes/No;
when the output result of the verification algorithm Verify () is No, the verification fails, and step S213 is executed: the NFT fragment that requests authentication at tx3 is not an NFT3The first index of1Recording a third verification result of each NFT fragment to the block chain;
when verifying algorithmIf Yes, the verification is passed, and step S215 is executed: the NFT fragment that requests authentication at tx3 is the NFT3The first index of1And 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 blockchain, 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 againA1Or, download data to another storage server CA1
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 BA1Error-free and finally confirming the downloaded 16 NFT fragmented dataA1-dataA16After all are correct, according to the dataA1-dataA16Reducing NFT3Corresponding raw data of formula AA
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 end 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 the 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 a zero-knowledge proof circuit and a tree root of a first Merck 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, 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 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 a certification algorithm, and taking the received first NFT fragment and a first Merck path as private inputs of the certification algorithm, generating second certification 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, to 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;
in response to acquiring the third verification result, step S47 is executed: 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 executed: 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, 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;
in response to acquiring the first verification result, step S55 is executed: the method comprises the steps that a user side is proved that a received first NFT fragment has errors, and the first NFT fragment is obtained again;
in response to acquiring the second verification result, step S57 is executed: 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 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.
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 apparatus 700 are also stored. The CPU701, the ROM702, and the 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 a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, 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 can 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 which 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 fragment of a first NFT into the NFT fragment 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 shard hash, a first shard 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 verification transaction is generated by a first storage service terminal by packaging after receiving a first NFT fragment sent by the user terminal, 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 terminal, respectively;
the first attestation information is generated by the first storage service end by using the first shard hash and the first shard index as public inputs of an attestation algorithm of the zero-knowledge attestation circuit, and using the first NFT shard and a first merkel path of the first NFT shard in the first merkel tree as private inputs of the attestation algorithm;
the first verification result is used for the first storage service terminal to prove that the received first NFT fragment has a fault to the user terminal 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.
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, 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 first NFT fragment sent back to the first storage service side has an error;
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 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 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 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 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 is deployed with an NFT shard authentication contract configured with zero knowledge proof circuitry for authenticating 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 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 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;
in response to obtaining the first verification result, proving to the user side that the received first NFT fragment has a fault, and re-obtaining the first NFT fragment;
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 stored in a number of storage servers in a fragmentation manner according to the NFT storage method in claim 1, the NFT recovery method is applicable to a storage server, and the NFT recovery method includes:
in response to receiving an NFT fragment download request sent by the first user equipment, sending the first NFT fragment to the first user equipment, so that the first user equipment:
generating second certification information by taking the received second fragmentation hash of the first NFT fragmentation and the received second fragmentation index of the first NFT fragmentation as public input of the certification algorithm and taking the received first NFT fragmentation and the first Mercker path as private input of the certification algorithm; and the number of the first and second groups,
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 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 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 true CN113746638A (en) 2021-12-03
CN113746638B 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)

Cited By (5)

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

Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108241968A (en) * 2017-03-26 2018-07-03 杭州复杂美科技有限公司 The method that front end processor participates in block chain common recognition
CN109919614A (en) * 2019-02-28 2019-06-21 北京科技大学 A kind of method for protecting intelligent contract privacy using zero-knowledge proof in block chain
CN110300173A (en) * 2019-06-28 2019-10-01 杭州复杂美科技有限公司 Decentralization date storage method, verification method, equipment and storage medium
CN110311782A (en) * 2019-04-29 2019-10-08 山东工商学院 Zero-knowledge proof method, system and the storage medium of personal information
CN110321735A (en) * 2019-04-29 2019-10-11 山东工商学院 Business handling method, system and storage medium based on zero-knowledge proof
CN111242617A (en) * 2020-01-02 2020-06-05 支付宝(杭州)信息技术有限公司 Method and apparatus for performing transaction correctness verification
CN111428268A (en) * 2020-03-24 2020-07-17 山东大学 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
CN111698092A (en) * 2020-05-29 2020-09-22 湖南天河国云科技有限公司 File storage certification method, system and medium based on zero knowledge certification and block chain
WO2020220412A1 (en) * 2019-04-29 2020-11-05 山东工商学院 Zero knowledge proof-based citizen privacy protection method and system, and storage medium
CN111966976A (en) * 2020-07-22 2020-11-20 复旦大学 Anonymous investigation method based on zero knowledge proof and block chain
CN112149187A (en) * 2020-11-25 2020-12-29 支付宝(杭州)信息技术有限公司 Method and device for processing traceability information based on block chain
CN112292682A (en) * 2018-04-20 2021-01-29 维沙尔.古普塔 Decentralized document and entity verification engine
CN112732676A (en) * 2021-01-12 2021-04-30 成都库珀区块链科技有限公司 Data migration method, device, equipment and storage medium based on block chain
CN112819466A (en) * 2021-02-20 2021-05-18 广东卓启云链科技有限公司 Digital certificate processing method and device, terminal equipment and storage medium
CN112865980A (en) * 2021-02-01 2021-05-28 杭州复杂美科技有限公司 Block chain encryption voting method, computer device and storage medium
CN112968881A (en) * 2021-02-01 2021-06-15 杭州复杂美科技有限公司 Block chain anonymous voting method, computer device and storage medium
WO2021120253A1 (en) * 2019-12-16 2021-06-24 郑杰骞 Data storage method and verification method for blockchain structure, blockchain structure implementation method, blockchain-structured system, device, and medium
CN113095827A (en) * 2021-04-09 2021-07-09 杭州复杂美科技有限公司 Anonymous multiple signature method, computer device, and storage medium
CN113256290A (en) * 2021-05-14 2021-08-13 杭州链网科技有限公司 Decentralized encrypted communication and transaction system

Patent Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108241968A (en) * 2017-03-26 2018-07-03 杭州复杂美科技有限公司 The method that front end processor participates in block chain common recognition
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
CN110311782A (en) * 2019-04-29 2019-10-08 山东工商学院 Zero-knowledge proof method, system and the storage medium of personal information
CN110321735A (en) * 2019-04-29 2019-10-11 山东工商学院 Business handling method, system and storage medium based on zero-knowledge proof
WO2020220412A1 (en) * 2019-04-29 2020-11-05 山东工商学院 Zero knowledge proof-based citizen privacy protection method and system, and storage medium
CN110300173A (en) * 2019-06-28 2019-10-01 杭州复杂美科技有限公司 Decentralization date storage method, verification method, equipment and storage medium
WO2021120253A1 (en) * 2019-12-16 2021-06-24 郑杰骞 Data storage method and verification method for blockchain structure, blockchain structure implementation method, blockchain-structured system, device, and medium
CN111242617A (en) * 2020-01-02 2020-06-05 支付宝(杭州)信息技术有限公司 Method and apparatus for performing transaction correctness verification
CN111428268A (en) * 2020-03-24 2020-07-17 山东大学 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
CN111698092A (en) * 2020-05-29 2020-09-22 湖南天河国云科技有限公司 File storage certification method, system and medium based on zero knowledge certification and block chain
CN111966976A (en) * 2020-07-22 2020-11-20 复旦大学 Anonymous investigation method based on zero knowledge proof and block chain
CN112149187A (en) * 2020-11-25 2020-12-29 支付宝(杭州)信息技术有限公司 Method and device for processing traceability information based on block chain
CN112732676A (en) * 2021-01-12 2021-04-30 成都库珀区块链科技有限公司 Data migration method, device, equipment and storage medium based on block chain
CN112865980A (en) * 2021-02-01 2021-05-28 杭州复杂美科技有限公司 Block chain encryption voting method, computer device and storage medium
CN112968881A (en) * 2021-02-01 2021-06-15 杭州复杂美科技有限公司 Block chain anonymous 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
CN113095827A (en) * 2021-04-09 2021-07-09 杭州复杂美科技有限公司 Anonymous multiple signature method, computer device, and storage medium
CN113256290A (en) * 2021-05-14 2021-08-13 杭州链网科技有限公司 Decentralized encrypted communication and transaction system

Cited By (6)

* 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
CN114553515B (en) * 2022-02-17 2024-05-17 支付宝(杭州)信息技术有限公司 Block chain-based NFT asset checking method, business processing method and hardware
WO2024022089A1 (en) * 2022-07-28 2024-02-01 马上消费金融股份有限公司 Data processing method and verification method, apparatus, electronic device, and storage medium
CN115018522A (en) * 2022-08-08 2022-09-06 环球数科集团有限公司 NFT traceability anti-counterfeiting system based on block chain
CN115018522B (en) * 2022-08-08 2022-10-25 环球数科集团有限公司 NFT (network File transfer protocol) source tracing anti-counterfeiting system based on block chain

Also Published As

Publication number Publication date
CN113746638B (en) 2023-04-07

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
CN109714168B (en) Trusted remote attestation method, device and system
RU2506637C2 (en) Method and device for verifying dynamic password
US10447696B2 (en) Method for proving retrievability of information
JP4638912B2 (en) Method for transmitting a direct proof private key in a signed group to a device using a distribution CD
US10678528B1 (en) Directory schema deployment with pipelines
CN111786812B (en) Node management method, device, computer equipment and storage medium
CN104836784B (en) A kind of information processing method, client and server
CN108737105B (en) Method and device for retrieving private key, private key equipment and medium
US20160219045A1 (en) Method and System for Authenticating a User of a Device
CN114422134A (en) Data secure transmission method and equipment
US8260721B2 (en) Network resource access control methods and systems using transactional artifacts
US11757637B2 (en) Token node locking with signed fingerprints offloaded to clients
CN111130798A (en) Request authentication method and related equipment
CN112291201A (en) Service request transmission method and device and electronic equipment
CN114244530A (en) Resource access method and device, electronic equipment and computer readable storage medium
CN110602132A (en) Data encryption and decryption processing method
CN112560095A (en) Secret key updating method for cloud storage and implementation method for cloud data auditing system
CN115473655B (en) Terminal authentication method, device and storage medium for access network
CN113051585B (en) Data verification method and device, electronic equipment and storage medium
CN114117388A (en) Device registration method, device registration apparatus, electronic device, and storage medium
CN112615719A (en) Decentralized online contract signing method, device, equipment and medium
CN113761585A (en) Data processing method, device and system
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