A method and device for generating a blind box of digital collections
By sending a random number request carrying the target request number to the random number generator device, and generating and signing the blind box packaging information, the problems of fairness and credibility of the digital collection blind box are solved, and efficient and secure generation and uploading of the digital collection blind box to the blockchain are achieved.
Patent Information
- Application Number
- CN202211566080.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2042-12-07
AI Technical Summary
In the prior art, the fairness and credibility of digital collection blind boxes are affected, and merchants may subjectively manipulate or influence digital collection blind boxes purchased by consumers.
By sending a random number request carrying the target request number to the random number generator device, a hash value of the target random number is generated, and blind box packaging information is generated based on the hash value of the blind box information and the hash value of the target random number, and signature is performed to obtain the target blind box signature, and finally generating and uploading the digital collection blind box to the blockchain.
It improves the fairness and credibility of the blind boxes of digital collections, prevents any party from tampering with the random numbers of the blind boxes, ensures the immutability of blind box information and random numbers, and avoids cheating by the issuer and the random number generator.
Smart Images

Figure CN115996127B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of financial technology, and in particular, to a method and device for generating a blind box of digital collectibles. Background Art
[0002] In recent years, blind box entertainment based on blockchain and digital collection technology has gradually become a popular online entertainment model. Due to the openness, transparency and immutability of blockchain and digital collection technology, blind boxes based on blockchain and digital collection technology have gradually become a way to ensure the fairness and credibility of blind boxes. Since blockchain is open and transparent, and digital collections are a digital packaging protocol based on blockchain and smart contracts, the content on the chain is visible to all parties, which causes the problem of early exposure of blind box content.
[0003] Under the related technology, a digital collectible blind box is generated and pre-sold in an off-chain business system (belonging to a centralized server), and then the pre-sold digital collectible blind box is written to the chain at a specific time. However, in the above scheme, merchants can subjectively manipulate or influence the digital collectible blind boxes purchased by specific consumers, that is, there is a possibility of cheating on the merchant side, which affects the fairness and credibility of the digital collectible blind box. Summary of the invention
[0004] The embodiments of the present application provide a method and device for generating a blind box of a digital collectible, which are used to improve the fairness and credibility of the blind box of a digital collectible.
[0005] On the one hand, an embodiment of the present application provides a method for generating a blind box of a digital collectible, which is applied to an issuer device, including:
[0006] Sending a random number request carrying a target request number to a random number generator device, so that the random number generator device generates a target random number based on the target request number;
[0007] Receive a hash value of the target random number sent by the random number generator device;
[0008] Generate blind box packaging information based on the hash value of the blind box information and the hash value of the target random number, and sign the blind box packaging information through the random number generator device to obtain the target blind box signature;
[0009] Based on the digital collection blind box number, the blind box packaging information, the target blind box signature and the public key of the random number generator, a digital collection blind box is generated and uploaded to the blockchain.
[0010] In an embodiment of the present application, the issuer device sends a random number request carrying a target request number to the random number generator device to obtain a target random number associated with the digital collection blind box. Since the random number generator device only sends the hash value of the random number to the issuer device, the issuer device does not know the specific random value and which random number is bound to which blind box, thereby avoiding the issuer's subjective manipulation or influence on the digital collection blind box purchased by a specific consumer, thereby improving the fairness and credibility of the digital collection blind box. Secondly, after the digital collection blind box is generated, the digital collection blind box is uploaded to the blockchain to prevent any party from tampering with the random number of the blind box. Since the blind box information and the random number are signed by the issuer and the random number generator respectively, after the blind box is initialized, its characteristic attributes are tamper-proof. The random number and blind box information of the blind box uniquely correspond to a digital collection and cannot be replayed.
[0011] On the one hand, an embodiment of the present application provides a method for generating a digital collection blind box, which is applied to a random number generator device, including:
[0012] Receive a random number request carrying a target request number sent by an issuer device, and generate a target random number based on the target request number;
[0013] Send the hash value of the target random number to the issuer device, so that the issuer device generates blind box packaging information based on the hash value of the blind box information and the hash value of the target random number, and signs the blind box packaging information through the random number generator device to obtain the target blind box signature; and based on the blind box number of the digital collection, the blind box packaging information, the target blind box signature and the public key of the random number generator, generate a digital collection blind box, and upload it to the blockchain.
[0014] On the one hand, the embodiment of the present application provides a method for generating a blind box of a digital collection, which is applied to a blockchain, including:
[0015] Receive a blind box of a digital collectible uploaded by the issuer device, wherein the blind box of the digital collectible includes a blind box number of the digital collectible, packaging information of the blind box, a signature of the target blind box, and a public key of a random number generator, wherein the blind box packaging information is generated by the issuer device based on a hash value of the blind box information and a hash value of a target random number, and the hash value of the target random number is generated by the random number generator device based on a target request number of a random number request sent by the issuer device; the signature of the target blind box is obtained by signing the blind box packaging information by the random number generator device;
[0016] Through the digital collection contract, the signature of the target blind box and the public key of the random number generator are verified. When the verification passes, the digital collection blind box is put on the chain.
[0017] On the one hand, an embodiment of the present application provides a device for generating a blind box of a digital collection, which is applied to an issuer device, including:
[0018] A first sending module, configured to send a random number request carrying a target request number to a random number generator device, so that the random number generator device generates a target random number based on the target request number;
[0019] A first receiving module, configured to receive a hash value of the target random number sent by the random number generator device;
[0020] A first processing module is used to generate blind box packaging information based on the hash value of the blind box information and the hash value of the target random number, and sign the blind box packaging information through the random number generator device to obtain the target blind box signature;
[0021] The generation module is used to generate a digital collection blind box based on the digital collection blind box number, the blind box packaging information, the target blind box signature and the public key of the random number generator, and upload it to the blockchain.
[0022] On the one hand, an embodiment of the present application provides a device for generating a blind box of a digital collection, which is applied to a random number generator device, including:
[0023] A second receiving module is used to receive a random number request carrying a target request number sent by an issuer device;
[0024] A second processing module, configured to generate a target random number based on the target request number;
[0025] The second sending module is used to send the hash value of the target random number to the issuing device, so that the issuing device generates blind box packaging information based on the hash value of the blind box information and the hash value of the target random number, and signs the blind box packaging information through the random number generator device to obtain the target blind box signature; and generates a digital collection blind box based on the digital collection blind box number, the blind box packaging information, the target blind box signature and the random number generator public key, and uploads it to the blockchain.
[0026] On the one hand, the embodiment of the present application provides a device for generating a blind box of a digital collection, which is applied to a blockchain, including:
[0027] The third receiving module is used to receive the digital collection blind box uploaded by the issuing device, wherein the digital collection blind box includes the digital collection blind box number, the blind box packaging information, the target blind box signature and the random number generator public key, wherein the blind box packaging information is generated by the issuing device based on the hash value of the blind box information and the hash value of the target random number, and the hash value of the target random number is generated by the random number generator device based on the target request number of the random number request sent by the issuing device; the target blind box signature is obtained by the random number generator device signing the blind box packaging information;
[0028] The verification module is used to verify the signature of the target blind box and the public key of the random number generator through the digital collection contract. When the verification is passed, the digital collection blind box is put on the chain.
[0029] On the one hand, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of generating the above-mentioned digital collection blind box are implemented.
[0030] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program that can be executed by a computer device. When the program runs on the computer device, the computer device executes the steps of generating the above-mentioned digital collection blind box.
[0031] In the embodiment of the present application, since the issuing party device adopts obfuscation, delay and redundant processing means to send a random number request carrying a target request number to the random number generator device to obtain the target random number associated with the digital collection blind box, the random number generator cannot deduce which blind box the random number generated by itself will be applied to, thereby preventing the random number generator from cheating. Since the random number generator device only sends the hash value of the random number to the issuing party device, the issuing party device does not know the specific random value and which random number is bound to which blind box, thereby avoiding the issuer's subjective manipulation or influence on the digital collection blind box purchased by a specific consumer, thereby improving the fairness and credibility of the digital collection blind box. Secondly, after the digital collection blind box is generated, the digital collection blind box is uploaded to the blockchain to prevent any party from tampering with the random number of the blind box. Since the blind box information and the random number are signed by the issuing party and the random number generator respectively, after the blind box is initialized, its characteristic attributes are tamper-proof. The random number and blind box information of the blind box uniquely correspond to a digital collection and cannot be replayed. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0033] Figure 1 A schematic diagram of a system architecture provided in an embodiment of the present application;
[0034] Figure 2 A flowchart of a method for generating a blind box of a digital collection provided in an embodiment of the present application;
[0035] Figure 3 A flowchart of a signing method provided in an embodiment of the present application;
[0036] Figure 4 A flowchart of a method for verifying a blind box of a digital collectible provided in an embodiment of the present application;
[0037] Figure 5 A schematic diagram of the structure of a device for generating a blind box of a digital collection provided in an embodiment of the present application;
[0038] Figure 6 A schematic diagram of the structure of a device for generating a blind box of a digital collection provided in an embodiment of the present application;
[0039] Figure 7 A schematic diagram of the structure of a device for generating a blind box of a digital collection provided in an embodiment of the present application;
[0040] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and beneficial effects of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0042] For ease of understanding, the terms involved in the embodiments of the present invention are explained below.
[0043] Digital collections: essentially regulated NFTs, which are digitized works that are uniquely identified using blockchain technology, such as digital paintings, pictures, music, videos, 3D models, etc. Each digital collection maps a unique sequence on a specific blockchain and cannot be tampered with, divided, or replaced with each other. Digital collection blind boxes refer to digital collections whose content or rights are not public.
[0044] refer to Figure 1 , which is a system architecture diagram applicable to an embodiment of the present application. The system architecture at least includes a terminal device 101, an issuer device 102, a random number generator device 103 and a blockchain 104. The terminal device 101, the issuer device 102, and the random number generator device 103 can be one or more. The present application does not specifically limit the number of the terminal device 101, the issuer device 102, and the random number generator device 103.
[0045] The terminal device 101 is pre-installed with an application that can purchase a digital collection blind box, wherein the application can be a client application, a web application, a mini-program application, etc. The terminal device 101 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart home appliance, an intelligent voice interaction device, a smart car device, etc., but is not limited to this. The issuer device 102 and the random number generator device 103 jointly generate a digital collection blind box and upload the digital collection blind box to the blockchain 104. After purchasing the digital collection blind box, the terminal device 101 opens and verifies the digital collection blind box by calling the corresponding digital collection contract in the blockchain 104.
[0046] The issuer device 102 and the random number generator device 103 can be independent physical servers, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The issuer device 102 and the random number generator device 103 can be directly or indirectly connected via wired or wireless communication, and this application does not limit this. The issuer device 102 and the random number generator device 103 are connected to the blockchain respectively via wired or wireless communication, and the terminal device 101 and the blockchain 104 can be directly or indirectly connected via wired or wireless communication.
[0047] based on Figure 1 The system architecture diagram shown in the figure, the embodiment of the present application provides a process of generating a method for a blind box of a digital collection, such as Figure 2 As shown, the process of the method is interactively executed by the issuer device, the random number generator device and the blockchain, and includes the following steps:
[0048] Step S201: the issuer device sends a random number request carrying a target request number to the random number generator device.
[0049] Specifically, before generating a blind box of digital collectibles, the issuer deploys a digital collectible contract of blind box nature on the blockchain, and defines an attribute mapping algorithm based on random numbers to generate the scarcity attributes of the blind box of digital collectibles in multiple attribute dimensions. The digital collectible contract defines the total number of blind boxes of digital collectibles, each blind box of digital collectibles corresponds to multiple attribute dimensions, the scarcity attribute of each attribute dimension is represented by a random number, and the proportion of each scarcity attribute of each attribute dimension is defined.
[0050] For example, a digital collection contract is deployed on the blockchain, which defines the issuance of a total of 100 digital collection blind boxes. The digital collection blind box includes three attribute dimensions, namely background, avatar and clothing. The scarcity attribute of each attribute dimension is represented by numbers from 0 to 9, among which the scarcity attribute corresponding to numbers 0 to 3 is ordinary, the scarcity attribute corresponding to numbers 4 to 6 is good, the scarcity attribute corresponding to numbers 7 to 8 is excellent, and the scarcity attribute corresponding to number 9 is mythical, that is, the proportions of the four scarcity attributes of ordinary, good, excellent and mythical are 40%, 30%, 20% and 10% respectively.
[0051] The random number generator device can be an authoritative organization or a trusted third-party device, such as a Trusted Execute Environment (TEE) server, or an oracle network. The random number generator device can be a computing node T, or it can be composed of multiple computing nodes [T1, T2...Tn]. Each computing node generates an asymmetric key pair (Pk, Sk), Pk is the public key of the random number generator, Sk is the private key of the random number generator, and the public key Pk of the random number generator is public. The public method is to publish the public key Pk of the random number generator to the blockchain smart contract.
[0052] In practical applications, the RSA algorithm is used to generate an asymmetric key pair (Pk, Sk). Specifically, two prime numbers p and q are randomly selected, and n = pq is defined, and then the Euler function of n is calculated. Randomly select an integer e, provided that And e and Then calculate e for The element d satisfies e*d%n=1. Pk can be further expressed as (n,e), and Sk can be further expressed as (n,d).
[0053] The issuing device generates a globally unique and non-repetitive target request number through algorithms such as UUID.
[0054] In some embodiments, in order to increase the confidentiality of the random number request and enhance the privacy protection effect, at least one of the obfuscation method, delay method and redundancy method is used to send a random number request carrying the target request number to the random number generator device.
[0055] The obfuscation method refers to the method of cross-scrambling and sending the random number requests corresponding to multiple digital collection contracts, so that the random number generating device cannot identify which random number request is officially applied.
[0056] The delay method refers to a method of defining a random delay time for each random number request and sending the random number request when the random delay time is reached, so that the random number generating device cannot infer the request number based on the timing.
[0057] The redundant method refers to building multiple simulated obfuscation requests according to the random number request, and sending the random number request and the obfuscation request alternately to increase the difficulty of cracking and guessing.
[0058] For example, the issuer device randomly selects a digital collection from N other digital collection contracts to generate a random number request. At the same time, the issuer device simulates M obfuscation requests. The issuer device uses a blocking delay queue DelayedQueue to store all requests, writes a random delay time to each request, and sends the corresponding request after the random delay time expires.
[0059] Among them, the blocking delay queue DelayQueue is an unbounded BlockingQueue (blocking queue) used to place objects that implement the Delayed interface. The objects in the queue can only be taken out of the queue when they expire. This queue is ordered, that is, the delayed expiration time of the object at the end of the queue is the longest. The elements added to it must implement the Delayed interface. When the producer thread calls methods such as put to add elements, it will trigger the compareTo method in the Delayed interface for sorting, that is, the order of elements in the queue is sorted by expiration time, not the order in which they enter the queue. The elements at the head of the queue are the earliest to expire, and the later the expiration time, the later the expiration time. The consumer thread checks the element at the head of the queue, and pays attention to checking rather than taking it out. Then call the getDelay method of the element. If the value returned by this method is less than 0 or equal to 0, the consumer thread will take this element out of the queue and process it. If the value returned by the getDelay method is greater than 0, the consumer thread will wait for the returned time value before taking the element out from the head of the queue. At this time, the element has expired.
[0060] In the embodiments of the present application, the random number request carrying the target request number is concealed by using an obfuscation method, a delay method and a redundancy method, thereby increasing the anonymity of the random number request and enhancing the privacy protection effect, and preventing the random number generator device from inferring the relationship between the random number and the digital collection blind box, thereby improving the fairness and credibility of the digital collection blind box.
[0061] Step S202: The random number generator device generates a target random number based on the target request number.
[0062] Specifically, the random number generator device generates a verifiable target random number and a corresponding random number certificate based on the target request number, and saves the relationship between the target random number and the target request number.
[0063] In practical applications, the target random number can be a VRF verifiable random number, and the generation process is as follows:
[0064] Step (1), calculate info=hash(RequestID), where RequestID represents the target request number;
[0065] Step (2), calculate the target random number randomness = VRF_Hash (Sk, info);
[0066] Step (3), calculate the random number proof proof = VRF_Proof (Sk, info).
[0067] Step S203: The issuer device receives the hash value of the target random number sent by the random number generator device.
[0068] Step S204: The issuer device generates blind box packaging information based on the hash value of the blind box information and the hash value of the target random number.
[0069] Specifically, the blind box information includes fields such as blockchain ID, address of the digital collection contract, digital collection ID, address of the issuer's account, and salt value (nonce). The blind box information uniquely locates a certain digital collection.
[0070] For example, the blind box information mystery_info = (chainID|contract Address|tokenId|msg.sender|nonce), where chainID represents the blockchain ID, contract Address represents the address of the digital collection contract, tokenId represents the digital collection ID, msg.sender represents the address of the issuer account, and nonce represents the salt value.
[0071] Concatenate the hash value of the blind box information and the hash value of the target random number to obtain the blind box packaging information. Specifically, the blind box packaging information message = hash(mystery_info) | hash(randomness).
[0072] Step S205: The issuer device signs the blind box packaging information through the random number generator device to obtain the target blind box signature.
[0073] In some embodiments, the process of the issuer device signing the blind box packaging information through the random number generator device is as follows: Figure 3 As shown, the following steps are included:
[0074] Step S301: The issuer’s device encrypts the blind box packaging information to obtain the blind box packaging ciphertext.
[0075] Specifically, the issuer device randomly generates a random number r, and then uses the random number r and the public key Pk of the random number generator to encrypt the blind box packaging information to obtain the blind box packaging ciphertext E, as shown in the following formula (1):
[0076] E=(message*r e )%n ……………………… (1)
[0077] Among them, E represents the blind box encapsulation ciphertext, message represents the blind box encapsulation information, and the public key Pk of the random number generator can be expressed as (n, e).
[0078] Step S302: The issuer device sends the blind box packaging ciphertext to the random number generator device.
[0079] Specifically, due to the existence of the random number r, the blind box packaging information message will be encrypted, so that the random number generator device receives the encrypted ciphertext. The random number generator device cannot know which random number the signed function is, so it cannot guess which blind box the generated random number is applied to.
[0080] In some embodiments, in order to increase the difficulty of cracking, technical means of obfuscation, delay and redundancy may be further introduced in step S302 to obtain a better interference effect.
[0081] Step S303: The random number generator device uses the random number generator private key to sign the blind box packaged ciphertext to obtain the original blind box signature.
[0082] The specific signing process can be expressed as the following formula (2):
[0083] St=E d %n ……………………… (2)
[0084] Among them, St represents the original blind box signature, and the private key Sk of the random number generator can be expressed as (n, d).
[0085] Step S304: The issuer device receives the original blind box signature sent by the random number generator device.
[0086] Step S305: The issuer’s device decrypts the original blind box signature to obtain the target blind box signature.
[0087] Specifically, the issuer device uses the random number r to decrypt the blind box packaging information to obtain the target blind box signature Sf, as shown in the following formula (3):
[0088] Sf=St*r -1 %n ……………………… (3)
[0089] The decrypted target blind box signature Sf is equivalent to the result of the random number generator device directly signing the blind box package information message, which is equivalent to message d %n.
[0090] In an embodiment of the present application, the issuer device uses a random number r to encrypt the blind box packaging information message and then sends it to the random number generator device for signing. Therefore, the random number generator device cannot know which random number the signed function is. Therefore, it is impossible to guess which blind box the generated random number is applied to, thereby improving fairness and credibility.
[0091] Step S206: The issuer's device generates a digital collection blind box based on the digital collection blind box number, blind box packaging information, target blind box signature, and the public key of the random number generator.
[0092] Step S207: The issuer’s device uploads the digital collection blind box to the blockchain.
[0093] Specifically, the issuer's device adds the digital collectible blind box to the issuer's on-chain message, signs the issuer's on-chain message, and then uploads the signed issuer's on-chain message to the blockchain.
[0094] Step S208, the blockchain verifies the signature of the target blind box and the public key of the random number generator through the digital collection contract. When the verification passes, the digital collection blind box is put on the chain.
[0095] Specifically, in the digital collection contract, the mapping relationship between the digital collection ID and the blind box packaging information and the target blind box signature is maintained. Before the official sale, the digital collection ID in the digital collection contract must be assigned the corresponding blind box packaging information message and target blind box signature.
[0096] After the issuer's device uploads the digital collectibles blind box to the blockchain, the blockchain network first verifies the signature of the issuer's on-chain message. When the verification passes, the digital collectibles contract automatically verifies the validity of the target blind box signature, and automatically verifies whether the public key of the random number generator is in the list of random number generator public keys registered with the smart contract. When the verification passes, the digital collectibles blind box will be uploaded to the chain.
[0097] It should be noted that each digital collectible blind box defined in the digital collectible contract can be obtained by using steps S201 to S208, which will not be repeated here.
[0098] In an embodiment of the present application, the issuer device sends a random number request carrying a target request number to the random number generator device to obtain a target random number associated with the digital collection blind box. Since the random number generator device only sends the hash value of the random number to the issuer device, the issuer device also does not know the value of the random number and which random number is bound to which blind box, thereby avoiding the issuer's subjective manipulation or influence on the digital collection blind box purchased by a specific consumer, thereby improving the fairness and credibility of the digital collection blind box. Secondly, after the digital collection blind box is generated, the digital collection blind box is uploaded to the blockchain to prevent any party from tampering with the random number of the blind box. Since the blind box information and the random number are signed by the issuer and the random number generator respectively, after the blind box is initialized, its characteristic attributes are tamper-proof. The random number and blind box information of the blind box uniquely correspond to a digital collection and cannot be replayed.
[0099] In some embodiments, the process of opening and verifying the digital collectible blind box includes at least the following steps: Figure 4 Said:
[0100] Step S401, the blockchain receives an opening request for a digital collection blind box sent by a terminal device.
[0101] Step S402, the blockchain changes the status of the digital collection blind box in the digital collection contract to opened.
[0102] Specifically, after purchasing the digital collection blind box, the terminal device calls the function interface for opening the blind box in the digital collection contract corresponding to the digital collection blind box on the blockchain, and the digital collection contract modifies the status of the digital collection blind box to opened.
[0103] Step S403: The blockchain receives the verification reference information sent by the issuer device.
[0104] Specifically, when the issuer's device monitors that the status of the digital collectible blind box has been changed to opened, it uploads the verification reference information of the digital collectible blind box to the blockchain, where the verification reference information includes: blind box information of the digital collectible blind box, hash value of the target random number, random number proof, etc.
[0105] Step S404: The blockchain receives the target random number uploaded by the random number generator device.
[0106] Step S405, the blockchain verifies the digital collection blind box based on the verification reference information and the target random number.
[0107] In some embodiments, the blind box information to be verified and the packaging information to be verified are obtained from the blind box of the digital collection. Based on the target random number and the random number certificate, the validity of the target random number is verified. When the verification is successful, the validity of the packaging information to be verified is verified based on the hash value of the target random number and the blind box information of the blind box of the digital collection. When the verification is successful, the validity of the blind box information to be verified is verified based on the blind box information of the blind box of the digital collection.
[0108] Specifically, first verify whether the following formula (4) holds true:
[0109] randomness=VRF_P2H(proof) ……………………… (4)
[0110] Among them, randomness represents the target random number, and proof represents the random number proof.
[0111] If not, the process ends; if true, the following formula (5) is executed:
[0112] True / False=VRF_Verify(PK,info,proof) ……………………… (5)
[0113] Among them, PK is the public key of the random number generator, and info=hash(RequestID).
[0114] If the calculation result is False, it means that the verification fails, so the processing ends. If the calculation result is True, it means that the verification passes, so the hash value of the target random number and the blind box information of the digital collection blind box are spliced to obtain the blind box packaging information, and then determine whether the blind box packaging information is consistent with the packaging information to be verified. If not, the processing ends;
[0115] If they are consistent, the blind box information of the digital collection blind box will be compared with the blind box information to be verified. If they are inconsistent, the processing will be terminated. If they are consistent, it means that the verification is passed.
[0116] The above verification process can be pre-set in the blockchain. When verifying, the digital collection contract automatically executes the above verification process to verify whether the generation of the digital collection blind box is safe and effective. If the verification is passed, the digital collection blind box is safely opened. If the verification fails, the user has the right to request the issuer to return the sales amount of the digital collection blind box.
[0117] Step S406, when the blockchain passes the verification, the scarcity attributes of the digital collection blind box in multiple attribute dimensions are obtained based on the target random number mapping.
[0118] Step S407, the blockchain sends the scarcity attributes of multiple attribute dimensions to the terminal device.
[0119] The target random number is input into the attribute mapping algorithm to obtain the scarcity attributes of the digital collection blind box in multiple attribute dimensions. This process can be performed on the chain or off the chain. After the scarcity attributes are calculated, the scarcity attributes can be written to the blockchain.
[0120] For example, setting the target random number to 999 and inputting the target random number into the attribute mapping algorithm, the scarcity attributes of the digital collectible blind box in the three attribute dimensions of background, avatar and clothing are all mythical.
[0121] In the embodiment of the present application, since the issuing party device adopts obfuscation, delay and redundant processing means to send a random number request carrying a target request number to the random number generator device to obtain the target random number associated with the digital collection blind box, the random number generator cannot deduce which blind box the random number generated by itself will be applied to, thereby preventing the random number generator from cheating. Since the random number generator device only sends the hash value of the random number to the issuing party device, the issuing party device does not know the specific random value and which random number is bound to which blind box, thereby avoiding the issuer's subjective manipulation or influence on the digital collection blind box purchased by a specific consumer, thereby improving the fairness and credibility of the digital collection blind box. Secondly, after the digital collection blind box is generated, the digital collection blind box is uploaded to the blockchain to prevent any party from tampering with the random number of the blind box. Since the blind box information and the random number are signed by the issuing party and the random number generator respectively, after the blind box is initialized, its characteristic attributes are tamper-proof. The random number and blind box information of the blind box uniquely correspond to a digital collection and cannot be replayed.
[0122] Based on the same technical concept, the embodiment of the present application provides a structural schematic diagram of a device for generating a blind box of a digital collection, which is applied to a device of an issuer, such as Figure 5 As shown, the device 500 includes:
[0123] The first sending module 501 is used to send a random number request carrying a target request number to a random number generator device, so that the random number generator device generates a target random number based on the target request number;
[0124] A first receiving module 502 is used to receive the hash value of the target random number sent by the random number generator device;
[0125] The first processing module 503 is used to generate blind box packaging information based on the hash value of the blind box information and the hash value of the target random number, and sign the blind box packaging information through the random number generator device to obtain the target blind box signature;
[0126] The generation module 504 is used to generate a digital collection blind box based on the digital collection blind box number, the blind box packaging information, the target blind box signature and the public key of the random number generator, and upload it to the blockchain.
[0127] Optionally, the first sending module 501 is specifically configured to:
[0128] A random number request carrying a target request number is sent to a random number generator device by using at least one of an obfuscation method, a delay method and a redundancy method, wherein the obfuscation method refers to a method of cross-scrambling and sending random number requests corresponding to multiple digital collection contracts; the delay method refers to a method of defining a random delay time for each random number request, and sending the random number request when the random delay time is reached; the redundancy method refers to a method of constructing multiple simulated obfuscation requests according to the random number request, and cross-sending the random number request and the obfuscation request.
[0129] Optionally, the first processing module 503 is specifically configured to:
[0130] Encrypting the blind box packaging information to obtain a blind box packaging ciphertext;
[0131] The first sending module 501 is further used to send the blind box packaging ciphertext to the random number generator device, so that the random number generator device uses the random number generator private key to sign the blind box packaging ciphertext to obtain the original blind box signature;
[0132] The first receiving module 502 is also used to receive the original blind box signature sent by the random number generator device, and decrypt the original blind box signature to obtain the target blind box signature.
[0133] Optionally, the first receiving module 502 is further used to receive a random number certificate corresponding to the target random number sent by the random number generating device.
[0134] Based on the same technical concept, the embodiment of the present application provides a structural schematic diagram of a device for generating a digital collection blind box, which is applied to a random number generating device, such as Figure 6 As shown, the device 600 includes:
[0135] The second receiving module 601 is used to receive a random number request carrying a target request number sent by an issuer device;
[0136] A second processing module 602 is used to generate a target random number based on the target request number;
[0137] The second sending module 603 is used to send the hash value of the target random number to the issuer device, so that the issuer device generates blind box packaging information based on the hash value of the blind box information and the hash value of the target random number, and signs the blind box packaging information through the random number generator device to obtain the target blind box signature; and generates a digital collection blind box based on the digital collection blind box number, the blind box packaging information, the target blind box signature and the random number generator public key, and uploads it to the blockchain.
[0138] Optionally, the second receiving module 601 is further used to receive the blind box packaging ciphertext sent by the issuer device, where the blind box packaging ciphertext is obtained by the issuer device encrypting the blind box packaging information;
[0139] The second processing module 602 is further configured to use a private key of a random number generator to sign the blind box packaged ciphertext to obtain an original blind box signature;
[0140] The second sending module 603 is further used to send the original blind box signature to the issuer device, so that the issuer device decrypts the original blind box signature to obtain the target blind box signature.
[0141] Based on the same technical concept, the embodiment of the present application provides a structural schematic diagram of a device for generating a blind box of a digital collection, which is applied to blockchain, such as Figure 7 As shown, the device 700 includes:
[0142] The third receiving module 701 is used to receive the digital collection blind box uploaded by the issuing device, wherein the digital collection blind box includes the digital collection blind box number, the blind box packaging information, the target blind box signature and the public key of the random number generator, wherein the blind box packaging information is generated by the issuing device based on the hash value of the blind box information and the hash value of the target random number, and the hash value of the target random number is generated by the random number generator device based on the target request number of the random number request sent by the issuing device; the target blind box signature is obtained by the random number generator device signing the blind box packaging information;
[0143] The verification module 702 is used to verify the signature of the target blind box and the public key of the random number generator through the digital collection contract, and when the verification is passed, the digital collection blind box is put on the chain.
[0144] Optionally, a third sending module 703 is also included;
[0145] The third receiving module 701 is further used to receive an opening request for the digital collection blind box sent by the terminal device, and modify the status of the digital collection blind box in the digital collection contract to be opened; receive the verification reference information sent by the issuer device, and the verification reference information includes: the blind box information of the digital collection blind box, the hash value of the target random number, and the random number certificate; receive the target random number uploaded by the random number generator device;
[0146] The verification module 702 is further used to verify the digital collection blind box based on the verification reference information and the target random number, and when the verification passes, obtain the scarcity attributes of the digital collection blind box in multiple attribute dimensions based on the target random number mapping;
[0147] The third sending module 703 is used to send the scarcity attributes of the multiple attribute dimensions to the terminal device.
[0148] Optionally, the verification module 702 is specifically used for:
[0149] Obtain the blind box information to be verified and the packaging information to be verified from the blind box of the digital collection;
[0150] Verifying the validity of the target random number based on the target random number and the random number certificate;
[0151] When the verification is passed, the validity of the packaging information to be verified is verified based on the hash value of the target random number and the blind box information of the digital collection blind box;
[0152] When the verification is passed, the validity of the blind box information to be verified is verified based on the blind box information of the digital collection blind box.
[0153] In the embodiment of the present application, since the issuing party device adopts obfuscation, delay and redundant processing means to send a random number request carrying a target request number to the random number generator device to obtain the target random number associated with the digital collection blind box, the random number generator cannot deduce which blind box the random number generated by itself will be applied to, thereby preventing the random number generator from cheating. Since the random number generator device only sends the hash value of the random number to the issuing party device, the issuing party device also does not know the value of the random number and which random number is bound to which blind box, thereby avoiding the issuer's subjective manipulation or influence on the digital collection blind box purchased by a specific consumer, thereby improving the fairness and credibility of the digital collection blind box. Secondly, after the digital collection blind box is generated, the digital collection blind box is uploaded to the blockchain to prevent any party from tampering with the random number of the blind box. Since the blind box information and the random number are signed by the issuing party and the random number generator respectively, after the blind box is initialized, its characteristic attributes are tamper-proof. The random number and blind box information of the blind box uniquely correspond to a digital collection and cannot be replayed.
[0154] Based on the same technical concept, the embodiment of the present application provides a computer device, such as Figure 8 As shown, it includes at least one processor 801 and a memory 802 connected to the at least one processor. The specific connection medium between the processor 801 and the memory 802 is not limited in the embodiment of the present application. Figure 8 For example, the processor 801 and the memory 802 are connected via a bus. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0155] In an embodiment of the present application, the memory 802 stores instructions that can be executed by at least one processor 801. At least one processor 801 can execute the steps of the above-mentioned method for generating a blind box of digital collections by executing the instructions stored in the memory 802.
[0156] Among them, the processor 801 is the control center of the computer device, which can use various interfaces and lines to connect various parts of the computer device, and generate a digital collection blind box by running or executing instructions stored in the memory 802 and calling data stored in the memory 802. Optionally, the processor 801 may include one or more processing units, and the processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 801. In some embodiments, the processor 801 and the memory 802 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
[0157] Processor 801 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor.
[0158] The memory 802 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 802 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 802 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer device, but is not limited thereto. The memory 802 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0159] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program that can be executed by a computer device. When the program runs on the computer device, the computer device executes the steps of the above-mentioned method for generating a blind box of digital collections.
[0160] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0161] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer device or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0162] These computer program instructions may also be stored in a computer readable memory capable of directing a computer device or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0163] These computer program instructions can also be loaded onto a computer device or other programmable data processing device so that a series of operation steps are executed on the computer device or other programmable device to produce a process implemented by the computer device, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0164] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0165] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for generating a blind box of a digital collection, applied to an issuer device, characterized in that: include: Sending a random number request carrying a target request number to a random number generator device, so that the random number generator device generates a target random number based on the target request number; Receive a hash value of the target random number sent by the random number generator device; Generate blind box packaging information based on the hash value of the blind box information and the hash value of the target random number, and sign the blind box packaging information through the random number generator device to obtain the target blind box signature; Generate a digital collection blind box based on the digital collection blind box number, the blind box packaging information, the target blind box signature and the public key of the random number generator, and upload it to the blockchain; Receiving a random number certificate corresponding to the target random number sent by the random number generator device; When it is monitored that the blockchain has modified the status of the digital collectible blind box to be opened, the verification reference information is uploaded to the blockchain, and the verification reference information includes: the blind box information of the digital collectible blind box, the hash value of the target random number, and the random number certificate, so that the blockchain can verify the digital collectible blind box based on the verification reference information and the target random number uploaded by the random number generator device, and when the verification passes, the scarcity attributes of the digital collectible blind box in multiple attribute dimensions are obtained based on the target random number mapping.
2. The method according to claim 1, characterized in that The sending of a random number request carrying a target request number to a random number generator device includes: A random number request carrying a target request number is sent to a random number generator device by using at least one of an obfuscation method, a delay method and a redundancy method, wherein the obfuscation method refers to a method of cross-scrambling and sending random number requests corresponding to multiple digital collection contracts; the delay method refers to a method of defining a random delay time for each random number request, and sending the random number request when the random delay time is reached; the redundancy method refers to a method of constructing multiple simulated obfuscation requests according to the random number request, and cross-sending the random number request and the obfuscation request.
3. The method according to claim 1, characterized in that The step of signing the blind box packaging information by the random number generator device to obtain the target blind box signature includes: Encrypt the blind box packaging information to obtain a blind box packaging ciphertext, and send the blind box packaging ciphertext to the random number generator device, so that the random number generator device uses the random number generator private key to sign the blind box packaging ciphertext to obtain an original blind box signature; Receive the original blind box signature sent by the random number generator device, and decrypt the original blind box signature to obtain the target blind box signature.
4. A method for generating a digital collection blind box, applied to a random number generator device, characterized in that: include: Receive a random number request carrying a target request number sent by an issuer device, and generate a target random number based on the target request number; Sending the hash value of the target random number to the issuer device, so that the issuer device generates blind box packaging information based on the hash value of the blind box information and the hash value of the target random number, and signs the blind box packaging information through the random number generator device to obtain the target blind box signature; And based on the digital collection blind box number, the blind box packaging information, the target blind box signature and the public key of the random number generator, generate a digital collection blind box and upload it to the blockchain; A random number certificate corresponding to the target random number is sent to the issuer device, so that when the issuer device detects that the blockchain has changed the status of the digital collectible blind box to opened, the verification reference information is uploaded to the blockchain, and the verification reference information includes: blind box information of the digital collectible blind box, a hash value of the target random number, and the random number certificate, so that the blockchain verifies the digital collectible blind box based on the verification reference information and the target random number uploaded by the random number generator device, and when the verification passes, the scarcity attributes of the digital collectible blind box in multiple attribute dimensions are obtained based on the target random number mapping.
5. The method according to claim 4, characterized in that Also includes: Receiving a blind box packaging ciphertext sent by the issuer device, where the blind box packaging ciphertext is obtained by encrypting the blind box packaging information by the issuer device; The private key of the random number generator is used to sign the blind box packaged ciphertext to obtain the original blind box signature; The original blind box signature is sent to the issuer device so that the issuer device decrypts the original blind box signature to obtain the target blind box signature.
6. A method for generating a blind box of a digital collection, applied to a blockchain, characterized in that: include: Receive a blind box of a digital collection uploaded by an issuer device, wherein the blind box of the digital collection includes a blind box number of the digital collection, blind box packaging information, a target blind box signature, and a public key of a random number generator, wherein the blind box packaging information is generated by the issuer device based on a hash value of the blind box information and a hash value of a target random number, and the hash value of the target random number is generated by the random number generator device based on a target request number of a random number request sent by the issuer device; the target blind box signature is obtained by signing the blind box packaging information by the random number generator device; Through the digital collection contract, the signature of the target blind box and the public key of the random number generator are verified. When the verification is passed, the digital collection blind box is put on the chain; Receive an opening request for the digital collection blind box sent by a terminal device, and modify the status of the digital collection blind box in the digital collection contract to be opened; Receive verification reference information sent by the issuer device, the verification reference information including: blind box information of the digital collection blind box, a hash value of the target random number, and the random number certificate; Receiving the target random number uploaded by the random number generator device; Based on the verification reference information and the target random number, the digital collection blind box is verified, and when the verification passes, the scarcity attributes of the digital collection blind box in multiple attribute dimensions are obtained based on the target random number mapping; The scarcity attributes of the multiple attribute dimensions are sent to the terminal device.
7. The method according to claim 6, characterized in that The verifying the digital collection blind box based on the verification reference information and the target random number includes: Obtain the blind box information to be verified and the packaging information to be verified from the blind box of the digital collection; Verifying the validity of the target random number based on the target random number and the random number certificate; When the verification is passed, the validity of the packaging information to be verified is verified based on the hash value of the target random number and the blind box information of the digital collection blind box; When the verification is passed, the validity of the blind box information to be verified is verified based on the blind box information of the digital collection blind box.
8. A device for generating a blind box of a digital collection, applied to a device of an issuer, characterized in that: include: A first sending module, configured to send a random number request carrying a target request number to a random number generator device, so that the random number generator device generates a target random number based on the target request number; A first receiving module, configured to receive a hash value of the target random number sent by the random number generator device; A first processing module is used to generate blind box packaging information based on the hash value of the blind box information and the hash value of the target random number, and sign the blind box packaging information through the random number generator device to obtain the target blind box signature; A generation module, used to generate a digital collection blind box based on the digital collection blind box number, the blind box packaging information, the target blind box signature and the public key of the random number generator, and upload it to the blockchain; The first receiving module is further used to receive a random number certificate corresponding to the target random number sent by the random number generator device; The first processing module is also used to upload verification reference information to the blockchain when it is monitored that the blockchain changes the status of the digital collectible blind box to opened. The verification reference information includes: blind box information of the digital collectible blind box, the hash value of the target random number, and the random number certificate, so that the blockchain can verify the digital collectible blind box based on the verification reference information and the target random number uploaded by the random number generator device, and when the verification passes, obtain the scarcity attributes of the digital collectible blind box in multiple attribute dimensions based on the target random number mapping.
9. A device for generating a digital collection blind box, applied to a random number generator device, characterized in that: include: A second receiving module is used to receive a random number request carrying a target request number sent by an issuer device; A second processing module, configured to generate a target random number based on the target request number; A second sending module is used to send the hash value of the target random number to the issuer device, so that the issuer device generates blind box packaging information based on the hash value of the blind box information and the hash value of the target random number, and signs the blind box packaging information through the random number generator device to obtain the target blind box signature; And based on the digital collection blind box number, the blind box packaging information, the target blind box signature and the public key of the random number generator, generate a digital collection blind box and upload it to the blockchain; The second sending module is also used to send the random number certificate corresponding to the target random number to the issuing device, so that when the issuing device detects that the blockchain has changed the status of the digital collectible blind box to opened, the verification reference information is uploaded to the blockchain. The verification reference information includes: blind box information of the digital collectible blind box, the hash value of the target random number, and the random number certificate, so that the blockchain verifies the digital collectible blind box based on the verification reference information and the target random number uploaded by the random number generator device, and when the verification passes, the scarcity attributes of the digital collectible blind box in multiple attribute dimensions are obtained based on the target random number mapping.
10. A device for generating a blind box of digital collections, applied to blockchain, characterized in that: include: The third receiving module is used to receive a blind box of a digital collection uploaded by an issuer device, wherein the blind box of the digital collection includes a blind box number of the digital collection, blind box packaging information, a target blind box signature and a public key of a random number generator, wherein the blind box packaging information is generated by the issuer device based on a hash value of the blind box information and a hash value of a target random number, and the hash value of the target random number is generated by the random number generator device based on a target request number of a random number request sent by the issuer device; the target blind box signature is obtained by signing the blind box packaging information by the random number generator device; A verification module is used to verify the signature of the target blind box and the public key of the random number generator through the digital collection contract, and when the verification is passed, the digital collection blind box is put on the chain; The third receiving module is further used to receive an opening request for the digital collection blind box sent by the terminal device, and modify the status of the digital collection blind box in the digital collection contract to be opened; receive the verification reference information sent by the issuer device, the verification reference information includes: the blind box information of the digital collection blind box, the hash value of the target random number, and the random number certificate; receive the target random number uploaded by the random number generator device; The verification module is also used to verify the digital collectible blind box based on the verification reference information and the target random number, and when the verification passes, obtain the scarcity attributes of the digital collectible blind box in multiple attribute dimensions based on the target random number mapping; and send the scarcity attributes of the multiple attribute dimensions to the terminal device.
11. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of any one of the methods of claims 1 to 7 are implemented.
12. A computer-readable storage medium, characterized in that: It stores a computer program executable by a computer device. When the program is run on the computer device, the computer device executes the steps of any method described in claims 1 to 7.
Citation Information
Patent Citations
Digital identity signing and issuing method and device based on block chain and medium
CN111935075A
Blind box configuration method based on block chain and blind box selling system
CN113962778A