WO2024022089A1 - Data processing method and verification method, apparatus, electronic device, and storage medium - Google Patents

Data processing method and verification method, apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2024022089A1
WO2024022089A1 PCT/CN2023/106372 CN2023106372W WO2024022089A1 WO 2024022089 A1 WO2024022089 A1 WO 2024022089A1 CN 2023106372 W CN2023106372 W CN 2023106372W WO 2024022089 A1 WO2024022089 A1 WO 2024022089A1
Authority
WO
WIPO (PCT)
Prior art keywords
nft
certificate
target
metadata
contract
Prior art date
Application number
PCT/CN2023/106372
Other languages
French (fr)
Chinese (zh)
Inventor
孔令涛
蒋宁
郝征鹏
Original Assignee
马上消费金融股份有限公司
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 马上消费金融股份有限公司 filed Critical 马上消费金融股份有限公司
Publication of WO2024022089A1 publication Critical patent/WO2024022089A1/en

Links

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

Definitions

  • the present disclosure relates to the field of blockchain technology, and more specifically, to a data processing method, a data verification method, a device, an electronic device, a computer-readable storage medium and a computer program product.
  • NFT Non-Fungible Token, non-fungible token
  • blockchain technology that is, a unique cryptocurrency token that represents digital assets.
  • NFT Non-Fungible Token, non-fungible token
  • NFTs represent traceable value to their owners, even when reduced to a simple Joint Photographic Experts Group (JPEG) format.
  • JPEG Joint Photographic Experts Group
  • Web 2.0 reduces the cost of social interaction between Internet users and soon has an impact on users' online/offline interactions.
  • Web 3.0 solves the trust problem by including the verification process in smart contracts. As the NFT market booms, NFTs spread like wildfire and are widely popularized through social media, entertainment, etc.
  • the present disclosure provides a data processing method, a data verification method, a device, an electronic device, a computer-readable storage medium and a computer program product.
  • a data processing method including: obtaining first identification information corresponding to the metadata of the target NFT, where the first identification information is the metadata of the target NFT stored in a block The identification information obtained after the chain, wherein the metadata of the target NFT includes identification information corresponding to the certificate information data associated with the target NFT, and the address of the certificate verification contract used to verify the target NFT, so
  • the identification information corresponding to the certificate information data is the identification information obtained after the certificate information data is stored in the blockchain; call the NFT creation contract to create the target NFT based on the first identification information; obtain the association with the target NFT
  • the second identification information corresponding to the metadata of the certificate NFT wherein the metadata of the certificate NFT includes relevant information of the NFT creation contract and the certificate information data, and the second identification information is the certificate NFT
  • the identification information obtained after the metadata is stored in the blockchain; the certificate creation contract is called to create the certificate NFT based on the second identification information, where the certificate creation contract corresponds to the certificate
  • a data verification method including: calling a certificate verification contract to verify the target NFT based on metadata of the target NFT and metadata of the certificate NFT associated with the target NFT. ; Output verification results; wherein, the target NFT is created by an NFT creation contract based on the first identification information corresponding to the metadata of the target NFT, and the certificate NFT is created by a certificate corresponding to the certificate verification contract The contract is created based on the second identification information corresponding to the metadata of the certificate NFT.
  • the metadata of the target NFT includes the identification information corresponding to the certificate information data associated with the target NFT, and the second identification information for the target NFT. The address of the certificate verification contract to be verified.
  • the metadata of the certificate NFT includes relevant information of the NFT creation contract and the certificate information data.
  • the first identification information is the metadata of the target NFT stored in The identification information obtained after the blockchain.
  • the identification information corresponding to the certificate information data is the identification information obtained after the certificate information data is stored in the blockchain.
  • the second identification information is the metadata storage of the certificate NFT. The identification information obtained after entering the blockchain.
  • a data processing device including: a first identification information acquisition unit configured to obtain first identification information corresponding to metadata of a target NFT, where the first identification information is the The identification information obtained after the metadata of the target NFT is stored in the blockchain, wherein the metadata of the target NFT includes identification information corresponding to the certificate information data associated with the target NFT, and information used to identify the target NFT. The address of the certificate verification contract to be verified.
  • the identification information corresponding to the certificate information data is the identification information obtained after the certificate information data is stored in the blockchain;
  • the target NFT creation unit is configured to call the NFT creation contract to create a contract based on the The first identification information creates the target NFT;
  • a second identification information acquisition unit is configured to obtain the second identification information corresponding to the metadata of the certificate NFT associated with the target NFT, wherein the metadata of the certificate NFT Including relevant information of the NFT creation contract and the certificate information data, the second identification information is the identification information obtained after the metadata of the certificate NFT is stored in the blockchain;
  • the certificate NFT creation unit is configured to call A certificate creation contract is used to create the certificate NFT based on the second identification information, wherein the certificate creation contract corresponds to the certificate verification contract.
  • a data verification device which is characterized in that it includes: a target NFT verification unit configured to call a certificate verification contract to based on the metadata of the target NFT and the data associated with the target NFT.
  • the metadata of the certificate NFT verifies the target NFT; the verification result output unit is configured to output the verification result; wherein the target NFT is created by the NFT creation contract based on the first identification information corresponding to the metadata of the target NFT
  • the certificate NFT is created by the certificate creation contract corresponding to the certificate verification contract based on the second identification information corresponding to the metadata of the certificate NFT, and the metadata of the target NFT includes the metadata of the target NFT.
  • the metadata of the certificate NFT includes relevant information of the NFT creation contract and the certificate information.
  • the first identification information is the identification information obtained after the metadata of the target NFT is stored in the blockchain
  • the identification information corresponding to the certificate information data is obtained after the certificate information data is stored in the blockchain.
  • Identification information is the identification information obtained after the metadata of the certificate NFT is stored in the blockchain.
  • an electronic device including: at least one processor; at least one memory storing computer-executable instructions, wherein the computer-executable instructions are executed by the at least one processor When the at least one processor is prompted to execute the data processing method or data verification method according to the present disclosure.
  • a computer-readable storage medium that, when instructions in the computer-readable storage medium are executed by at least one processor, causes the at least one processor to execute the method according to the present disclosure.
  • Data processing methods or data validation methods are executed by at least one processor.
  • a computer program product including computer instructions that, when executed by at least one processor, implement a data processing method or a data verification method according to the present disclosure.
  • a computer program is provided.
  • the computer program is executed by a processor, Implement the data processing method or data verification method according to the present disclosure.
  • Figure 1 is an NFT creation flow chart showing related technologies
  • FIG. 2 is a conceptual block diagram of data processing and verification according to an exemplary embodiment of the present disclosure
  • FIG. 3 is a flowchart illustrating a data processing method according to an exemplary embodiment of the present disclosure
  • FIG. 4 is a schematic diagram illustrating metadata of a target NFT according to an exemplary embodiment of the present disclosure
  • FIG. 5 is a schematic diagram illustrating metadata of a certificate NFT according to an exemplary embodiment of the present disclosure
  • FIG. 6 is a flowchart illustrating a data verification method according to an exemplary embodiment of the present disclosure
  • FIG. 7 is a flowchart illustrating a specific creation process of an NFT with a certificate according to an exemplary embodiment of the present disclosure
  • FIG. 8 is a flowchart illustrating a specific verification process of NFT with certificates according to an exemplary embodiment of the present disclosure
  • FIG. 9 is a block diagram illustrating a data processing apparatus according to an exemplary embodiment of the present disclosure.
  • FIG. 10 is a block diagram illustrating a data verification device according to an exemplary embodiment of the present disclosure.
  • FIG. 11 is a block diagram of an electronic device 1100 according to an exemplary embodiment of the present disclosure.
  • “at least one of the several items” appearing in this disclosure means including “any one of the several items”, “a combination of any of the several items”, The three types of juxtaposition of "all of the items”.
  • “including at least one of A and B” includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B.
  • “perform at least one of step 1 and step 2” means the following three parallel situations: (1) execute step 1; (2) execute step 2; (3) execute step 1 and step 2.
  • FIG. 1 is an NFT creation flowchart showing related technology.
  • the NFT creator can upload the NFT object (digital file) to a centralized cloud storage or decentralized blockchain (for example, InterPlanetary File System (IPFS) or AR ( Arweave), etc.), obtain the identification information corresponding to the NFT object, for example, token (ie, token or unique identification).
  • IPFS InterPlanetary File System
  • AR Arweave
  • digital files can be pictures, videos, audios, data Any digitizable file such as word (virtual) artwork.
  • the NFT creator can organize the metadata of the NFT based on the identification information corresponding to the NFT object, store the metadata of the NFT in a decentralized blockchain (for example, IPFS or AR, etc.), and obtain the metadata of the NFT.
  • Identification information corresponding to the data for example, token.
  • the NFT is created through a smart contract based on the identification information corresponding to the NFT's metadata. Specifically, the smart contract can generate unique identification information, such as token, based on the identification information corresponding to the metadata of the NFT. This unique identification information is the NFT.
  • the token can be a hash value obtained through a hash algorithm. Since the hash algorithm has the characteristics of one-way and collision resistance, each hash value can uniquely correspond to an original content and cannot be tampered with. Therefore, Each token can be used to uniquely identify the corresponding data.
  • NFT is still in its early stages of development, there are still many problems that have not been perfected. For example, some people steal other people's artistic works without the original consent and make NFTs for sale on various platforms. For example, fraudsters use SleepMinting technology to forge other people's valuable NFTs and deceive others into purchasing them. SleepMinting is an NFT forgery method that forges the NFT creator and NFT creation process through the writing of smart contracts. For example, fraudsters copy the original file of an NFT created by a famous artist, create an NFT in the name of the famous artist, and at the same time forge transaction records to make it appear that the NFT was traded from the famous artist's account, thereby defrauding others. Purchase this NFT. In other words, a fraudster can bypass the account of the creator (i.e., a famous artist) by writing a smart contract with loopholes, and forge an NFT in the name of the creator.
  • the creator i.e., a famous artist
  • the NFT creation contract is written by developers themselves, fraudsters, as developers, subjectively write backdoors and cannot control the fraudster's personal behavior.
  • a common protocol for example, ERC-721 protocol
  • ERC-721 protocol is upgraded to include data audit-related content
  • SleepMinting fraud can be prevented.
  • the NFT trading platform adds data verification, it can prevent the NFT listing platform from such SleepMinting fraud, but it cannot prevent the use of SleepMinting fraud to create NFT.
  • the present disclosure provides a data processing method and a data verification method, through a pair of smart contracts (i.e., one smart contract for Create a certificate NFT with relevant certificate data for the target NFT, and another smart contract is used to verify the validity of the certificate data), create an anti-counterfeiting certificate NFT for the target NFT, and use the certificate NFT to verify the authenticity of the target NFT.
  • the target NFT can be protected by certificate NFT, thereby ensuring the authenticity of the NFT creation process, preventing fraud such as SleepMinting, and protecting the rights and interests of NFT creators and NFT collectors.
  • This disclosure utilizes the non-tampering characteristics of blockchain technology to save the certificate information data of the certificate NFT, so that the certificate NFT can be used to verify the authenticity of the target NFT.
  • FIG. 2 is a conceptual block diagram of data processing and verification according to an exemplary embodiment of the present disclosure.
  • the user for example, NFT creator
  • creates the target NFT through the NFT creation contract in the blockchain for example, Ethereum, etc.
  • the NFT creation contract refers to the smart contract used to create NFT.
  • a target NFT may refer to an NFT created by an NFT creator for its NFT subject (for example, a digital file of a picture, video, etc.).
  • the NFT creator is not the same as the NFT creator.
  • the NFT creator can create NFT as the NFT creator, or authorize the NFT creator to create NFT.
  • the user e.g., the NFT creator
  • creates a contract through the certificate in the blockchain based on the data used to verify the target NFT and the target NFT For related information, create a certificate NFT related to the target NFT. That is, the user authorizes the certificate creation contract to create the certificate NFT.
  • the certificate creation contract refers to the smart contract used to create the certificate NFT.
  • the creation process of the target NFT and the creation process of the certificate NFT use information that uniquely identifies each other, that is to say, the creation process of the target NFT uses information that can uniquely identify the certificate information, and the creation process of the certificate NFT uses information that can uniquely identify each other.
  • the certificate creation contract can obtain data from the blockchain (e.g., IPFS, AR, etc.) ) Obtain the metadata of the certificate NFT and verify its correctness to ensure that the created certificate NFT is indeed the certificate NFT of the target NFT.
  • the third-party oracle refers to the server that connects the off-chain data of the blockchain with the smart contracts on the chain. Since the blockchain where the certificate creation contract is located is different from the blockchain where the metadata of the certificate NFT is stored, the certificate creation contract cannot directly obtain the metadata of the certificate NFT and needs to obtain the metadata of the certificate NFT through a third-party oracle. metadata.
  • users can call the certificate verification contract through the client to verify the target NFT.
  • the client for example, a browser
  • web3.js to call the certificate verification contract through the client (for example, a browser), and input the relevant information of the target NFT into the certificate verification contract.
  • the certificate verification contract can Based on the relevant information of the target NFT, through interaction with a third-party oracle (e.g., Chainlink Oracle Network, etc.), from the blockchain that stores the metadata of the target NFT and the certificate associated with the target NFT, the metadata of the NFT (e.g., IPFS, AR, etc.) obtains the metadata of the target NFT and the metadata of the certificate NFT, so as to verify the authenticity of the target NFT based on the metadata of the target NFT and the metadata of the certificate NFT.
  • the certificate creation contract used in the NFT creation process and the certificate verification contract used in the NFT verification process are a pair of smart contracts.
  • the certificate verification contract cannot directly obtain the metadata of the target NFT and the metadata of the certificate NFT. , it is necessary to obtain the metadata of the certificate NFT through a third-party oracle.
  • a pair of smart contracts (certificate creation contract and certificate verification contract) can be used to create an anti-counterfeiting certificate NFT for the target NFT, and verify the target NFT through the relevant data of the certificate NFT authenticity and prevent NFT fraud.
  • FIG. 3 is a flowchart illustrating a data processing method according to an exemplary embodiment of the present disclosure.
  • first identification information corresponding to the metadata of the target NFT can be obtained.
  • the target NFT may refer to the NFT created by the NFT creator for its NFT object (for example, digital files of pictures, videos, etc.).
  • the metadata of the target NFT may include identification information corresponding to the NFT object and any description information related to the NFT object.
  • the identification information corresponding to the NFT object may be the identification information obtained after the NFT object is stored in the blockchain or cloud storage, and is used to indicate the storage address of the NFT object.
  • the metadata of the target NFT is not limited to the above information.
  • the metadata of the target NFT may include data for verifying the target NFT.
  • the metadata of the target NFT may also include, but is not limited to, identification information corresponding to the certificate information data associated with the target NFT, and the address of the certificate verification contract used to verify the target NFT.
  • the certificate information data may include data used by the certificate verification contract to verify the target NFT.
  • the identification information corresponding to the certificate information data can be the identification information obtained after the certificate information data is stored in the blockchain, using To indicate the storage address of certificate information data in the blockchain.
  • the address of the certificate verification contract refers to the storage address of the certificate verification contract in the blockchain.
  • the identification information may be, but is not limited to, a hash value generated by a hash algorithm, called a token, which is used to uniquely identify the corresponding data.
  • FIG. 4 is a schematic diagram illustrating metadata of a target NFT according to an exemplary embodiment of the present disclosure.
  • the metadata of the target NFT may include identification information corresponding to the NFT object, description information corresponding to the NFT object, the address of the certificate verification contract, and identification information corresponding to the certificate information data.
  • the certificate information data may include, but is not limited to, at least one of the following items: NFT target address, NFT creation contract address, certificate verification contract address, NFT creator account address, NFT creation The person’s public key, NFT creator’s signature, and NFT creator’s signature expiration time.
  • the address of the NFT object refers to the storage address of the NFT object in the blockchain or cloud storage.
  • the NFT creation contract address refers to the storage address of the NFT creation contract in the blockchain.
  • the address of the certificate verification contract refers to the storage address of the certificate verification contract in the blockchain.
  • the NFT creator's account address refers to the storage address of the target NFT and its certificate NFT after the creation is completed.
  • the hash value of the NFT creator's public key is the NFT creator's account address and can be used for NFT creator encryption or decryption.
  • the NFT creator's signature is obtained by using the NFT creator's private key to encrypt other certificate information data in the certificate information data except the NFT creator's signature.
  • the NFT creator's private key can be used to encrypt the entire certificate information data (json data) that does not include the NFT creator's signature, and then add the encrypted NFT creator's signature to the certificate information data (json data). .
  • the certificate creation contract is bound to the NFT creator.
  • the expiration time of the NFT creator's signature refers to the expiration time of the signature authorized by the NFT creator. That is to say, after the expiration time of the NFT creator's signature, the NFT creator's signature becomes invalid.
  • the certificate information data of this disclosure is not limited to the above data, and may include other certificate information data that you wish to verify as needed, for subsequent use by the certificate verification contract to verify the target NFT.
  • the NFT creation contract may be called to create the target NFT based on the first identification information. Specifically, after receiving the first identification information, the NFT creation contract can generate identification information (for example, token) for identifying the first identification information. The generated identification information is the target NFT. After the target NFT is created, the NFT creation contract will deposit the target NFT into the NFT creator's account.
  • identification information for example, token
  • second identification information corresponding to the metadata of the certificate NFT related to the target NFT may be obtained.
  • the metadata of the certificate NFT may include information related to the NFT creation contract and certificate information data.
  • Information related to the NFT creation contract refers to information related to the event in which the NFT creation contract creates the target NFT.
  • the second identification information corresponding to the metadata of the certificate NFT may be the identification information obtained after the metadata of the certificate NFT is stored in the blockchain, and is used to indicate the storage address of the metadata of the certificate NFT in the blockchain.
  • FIG. 5 is a schematic diagram illustrating metadata of a certificate NFT according to an exemplary embodiment of the present disclosure.
  • the metadata of the certificate NFT may include information related to the NFT creation contract and certificate information data.
  • the relevant information of the NFT creation contract may include, but is not limited to, the address of the NFT creation contract and the digital identification (for example, token ID) of the target NFT in the NFT creation contract.
  • the NFT creation contract After the NFT creation contract creates the target NFT (i.e., target token), the NFT creation contract will mark and record the target NFT by using a digital identification (i.e., token ID). For example, if the target NFT is the 100th NFT created by the NFT creation contract, the target NFT can be marked with 100. Therefore, the token ID of the target NFT is 100.
  • the NFT creation contract and token ID can uniquely identify an NFT. Therefore, the relevant NFT creation contract
  • the information may include the address of the NFT creation contract and the digital identification of the target NFT in the NFT creation contract, thereby uniquely identifying the target NFT.
  • the relevant information of the NFT creation contract is not limited to this.
  • the relevant information of the NFT creation contract may not include the digital identification of the target NFT in the NFT creation contract, but include the identification information (token) of the target NFT, that is, the target NFT itself. token value, etc.
  • the certificate creation contract may be called to create the certificate NFT based on the second identification information, where the certificate creation contract is a contract corresponding to the certificate verification contract. Specifically, after receiving the second identification information, the certificate creation contract can generate identification information (for example, token) for identifying the second identification information. The generated identification information is the certificate NFT. After the certificate NFT is created, the certificate creation contract will deposit the certificate NFT into the NFT creator's account.
  • identification information for example, token
  • the certificate creation contract will first verify the metadata of the certificate NFT before creating the certificate NFT, and only use the second identification information to create the certificate NFT after the metadata of the certificate NFT is verified to be correct. , thereby ensuring that the created certificate NFT is indeed the certificate NFT of the target NFT.
  • At least one piece of data related to the metadata of the certificate NFT can be verified, and if each piece of data is verified to be correct, then the metadata of the certificate NFT is verified to be correct, This begins creating the certificate NFT. Once the verified data is incorrect, the creation of the certificate NFT will be terminated. For example, at least one of the address of the certificate verification contract, the second identification information, and the creator of the certificate NFT (the creator of the certificate NFT) can be verified.
  • the certificate verification contract in the metadata of the certificate NFT it is possible to verify whether the address of the certificate verification contract in the metadata of the certificate NFT is correct, thereby preventing the certificate NFT from being created incorrectly or the certificate NFT after creation being unable to be used for verification.
  • the address of the certificate verification contract in the metadata of the certificate NFT is incorrect, it means that the certificate verification contract does not correspond to the certificate creation contract that created the certificate NFT, which will cause the certificate NFT to be incorrectly created or the certificate NFT after creation cannot for verification.
  • the certificate creation contract and the certificate verification contract are a pair of contracts, if the address of the certificate verification contract is correct, the address of the certificate creation contract is also correct, so you only need to verify the correctness of the address of the certificate verification contract.
  • the blockchain storing the metadata of the certificate NFT is queried based on the second identification information corresponding to the metadata of the certificate NFT, to obtain the address of the certificate verification contract in the metadata of the certificate NFT.
  • the correctness of the address of the certificate verification contract in the metadata of the certificate NFT can be verified based on the address of the actual certificate verification contract. Since the certificate creation contract and the certificate verification contract are a pair of contracts, the certificate creation contract can determine the address of the actual certificate verification contract, that is, the address of the actual certificate verification contract is determined by the address of the certificate creation contract.
  • the address of the certificate verification contract in the metadata of the certificate NFT is consistent with the address of the actual certificate verification contract, it is determined that the address of the certificate verification contract in the metadata of the certificate NFT is correct. Otherwise, it is determined that the address of the certificate verification contract in the metadata of the certificate NFT is wrong, and the creation of the certificate NFT is terminated.
  • the second identification information corresponding to the metadata of the certificate NFT has been used in the certificate creation contract, thereby preventing the situation where one certificate NFT corresponds to multiple NFT objects.
  • the second identification information has been used in the certificate creation contract, it means that the certificate NFT has already corresponded to other NFT objects, which will cause the certificate NFT to correspond to multiple NFT objects and lose verification reliability.
  • the metadata of the certificate NFT should correspond to a unique identification information. Therefore, you can check in the creation record of the certificate creation contract whether the second identification information has been used in the creation of the certificate creation contract. If it is determined that the second identification information has not been used in the creation of the certificate creation contract, has been used, it is determined that the second identification information is correct. Otherwise, it is determined that the second identification information is incorrect, and the creation of the certificate NFT is terminated.
  • the creator of the certificate NFT it is possible to verify whether the creator of the certificate NFT is correct, that is, whether the creator of the certificate NFT is the NFT creator (ie, the creator of the target NFT) himself, thereby preventing forgery by non-NFT creators. Certificate NFT. This is why the creator of the target NFT and the creator of the certificate NFT should be the same person (i.e., the NFT creator), otherwise there may be a situation where a non-NFT creator forges the certificate NFT. According to an exemplary embodiment of the present disclosure, it can be verified by verifying (1) whether the certificate NFT creation account address is the account address of the current certificate NFT creator and (2) whether the certificate NFT creation account address is the account address of the NFT creator.
  • the correctness of the creator of the certificate NFT can be verified by verifying the correctness of the account address created by the certificate NFT and the consistency of the NFT creator's public key in the metadata of the certificate NFT and the address of the account created by the certificate NFT.
  • the certificate creation contract sends the predetermined information to the certificate NFT creation account.
  • the certificate NFT creation account uses the private key to encrypt the signature of the predetermined information and sends the signature to the certificate creation contract.
  • the certificate creation contract uses the public key to decrypt the signature and Verify whether the decrypted data is consistent with the predetermined information. If it is consistent, it is determined that the certificate NFT creation account address is the account address of the certificate NFT creator.
  • the certificate NFT creation account address is not the certificate NFT creator. account address.
  • the NFT creator's account address is obtained based on the NFT creator's public key in the metadata of the certificate NFT, and the NFT creator's account address is combined with the certificate NFT creation Compare the account addresses; if the NFT creator's account address is consistent with the certificate NFT creation account address, it is determined that the creator of the certificate NFT is correct; otherwise, it is determined that the creator of the certificate NFT is wrong.
  • the present disclosure is not limited to the above-mentioned process of verifying the correctness of the metadata of the certificate NFT. Any possible method or data can also be used to verify the correctness of the metadata of the certificate NFT.
  • FIG. 6 is a flowchart illustrating a data verification method according to an exemplary embodiment of the present disclosure. After the target NFT with certificate NFT is created according to the data processing method shown in Figure 3 of the present disclosure, the user can verify the target NFT according to the data verification method shown in Figure 6 of the present disclosure to verify the authenticity of the target NFT. sex.
  • step 601 the certificate verification contract can be called to verify the target NFT based on the metadata of the target NFT and the metadata of the certificate NFT associated with the target NFT; in step 602, the verification result can be output.
  • the relevant information of the NFT creation contract can be input into the certificate verification contract, and through the certificate verification contract, based on the relevant information of the NFT creation contract, the metadata of the target NFT and the metadata of the certificate NFT can be obtained.
  • the information related to the NFT creation contract refers to the information related to the event that the NFT creation contract creates the target NFT.
  • the relevant information of the NFT creation contract may include, but is not limited to, the address of the NFT creation contract and the digital identification (for example, token ID) of the target NFT in the NFT creation contract.
  • the relevant information of the NFT creation contract may also include identification information corresponding to the target NFT or identification information corresponding to the subject of the target NFT, etc., or these identification information may be used instead. Digital ID.
  • the certificate verification contract can communicate with a third-party oracle (for example, Chainlink oracle network), and use the third-party oracle to create relevant information of the contract based on the NFT, from storing the target NFT
  • a third-party oracle for example, Chainlink oracle network
  • the certificate verification contract and the third-party oracle are in the same blockchain.
  • the certificate verification contract can issue a metadata acquisition request containing relevant information of the NFT creation contract, and the third-party oracle obtains the metadata from the chain.
  • the relevant information of the contract created based on the NFT obtains the metadata of the target NFT from the blockchain that stores the metadata of the target NFT (not in the same blockchain as the certificate verification contract and the third-party oracle), and will obtain the target NFT.
  • the metadata of the NFT is published on the chain, and the certificate verification contract can obtain the metadata of the target NFT from the chain.
  • a certificate verification contract may be used to communicate with a third-party oracle (for example, the Chainlink oracle network), and the third-party oracle may be used to obtain metadata from a block storing the metadata of the certificate NFT based on the second identification information.
  • Chain gets the metadata of the certificate NFT.
  • the certificate verification contract and the third-party oracle are in the same blockchain.
  • the certificate verification contract can issue a metadata acquisition request containing the second identification information, and the third-party oracle obtains the metadata from the chain.
  • the certificate verification contract After the request, obtain the metadata of the certificate NFT from the blockchain that stores the metadata of the certificate NFT based on the second identification information (not on the same blockchain as the certificate verification contract and the third-party oracle), and store the metadata of the certificate NFT.
  • the metadata is published on the chain, and the certificate verification contract can obtain the metadata of the certificate NFT from the chain.
  • the identification information corresponding to the metadata of the certificate NFT is obtained from the certificate creation contract, that is, the second identification information; and through a third-party oracle, based on the second Identification information, obtain the metadata of the certificate NFT from the blockchain (for example, IPFS, AR, etc.) that stores the metadata of the certificate NFT.
  • the blockchain for example, IPFS, AR, etc.
  • At least one item of data in the metadata of the target NFT and at least one item of data in the metadata of the certificate NFT can be verified separately. If each item of verified data is correct, then it can be It is determined that the target NFT is authentic, that is, it can be determined that the target NFT was created or authorized to be created by the NFT creator of the transaction record on the target NFT metadata, and a verification result indicating that the target NFT is authentic is output. Once it is detected that an item of data is incorrect, it can be determined that the target NFT is forged by others, and a prompt indicating that the authenticity of the target NFT is at risk is output.
  • This disclosure does not limit the order of the verification process for each piece of data.
  • validation can be performed on each piece of data simultaneously.
  • each piece of data can be verified in sequence. As long as some data fails to pass the verification, the verification will be terminated and the verification result will be output.
  • at least one piece of data in the metadata of the target NFT can be verified first, and if the verification passes, at least one piece of data in the metadata of the certificate NFT can be verified.
  • at least one piece of data in the metadata of the certificate NFT can be verified first, and if the verification passes, at least one piece of data in the metadata of the target NFT can be verified.
  • a first verification may be performed on the target NFT based on the metadata of the target NFT; if the first verification is passed, a second verification may be performed on the target NFT based on the metadata of the certificate NFT.
  • the first verification may include separately verifying at least one item of data in the metadata of the target NFT. If the verification result of the at least one item of data is failed, outputting an indication that the target NFT The authenticity of the verification results is at risk.
  • the data verified by the first verification may include, but is not limited to, at least one of the following items: the address of the certificate verification contract in the metadata of the target NFT and the NFT creator account address in the metadata of the target NFT.
  • the address of the certificate verification contract in the metadata of the target NFT the consistency of the address of the certificate verification contract in the metadata of the target NFT with the address of the called certificate verification contract can be verified. If the address of the certificate verification contract in the metadata of the target NFT is consistent with the address of the called certificate verification contract, it means that the address of the certificate verification contract in the metadata of the target NFT is correct, then the address of the certificate verification contract in the metadata of the target NFT is correct. The verification result of the address is passed.
  • the NFT creator account address in the metadata of the target NFT is consistent with the NFT creator account address in the transaction record, it means that the NFT creator account address in the metadata of the target NFT is correct, then the NFT creator account address in the metadata of the target NFT is correct.
  • the verification result of the personal account address is passed. If they are inconsistent, it means that the NFT creator account address in the metadata of the target NFT is incorrect, and the verification result of the NFT creator account address in the metadata of the target NFT is failed, and a verification that the authenticity of the target NFT is at risk is output. result.
  • the first verification of the present disclosure is not limited to the above-mentioned verification process, and may also include verification processes for other data in the metadata of the target NFT as needed or set.
  • the second verification may include separately verifying at least one item of data in the metadata of the certificate NFT. If the verification result of the at least one item of data is failed, then Output verification results indicating that the authenticity of the target NFT is at risk.
  • the data verified by the second verification may include, but is not limited to, at least one of the following items: NFT creator public key, NFT creator signature, NFT creator signature expiration time, NFT target address, NFT creation contract
  • the address and certificate verify the address of the contract.
  • NFT creator public key you can obtain the NFT creator's account address based on the NFT creator's public key in the metadata of the certificate NFT, and verify that the obtained NFT creator's account address matches the address in the metadata of the target NFT.
  • the consistency of the NFT creator's account address is used to determine whether the public key on the NFT certificate belongs to the NFT creator.
  • the hash value of the NFT creator's public key can be used to derive the NFT creator's account address. Therefore, the NFT creator's account address can be obtained by hashing the NFT creator's public key. If the obtained NFT creator account address is consistent with the NFT creator account address in the metadata of the target NFT, it means that the public key on the certificate NFT belongs to the NFT creator, then determine the NFT creator in the metadata of the certificate NFT. The verification result of the public key is passed.
  • each item of data after decryption is consistent with the corresponding data in other certificate information data, it means that the metadata of the certificate NFT is authorized by the NFT creator, and the verification result of the NFT creator's signature in the metadata of the certificate NFT is pass. If they are inconsistent, it means that the metadata of the certificate NFT is not authorized by the NFT creator, and the verification result of the NFT creator's signature in the metadata of the certificate NFT is failed, and the verification result that the authenticity of the target NFT is at risk is output. (3) When verifying the expiration time of the NFT creator's signature, verify the matching of the NFT creator's signature expiration time in the metadata of the certificate NFT with the creation time or on-chain time of the target NFT to verify whether there is an expired creation.
  • the NFT creation contract completes the creation of the target NFT
  • the information related to the creation time or the uploading time is recorded on the blockchain. If the creation time or uploading time is within the expiration time of the NFT creator's signature, that is, both or match, it means that the target NFT was created within the valid time authorized by the NFT creator, so the creation of the target NFT was authorized by the NFT creator, then the verification result of the NFT creator's signature expiration time in the metadata of the certificate NFT is pass.
  • the creation time or on-chain time exceeds the expiration time of the NFT creator's signature, that is, the two do not match, it means that the target NFT was created outside the valid time authorized by the NFT creator, indicating that the target NFT was created by someone other than the NFT creator. authorized, the verification result of the NFT creator’s signature expiration time in the metadata of the certificate NFT is failed, and Output verification results indicating that the authenticity of the target NFT is at risk.
  • verifying the NFT target address verify the consistency of the NFT target address in the metadata of the certificate NFT and the NFT target address in the metadata of the target NFT to verify whether the NFT target corresponding to the certificate NFT is correct.
  • the NFT target address in the metadata of the certificate NFT is consistent with the NFT target address in the metadata of the target NFT, it means that the NFT target corresponding to the certificate NFT is correct, and the verification result of the NFT target address in the metadata of the certificate NFT is passed. If they are inconsistent, it means that the NFT target corresponding to the certificate NFT is incorrect, and the verification result of the NFT target address in the metadata of the certificate NFT is failed, and the verification result that the authenticity of the target NFT is at risk is output.
  • the target NFT corresponding to the verification certificate NFT is not created by the NFT creation contract, and the verification result of the NFT creation contract address in the metadata of the certificate NFT is failed, and the verification result that the authenticity of the target NFT is at risk is output.
  • (6) When verifying the address of the certificate verification contract, verify the consistency of the address of the certificate verification contract in the metadata of the certificate NFT and the address of the certificate verification contract in the metadata of the target NFT to verify whether the certificate NFT is generated by the target NFT The specified certificate verification contract is used for verification.
  • the address of the certificate verification contract in the metadata of the certificate NFT is consistent with the address of the certificate verification contract in the metadata of the target NFT, it means that the certificate NFT is verified by the certificate verification contract specified by the target NFT, then the metadata of the certificate NFT The verification result of the address of the certificate verification contract is passed. If they are inconsistent, it means that the certificate NFT is not verified by the certificate verification contract specified by the target NFT. The verification result of the address of the certificate verification contract in the metadata of the certificate NFT is failed, and a verification that the authenticity of the target NFT is at risk is output. result.
  • the second verification of the present disclosure is not limited to the above-mentioned verification process.
  • Part of the above-mentioned verification process can also be skipped according to needs or settings (for example, if the user passes in the address of the NFT target when initiating verification, verification (4) needs to be performed, otherwise verification may not be performed. (4)), or add a verification process for other data in the metadata of the certificate NFT.
  • the certificate NFT associated with the target NFT can be created based on the certificate information data associated with the target NFT through the certificate creation contract, and the certificate NFT associated with the target NFT can be utilized through the certificate verification contract.
  • Verify the target NFT that is, create an anti-counterfeiting certificate NFT for the target NFT through a pair of smart contracts (i.e., certificate creation contract and certificate verification contract), and verify the target NFT through the certificate NFT, thereby ensuring that the target NFT authenticity to prevent fraud like SleepMinting.
  • FIG. 7 is a flowchart illustrating a specific creation process of an NFT with a certificate according to an exemplary embodiment of the present disclosure.
  • the NFT object for example, digital files of pictures, videos, etc.
  • the blockchain such as, but not limited to, IPFS or AR, etc.
  • the corresponding data of the NFT object can be obtained.
  • token can be called the first token).
  • the certificate information data can be organized, uploaded to the blockchain (for example, but not limited to, IPFS or AR, etc.), and a token corresponding to the certificate information data (which can be called a second token) is obtained.
  • Certificate information data may include, but is not limited to, at least one of the following items: NFT subject address, NFT creation contract address, certificate verification contract address, NFT creator account address, NFT creator public key, NFT creator signature and NFT creator Signature expiration time.
  • step 701 may be executed first and then step 702, or step 702 may be executed first and then step 701, or both may be executed simultaneously.
  • the metadata of the target NFT can be organized, uploaded to the blockchain (for example, but not limited to, IPFS or AR, etc.), and a token corresponding to the metadata of the target NFT (which can be called third token).
  • the metadata of the target NFT may include, but is not limited to, descriptive information related to the NFT object, the first token, the second token, and the address of the certificate verification contract used to verify the target NFT (the address of the certificate verification contract) .
  • the obtained third token can be passed into the NFT creation contract in the blockchain (for example, but not limited to, Ethereum, etc.), and the NFT creation contract generates the corresponding token (which can be called the fourth token) based on the third token. token).
  • the fourth token is the target NFT, that is, the target NFT is created. After the target NFT is created, it can be deposited into the NFT creator's account. In addition, when the target NFT is created, the token ID of the target NFT in the NFT creation contract can also be obtained.
  • the metadata of the certificate NFT can be organized and uploaded to the blockchain (for example, but not limited to, IPFS or AR, etc.) to obtain the token corresponding to the metadata of the certificate NFT (which can be called fifth token).
  • the metadata of the certificate NFT can include, but is not limited to, the NFT creation contract address, token ID, and certificate information data.
  • the obtained fifth token is passed into the certificate creation contract in the blockchain, and the certificate creation contract verifies the correctness of the metadata of the certificate NFT.
  • the certificate creation contract can verify the correctness of the metadata of the certificate NFT from, but not limited to, the following aspects: (1) Verify whether the address of the certificate verification contract in the metadata of the certificate NFT is correct to prevent certificate errors Certificates created and created cannot be verified. (2) Verify whether the token corresponding to the metadata of the certificate NFT (ie, the fifth token) has been used in the certificate creation contract to prevent one certificate from corresponding to multiple target NFTs. (3) Verify whether the creator of the certificate NFT is the NFT creator to prevent non-NFT creators from forging the certificate NFT. Once one piece of data verification fails, in step 707, the creation of the certificate NFT is terminated.
  • step 708 after verifying that the metadata of the certificate NFT is correct, the certificate creation contract generates the corresponding token based on the fifth token (which can be called the sixth token).
  • the sixth token is the certificate NFT, that is, the creation of the certificate NFT is completed. After the certificate NFT is created, it can be deposited into the NFT creator's account.
  • FIG. 8 is a flowchart illustrating a specific verification process of an NFT with a certificate according to an exemplary embodiment of the present disclosure.
  • step 801 the certificate verification contract can be called through the client (for example, browser, application, etc.) using web3.js, and the NFT creation contract address and the token ID of the target NFT in the NFT creation contract can be entered into the certificate verification contract.
  • client for example, browser, application, etc.
  • the certificate verification contract can pass the Chainlink third-party oracle, based on the NFT creation contract address and the token ID of the target NFT in the NFT creation contract from the blockchain that stores the metadata of the target NFT (for example, IPFS or AR, etc.) , read the metadata of the target NFT.
  • the target NFT for example, IPFS or AR, etc.
  • the certificate verification contract can obtain the token corresponding to the metadata of the certificate NFT from the certificate creation contract (ie, the fifth token in Figure 7) based on the NFT creation contract address and the token ID of the target NFT in the NFT creation contract. , and through the Chainlink third-party oracle, based on the token, read the metadata of the certificate NFT from the blockchain (for example, IPFS or AR, etc.) that stores the metadata of the certificate NFT.
  • This disclosure does not limit the execution order of steps 802 and 803. For example, they may be executed at the same time. For example, step 802 may be executed first and then step 803. For example, step 803 may be executed first and then step 802.
  • the certificate verification contract may perform verification on the metadata of the target NFT. For example, but not limited to, verification can be performed separately on the address of the certificate verification contract and the address of the NFT creator's account in the metadata of the target NFT. Once one data verification fails, in step 805, a verification result indicating that the target NFT has a fraud risk is output.
  • the certificate verification contract may perform verification of the metadata of the certificate NFT. For example, but not limited to, the NFT target address, NFT creation contract address, certificate verification contract address, NFT creator account address, NFT creator public key, NFT creator signature and NFT creation in the metadata of the certificate NFT can be processed separately. The expiration time of the person's signature is verified separately. Once one data verification fails, in step 805, a verification result indicating that the target NFT has a fraud risk is output.
  • step 807 if the verification of the metadata of the certificate NFT passes, a verification result indicating that the target NFT is authentic is output.
  • FIG. 9 is a block diagram illustrating a data processing apparatus according to an exemplary embodiment of the present disclosure.
  • a data processing apparatus 900 may include a first identification information acquisition unit 901, a target NFT creation unit 902, a second identification information acquisition unit 903, and a certificate NFT creation unit 904.
  • the first identification information obtaining unit 901 may obtain the first identification information corresponding to the metadata of the target NFT.
  • the target NFT may refer to the NFT created by the NFT creator for its NFT object (for example, digital files of pictures, videos, etc.).
  • the metadata of the target NFT may include identification information corresponding to the NFT object and any description information related to the NFT object.
  • the identification information corresponding to the NFT object may be the identification information obtained after the NFT object is stored in the blockchain or cloud storage, and is used to indicate the storage address of the NFT object.
  • the metadata of the target NFT is not limited to the above information.
  • the metadata of the target NFT needs to include at least data for verifying the target NFT.
  • the metadata of the target NFT may also include, but is not limited to, identification information corresponding to the certificate information data associated with the target NFT, and the address of the certificate verification contract used to verify the target NFT.
  • the certificate information data may include data used by the certificate verification contract to verify the target NFT.
  • the identification information corresponding to the certificate information data may be the identification information obtained after the certificate information data is stored in the blockchain, and is used to indicate the storage address of the certificate information data.
  • the address of the certificate verification contract refers to the storage address of the certificate verification contract in the blockchain.
  • the certificate information data may include, but is not limited to, at least one of the following items: NFT target address, NFT creation contract address, certificate verification contract address, NFT creator account address, NFT creation The person’s public key, NFT creator’s signature, and NFT creator’s signature expiration time.
  • the certificate information data of this disclosure is not limited to the above data, and may include other certificate information data that you wish to verify as needed, for subsequent use by the certificate verification contract to verify the target NFT.
  • the target NFT creation unit 902 may call the NFT creation contract to create the target NFT based on the first identification information. Specifically, the target NFT creation unit 902 can generate identification information (for example, token) for identifying the first identification information through the NFT creation contract, and the generated identification information is the target NFT. After the creation of the target NFT is completed, the target NFT creation unit 902 can deposit the target NFT into the NFT creator's account through the NFT creation contract.
  • identification information for example, token
  • the second identification information obtaining unit 903 may obtain the second identification information corresponding to the metadata of the certificate NFT related to the target NFT.
  • the metadata of the certificate NFT may include information related to the NFT creation contract and certificate information data.
  • the information related to the NFT creation contract refers to the information related to the NFT Create contract to create event-related information of the target NFT.
  • the second identification information corresponding to the metadata of the certificate NFT may be identification information obtained after the metadata of the certificate NFT is stored in the blockchain, and is used to indicate the storage address of the metadata of the certificate NFT.
  • the relevant information of the NFT creation contract may include, but is not limited to, the address of the NFT creation contract and the digital identification (for example, token ID) of the target NFT in the NFT creation contract.
  • the relevant information of the NFT creation contract is not limited to this.
  • the relevant information of the NFT creation contract may not include the digital identification of the target NFT in the NFT creation contract, but include the identification information (token) of the target NFT, that is, the target NFT itself. token value, etc.
  • the certificate NFT creation unit 904 may call a certificate creation contract to create a certificate NFT based on the second identification information, where the certificate creation contract is a contract corresponding to the certificate verification contract. Specifically, the certificate NFT creation unit 904 can generate identification information (for example, token) for identifying the second identification information through the certificate creation contract, and the generated identification information is the certificate NFT. After the creation of the certificate NFT is completed, the certificate NFT creation unit 904 can deposit the certificate NFT into the NFT creator's account through the certificate creation contract.
  • identification information for example, token
  • the certificate NFT creation unit 904 can first verify the metadata of the certificate NFT before creating the certificate NFT through the certificate creation contract. After the metadata of the certificate NFT is verified to be correct, the third certificate NFT can be used. Use the second identification information to create a certificate NFT, thereby ensuring that the created certificate NFT is indeed the certificate NFT of the target NFT.
  • the certificate NFT creation unit 904 may verify at least one piece of data related to the metadata of the certificate NFT, and if each item of data is verified to be correct, then the certificate NFT The metadata is verified to be correct, thus starting the creation of the certificate NFT. Once the verified data is incorrect, the creation of the certificate NFT will be terminated.
  • the certificate NFT creation unit 904 may verify at least one of the address of the certificate verification contract, the second identification information, and the certificate NFT creator.
  • the certificate NFT creation unit 904 may verify whether the address of the certificate verification contract in the metadata of the certificate NFT is correct, thereby preventing the certificate NFT from being created incorrectly or the created certificate NFT from being unavailable for verification. This is because if the address of the certificate verification contract in the metadata of the certificate NFT is incorrect, it means that the certificate verification contract does not correspond to the certificate creation contract that created the certificate NFT, which will cause the certificate NFT to be incorrectly created or the certificate NFT after creation cannot for verification.
  • the address of the certificate verification contract in the metadata of the certificate NFT can be obtained by querying the blockchain that stores the metadata of the certificate NFT based on the second identification information corresponding to the metadata of the certificate NFT through a third-party oracle.
  • the certificate creation contract can determine the address of the actual certificate verification contract, that is, the address of the actual certificate verification contract is determined by the address of the certificate creation contract. For example, if the address of the certificate verification contract in the metadata of the certificate NFT is consistent with the address of the actual certificate verification contract, it is determined that the address of the certificate verification contract in the metadata of the certificate NFT is correct. Otherwise, it is determined that the address of the certificate verification contract in the metadata of the certificate NFT is wrong, and the creation of the certificate NFT is terminated.
  • the certificate NFT creation unit 404 can verify whether the second identity corresponding to the metadata of the certificate NFT has been used in the certificate creation contract, thereby preventing one certificate NFT from corresponding to multiple NFT objects. This is because if the second identification information has been used in the certificate creation contract, it means that the certificate NFT has already corresponded to other NFT objects, which will cause the certificate NFT to correspond to multiple NFT objects and lose verification reliability. In other words, the metadata of the certificate NFT should correspond to a unique identification information, so it can be recorded in the creation record of the certificate creation contract. Query whether the second identification information has been used in the creation of the certificate creation contract before. If it is determined that the second identification information has not been used, it is determined that the second identification information is correct. Otherwise, it is determined that the second identification information is incorrect, and the creation of the certificate NFT is terminated.
  • the certificate NFT creation unit 904 may verify whether the certificate NFT creator is correct, that is, verify whether the certificate NFT creator is the NFT creator (ie, the creator of the target NFT) himself, thereby preventing non-NFT Create a fake certificate NFT. This is why the creator of the target NFT and the creator of the certificate NFT should be the same person (i.e., the NFT creator), otherwise there may be a situation where a non-NFT creator forges the certificate NFT.
  • the certificate NFT creation unit 904 can verify (1) whether the certificate NFT creation account address is the account address of the current certificate NFT creator and (2) whether the certificate NFT creation account address is the NFT creator's account address.
  • the account address of the certificate NFT creation account is the account address of the certificate NFT creator through asymmetric encryption (for example, the private key of the certificate NFT creation account is signed and the certificate creation contract public key is decrypted).
  • the NFT creator account address is derived based on the NFT creator's public key in the metadata of the certificate NFT, and the derived NFT creator account address is verified.
  • Consistency with the account address created by the certificate NFT when it is determined that the deduced NFT creator account address is consistent with the account address created by the certificate NFT, it is determined that the creator of the certificate NFT is correct; otherwise, it is determined that the creator of the certificate NFT is wrong.
  • the present disclosure is not limited to the above-mentioned process of verifying the correctness of the metadata of the certificate NFT. Any possible method or data can also be used to verify the correctness of the metadata of the certificate NFT.
  • FIG. 10 is a block diagram illustrating a data verification device according to an exemplary embodiment of the present disclosure.
  • a data verification device 1000 may include a target NFT verification unit 1001 and a verification result output unit 1002.
  • the target NFT verification unit 1001 may call the certificate verification contract to verify the target NFT based on the metadata of the target NFT and the metadata of the certificate NFT associated with the target NFT.
  • the verification result output unit 1002 may output the verification result.
  • the target NFT verification unit 1001 can input the relevant information of the NFT creation contract into the certificate verification contract, and obtain the metadata and certificate NFT of the target NFT based on the relevant information of the NFT creation contract through the certificate verification contract. metadata.
  • the information related to the NFT creation contract refers to the information related to the event that the NFT creation contract creates the target NFT.
  • the relevant information of the NFT creation contract may include, but is not limited to, the address of the NFT creation contract and the digital identification (for example, token ID) of the target NFT in the NFT creation contract. This disclosure does not limit the content of the relevant information of the NFT creation contract.
  • the relevant information of the NFT creation contract may also include identification information corresponding to the target NFT or identification information corresponding to the subject of the target NFT, etc., or these identification information may be used instead.
  • Digital ID may be used instead.
  • the target NFT verification unit 1001 can communicate with a third-party oracle (for example, Chainlink oracle network) through a certificate verification contract, and use the third-party oracle to create relevant information of the contract based on the NFT, from storing the target
  • the blockchain of the NFT's metadata e.g., IPFS, AR, etc.
  • the target NFT verification unit 1001 can verify the contract with a third party through the certificate verification contract.
  • the third-party oracle communicates with the oracle (for example, the Chainlink oracle network), and uses a third-party oracle to obtain the metadata of the certificate NFT from the blockchain that stores the metadata of the certificate NFT based on the second identification information.
  • the oracle for example, the Chainlink oracle network
  • the target NFT verification unit 1001 can obtain the identification information corresponding to the metadata of the certificate NFT from the certificate creation contract, that is, the second identification information, based on the relevant information of the NFT creation contract; and through a third party The oracle, based on the second identification information, obtains the metadata of the certificate NFT from the blockchain (for example, IPFS, AR, etc.) that stores the metadata of the certificate NFT.
  • the blockchain for example, IPFS, AR, etc.
  • the target NFT verification unit 1001 may separately verify at least one item of data in the metadata of the target NFT and at least one item of data in the metadata of the certificate NFT. Each item of data that has been verified are correct, then it can be determined that the target NFT is authentic, that is, it can be determined that the target NFT is created or authorized to be created by the NFT creator of the transaction record on the target NFT metadata, and the verification result output unit 1102 can output an indication indicating that the target NFT is authentic. Validation results. Once it is detected that an item of data is incorrect, the target NFT verification unit 1101 may determine that the target NFT is forged by others, and the verification result output unit 1102 may output a prompt indicating that the authenticity of the target NFT is at risk.
  • the target NFT verification unit 1001 may perform a first verification on the target NFT based on the metadata of the target NFT; if the first verification is passed, perform a second verification on the target NFT based on the metadata of the certificate NFT. verify.
  • the first verification performed by the target NFT verification unit 1001 may include separately verifying at least one item of data in the metadata of the target NFT, if any of the verification results of the at least one item of data is incorrect. Pass, the verification result output unit 1002 outputs a verification result indicating that the authenticity of the target NFT is at risk.
  • the data verified by the first verification performed by the target NFT verification unit 1001 may include, but is not limited to, at least one of the following items: the address of the certificate verification contract in the metadata of the target NFT and the metadata of the target NFT.
  • the target NFT verification unit 1001 verifies the consistency of the address of the certificate verification contract in the metadata of the target NFT and the address of the called certificate verification contract. If the address of the certificate verification contract in the metadata of the target NFT is consistent with the address of the called certificate verification contract, it means that the address of the certificate verification contract in the metadata of the target NFT is correct, then the address of the certificate verification contract in the metadata of the target NFT is correct. The verification result of the address is passed.
  • the target NFT verification unit 1001 verifies the difference between the NFT creator account address in the metadata of the target NFT and the NFT creator account address in the transaction record (that is, the address pointed to by "to" in the creation record in the transaction record). consistency.
  • the NFT creator account address in the metadata of the target NFT is consistent with the NFT creator account address in the transaction record, it means that the NFT creator account address in the metadata of the target NFT is correct, then the NFT creator account address in the metadata of the target NFT is correct.
  • the verification result of the personal account address is passed. If they are inconsistent, it means that the NFT creator account address in the metadata of the target NFT is incorrect, and the verification result of the NFT creator account address in the metadata of the target NFT is failed, and the verification result output unit 1002 outputs the true identity of the target NFT. Verification results of sexual risks.
  • the first verification of the present disclosure is not limited to the above-mentioned verification process, and may also include verification processes for other data in the metadata of the target NFT as needed or set.
  • the second verification performed by the target NFT verification unit 1001 may include separately verifying at least one item of data in the metadata of the certificate NFT. If one of the verification results of the at least one item of data is The verification result is failed, and the verification result output unit 1002 outputs a verification indicating that the authenticity of the target NFT is at risk. Verify the results.
  • the data verified by the second verification performed by the target NFT verification unit 1001 may include, but is not limited to, at least one of the following items: NFT creator public key, NFT creator signature, NFT creator signature expiration time, NFT target address, NFT creation contract address and certificate verification contract address.
  • the target NFT verification unit 1001 obtains the NFT creator's account address based on the NFT creator's public key in the metadata of the certificate NFT, and verifies the obtained NFT creator's account address and the NFT creator's account address in the metadata of the target NFT. consistency to determine whether the public key on the certificate NFT belongs to the NFT creator.
  • the hash value of the NFT creator's public key can be used to derive the NFT creator's account address.
  • the NFT creator's account address can be obtained by hashing the NFT creator's public key. If the obtained NFT creator account address is consistent with the NFT creator account address in the metadata of the target NFT, it means that the public key on the certificate NFT belongs to the NFT creator, then determine the NFT creator in the metadata of the certificate NFT. The verification result of the public key is passed. If they are inconsistent, it means that the public key on the certificate NFT does not belong to the NFT creator, then it is determined that the verification result of the NFT creator's public key in the metadata of the certificate NFT is failed, and the verification result output unit 1002 outputs the authenticity of the target NFT. Risky verification results.
  • the target NFT verification unit 1001 uses the NFT creator's public key in the metadata of the certificate NFT to decrypt the NFT creator's signature in the metadata of the certificate NFT, and verifies that the decrypted data is the same as the certificate information except the NFT.
  • the consistency of other certificate information data other than the creator's signature (for example, comparing the decrypted data with other certificate information data one by one) to verify whether the metadata of the certificate NFT is authorized by the NFT creator. If each item of data after decryption is consistent with the corresponding data in other certificate information data, it means that the metadata of the certificate NFT is authorized by the NFT creator, and the verification result of the NFT creator's signature in the metadata of the certificate NFT is pass.
  • the target NFT verification unit 1001 verifies the match between the expiration time of the NFT creator's signature in the metadata of the certificate NFT and the creation time or on-chain time of the target NFT to verify whether there is an expired creation. After the NFT creation contract completes the creation of the target NFT, the information related to the creation time or the uploading time is recorded on the blockchain.
  • the creation time or uploading time is within the expiration time of the NFT creator's signature, that is, both If they match, it means that the target NFT was created within the validity period authorized by the NFT creator. Therefore, the creation of the target NFT was authorized by the NFT creator and the verification passed. If the creation time or on-chain time exceeds the expiration time of the NFT creator's signature, that is, the two do not match, it means that the target NFT was created outside the valid time authorized by the NFT creator, so the target NFT was not created by the NFT creator. authorized, then the verification result of the NFT creator's signature expiration time in the metadata of the certificate NFT is failed, and the verification result output unit 1002 outputs the verification result that the authenticity of the target NFT is at risk.
  • the target NFT verification unit 1001 verifies the consistency of the NFT target address in the metadata of the certificate NFT and the NFT target address in the metadata of the target NFT to verify whether the NFT target corresponding to the certificate NFT is correct. If the NFT target address in the metadata of the certificate NFT is consistent with the NFT target address in the metadata of the target NFT, it means that the NFT target corresponding to the certificate NFT is correct, and the verification result of the NFT target address in the metadata of the certificate NFT is passed.
  • the target NFT verification unit 1001 verifies the consistency of the NFT creation contract address in the metadata of the certificate NFT and the NFT creation contract address in the metadata of the target NFT to verify whether the target NFT corresponding to the verification certificate NFT is created by the NFT contract. create.
  • the NFT creation contract address in the metadata of the certificate NFT is the same as the metadata of the target NFT
  • the NFT creation contract addresses in are consistent, indicating that the target NFT corresponding to the verification certificate NFT is created by the NFT creation contract, and the verification result of the NFT creation contract address in the metadata of the certificate NFT is passed. If they are inconsistent, it means that the target NFT corresponding to the verification certificate NFT is not created by the NFT creation contract, and the verification result of the NFT creation contract address in the metadata of the certificate NFT is failed, and the verification result output unit 1002 outputs the authenticity of the target NFT. Risk verification results.
  • the target NFT verification unit 1001 verifies the consistency of the address of the certificate verification contract in the metadata of the certificate NFT and the address of the certificate verification contract in the metadata of the target NFT to verify whether the certificate NFT is verified by the certificate specified by the target NFT. contract for verification. If the address of the certificate verification contract in the metadata of the certificate NFT is consistent with the address of the certificate verification contract in the metadata of the target NFT, it means that the certificate NFT is verified by the certificate verification contract specified by the target NFT, then the metadata of the certificate NFT The verification result of the address of the certificate verification contract is passed. If they are inconsistent, it means that the certificate NFT is not verified by the certificate verification contract specified by the target NFT.
  • the verification result of the address of the certificate verification contract in the metadata of the certificate NFT is failed, and the verification result output unit 1002 outputs the authenticity of the target NFT. Risky verification results.
  • the first verification of the present disclosure is not limited to the above-mentioned verification process. Part of the above-mentioned verification process can also be skipped according to needs or settings (for example, if the user passes in the address of the NFT target when initiating verification, verification (4) needs to be performed, otherwise verification may not be performed. (4)), or add a verification process for other data in the metadata of the certificate NFT.
  • FIG. 11 is a block diagram of an electronic device 1100 according to an exemplary embodiment of the present disclosure.
  • the electronic device 11 includes at least one memory 1101 and at least one processor 1102.
  • a set of computer-executable instructions is stored in the at least one memory 1101.
  • execution Data processing method and data verification method according to exemplary embodiments of the present disclosure.
  • the electronic device 1100 may be a PC computer, a tablet device, a personal digital assistant, a smartphone, or other device capable of executing the above set of instructions.
  • the electronic device 1100 does not have to be a single electronic device, but can also be any collection of devices or circuits that can execute the above instructions (or instruction set) individually or jointly.
  • Electronic device 1100 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that interfaces locally or remotely (eg, via wireless transmission).
  • the processor 1102 may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller or a microprocessor .
  • processors may also include analog processors, digital processors, microprocessors, multi-core processors, processor arrays, network processors, and the like.
  • Processor 1102 may execute instructions or code stored in memory 1101 , where memory 1101 may also store data. Instructions and data may also be sent and received over the network via network interface devices, which may employ any known transport protocol.
  • the memory 1101 can be integrated with the processor 1102, for example, random access memory (Random Access Memory, RAM) or flash memory is arranged in an integrated circuit microprocessor or the like. Additionally, memory 1101 may include a stand-alone device, such as an external disk drive, storage array, or any other storage device that may be used by a database system. Memory 1101 and processor 1102 may be operatively coupled or may communicate with each other, such as through an I/O port, a network connection, or the like, enabling processor 1102 to read files stored in memory.
  • RAM Random Access Memory
  • flash memory is arranged in an integrated circuit microprocessor or the like.
  • memory 1101 may include a stand-alone device, such as an external disk drive, storage array, or any other storage device that may be used by a database system.
  • Memory 1101 and processor 1102 may be operatively coupled or may communicate with each other, such as through an I/O port, a network connection, or the like, enabling processor 1102 to read files stored in memory.
  • electronic device 1100 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). All components of electronic device 1100 may be connected to each other via buses and/or networks.
  • a video display such as a liquid crystal display
  • a user interaction interface such as a keyboard, mouse, touch input device, etc.
  • a computer-readable storage medium storing instructions may also be provided, wherein when the instructions are executed by at least one processor, the at least one processor is caused to perform the data processing method and data according to the present disclosure. Authentication method.
  • Non-volatile memory ROM
  • Random Access Programmable ROM PROM
  • Electrically Erasable Programmable Read-Only Memory EEPROM
  • RAM Dynamic RAM
  • SRAM Static RAM
  • Flash memory non-volatile memory
  • Compact Disc ROM CD-ROM
  • CD-ROM Compact Disc ROM
  • CD-ROM Compact Disc ROM
  • CD-ROM Compact Disc ROM
  • CD+R CD-RW
  • CD+RW Compact Disc ROM
  • DVD-ROM Digital Video Disk
  • DVD-ROM DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM
  • Blu-ray Disc ROM BD-ROM
  • BD-R BD-R LTH (Blue-ray low to high)
  • BD-RE Blue-ray Re-Erasable
  • Blu-ray or optical disc memory Hard Disk Drive (HDD), Solid State Drive (SSD), card storage (such as multimedia card, Secure Digital (SD) card or Extreme Digital (XD) card), magnetic tape, F
  • the computer program in the above computer-readable storage medium can run in an environment deployed in computer equipment such as a client, a host, a proxy device, a server, etc.
  • the computer program and any associated data, data files and data structures are distributed over networked computer systems such that computer programs and any associated data, data files and data structures are stored, accessed and executed in a distributed fashion by one or more processors or computers.
  • a computer program product may also be provided, and instructions in the computer program product may be executed by a processor of a computer device to complete the data processing method and the data verification method according to the exemplary embodiment of the present disclosure.
  • a computer program may also be provided, and the computer program may be executed by a processor of a computer device to implement the data processing method and the data verification method according to the exemplary embodiment of the present disclosure.
  • an anti-counterfeiting certificate NFT can be created for the target NFT through a pair of smart contracts, and the certificate NFT can be used to verify the authenticity of the target NFT to ensure the authenticity of the NFT creation process. Prevent fraud like SleepMinting and protect the rights and interests of NFT creators and NFT collectors.

