CN112910643A - Method and device for generating random number in block chain - Google Patents

Method and device for generating random number in block chain Download PDF

Info

Publication number
CN112910643A
CN112910643A CN202110233267.5A CN202110233267A CN112910643A CN 112910643 A CN112910643 A CN 112910643A CN 202110233267 A CN202110233267 A CN 202110233267A CN 112910643 A CN112910643 A CN 112910643A
Authority
CN
China
Prior art keywords
random number
block chain
intelligent contract
digest value
preset time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110233267.5A
Other languages
Chinese (zh)
Other versions
CN112910643B (en
Inventor
穆长春
狄刚
钱友才
陈庆接
杜金钊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Digital Currency Institute of the Peoples Bank of China
Original Assignee
Digital Currency Institute of the Peoples Bank of China
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 Digital Currency Institute of the Peoples Bank of China filed Critical Digital Currency Institute of the Peoples Bank of China
Priority to CN202110233267.5A priority Critical patent/CN112910643B/en
Publication of CN112910643A publication Critical patent/CN112910643A/en
Priority to PCT/CN2022/079062 priority patent/WO2022184137A1/en
Priority to US18/280,202 priority patent/US20240146509A1/en
Priority to EP22762599.3A priority patent/EP4304131A1/en
Application granted granted Critical
Publication of CN112910643B publication Critical patent/CN112910643B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method and a device for generating random numbers in a block chain, and relates to the technical field of computers. One embodiment of the method comprises: at least one block chain node locally generates a first random number and a first abstract value of the first random number respectively; within a first preset time length, the at least one block chain node submits the first abstract value to an intelligent contract of the block chain respectively; within a second preset time length started after the first preset time length is timed, submitting the first random number to the intelligent contract by the at least one block chain node; the intelligent contract checks the received at least one first abstract value and the first random number corresponding to the first abstract value; generating a second random number according to the first random number successfully verified; and starting the service according to the second random number. The implementation method improves the reliability of the random number, and further ensures the fairness of the service result.

Description

Method and device for generating random number in block chain
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for generating random numbers in a block chain.
Background
Random numbers have many application scenarios in block chains, such as generation of private keys and guessing-type applications. With the continuous development of the block chain, the application of random numbers in the block chain will continue to increase. Therefore, how to generate reliable random numbers in the blockchain is important for the security of the assets in the blockchain and the fairness of the applications.
The common random number generation method in the prior art is as follows: the block producer computes the random number based on the hash value of one or more blocks in the block chain as its random number seed.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: the block producer may adjust the random number by adding or discarding part of the transaction, that is, there is a possibility that the block producer may cheat in the random number generation process, which results in a low reliability of the generated random number.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for generating a random number in a block chain, where each block chain node in the block chain first generates a first random number and a first digest value of the first random number locally, and then submits the first digest value and the first random number to an intelligent contract in two stages (a first preset duration and a second preset duration), where the intelligent contract checks the received first digest value and a corresponding first random number thereof, and generates a second random number according to the first random number that is successfully checked. Therefore, the first abstract value and the first random number are submitted to the intelligent contract respectively through two stages, and the intelligent contract verifies the first abstract value and the first random number, so that the possibility of cheating in the random number generation process is avoided, and the reliability of the random number is improved. Furthermore, the service is started according to the generated credible random number, so that the randomness of the service result can be ensured, the possibility of cheating caused by human intervention is avoided, and the fairness of the service result is ensured.
To achieve the above object, according to an aspect of an embodiment of the present invention, a method for generating a random number in a block chain is provided.
The method for generating the random number in the block chain comprises the following steps: at least one block chain node locally generates a first random number and a first abstract value of the first random number respectively;
within a first preset time length, the at least one block chain node submits the first abstract value to an intelligent contract of the block chain respectively;
within a second preset time length started after the first preset time length is timed, submitting the first random number to the intelligent contract by the at least one block chain node;
the intelligent contract checks the received at least one first abstract value and the first random number corresponding to the first abstract value;
generating a second random number according to the first random number successfully verified;
and starting the service according to the second random number.
Optionally, when the intelligent contract determines that the number of the first random numbers successfully verified is not less than a preset number threshold, the second random number is generated according to the first random numbers successfully verified.
Optionally, the generating a second random number according to the first random number successfully verified includes:
and calculating the first random number successfully verified according to a preset algorithm to generate the second random number.
Optionally, the generating a second random number according to the first random number successfully verified includes:
the intelligent contract determines a blockchain node which submits the first random number at last from the at least one blockchain node; and calculating the digest value of the blockchain node which submits the first random number last and the first random number which is verified successfully according to a preset algorithm to generate the second random number.
Optionally, in the second preset time duration, each time the intelligent contract receives one first random number, determining whether a first digest value corresponding to the first random number has been received, where the first digest value is received in the first preset time duration; if yes, checking the first random number and the corresponding first abstract value;
when the verification is successful, the number of the first random numbers which are successfully verified is increased;
and when the verification fails, the intelligent contract sends prompt information so that the block chain node submitting the first random number resubmits the first random number within the second preset time length according to the prompt information.
Optionally, the checking, by the intelligent contract, the received at least one first digest value and the first random number corresponding to the first digest value includes:
for each pair of the first digest value and first random number: the intelligent contract generates a second abstract value according to the first random number; wherein the algorithms for generating the first digest value and the second digest value are the same;
and when the second digest value is the same as the first digest value, determining that the first digest value and the corresponding first random number are verified successfully.
Optionally, the method further comprises:
and the intelligent contract determines the block chain node corresponding to the first random number which is successfully verified, and sends virtual resources to the determined block chain node.
Optionally, the preset number threshold is determined according to the number of the at least one blockchain node.
Optionally, the starting a service according to the second random number includes:
receiving at least one option submitted by the blockchain nodes respectively;
and starting a selection service to determine a target selection item from the selection items respectively submitted by the at least one block chain link point according to the second random number.
Optionally, the method further comprises:
and sending the virtual resource to the block chain node submitting the target option.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided an apparatus for generating a random number in a block chain.
The device for generating the random number in the block chain in the embodiment of the invention comprises: the system comprises a local generation module, a submission module, a random number generation module and a service starting module; wherein the content of the first and second substances,
the local generation module is configured to locally generate a first random number and a first digest value of the first random number by using at least one block link point;
the submitting module is used for submitting the first abstract values to the intelligent contracts of the block chains by using the at least one block chain node within a first preset time length; within a second preset time length started after the first preset time length is timed, submitting the first random number to the intelligent contract by using the at least one block chain node;
the random number generation module is used for verifying at least one received first abstract value and the first random number corresponding to the first abstract value by using the intelligent contract and generating a second random number according to the successfully verified first random number;
and the service starting module is used for starting the service according to the second random number.
Optionally, the random number generating module is configured to generate the second random number according to the first random number successfully verified when the intelligent contract determines that the number of the first random numbers successfully verified is not less than a preset number threshold.
Optionally, the random number generating module is configured to calculate the first random number successfully verified according to a preset pre-algorithm to generate the second random number.
Optionally, the random number generation module is configured to determine, from the at least one blockchain node, a blockchain node that last submitted the first random number by using the intelligent contract; and calculating the digest value of the blockchain node which submits the first random number last and the first random number which is verified successfully according to a preset algorithm to generate the second random number.
Optionally, the random number generating module is configured to determine, within the second preset time duration, whether a first digest value corresponding to the first random number has been received every time the intelligent contract receives one first random number, where the first digest value is received within the first preset time duration; if yes, checking the first random number and the corresponding first abstract value; when the verification is successful, the number of the first random numbers which are successfully verified is increased; and when the verification fails, sending prompt information by using the intelligent contract, so that the block chain node which submits the first random number resubmits the first random number within the second preset time length according to the prompt information.
Optionally, the random number generating module is configured to, for each pair of the first digest value and the first random number: generating a second digest value according to the first random number by using the intelligent contract; wherein the algorithms for generating the first digest value and the second digest value are the same; and when the second digest value is the same as the first digest value, determining that the first digest value and the corresponding first random number are verified successfully.
Optionally, the random number generation module is further configured to determine, by using the intelligent contract, a block link point corresponding to the first random number that is successfully verified, and send a virtual resource to the determined block link point.
Optionally, the preset number threshold is determined according to the number of the at least one blockchain node.
Optionally, the service starting module is configured to receive the selection items respectively submitted by at least one of the block chain nodes, and start a service selection to determine a target selection item from the selection items respectively submitted by the at least one of the block chain nodes according to the second random number.
Optionally, the service starting module is further configured to send a virtual resource to a block link node submitting the target option.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an electronic device that generates a random number in a block chain.
An electronic device for generating a random number in a block chain according to an embodiment of the present invention includes: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement a method for generating random numbers in a blockchain according to an embodiment of the present invention.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer-readable storage medium.
A computer-readable storage medium of an embodiment of the present invention stores thereon a computer program, which when executed by a processor implements a method for generating random numbers in a block chain of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: each block chain node in the block chain locally generates a first random number and a first abstract value of the first random number, then submits the first abstract value and the first random number to an intelligent contract in two stages (a first preset time and a second preset time), the intelligent contract checks the received first abstract value and the corresponding first random number, and generates a second random number according to the first random number which is successfully checked. Therefore, the first abstract value and the first random number are submitted to the intelligent contract respectively through two stages, and the intelligent contract verifies the first abstract value and the first random number, so that the possibility of cheating in the random number generation process is avoided, and the reliability of the random number is improved. Furthermore, the service is started according to the generated credible random number, so that the randomness of the service result can be ensured, the possibility of cheating caused by human intervention is avoided, and the fairness of the service result is ensured.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a diagram illustrating the main steps of a method for generating random numbers in a block chain according to an embodiment of the present invention;
FIG. 2 is a schematic time-axis diagram of a first preset duration and a second preset duration according to an embodiment of the present invention;
FIG. 3 is a schematic time-axis diagram of a first preset duration and a second preset duration according to an embodiment of the present invention;
fig. 4 is a schematic diagram of main steps of another method for generating random numbers in a block chain according to an embodiment of the present invention;
FIG. 5 is a block diagram of the main blocks of an apparatus for generating random numbers in a blockchain according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 7 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments of the present invention and the technical features of the embodiments may be combined with each other without conflict.
Fig. 1 is a schematic diagram illustrating the main steps of a method for generating random numbers in a block chain according to an embodiment of the present invention.
As shown in fig. 1, the method for generating a random number in a block chain according to an embodiment of the present invention mainly includes the following steps:
step S101: at least one blockchain node locally generates a first random number and a first digest value of the first random number respectively.
In the embodiment of the present invention, each block link point corresponds to a user address, and the user address may correspond to user information of a user or an address of a server.
When the random number is generated, the block link point in the block chain first generates a first random number locally, and may generate a first digest value of the first random number through a secure hash algorithm, for example, generate a first digest value corresponding to the first random number through a sha256 algorithm. For convenience of description, the first random number generated by the ith block link point in the block chain is denoted as kiWill k isiIs represented by a first abstract value of hi
Step S102: and within a first preset time length, the at least one block chain node submits the first abstract value to the intelligent contracts of the block chains respectively.
Step S103: and within a second preset time length started after the first preset time length is timed, the at least one block chain node submits the first random number to the intelligent contract.
Generating a first random number k at the ith block link point in the block chainiAnd a first digest value hiAnd then submitting h to the intelligent contract within a first preset time length according to the broadcast of the intelligent contractiOr actively submitting h to the intelligent contracti. For example, a first preset durationFor 15min, any blockchain node in the blockchain may submit its locally generated first digest value to the intelligent contract within the 15 min. After the 15min is finished, the intelligent contract mark enters a second preset duration.
After the first preset duration is over, the intelligent contract is started for a second preset duration, and the block link points cannot submit the first abstract values to the intelligent contract but submit the first random number to the intelligent contract. For example, if the second preset duration is also 15min, within 15min after the first preset duration ends, the block link point cannot submit the first digest value to the intelligent contract any more, and the ith block link node in the block chain may submit the first random number k to the intelligent contracti
It is understood that the first preset time period and the second preset time period may be the same time period or different time periods.
Submitting h the intelligent contract to the ith block link point within a first preset time length according to the broadcast of the intelligent contractiIn this case, the content broadcast by the smart contract may include: and starting to submit prompt information of the first abstract value and first preset time, wherein the starting point of the first preset time is the time when the intelligent contract sends out the broadcast, so that each block chain node submits the first abstract value to the intelligent contract within the first preset time after receiving the broadcast of the intelligent contract. At the moment, the time axes of the first preset time length and the second preset time length and the received first abstract value h1A schematic of the time points of (a) can be seen in fig. 2. In FIG. 2, h1Indicating that the smart join received a first digest value h approximately within a first predetermined time period1,hnIndicating that the smart join received the last first digest value approximately within the first predetermined time period. k is a radical of1Is represented by the formula1Corresponding first random number, knIs represented by the formulanA corresponding first random number.
As shown in fig. 2, the sequence of receiving each first digest value and the corresponding first random number may not completely correspond to each other, that is, the first digest value (e.g., h) received first within a first preset time period1) And does not mean that the corresponding first random number (e.g., k) must be received within the second time period1) Each block chain node only needs to send the first abstract value within the first preset time length and send the first random number within the second preset time length, and the block chain node which sends the first abstract value first does not need to be guaranteed to send the first random number first. Of course, fig. 2 is only a schematic diagram that can be implemented, and in the embodiment of the present invention, there may be other situations, for example, the time when the last first digest value is received by the smart contract may also be the time when the first preset time length ends. For another example, the intelligent contract receives the first digest values and the first random numbers corresponding to the first digest values in sequence.
In addition, the intelligent contract is actively submitted to h in the first preset duration at the ith block link pointiIn this case, the intelligent aggregation starts timing a first preset time period when receiving the first digest value sent by the first blockchain node. That is, in this case, the starting point of the first preset duration is the time when the first digest value is received by the smart contract. At the moment, the time axes of the first preset time length and the second preset time length and the received first abstract value h1A schematic of the time points of (a) can be seen in fig. 3.
Step S104: the intelligent contract checks the received at least one first abstract value and the first random number corresponding to the first abstract value.
In one embodiment of the present invention, the smart contract may check the first digest value and the first random number submitted by the block link point as follows: determining whether a first abstract value corresponding to a first random number is received or not when the intelligent contract receives the first random number within a second preset time length, wherein the first abstract value is received within the first preset time length; if yes, checking the first random number and the corresponding first abstract value; when the verification is successful, the number of the first random numbers which are successfully verified is increased; and when the verification fails, the intelligent contract sends prompt information so that the block chain node submitting the first random number resubmits the first random number within the second preset time length according to the prompt information.
For example, after the second preset duration begins, when the intelligent contract receives the first random number k sent by the ith blockchain nodeiThen, the intelligent contract determines whether the first random number k has been received within a first preset time periodiCorresponding to hiIf the intelligent contract determines that the first random number k is received within the first preset time lengthiCorresponding to hiThen the intelligent contract can verify the pair of kiAnd hi
Specifically, in one embodiment of the present invention, the intelligent contract may check the first digest value and the first random number in the following manner, for each pair of the first digest value and the first random number: generating a second digest value according to the first random number; wherein the algorithms for generating the first digest value and the second digest value are the same; and when the second digest value is the same as the first digest value, determining that the first digest value and the corresponding first random number are verified successfully.
Still determining, by the smart contract, that the first random number k has been received within the first predetermined time periodiCorresponding to hiFor example, the smart contract calculates the first random number k at this timeiCorresponding second digest value h'i. It is worth mentioning that the first random number k is calculatediCorresponding second digest value h'iThe algorithm is based on the first random number kiCalculating a first digest value hiThe same algorithm is used. For example, the blockchain node locally calculates a first random number k through the sha256 algorithmiCorresponding first digest value hiThen, in the verification stage, the intelligent contract also calculates the first random number k by using the sha256 algorithmiCorresponding second digest value h'i. In order to facilitate the intelligent contract to check the received first digest value and the first random number, an algorithm for calculating the digest value corresponding to the first random number may be written into the intelligent contract in advance.
When the second abstract value is h'iAnd the first abstractValue hiWhen the same, determining a first abstract value hiAnd a first random number kiAnd when the verification is successful, the intelligent contract increments the number of the first random numbers successfully verified. For example, after checking the first digest value hiAnd a first random number kiBefore, the intelligent contract verifies the first abstract value and the first random number for i-1, and the verification is successful, namely the number of the successfully verified first random numbers is i-1. Then, for the first digest value hiAnd a first random number kiAfter the verification is performed, the number of the first random numbers successfully verified is incremented to i.
When the second abstract value is h'iAnd a first digest value hiWhen the two are not the same, determining a first abstract value hiAnd a first random number kiWhen the verification fails, the intelligent contract sends out prompt information to submit the first random number kiAnd the ith block link point resubmits the first random number within a second preset time length according to the prompt message so as to generate the credible random number.
Step S105: and generating a second random number according to the first random number successfully verified.
In order to further improve the reliability of generating the second random number, in an embodiment of the present invention, the second random number is generated according to the successfully verified first random number only when it is determined that the number of the successfully verified first random numbers is not less than the preset number threshold. Wherein the preset number threshold is determined according to the number of the at least one blockchain node. It is understood that when the number of the first random numbers successfully verified is less than the preset number threshold, the second random numbers cannot be generated. If the generation of the second random number is to be continued, at least one block link point is required to resubmit the first digest value and the first random number.
For example, the preset number threshold may be the total number of the at least one blockchain node. Because the at least one block chain node submits the first abstract value to the intelligent contract within the first preset time length, and the preset number threshold is the total number of the at least one block chain node, the intelligent contract can generate the second random number according to each submitted first random number only if the at least one block chain node is required to submit the first random number corresponding to the first abstract value within the second preset time length. That is to say, in this case, the first digest value is submitted within the first preset duration, the corresponding first random number must be submitted within the second preset duration, and the intelligent contract can generate the second random number.
In the above manner, the requirement on each block chain link point in the block chain is relatively strict, and if the block chain node submits the first digest value within the first preset time length and does not submit the corresponding first random number within the second preset time length, the second random number generation fails. Therefore, in order to increase the success rate of generating the trusted random number, in a preferred embodiment of the present invention, the preset number threshold is set to a value less than the total number (m) of at least one blockchain node, e.g. the preset number threshold is set to m/2 or 3 m/4. Therefore, when the intelligent contract determines that the number of the first random numbers successfully verified is not smaller than the preset number threshold, the second random numbers are generated directly according to the first random numbers successfully verified without verifying the first random numbers received later, and therefore the success rate and the efficiency of generating the second random numbers are improved.
Of course, after the intelligent contract verifies all the first random numbers received within the second preset time period, if n first random numbers are received within the second preset time period, the number of the first random numbers successfully verified is n-1, and n-1 is greater than the preset number threshold (assuming that the preset number threshold is n-5), the intelligent contract may generate the second random numbers according to the n-1 first random numbers successfully verified.
In an embodiment of the present invention, when the smart adaptor generates the second random number according to the first random number successfully verified, the smart adaptor may calculate the first random number successfully verified according to a preset algorithm to generate the second random number. The predetermined algorithm may be an or operation, an and operation, or an xor operation. Preferably, the embodiment of the present invention performs an exclusive or operation on the successfully verified first random number to generate a second random number.
In order to further improve the randomness of the second random number, the intelligent rule may further determine, from the at least one blockchain node, a blockchain node that last submitted the first random number when the second random number is generated; and then calculating the digest value of the blockchain node which submits the first random number last and the first random number which is verified successfully according to a preset algorithm to generate the second random number.
In this embodiment, the last block link point submitted with the first random number is: and in the successfully checked first random numbers, the last submission node of the first random number. For example, if n first random numbers are successfully checked, and the digest value of the blockchain node submitting the nth first random number is H, the intelligent contract may calculate the n first random numbers and H according to a preset algorithm to generate a second random number. The predetermined algorithm may be an or operation, an and operation, or an xor operation. Preferably, the embodiment of the present invention performs an exclusive or operation on the first random number successfully verified and the digest value H of the blockchain node that last submitted the first random number to generate the second random number.
In addition, in order to prompt generation of a random number for participation of each blockchain node in a blockchain, that is, prompt each blockchain node to send a first digest value within a first preset time period and send a first random number within a second preset time period, in an embodiment of the present invention, after the second random number is generated, a virtual resource may be sent to the blockchain link points corresponding to the first random number that is successfully verified through an intelligent contract, so as to release rewards to the blockchain link points, thereby prompting more blockchain link points to participate in generation of the second random number by sending the corresponding first digest value and the first random number within the first preset time period and the second preset time period.
Step S106: and starting the service according to the second random number.
It is to be understood that the generated trusted second random number may be applied to various services in the block chain, such as a private key generation service, a quiz-like service, a selection-like service, and the like.
The embodiment of the invention takes the selection type service as an example to explain the application of the trusted second random number. Various selection services such as generation of a sports lottery or a welfare lottery and generation of a winner, selection of a winner from a plurality of bidders having the same condition at the time of bidding, selection of a winner in a variety of activities such as a company annual meeting, a promotion activity or a promotion activity, etc. can be realized by random numbers in the block chain.
When the selection service is started, at least one selection item respectively submitted by at least one block chain link point can be received; and starting a selection service to determine a target selection item from the selection items respectively submitted by the at least one block chain link point according to the second random number.
In this example, the selection item submitted by the block link point is the selection corresponding to the block link point, taking the selection of a winner in a company meeting as an example, the selection item corresponds to the job number or other identification corresponding to each employee, and in the process of determining the target selection item according to the second random number, since the second random number is credible, the selection process is random, human intervention is avoided, and therefore, the process of selecting the target selection item according to the second random number is random and fair. It will be appreciated that the block link point corresponding to the selected target option is the block link point corresponding to the winner.
To ensure that the award delivery process is publicly trusted, in one embodiment of the invention, virtual resources may be sent to the block link points that submit targeted selections via smart contracts to deliver the awards to the winners. Therefore, the reward issuing process is also carried out in the block chain, and the authenticity and the credibility of the reward issuing process are ensured.
According to the above embodiment, as shown in fig. 4, the method for generating random numbers in a block chain according to an embodiment of the present invention may include the following steps:
step S401: at least one blockchain node locally generates a first random number and a first digest value of the first random number respectively.
Step S402: and within a first preset time length, the at least one block chain node submits the first abstract value to the intelligent contracts of the block chains respectively.
Step S403: and within a second preset time length started after the first preset time length is timed, the at least one block chain node submits the first random number to the intelligent contract.
Step S404: and in the second preset time length, when the intelligent contract receives one first random number every time, verifying the first random number according to a first abstract value corresponding to the first random number received in the first preset time length, and when the verification is successful, executing the step S405 and when the verification is failed, executing the step S406.
Step S405: the number of the first random numbers for which the verification is successful is incremented, and step S407 is performed.
Step S406: and the intelligent contract sends prompt information to ensure that the block chain node which submits the first random number resubmits the first random number within the second preset time length according to the prompt information, and step S404 is executed.
Step S407: and when the intelligent contract determines that the number of the first random numbers successfully verified is not less than a preset number threshold, calculating the first random numbers successfully verified according to an exclusive-or operation to generate the second random numbers.
Step S408: and receiving at least one option submitted by the blockchain nodes respectively.
Step S409: and starting a selection service to determine a target selection item from the selection items respectively submitted by the at least one block chain link point according to the second random number.
Step S410: and sending the virtual resource to the block chain node submitting the target option.
According to the method for generating the random number in the block chain, provided by the embodiment of the invention, each block chain node in the block chain locally generates the first random number and the first abstract value of the first random number, and then submits the first abstract value and the first random number to the intelligent contract in two stages (the first preset time and the second preset time), and the intelligent contract checks the received first abstract value and the corresponding first random number and generates the second random number according to the first random number which is successfully checked. Therefore, the first abstract value and the first random number are submitted to the intelligent contract respectively through two stages, and the intelligent contract verifies the first abstract value and the first random number, so that the possibility of cheating in the random number generation process is avoided, and the reliability of the random number is improved. Furthermore, the service is started according to the generated credible random number, so that the randomness of the service result can be ensured, the possibility of cheating caused by human intervention is avoided, and the fairness of the service result is ensured.
Fig. 5 is a schematic diagram illustrating major blocks of an apparatus for generating random numbers in a block chain according to an embodiment of the present invention.
As shown in fig. 5, an apparatus 500 for generating random numbers in a block chain according to an embodiment of the present invention includes: a local generation module 501, a submission module 502, a random number generation module 503 and a service starting module 504; wherein the content of the first and second substances,
the local generation module 501 is configured to locally generate a first random number and a first digest value of the first random number by using at least one block link point;
the submitting module 502 is configured to submit the first digest value to the intelligent contracts of the blockchains by using the at least one blockchain node within a first preset duration; within a second preset time length started after the first preset time length is timed, submitting the first random number to the intelligent contract by using the at least one block chain node;
the random number generating module 503 is configured to verify, by using the intelligent contract, the received at least one first digest value and the first random number corresponding to the first digest value, and generate a second random number according to the first random number that is successfully verified;
the service starting module 504 is configured to start a service according to the second random number.
In an embodiment of the present invention, the random number generating module 503 is configured to generate the second random number according to the first random number that is successfully checked when the intelligent contract determines that the number of the first random numbers that are successfully checked is not less than a preset number threshold.
In an embodiment of the present invention, the random number generating module 503 is configured to calculate the first random number successfully verified according to a preset algorithm to generate the second random number.
In an embodiment of the present invention, the random number generation module 503 is configured to determine, from the at least one blockchain node, a blockchain node that last submits the first random number by using the intelligent contract; and calculating the digest value of the blockchain node which submits the first random number last and the first random number which is verified successfully according to a preset algorithm to generate the second random number.
In an embodiment of the present invention, the random number generating module 503 is configured to determine, within the second preset time duration, when the intelligent contract receives each first random number, whether a first digest value corresponding to the first random number has been received, where the first digest value is received within the first preset time duration; if yes, checking the first random number and the corresponding first abstract value; when the verification is successful, the number of the first random numbers which are successfully verified is increased; and when the verification fails, sending prompt information by using the intelligent contract, so that the block chain node which submits the first random number resubmits the first random number within the second preset time length according to the prompt information.
In an embodiment of the present invention, the random number generating module 503 is configured to, for each pair of the first digest value and the first random number: generating a second digest value according to the first random number by using the intelligent contract; wherein the algorithms for generating the first digest value and the second digest value are the same; and when the second digest value is the same as the first digest value, determining that the first digest value and the corresponding first random number are verified successfully.
In an embodiment of the present invention, the random number generating module 503 is further configured to determine, by using the intelligent contract, a block link point corresponding to the first random number that is successfully verified, and send a virtual resource to the determined block link point.
In one embodiment of the present invention, the preset number threshold is determined according to the number of the at least one blockchain node.
In an embodiment of the present invention, the service initiation module 504 is configured to receive the options respectively submitted by at least one of the block chain nodes, and initiate a selection service, so as to determine a target option from the options respectively submitted by the at least one of the block chain nodes according to the second random number.
In an embodiment of the present invention, the service initiation module 504 is further configured to send a virtual resource to a block link node submitting the target option.
According to the device for generating the random number in the block chain, which is disclosed by the embodiment of the invention, each block chain node in the block chain respectively generates the first random number and the first abstract value of the first random number locally, then the first abstract value and the first random number are respectively submitted to the intelligent contract in two stages (the first preset duration and the second preset duration), the intelligent contract checks the received first abstract value and the corresponding first random number, and generates the second random number according to the first random number which is successfully checked. Therefore, the first abstract value and the first random number are submitted to the intelligent contract respectively through two stages, and the intelligent contract verifies the first abstract value and the first random number, so that the possibility of cheating in the random number generation process is avoided, and the reliability of the random number is improved. Furthermore, the service is started according to the generated credible random number, so that the randomness of the service result can be ensured, the possibility of cheating caused by human intervention is avoided, and the fairness of the service result is ensured.
Fig. 6 shows an exemplary system architecture 600 of a method for generating random numbers in a blockchain or an apparatus for generating random numbers in a blockchain, to which embodiments of the present invention can be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. Various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, and the like, may be installed on the terminal devices 601, 602, and 603.
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 605 may be a server that provides various services, such as a background management server that supports shopping websites browsed by users using the terminal devices 601, 602, and 603. The background management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (e.g., target push information and product information) to the terminal device.
It should be noted that the method for generating random numbers in a blockchain provided by the embodiment of the present invention is generally executed by the server 605, and accordingly, a device for generating random numbers in a blockchain is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a local generation module, a submission module, a random number generation module, and a service initiation module. The names of these modules do not constitute a limitation to the module itself in some cases, and for example, the random number generation module may also be described as a "module that generates a second random number from a first random number that is successfully verified".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: at least one block chain node locally generates a first random number and a first abstract value of the first random number respectively; within a first preset time length, the at least one block chain node submits the first abstract value to an intelligent contract of the block chain respectively; within a second preset time length started after the first preset time length is timed, submitting the first random number to the intelligent contract by the at least one block chain node; the intelligent contract checks the received at least one first abstract value and the first random number corresponding to the first abstract value; generating a second random number according to the first random number successfully verified; and starting the service according to the second random number.
According to the technical scheme of the embodiment of the invention, each block chain node in a block chain locally generates a first random number and a first abstract value of the first random number respectively, then the first abstract value and the first random number are submitted to an intelligent contract in two stages (a first preset time and a second preset time), the intelligent contract checks the received first abstract value and the corresponding first random number, and generates a second random number according to the first random number which is successfully checked. Therefore, the first abstract value and the first random number are submitted to the intelligent contract respectively through two stages, and the intelligent contract verifies the first abstract value and the first random number, so that the possibility of cheating in the random number generation process is avoided, and the reliability of the random number is improved. Furthermore, the service is started according to the generated credible random number, so that the randomness of the service result can be ensured, the possibility of cheating caused by human intervention is avoided, and the fairness of the service result is ensured.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (22)