Abstract

The present disclosure relates to a data processing method and verification method, an apparatus, an electronic device, and a storage medium. The data processing method comprises: obtaining first identification information corresponding to the metadata of a target NFT, wherein the metadata of the target NFT comprises identification information corresponding to certificate information data associated with the target NFT, and also the address of a certificate verification contract used for verifying the target NFT; calling an NFT creation contract to create a target NFT based on the first identification information; obtaining second identification information corresponding to the metadata of a certificate NFT associated with the target NFT, wherein the metadata of the certificate NFT comprises information related to the NFT creation contract and also certificate information data; and calling a certificate creation contract to create a certificate NFT based on the second identification information, wherein the certificate creation contract corresponds to the certificate verification contract.

Description

数据处理方法和验证方法、装置、电子设备和存储介质Data processing methods and verification methods, devices, electronic equipment and storage media
本申请要求于2022年07月28日提交的申请号为202210897905.8、名称为“数据处理方法和验证方法、装置、电子设备和存储介质”的中国专利申请的优先权,上述申请的内容通过引用并入本文。This application claims priority to the Chinese patent application with application number 202210897905.8 and titled "Data processing method and verification method, device, electronic device and storage medium" submitted on July 28, 2022. The content of the above application is incorporated by reference. Enter this article.
技术领域Technical field
本公开涉及区块链技术领域,更具体地说,涉及一种数据处理方法、数据验证方法、装置、电子设备、计算机可读存储介质和计算机程序产品。The present disclosure relates to the field of blockchain technology, and more specifically, to a data processing method, a data verification method, a device, an electronic device, a computer-readable storage medium and a computer program product.
背景技术Background technique
NFT(Non-Fungible Token,非同质化代币)是一种基于区块链技术的数字资产权利凭证,即,表示数字资产的唯一加密货币令牌。当数字资产被创造成NFT后,它将被永久储存在区块链上,独一无二,且不可更改。随着区块链技术的发展,越来越多的艺术家、音乐家和内容创作者正在以NFT的形式出售他们的作品。NFT (Non-Fungible Token, non-fungible token) is a digital asset rights certificate based on blockchain technology, that is, a unique cryptocurrency token that represents digital assets. When a digital asset is created as an NFT, it will be permanently stored on the blockchain, unique and unchangeable. With the development of blockchain technology, more and more artists, musicians and content creators are selling their works in the form of NFT.
NFT作为可证明的唯一令牌,即使简化为简单的联合图像专家组(Joint Photographic Experts Group,JPEG)格式,也代表其所有者的可追溯价值。NFT的前景是具体的,Web 2.0降低了互联网用户之间的社交互动成本,并很快对用户的在线/离线互动产生了影响。而Web 3.0通过将验证过程包含在智能合约中,解决了信任问题。随着NFT市场蓬勃发展,NFT像野火一样蔓延,并通过社交媒体、娱乐等落地应用并得到广泛的普及。As provably unique tokens, NFTs represent traceable value to their owners, even when reduced to a simple Joint Photographic Experts Group (JPEG) format. The prospects of NFT are concrete. Web 2.0 reduces the cost of social interaction between Internet users and soon has an impact on users' online/offline interactions. Web 3.0 solves the trust problem by including the verification process in smart contracts. As the NFT market booms, NFTs spread like wildfire and are widely popularized through social media, entertainment, etc.
发明内容Contents of the invention
本公开提供一种数据处理方法、数据验证方法、装置、电子设备、计算机可读存储介质和计算机程序产品。The present disclosure provides a data processing method, a data verification method, a device, an electronic device, a computer-readable storage medium and a computer program product.
根据本公开实施例的第一方面,提供一种数据处理方法,包括:获取目标NFT的元数据对应的第一标识信息,所述第一标识信息是所述目标NFT的元数据存储至区块链之后得到的标识信息,其中,所述目标NFT的元数据包括与所述目标NFT关联的证书信息数据对应的标识信息、以及用于对所述目标NFT进行验证的证书验证合约的地址,所述证书信息数据对应的标识信息是所述证书信息数据存储至区块链之后得到的标识信息;调用NFT创建合约以基于所述第一标识信息创建所述目标NFT;获取与所述目标NFT关联的证书NFT的元数据对应的第二标识信息,其中,所述证书NFT的元数据包括所述NFT创建合约的相关信息以及所述证书信息数据,所述第二标识信息是所述证书NFT的元数据存储至区块链之后得到的标识信息;调用证书创建合约以基于所述第二标识信息创建所述证书NFT,其中,所述证书创建合约与所述证书验证合约对应。According to a first aspect of an embodiment of the present disclosure, a data processing method is provided, including: obtaining first identification information corresponding to the metadata of the target NFT, where the first identification information is the metadata of the target NFT stored in a block The identification information obtained after the chain, wherein the metadata of the target NFT includes identification information corresponding to the certificate information data associated with the target NFT, and the address of the certificate verification contract used to verify the target NFT, so The identification information corresponding to the certificate information data is the identification information obtained after the certificate information data is stored in the blockchain; call the NFT creation contract to create the target NFT based on the first identification information; obtain the association with the target NFT The second identification information corresponding to the metadata of the certificate NFT, wherein the metadata of the certificate NFT includes relevant information of the NFT creation contract and the certificate information data, and the second identification information is the certificate NFT The identification information obtained after the metadata is stored in the blockchain; the certificate creation contract is called to create the certificate NFT based on the second identification information, where the certificate creation contract corresponds to the certificate verification contract.
根据本公开实施例的第二方面,提供一种数据验证方法,包括:调用证书验证合约以基于目标NFT的元数据和与所述目标NFT关联的证书NFT的元数据对所述目标NFT进行验证;输出验证结果;其中,所述目标NFT由NFT创建合约基于所述目标NFT的元数据对应的第一标识信息创建而成,所述证书NFT由与所述证书验证合约对应的证书创建 合约基于所述证书NFT的元数据对应的第二标识信息创建而成,所述目标NFT的元数据包括与所述目标NFT关联的证书信息数据对应的标识信息、以及用于对所述目标NFT进行验证的所述证书验证合约的地址,所述证书NFT的元数据包括所述NFT创建合约的相关信息以及所述证书信息数据,所述第一标识信息是所述目标NFT的元数据存储至区块链之后得到的标识信息,所述证书信息数据对应的标识信息是所述证书信息数据存储至区块链之后得到的标识信息,所述第二标识信息是所述证书NFT的元数据存储至区块链之后得到的标识信息。According to a second aspect of an embodiment of the present disclosure, a data verification method is provided, including: calling a certificate verification contract to verify the target NFT based on metadata of the target NFT and metadata of the certificate NFT associated with the target NFT. ; Output verification results; wherein, the target NFT is created by an NFT creation contract based on the first identification information corresponding to the metadata of the target NFT, and the certificate NFT is created by a certificate corresponding to the certificate verification contract The contract is created based on the second identification information corresponding to the metadata of the certificate NFT. The metadata of the target NFT includes the identification information corresponding to the certificate information data associated with the target NFT, and the second identification information for the target NFT. The address of the certificate verification contract to be verified. The metadata of the certificate NFT includes relevant information of the NFT creation contract and the certificate information data. The first identification information is the metadata of the target NFT stored in The identification information obtained after the blockchain. The identification information corresponding to the certificate information data is the identification information obtained after the certificate information data is stored in the blockchain. The second identification information is the metadata storage of the certificate NFT. The identification information obtained after entering the blockchain.
根据本公开实施例的第三方面,提供一种数据处理装置,包括:第一标识信息获取单元,被配置为获取目标NFT的元数据对应的第一标识信息,所述第一标识信息是所述目标NFT的元数据存储至区块链之后得到的标识信息,其中,所述目标NFT的元数据包括与所述目标NFT关联的证书信息数据对应的标识信息、以及用于对所述目标NFT进行验证的证书验证合约的地址,所述证书信息数据对应的标识信息是所述证书信息数据存储至区块链之后得到的标识信息;目标NFT创建单元,被配置为调用NFT创建合约以基于所述第一标识信息创建所述目标NFT;第二标识信息获取单元,被配置为获取与所述目标NFT关联的证书NFT的元数据对应的第二标识信息,其中,所述证书NFT的元数据包括所述NFT创建合约的相关信息以及所述证书信息数据,所述第二标识信息是所述证书NFT的元数据存储至区块链之后得到的标识信息;证书NFT创建单元,被配置为调用证书创建合约以基于所述第二标识信息创建所述证书NFT,其中,所述证书创建合约与所述证书验证合约对应。According to a third aspect of an embodiment of the present disclosure, a data processing device is provided, including: a first identification information acquisition unit configured to obtain first identification information corresponding to metadata of a target NFT, where the first identification information is the The identification information obtained after the metadata of the target NFT is stored in the blockchain, wherein the metadata of the target NFT includes identification information corresponding to the certificate information data associated with the target NFT, and information used to identify the target NFT. The address of the certificate verification contract to be verified. The identification information corresponding to the certificate information data is the identification information obtained after the certificate information data is stored in the blockchain; the target NFT creation unit is configured to call the NFT creation contract to create a contract based on the The first identification information creates the target NFT; a second identification information acquisition unit is configured to obtain the second identification information corresponding to the metadata of the certificate NFT associated with the target NFT, wherein the metadata of the certificate NFT Including relevant information of the NFT creation contract and the certificate information data, the second identification information is the identification information obtained after the metadata of the certificate NFT is stored in the blockchain; the certificate NFT creation unit is configured to call A certificate creation contract is used to create the certificate NFT based on the second identification information, wherein the certificate creation contract corresponds to the certificate verification contract.
根据本公开实施例的第四方面,提供一种数据验证装置,其特征在于,包括:目标NFT验证单元,被配置为调用证书验证合约以基于目标NFT的元数据和与所述目标NFT关联的证书NFT的元数据对所述目标NFT进行验证;验证结果输出单元,被配置为输出验证结果;其中,所述目标NFT由NFT创建合约基于所述目标NFT的元数据对应的第一标识信息创建而成,所述证书NFT由与所述证书验证合约对应的证书创建合约基于所述证书NFT的元数据对应的第二标识信息创建而成,所述目标NFT的元数据包括与所述目标NFT关联的证书信息数据对应的标识信息、以及用于对所述目标NFT进行验证的所述证书验证合约的地址,所述证书NFT的元数据包括所述NFT创建合约的相关信息以及所述证书信息数据,所述第一标识信息是所述目标NFT的元数据存储至区块链之后得到的标识信息,所述证书信息数据对应的标识信息是所述证书信息数据存储至区块链之后得到的标识信息,所述第二标识信息是所述证书NFT的元数据存储至区块链之后得到的标识信息。According to a fourth aspect of an embodiment of the present disclosure, a data verification device is provided, which is characterized in that it includes: a target NFT verification unit configured to call a certificate verification contract to based on the metadata of the target NFT and the data associated with the target NFT. The metadata of the certificate NFT verifies the target NFT; the verification result output unit is configured to output the verification result; wherein the target NFT is created by the NFT creation contract based on the first identification information corresponding to the metadata of the target NFT The certificate NFT is created by the certificate creation contract corresponding to the certificate verification contract based on the second identification information corresponding to the metadata of the certificate NFT, and the metadata of the target NFT includes the metadata of the target NFT. The identification information corresponding to the associated certificate information data and the address of the certificate verification contract used to verify the target NFT. The metadata of the certificate NFT includes relevant information of the NFT creation contract and the certificate information. data, the first identification information is the identification information obtained after the metadata of the target NFT is stored in the blockchain, and the identification information corresponding to the certificate information data is obtained after the certificate information data is stored in the blockchain. Identification information, the second identification information is the identification information obtained after the metadata of the certificate NFT is stored in the blockchain.
根据本公开实施例的第五方面,提供一种电子设备,包括:至少一个处理器;至少一个存储计算机可执行指令的存储器,其中,所述计算机可执行指令在被所述至少一个处理器运行时,促使所述至少一个处理器执行根据本公开的数据处理方法或数据验证方法。According to a fifth aspect of an embodiment of the present disclosure, an electronic device is provided, including: at least one processor; at least one memory storing computer-executable instructions, wherein the computer-executable instructions are executed by the at least one processor When the at least one processor is prompted to execute the data processing method or data verification method according to the present disclosure.
根据本公开实施例的第六方面,提供一种计算机可读存储介质,当所述计算机可读存储介质中的指令被至少一个处理器运行时,促使所述至少一个处理器执行根据本公开的数据处理方法或数据验证方法。According to a sixth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium that, when instructions in the computer-readable storage medium are executed by at least one processor, causes the at least one processor to execute the method according to the present disclosure. Data processing methods or data validation methods.
根据本公开实施例的第七方面,提供一种计算机程序产品,包括计算机指令,所述计算机指令被至少一个处理器执行时实现根据本公开的数据处理方法或数据验证方法。According to a seventh aspect of an embodiment of the present disclosure, a computer program product is provided, including computer instructions that, when executed by at least one processor, implement a data processing method or a data verification method according to the present disclosure.
根据本公开实施例的第八方面,提供一种计算机程序,该计算机程序被处理器执行时, 实现根据本公开的数据处理方法或数据验证方法。According to an eighth aspect of an embodiment of the present disclosure, a computer program is provided. When the computer program is executed by a processor, Implement the data processing method or data verification method according to the present disclosure.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and do not limit the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理,并不构成对本公开的不当限定。The drawings herein are incorporated into and constitute a part of this specification, illustrate embodiments consistent with the disclosure, and together with the description are used to explain the principles of the disclosure, and do not constitute undue limitations on the disclosure.
图1是示出相关技术的NFT创建流程图;Figure 1 is an NFT creation flow chart showing related technologies;
图2是根据本公开的示例性实施例的数据处理和验证的构思框图;2 is a conceptual block diagram of data processing and verification according to an exemplary embodiment of the present disclosure;
图3是示出根据本公开的示例性实施例的数据处理方法的流程图;3 is a flowchart illustrating a data processing method according to an exemplary embodiment of the present disclosure;
图4是示出根据本公开的示例性实施例的目标NFT的元数据的示意图;4 is a schematic diagram illustrating metadata of a target NFT according to an exemplary embodiment of the present disclosure;
图5是示出根据本公开的示例性实施例的证书NFT的元数据的示意图;FIG. 5 is a schematic diagram illustrating metadata of a certificate NFT according to an exemplary embodiment of the present disclosure;
图6是示出根据本公开的示例性实施例的数据验证方法的流程图;6 is a flowchart illustrating a data verification method according to an exemplary embodiment of the present disclosure;
图7是示出根据本公开的示例性实施例的带证书的NFT的具体创建过程的流程图;7 is a flowchart illustrating a specific creation process of an NFT with a certificate according to an exemplary embodiment of the present disclosure;
图8是示出根据本公开的示例性实施例的带证书的NFT的具体验证过程的流程图;8 is a flowchart illustrating a specific verification process of NFT with certificates according to an exemplary embodiment of the present disclosure;
图9是示出根据本公开的示例性实施例的数据处理装置的框图;9 is a block diagram illustrating a data processing apparatus according to an exemplary embodiment of the present disclosure;
图10是示出根据本公开的示例性实施例的数据验证装置的框图;10 is a block diagram illustrating a data verification device according to an exemplary embodiment of the present disclosure;
图11是根据本公开的示例性实施例的电子设备1100的框图。FIG. 11 is a block diagram of an electronic device 1100 according to an exemplary embodiment of the present disclosure.
具体实施方式Detailed ways
为了使本领域普通人员更好地理解本公开的技术方案,下面将结合附图,对本公开实施例中的技术方案进行清楚、完整地描述。In order to allow ordinary people in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。It should be noted that the terms "first", "second", etc. in the description and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the disclosure described herein can be practiced in sequences other than those illustrated or described herein. The implementations described in the following examples do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with aspects of the disclosure as detailed in the appended claims.
在此需要说明的是,在本公开中出现的“若干项之中的至少一项”均表示包含“该若干项中的任意一项”、“该若干项中的任意多项的组合”、“该若干项的全体”这三类并列的情况。例如“包括A和B之中的至少一个”即包括如下三种并列的情况:(1)包括A;(2)包括B;(3)包括A和B。又例如“执行步骤一和步骤二之中的至少一个”,即表示如下三种并列的情况:(1)执行步骤一;(2)执行步骤二;(3)执行步骤一和步骤二。It should be noted here that “at least one of the several items” appearing in this disclosure means including “any one of the several items”, “a combination of any of the several items”, The three types of juxtaposition of "all of the items". For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. For another example, "perform at least one of step 1 and step 2" means the following three parallel situations: (1) execute step 1; (2) execute step 2; (3) execute step 1 and step 2.
目前,可通过符合一些通用协议(例如,ERC-721协议等)的智能合约来创造NFT。图1是示出相关技术的NFT创建流程图。参照图1,在步骤101,NFT创造人可将NFT标的(数字文件)上传到中心化的云存储或去中心化的区块链(例如,星际文件系统(InterPlanetary File System,IPFS)或AR(Arweave)等),获取NFT标的对应的标识信息,例如,token(即,令牌或唯一标识)。这里,数字文件可以是图片、视频、音频、数 字(虚拟)艺术品等任何可数字化的文件。在步骤102,NFT创造人可基于NFT标的对应的标识信息,组织NFT的元数据,将NFT的元数据存储至去中心化的区块链(例如,IPFS或AR等)中,获取NFT的元数据对应的标识信息,例如,token。在步骤103,通过智能合约基于NFT的元数据对应的标识信息创建NFT。具体地说,智能合约可针对NFT的元数据对应的标识信息,生成唯一标识信息,例如,token,该唯一标识信息即为NFT。这里,token可以是通过哈希算法得到的一个哈希值,由于哈希算法具有单向性和抗碰撞性的特点,每个哈希值就能唯一对应一个原内容,无法被篡改,因此,每个token可用于唯一标识对应的数据。Currently, NFTs can be created through smart contracts that comply with some common protocols (for example, ERC-721 protocol, etc.). FIG. 1 is an NFT creation flowchart showing related technology. Referring to Figure 1, in step 101, the NFT creator can upload the NFT object (digital file) to a centralized cloud storage or decentralized blockchain (for example, InterPlanetary File System (IPFS) or AR ( Arweave), etc.), obtain the identification information corresponding to the NFT object, for example, token (ie, token or unique identification). Here, digital files can be pictures, videos, audios, data Any digitizable file such as word (virtual) artwork. In step 102, the NFT creator can organize the metadata of the NFT based on the identification information corresponding to the NFT object, store the metadata of the NFT in a decentralized blockchain (for example, IPFS or AR, etc.), and obtain the metadata of the NFT. Identification information corresponding to the data, for example, token. In step 103, the NFT is created through a smart contract based on the identification information corresponding to the NFT's metadata. Specifically, the smart contract can generate unique identification information, such as token, based on the identification information corresponding to the metadata of the NFT. This unique identification information is the NFT. Here, the token can be a hash value obtained through a hash algorithm. Since the hash algorithm has the characteristics of one-way and collision resistance, each hash value can uniquely correspond to an original content and cannot be tampered with. Therefore, Each token can be used to uniquely identify the corresponding data.
然而,由于NFT还处于初期发展阶段,尚有诸多问题没有完善,比如,有人未经原创同意,盗取别人的艺术作品,做成NFT在各种平台售卖。例如,欺诈者利用睡眠创造(SleepMinting)技术伪造他人有价值的NFT,欺诈其他人购买。SleepMinting是一种通过智能合约的编写伪造NFT创造人和NFT创建流程的NFT伪造方式。例如,欺诈者通过拷贝著名艺术家创作的NFT的原始文件,并以著名艺术家的名义创建一个NFT,同时伪造交易记录,将该NFT看上去是从著名艺术家的账户中交易出来的,进而欺诈其他人购买该NFT。也就是说,欺诈者可通过编写一个带漏洞的智能合约来绕过创造人(即,著名艺术家)的账户,以创造人名义伪造了一个NFT。However, because NFT is still in its early stages of development, there are still many problems that have not been perfected. For example, some people steal other people's artistic works without the original consent and make NFTs for sale on various platforms. For example, fraudsters use SleepMinting technology to forge other people's valuable NFTs and deceive others into purchasing them. SleepMinting is an NFT forgery method that forges the NFT creator and NFT creation process through the writing of smart contracts. For example, fraudsters copy the original file of an NFT created by a famous artist, create an NFT in the name of the famous artist, and at the same time forge transaction records to make it appear that the NFT was traded from the famous artist's account, thereby defrauding others. Purchase this NFT. In other words, a fraudster can bypass the account of the creator (i.e., a famous artist) by writing a smart contract with loopholes, and forge an NFT in the name of the creator.
由于NFT创建合约是由开发人员自行编写,作为开发人员的欺诈者主观编写后门,无法控制欺诈者的个人行为。对此,如果将通用协议(例如,ERC-721协议)升级加入数据审计相关内容,可以防御此类SleepMinting欺诈。此外,如果NFT交易平台加入数据校验,可以防御此类SleepMinting欺诈的NFT上架平台,但是无法防止利用SleepMinting欺诈来创建NFT。Since the NFT creation contract is written by developers themselves, fraudsters, as developers, subjectively write backdoors and cannot control the fraudster's personal behavior. In this regard, if a common protocol (for example, ERC-721 protocol) is upgraded to include data audit-related content, such SleepMinting fraud can be prevented. In addition, if the NFT trading platform adds data verification, it can prevent the NFT listing platform from such SleepMinting fraud, but it cannot prevent the use of SleepMinting fraud to create NFT.
目前尚未有能够有效地防止或验证NFT盗取或伪造行为的方法,为了解决该问题,本公开提供了一种数据处理方法和数据验证方法,通过一对智能合约(即,一个智能合约用于为目标NFT创建相关的证书数据的证书NFT,另一个智能合约用于验证证书数据的有效性),为目标NFT创建一个防伪的证书NFT,并利用证书NFT来对目标NFT的真实性进行验证,也就是说,可以通过证书NFT的方式来保护目标NFT,从而保证NFT创建过程的真实性,防止类似SleepMinting等的欺诈行为,保护NFT创造人和NFT收藏者的权益。本公开利用区块链技术的不可篡改的特点,保存证书NFT的证书信息数据,使得证书NFT可用于对目标NFT的真实性进行验证。Currently, there is no method that can effectively prevent or verify NFT theft or forgery. In order to solve this problem, the present disclosure provides a data processing method and a data verification method, through a pair of smart contracts (i.e., one smart contract for Create a certificate NFT with relevant certificate data for the target NFT, and another smart contract is used to verify the validity of the certificate data), create an anti-counterfeiting certificate NFT for the target NFT, and use the certificate NFT to verify the authenticity of the target NFT. In other words, the target NFT can be protected by certificate NFT, thereby ensuring the authenticity of the NFT creation process, preventing fraud such as SleepMinting, and protecting the rights and interests of NFT creators and NFT collectors. This disclosure utilizes the non-tampering characteristics of blockchain technology to save the certificate information data of the certificate NFT, so that the certificate NFT can be used to verify the authenticity of the target NFT.
下面,将参照图2至图11来详细描述根据本公开的数据处理方法和装置以及数据验证方法和装置。Below, the data processing method and device and the data verification method and device according to the present disclosure will be described in detail with reference to FIGS. 2 to 11 .
图2是根据本公开的示例性实施例的数据处理和验证的构思框图。2 is a conceptual block diagram of data processing and verification according to an exemplary embodiment of the present disclosure.
参照图2,针对数据处理过程,首先,用户(例如,NFT创造人)通过区块链(例如,以太坊等)中的NFT创建合约,基于用于验证目标NFT的数据,创建目标NFT。即,用户授权NFT创建合约创建目标NFT。这里,NFT创建合约是指用于创建NFT的智能合约。目标NFT可指NFT创造人对其NFT标的(例如,图片、视频等的数字文件)创建的NFT。另外,NFT创造人不等同于NFT创建人,NFT创造人可以作为NFT创建人来创建NFT,也可以授权NFT创建人来创建NFT。随后,在目标NFT创建完成后,用户(例如,NFT创造人)通过区块链中的证书创建合约,基于用于验证目标NFT的数据以及目标NFT 相关信息,创建与目标NFT相关的证书NFT。即,用户授权证书创建合约创建证书NFT。这里,证书创建合约是指用于创建证书NFT的智能合约。目标NFT和证书NFT在创建完成后,都会存入NFT创造人的账户中。Referring to Figure 2, for the data processing process, first, the user (for example, NFT creator) creates the target NFT through the NFT creation contract in the blockchain (for example, Ethereum, etc.) based on the data used to verify the target NFT. That is, the user authorizes the NFT creation contract to create the target NFT. Here, the NFT creation contract refers to the smart contract used to create NFT. A target NFT may refer to an NFT created by an NFT creator for its NFT subject (for example, a digital file of a picture, video, etc.). In addition, the NFT creator is not the same as the NFT creator. The NFT creator can create NFT as the NFT creator, or authorize the NFT creator to create NFT. Subsequently, after the target NFT is created, the user (e.g., the NFT creator) creates a contract through the certificate in the blockchain, based on the data used to verify the target NFT and the target NFT For related information, create a certificate NFT related to the target NFT. That is, the user authorizes the certificate creation contract to create the certificate NFT. Here, the certificate creation contract refers to the smart contract used to create the certificate NFT. After the target NFT and certificate NFT are created, they will be deposited into the NFT creator's account.
由于在目标NFT的创建过程和证书NFT的创建过程使用到唯一标识彼此的信息,也就是说,目标NFT的创建过程使用了能够唯一标识证书信息的信息,证书NFT的创建过程中使用了能够唯一标识目标NFT的信息,因此,目标NFT可以与其证书NFT关联,并且证书NFT可用于验证目标NFT的真实性。此外,在证书NFT的创建过程中,证书创建合约可通过与第三方预言机(例如,Chainlink预言机网络等)的交互,从存储证书NFT的元数据的区块链(例如,IPFS、AR等)获取证书NFT的元数据并验证其正确性,以保证创建的证书NFT确为目标NFT的证书NFT。这里,第三方预言机是指将区块链的链下数据与链上智能合约连接的服务器。由于证书创建合约所在的区块链与存储证书NFT的元数据的区块链是不同链,因此,证书创建合约无法直接获取到证书NFT的元数据,需要通过第三方预言机来获取证书NFT的元数据。Since the creation process of the target NFT and the creation process of the certificate NFT use information that uniquely identifies each other, that is to say, the creation process of the target NFT uses information that can uniquely identify the certificate information, and the creation process of the certificate NFT uses information that can uniquely identify each other. Information that identifies the target NFT so that the target NFT can be associated with its certificate NFT and the certificate NFT can be used to verify the authenticity of the target NFT. In addition, during the creation process of the certificate NFT, the certificate creation contract can obtain data from the blockchain (e.g., IPFS, AR, etc.) ) Obtain the metadata of the certificate NFT and verify its correctness to ensure that the created certificate NFT is indeed the certificate NFT of the target NFT. Here, the third-party oracle refers to the server that connects the off-chain data of the blockchain with the smart contracts on the chain. Since the blockchain where the certificate creation contract is located is different from the blockchain where the metadata of the certificate NFT is stored, the certificate creation contract cannot directly obtain the metadata of the certificate NFT and needs to obtain the metadata of the certificate NFT through a third-party oracle. metadata.
针对数据验证过程,用户可通过客户端调用证书验证合约来对目标NFT进行验证。例如,用户在交易平台看到目标NFT及其相关信息时,可通过客户端(例如,浏览器)使用web3.js调用证书验证合约,将目标NFT的相关信息输入证书验证合约,证书验证合约可基于目标NFT的相关信息,通过与第三方预言机(例如,Chainlink预言机网络等)的交互,从存储目标NFT的元数据和与目标NFT相关的证书NFT的元数据的区块链(例如,IPFS、AR等)获取目标NFT的元数据和证书NFT的元数据,从而基于目标NFT的元数据和证书NFT的元数据对目标NFT的真实性进行验证。这里,NFT创建过程中使用的证书创建合约和NFT验证过程中使用的证书验证合约是一对智能合约。由于证书验证合约所在的区块链与存储目标NFT的元数据和证书NFT的元数据的区块链是不同链,因此,证书验证合约无法直接获取到目标NFT的元数据和证书NFT的元数据,需要通过第三方预言机来获取证书NFT的元数据。For the data verification process, users can call the certificate verification contract through the client to verify the target NFT. For example, when a user sees the target NFT and its related information on the trading platform, he or she can use web3.js to call the certificate verification contract through the client (for example, a browser), and input the relevant information of the target NFT into the certificate verification contract. The certificate verification contract can Based on the relevant information of the target NFT, through interaction with a third-party oracle (e.g., Chainlink Oracle Network, etc.), from the blockchain that stores the metadata of the target NFT and the certificate associated with the target NFT, the metadata of the NFT (e.g., IPFS, AR, etc.) obtains the metadata of the target NFT and the metadata of the certificate NFT, so as to verify the authenticity of the target NFT based on the metadata of the target NFT and the metadata of the certificate NFT. Here, the certificate creation contract used in the NFT creation process and the certificate verification contract used in the NFT verification process are a pair of smart contracts. Since the blockchain where the certificate verification contract is located is different from the blockchain that stores the metadata of the target NFT and the metadata of the certificate NFT, the certificate verification contract cannot directly obtain the metadata of the target NFT and the metadata of the certificate NFT. , it is necessary to obtain the metadata of the certificate NFT through a third-party oracle.
因此,通过本公开的上述数据处理过程和数据验证过程,可利用一对智能合约(证书创建合约和证书验证合约)为目标NFT创建一个防伪的证书NFT,并通过证书NFT的相关数据验证目标NFT的真实性,防止NFT欺诈。Therefore, through the above-mentioned data processing process and data verification process of the present disclosure, a pair of smart contracts (certificate creation contract and certificate verification contract) can be used to create an anti-counterfeiting certificate NFT for the target NFT, and verify the target NFT through the relevant data of the certificate NFT authenticity and prevent NFT fraud.
图3是示出根据本公开的示例性实施例的数据处理方法的流程图。3 is a flowchart illustrating a data processing method according to an exemplary embodiment of the present disclosure.
参照图3,在步骤301,可获取目标NFT的元数据对应的第一标识信息。这里,目标NFT可指NFT创造人对其NFT标的(例如,图片、视频等的数字文件)创建的NFT。Referring to Figure 3, in step 301, first identification information corresponding to the metadata of the target NFT can be obtained. Here, the target NFT may refer to the NFT created by the NFT creator for its NFT object (for example, digital files of pictures, videos, etc.).
根据本公开的示例性实施例,目标NFT的元数据可包括NFT标的对应的标识信息以及任何与NFT标的相关的描述信息。这里,NFT标的对应的标识信息可以是NFT标的存储至区块链或云存储之后得到的标识信息,用于指示NFT标的的存储地址。当然,目标NFT的元数据不限于上述信息。According to an exemplary embodiment of the present disclosure, the metadata of the target NFT may include identification information corresponding to the NFT object and any description information related to the NFT object. Here, the identification information corresponding to the NFT object may be the identification information obtained after the NFT object is stored in the blockchain or cloud storage, and is used to indicate the storage address of the NFT object. Of course, the metadata of the target NFT is not limited to the above information.
根据本公开的示例性实施例,为了生成带证书的目标NFT,目标NFT的元数据可以包括用于验证目标NFT的数据。例如,目标NFT的元数据还可包括,但不限于,与目标NFT关联的证书信息数据对应的标识信息、以及用于对目标NFT进行验证的证书验证合约的地址。这里,证书信息数据可包括由证书验证合约用于对目标NFT进行验证的数据。证书信息数据对应的标识信息可以是证书信息数据存储至区块链之后得到的标识信息,用 于指示证书信息数据在区块链中的存储地址。证书验证合约的地址是指证书验证合约在区块链中的存储地址。这里,标识信息可以是,但不限于,由哈希算法生成的一种哈希值,称为token,用于唯一标识对应数据。According to an exemplary embodiment of the present disclosure, in order to generate a target NFT with a certificate, the metadata of the target NFT may include data for verifying the target NFT. For example, the metadata of the target NFT may also include, but is not limited to, identification information corresponding to the certificate information data associated with the target NFT, and the address of the certificate verification contract used to verify the target NFT. Here, the certificate information data may include data used by the certificate verification contract to verify the target NFT. The identification information corresponding to the certificate information data can be the identification information obtained after the certificate information data is stored in the blockchain, using To indicate the storage address of certificate information data in the blockchain. The address of the certificate verification contract refers to the storage address of the certificate verification contract in the blockchain. Here, the identification information may be, but is not limited to, a hash value generated by a hash algorithm, called a token, which is used to uniquely identify the corresponding data.
图4是示出根据本公开的示例性实施例的目标NFT的元数据的示意图。4 is a schematic diagram illustrating metadata of a target NFT according to an exemplary embodiment of the present disclosure.
参照图4,目标NFT的元数据可包括与NFT标的对应的标识信息、与NFT标的对应的描述信息、证书验证合约的地址以及证书信息数据对应的标识信息。Referring to Figure 4, the metadata of the target NFT may include identification information corresponding to the NFT object, description information corresponding to the NFT object, the address of the certificate verification contract, and identification information corresponding to the certificate information data.
根据本公开的示例性实施例,证书信息数据可包括,但不限于,以下项中的至少一项:NFT标的地址、NFT创建合约地址、证书验证合约的地址、NFT创造人账户地址、NFT创造人公钥、NFT创造人签名和NFT创造人签名到期时间。这里,NFT标的地址是指NFT标的在区块链或云存储中的存储地址。NFT创建合约地址是指NFT创建合约在区块链中的存储地址。证书验证合约的地址是指证书验证合约在区块链中的存储地址。NFT创造人账户地址是指目标NFT和其证书NFT在创建完成后的存储地址。NFT创造人公钥的哈希值是NFT创造人账户地址,并可用于NFT创造人加密或解密。NFT创造人签名通过利用NFT创造人私钥对证书信息数据中除NFT创造人签名之外的其它证书信息数据进行加密得到。也就是说,可利用NFT创造人私钥对不包括NFT创造人签名的证书信息数据(json数据)整体加密,然后,将加密后得到的NFT创造人签名添加到证书信息数据(json数据)中。这样,通过使用非对称加密的方式确认NFT创造人授权证书创建合约,将证书创建合约与NFT创造人绑定。因此,NFT创造人签名到期时间是指NFT创造人授权的签名失效时间,也就是说,在NFT创造人签名到期时间后,NFT创造人签名失效。当然,本公开的证书信息数据不限于上述数据,可根据需要包括希望验证的其它证书信息数据,以用于后续由证书验证合约用于对目标NFT进行验证。According to an exemplary embodiment of the present disclosure, the certificate information data may include, but is not limited to, at least one of the following items: NFT target address, NFT creation contract address, certificate verification contract address, NFT creator account address, NFT creation The person’s public key, NFT creator’s signature, and NFT creator’s signature expiration time. Here, the address of the NFT object refers to the storage address of the NFT object in the blockchain or cloud storage. The NFT creation contract address refers to the storage address of the NFT creation contract in the blockchain. The address of the certificate verification contract refers to the storage address of the certificate verification contract in the blockchain. The NFT creator's account address refers to the storage address of the target NFT and its certificate NFT after the creation is completed. The hash value of the NFT creator's public key is the NFT creator's account address and can be used for NFT creator encryption or decryption. The NFT creator's signature is obtained by using the NFT creator's private key to encrypt other certificate information data in the certificate information data except the NFT creator's signature. In other words, the NFT creator's private key can be used to encrypt the entire certificate information data (json data) that does not include the NFT creator's signature, and then add the encrypted NFT creator's signature to the certificate information data (json data). . In this way, by using asymmetric encryption to confirm that the NFT creator authorizes the certificate creation contract, the certificate creation contract is bound to the NFT creator. Therefore, the expiration time of the NFT creator's signature refers to the expiration time of the signature authorized by the NFT creator. That is to say, after the expiration time of the NFT creator's signature, the NFT creator's signature becomes invalid. Of course, the certificate information data of this disclosure is not limited to the above data, and may include other certificate information data that you wish to verify as needed, for subsequent use by the certificate verification contract to verify the target NFT.
返回参照图3,在步骤302,可调用NFT创建合约以基于第一标识信息创建目标NFT。具体地说,NFT创建合约在接收到第一标识信息后,可对第一标识信息生成一个用于标识第一标识信息的标识信息(例如,token),生成的这个标识信息就是目标NFT。在目标NFT创建完成后,NFT创建合约会将目标NFT存入NFT创造人账户中。Referring back to Figure 3, in step 302, the NFT creation contract may be called to create the target NFT based on the first identification information. Specifically, after receiving the first identification information, the NFT creation contract can generate identification information (for example, token) for identifying the first identification information. The generated identification information is the target NFT. After the target NFT is created, the NFT creation contract will deposit the target NFT into the NFT creator's account.
在步骤303,可获取与目标NFT相关的证书NFT的元数据对应的第二标识信息。这里,为了使证书NFT能够用于对目标NFT进行验证,证书NFT的元数据可包括NFT创建合约的相关信息以及证书信息数据。NFT创建合约的相关信息是指与NFT创建合约创建目标NFT的事件相关的信息。证书NFT的元数据对应的第二标识信息可以是证书NFT的元数据存储至区块链之后得到的标识信息,用于指示证书NFT的元数据在区块链中的存储地址。In step 303, second identification information corresponding to the metadata of the certificate NFT related to the target NFT may be obtained. Here, in order to enable the certificate NFT to be used to verify the target NFT, the metadata of the certificate NFT may include information related to the NFT creation contract and certificate information data. Information related to the NFT creation contract refers to information related to the event in which the NFT creation contract creates the target NFT. The second identification information corresponding to the metadata of the certificate NFT may be the identification information obtained after the metadata of the certificate NFT is stored in the blockchain, and is used to indicate the storage address of the metadata of the certificate NFT in the blockchain.
图5是示出根据本公开的示例性实施例的证书NFT的元数据的示意图。FIG. 5 is a schematic diagram illustrating metadata of a certificate NFT according to an exemplary embodiment of the present disclosure.
参照图5,证书NFT的元数据可包括NFT创建合约的相关信息以及证书信息数据。根据本公开的示例性实施例,NFT创建合约的相关信息可包括,但不限于,NFT创建合约的地址以及目标NFT在NFT创建合约中的数字标识(例如,token ID)。当NFT创建合约创建了目标NFT(即,目标token)之后,NFT创建合约会通过使用数字标识(即,token ID)对该目标NFT进行标记并记录。例如,该目标NFT是在该NFT创建合约创建的第100个NFT,则可用100来标记该目标NFT,因此,该目标NFT的token ID则为100。也就是说,NFT创建合约和token ID可以唯一标识一个NFT。因此,NFT创建合约的相关 信息可包括NFT创建合约的地址以及目标NFT在NFT创建合约中的数字标识,从而唯一标识目标NFT。当然,NFT创建合约的相关信息不限于此,例如,NFT创建合约的相关信息可不包括目标NFT在NFT创建合约中的数字标识,而是包括目标NFT的标识信息(token),即目标NFT本身的token值,等等。Referring to Figure 5, the metadata of the certificate NFT may include information related to the NFT creation contract and certificate information data. According to an exemplary embodiment of the present disclosure, the relevant information of the NFT creation contract may include, but is not limited to, the address of the NFT creation contract and the digital identification (for example, token ID) of the target NFT in the NFT creation contract. After the NFT creation contract creates the target NFT (i.e., target token), the NFT creation contract will mark and record the target NFT by using a digital identification (i.e., token ID). For example, if the target NFT is the 100th NFT created by the NFT creation contract, the target NFT can be marked with 100. Therefore, the token ID of the target NFT is 100. In other words, the NFT creation contract and token ID can uniquely identify an NFT. Therefore, the relevant NFT creation contract The information may include the address of the NFT creation contract and the digital identification of the target NFT in the NFT creation contract, thereby uniquely identifying the target NFT. Of course, the relevant information of the NFT creation contract is not limited to this. For example, the relevant information of the NFT creation contract may not include the digital identification of the target NFT in the NFT creation contract, but include the identification information (token) of the target NFT, that is, the target NFT itself. token value, etc.
返回参照图3,在步骤304,可调用证书创建合约以基于第二标识信息创建证书NFT,其中,证书创建合约是与证书验证合约对应的合约。具体地说,证书创建合约在接收到第二标识信息后,可对第二标识信息生成一个用于标识第二标识信息的标识信息(例如,token),生成的这个标识信息就是证书NFT。在证书NFT创建完成后,证书创建合约会将证书NFT存入NFT创造人账户中。Referring back to Figure 3, in step 304, the certificate creation contract may be called to create the certificate NFT based on the second identification information, where the certificate creation contract is a contract corresponding to the certificate verification contract. Specifically, after receiving the second identification information, the certificate creation contract can generate identification information (for example, token) for identifying the second identification information. The generated identification information is the certificate NFT. After the certificate NFT is created, the certificate creation contract will deposit the certificate NFT into the NFT creator's account.
根据本公开的示例性实施例,证书创建合约在创建证书NFT之前,会先对证书NFT的元数据进行验证,在证书NFT的元数据被验证正确无误后,才使用第二标识信息创建证书NFT,从而保证创建的证书NFT确为目标NFT的证书NFT。According to an exemplary embodiment of the present disclosure, the certificate creation contract will first verify the metadata of the certificate NFT before creating the certificate NFT, and only use the second identification information to create the certificate NFT after the metadata of the certificate NFT is verified to be correct. , thereby ensuring that the created certificate NFT is indeed the certificate NFT of the target NFT.
根据本公开的示例性实施例,可对与证书NFT的元数据相关的至少一项数据进行验证,并在每一项数据都被验证正确的情况下,则证书NFT的元数据被验证正确,从而开始创建证书NFT。一旦有验证的数据不正确,则终止创建证书NFT。例如,可验证证书验证合约的地址、第二标识信息和证书NFT创造人(证书NFT的创造人)中的至少一项。According to an exemplary embodiment of the present disclosure, at least one piece of data related to the metadata of the certificate NFT can be verified, and if each piece of data is verified to be correct, then the metadata of the certificate NFT is verified to be correct, This begins creating the certificate NFT. Once the verified data is incorrect, the creation of the certificate NFT will be terminated. For example, at least one of the address of the certificate verification contract, the second identification information, and the creator of the certificate NFT (the creator of the certificate NFT) can be verified.
根据本公开的示例性实施例,可验证证书NFT的元数据中的证书验证合约的地址是否正确,从而防止证书NFT错误创建或创建后的证书NFT无法用于验证。这是因为如果证书NFT的元数据中的证书验证合约的地址不正确,则说明该证书验证合约与创建证书NFT的证书创建合约不对应,这将导致证书NFT错误创建或创建后的证书NFT无法用于验证。由于证书创建合约和证书验证合约是一对合约,如果证书验证合约的地址正确,则证书创建合约地址也正确,因此只需验证证书验证合约的地址的正确性即可。通过第三方预言机,基于证书NFT的元数据对应的第二标识信息查询存储证书NFT的元数据的区块链,来获得证书NFT的元数据中的证书验证合约的地址。在获取到证书NFT的元数据中的证书验证合约的地址后,可基于实际证书验证合约的地址,验证证书NFT的元数据中的证书验证合约的地址的正确性。由于证书创建合约和证书验证合约为一对合约,因此,证书创建合约可确定实际证书验证合约的地址,即,实际证书验证合约的地址通过证书创建合约的地址确定。例如,在证书NFT的元数据中的证书验证合约的地址与实际证书验证合约的地址一致的情况下,则确定证书NFT的元数据中的证书验证合约的地址正确。否则,确定证书NFT的元数据中的证书验证合约的地址错误,并终止创建证书NFT。According to an exemplary embodiment of the present disclosure, it is possible to verify whether the address of the certificate verification contract in the metadata of the certificate NFT is correct, thereby preventing the certificate NFT from being created incorrectly or the certificate NFT after creation being unable to be used for verification. This is because if the address of the certificate verification contract in the metadata of the certificate NFT is incorrect, it means that the certificate verification contract does not correspond to the certificate creation contract that created the certificate NFT, which will cause the certificate NFT to be incorrectly created or the certificate NFT after creation cannot for verification. Since the certificate creation contract and the certificate verification contract are a pair of contracts, if the address of the certificate verification contract is correct, the address of the certificate creation contract is also correct, so you only need to verify the correctness of the address of the certificate verification contract. Through a third-party oracle, the blockchain storing the metadata of the certificate NFT is queried based on the second identification information corresponding to the metadata of the certificate NFT, to obtain the address of the certificate verification contract in the metadata of the certificate NFT. After obtaining the address of the certificate verification contract in the metadata of the certificate NFT, the correctness of the address of the certificate verification contract in the metadata of the certificate NFT can be verified based on the address of the actual certificate verification contract. Since the certificate creation contract and the certificate verification contract are a pair of contracts, the certificate creation contract can determine the address of the actual certificate verification contract, that is, the address of the actual certificate verification contract is determined by the address of the certificate creation contract. For example, if the address of the certificate verification contract in the metadata of the certificate NFT is consistent with the address of the actual certificate verification contract, it is determined that the address of the certificate verification contract in the metadata of the certificate NFT is correct. Otherwise, it is determined that the address of the certificate verification contract in the metadata of the certificate NFT is wrong, and the creation of the certificate NFT is terminated.
根据本公开的示例性实施例,可验证证书NFT的元数据对应的第二标识信息是否在证书创建合约中被使用过,从而防止一个证书NFT对应多个NFT标的的情况。这是因为如果第二标识信息在证书创建合约中已被使用过,则说明该证书NFT已对应其它NFT标的,这将导致证书NFT对应多个NFT标的,丧失验证可靠性。也就是说,证书NFT的元数据应该对应一个唯一标识信息,因此可在证书创建合约的创建记录中查询第二标识信息是否在证书创建合约之前的创建中使用过,如果确定第二标识信息未被使用过,则确定第二标识信息正确。否则,确定第二标识信息错误,并终止创建证书NFT。According to exemplary embodiments of the present disclosure, it can be verified whether the second identification information corresponding to the metadata of the certificate NFT has been used in the certificate creation contract, thereby preventing the situation where one certificate NFT corresponds to multiple NFT objects. This is because if the second identification information has been used in the certificate creation contract, it means that the certificate NFT has already corresponded to other NFT objects, which will cause the certificate NFT to correspond to multiple NFT objects and lose verification reliability. In other words, the metadata of the certificate NFT should correspond to a unique identification information. Therefore, you can check in the creation record of the certificate creation contract whether the second identification information has been used in the creation of the certificate creation contract. If it is determined that the second identification information has not been used in the creation of the certificate creation contract, has been used, it is determined that the second identification information is correct. Otherwise, it is determined that the second identification information is incorrect, and the creation of the certificate NFT is terminated.
根据本公开的示例性实施例,可验证证书NFT创造人是否正确,即,验证证书NFT创造人是否是NFT创造人(即,目标NFT的创造人)本人,从而防止非NFT创造人伪造 证书NFT。这是因此目标NFT的创造人和证书NFT的创造人应该是同一人(即,NFT创造人),否则可能存在非NFT创造人伪造证书NFT的情况。根据本公开的示例性实施例,可通过验证(1)证书NFT创建账户地址是否是当前证书NFT创造人本人的账户地址以及(2)证书NFT创建账户地址是否是NFT创造人的账户地址,来验证证书NFT创造人是否是NFT创造人本人。如果以上两项都验证通过,则确定证书NFT创造人是NFT创造人本人,否则,确定证书NFT创造人不是NFT创造人本人,并终止创建证书NFT。因此,可通过验证证书NFT创建账户地址的正确性以及证书NFT的元数据中的NFT创造人公钥与证书NFT创建账户地址的一致性,验证证书NFT创建人的正确性。According to an exemplary embodiment of the present disclosure, it is possible to verify whether the creator of the certificate NFT is correct, that is, whether the creator of the certificate NFT is the NFT creator (ie, the creator of the target NFT) himself, thereby preventing forgery by non-NFT creators. Certificate NFT. This is why the creator of the target NFT and the creator of the certificate NFT should be the same person (i.e., the NFT creator), otherwise there may be a situation where a non-NFT creator forges the certificate NFT. According to an exemplary embodiment of the present disclosure, it can be verified by verifying (1) whether the certificate NFT creation account address is the account address of the current certificate NFT creator and (2) whether the certificate NFT creation account address is the account address of the NFT creator. Verify whether the NFT creator of the certificate is the NFT creator himself. If both of the above verifications are passed, it is determined that the creator of the certificate NFT is the NFT creator himself. Otherwise, it is determined that the creator of the certificate NFT is not the NFT creator himself, and the creation of the certificate NFT is terminated. Therefore, the correctness of the creator of the certificate NFT can be verified by verifying the correctness of the account address created by the certificate NFT and the consistency of the NFT creator's public key in the metadata of the certificate NFT and the address of the account created by the certificate NFT.
例如,可通过非对称加密的方式(例如,证书NFT创建账户私钥签名且证书创建合约公钥解密的方式),确定证书NFT创建账户地址是否是证书NFT创建人的账户地址。例如,证书创建合约将预定信息发送给证书NFT创建账户,证书NFT创建账户使用私钥对预定信息进行加密签名,并将签名发送给证书创建合约,证书创建合约使用公钥对签名进行解密,并验证解密后的数据是否与预定信息一致,如果一致,则确定证书NFT创建账户地址是证书NFT创建人的账户地址,如果不一致或未收到签名,则确定证书NFT创建账户地址不是证书NFT创造人的账户地址。在确定证书NFT创建账户地址是证书NFT创造人的账户地址的情况下,基于证书NFT的元数据中的NFT创造人公钥得到NFT创造人账户地址,并将NFT创造人账户地址与证书NFT创建账户地址进行比对;在NFT创造人账户地址与证书NFT创建账户地址一致的情况下,确定证书NFT创造人正确,否则,确定证书NFT创造人错误。For example, it can be determined whether the account address of the certificate NFT creation account is the account address of the certificate NFT creator through asymmetric encryption (for example, the private key of the certificate NFT creation account is signed and the certificate creation contract public key is decrypted). For example, the certificate creation contract sends the predetermined information to the certificate NFT creation account. The certificate NFT creation account uses the private key to encrypt the signature of the predetermined information and sends the signature to the certificate creation contract. The certificate creation contract uses the public key to decrypt the signature and Verify whether the decrypted data is consistent with the predetermined information. If it is consistent, it is determined that the certificate NFT creation account address is the account address of the certificate NFT creator. If it is inconsistent or a signature is not received, it is determined that the certificate NFT creation account address is not the certificate NFT creator. account address. When it is determined that the certificate NFT creation account address is the account address of the certificate NFT creator, the NFT creator's account address is obtained based on the NFT creator's public key in the metadata of the certificate NFT, and the NFT creator's account address is combined with the certificate NFT creation Compare the account addresses; if the NFT creator's account address is consistent with the certificate NFT creation account address, it is determined that the creator of the certificate NFT is correct; otherwise, it is determined that the creator of the certificate NFT is wrong.
当然,本公开不限于上述验证证书NFT的元数据的正确性的过程,还可利用任何可能的方法或数据来验证证书NFT的元数据的正确性。Of course, the present disclosure is not limited to the above-mentioned process of verifying the correctness of the metadata of the certificate NFT. Any possible method or data can also be used to verify the correctness of the metadata of the certificate NFT.
图6是示出根据本公开的示例性实施例的数据验证方法的流程图。当根据本公开的图3所示的数据处理方法创建出带证书NFT的目标NFT之后,用户可通过根据本公开的图6所示的数据验证方法对目标NFT进行验证,以验证目标NFT的真实性。FIG. 6 is a flowchart illustrating a data verification method according to an exemplary embodiment of the present disclosure. After the target NFT with certificate NFT is created according to the data processing method shown in Figure 3 of the present disclosure, the user can verify the target NFT according to the data verification method shown in Figure 6 of the present disclosure to verify the authenticity of the target NFT. sex.
参照图7,在步骤601,可调用证书验证合约以基于目标NFT的元数据和与目标NFT关联的证书NFT的元数据对目标NFT进行验证;在步骤602,可输出验证结果。Referring to Figure 7, in step 601, the certificate verification contract can be called to verify the target NFT based on the metadata of the target NFT and the metadata of the certificate NFT associated with the target NFT; in step 602, the verification result can be output.
根据本公开的示例性实施例,可将NFT创建合约的相关信息输入证书验证合约,并通过证书验证合约,基于NFT创建合约的相关信息,获取目标NFT的元数据和证书NFT的元数据。这里,NFT创建合约的相关信息是指与NFT创建合约创建目标NFT的事件相关的信息。例如,NFT创建合约的相关信息可包括,但不限于,NFT创建合约的地址以及目标NFT在NFT创建合约中的数字标识(例如,token ID)。本公开对NFT创建合约的相关信息的内容不作限制,例如,NFT创建合约的相关信息还可包括目标NFT对应的标识信息或者目标NFT的标的对应的标识信息等,或者也可用这些标识信息来代替数字标识。According to an exemplary embodiment of the present disclosure, the relevant information of the NFT creation contract can be input into the certificate verification contract, and through the certificate verification contract, based on the relevant information of the NFT creation contract, the metadata of the target NFT and the metadata of the certificate NFT can be obtained. Here, the information related to the NFT creation contract refers to the information related to the event that the NFT creation contract creates the target NFT. For example, the relevant information of the NFT creation contract may include, but is not limited to, the address of the NFT creation contract and the digital identification (for example, token ID) of the target NFT in the NFT creation contract. This disclosure does not limit the content of the relevant information of the NFT creation contract. For example, the relevant information of the NFT creation contract may also include identification information corresponding to the target NFT or identification information corresponding to the subject of the target NFT, etc., or these identification information may be used instead. Digital ID.
根据本公开的示例性实施例,可通过所述证书验证合约与第三方预言机(例如,Chainlink预言机网络)通信,利用所述第三方预言机基于NFT创建合约的相关信息,从存储目标NFT的元数据的区块链(例如,IPFS、AR等)获取目标NFT的元数据。具体地说,证书验证合约和第三方预言机在同一区块链,证书验证合约可通过将包含NFT创建合约的相关信息的元数据获取请求发布,在第三方预言机从链上获取到该元数据获取请 求后,基于NFT创建合约的相关信息从存储目标NFT的元数据的区块链(与证书验证合约和第三方预言机不在同一区块链)获取目标NFT的元数据,并将获取到的目标NFT的元数据发布上链,证书验证合约可从链上获取目标NFT的元数据。According to an exemplary embodiment of the present disclosure, the certificate verification contract can communicate with a third-party oracle (for example, Chainlink oracle network), and use the third-party oracle to create relevant information of the contract based on the NFT, from storing the target NFT Obtain the metadata of the target NFT from the metadata blockchain (e.g., IPFS, AR, etc.). Specifically, the certificate verification contract and the third-party oracle are in the same blockchain. The certificate verification contract can issue a metadata acquisition request containing relevant information of the NFT creation contract, and the third-party oracle obtains the metadata from the chain. Data acquisition please After requesting, the relevant information of the contract created based on the NFT obtains the metadata of the target NFT from the blockchain that stores the metadata of the target NFT (not in the same blockchain as the certificate verification contract and the third-party oracle), and will obtain the target NFT. The metadata of the NFT is published on the chain, and the certificate verification contract can obtain the metadata of the target NFT from the chain.
根据本公开的示例性实施例,可通过证书验证合约与第三方预言机(例如,Chainlink预言机网络)通信,利用第三方预言机基于第二标识信息,从存储证书NFT的元数据的区块链获取证书NFT的元数据。具体地说,证书验证合约和第三方预言机在同一区块链,证书验证合约可通过将包含第二标识信息的元数据获取请求发布,在第三方预言机从链上获取到该元数据获取请求后,基于第二标识信息从存储证书NFT的元数据的区块链(与证书验证合约和第三方预言机不在同一区块链)获取证书NFT的元数据,并将获取到的证书NFT的元数据发布上链,证书验证合约可从链上获取证书NFT的元数据。According to an exemplary embodiment of the present disclosure, a certificate verification contract may be used to communicate with a third-party oracle (for example, the Chainlink oracle network), and the third-party oracle may be used to obtain metadata from a block storing the metadata of the certificate NFT based on the second identification information. Chain gets the metadata of the certificate NFT. Specifically, the certificate verification contract and the third-party oracle are in the same blockchain. The certificate verification contract can issue a metadata acquisition request containing the second identification information, and the third-party oracle obtains the metadata from the chain. After the request, obtain the metadata of the certificate NFT from the blockchain that stores the metadata of the certificate NFT based on the second identification information (not on the same blockchain as the certificate verification contract and the third-party oracle), and store the metadata of the certificate NFT. The metadata is published on the chain, and the certificate verification contract can obtain the metadata of the certificate NFT from the chain.
根据本公开的示例性实施例,基于NFT创建合约的相关信息,从证书创建合约中获取证书NFT的元数据对应的标识信息,即,第二标识信息;并通过第三方预言机,基于第二标识信息,从存储证书NFT的元数据的区块链(例如,IPFS、AR等)获取证书NFT的元数据。According to an exemplary embodiment of the present disclosure, based on the relevant information of the NFT creation contract, the identification information corresponding to the metadata of the certificate NFT is obtained from the certificate creation contract, that is, the second identification information; and through a third-party oracle, based on the second Identification information, obtain the metadata of the certificate NFT from the blockchain (for example, IPFS, AR, etc.) that stores the metadata of the certificate NFT.
根据本公开的示例性实施例,可对目标NFT的元数据中的至少一项数据和证书NFT的元数据中的至少一项数据分别进行验证,验证过的每一项数据都正确,则可确定目标NFT是真的,即,可确定目标NFT是由目标NFT元数据上交易记录的NFT创造人创建或授权创建的,并输出指示目标NFT真实的验证结果。一旦检测出有一项数据不正确,则可确定目标NFT由他人伪造,并输出指示目标NFT的真实性存在风险的提示。本公开对每项数据的验证过程的顺序不作限制。例如,可对每项数据同时执行验证。又例如,可对每项数据依次验证,只要有数据验证不通过,则终止验证,并输出验证结果。又例如,可先对目标NFT的元数据中的至少一项数据进行验证,在验证通过的情况下,再对证书NFT的元数据中的至少一项数据进行验证。又例如,可先对证书NFT的元数据中的至少一项数据进行验证,在验证通过的情况下,再对目标NFT的元数据中的至少一项数据进行验证。According to an exemplary embodiment of the present disclosure, at least one item of data in the metadata of the target NFT and at least one item of data in the metadata of the certificate NFT can be verified separately. If each item of verified data is correct, then it can be It is determined that the target NFT is authentic, that is, it can be determined that the target NFT was created or authorized to be created by the NFT creator of the transaction record on the target NFT metadata, and a verification result indicating that the target NFT is authentic is output. Once it is detected that an item of data is incorrect, it can be determined that the target NFT is forged by others, and a prompt indicating that the authenticity of the target NFT is at risk is output. This disclosure does not limit the order of the verification process for each piece of data. For example, validation can be performed on each piece of data simultaneously. For another example, each piece of data can be verified in sequence. As long as some data fails to pass the verification, the verification will be terminated and the verification result will be output. For another example, at least one piece of data in the metadata of the target NFT can be verified first, and if the verification passes, at least one piece of data in the metadata of the certificate NFT can be verified. For another example, at least one piece of data in the metadata of the certificate NFT can be verified first, and if the verification passes, at least one piece of data in the metadata of the target NFT can be verified.
根据本公开的示例性实施例,可基于目标NFT的元数据对目标NFT进行第一验证;在第一验证通过的情况下,基于证书NFT的元数据对目标NFT进行第二验证。According to an exemplary embodiment of the present disclosure, a first verification may be performed on the target NFT based on the metadata of the target NFT; if the first verification is passed, a second verification may be performed on the target NFT based on the metadata of the certificate NFT.
根据本公开的示例性实施例,第一验证可包括对目标NFT的元数据中的至少一项数据分别进行验证,若至少一项数据的验证结果中有结果为不通过,则输出指示目标NFT的真实性存在风险的验证结果。According to an exemplary embodiment of the present disclosure, the first verification may include separately verifying at least one item of data in the metadata of the target NFT. If the verification result of the at least one item of data is failed, outputting an indication that the target NFT The authenticity of the verification results is at risk.
例如,第一验证所验证的数据可包括,但不限于,以下项中的至少一项:目标NFT的元数据中的证书验证合约的地址和目标NFT的元数据中的NFT创造人账户地址。(1)在验证所述目标NFT的元数据中的证书验证合约的地址时,可验证目标NFT的元数据中的证书验证合约的地址与被调用的证书验证合约的地址的一致性。若目标NFT的元数据中的证书验证合约的地址与被调用的证书验证合约的地址一致,说明目标NFT的元数据中的证书验证合约的地址正确,则目标NFT的元数据中的证书验证合约的地址的验证结果为通过。如果不一致,说明目标NFT的元数据中的证书验证合约的地址不正确,则目标NFT的元数据中的证书验证合约的地址的验证结果为不通过,并输出目标NFT的真实性存在风险的验证结果。(2)在验证目标NFT的元数据中的NFT创造人账户地址时,可验 证目标NFT的元数据中的NFT创造人账户地址与交易记录中的NFT创造人账户地址(即,交易记录中的创造记录中的“to”指向的地址)的一致性。若目标NFT的元数据中的NFT创造人账户地址与交易记录中的NFT创造人账户地址一致,说明目标NFT的元数据中的NFT创造人账户地址正确,则目标NFT的元数据中的NFT创造人账户地址的验证结果为通过。如果不一致,说明目标NFT的元数据中的NFT创造人账户地址不正确,则目标NFT的元数据中的NFT创造人账户地址的验证结果为不通过,并输出目标NFT的真实性存在风险的验证结果。本公开的第一验证不限于上述验证过程,还可根据需要或设置包括对目标NFT的元数据中的其它数据的验证过程。For example, the data verified by the first verification may include, but is not limited to, at least one of the following items: the address of the certificate verification contract in the metadata of the target NFT and the NFT creator account address in the metadata of the target NFT. (1) When verifying the address of the certificate verification contract in the metadata of the target NFT, the consistency of the address of the certificate verification contract in the metadata of the target NFT with the address of the called certificate verification contract can be verified. If the address of the certificate verification contract in the metadata of the target NFT is consistent with the address of the called certificate verification contract, it means that the address of the certificate verification contract in the metadata of the target NFT is correct, then the address of the certificate verification contract in the metadata of the target NFT is correct. The verification result of the address is passed. If they are inconsistent, it means that the address of the certificate verification contract in the metadata of the target NFT is incorrect, and the verification result of the address of the certificate verification contract in the metadata of the target NFT is failed, and a verification that the authenticity of the target NFT is at risk is output. result. (2) When verifying the NFT creator’s account address in the metadata of the target NFT, it can be verified Verify the consistency of the NFT creator's account address in the metadata of the target NFT and the NFT creator's account address in the transaction record (i.e., the address pointed to by "to" in the creation record in the transaction record). If the NFT creator account address in the metadata of the target NFT is consistent with the NFT creator account address in the transaction record, it means that the NFT creator account address in the metadata of the target NFT is correct, then the NFT creator account address in the metadata of the target NFT is correct. The verification result of the personal account address is passed. If they are inconsistent, it means that the NFT creator account address in the metadata of the target NFT is incorrect, and the verification result of the NFT creator account address in the metadata of the target NFT is failed, and a verification that the authenticity of the target NFT is at risk is output. result. The first verification of the present disclosure is not limited to the above-mentioned verification process, and may also include verification processes for other data in the metadata of the target NFT as needed or set.
根据本公开的示例性实施例,第二验证可包括对证书NFT的元数据中的至少一项数据分别进行验证,若至少一项数据的验证结果中有一项数据的验证结果为不通过,则输出指示所述目标NFT的真实性存在风险的验证结果。According to an exemplary embodiment of the present disclosure, the second verification may include separately verifying at least one item of data in the metadata of the certificate NFT. If the verification result of the at least one item of data is failed, then Output verification results indicating that the authenticity of the target NFT is at risk.
例如,第二验证所验证的数据可包括,但不限于,以下项中的至少一项:NFT创造人公钥、NFT创造人签名、NFT创造人签名到期时间、NFT标的地址、NFT创建合约地址和证书验证合约的地址。(1)在验证NFT创造人公钥时,可基于证书NFT的元数据中的NFT创造人公钥得到NFT创造人账户地址,并验证得到的NFT创造人账户地址与目标NFT的元数据中的NFT创造人账户地址的一致性,以判断证书NFT上的公钥是否是NFT创造人的。这里,NFT创造人公钥的哈希值可为推导NFT创造人账户地址,因此,可通过对NFT创造人公钥进行哈希推导得到NFT创造人账户地址。若得到的NFT创造人账户地址与目标NFT的元数据中的NFT创造人账户地址一致,说明证书NFT上的公钥是NFT创造人的,则确定所述证书NFT的元数据中的NFT创造人公钥的验证结果为通过。如果不一致,说明证书NFT上的公钥不是NFT创造人的,则确定所述证书NFT的元数据中的NFT创造人公钥的验证结果为不通过,并输出目标NFT的真实性存在风险的验证结果。(2)在验证NFT创造人签名时,使用证书NFT的元数据中的NFT创造人公钥对证书NFT的元数据中的NFT创造人签名进行解密,并验证解密后得到的数据与证书信息数据中除NFT创造人签名之外的其它证书信息数据的一致性(例如,将解密后得到的数据与其它证书信息数据进行逐项对比),以验证证书NFT的元数据是否是NFT创造人授权过的。若解密后每一项数据都与其它证书信息数据中的对应项数据一致,说明证书NFT的元数据是NFT创造人授权过的,则证书NFT的元数据中的NFT创造人签名的验证结果为通过。如果不一致,说明证书NFT的元数据不是NFT创造人授权过的,则证书NFT的元数据中的NFT创造人签名的验证结果为不通过,并输出目标NFT的真实性存在风险的验证结果。(3)在验证NFT创造人签名到期时间时,验证证书NFT的元数据中的NFT创造人签名到期时间与目标NFT的创建时间或上链时间的匹配性,以验证是否有过期创建的情况。当NFT创建合约完成目标NFT的创建后,在区块链上记录与创建时间或上链时间相关的信息,若创建时间或上链时间是在NFT创造人签名到期时间之内,即,两者匹配,则说明目标NFT是在NFT创造人授权的有效时间内创建,因此目标NFT的创建是NFT创造人授权的,则证书NFT的元数据中的NFT创造人签名到期时间的验证结果为通过。若创建时间或上链时间超过在NFT创造人签名到期时间,即,两者不匹配,则说明目标NFT是在NFT创造人授权的有效时间之外创建,说明目标NFT的创建不是NFT创造人授权的,则证书NFT的元数据中的NFT创造人签名到期时间的验证结果为不通过,并 输出目标NFT的真实性存在风险的验证结果。(4)在验证NFT标的地址时,验证证书NFT的元数据中的NFT标的地址与目标NFT的元数据中的NFT标的地址的一致性,以验证证书NFT对应的NFT标的是否正确。若证书NFT的元数据中的NFT标的地址与目标NFT的元数据中的NFT标的地址一致,说明证书NFT对应的NFT标的正确,则证书NFT的元数据中的NFT标的地址的验证结果为通过。如果不一致,说明证书NFT对应的NFT标的不正确,则证书NFT的元数据中的NFT标的地址的验证结果为不通过,并输出目标NFT的真实性存在风险的验证结果。(5)在验证NFT创建合约地址时,验证证书NFT的元数据中的NFT创建合约地址与目标NFT的元数据中的NFT创建合约地址的一致性,以验证验证证书NFT对应的目标NFT是否由NFT创建合约创建。若证书NFT的元数据中的NFT创建合约地址与目标NFT的元数据中的NFT创建合约地址一致,说明验证证书NFT对应的目标NFT是由NFT创建合约创建,则证书NFT的元数据中的NFT创建合约地址的验证结果为通过。如果不一致,说明验证证书NFT对应的目标NFT不是由NFT创建合约创建,则证书NFT的元数据中的NFT创建合约地址的验证结果为不通过,并输出目标NFT的真实性存在风险的验证结果。(6)在验证证书验证合约的地址时,验证证书NFT的元数据中的证书验证合约的地址与目标NFT的元数据中的证书验证合约的地址的一致性,以验证证书NFT是否由目标NFT指定的证书验证合约来进行验证。若证书NFT的元数据中的证书验证合约的地址与目标NFT的元数据中的证书验证合约的地址一致,说明证书NFT是由目标NFT指定的证书验证合约来进行验证,则证书NFT的元数据中的证书验证合约的地址的验证结果为通过。如果不一致,说明证书NFT不是由目标NFT指定的证书验证合约来进行验证,则证书NFT的元数据中的证书验证合约的地址的验证结果为不通过,并输出目标NFT的真实性存在风险的验证结果。本公开的第二验证不限于上述验证过程,还可根据需要或设置,跳过上述部分验证过程(例如,用户发起验证时传入NFT标的地址,则需要执行验证(4),否则可不执行验证(4)),或者增加对证书NFT的元数据中的其它数据的验证过程。For example, the data verified by the second verification may include, but is not limited to, at least one of the following items: NFT creator public key, NFT creator signature, NFT creator signature expiration time, NFT target address, NFT creation contract The address and certificate verify the address of the contract. (1) When verifying the NFT creator's public key, you can obtain the NFT creator's account address based on the NFT creator's public key in the metadata of the certificate NFT, and verify that the obtained NFT creator's account address matches the address in the metadata of the target NFT. The consistency of the NFT creator's account address is used to determine whether the public key on the NFT certificate belongs to the NFT creator. Here, the hash value of the NFT creator's public key can be used to derive the NFT creator's account address. Therefore, the NFT creator's account address can be obtained by hashing the NFT creator's public key. If the obtained NFT creator account address is consistent with the NFT creator account address in the metadata of the target NFT, it means that the public key on the certificate NFT belongs to the NFT creator, then determine the NFT creator in the metadata of the certificate NFT. The verification result of the public key is passed. If they are inconsistent, it means that the public key on the certificate NFT does not belong to the NFT creator, then determine that the verification result of the NFT creator's public key in the metadata of the certificate NFT is failed, and output a verification that the authenticity of the target NFT is at risk. result. (2) When verifying the NFT creator's signature, use the NFT creator's public key in the metadata of the certificate NFT to decrypt the NFT creator's signature in the metadata of the certificate NFT, and verify the decrypted data and the certificate information data The consistency of other certificate information data except the signature of the NFT creator (for example, comparing the decrypted data with other certificate information data one by one) to verify whether the metadata of the certificate NFT has been authorized by the NFT creator of. If each item of data after decryption is consistent with the corresponding data in other certificate information data, it means that the metadata of the certificate NFT is authorized by the NFT creator, and the verification result of the NFT creator's signature in the metadata of the certificate NFT is pass. If they are inconsistent, it means that the metadata of the certificate NFT is not authorized by the NFT creator, and the verification result of the NFT creator's signature in the metadata of the certificate NFT is failed, and the verification result that the authenticity of the target NFT is at risk is output. (3) When verifying the expiration time of the NFT creator's signature, verify the matching of the NFT creator's signature expiration time in the metadata of the certificate NFT with the creation time or on-chain time of the target NFT to verify whether there is an expired creation. Condition. After the NFT creation contract completes the creation of the target NFT, the information related to the creation time or the uploading time is recorded on the blockchain. If the creation time or uploading time is within the expiration time of the NFT creator's signature, that is, both or match, it means that the target NFT was created within the valid time authorized by the NFT creator, so the creation of the target NFT was authorized by the NFT creator, then the verification result of the NFT creator's signature expiration time in the metadata of the certificate NFT is pass. If the creation time or on-chain time exceeds the expiration time of the NFT creator's signature, that is, the two do not match, it means that the target NFT was created outside the valid time authorized by the NFT creator, indicating that the target NFT was created by someone other than the NFT creator. authorized, the verification result of the NFT creator’s signature expiration time in the metadata of the certificate NFT is failed, and Output verification results indicating that the authenticity of the target NFT is at risk. (4) When verifying the NFT target address, verify the consistency of the NFT target address in the metadata of the certificate NFT and the NFT target address in the metadata of the target NFT to verify whether the NFT target corresponding to the certificate NFT is correct. If the NFT target address in the metadata of the certificate NFT is consistent with the NFT target address in the metadata of the target NFT, it means that the NFT target corresponding to the certificate NFT is correct, and the verification result of the NFT target address in the metadata of the certificate NFT is passed. If they are inconsistent, it means that the NFT target corresponding to the certificate NFT is incorrect, and the verification result of the NFT target address in the metadata of the certificate NFT is failed, and the verification result that the authenticity of the target NFT is at risk is output. (5) When verifying the NFT creation contract address, verify the consistency of the NFT creation contract address in the metadata of the certificate NFT and the NFT creation contract address in the metadata of the target NFT to verify whether the target NFT corresponding to the verification certificate NFT is made by NFT creation contract creation. If the NFT creation contract address in the metadata of the certificate NFT is consistent with the NFT creation contract address in the metadata of the target NFT, it means that the target NFT corresponding to the verification certificate NFT is created by the NFT creation contract, then the NFT in the metadata of the certificate NFT The verification result of creating the contract address is passed. If they are inconsistent, it means that the target NFT corresponding to the verification certificate NFT is not created by the NFT creation contract, and the verification result of the NFT creation contract address in the metadata of the certificate NFT is failed, and the verification result that the authenticity of the target NFT is at risk is output. (6) When verifying the address of the certificate verification contract, verify the consistency of the address of the certificate verification contract in the metadata of the certificate NFT and the address of the certificate verification contract in the metadata of the target NFT to verify whether the certificate NFT is generated by the target NFT The specified certificate verification contract is used for verification. If the address of the certificate verification contract in the metadata of the certificate NFT is consistent with the address of the certificate verification contract in the metadata of the target NFT, it means that the certificate NFT is verified by the certificate verification contract specified by the target NFT, then the metadata of the certificate NFT The verification result of the address of the certificate verification contract is passed. If they are inconsistent, it means that the certificate NFT is not verified by the certificate verification contract specified by the target NFT. The verification result of the address of the certificate verification contract in the metadata of the certificate NFT is failed, and a verification that the authenticity of the target NFT is at risk is output. result. The second verification of the present disclosure is not limited to the above-mentioned verification process. Part of the above-mentioned verification process can also be skipped according to needs or settings (for example, if the user passes in the address of the NFT target when initiating verification, verification (4) needs to be performed, otherwise verification may not be performed. (4)), or add a verification process for other data in the metadata of the certificate NFT.
根据本公开的数据处理方法和数据验证方法,可通过证书创建合约基于与目标NFT关联的证书信息数据来创建与目标NFT关联的证书NFT,并通过证书验证合约来利用与目标NFT关联的证书NFT对目标NFT进行验证,也就是说,通过一对智能合约(即,证书创建合约和证书验证合约)为目标NFT创建一个防伪的证书NFT,并通过证书NFT对目标NFT进行验证,从而保证目标NFT的真实性,防止类似SleepMinting等的欺诈行为。According to the data processing method and data verification method of the present disclosure, the certificate NFT associated with the target NFT can be created based on the certificate information data associated with the target NFT through the certificate creation contract, and the certificate NFT associated with the target NFT can be utilized through the certificate verification contract. Verify the target NFT, that is, create an anti-counterfeiting certificate NFT for the target NFT through a pair of smart contracts (i.e., certificate creation contract and certificate verification contract), and verify the target NFT through the certificate NFT, thereby ensuring that the target NFT authenticity to prevent fraud like SleepMinting.
下面,参照图7和图8具体描述根据本公开的示例性的创建带证书的NFT和以及在创建之后的对应证书验证的过程。Below, an exemplary process of creating an NFT with a certificate and corresponding certificate verification after creation according to the present disclosure is described in detail with reference to FIGS. 7 and 8 .
图7是示出根据本公开的示例性实施例的带证书的NFT的具体创建过程的流程图。7 is a flowchart illustrating a specific creation process of an NFT with a certificate according to an exemplary embodiment of the present disclosure.
参照图7,在步骤701,可将NFT标的(例如,图片、视频等的数字文件)上传至区块链(例如,但不限于,IPFS或AR等)或云存储等,获得NFT标的对应的token(可称为第一token)。Referring to Figure 7, in step 701, the NFT object (for example, digital files of pictures, videos, etc.) can be uploaded to the blockchain (such as, but not limited to, IPFS or AR, etc.) or cloud storage, etc., and the corresponding data of the NFT object can be obtained. token (can be called the first token).
在步骤702,可组织证书信息数据,并将证书信息数据上传至区块链(例如,但不限于,IPFS或AR等),获得证书信息数据对应的token(可称为第二token)。证书信息数据可包括,但不限于,以下项中的至少一项:NFT标的地址、NFT创建合约地址、证书验证合约的地址、NFT创造人账户地址、NFT创造人公钥、NFT创造人签名和NFT创造人 签名到期时间。In step 702, the certificate information data can be organized, uploaded to the blockchain (for example, but not limited to, IPFS or AR, etc.), and a token corresponding to the certificate information data (which can be called a second token) is obtained. Certificate information data may include, but is not limited to, at least one of the following items: NFT subject address, NFT creation contract address, certificate verification contract address, NFT creator account address, NFT creator public key, NFT creator signature and NFT creator Signature expiration time.
此外,本公开对步骤701和702的执行顺序不作限制,例如,可先执行步骤701,再执行步骤702,或先执行步骤702,再执行步骤701,或同时执行。In addition, the present disclosure does not limit the execution order of steps 701 and 702. For example, step 701 may be executed first and then step 702, or step 702 may be executed first and then step 701, or both may be executed simultaneously.
在步骤703,可组织目标NFT的元数据,并将目标NFT的元数据上传至区块链(例如,但不限于,IPFS或AR等),获得目标NFT的元数据对应的token(可称为第三token)。这里,目标NFT的元数据可包括,但不限于,与NFT标的相关的描述信息、第一token、第二token以及用于对目标NFT进行验证的证书验证合约的地址(证书验证合约的地址)。In step 703, the metadata of the target NFT can be organized, uploaded to the blockchain (for example, but not limited to, IPFS or AR, etc.), and a token corresponding to the metadata of the target NFT (which can be called third token). Here, the metadata of the target NFT may include, but is not limited to, descriptive information related to the NFT object, the first token, the second token, and the address of the certificate verification contract used to verify the target NFT (the address of the certificate verification contract) .
在步骤704,可将获得的第三token传入区块链(例如,但不限于,以太坊等)中的NFT创建合约,NFT创建合约基于第三token生成对应的token(可称为第四token)。第四token即为目标NFT,即,目标NFT创建完成。目标NFT创建完成后,可被存入NFT创造人的账户中。此外,目标NFT创建完成时,还可获得目标NFT在NFT创建合约中的token ID。In step 704, the obtained third token can be passed into the NFT creation contract in the blockchain (for example, but not limited to, Ethereum, etc.), and the NFT creation contract generates the corresponding token (which can be called the fourth token) based on the third token. token). The fourth token is the target NFT, that is, the target NFT is created. After the target NFT is created, it can be deposited into the NFT creator's account. In addition, when the target NFT is created, the token ID of the target NFT in the NFT creation contract can also be obtained.
在步骤705,可组织证书NFT的元数据,并将证书NFT的元数据上传至区块链(例如,但不限于,IPFS或AR等),得到证书NFT的元数据对应的token(可称为第五token)。这里,证书NFT的元数据可包括,但不限于,NFT创建合约地址、token ID以及证书信息数据。In step 705, the metadata of the certificate NFT can be organized and uploaded to the blockchain (for example, but not limited to, IPFS or AR, etc.) to obtain the token corresponding to the metadata of the certificate NFT (which can be called fifth token). Here, the metadata of the certificate NFT can include, but is not limited to, the NFT creation contract address, token ID, and certificate information data.
在步骤706,将获得的第五token传入区块链中的证书创建合约,证书创建合约对证书NFT的元数据的正确性进行验证。例如,证书创建合约可从,但不限于,从以下方面对证书NFT的元数据的正确性进行验证:(1)验证证书NFT的元数据中的证书验证合约的地址是否正确,以防止证书错误创建和创建后的证书无法验证。(2)验证证书NFT的元数据对应的token(即,第五token)是否在证书创建合约中被使用过,以防止一个证书对应多个目标NFT。(3)验证证书NFT创造人是否是NFT创造人,以防止非NFT创造人伪造证书NFT。一旦有一项数据验证不通过,则在步骤707,终止创建证书NFT。In step 706, the obtained fifth token is passed into the certificate creation contract in the blockchain, and the certificate creation contract verifies the correctness of the metadata of the certificate NFT. For example, the certificate creation contract can verify the correctness of the metadata of the certificate NFT from, but not limited to, the following aspects: (1) Verify whether the address of the certificate verification contract in the metadata of the certificate NFT is correct to prevent certificate errors Certificates created and created cannot be verified. (2) Verify whether the token corresponding to the metadata of the certificate NFT (ie, the fifth token) has been used in the certificate creation contract to prevent one certificate from corresponding to multiple target NFTs. (3) Verify whether the creator of the certificate NFT is the NFT creator to prevent non-NFT creators from forging the certificate NFT. Once one piece of data verification fails, in step 707, the creation of the certificate NFT is terminated.
在步骤708,在验证证书NFT的元数据正确无误的情况下,证书创建合约基于第五token生成对应的token(可称为第六token)。第六token即为证书NFT,即,证书NFT创建完成。证书NFT创建完成后,可被存入NFT创造人的账户中。In step 708, after verifying that the metadata of the certificate NFT is correct, the certificate creation contract generates the corresponding token based on the fifth token (which can be called the sixth token). The sixth token is the certificate NFT, that is, the creation of the certificate NFT is completed. After the certificate NFT is created, it can be deposited into the NFT creator's account.
图8是示出根据本公开的示例性实施例的带证书的NFT的具体验证过程的流程图。FIG. 8 is a flowchart illustrating a specific verification process of an NFT with a certificate according to an exemplary embodiment of the present disclosure.
参照图8,在步骤801,可通过客户端(例如,浏览器、应用等)使用web3.js调用证书验证合约,并将NFT创建合约地址和目标NFT在NFT创建合约中的token ID输入证书验证合约。Referring to Figure 8, in step 801, the certificate verification contract can be called through the client (for example, browser, application, etc.) using web3.js, and the NFT creation contract address and the token ID of the target NFT in the NFT creation contract can be entered into the certificate verification contract.
在步骤802,证书验证合约可通过Chainlink第三方预言机,基于NFT创建合约地址和目标NFT在NFT创建合约中的token ID从存储目标NFT的元数据的区块链(例如,IPFS或AR等),读取目标NFT的元数据。In step 802, the certificate verification contract can pass the Chainlink third-party oracle, based on the NFT creation contract address and the token ID of the target NFT in the NFT creation contract from the blockchain that stores the metadata of the target NFT (for example, IPFS or AR, etc.) , read the metadata of the target NFT.
在步骤803,证书验证合约可基于NFT创建合约地址和目标NFT在NFT创建合约中的token ID,从证书创建合约中获取证书NFT的元数据对应的token(即,图7中的第五token),并通过Chainlink第三方预言机,基于该token,从存储证书NFT的元数据的区块链(例如,IPFS或AR等),读取证书NFT的元数据。本公开对步骤802和803的执行顺序不做限制,例如,可同时执行,又例如,可先执行步骤802再执行步骤803,又例如,可先执行步骤803再执行步骤802。 In step 803, the certificate verification contract can obtain the token corresponding to the metadata of the certificate NFT from the certificate creation contract (ie, the fifth token in Figure 7) based on the NFT creation contract address and the token ID of the target NFT in the NFT creation contract. , and through the Chainlink third-party oracle, based on the token, read the metadata of the certificate NFT from the blockchain (for example, IPFS or AR, etc.) that stores the metadata of the certificate NFT. This disclosure does not limit the execution order of steps 802 and 803. For example, they may be executed at the same time. For example, step 802 may be executed first and then step 803. For example, step 803 may be executed first and then step 802.
在步骤804,证书验证合约可对目标NFT的元数据执行验证。例如,但不限于,可分别对目标NFT的元数据中的证书验证合约的地址以及NFT创造人账户地址执行验证。一旦有一项数据验证不通过,则在步骤805,输出指示目标NFT存在欺诈风险的验证结果。At step 804, the certificate verification contract may perform verification on the metadata of the target NFT. For example, but not limited to, verification can be performed separately on the address of the certificate verification contract and the address of the NFT creator's account in the metadata of the target NFT. Once one data verification fails, in step 805, a verification result indicating that the target NFT has a fraud risk is output.
在步骤806,在对证书NFT的元数据的验证通过的情况下,证书验证合约可对证书NFT的元数据执行验证。例如,但不限于,可分别对证书NFT的元数据中的NFT标的地址、NFT创建合约地址、证书验证合约的地址、NFT创造人账户地址、NFT创造人公钥、NFT创造人签名和NFT创造人签名到期时间分别进行验证。一旦有一项数据验证不通过,则在步骤805,输出指示目标NFT存在欺诈风险的验证结果。In step 806, if the verification of the metadata of the certificate NFT passes, the certificate verification contract may perform verification of the metadata of the certificate NFT. For example, but not limited to, the NFT target address, NFT creation contract address, certificate verification contract address, NFT creator account address, NFT creator public key, NFT creator signature and NFT creation in the metadata of the certificate NFT can be processed separately. The expiration time of the person's signature is verified separately. Once one data verification fails, in step 805, a verification result indicating that the target NFT has a fraud risk is output.
在步骤807,在对证书NFT的元数据的验证通过的情况下,输出指示目标NFT是真实的验证结果。In step 807, if the verification of the metadata of the certificate NFT passes, a verification result indicating that the target NFT is authentic is output.
图9是示出根据本公开的示例性实施例的数据处理装置的框图。FIG. 9 is a block diagram illustrating a data processing apparatus according to an exemplary embodiment of the present disclosure.
参照图9,根据本公开的示例性实施例的数据处理装置900可包括第一标识信息获取单元901、目标NFT创建单元902、第二标识信息获取单元903和证书NFT创建单元904。Referring to FIG. 9 , a data processing apparatus 900 according to an exemplary embodiment of the present disclosure may include a first identification information acquisition unit 901, a target NFT creation unit 902, a second identification information acquisition unit 903, and a certificate NFT creation unit 904.
第一标识信息获取单元901可获取目标NFT的元数据对应的第一标识信息。这里,目标NFT可指NFT创造人对其NFT标的(例如,图片、视频等的数字文件)创建的NFT。The first identification information obtaining unit 901 may obtain the first identification information corresponding to the metadata of the target NFT. Here, the target NFT may refer to the NFT created by the NFT creator for its NFT object (for example, digital files of pictures, videos, etc.).
根据本公开的示例性实施例,目标NFT的元数据可包括NFT标的对应的标识信息以及任何与NFT标的相关的描述信息。这里,NFT标的对应的标识信息可以是NFT标的存储至区块链或云存储之后得到的标识信息,用于指示NFT标的存储地址。当然,目标NFT的元数据不限于上述信息。According to an exemplary embodiment of the present disclosure, the metadata of the target NFT may include identification information corresponding to the NFT object and any description information related to the NFT object. Here, the identification information corresponding to the NFT object may be the identification information obtained after the NFT object is stored in the blockchain or cloud storage, and is used to indicate the storage address of the NFT object. Of course, the metadata of the target NFT is not limited to the above information.
根据本公开的示例性实施例,为了生成带证书的目标NFT,目标NFT的元数据至少需要包括用于验证目标NFT的数据。例如,目标NFT的元数据还可包括,但不限于,与目标NFT关联的证书信息数据对应的标识信息、以及用于对目标NFT进行验证的证书验证合约的地址。这里,证书信息数据可包括由证书验证合约用于对目标NFT进行验证的数据。证书信息数据对应的标识信息可以是证书信息数据存储至区块链之后得到的标识信息,用于指示证书信息数据存储地址。证书验证合约的地址是指证书验证合约在区块链中的存储地址。According to an exemplary embodiment of the present disclosure, in order to generate a target NFT with a certificate, the metadata of the target NFT needs to include at least data for verifying the target NFT. For example, the metadata of the target NFT may also include, but is not limited to, identification information corresponding to the certificate information data associated with the target NFT, and the address of the certificate verification contract used to verify the target NFT. Here, the certificate information data may include data used by the certificate verification contract to verify the target NFT. The identification information corresponding to the certificate information data may be the identification information obtained after the certificate information data is stored in the blockchain, and is used to indicate the storage address of the certificate information data. The address of the certificate verification contract refers to the storage address of the certificate verification contract in the blockchain.
根据本公开的示例性实施例,证书信息数据可包括,但不限于,以下项中的至少一项:NFT标的地址、NFT创建合约地址、证书验证合约的地址、NFT创造人账户地址、NFT创造人公钥、NFT创造人签名和NFT创造人签名到期时间。当然,本公开的证书信息数据不限于上述数据,可根据需要包括希望验证的其它证书信息数据,以用于后续由证书验证合约用于对目标NFT进行验证。According to an exemplary embodiment of the present disclosure, the certificate information data may include, but is not limited to, at least one of the following items: NFT target address, NFT creation contract address, certificate verification contract address, NFT creator account address, NFT creation The person’s public key, NFT creator’s signature, and NFT creator’s signature expiration time. Of course, the certificate information data of this disclosure is not limited to the above data, and may include other certificate information data that you wish to verify as needed, for subsequent use by the certificate verification contract to verify the target NFT.
目标NFT创建单元902可调用NFT创建合约以基于第一标识信息创建目标NFT。具体地说,目标NFT创建单元902可通过NFT创建合约对第一标识信息生成一个用于标识第一标识信息的标识信息(例如,token),生成的这个标识信息就是目标NFT。在目标NFT创建完成后,目标NFT创建单元902可通过NFT创建合约将目标NFT存入NFT创造人账户中。The target NFT creation unit 902 may call the NFT creation contract to create the target NFT based on the first identification information. Specifically, the target NFT creation unit 902 can generate identification information (for example, token) for identifying the first identification information through the NFT creation contract, and the generated identification information is the target NFT. After the creation of the target NFT is completed, the target NFT creation unit 902 can deposit the target NFT into the NFT creator's account through the NFT creation contract.
第二标识信息获取单元903可获取与目标NFT相关的证书NFT的元数据对应的第二标识信息。这里,为了使证书NFT能够用于对目标NFT进行验证,证书NFT的元数据可包括NFT创建合约的相关信息以及证书信息数据。NFT创建合约的相关信息是指与NFT 创建合约创建目标NFT的事件相关的信息。证书NFT的元数据对应的第二标识信息可以是证书NFT的元数据存储至区块链之后得到的标识信息,用于指示证书NFT的元数据的存储地址。The second identification information obtaining unit 903 may obtain the second identification information corresponding to the metadata of the certificate NFT related to the target NFT. Here, in order to enable the certificate NFT to be used to verify the target NFT, the metadata of the certificate NFT may include information related to the NFT creation contract and certificate information data. The information related to the NFT creation contract refers to the information related to the NFT Create contract to create event-related information of the target NFT. The second identification information corresponding to the metadata of the certificate NFT may be identification information obtained after the metadata of the certificate NFT is stored in the blockchain, and is used to indicate the storage address of the metadata of the certificate NFT.
根据本公开的示例性实施例,NFT创建合约的相关信息可包括,但不限于,NFT创建合约的地址以及目标NFT在NFT创建合约中的数字标识(例如,token ID)。当然,NFT创建合约的相关信息不限于此,例如,NFT创建合约的相关信息可不包括目标NFT在NFT创建合约中的数字标识,而是包括目标NFT的标识信息(token),即目标NFT本身的token值,等等。According to an exemplary embodiment of the present disclosure, the relevant information of the NFT creation contract may include, but is not limited to, the address of the NFT creation contract and the digital identification (for example, token ID) of the target NFT in the NFT creation contract. Of course, the relevant information of the NFT creation contract is not limited to this. For example, the relevant information of the NFT creation contract may not include the digital identification of the target NFT in the NFT creation contract, but include the identification information (token) of the target NFT, that is, the target NFT itself. token value, etc.
证书NFT创建单元904可调用证书创建合约以基于第二标识信息创建证书NFT,其中,证书创建合约是与证书验证合约对应的合约。具体地说,证书NFT创建单元904可通过证书创建合约对第二标识信息生成一个用于标识第二标识信息的标识信息(例如,token),生成的这个标识信息就是证书NFT。在证书NFT创建完成后,证书NFT创建单元904可通过证书创建合约将证书NFT存入NFT创造人账户中。The certificate NFT creation unit 904 may call a certificate creation contract to create a certificate NFT based on the second identification information, where the certificate creation contract is a contract corresponding to the certificate verification contract. Specifically, the certificate NFT creation unit 904 can generate identification information (for example, token) for identifying the second identification information through the certificate creation contract, and the generated identification information is the certificate NFT. After the creation of the certificate NFT is completed, the certificate NFT creation unit 904 can deposit the certificate NFT into the NFT creator's account through the certificate creation contract.
根据本公开的示例性实施例,证书NFT创建单元904可通过证书创建合约在创建证书NFT之前,先对证书NFT的元数据进行验证,在证书NFT的元数据被验证正确无误后,才使用第二标识信息创建证书NFT,从而保证创建的证书NFT确为目标NFT的证书NFT。According to an exemplary embodiment of the present disclosure, the certificate NFT creation unit 904 can first verify the metadata of the certificate NFT before creating the certificate NFT through the certificate creation contract. After the metadata of the certificate NFT is verified to be correct, the third certificate NFT can be used. Use the second identification information to create a certificate NFT, thereby ensuring that the created certificate NFT is indeed the certificate NFT of the target NFT.
根据本公开的示例性实施例,证书NFT创建单元904可对与证书NFT的元数据相关的至少一项数据进行验证,并在验每一项数据都被验证正确的情况下,则证书NFT的元数据被验证正确,从而开始创建证书NFT。一旦有验证的数据不正确,则终止创建证书NFT。例如,证书NFT创建单元904可验证证书验证合约的地址、第二标识信息和证书NFT创造人中的至少一项。根据本公开的示例性实施例,证书NFT创建单元904可验证证书NFT的元数据中的证书验证合约的地址是否正确,从而防止证书NFT错误创建或创建后的证书NFT无法用于验证。这是因为如果证书NFT的元数据中的证书验证合约的地址不正确,则说明该证书验证合约与创建证书NFT的证书创建合约不对应,这将导致证书NFT错误创建或创建后的证书NFT无法用于验证。可通过第三方预言机,基于证书NFT的元数据对应的第二标识信息查询存储证书NFT的元数据的区块链,来获得证书NFT的元数据中的证书验证合约的地址。在获取到证书NFT的元数据中的证书验证合约的地址后,可基于实际证书验证合约的地址,验证证书NFT的元数据中的证书验证合约的地址的正确性。由于证书创建合约和证书验证合约为一对合约,因此,证书创建合约可确定实际证书验证合约的地址,即,实际证书验证合约的地址通过证书创建合约的地址确定。例如,在证书NFT的元数据中的证书验证合约的地址与实际证书验证合约的地址一致的情况下,则确定证书NFT的元数据中的证书验证合约的地址正确。否则,确定证书NFT的元数据中的证书验证合约的地址错误,并终止创建证书NFT。According to an exemplary embodiment of the present disclosure, the certificate NFT creation unit 904 may verify at least one piece of data related to the metadata of the certificate NFT, and if each item of data is verified to be correct, then the certificate NFT The metadata is verified to be correct, thus starting the creation of the certificate NFT. Once the verified data is incorrect, the creation of the certificate NFT will be terminated. For example, the certificate NFT creation unit 904 may verify at least one of the address of the certificate verification contract, the second identification information, and the certificate NFT creator. According to an exemplary embodiment of the present disclosure, the certificate NFT creation unit 904 may verify whether the address of the certificate verification contract in the metadata of the certificate NFT is correct, thereby preventing the certificate NFT from being created incorrectly or the created certificate NFT from being unavailable for verification. This is because if the address of the certificate verification contract in the metadata of the certificate NFT is incorrect, it means that the certificate verification contract does not correspond to the certificate creation contract that created the certificate NFT, which will cause the certificate NFT to be incorrectly created or the certificate NFT after creation cannot for verification. The address of the certificate verification contract in the metadata of the certificate NFT can be obtained by querying the blockchain that stores the metadata of the certificate NFT based on the second identification information corresponding to the metadata of the certificate NFT through a third-party oracle. After obtaining the address of the certificate verification contract in the metadata of the certificate NFT, the correctness of the address of the certificate verification contract in the metadata of the certificate NFT can be verified based on the address of the actual certificate verification contract. Since the certificate creation contract and the certificate verification contract are a pair of contracts, the certificate creation contract can determine the address of the actual certificate verification contract, that is, the address of the actual certificate verification contract is determined by the address of the certificate creation contract. For example, if the address of the certificate verification contract in the metadata of the certificate NFT is consistent with the address of the actual certificate verification contract, it is determined that the address of the certificate verification contract in the metadata of the certificate NFT is correct. Otherwise, it is determined that the address of the certificate verification contract in the metadata of the certificate NFT is wrong, and the creation of the certificate NFT is terminated.
根据本公开的示例性实施例,证书NFT创建单元404可验证证书NFT的元数据对应的第二标识是否在证书创建合约中被使用过,从而防止一个证书NFT对应多个NFT标的的情况。这是因为如果第二标识信息在证书创建合约中已被使用过,则说明该证书NFT已对应其它NFT标的,这将导致证书NFT对应多个NFT标的,丧失验证可靠性。也就是说,证书NFT的元数据应该对应一个唯一标识信息,因此可在证书创建合约的创建记录 中查询第二标识信息是否在证书创建合约之前的创建中使用过,如果确定第二标识信息未被使用过,则确定第二标识信息正确。否则,确定第二标识信息错误,并终止创建证书NFT。According to an exemplary embodiment of the present disclosure, the certificate NFT creation unit 404 can verify whether the second identity corresponding to the metadata of the certificate NFT has been used in the certificate creation contract, thereby preventing one certificate NFT from corresponding to multiple NFT objects. This is because if the second identification information has been used in the certificate creation contract, it means that the certificate NFT has already corresponded to other NFT objects, which will cause the certificate NFT to correspond to multiple NFT objects and lose verification reliability. In other words, the metadata of the certificate NFT should correspond to a unique identification information, so it can be recorded in the creation record of the certificate creation contract. Query whether the second identification information has been used in the creation of the certificate creation contract before. If it is determined that the second identification information has not been used, it is determined that the second identification information is correct. Otherwise, it is determined that the second identification information is incorrect, and the creation of the certificate NFT is terminated.
根据本公开的示例性实施例,证书NFT创建单元904可验证证书NFT创造人是否正确,即,验证证书NFT创造人是否是NFT创造人(即,目标NFT的创造人)本人,从而防止非NFT创造人伪造证书NFT。这是因此目标NFT的创造人和证书NFT的创造人应该是同一人(即,NFT创造人),否则可能存在非NFT创造人伪造证书NFT的情况。根据本公开的示例性实施例,证书NFT创建单元904可通过验证(1)证书NFT创建账户地址是否是当前证书NFT创造人本人的账户地址以及(2)证书NFT创建账户地址是否是NFT创造人的账户地址,来验证证书NFT创造人是否是NFT创造人本人。如果以上两项都验证通过,则确定证书NFT创造人是NFT创造人本人,否则,确定证书NFT创造人不是NFT创造人本人,并终止创建证书NFT。因此,可通过验证证书NFT创建账户地址的正确性以及证书NFT的元数据中的NFT创造人公钥与证书NFT创建账户地址的一致性,验证证书NFT创建人的正确性。According to an exemplary embodiment of the present disclosure, the certificate NFT creation unit 904 may verify whether the certificate NFT creator is correct, that is, verify whether the certificate NFT creator is the NFT creator (ie, the creator of the target NFT) himself, thereby preventing non-NFT Create a fake certificate NFT. This is why the creator of the target NFT and the creator of the certificate NFT should be the same person (i.e., the NFT creator), otherwise there may be a situation where a non-NFT creator forges the certificate NFT. According to an exemplary embodiment of the present disclosure, the certificate NFT creation unit 904 can verify (1) whether the certificate NFT creation account address is the account address of the current certificate NFT creator and (2) whether the certificate NFT creation account address is the NFT creator's account address. Account address to verify whether the NFT creator of the certificate is the NFT creator himself. If both of the above verifications are passed, it is determined that the creator of the certificate NFT is the NFT creator himself. Otherwise, it is determined that the creator of the certificate NFT is not the NFT creator himself, and the creation of the certificate NFT is terminated. Therefore, the correctness of the creator of the certificate NFT can be verified by verifying the correctness of the account address created by the certificate NFT and the consistency of the NFT creator's public key in the metadata of the certificate NFT and the address of the account created by the certificate NFT.
例如,可通过非对称加密的方式(例如,证书NFT创建账户私钥签名且证书创建合约公钥解密的方式),确定证书NFT创建账户地址是否是证书NFT创建人的账户地址。在确定证书NFT创建账户地址是证书NFT创造人的账户地址的情况下,基于证书NFT的元数据中的NFT创造人公钥推导出NFT创造人账户地址,并验证推导出的NFT创造人账户地址与证书NFT创建账户地址的一致性;在确定推导出的NFT创造人账户地址与证书NFT创建账户地址一致的情况下,确定证书NFT创造人正确,否则,确定证书NFT创造人错误。For example, it can be determined whether the account address of the certificate NFT creation account is the account address of the certificate NFT creator through asymmetric encryption (for example, the private key of the certificate NFT creation account is signed and the certificate creation contract public key is decrypted). When it is determined that the certificate NFT creation account address is the account address of the certificate NFT creator, the NFT creator account address is derived based on the NFT creator's public key in the metadata of the certificate NFT, and the derived NFT creator account address is verified. Consistency with the account address created by the certificate NFT; when it is determined that the deduced NFT creator account address is consistent with the account address created by the certificate NFT, it is determined that the creator of the certificate NFT is correct; otherwise, it is determined that the creator of the certificate NFT is wrong.
当然,本公开不限于上述验证证书NFT的元数据的正确性的过程,还可利用任何可能的方法或数据来验证证书NFT的元数据的正确性。Of course, the present disclosure is not limited to the above-mentioned process of verifying the correctness of the metadata of the certificate NFT. Any possible method or data can also be used to verify the correctness of the metadata of the certificate NFT.
图10是示出根据本公开的示例性实施例的数据验证装置的框图。FIG. 10 is a block diagram illustrating a data verification device according to an exemplary embodiment of the present disclosure.
参照图10,根据本公开的示例性实施例的数据验证装置1000可包括目标NFT验证单元1001和验证结果输出单元1002。Referring to FIG. 10 , a data verification device 1000 according to an exemplary embodiment of the present disclosure may include a target NFT verification unit 1001 and a verification result output unit 1002.
目标NFT验证单元1001可调用证书验证合约以基于目标NFT的元数据和与目标NFT关联的证书NFT的元数据对目标NFT进行验证。验证结果输出单元1002可输出验证结果。The target NFT verification unit 1001 may call the certificate verification contract to verify the target NFT based on the metadata of the target NFT and the metadata of the certificate NFT associated with the target NFT. The verification result output unit 1002 may output the verification result.
根据本公开的示例性实施例,目标NFT验证单元1001可将NFT创建合约的相关信息输入证书验证合约,并通过证书验证合约,基于NFT创建合约的相关信息,获取目标NFT的元数据和证书NFT的元数据。这里,NFT创建合约的相关信息是指与NFT创建合约创建目标NFT的事件相关的信息。例如,NFT创建合约的相关信息可包括,但不限于,NFT创建合约的地址以及目标NFT在NFT创建合约中的数字标识(例如,token ID)。本公开对NFT创建合约的相关信息的内容不作限制,例如,NFT创建合约的相关信息还可包括目标NFT对应的标识信息或者目标NFT的标的对应的标识信息等,或者也可用这些标识信息来代替数字标识。根据本公开的示例性实施例,目标NFT验证单元1001可通过证书验证合约与第三方预言机(例如,Chainlink预言机网络)通信,利用第三方预言机基于NFT创建合约的相关信息,从存储目标NFT的元数据的区块链(例如,IPFS、AR等)获取目标NFT的元数据。目标NFT验证单元1001可通过证书验证合约与第三方预 言机(例如,Chainlink预言机网络)通信,利用第三方预言机基于所述第二标识信息,从存储证书NFT的元数据的区块链获取证书NFT的元数据。According to an exemplary embodiment of the present disclosure, the target NFT verification unit 1001 can input the relevant information of the NFT creation contract into the certificate verification contract, and obtain the metadata and certificate NFT of the target NFT based on the relevant information of the NFT creation contract through the certificate verification contract. metadata. Here, the information related to the NFT creation contract refers to the information related to the event that the NFT creation contract creates the target NFT. For example, the relevant information of the NFT creation contract may include, but is not limited to, the address of the NFT creation contract and the digital identification (for example, token ID) of the target NFT in the NFT creation contract. This disclosure does not limit the content of the relevant information of the NFT creation contract. For example, the relevant information of the NFT creation contract may also include identification information corresponding to the target NFT or identification information corresponding to the subject of the target NFT, etc., or these identification information may be used instead. Digital ID. According to an exemplary embodiment of the present disclosure, the target NFT verification unit 1001 can communicate with a third-party oracle (for example, Chainlink oracle network) through a certificate verification contract, and use the third-party oracle to create relevant information of the contract based on the NFT, from storing the target The blockchain of the NFT's metadata (e.g., IPFS, AR, etc.) obtains the metadata of the target NFT. The target NFT verification unit 1001 can verify the contract with a third party through the certificate verification contract. The third-party oracle communicates with the oracle (for example, the Chainlink oracle network), and uses a third-party oracle to obtain the metadata of the certificate NFT from the blockchain that stores the metadata of the certificate NFT based on the second identification information.
根据本公开的示例性实施例,目标NFT验证单元1001可基于NFT创建合约的相关信息,从证书创建合约中获取证书NFT的元数据对应的标识信息,即,第二标识信息;并通过第三方预言机,基于第二标识信息,从存储证书NFT的元数据的区块链(例如,IPFS、AR等)获取证书NFT的元数据。According to an exemplary embodiment of the present disclosure, the target NFT verification unit 1001 can obtain the identification information corresponding to the metadata of the certificate NFT from the certificate creation contract, that is, the second identification information, based on the relevant information of the NFT creation contract; and through a third party The oracle, based on the second identification information, obtains the metadata of the certificate NFT from the blockchain (for example, IPFS, AR, etc.) that stores the metadata of the certificate NFT.
根据本公开的示例性实施例,目标NFT验证单元1001可对目标NFT的元数据中的至少一项数据和证书NFT的元数据中的至少一项数据分别进行验证,验证过的每一项数据都正确,则可确定目标NFT是真的,即,可确定目标NFT是由目标NFT元数据上交易记录的NFT创造人创建或授权创建的,并验证结果输出单元1102可输出指示目标NFT真实的验证结果。一旦检测出有一项数据不正确,则目标NFT验证单元1101可确定目标NFT由他人伪造,并验证结果输出单元1102可输出指示目标NFT的真实性存在风险的提示。According to an exemplary embodiment of the present disclosure, the target NFT verification unit 1001 may separately verify at least one item of data in the metadata of the target NFT and at least one item of data in the metadata of the certificate NFT. Each item of data that has been verified are correct, then it can be determined that the target NFT is authentic, that is, it can be determined that the target NFT is created or authorized to be created by the NFT creator of the transaction record on the target NFT metadata, and the verification result output unit 1102 can output an indication indicating that the target NFT is authentic. Validation results. Once it is detected that an item of data is incorrect, the target NFT verification unit 1101 may determine that the target NFT is forged by others, and the verification result output unit 1102 may output a prompt indicating that the authenticity of the target NFT is at risk.
根据本公开的示例性实施例,目标NFT验证单元1001可基于目标NFT的元数据对目标NFT进行第一验证;在第一验证通过的情况下,基于证书NFT的元数据对目标NFT进行第二验证。According to an exemplary embodiment of the present disclosure, the target NFT verification unit 1001 may perform a first verification on the target NFT based on the metadata of the target NFT; if the first verification is passed, perform a second verification on the target NFT based on the metadata of the certificate NFT. verify.
根据本公开的示例性实施例,目标NFT验证单元1001执行的第一验证可包括对目标NFT的元数据中的至少一项数据分别进行验证,若至少一项数据的验证结果中有结果为不通过,验证结果输出单元1002输出指示目标NFT的真实性存在风险的验证结果。According to an exemplary embodiment of the present disclosure, the first verification performed by the target NFT verification unit 1001 may include separately verifying at least one item of data in the metadata of the target NFT, if any of the verification results of the at least one item of data is incorrect. Pass, the verification result output unit 1002 outputs a verification result indicating that the authenticity of the target NFT is at risk.
例如,目标NFT验证单元1001执行的第一验证所验证的数据可包括,但不限于,以下项中的至少一项:目标NFT的元数据中的证书验证合约的地址和目标NFT的元数据中的NFT创造人账户地址。(1)目标NFT验证单元1001验证目标NFT的元数据中的证书验证合约的地址与被调用的证书验证合约的地址的一致性。若目标NFT的元数据中的证书验证合约的地址与被调用的证书验证合约的地址一致,说明目标NFT的元数据中的证书验证合约的地址正确,则目标NFT的元数据中的证书验证合约的地址的验证结果为通过。如果不一致,说明目标NFT的元数据中的证书验证合约的地址不正确,则目标NFT的元数据中的证书验证合约的地址的验证结果为不通过,并验证结果输出单元1002输出目标NFT的真实性存在风险的验证结果。(2)目标NFT验证单元1001验证目标NFT的元数据中的NFT创造人账户地址与交易记录中的NFT创造人账户地址(即,交易记录中的创造记录中的“to”指向的地址)的一致性。若目标NFT的元数据中的NFT创造人账户地址与交易记录中的NFT创造人账户地址一致,说明目标NFT的元数据中的NFT创造人账户地址正确,则目标NFT的元数据中的NFT创造人账户地址的验证结果为通过。如果不一致,说明目标NFT的元数据中的NFT创造人账户地址不正确,则目标NFT的元数据中的NFT创造人账户地址的验证结果为不通过,并验证结果输出单元1002输出目标NFT的真实性存在风险的验证结果。本公开的第一验证不限于上述验证过程,还可根据需要或设置包括对目标NFT的元数据中的其它数据的验证过程。For example, the data verified by the first verification performed by the target NFT verification unit 1001 may include, but is not limited to, at least one of the following items: the address of the certificate verification contract in the metadata of the target NFT and the metadata of the target NFT. The NFT creator’s account address. (1) The target NFT verification unit 1001 verifies the consistency of the address of the certificate verification contract in the metadata of the target NFT and the address of the called certificate verification contract. If the address of the certificate verification contract in the metadata of the target NFT is consistent with the address of the called certificate verification contract, it means that the address of the certificate verification contract in the metadata of the target NFT is correct, then the address of the certificate verification contract in the metadata of the target NFT is correct. The verification result of the address is passed. If they are inconsistent, it means that the address of the certificate verification contract in the metadata of the target NFT is incorrect, and the verification result of the address of the certificate verification contract in the metadata of the target NFT is failed, and the verification result output unit 1002 outputs the true address of the target NFT. Verification results of sexual risks. (2) The target NFT verification unit 1001 verifies the difference between the NFT creator account address in the metadata of the target NFT and the NFT creator account address in the transaction record (that is, the address pointed to by "to" in the creation record in the transaction record). consistency. If the NFT creator account address in the metadata of the target NFT is consistent with the NFT creator account address in the transaction record, it means that the NFT creator account address in the metadata of the target NFT is correct, then the NFT creator account address in the metadata of the target NFT is correct. The verification result of the personal account address is passed. If they are inconsistent, it means that the NFT creator account address in the metadata of the target NFT is incorrect, and the verification result of the NFT creator account address in the metadata of the target NFT is failed, and the verification result output unit 1002 outputs the true identity of the target NFT. Verification results of sexual risks. The first verification of the present disclosure is not limited to the above-mentioned verification process, and may also include verification processes for other data in the metadata of the target NFT as needed or set.
根据本公开的示例性实施例,目标NFT验证单元1001执行的第二验证可包括对证书NFT的元数据中的至少一项数据分别进行验证,若至少一项数据的验证结果中有一项数据的验证结果为不通过,验证结果输出单元1002输出指示目标NFT的真实性存在风险的验 证结果。According to an exemplary embodiment of the present disclosure, the second verification performed by the target NFT verification unit 1001 may include separately verifying at least one item of data in the metadata of the certificate NFT. If one of the verification results of the at least one item of data is The verification result is failed, and the verification result output unit 1002 outputs a verification indicating that the authenticity of the target NFT is at risk. Verify the results.
例如,目标NFT验证单元1001执行的第二验证所验证的数据可包括,但不限于,以下项中的至少一项:NFT创造人公钥、NFT创造人签名、NFT创造人签名到期时间、NFT标的地址、NFT创建合约地址和证书验证合约的地址。(1)目标NFT验证单元1001基于证书NFT的元数据中的NFT创造人公钥得到NFT创造人账户地址,并验证得到的NFT创造人账户地址与目标NFT的元数据中的NFT创造人账户地址的一致性,以判断证书NFT上的公钥是否是NFT创造人的。这里,NFT创造人公钥的哈希值可为推导NFT创造人账户地址,因此,可通过对NFT创造人公钥进行哈希推导得到NFT创造人账户地址。若得到的NFT创造人账户地址与目标NFT的元数据中的NFT创造人账户地址一致,说明证书NFT上的公钥是NFT创造人的,则确定所述证书NFT的元数据中的NFT创造人公钥的验证结果为通过通过。如果不一致,说明证书NFT上的公钥不是NFT创造人的,则确定所述证书NFT的元数据中的NFT创造人公钥的验证结果为不通过,验证结果输出单元1002输出目标NFT的真实性存在风险的验证结果。(2)目标NFT验证单元1001使用证书NFT的元数据中的NFT创造人公钥对证书NFT的元数据中的NFT创造人签名进行解密,并验证解密后得到的数据与证书信息数据中除NFT创造人签名之外的其它证书信息数据的一致性(例如,将解密后得到的数据与其它证书信息数据进行逐项对比),以验证证书NFT的元数据是否是NFT创造人授权过的。若解密后每一项数据都与其它证书信息数据中的对应项数据一致,说明证书NFT的元数据是NFT创造人授权过的,则证书NFT的元数据中的NFT创造人签名的验证结果为通过。如果不一致,否则,说明证书NFT的元数据不是NFT创造人授权过的,则证书NFT的元数据中的NFT创造人签名的验证结果为不通过,验证结果输出单元1002输出目标NFT的真实性存在风险的验证结果。(3)目标NFT验证单元1001验证证书NFT的元数据中的NFT创造人签名到期时间与目标NFT的创建时间或上链时间的匹配性,以验证是否有过期创建的情况。当NFT创建合约完成目标NFT的创建后,在区块链上记录与创建时间或上链时间相关的信息,若创建时间或上链时间是在NFT创造人签名到期时间之内,即,两者匹配,则说明目标NFT是在NFT创造人授权的有效时间内创建,因此目标NFT的创建是NFT创造人授权的,验证通过。若创建时间或上链时间超过在NFT创造人签名到期时间,即,两者不匹配,则说明目标NFT是在NFT创造人授权的有效时间之外创建,因此目标NFT的创建不是NFT创造人授权的,则证书NFT的元数据中的NFT创造人签名到期时间的验证结果为不通过,验证结果输出单元1002输出目标NFT的真实性存在风险的验证结果。(4)目标NFT验证单元1001验证证书NFT的元数据中的NFT标的地址与目标NFT的元数据中的NFT标的地址的一致性,以验证证书NFT对应的NFT标的是否正确。若证书NFT的元数据中的NFT标的地址与目标NFT的元数据中的NFT标的地址一致,说明证书NFT对应的NFT标的正确,则证书NFT的元数据中的NFT标的地址的验证结果为通过。如果不一致,说明证书NFT对应的NFT标的不正确,则证书NFT的元数据中的NFT标的地址的验证结果为不通过,验证结果输出单元1002输出目标NFT的真实性存在风险的验证结果。(5)目标NFT验证单元1001验证证书NFT的元数据中的NFT创建合约地址与目标NFT的元数据中的NFT创建合约地址的一致性,以验证验证证书NFT对应的目标NFT是否由NFT创建合约创建。若证书NFT的元数据中的NFT创建合约地址与目标NFT的元数据 中的NFT创建合约地址一致,说明验证证书NFT对应的目标NFT是由NFT创建合约创建,则证书NFT的元数据中的NFT创建合约地址的验证结果为通过。如果不一致,说明验证证书NFT对应的目标NFT不是由NFT创建合约创建,则证书NFT的元数据中的NFT创建合约地址的验证结果为不通过,,验证结果输出单元1002输出目标NFT的真实性存在风险的验证结果。(6)目标NFT验证单元1001验证证书NFT的元数据中的证书验证合约的地址与目标NFT的元数据中的证书验证合约的地址的一致性,以验证证书NFT是否由目标NFT指定的证书验证合约来进行验证。若证书NFT的元数据中的证书验证合约的地址与目标NFT的元数据中的证书验证合约的地址一致,说明证书NFT是由目标NFT指定的证书验证合约来进行验证,则证书NFT的元数据中的证书验证合约的地址的验证结果为通过。如果不一致,说明证书NFT不是由目标NFT指定的证书验证合约来进行验证,则证书NFT的元数据中的证书验证合约的地址的验证结果为不通过,验证结果输出单元1002输出目标NFT的真实性存在风险的验证结果。本公开的第一验证不限于上述验证过程,还可根据需要或设置,跳过上述部分验证过程(例如,用户发起验证时传入NFT标的地址,则需要执行验证(4),否则可不执行验证(4)),或者增加对证书NFT的元数据中的其它数据的验证过程。For example, the data verified by the second verification performed by the target NFT verification unit 1001 may include, but is not limited to, at least one of the following items: NFT creator public key, NFT creator signature, NFT creator signature expiration time, NFT target address, NFT creation contract address and certificate verification contract address. (1) The target NFT verification unit 1001 obtains the NFT creator's account address based on the NFT creator's public key in the metadata of the certificate NFT, and verifies the obtained NFT creator's account address and the NFT creator's account address in the metadata of the target NFT. consistency to determine whether the public key on the certificate NFT belongs to the NFT creator. Here, the hash value of the NFT creator's public key can be used to derive the NFT creator's account address. Therefore, the NFT creator's account address can be obtained by hashing the NFT creator's public key. If the obtained NFT creator account address is consistent with the NFT creator account address in the metadata of the target NFT, it means that the public key on the certificate NFT belongs to the NFT creator, then determine the NFT creator in the metadata of the certificate NFT. The verification result of the public key is passed. If they are inconsistent, it means that the public key on the certificate NFT does not belong to the NFT creator, then it is determined that the verification result of the NFT creator's public key in the metadata of the certificate NFT is failed, and the verification result output unit 1002 outputs the authenticity of the target NFT. Risky verification results. (2) The target NFT verification unit 1001 uses the NFT creator's public key in the metadata of the certificate NFT to decrypt the NFT creator's signature in the metadata of the certificate NFT, and verifies that the decrypted data is the same as the certificate information except the NFT. The consistency of other certificate information data other than the creator's signature (for example, comparing the decrypted data with other certificate information data one by one) to verify whether the metadata of the certificate NFT is authorized by the NFT creator. If each item of data after decryption is consistent with the corresponding data in other certificate information data, it means that the metadata of the certificate NFT is authorized by the NFT creator, and the verification result of the NFT creator's signature in the metadata of the certificate NFT is pass. If it is inconsistent, otherwise, it means that the metadata of the certificate NFT is not authorized by the NFT creator, then the verification result of the NFT creator's signature in the metadata of the certificate NFT is failed, and the verification result output unit 1002 outputs the authenticity of the target NFT. Risk verification results. (3) The target NFT verification unit 1001 verifies the match between the expiration time of the NFT creator's signature in the metadata of the certificate NFT and the creation time or on-chain time of the target NFT to verify whether there is an expired creation. After the NFT creation contract completes the creation of the target NFT, the information related to the creation time or the uploading time is recorded on the blockchain. If the creation time or uploading time is within the expiration time of the NFT creator's signature, that is, both If they match, it means that the target NFT was created within the validity period authorized by the NFT creator. Therefore, the creation of the target NFT was authorized by the NFT creator and the verification passed. If the creation time or on-chain time exceeds the expiration time of the NFT creator's signature, that is, the two do not match, it means that the target NFT was created outside the valid time authorized by the NFT creator, so the target NFT was not created by the NFT creator. authorized, then the verification result of the NFT creator's signature expiration time in the metadata of the certificate NFT is failed, and the verification result output unit 1002 outputs the verification result that the authenticity of the target NFT is at risk. (4) The target NFT verification unit 1001 verifies the consistency of the NFT target address in the metadata of the certificate NFT and the NFT target address in the metadata of the target NFT to verify whether the NFT target corresponding to the certificate NFT is correct. If the NFT target address in the metadata of the certificate NFT is consistent with the NFT target address in the metadata of the target NFT, it means that the NFT target corresponding to the certificate NFT is correct, and the verification result of the NFT target address in the metadata of the certificate NFT is passed. If they are inconsistent, it means that the NFT target corresponding to the certificate NFT is incorrect, and the verification result of the NFT target address in the metadata of the certificate NFT is failed, and the verification result output unit 1002 outputs the verification result that the authenticity of the target NFT is at risk. (5) The target NFT verification unit 1001 verifies the consistency of the NFT creation contract address in the metadata of the certificate NFT and the NFT creation contract address in the metadata of the target NFT to verify whether the target NFT corresponding to the verification certificate NFT is created by the NFT contract. create. If the NFT creation contract address in the metadata of the certificate NFT is the same as the metadata of the target NFT The NFT creation contract addresses in are consistent, indicating that the target NFT corresponding to the verification certificate NFT is created by the NFT creation contract, and the verification result of the NFT creation contract address in the metadata of the certificate NFT is passed. If they are inconsistent, it means that the target NFT corresponding to the verification certificate NFT is not created by the NFT creation contract, and the verification result of the NFT creation contract address in the metadata of the certificate NFT is failed, and the verification result output unit 1002 outputs the authenticity of the target NFT. Risk verification results. (6) The target NFT verification unit 1001 verifies the consistency of the address of the certificate verification contract in the metadata of the certificate NFT and the address of the certificate verification contract in the metadata of the target NFT to verify whether the certificate NFT is verified by the certificate specified by the target NFT. contract for verification. If the address of the certificate verification contract in the metadata of the certificate NFT is consistent with the address of the certificate verification contract in the metadata of the target NFT, it means that the certificate NFT is verified by the certificate verification contract specified by the target NFT, then the metadata of the certificate NFT The verification result of the address of the certificate verification contract is passed. If they are inconsistent, it means that the certificate NFT is not verified by the certificate verification contract specified by the target NFT. The verification result of the address of the certificate verification contract in the metadata of the certificate NFT is failed, and the verification result output unit 1002 outputs the authenticity of the target NFT. Risky verification results. The first verification of the present disclosure is not limited to the above-mentioned verification process. Part of the above-mentioned verification process can also be skipped according to needs or settings (for example, if the user passes in the address of the NFT target when initiating verification, verification (4) needs to be performed, otherwise verification may not be performed. (4)), or add a verification process for other data in the metadata of the certificate NFT.
图11是根据本公开的示例性实施例的电子设备1100的框图。FIG. 11 is a block diagram of an electronic device 1100 according to an exemplary embodiment of the present disclosure.
参照图11,电子设备11包括至少一个存储器1101和至少一个处理器1102,所述至少一个存储器1101中存储有计算机可执行指令集合,当计算机可执行指令集合被至少一个处理器1102执行时,执行根据本公开的示例性实施例的数据处理方法和数据验证方法。Referring to Figure 11, the electronic device 11 includes at least one memory 1101 and at least one processor 1102. A set of computer-executable instructions is stored in the at least one memory 1101. When the set of computer-executable instructions is executed by the at least one processor 1102, execution Data processing method and data verification method according to exemplary embodiments of the present disclosure.
作为示例,电子设备1100可以是PC计算机、平板装置、个人数字助理、智能手机、或其他能够执行上述指令集合的装置。这里,电子设备1100并非必须是单个的电子设备,还可以是任何能够单独或联合执行上述指令(或指令集)的装置或电路的集合体。电子设备1100还可以是集成控制系统或系统管理器的一部分,或者可被配置为与本地或远程(例如,经由无线传输)以接口互联的便携式电子设备。As an example, the electronic device 1100 may be a PC computer, a tablet device, a personal digital assistant, a smartphone, or other device capable of executing the above set of instructions. Here, the electronic device 1100 does not have to be a single electronic device, but can also be any collection of devices or circuits that can execute the above instructions (or instruction set) individually or jointly. Electronic device 1100 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that interfaces locally or remotely (eg, via wireless transmission).
在电子设备1100中,处理器1102可包括中央处理器(Central Processing Unit,CPU)、图形处理器(Graphics Processing Unit,GPU)、可编程逻辑装置、专用处理器系统、微控制器或微处理器。作为示例而非限制,处理器还可包括模拟处理器、数字处理器、微处理器、多核处理器、处理器阵列、网络处理器等。In the electronic device 1100, the processor 1102 may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller or a microprocessor . By way of example and not limitation, processors may also include analog processors, digital processors, microprocessors, multi-core processors, processor arrays, network processors, and the like.
处理器1102可运行存储在存储器1101中的指令或代码,其中,存储器1101还可以存储数据。指令和数据还可经由网络接口装置而通过网络被发送和接收,其中,网络接口装置可采用任何已知的传输协议。Processor 1102 may execute instructions or code stored in memory 1101 , where memory 1101 may also store data. Instructions and data may also be sent and received over the network via network interface devices, which may employ any known transport protocol.
存储器1101可与处理器1102集成为一体,例如,将随机存取存储器(Random Access Memory,RAM)或闪存布置在集成电路微处理器等之内。此外,存储器1101可包括独立的装置,诸如,外部盘驱动、存储阵列或任何数据库系统可使用的其他存储装置。存储器1101和处理器1102可在操作上进行耦合,或者可例如通过I/O端口、网络连接等互相通信,使得处理器1102能够读取存储在存储器中的文件。The memory 1101 can be integrated with the processor 1102, for example, random access memory (Random Access Memory, RAM) or flash memory is arranged in an integrated circuit microprocessor or the like. Additionally, memory 1101 may include a stand-alone device, such as an external disk drive, storage array, or any other storage device that may be used by a database system. Memory 1101 and processor 1102 may be operatively coupled or may communicate with each other, such as through an I/O port, a network connection, or the like, enabling processor 1102 to read files stored in memory.
此外,电子设备1100还可包括视频显示器(诸如,液晶显示器)和用户交互接口(诸如,键盘、鼠标、触摸输入装置等)。电子设备1100的所有组件可经由总线和/或网络而彼此连接。 Additionally, electronic device 1100 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). All components of electronic device 1100 may be connected to each other via buses and/or networks.
根据本公开的示例性实施例,还可提供一种存储指令的计算机可读存储介质,其中,当指令被至少一个处理器运行时,促使至少一个处理器执行根据本公开的数据处理方法和数据验证方法。这里的计算机可读存储介质的示例包括:只读存储器(Non-volatile memory,ROM)、随机存取可编程只读存储器(Programmable ROM,PROM)、电可擦除可编程只读存储器(Electrically Erasable ROM,EEPROM)、RAM、动态随机存取存储器(Dynamic RAM,DRAM)、静态随机存取存储器(Static RAM,SRAM)、闪存、非易失性存储器、只读光盘(Compact Disc ROM,CD-ROM)、CD-R、CD+R、CD-RW、CD+RW、数字视频光盘(Digital Video Disk,DVD-ROM)、DVD-R、DVD+R、DVD-RW、DVD+RW、DVD-RAM、蓝光只读存储器(Blu-ray Disc ROM,BD-ROM)、BD-R、BD-R LTH(Blue-ray low to high)、BD-RE(Blue-ray Re-Erasable)、蓝光或光盘存储器、硬盘驱动器(Hard Disk Drive,HDD)、固态硬盘(Solid State Drive,SSD)、卡式存储器(诸如,多媒体卡、安全数字(Secure Digital,SD)卡或极速数字(XD)卡)、磁带、软盘、磁光数据存储装置、光学数据存储装置、硬盘、固态盘以及任何其他装置,所述任何其他装置被配置为以非暂时性方式存储计算机程序以及任何相关联的数据、数据文件和数据结构并将所述计算机程序以及任何相关联的数据、数据文件和数据结构提供给处理器或计算机使得处理器或计算机能执行所述计算机程序。上述计算机可读存储介质中的计算机程序可在诸如客户端、主机、代理装置、服务器等计算机设备中部署的环境中运行,此外,在一个示例中,计算机程序以及任何相关联的数据、数据文件和数据结构分布在联网的计算机系统上,使得计算机程序以及任何相关联的数据、数据文件和数据结构通过一个或多个处理器或计算机以分布式方式存储、访问和执行。According to an exemplary embodiment of the present disclosure, a computer-readable storage medium storing instructions may also be provided, wherein when the instructions are executed by at least one processor, the at least one processor is caused to perform the data processing method and data according to the present disclosure. Authentication method. Examples of computer-readable storage media here include: Non-volatile memory (ROM), Random Access Programmable ROM (PROM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable ROM, EEPROM), RAM, Dynamic RAM (DRAM), Static RAM (SRAM), Flash memory, non-volatile memory, Compact Disc ROM (CD-ROM) ), CD-R, CD+R, CD-RW, CD+RW, Digital Video Disk (DVD-ROM), DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM , Blu-ray Disc ROM (BD-ROM), BD-R, BD-R LTH (Blue-ray low to high), BD-RE (Blue-ray Re-Erasable), Blu-ray or optical disc memory , Hard Disk Drive (HDD), Solid State Drive (SSD), card storage (such as multimedia card, Secure Digital (SD) card or Extreme Digital (XD) card), magnetic tape, Floppy disks, magneto-optical data storage devices, optical data storage devices, hard disks, solid state disks, and any other device configured to store a computer program and any associated data, data files and data structures in a non-transitory manner and providing the computer program and any associated data, data files and data structures to the processor or computer so that the processor or computer can execute the computer program. The computer program in the above computer-readable storage medium can run in an environment deployed in computer equipment such as a client, a host, a proxy device, a server, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed over networked computer systems such that computer programs and any associated data, data files and data structures are stored, accessed and executed in a distributed fashion by one or more processors or computers.
根据本公开的示例性实施例,还可提供一种计算机程序产品,该计算机程序产品中的指令可由计算机设备的处理器执行以完成根据本公开的示例性实施例的数据处理方法和数据验证方法。According to an exemplary embodiment of the present disclosure, a computer program product may also be provided, and instructions in the computer program product may be executed by a processor of a computer device to complete the data processing method and the data verification method according to the exemplary embodiment of the present disclosure. .
根据本公开的示例性实施例,还可提供一种计算机程序,该计算机程序可由计算机设备的处理器执行以实现根据本公开的示例性实施例的数据处理方法和数据验证方法。According to an exemplary embodiment of the present disclosure, a computer program may also be provided, and the computer program may be executed by a processor of a computer device to implement the data processing method and the data verification method according to the exemplary embodiment of the present disclosure.
根据本公开的数据处理方法和数据验证方法,可通过一对智能合约为目标NFT创建一个防伪的证书NFT,并利用证书NFT来对目标NFT的真实性进行验证,保证NFT创建过程的真实性,防止类似SleepMinting等的欺诈行为,保护NFT创造人和NFT收藏者的权益。According to the data processing method and data verification method of this disclosure, an anti-counterfeiting certificate NFT can be created for the target NFT through a pair of smart contracts, and the certificate NFT can be used to verify the authenticity of the target NFT to ensure the authenticity of the NFT creation process. Prevent fraud like SleepMinting and protect the rights and interests of NFT creators and NFT collectors.
本领域技术人员在考虑说明书及实践这里公开的技术方案后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the technical solutions disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the disclosure that follow the general principles of the disclosure and include common common sense or customary technical means in the technical field that are not disclosed in the disclosure. . It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。 It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the disclosure is limited only by the appended claims.

Claims (19)

  1. 一种数据处理方法,包括:A data processing method including:
    获取目标NFT的元数据对应的第一标识信息,所述第一标识信息是所述目标NFT的元数据存储至区块链之后得到的标识信息,其中,所述目标NFT的元数据包括与所述目标NFT关联的证书信息数据对应的标识信息、以及用于对所述目标NFT进行验证的证书验证合约的地址,所述证书信息数据对应的标识信息是所述证书信息数据存储至区块链之后得到的标识信息;Obtain the first identification information corresponding to the metadata of the target NFT. The first identification information is the identification information obtained after the metadata of the target NFT is stored in the blockchain, where the metadata of the target NFT includes information related to the target NFT. The identification information corresponding to the certificate information data associated with the target NFT and the address of the certificate verification contract used to verify the target NFT. The identification information corresponding to the certificate information data is the certificate information data stored in the blockchain. The identification information obtained later;
    调用NFT创建合约以基于所述第一标识信息创建所述目标NFT;Call the NFT creation contract to create the target NFT based on the first identification information;
    获取与所述目标NFT关联待创建的证书NFT的元数据对应的第二标识信息,其中,所述证书NFT的元数据包括所述NFT创建合约的相关信息以及所述证书信息数据,所述第二标识信息是所述证书NFT的元数据存储至区块链之后得到的标识信息;Obtain the second identification information corresponding to the metadata of the certificate NFT to be created associated with the target NFT, wherein the metadata of the certificate NFT includes relevant information of the NFT creation contract and the certificate information data, and the third The second identification information is the identification information obtained after the metadata of the certificate NFT is stored in the blockchain;
    调用证书创建合约以基于所述第二标识信息创建所述证书NFT,其中,所述证书创建合约与所述证书验证合约对应。A certificate creation contract is called to create the certificate NFT based on the second identification information, where the certificate creation contract corresponds to the certificate verification contract.
  2. 如权利要求1所述的方法,其中,所述证书信息数据包括由所述证书验证合约用于对所述目标NFT进行验证的数据。The method of claim 1, wherein the certificate information data includes data used by the certificate verification contract to verify the target NFT.
  3. 如权利要求2所述的方法,其中,所述证书信息数据包括以下项中的至少一项:NFT标的地址、所述NFT创建合约的地址、所述证书验证合约的地址、NFT创造人账户地址、NFT创造人公钥、NFT创造人签名和NFT创造人签名到期时间。The method of claim 2, wherein the certificate information data includes at least one of the following items: the address of the NFT target, the address of the NFT creation contract, the address of the certificate verification contract, and the NFT creator account address. , NFT creator’s public key, NFT creator’s signature, and NFT creator’s signature expiration time.
  4. 如权利要求1所述的方法,其中,所述NFT创建合约的相关信息包括所述NFT创建合约的地址以及所述目标NFT在所述NFT创建合约中的数字标识。The method of claim 1, wherein the relevant information of the NFT creation contract includes the address of the NFT creation contract and the digital identification of the target NFT in the NFT creation contract.
  5. 如权利要求1所述的方法,其中,所述基于所述第二标识信息创建所述证书NFT之前,所述方法还包括:The method of claim 1, wherein before creating the certificate NFT based on the second identification information, the method further includes:
    对所述证书NFT的元数据进行验证;Verify the metadata of the certificate NFT;
    其中,所述基于所述第二标识信息创建所述证书NFT,包括:Wherein, creating the certificate NFT based on the second identification information includes:
    在所述证书NFT的元数据被验证正确的情况下,基于所述第二标识信息创建所述证书NFT。When the metadata of the certificate NFT is verified to be correct, the certificate NFT is created based on the second identification information.
  6. 如权利要求5所述的方法,其中,所述对所述证书NFT的元数据进行验证,包括:The method of claim 5, wherein the verifying the metadata of the certificate NFT includes:
    对与所述证书NFT的元数据相关的至少一项数据进行验证;Verify at least one piece of data related to the metadata of the certificate NFT;
    在每一项数据都被验证正确的情况下,则所述证书NFT的元数据被验证正确;When every piece of data is verified to be correct, the metadata of the certificate NFT is verified to be correct;
    其中,所述至少一项数据包括以下项中的至少一项:所述证书验证合约的地址、所述第二标识信息和证书NFT创造人。Wherein, the at least one piece of data includes at least one of the following items: the address of the certificate verification contract, the second identification information and the creator of the certificate NFT.
  7. 如权利要求6所述的方法,其中,The method of claim 6, wherein,
    在所述至少一项数据包括所述证书验证合约的地址的情况下,所述对所述证书NFT的元数据进行验证,包括:In the case where the at least one piece of data includes the address of the certificate verification contract, the verification of the metadata of the certificate NFT includes:
    在所述证书验证合约的地址与实际证书验证合约的地址一致的情况下,则确定所述证书NFT的元数据中的证书验证合约的地址正确,其中,所述实际证书验证合约的地址通过所述证书创建合约的地址确定;When the address of the certificate verification contract is consistent with the address of the actual certificate verification contract, it is determined that the address of the certificate verification contract in the metadata of the certificate NFT is correct, wherein the address of the actual certificate verification contract passes through The address of the certificate creation contract is determined;
    其中,在所述至少一项数据包括所述第二标识信息的情况下,所述对所述证书 NFT的元数据进行验证,包括:Wherein, in the case where the at least one item of data includes the second identification information, the pair of certificates The NFT’s metadata is verified, including:
    确定所述第二标识信息在所述证书创建合约中是否被使用过;Determine whether the second identification information has been used in the certificate creation contract;
    在所述第二标识信息在所述证书创建合约中未被使用过的情况下,确定所述第二标识信息正确;If the second identification information has not been used in the certificate creation contract, determine that the second identification information is correct;
    其中,在所述至少一项数据包括所述证书NFT创造人的情况下,所述对所述证书NFT的元数据进行验证,包括:Wherein, in the case where the at least one piece of data includes the creator of the certificate NFT, the verification of the metadata of the certificate NFT includes:
    通过证书NFT创建账户私钥签名以及所述证书创建合约公钥解密的方式,确定证书NFT创建账户地址是否是所述证书NFT创造人的账户地址;Determine whether the account address created by the certificate NFT is the account address of the creator of the certificate NFT through the signature of the private key of the certificate NFT creation account and the decryption of the public key of the certificate creation contract;
    在确定所述证书NFT创建账户地址是所述证书NFT创造人的账户地址的情况下,基于所述证书NFT的元数据中的NFT创造人公钥得到的NFT创造人账户地址,并将所述NFT创造人账户地址与所述证书NFT创建账户地址进行比对;When it is determined that the certificate NFT creation account address is the account address of the certificate NFT creator, the NFT creator account address is obtained based on the NFT creator's public key in the metadata of the certificate NFT, and the Compare the NFT creator’s account address with the NFT creation account address of the certificate;
    在所述NFT创造人账户地址与所述证书NFT创建账户地址一致的情况下,确定所述证书NFT创造人正确。When the NFT creator's account address is consistent with the certificate NFT creation account address, it is determined that the certificate NFT creator is correct.
  8. 如权利要求1所述的方法,其中,包括:The method of claim 1, comprising:
    调用证书验证合约以基于所述目标NFT的元数据和与所述目标NFT关联的证书NFT的元数据对所述目标NFT进行验证;Calling a certificate verification contract to verify the target NFT based on the metadata of the target NFT and the metadata of the certificate NFT associated with the target NFT;
    输出验证结果。Output the verification results.
  9. 如权利要求8所述的方法,其中,所述基于目标NFT的元数据和与所述目标NFT关联的证书NFT的元数据对所述目标NFT进行验证,包括:The method of claim 8, wherein the verifying the target NFT based on metadata of the target NFT and metadata of the certificate NFT associated with the target NFT includes:
    基于所述目标NFT的元数据对所述目标NFT进行第一验证;Perform a first verification on the target NFT based on the metadata of the target NFT;
    在所述第一验证通过的情况下,基于所述证书NFT的元数据对所述目标NFT进行第二验证。If the first verification passes, a second verification is performed on the target NFT based on the metadata of the certificate NFT.
  10. 如权利要求9所述的方法,其中,所述第一验证包括:The method of claim 9, wherein the first verification includes:
    对所述目标NFT的元数据中的至少一项数据分别进行验证;Verify at least one piece of data in the metadata of the target NFT respectively;
    其中,所述输出验证结果,包括:Among them, the output verification results include:
    若所述至少一项数据的验证结果中有一项数据的验证结果为不通过,则输出指示所述目标NFT的真实性存在风险的验证结果。If the verification result of one of the at least one data is failed, a verification result indicating that the authenticity of the target NFT is at risk is output.
  11. 如权利要求10所述的方法,其中,所述至少一项数据包括所述目标NFT的元数据中的证书验证合约的地址和所述目标NFT的元数据中的NFT创造人账户地址,所述对所述目标NFT的元数据中的至少一项数据分别进行验证,包括:The method of claim 10, wherein the at least one piece of data includes an address of a certificate verification contract in the metadata of the target NFT and an NFT creator account address in the metadata of the target NFT, and Verify at least one piece of data in the metadata of the target NFT, including:
    若所述目标NFT的元数据中的证书验证合约的地址与被调用的证书验证合约的地址一致,则所述目标NFT的元数据中的证书验证合约的地址的验证结果为通过;If the address of the certificate verification contract in the metadata of the target NFT is consistent with the address of the called certificate verification contract, then the verification result of the address of the certificate verification contract in the metadata of the target NFT is passed;
    若所述目标NFT的元数据中的NFT创造人账户地址与交易记录中的NFT创造人账户地址一致,则所述目标NFT的元数据中的NFT创造人账户地址的验证结果为通过。If the NFT creator account address in the metadata of the target NFT is consistent with the NFT creator account address in the transaction record, the verification result of the NFT creator account address in the metadata of the target NFT is passed.
  12. 如权利要求9到11中的任一所述的方法,其中,所述第二验证包括:The method of any one of claims 9 to 11, wherein the second verification includes:
    对所述证书NFT的元数据中的至少一项数据分别进行验证;Verify at least one piece of data in the metadata of the certificate NFT respectively;
    其中,所述输出验证结果,包括:Among them, the output verification results include:
    若所述至少一项数据的验证结果中有一项数据的验证结果为不通过,则输出指示 所述目标NFT的真实性存在风险的验证结果。If the verification result of one piece of data among the verification results of the at least one piece of data is failed, the output instruction The authenticity of the target NFT is at risk.
  13. 如权利要求12所述的方法,其中,所述至少一项数据包括所述证书NFT的元数据中的NFT创造人公钥、NFT创造人签名、NFT创造人签名到期时间、NFT标的地址、NFT创建合约地址和证书验证合约的地址,所述对所述证书NFT的元数据中的至少一项数据分别进行验证,包括:The method of claim 12, wherein the at least one piece of data includes the NFT creator's public key, the NFT creator's signature, the NFT creator's signature expiration time, and the NFT target address in the metadata of the certificate NFT. The address of the NFT creation contract and the address of the certificate verification contract are verified separately at least one piece of data in the metadata of the certificate NFT, including:
    基于所述证书NFT的元数据中的NFT创造人公钥得到NFT创造人账户地址,若得到的NFT创造人账户地址与所述目标NFT的元数据中的NFT创造人账户地址一致,则所述证书NFT的元数据中的NFT创造人公钥的验证结果为通过;The NFT creator's account address is obtained based on the NFT creator's public key in the metadata of the certificate NFT. If the obtained NFT creator's account address is consistent with the NFT creator's account address in the metadata of the target NFT, then the The verification result of the NFT creator’s public key in the metadata of the certificate NFT is passed;
    使用所述证书NFT的元数据中的NFT创造人公钥对所述证书NFT的元数据中的NFT创造人签名进行解密,若解密后得到的数据与所述证书信息数据中除所述NFT创造人签名之外的其它证书信息数据一致,则所述证书NFT的元数据中的NFT创造人签名的验证结果为通过;Use the NFT creator's public key in the metadata of the certificate NFT to decrypt the NFT creator's signature in the metadata of the certificate NFT. If the data obtained after decryption is different from the NFT creator in the certificate information data, If other certificate information data except the person's signature are consistent, then the verification result of the NFT creator's signature in the metadata of the certificate NFT is passed;
    若所述证书NFT的元数据中的NFT创造人签名到期时间与所述目标NFT的创建时间或上链时间匹配,则所述证书NFT的元数据中的NFT创造人签名到期时间的验证结果为通过;If the expiration time of the NFT creator's signature in the metadata of the certificate NFT matches the creation time or on-chain time of the target NFT, then verify the expiration time of the NFT creator's signature in the metadata of the certificate NFT. The result is passed;
    若所述证书NFT的元数据中的NFT标的地址与所述目标NFT的元数据中的NFT标的地址一致,则所述证书NFT的元数据中的NFT标的地址的验证结果为通过;If the NFT target address in the metadata of the certificate NFT is consistent with the NFT target address in the metadata of the target NFT, then the verification result of the NFT target address in the metadata of the certificate NFT is passed;
    若所述证书NFT的元数据中的NFT创建合约地址与所述目标NFT的元数据中的NFT创建合约地址一致,则所述证书NFT的元数据中的NFT创建合约地址的验证结果为通过;If the NFT creation contract address in the metadata of the certificate NFT is consistent with the NFT creation contract address in the metadata of the target NFT, then the verification result of the NFT creation contract address in the metadata of the certificate NFT is passed;
    若所述证书NFT的元数据中的证书验证合约的地址与所述目标NFT的元数据中的证书验证合约的地址一致,则所述证书NFT的元数据中的证书验证合约的地址的验证结果为通过。If the address of the certificate verification contract in the metadata of the certificate NFT is consistent with the address of the certificate verification contract in the metadata of the target NFT, then the verification result of the address of the certificate verification contract in the metadata of the certificate NFT is for passing.
  14. 一种数据处理装置,包括:A data processing device including:
    第一标识信息获取单元,被配置为获取目标NFT的元数据对应的第一标识信息,所述第一标识信息是所述目标NFT的元数据存储至区块链之后得到的标识信息,其中,所述目标NFT的元数据包括与所述目标NFT关联的证书信息数据对应的标识信息、以及用于对所述目标NFT进行验证的证书验证合约的地址,所述证书信息数据对应的标识信息是所述证书信息数据存储至区块链之后得到的标识信息;The first identification information acquisition unit is configured to obtain the first identification information corresponding to the metadata of the target NFT, where the first identification information is the identification information obtained after the metadata of the target NFT is stored in the blockchain, wherein, The metadata of the target NFT includes identification information corresponding to the certificate information data associated with the target NFT, and the address of the certificate verification contract used to verify the target NFT. The identification information corresponding to the certificate information data is The identification information obtained after the certificate information data is stored in the blockchain;
    目标NFT创建单元,被配置为调用NFT创建合约以基于所述第一标识信息创建所述目标NFT;A target NFT creation unit configured to call an NFT creation contract to create the target NFT based on the first identification information;
    第二标识信息获取单元,被配置为获取与所述目标NFT关联待创建的证书NFT的元数据对应的第二标识信息,其中,所述证书NFT的元数据包括所述NFT创建合约的相关信息以及所述证书信息数据,所述第二标识信息是所述证书NFT的元数据存储至区块链之后得到的标识信息;The second identification information acquisition unit is configured to obtain the second identification information corresponding to the metadata of the certificate NFT to be created associated with the target NFT, wherein the metadata of the certificate NFT includes relevant information of the NFT creation contract And the certificate information data, the second identification information is the identification information obtained after the metadata of the certificate NFT is stored in the blockchain;
    证书NFT创建单元,被配置为调用证书创建合约以基于所述第二标识信息创建所述证书NFT,其中,所述证书创建合约与所述证书验证合约对应。The certificate NFT creation unit is configured to call a certificate creation contract to create the certificate NFT based on the second identification information, wherein the certificate creation contract corresponds to the certificate verification contract.
  15. 一种数据验证装置,包括:A data verification device including:
    目标NFT验证单元,被配置为调用证书验证合约以基于目标NFT的元数据和与所述 目标NFT关联的证书NFT的元数据对所述目标NFT进行验证;The target NFT verification unit is configured to call the certificate verification contract based on the metadata of the target NFT and the The metadata of the certificate NFT associated with the target NFT verifies the target NFT;
    验证结果输出单元,被配置为输出验证结果;a verification result output unit configured to output the verification result;
    其中,所述目标NFT由NFT创建合约基于所述目标NFT的元数据对应的第一标识信息创建而成,所述证书NFT由与所述证书验证合约对应的证书创建合约基于所述证书NFT的元数据对应的第二标识信息创建而成,Wherein, the target NFT is created by an NFT creation contract based on the first identification information corresponding to the metadata of the target NFT, and the certificate NFT is created by a certificate creation contract corresponding to the certificate verification contract based on the certificate NFT. Created from the second identification information corresponding to the metadata,
    所述目标NFT的元数据包括与所述目标NFT关联的证书信息数据对应的标识信息、以及用于对所述目标NFT进行验证的所述证书验证合约的地址,所述证书NFT的元数据包括所述NFT创建合约的相关信息以及所述证书信息数据,The metadata of the target NFT includes identification information corresponding to the certificate information data associated with the target NFT and the address of the certificate verification contract used to verify the target NFT. The metadata of the certificate NFT includes The relevant information of the NFT creation contract and the certificate information data,
    所述第一标识信息是所述目标NFT的元数据存储至区块链之后得到的标识信息,所述证书信息数据对应的标识信息是所述证书信息数据存储至区块链之后得到的标识信息,所述第二标识信息是所述证书NFT的元数据存储至区块链之后得到的标识信息。The first identification information is the identification information obtained after the metadata of the target NFT is stored in the blockchain, and the identification information corresponding to the certificate information data is the identification information obtained after the certificate information data is stored in the blockchain. , the second identification information is the identification information obtained after the metadata of the certificate NFT is stored in the blockchain.
  16. 一种电子设备,包括:An electronic device including:
    至少一个处理器;at least one processor;
    至少一个存储计算机可执行指令的存储器,at least one memory storing computer-executable instructions,
    其中,所述计算机可执行指令在被所述至少一个处理器运行时,促使所述至少一个处理器执行如权利要求1到7中的任一权利要求所述的数据处理方法或如权利要求8到13中的任一权利要求所述的数据验证方法。Wherein, the computer-executable instructions, when executed by the at least one processor, cause the at least one processor to execute the data processing method as claimed in any one of claims 1 to 7 or as claimed in claim 8 The data verification method according to any one of claims 13 to 13.
  17. 一种计算机可读存储介质,当述计算机可读存储介质中的指令被至少一个处理器运行时,使所述至少一个处理器执行如权利要求1到7中的任一权利要求所述的数据处理方法或如权利要求8到13中的任一权利要求所述的数据验证方法。A computer-readable storage medium that, when executed by at least one processor, causes the at least one processor to execute the data of any one of claims 1 to 7 Processing method or data verification method according to any one of claims 8 to 13.
  18. 一种计算机程序产品,包括计算机可执行指令,当处理器执行所述计算机可执行指令时,实现如权利要求1到7中的任一权利要求所述的数据处理方法或如权利要求8到13中的任一权利要求所述的数据验证方法。A computer program product, comprising computer-executable instructions, which, when executed by a processor, implement the data processing method as claimed in any one of claims 1 to 7 or as claimed in claims 8 to 13 The data verification method according to any one of the claims.
  19. 一种计算机程序,当处理器执行所述计算机程序时,实现如权利要求1到7中的任一权利要求所述的数据处理方法或如权利要求8到13中的任一权利要求所述的数据验证方法。 A computer program that, when executed by a processor, implements the data processing method as described in any one of claims 1 to 7 or the method as described in any one of claims 8 to 13 Data validation methods.