1. A method for generating random numbers in a block chain is characterized by comprising the following steps:
at least one block chain node locally generates a first random number and a first abstract value of the first random number respectively;
within a first preset time length, the at least one block chain node submits the first abstract value to an intelligent contract of the block chain respectively;
within a second preset time length started after the first preset time length is timed, submitting the first random number to the intelligent contract by the at least one block chain node;
the intelligent contract checks the received at least one first abstract value and the first random number corresponding to the first abstract value;
generating a second random number according to the first random number successfully verified;
and starting the service according to the second random number.
2. The method of claim 1,
and when the intelligent contract determines that the number of the first random numbers successfully verified is not less than a preset number threshold, generating the second random numbers according to the first random numbers successfully verified.
3. The method of claim 1, wherein generating a second random number according to the first random number successfully verified comprises:
and calculating the first random number successfully verified according to a preset algorithm to generate the second random number.
4. The method of claim 1, wherein generating a second random number according to the first random number successfully verified comprises:
the intelligent contract determines a blockchain node which submits the first random number at last from the at least one blockchain node; and calculating the digest value of the blockchain node which submits the first random number last and the first random number which is verified successfully according to a preset algorithm to generate the second random number.
5. The method of claim 1,
determining whether a first abstract value corresponding to a first random number is received or not when the intelligent contract receives the first random number within the second preset time length, wherein the first abstract value is received within the first preset time length; if yes, checking the first random number and the corresponding first abstract value;
when the verification is successful, the number of the first random numbers which are successfully verified is increased;
and when the verification fails, the intelligent contract sends prompt information so that the block chain node submitting the first random number resubmits the first random number within the second preset time length according to the prompt information.
6. The method of claim 1, wherein the smart contract checking the received at least one first digest value and the first random number corresponding to the first digest value comprises:
for each pair of the first digest value and first random number: the intelligent contract generates a second abstract value according to the first random number; wherein the algorithms for generating the first digest value and the second digest value are the same;
and when the second digest value is the same as the first digest value, determining that the first digest value and the corresponding first random number are verified successfully.
7. The method of claim 1, further comprising:
and the intelligent contract determines the block chain node corresponding to the first random number which is successfully verified, and sends virtual resources to the determined block chain node.
8. The method of claim 2, wherein the preset number threshold is determined according to the number of the at least one blockchain node.
9. The method of claim 1, wherein the initiating the service according to the second random number comprises:
receiving at least one option submitted by the blockchain nodes respectively;
and starting a selection service to determine a target selection item from the selection items respectively submitted by the at least one block chain link point according to the second random number.
10. The method of claim 9, further comprising:
and sending the virtual resource to the block chain node submitting the target option.
11. An apparatus for generating random numbers in a block chain, comprising: the system comprises a local generation module, a submission module, a random number generation module and a service starting module; wherein the content of the first and second substances,
the local generation module is configured to locally generate a first random number and a first digest value of the first random number by using at least one block link point;
the submitting module is used for submitting the first abstract values to the intelligent contracts of the block chains by using the at least one block chain node within a first preset time length; within a second preset time length started after the first preset time length is timed, submitting the first random number to the intelligent contract by using the at least one block chain node;
the random number generation module is used for verifying at least one received first abstract value and the first random number corresponding to the first abstract value by using the intelligent contract and generating a second random number according to the successfully verified first random number;
and the service starting module is used for starting the service according to the second random number.
12. The apparatus of claim 11,
and the random number generation module is used for generating the second random number according to the first random number successfully verified when the intelligent contract determines that the number of the first random numbers successfully verified is not less than a preset number threshold.
13. The apparatus of claim 11,
the random number generation module is configured to calculate the first random number successfully verified according to a preset pre-algorithm to generate the second random number.
14. The apparatus of claim 11,
the random number generation module is used for determining a block chain node which submits the first random number finally from the at least one block chain node by using the intelligent contract; and calculating the digest value of the blockchain node which submits the first random number last and the first random number which is verified successfully according to a preset algorithm to generate the second random number.
15. The apparatus of claim 11,
the random number generation module is configured to determine, within the second preset time duration, whether a first digest value corresponding to the first random number has been received every time the intelligent contract receives one first random number, where the first digest value is received within the first preset time duration; if yes, checking the first random number and the corresponding first abstract value; when the verification is successful, the number of the first random numbers which are successfully verified is increased; and when the verification fails, sending prompt information by using the intelligent contract, so that the block chain node which submits the first random number resubmits the first random number within the second preset time length according to the prompt information.
16. The apparatus of claim 11,
the random number generation module is configured to, for each pair of the first digest value and the first random number: generating a second digest value according to the first random number by using the intelligent contract; wherein the algorithms for generating the first digest value and the second digest value are the same; and when the second digest value is the same as the first digest value, determining that the first digest value and the corresponding first random number are verified successfully.
17. The apparatus of claim 11,
the random number generation module is further configured to determine, by using the intelligent contract, a block link point corresponding to the first random number that is successfully verified, and send a virtual resource to the determined block link point.
18. The apparatus of claim 12,
the preset number threshold is determined according to the number of the at least one blockchain node.
19. The apparatus of claim 10,
the service starting module is configured to receive the selection items respectively submitted by at least one block chain node, and start a selection service to determine a target selection item from the selection items respectively submitted by the at least one block chain node according to the second random number.
20. The apparatus of claim 19,
and the service starting module is also used for sending the virtual resources to the block nodes submitting the target selection items.
21. An electronic device for generating random numbers in a block chain, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-10.
22. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-10.
CN202110233267.5A 2021-03-03 2021-03-03 Method and device for generating random number in block chain Active CN112910643B (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN202110233267.5A CN112910643B (en) 2021-03-03 2021-03-03 Method and device for generating random number in block chain
PCT/CN2022/079062 WO2022184137A1 (en) 2021-03-03 2022-03-03 Method and apparatus for generating random numbers in blockchain
US18/280,202 US20240146509A1 (en) 2021-03-03 2022-03-03 Method and Apparatus for Generating Random Number in Blockchain
EP22762599.3A EP4304131A1 (en) 2021-03-03 2022-03-03 Method and apparatus for generating random numbers in blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110233267.5A CN112910643B (en) 2021-03-03 2021-03-03 Method and device for generating random number in block chain

Publications (2)

Publication Number Publication Date
CN112910643A true CN112910643A (en) 2021-06-04
CN112910643B CN112910643B (en) 2023-04-07

Family

ID=76107509

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110233267.5A Active CN112910643B (en) 2021-03-03 2021-03-03 Method and device for generating random number in block chain

Country Status (1)

Country Link
CN (1) CN112910643B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022184137A1 (en) * 2021-03-03 2022-09-09 中国人民银行数字货币研究所 Method and apparatus for generating random numbers in blockchain

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109558112A (en) * 2018-11-14 2019-04-02 杭州复杂美科技有限公司 Random digit generation method, anti-cheating block catenary system, equipment and storage medium
CN110430045A (en) * 2019-07-17 2019-11-08 上海朝夕网络技术有限公司 A kind of random digit generation method based on distributed common recognition algorithm
CN110868286A (en) * 2018-12-29 2020-03-06 北京版全家科技发展有限公司 Method for generating random number based on block chain intelligent contract
CN111327427A (en) * 2020-02-02 2020-06-23 腾讯科技(深圳)有限公司 Method, device, node equipment, system and storage medium for submitting alternative blocks
WO2020146955A1 (en) * 2019-01-18 2020-07-23 Zeu Crypto Networks Inc. A method for generating random numbers in blockchain smart contracts

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109558112A (en) * 2018-11-14 2019-04-02 杭州复杂美科技有限公司 Random digit generation method, anti-cheating block catenary system, equipment and storage medium
CN110868286A (en) * 2018-12-29 2020-03-06 北京版全家科技发展有限公司 Method for generating random number based on block chain intelligent contract
WO2020146955A1 (en) * 2019-01-18 2020-07-23 Zeu Crypto Networks Inc. A method for generating random numbers in blockchain smart contracts
CN110430045A (en) * 2019-07-17 2019-11-08 上海朝夕网络技术有限公司 A kind of random digit generation method based on distributed common recognition algorithm
CN111327427A (en) * 2020-02-02 2020-06-23 腾讯科技(深圳)有限公司 Method, device, node equipment, system and storage medium for submitting alternative blocks

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022184137A1 (en) * 2021-03-03 2022-09-09 中国人民银行数字货币研究所 Method and apparatus for generating random numbers in blockchain

Also Published As

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

Similar Documents

Publication Publication Date Title
US20220239496A1 (en) Blockchain consensus method, device and system
US20220138737A1 (en) Computer-implemented systems and methods for implementing transfers over a blockchain network
US9923906B2 (en) System, method and computer program product for access authentication
EP3329446A1 (en) Verifying ad requests
EP3812997B1 (en) Blockchain-based data processing method and apparatus, and server
CN110445615A (en) Network request security verification method, device, medium and electronic equipment
US20220217004A1 (en) Systems and methods for non-parallelised mining on a proof-of-work blockchain network
CN110753105A (en) Data transmission method, device, system, electronic equipment and storage medium
CN112910643B (en) Method and device for generating random number in block chain
CN108449186B (en) Security verification method and device
CN112181599B (en) Model training method, device and storage medium
CN112968769B (en) Method and device for generating random number in block chain
CN112905990A (en) Access method, client, server and access system
CN115619395A (en) Data processing method based on block chain and related equipment
US20120331040A1 (en) Validating download success
EP4365808A1 (en) Data verification method and apparatus
CN114338051B (en) Method, device, equipment and medium for acquiring random number by block chain
CN110688677B (en) Method and device for executing intelligent contracts
EP4304131A1 (en) Method and apparatus for generating random numbers in blockchain
CN114328731A (en) Information processing method, device, electronic equipment and storage medium
CN114461912A (en) Information processing method and device, electronic equipment and storage medium
CN108833418B (en) Method, device and system for defending attack
CN111786936A (en) Method and device for authentication
CN115037507B (en) User access management method, device and system
CN109787990A (en) A kind of method and device for verifying mail

Legal Events

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