PCT/CN2023/106372 2022-07-28 2023-07-07 Data processing method and verification method, apparatus, electronic device, and storage medium WO2024022089A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210897905.8 2022-07-28
CN202210897905.8A CN117527244A (en) 2022-07-28 2022-07-28 Data processing method, data verification method, data processing device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2024022089A1 true WO2024022089A1 (en) 2024-02-01

Family

ID=89705298

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/106372 WO2024022089A1 (en) 2022-07-28 2023-07-07 Data processing method and verification method, apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN117527244A (en)
WO (1) WO2024022089A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11075891B1 (en) * 2020-12-02 2021-07-27 Theta Labs, Inc. Non-fungible token (NFT) based digital rights management in a decentralized data delivery network
CN113746638A (en) * 2021-09-03 2021-12-03 杭州复杂美科技有限公司 NFT storage method, NFT restoration method, computer device, and storage medium
CN114070554A (en) * 2021-11-11 2022-02-18 杭州安存网络科技有限公司 Method and device for confirming ownership of block chain machine generated data
CN114201735A (en) * 2021-11-30 2022-03-18 中科苏州智能计算技术研究院 NFT-based digital certificate issuing and verifying method
CN114553515A (en) * 2022-02-17 2022-05-27 支付宝(杭州)信息技术有限公司 Block chain based NFT asset inspection method, service processing method and hardware

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11075891B1 (en) * 2020-12-02 2021-07-27 Theta Labs, Inc. Non-fungible token (NFT) based digital rights management in a decentralized data delivery network
CN113746638A (en) * 2021-09-03 2021-12-03 杭州复杂美科技有限公司 NFT storage method, NFT restoration method, computer device, and storage medium
CN114070554A (en) * 2021-11-11 2022-02-18 杭州安存网络科技有限公司 Method and device for confirming ownership of block chain machine generated data
CN114201735A (en) * 2021-11-30 2022-03-18 中科苏州智能计算技术研究院 NFT-based digital certificate issuing and verifying method
CN114553515A (en) * 2022-02-17 2022-05-27 支付宝(杭州)信息技术有限公司 Block chain based NFT asset inspection method, service processing method and hardware

Also Published As

Publication number Publication date
CN117527244A (en) 2024-02-06

Similar Documents

Publication Publication Date Title
EP3824403B1 (en) Method, apparatus, and electronic device for blockchain-based recordkeeping
WO2020119294A1 (en) Data sharing method, apparatus, and system, and electronic device
JP6703539B2 (en) Device verification method and device
US8707404B2 (en) System and method for transparently authenticating a user to a digital rights management entity
US20100312810A1 (en) Secure identification of music files
KR101948721B1 (en) Method and apparatus for examining forgery of file by using file hash value
US9325680B2 (en) Digital rights management retrieval system
KR101899275B1 (en) Method and system to confirm ownership of digital goods
US20220329446A1 (en) Enhanced asset management using an electronic ledger
US11663595B1 (en) Blockchain transactional identity verification
CN110992218A (en) Music copyright protection method, device and medium based on block chain
CN112446450A (en) Entity article ownership management method and device based on block chain and electronic equipment
JP6669609B2 (en) Data trading system and program
CN111833059A (en) Data asset management method in data bank and data bank system
WO2024022089A1 (en) Data processing method and verification method, apparatus, electronic device, and storage medium
CN112948771A (en) Authority verification method and device, readable storage medium and electronic equipment
KR102635489B1 (en) System and method for managing asset based on blockchain
KR102550994B1 (en) Method and system for temporal leasing digital contents by use of NFT
US20220393892A1 (en) Composite Cryptographic Systems with Variable Configuration Parameters and Memory Bound Functions
US11783011B1 (en) Asset metadata oracle service for facilitating digital asset trading
US20230396442A1 (en) Nft-based authentication system for tagged objects and methods for use therewith
US20230368186A1 (en) Process for Creation storage retrieval of immutable NFT Non-fungible token based electronic book publishing on a decentralized proof ofstake blockchain
US11968256B2 (en) Blockchain architecture, system, method and device for automated cybersecurity and data privacy law compliance with a partitioned replication protocol
US20240073697A1 (en) Subscriber identity module (sim) card feature-based non-fungible token (nft)
US20230410072A1 (en) Systems and methods for enhanced non-fungible tokens

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23845302

Country of ref document: EP

Kind code of ref document: A1