WO2020042775A1 - 一种基于区块链的随机对象选取方法和装置 - Google Patents

一种基于区块链的随机对象选取方法和装置 Download PDF

Info

Publication number
WO2020042775A1
WO2020042775A1 PCT/CN2019/095540 CN2019095540W WO2020042775A1 WO 2020042775 A1 WO2020042775 A1 WO 2020042775A1 CN 2019095540 W CN2019095540 W CN 2019095540W WO 2020042775 A1 WO2020042775 A1 WO 2020042775A1
Authority
WO
WIPO (PCT)
Prior art keywords
candidate
period
blockchain
transaction
reference number
Prior art date
Application number
PCT/CN2019/095540
Other languages
English (en)
French (fr)
Inventor
张文彬
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2020042775A1 publication Critical patent/WO2020042775A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0212Chance discounts or incentives

Definitions

  • This specification relates to the technical field of data processing, and in particular, to a method and a device for selecting a random object based on a blockchain.
  • Random object selection is often used in a computer to randomly allocate resources, randomly assign tasks, or any other required business scenario.
  • a random selection method based on a computer or server is difficult to ensure the fairness and verifiability of the random selection process because The selection method implemented by the computer or server is very easy to be manipulated by humans, it is difficult to achieve a true "random" selection, and it is difficult for the outside world to monitor and verify whether the selection method implemented by it is not manipulated during and after the event.
  • one or more embodiments of the present specification provide a method and an apparatus for selecting a random object based on a blockchain, and an electronic device.
  • a random object selection method based on a blockchain is proposed, which is applied to a blockchain that includes multiple candidate object nodes, and the method includes:
  • values corresponding to a plurality of participating object nodes are respectively calculated based on a characteristic value of a designated event and an object reference number corresponding to a participating transaction, wherein the feature value of the designated event is according to a preset mapping algorithm , A characteristic value calculated for a specified event occurring after the first period, the characteristic value of the specified event cannot be predicted before the specified event occurs;
  • a candidate object node is selected based on values corresponding to the multiple candidate object nodes.
  • a random object selection device based on a blockchain which is applied to a blockchain including multiple candidate object nodes, and the device includes:
  • a receiving unit which receives a plurality of candidate transactions published by the candidate object nodes to the distributed database of the blockchain within a first period, and the candidate transactions are generated based on an object reference number determined by the candidate object nodes;
  • the calculation unit calculates values corresponding to a plurality of participating object nodes respectively based on a preset calculation rule based on the feature value of the designated event and the object reference number corresponding to the participating transaction, wherein the feature value of the designated event is according to a preset A mapping algorithm for calculating a characteristic value of a specified event that occurs after the first period, and the characteristic value of the specified event cannot be predicted before the specified event occurs;
  • the selecting unit selects the candidate object node based on the values corresponding to the multiple candidate object nodes according to a preset selection rule.
  • this specification also provides a computer device including: a memory and a processor; the memory stores a computer program executable by the processor; and when the processor runs the computer program, the above-mentioned block-based execution is performed. Random object selection method for chain.
  • This specification also provides a computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, the steps described in the above-mentioned random object selection method based on the blockchain are performed.
  • the random object selection method and device based on the blockchain rely on the object reference number provided by the candidate object and the characteristic values of the unpredictable and specified events that occur later. This ensures that the selection process avoids the possibility of human manipulation and changing the results: based on the distributed database storage mechanism of the blockchain technology, the reference number of the object selected and published by the candidate is decentralized recorded or stored in the block In all the nodes of the chain, and based on the consensus mechanism of the blockchain, the reference number of the object issued by each candidate object will not be tampered with after being provided, preventing the selection process from being manipulated by modifying the object reference number of the candidate object; further Ground, the designated event will only occur after the object reference number provision phase ends, and its characteristic value is unpredictable before the designated event occurs.
  • the candidate cannot be predicted and selected based on a preset rule and the characteristic value.
  • Appropriate object reference number so as to ensure that the provision of the object reference number is truly random, thereby ensuring the integrity Randomly selected objects randomness and fairness of the process, but also during and after the outside world and can monitor every step of the verification process.
  • FIG. 1 is a flowchart of a random object selection method based on a blockchain, according to an embodiment provided in the present specification
  • FIG. 2 is a schematic process diagram of a random object selection method provided by an exemplary embodiment of the present specification
  • FIG. 3 is a schematic diagram of a random object selection device based on a blockchain provided by an embodiment of the present specification
  • FIG. 4 is a hardware structure diagram of an embodiment of a random object selection device based on a blockchain provided in this specification.
  • the steps of the corresponding method are not necessarily performed in the order shown and described in this specification.
  • the method may include more or fewer steps than described in this specification.
  • a single step described in this specification may be divided into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for other embodiments. description.
  • an exemplary embodiment of the present specification provides a random object selection method based on a blockchain, which is applied to a blockchain that includes multiple candidate object nodes.
  • the method includes:
  • a plurality of candidate transaction nodes receive, during a first period of time, a candidate transaction issued to the distributed database of the blockchain, and the candidate transaction is generated based on an object reference number selected by the candidate object node.
  • the blockchain described in the above embodiment may specifically refer to a P2P network system with a distributed data storage structure reached by each node through a consensus mechanism.
  • the data in the blockchain is distributed in time-linked “zones” Within the “block", the latter block contains the data summary of the previous block, and according to the specific consensus mechanism (such as POW, POS, DPOS, or PBFT), a full backup of all or part of the node's data is achieved. .
  • the specific consensus mechanism such as POW, POS, DPOS, or PBFT
  • the blockchain using Pow consensus requires at least the entire network An attack with 51% computing power is likely to tamper with the existing data. Therefore, the blockchain system has the characteristics of ensuring data security and preventing tampering as compared with other centralized database systems. From this, it can be known that in the embodiments provided in this specification, the data collected in the distributed database of the blockchain will not be attacked or tampered with, thereby ensuring the accuracy of the object reference number selected by the candidate object node. Authenticity.
  • the candidate nodes described in the above embodiments may be blockchain nodes, blockchain light nodes participating in the random object selection process described in this specification, and may also be other device terminals or customers connected to the nodes of the blockchain. It is not limited in this specification.
  • the "blockchain node” or “node” described in this specification may include node devices in a blockchain network, Light node equipment, other equipment terminals, or clients will not be described in detail below.
  • the object reference number determined by the candidate object node in the foregoing embodiment may be any value determined or selected by the candidate object, and is not limited in this specification.
  • Candidate transactions are generated based on the above-mentioned object reference numbers.
  • the transaction described in this specification refers to a transaction that is created by a user through a blockchain client and needs to be finally released to the blockchain's distributed database. data.
  • the transactions in the blockchain are divided into narrow transactions and broad transactions.
  • a narrow transaction refers to a value transfer issued by a user to the blockchain; for example, in a traditional Bitcoin blockchain network, a transaction can be a transfer initiated by a user in the blockchain.
  • the generalized transaction refers to a piece of business data with a business intention issued by the user to the blockchain; for example, the participation book generated based on the object reference number issued to the above-mentioned blockchain as described in the above embodiment of this specification
  • the above-mentioned candidate transaction may also have a predetermined data content format, which is not limited in this specification.
  • the first period of time described in the above embodiment may be a period of physical time with a specific physical start time and physical end time, or a period of start time and resolution time determined by two events with a logical sequence.
  • the logical time may have both, and is not limited in this specification.
  • the first period of time can be expressed from 00:00 on January 1, 2018 to 24:00 on June 30, 2018, or it can be expressed from the time when the block with a height of 10,000 in the Bitcoin blockchain is generated to The generation time of blocks with a Bitcoin blockchain height of 20,000 ends, and so on.
  • the above-mentioned candidate transaction may include the plain text of the object reference number issued by the candidate object. Since the transactions issued by each node device in the blockchain to the blockchain are open and transparent, the above implementation The solution is usually used in calculation and selection rules that do not affect the object reference numbers provided by itself even if the object reference numbers of other participating object nodes are known.
  • the first period of time can be divided into at least two stages.
  • the candidate object node publishes the first candidate transaction to the distributed database of the blockchain, and the first candidate transaction includes the encrypted object reference number; Even if the ciphertext of the object reference number on the chain is known by other participating object nodes, other participating object nodes cannot know the actual value of the object reference number, thereby ensuring the fairness of the object reference number issue stage.
  • the candidate object node publishes a second candidate transaction to the above-mentioned distributed database of the blockchain.
  • the second candidate transaction includes the decrypted object reference number to disclose itself.
  • the reference number of encrypted objects issued by the node in the first sub-period; and the second sub-period is the period after the end of the first sub-period, and during this second sub-period, each candidate object node can no longer send The first candidate transaction, therefore, effectively prevents the candidate object node from modifying the object reference number that has not been released by itself based on the object reference numbers disclosed by other candidate object nodes; the encrypted object reference number can be used by
  • the description of the decrypted object reference number guarantees that the decrypted object reference number released by the candidate in the second sub-period is indeed the encrypted object reference number released in the first sub-period, preventing the candidate object from being in the second sub-period. Tamper with the reference number of the object released by itself in the first time period
  • the object reference number determined by the candidate object node is one or more random numbers
  • the object reference number determined by the candidate object node is one or more random numbers
  • those skilled in the art can easily think of the encrypted object reference number included in the first candidate exchange. It may be a Pedersen commitment based on the one or more random numbers
  • the decrypted object reference number included in the second candidate exchange may be the one or more random numbers.
  • Step 104 Calculate the corresponding values of multiple participating object nodes respectively based on the characteristic value of the designated event and the object reference number corresponding to the participating transaction according to a preset calculation rule, wherein the characteristic value of the designated event is according to a preset
  • the mapping algorithm is based on a characteristic value calculated for a specified event that occurs after the first period, and the characteristic value of the specified event cannot be predicted before the specified event occurs.
  • the values corresponding to the plurality of candidate object nodes described in the above embodiment are reference values used to select the plurality of candidate objects, and this specification does not limit the specific algorithm of the preset calculation rule.
  • the specified event described in the above embodiment is a specified event that occurs after the end of the first period.
  • the specified event is based on a characteristic value calculated by a preset mapping algorithm, and cannot be predicted before the specified event occurs. For example, when the block output rate of a blockchain is maintained at a very stable value, the block height of the blockchain after a fixed period of time is a predictable value, then the above block height cannot be used as a designated event.
  • Characteristic value although the block height value can be predicted, the block hash value of the block is unpredictable, so the hash value of the new block after a fixed period of time, or the future new block at a specified height
  • the hash value of can be used as the feature value of the specified event to participate in the calculation of the values corresponding to the plurality of candidate object nodes.
  • the designated event can be a new block of a blockchain after the first period mentioned above, or a lottery winning number that occurred after the first period, or the first period.
  • a hospital's neonatal birth rate and any other specified event specified by a preset calculation rule can be a mathematical summary algorithm such as hash, year-on-year or ring-to-month growth rate. As long as the characteristic value of the specified event is met, the occurrence of the characteristic value is based on a preset mapping algorithm.
  • the feature values calculated after a specified event after the first period and which cannot be predicted before the occurrence of the specified event can ensure at least the randomness and fairness of the feature values of the specified event to ensure the above-mentioned preset calculation rules. Randomness and fairness.
  • Step 106 Select a candidate object node based on the values corresponding to the multiple candidate object nodes according to a preset selection rule.
  • the corresponding candidate can be selected based on the values corresponding to the multiple candidate object nodes, such as the largest, smallest, or intermediate value, or any ranked value.
  • the target node due to the above-mentioned embodiments provided in this specification, at least ensures the randomness and fairness of the preset calculation rules by at least the feature value randomness and fairness of the specified event, and then selects and selects based on the above calculation rules. Rules also have corresponding randomness and fairness.
  • the correspondence of multiple participating object nodes is respectively calculated based on the characteristic value of the specified event and the object reference number corresponding to the participating transaction.
  • the process of selecting a candidate object node based on the values corresponding to the multiple candidate object nodes according to preset selection rules can be performed by a smart contract deployed on the blockchain that receives the candidate transaction. .
  • a smart contract is a piece of computer program that is agreed by the nodes of the blockchain and published in the distributed database of the blockchain. This program is called to autonomously perform all or part of the contract-related operations and generate corresponding Evidence that can be verified to demonstrate the effectiveness of performing contract operations.
  • Smart contracts usually have a user interface for users to interact with established contracts, and these interactions strictly adhere to previously formulated logic. Thanks to cryptographic technology, these interactions can be strictly verified to ensure that the contract can be successfully executed in accordance with previously established rules, thereby preventing defaults.
  • the process of the above steps 104 and 106 includes: calling a smart contract issued on the blockchain, executing an execution program corresponding to the calculation rule and the selection rule declared in the smart contract, based on a specified event
  • the characteristic value of the target object and the reference number corresponding to the candidate transaction respectively calculate values corresponding to multiple candidate object nodes, and select the candidate object nodes based on the values corresponding to the multiple candidate object nodes.
  • the smart contract can be deployed on the chain only after the blockchain node consensus is reached, that is, from the protocol or protocol it contains.
  • the content of the contract ensures the fairness of the above calculation rules and selection rules.
  • the smart contract is executed autonomously after being called, and the execution result can be verified by any node on the blockchain, which further guarantees the fairness and fairness of the above calculation and selection process, and effectively prevents centralized randomization.
  • the object selection platform does not rely on its own server to transparently disclose the above-mentioned calculation and selection process, but manipulates the above-mentioned random selection process privately.
  • smart contracts can be executed in real time and accurately in response to calls from blockchain node devices, making it easy and fast to perform the above calculations and selection processes.
  • the first candidate transaction when a plurality of candidate object nodes publish a first candidate transaction to the distributed database of the blockchain within a first sub-period of the first period, the first The candidate transaction includes the encrypted object reference number; and a plurality of candidate object nodes publish a second candidate transaction to the distributed database of the blockchain within the second sub-period of the first period.
  • the second candidate transaction includes the decrypted object reference number, the second sub-period is the period after the end of the first sub-period, and the encrypted object reference number can be proved by the decrypted object reference number
  • the process of steps 104 and 106 may include: calling a smart contract published on the blockchain, executing an execution program corresponding to the calculation rule and the selection rule declared in the smart contract, based on a specified event
  • the feature value of the target candidate and the object reference number corresponding to the second candidate transaction respectively calculate values corresponding to multiple candidate object nodes, and select the candidate object nodes based on the values corresponding to the multiple candidate object nodes.
  • the smart contract described in the above embodiment is further provided with a white list.
  • the smart contract may be based on the characteristic value of the designated event and the candidates included in the white list.
  • the reference number of the object corresponding to the second candidate exchange issued by the node calculates the corresponding value of the candidate object node included in the white list. Accordingly, the selection step described in step 106 should be based on the Implementation of the corresponding value of the candidate object node.
  • This specification does not limit the conditions for creating the above white list.
  • the conditions may include the identity filter conditions of the candidate object node, the time filter condition, the object reference number filter condition, etc., the public key of the candidate object node that will meet the filter conditions, or the account address, or other identity with the candidate object node.
  • the relevant identification information is added to the above white list, and the corresponding calculation and selection process is performed based on the object reference number provided by the candidate object nodes in the white list.
  • a transaction verification program is also declared in the smart contract, and the white list is created or screened by verifying the legitimacy of the transaction issued by the candidate object node.
  • the method further includes calling the smart contract, executing a transaction verification program declared in the smart contract, verifying whether the first candidate transaction is legal, and removing the candidate object corresponding to the illegal first candidate transaction from the Removed from smart contract whitelist.
  • the legality verification of the first participating transaction using the smart contract is usually called automatically upon the release of the first participating transaction, so the execution process of filtering the whitelist through the above legality verification usually also occurs During the first sub-period of the first period.
  • any node device of the above blockchain is receiving After the plurality of candidate object nodes publish the second candidate transaction to the distributed database of the blockchain within the second sub-period of the first period, the method further includes: calling the smart contract to execute the smart contract.
  • the object reference number verification program declared in the smart contract verifies whether the object reference number included in the second candidate exchange issued by the candidate object in the white list can verify the object reference included in the first candidate exchange Ciphertext, and remove the candidate object corresponding to the unverifiable second candidate transaction from the white list of the smart contract.
  • the above-mentioned verification of the object reference number of the second candidate transaction using a smart contract is usually automatically invoked upon the release of the second candidate transaction. Therefore, the execution process of filtering the white list through the above-mentioned legality verification usually also occurs in The second sub-period of the first period.
  • the candidates who finally meet the various election rule settings and have qualified transaction content or format are selected.
  • the above calculations and The selection step finally selects the candidates fairly and randomly.
  • FIG. 2 is a schematic diagram of implementing a lottery in a blockchain network according to an exemplary embodiment. As shown in FIG. 2, it is assumed that a node device corresponding to users P 1 ,..., P n participates in this lottery process.
  • the “user” in this specification may be expressed as a logged-in user account or a user identity public key. The above user account may actually belong to an individual or an organization or even a terminal device, and this specification does not limit this.
  • a client program with a blockchain can be run on the candidate user devices P 1 , ..., P n , so that the above-mentioned candidate user device can be used as a node of the blockchain, and according to the specific consensus rules implemented by the above blockchain,
  • the transactions issued by the participating user nodes P 1 , ..., P n can be included in the distributed database of the above-mentioned blockchain after the consensus verification of all or most nodes on the blockchain, and the above-mentioned participating user nodes P 1 , ...,
  • the transaction issued by P n can also trigger the calling of the smart contract deployed in the above blockchain to execute the calculation or selection logic related to the random object declaration of the smart contract declaration.
  • the above transactions included in the distributed database of the blockchain and the output results after the relevant logic is executed by the smart contract can be verified by any node of the above blockchain, thereby preventing any other node or device from involving the lottery process. Tampered parameters or tampering with preset calculations or selection rules to manipulate the lottery process.
  • the lottery process shown in Figure 2 can be divided into three stages according to time, and the block height is used as a logical time timer.
  • the block height is T0-T1 as the first stage, and the block height T1-T2 is the second stage.
  • Block height T2 is the third stage, and in the lottery process shown in Figure 2, the block height is T2 + h (h is a predetermined non-negative integer, for example, h can be 1)
  • the hash value of the block is used as the feature value of the specified event to participate in the calculation of this lottery.
  • Step 201 In the first stage where the block height is T0-T1, the candidate user nodes P 1 , ..., P n issue the first candidate transactions J 1 , ..., J n to the distributed database of the blockchain.
  • the first candidate transaction is encrypted and generated based on a random number determined by the candidate user.
  • the number of users who actually have the qualification for election can be greater than n, but before the end of the first stage, the blockchain's distributed database receives the first election from the n candidate user nodes transaction.
  • Step 202 In the first stage where the block height is T0-T1, the smart contract performs transaction legitimacy verification on the first candidate transaction, and filters a white list according to the verification result.
  • the above-mentioned legality verification may include: whether the user is in the list of users who can participate, whether the electronic signature is legal, or whether the encryption method of the object reference number meets the requirements, or whether the same user has double submissions.
  • the smart contract can preset a whitelist of users with qualifications to participate in the election, and perform a screening process on the whitelist of users by verifying the format or content of the first election transaction.
  • the smart contract can also create a white list for the first time through the legality verification of the first candidate transaction.
  • the present invention does not limit the specific setting timing and conditions of the whitelist of the smart contract.
  • the smart contract may also add the participating users corresponding to the illegal first candidate transaction to the blacklist as a special implementation way of creating or screening a whitelist.
  • the public key p i of the candidate user corresponding to the legal first candidate exchange is included in the white list of the smart contract.
  • the candidate user P i discloses the random number (r i , R i ) determined by the selection in the first stage.
  • Step 204 In the second stage where the block height is T1-T2, the smart contract verifies whether the random number included in the second candidate exchange can prove the random number ciphertext of the first candidate transaction, and according to The results of the above verification screen the whitelist.
  • the smart contract on the lottery business logic deployed on the above blockchain can also declare an object reference number verification program to verify the random number included in the second candidate exchange (r i , R i ) whether the random number ciphertext C i included in the first candidate exchange previously issued by the candidate user can be verified, and the candidate user corresponding to the unverifiable second candidate transaction is removed from the smart contract. Removed from white list.
  • Step 205 at a stage after the block height T2, after the above smart contract regarding the lottery business logic executes the verification of the second candidate transaction triggered by step 202, the trigger of the event occurrence or other instructions shall be specified. Triggering to further execute an execution program declared in the smart contract, which corresponds to a calculation rule for the lottery.
  • the designated event described in FIG. 2 is the generation of a block with a height of T2 + h, and the block hash value of the T2 + h block is agreed to be the feature value H 0 of the designated event.
  • the calculation rule of the value H ” i corresponding to the candidate user node in the white list in the embodiment shown in FIG. 2 is defined as follows:
  • H i Hash (p ji , R ji );
  • H ' i Hash (H i , H 0 );
  • Step 206 the smart contract individually calculated based on the above-described calculation rule H "value of i, and the H""H satisfying the predetermined selection rule of selecting the m" 1, ..., H k P k corresponding to the user as candidates winning
  • the user outputs the public key or other identity of the candidate user to announce the winning user.
  • the contract can be the same smart contract or different smart contracts, which are not limited in this specification.
  • the lottery process based on the random object selection method provided in this specification shown in FIG. 2 depends on the random number provided by the participating users and the block hash of the unpredictable designated block that occurs after the end of the random number provision phase.
  • the calculation of the value, using the blockchain's anti-tampering mechanism, ensures that the above-mentioned lottery process is free from artificial manipulation and produces unfair results; moreover, the lottery process shown in Figure 2 relies on smart contracts to autonomously complete the above-mentioned random numbers provided to users Verification, and the calculation and selection process based on the characteristic values of the specified event and the above-mentioned random numbers, avoiding human participation throughout the process, and the entire lottery process is transparently visible on the blockchain, can be verified, and is performed more autonomously, accurately, and fairly The above-mentioned lottery process.
  • the embodiment of the present specification also provides a random object selection device based on a blockchain.
  • the device can be implemented by software, or by hardware or a combination of software and hardware.
  • software implementation as an example, as a device in a logical sense, it is formed by reading a corresponding computer program instruction into a memory through a CPU (Central Process Unit) of a device where the device is located.
  • CPU Central Process Unit
  • the equipment that implements the network risk service usually includes other hardware such as chips for wireless signal transmission and reception, and / or for implementing Other hardware such as network communication board.
  • FIG. 3 shows a random object selection device 30 based on a blockchain, which is applied to a blockchain including multiple candidate object nodes.
  • the device 30 includes:
  • the receiving unit 302 receives a plurality of candidate transaction nodes publishing a candidate transaction to the distributed database of the blockchain within a first period, the candidate transaction being generated based on an object reference number determined by the candidate object node;
  • the calculation unit 304 calculates values corresponding to a plurality of candidate object nodes respectively based on a preset calculation rule based on the feature value of the designated event and the object reference number corresponding to the candidate transaction, wherein the feature value of the designated event is based on the A mapping algorithm is provided to calculate a characteristic value of a specified event occurring after the first period, and the characteristic value of the specified event cannot be predicted before the specified event occurs;
  • the selecting unit 306 selects a candidate object node based on a value corresponding to the multiple candidate object nodes according to a preset selection rule.
  • the calculation unit 304 calculates the value of the calculation unit 304:
  • the receiving unit 302 In another embodiment shown in this specification, the receiving unit 302:
  • the second sub-period is a period after the end of the first sub-period, and the encrypted object reference number can be proved by the decrypted object reference number.
  • the calculation unit 304 calculates the value of the calculation unit 304:
  • Corresponding object reference numbers respectively calculate values corresponding to multiple candidate object nodes, and select candidate object nodes based on the values corresponding to the multiple candidate object nodes.
  • the smart contract is provided with a white list
  • the calculation unit 304 calculates the calculation unit 304:
  • the values corresponding to the candidate object nodes included in the white list are calculated respectively.
  • the receiving unit 302 receives a first number of candidate nodes that are published to the distributed database of the blockchain within a first sub-period of the first period. After participating in the election, it is also used to:
  • the receiving unit 302 receives a plurality of candidate object nodes, which are published by the plurality of candidate object nodes to a distributed database of the blockchain within a second sub-period of the first period. After the second election transaction, it is also used for:
  • the characteristic value of the designated event is a hash value of the designated block generated by the blockchain after the first period.
  • the first period is a logical period related to a block height of the blockchain.
  • the object reference number is a random number
  • the encrypted object reference number is a Pedersen promise based on the random number
  • the device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical modules, that is, may be located in One place, or can be distributed to multiple network modules. Some or all of the units or modules can be selected according to actual needs to achieve the purpose of the solution in this specification. Those of ordinary skill in the art can understand and implement without creative efforts.
  • the devices, units, and modules described in the foregoing embodiments may be specifically implemented by a computer chip or entity, or may be implemented by a product having a certain function.
  • a typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email sending and receiving device, and a game control Desk, tablet computer, wearable device, or a combination of any of these devices.
  • the embodiment of the present specification further provides a computer device, the computer device including a memory and a processor.
  • the memory stores a computer program that can be executed by a processor.
  • the processor runs the stored computer program, the processor executes each step of the method for selecting a random object based on a blockchain in the embodiment of the present specification.
  • the processor executes each step of the method for selecting a random object based on a blockchain in the embodiment of the present specification.
  • the embodiments of the present specification also provide a computer-readable storage medium.
  • the storage medium stores computer programs. When these computer programs are run by a processor, the computer programs are executed based on Each step of the random object selection method of the blockchain. For a detailed description of each step of the random object selection method based on the blockchain, please refer to the previous content, and will not be repeated.
  • a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
  • processors CPUs
  • input / output interfaces output interfaces
  • network interfaces network interfaces
  • memory volatile and non-volatile memory
  • Memory may include non-persistent memory, random access memory (RAM), and / or non-volatile memory in computer-readable media, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information can be stored by any method or technology.
  • Information may be computer-readable instructions, data structures, modules of a program, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), and read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media may be used to store information that can be accessed by computing devices.
  • computer-readable media does not include temporary computer-readable media, such as modulated data signals and carrier waves.
  • the embodiments of the present specification may be provided as a method, a system, or a computer program product. Therefore, the embodiments of this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present specification 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. .

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Theoretical Computer Science (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Technology Law (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种基于区块链的随机对象选取方法和装置,应用于包含多个参选对象节点的区块链,所述方法包括:接收多个参选对象节点在第一时段内向所述区块链的分布式数据库发布的参选交易,所述参选交易基于所述参选对象节点确定的对象参考数生成(102);根据预设的计算规则,基于指定事件的特征值和参选交易对应的对象参考数分别计算多个参选对象节点对应的值,其中,所述指定事件的特征值为根据预设的映射算法,对发生在所述第一时段之后的指定事件计算所得的特征值,所述指定事件的特征值在所述指定事件发生之前不可被预知(104);根据预设的选取规则,基于所述多个参选对象节点对应的值选取参选对象节点(106)。

Description

一种基于区块链的随机对象选取方法和装置 技术领域
本说明书涉及数据处理技术领域,尤其涉及一种基于区块链的随机对象选取方法和装置。
背景技术
随机对象选取常用在计算机随机分配资源、随机分配任务或其他任意所需的业务场景下,基于一台计算机或服务器的随机对象选取方法难以确保随机选取过程的公平性和可验证性,因为一台计算机或服务器所施行的选取方法极易被人为操控,难以做到真正的“随机”选取,而且外界在事中和事后都难以监测和验证其施行的选取方法是否没有被操控。
发明内容
有鉴于此,本说明书一个或多个实施例提供一种基于区块链的随机对象选取方法及装置、电子设备。
为实现上述目的,本说明书一个或多个实施例提供技术方案如下:
根据本说明书一个或多个实施例的第一方面,提出了一种基于区块链的随机对象选取方法,应用于包含多个参选对象节点的区块链,所述方法包括:
接收多个参选对象节点在第一时段内向所述区块链的分布式数据库发布的参选交易,所述参选交易基于所述参选对象节点确定的对象参考数生成;
根据预设的计算规则,基于指定事件的特征值和参选交易对应的对象参考数分别计算多个参选对象节点对应的值,其中,所述指定事件的特征值为根据预设的映射算法,对发生在所述第一时段之后的指定事件计算所得的特征值,所述指定事件的特征值在所述指定事件发生之前不可被预知;
根据预设的选取规则,基于所述多个参选对象节点对应的值选取参选对象节点。
根据本说明书一个或多个实施例的第二方面,提出了一种基于区块链的随机对象选 取装置,应用于包含多个参选对象节点的区块链,所述装置包括:
接收单元,接收多个参选对象节点在第一时段内向所述区块链的分布式数据库发布的参选交易,所述参选交易基于所述参选对象节点确定的对象参考数生成;
计算单元,根据预设的计算规则,基于指定事件的特征值和参选交易对应的对象参考数分别计算多个参选对象节点对应的值,其中,所述指定事件的特征值为根据预设的映射算法,对发生在所述第一时段之后的指定事件计算所得的特征值,所述指定事件的特征值在所述指定事件发生之前不可被预知;
选取单元,根据预设的选取规则,基于所述多个参选对象节点对应的值选取参选对象节点。
相应的,本说明书还提供了一种计算机设备,包括:存储器和处理器;所述存储器上存储有可由处理器运行的计算机程序;所述处理器运行所述计算机程序时,执行上述基于区块链的随机对象选取方法所述的步骤。
本说明书还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器运行时,执行上述基于区块链的随机对象选取方法所述的步骤。
由以上技术方案可见,本说明书提供的基于区块链的随机对象选取方法及装置,依赖于参选对象提供的对象参考数和之后发生的、不可被预测的、指定事件的特征值进行计算,从而保证了选取过程免除了人为操纵、更改结果的可能性:基于区块链技术的分布式数据库存储机制,参选对象所选择发布的对象参考数被去中心化地记录或存证在区块链的所有节点中,且基于区块链的共识机制,每个参选对象所发布的对象参考数不会在提供后被篡改,防止选取过程通过修改参选对象的对象参考数进行操控;进一步地,指定事件只有在对象参考数提供阶段结束后才会发生,且其特征值在指定事件发生前是不可预测的,这样参选对象无法基于预设的规则和该特征值进行预测算以选取合适的对象参考数,从而保证该对象参考数的提供是真正随机的,进而保证了整个随机对象选取过程的随机性和公平性,而且事中和事后外界都可以监测和验证过程中的每一步。
附图说明
图1为本说明书所提供的一实施例所示的基于区块链的随机对象选取方法的流程图;
图2为本说明书一示例性实施例提供的随机对象选取方法的过程示意图;
图3为本说明书所提供的一实施例提供的基于区块链的随机对象选取装置的示意图;
图4为运行本说明书所提供的基于区块链的随机对象选取装置实施例的一种硬件结构图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本说明书一个或多个实施例相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本说明书一个或多个实施例的一些方面相一致的装置和方法的例子。
需要说明的是:在其他实施例中并不一定按照本说明书示出和描述的顺序来执行相应方法的步骤。在一些其他实施例中,其方法所包括的步骤可以比本说明书所描述的更多或更少。此外,本说明书中所描述的单个步骤,在其他实施例中可能被分解为多个步骤进行描述;而本说明书中所描述的多个步骤,在其他实施例中也可能被合并为单个步骤进行描述。
如图1所示,本说明书一示意性实施例提供了一种基于区块链的随机对象选取方法,应用于包含多个参选对象节点的区块链,所述方法包括:
步骤102,接收多个参选对象节点在第一时段内向所述区块链的分布式数据库发布的参选交易,所述参选交易基于所述参选对象节点所选择的对象参考数生成。
上述实施例所述的区块链,具体可指一个各节点通过共识机制达成的、具有分布式数据存储结构的P2P网络系统,该区块链内的数据分布在时间上相连的一个个“区块(block)”之内,后一区块包含前一区块的数据摘要,且根据具体的共识机制(如POW、POS、DPOS或PBFT等)的不同,达成全部或部分节点的数据全备份。本领域的技术人员熟知,由于区块链系统在相应共识机制下运行,已收录至区块链数据库内的数据很难被任意的节点篡改,例如采用Pow共识的区块链,至少需要全网51%算力的攻击才有可能篡改已有数据,因此区块链系统有着其他中心化数据库系统所法比拟的保证数据安全、防攻击篡改的特性。由此可知,在本说明书所提供的实施例中,被收录至区块链的分布式数据库中的数据不会被攻击或篡改,从而保证了所述参选对象节点所选择的对象参考数的真实性。
上述实施例所述的参选对象节点可以为参与本说明书所述的随机对象选取过程的区 块链节点、区块链轻节点,还可以为与区块链的节点连接的其他设备终端或客户端,在本说明书中不作限定。另外,为方便描述本说明书各实施例提供的随机对象选取方法所基于的区块链技术,本说明书所述的“区块链节点”或“节点”可以包括区块链网络中的节点设备、轻节点设备、其他设备终端或客户端,以下不再赘述。
上述实施例所述的参选对象节点确定的对象参考数可以是参选对象确定或选取的任意数值,在本说明书中不作限定。参选交易基于上述对象参考数生成,在本说明书中所描述的交易(transaction),是指用户通过区块链的客户端创建,并需要最终发布至区块链的分布式数据库中的一笔数据。其中,区块链中的交易,存在狭义的交易以及广义的交易之分。狭义的交易是指用户向区块链发布的一笔价值转移;例如,在传统的比特币区块链网络中,交易可以是用户在区块链中发起的一笔转账。而广义的交易是指用户向区块链发布的一笔具有业务意图的业务数据;例如,本说明书的上述实施例所述的发布至上述区块链中的、基于对象参考数生成的参与本次随机对象选取过程的一笔或多笔数据,上述参选交易还可以有着既定的数据内容格式,在本说明书中不作限定。
上述实施例所述的第一时段,可以为有着具体物理起始时刻和物理结束时刻的一段物理时间,也可以为以具有逻辑先后顺序的两个事件所确定的起始时刻和解决时刻的一段逻辑时间,更可兼而有之,在本说明书中不作限定。例如,第一时段可以表示为从2018年1月1日零时起至2018年6月30日24时止,也可以表示为从比特币区块链高度为10000的区块的生成时刻起至比特币区块链高度为20000的区块的生成时刻止,等等。
在本说明书示出的一实施例中,上述参选交易可包括参选对象发布的对象参考数的明文,由于区块链中各个节点设备发布至区块链的交易是公开透明的,上述实施方案通常用于即使得知其他参选对象节点的对象参考数,也不会对自身提供的对象参考数产生任何影响的计算及选取规则中。
在本说明书示出的又一实施例中,由于区块链上的发布的交易可以被区块链的多个或所有节点查看,为防止一参选对象发布的对象参考数被其他参选对象通过区块链获知,以使其他对象参考数根据所述一参选对象发布的对象参考数,修改本节点尚未发布的对象参考数,而在发布对象参考数的过程中引起不公平现象的发生,可将上述第一时段划分为至少两个阶段。
在所述第一时段的第一分时段,参选对象节点向上述区块链的分布式数据库发布第一参选交易,该第一参选交易包含加密后的对象参考数;发布在区块链上的对象参考数密文即使被其他参选对象节点获知,其他参选对象节点也不能得知对象参考数的实际的 值,从而保证发布对象参考数阶段的公平性。
在所述第一时段的第二分时段,参选对象节点向上述区块链的分布式数据库发布第二参选交易,该第二参选交易包含解密后的对象参考数,用以公开自身节点在第一分时段发布的加密的对象参考数;且所述第二分时段为所述第一分时段结束后的时段,在该第二分时段,各参选对象节点已经不可以再发送第一参选交易,因此,有效防止了参选对象节点依据其他参选对象节点公开的对象参考数而修改自身尚未发布的对象参考数的现象发生;所述加密后的对象参考数可被所述解密后的对象参考数证明,保证了参选对象在第二分时段发布的解密后的对象参考数确实为第一分时段发布的加密的对象参考数,防止参选对象在第二分时段篡改自身在第一分时段发布的对象参考数。
在上述实施例中,当参选对象节点所确定的对象参考数为一个或多个随机数时,本领域的技术人员很容易想到,上述第一参选交易所包含的加密后的对象参考数可以为基于上述一个或多个随机数的Pedersen承诺,上述第二参选交易所包含的解密后的对象参考数即可为上述一个或多个随机数。
步骤104,根据预设的计算规则,基于指定事件的特征值和参选交易对应的对象参考数分别计算多个参选对象节点对应的值,其中,所述指定事件的特征值为根据预设的映射算法,对发生在第一时段之后的指定事件计算所得的特征值,所述指定事件的特征值在所述指定事件发生之前不可被预知。
上述实施例所述的多个参选对象节点对应的值,是用于对上述多个参选对象进行选择时所依据的参考值,本说明书并不限定上述预设的计算规则的具体算法。
上述实施例所述的指定事件为发生在第一时段结束后的一指定事件,为防止该指定事件对应的特征值具有逻辑可知性而使上述预设的计算规则丧失随机性和公平性,由该指定事件依据预设的映射算法算出的特征值,在该指定事件发生之前是不可被预知的。例如,当一区块链的出块速率维持为非常稳定的值,那一固定时段后该区块链的区块高度即为可以预知的值,则上述区块高度便不可以作为指定事件的特征值;虽然该区块高度值可以预知,但该区块的区块哈希值却是不可被预知的,因此指定固定时段后新生区块的哈希值、或指定高度的未来新生区块的哈希值均可以作为该指定事件的特征值参与到上述对多个参选对象节点对应的值的计算中。
本说明书并不限定上述指定事件的类型,例如指定事件可以是某区块链在上述第一时段之后新生的区块,也可以是第一时段之后发生的彩票中奖号码,还可以是第一时段 之后某医院的新生儿出生率等任何预设的计算规则规定的指定事件。本说明书也不限定上述指定事件的特征值的计算方法,例如可以是哈希等数学摘要算法、同比或环比增长率等,只要满足上述指定事件的特征值是根据预设的映射算法,对发生在第一时段之后的指定事件计算所得的、在所述指定事件发生之前不可被预知的特征值,即可至少由上述指定事件的特征值的随机性与公平性,确保上述预设的计算规则的随机性和公平性。
步骤106,根据预设的选取规则,基于所述多个参选对象节点对应的值选取参选对象节点。
本说明书中并不限定上述预设的具体选取规则,可以基于上述多个参选对象节点对应的值选择最大的、或最小的、或中间值、或任一排位的值等对应的参选对象节点,由于本说明书所提供的上述实施例,至少由上述指定事件的特征值随机性与公平性,确保上述预设的计算规则的随机性和公平性,则基于上述计算规则进行选取的选取规则,也具有了相应的随机性和公平性。
在本说明书提供的一实施例中,上述步骤104和106所述的、根据预设的计算规则,基于指定事件的特征值和参选交易对应的对象参考数分别计算多个参选对象节点对应的值,和根据预设的选取规则,基于所述多个参选对象节点对应的值选取参选对象节点的过程,可以由部署在接收参选交易的区块链上的智能合约来执行完成。
智能合约是被区块链的各节点共识、且发布在区块链的分布式数据库内的一段计算机程序,这种程序经调用而自主地执行全部或部分和合约相关的操作,并产生相应地可以被验证的证据,来说明执行合约操作的有效性。在部署智能合约之前,与合约相关的所有条款的逻辑流程就已经被制定好了。智能合约通常具有一个用户接口,以供用户与已制定的合约进行交互,这些交互行为都严格遵守此前制定的逻辑。得益于密码学技术,这些交互行为能够被严格地验证,以确保合约能够按照此前制定的规则顺利执行,从而防止出现违约行为。
因此,上述步骤104和106的过程包括:调用发布在所述区块链上的智能合约,执行所述智能合约中声明的与所述计算规则和所述选取规则对应的执行程序,基于指定事件的特征值和参选交易对应的对象参考数分别计算多个参选对象节点对应的值,并基于所述多个参选对象节点对应的值选取参选对象节点。
在上述实施例中,通过将上述计算规则和选取规则编译部署到智能合约中,上述智能合约经由区块链的节点共识同意后才可被部署上链,即是首先从其所包含的协议或合 约内容上确保了上述计算规则和选取规则的公平性。进一步地,该智能合约经调用而自主执行,且执行的结果可被该区块链上的任一节点所验证,更加保证了上述计算和选取过程的公平公正性,有效防止了中心化的随机对象选取平台依靠自身的服务器对上述的计算和选取过程不施行透明公开,而私自操纵上述随机选取过程的行为。而且,智能合约可以应区块链节点设备的调用而实时准确执行,方便快捷地进行如上的计算和选取过程。
在本说明书提供的又一实施例中,当多个参选对象节点在所述第一时段的第一分时段内向所述区块链的分布式数据库发布第一参选交易,所述第一参选交易包含加密后的对象参考数;且多个参选对象节点在所述第一时段的第二分时段内向所述区块链的分布式数据库内发布第二参选交易,所述第二参选交易包含解密后的对象参考数,所述第二分时段为所述第一分时段结束后的时段,所述加密后的对象参考数可被所述解密后的对象参考数证明时,上述步骤104和106的过程可以包括:调用发布在所述区块链上的智能合约,执行所述智能合约中声明的与所述计算规则和所述选取规则对应的执行程序,基于指定事件的特征值和所述第二参选交易对应的对象参考数,分别计算多个参选对象节点对应的值,并基于所述多个参选对象节点对应的值选取参选对象节点。
更优地,上述实施例所述的智能合约还设置有白名单,在该智能合约执行步骤104所述的计算步骤时,可基于指定事件的特征值和所述白名单所包括的参选对象节点发布的第二参选交易所对应的对象参考数,分别计算所述白名单内包含的参选对象节点对应的值,相应地,步骤106所述的选取步骤则应基于上述白名单内包含的参选对象节点对应的值实施。
本说明书并不限定上述白名单的创建条件,在执行本说明书所述的随机对象选取方法之前,可根据预设的计算规则、选取规则或其他参选规则等为智能合约的创建过滤条件,过滤条件可包括参选对象节点的身份过滤条件、时间过滤条件、对象参考数过滤条件等等,将符合过滤条件的参选对象节点的公钥、或账户地址、或其他与参选对象节点的身份相关的标识信息加入到上述白名单,基于白名单内的参选对象节点所提供的对象参考数,执行相应的计算和选取过程。另外值得注意的是,作为本说明书所提供的创建或筛选智能合约的白名单的一种特殊的实现方式,将不符合条件的参选对象加入智能合约的黑名单也应在本说明书所提供的技术方案的保护范围内;以下所述的各种筛选或过滤智能合约的白名单的方式,也都可以相应地由向智能合约的黑名单中增加参选对象而实现;或者由同时筛选或过滤白名单用户且新增黑名单用户来实现,以下不再赘述。
在一示出的实施例中,上述智能合约内还声明有交易验证程序,通过对参选对象节点发布的交易进行合法性验证来创建或筛选上述白名单。具体地,在上述区块链的任一节点设备接收多个参选对象节点在所述第一时段的第一分时段内向所述区块链的分布式数据库发布的第一参选交易之后,还包括:调用所述智能合约,执行所述智能合约中声明的交易验证程序,验证所述第一参选交易是否合法,并将不合法的第一参选交易对应的参选对象从所述智能合约的白名单中去除。
值得注意的是,上述利用智能合约对第一参选交易进行合法性验证通常是应第一参选交易的发布而自动调用的,因此通过上述合法性验证而筛选白名单的执行过程通常也发生在第一时段的第一分时段。
在又一示出的实施例中,为防止参选对象节点在第二分时段公开的对象参考数与其在第一分时段确定的对象参考数不同,上述区块链的任一节点设备在接收到多个参选对象节点在所述第一时段的第二分时段内向所述区块链的分布式数据库内发布的第二参选交易之后,还包括:调用所述智能合约,执行所述智能合约中声明的对象参考数验证程序,验证所述白名单内的参选对象所发布的第二参选交易所包含的对象参考数是否可验证所述第一参选交易所包含的对象参考数密文,并将不可验证的第二参选交易对应的参选对象从所述智能合约的白名单中去除。
类似地,上述利用智能合约对第二参选交易进行对象参考数验证通常是应第二参选交易的发布而自动调用的,因此通过上述合法性验证而筛选白名单的执行过程通常也发生在第一时段的第二分时段。
通过上述一次或多次的白名单创建或过滤过程,将最终符合各种参选规则设置、且交易内容或格式合格的参选对象甄选出来,针对白名单中的参选对象执行上述的计算及选取步骤,最终公平而随机地选择出参选对象。
为了便于理解,下面以区块链网络中的对象节点的抽奖过程为例,对本说明书的技术方案进行详细说明。本领域的技术人员熟知,本说明书所述的随机对象选取过程或方法不仅限于抽奖的业务场景,还可适用在任何基于区块链的随机对象选取以执行任务或分配资源的场景中。图2是一示例性实施例提供的一种在区块链网络中实施抽奖的示意图。如图2所示,假定有用户P 1,…,P n所对应的节点设备参与本次抽奖过程,其中,本说明书中的“用户”可以表现为所登录的用户账号或用户身份公钥,上述用户账号实际可以归属于个人或组织甚至终端设备,本说明书并不对此进行限制。
参选用户设备P 1,…,P n上可以运行有区块链的客户端程序,使得上述参选用户设备可作为区块链的节点,根据上述区块链所施行的具体的共识规则,参选用户节点P 1,…,P n发布的交易可以经区块链上所有或多数节点的共识验证后被收录至上述区块链的分布式数据库中,且上述参选用户节点P 1,…,P n发布的交易还可以触发调用部署在上述区块链中的智能合约,以执行智能合约声明的随机对象选取相关的计算或选取逻辑。上述被收录至区块链的分布式数据库中的交易、及由智能合约执行相关逻辑后的输出结果均可被上述区块链的任一节点验证,从而防止其他任何节点或设备对抽奖过程涉及到的参数篡改或对预设的计算或选取规则篡改以操纵抽奖过程。
图2所示的抽奖过程可以根据时间划分为三个阶段,且使用区块高度作为逻辑时间计时器,区块高度为T0-T1为第一阶段,区块高度T1-T2为第二阶段,区块高度T2之后为第三阶段,且在图2所示意的抽奖过程中,将区块高度为T2+h(h是一个事先规定好的非负整数,比如h可以为1)的区块的区块哈希值作为指定事件的特征值,参与到本次抽奖的计算过程中来。
步骤201,在区块高度为T0-T1的第一阶段,参选用户节点P 1,…,P n向区块链的分布式数据库上发布第一参选交易J 1,…,J n,该第一参选交易是基于参选用户确定的随机数而加密生成的。在本实施例中,实际具有参选资格的用户个数可以大于n,但在第一阶段结束之前,区块链的分布式数据库上收到n个参选用户节点发来的第一参选交易。
在一示出的实施方式中,上述第一参选交易是基于参选用户确定的两个随机数(r i,R i)作出的Pedersen承诺——C i=r iG+R iH,其中,G、H为Pedersen承诺的公共参数。本领域的技术人员熟知,为防止其他节点仿冒本节点进而伪造本节点发布的参选交易,参选交易通常包括本节点对参选交易内容的电子签名,及验证电子签名所需的公钥或地址等身份信息,因此,上述第一参选交易J i=(C i,p i,S i),其中,p i为参选用户的公钥,S i为参选用户节点i利用公钥p i对应的私钥、对包括Pedersen承诺C i的交易内容所作的电子签名。
步骤202,在区块高度为T0-T1的第一阶段,智能合约对上述第一参选交易进行交易合法性验证,并根据上述验证的结果筛选白名单。
上述区块链上可部署有执行抽奖业务逻辑的智能合约,且该智能合约声明有对上述第一参选交易进行交易的合法性验证的逻辑程序,并随第一参选交易的发布而被调用,例如,将上述第一参选交易J i=(C i,p i,S i)发送至上述智能合约的地址以调用上述智能合约。上述合法性验证可以包括:该用户是否在可参选的用户列表中,电子签名是否合法、 或对象参考数的加密方式是否符合要求、或同一参选用户是否有双重提交等方面。该智能合约可预先设置具有参选资格的用户白名单,通过对第一参选交易的格式或内容的验证,执行对该用户白名单筛选过程。可选的,该智能合约还可通过本次对第一参选交易的合法性验证而首次创建白名单。本发明对该智能合约的白名单的具体设置时机和条件并不作限定。可选的,该智能合约还可将不合法的第一参选交易对应的参选用户加入到黑名单中,以作为创建或筛选白名单的一种特殊的实施方式。
在示出的一实施例中,上述智能合约的白名单内收录了合法的第一参选交易所对应的参选用户的公钥p i
步骤203,在区块高度为T1-T2的第二阶段,参选用户P i公开其在第一阶段选择确定的的随机数(r i,R i),该公开过程可以包括:参选用户P i首先对(r i,R i)进行电子签名S' i,再向区块链的分布式数据库提交第二参选交易J' i=(p i,r i,R i,S' i)。
步骤204,在区块高度为T1-T2的第二阶段,智能合约对上述第二参选交易所包含的随机数是否可以证明上述第一参选交易的随机数密文而进行验证,并根据上述验证的结果筛选白名单。
上述区块链上部署的关于抽奖业务逻辑的智能合约还可声明有对象参考数验证程序,用以验证白名单中的参选用户所发布的第二参选交易所包含的随机数(r i,R i)是否可验证该参选用户之前所发布的第一参选交易所包含的随机数密文C i,并将不可验证的第二参选交易对应的参选用户从上述智能合约的白名单中去除。上述智能合约中声明的对象参考数验证程序可以随着第二参选交易的发布被调用,例如将第二参选交易J'i=(p i,r i,R i,S' i)发送至上述智能合约的地址以调用上述智能合约,验证同一参选用户发布的第二参选交易是否能与其发布的第一参选交易基于相同的随机数,进一步防止参选用户可能发生的错误行为而影响抽奖结果的公平性。
步骤205,在区块高度T2之后的阶段,在上述关于抽奖业务逻辑的智能合约执行完对步骤202所触发的对第二参选交易的验证后,应指定事件发生的触发或应其他指令的触发,进一步执行所述智能合约中声明的、与该抽奖的计算规则对应的执行程序。图2所述的指定事件为高度为T2+h的区块的产生,且约定该T2+h的区块的区块哈希值作为指定事件的特征值H 0,上述关于抽奖业务逻辑的智能合约基于指定事件的特征值R和白名单内的参选用户P j1,…,P jm对应的随机数(r ji,R ji)分别计算白名单内的参选用户节点对应的值H” i
图2所述实施例中白名单内的参选用户节点对应的值H” i的计算规则定义如下:
H i=Hash(p ji,R ji);
H' i=Hash(H i,H 0);
H” i=|H' i-H i|。
步骤206,上述智能合约依据上述计算规则逐一计算H” i的值,且从H” 1,…,H” m中选择符合预设的选择规则的H” k对应的参选用户P k作为中奖用户,输出该参选用户的公钥或其他身份标识,用以公布中奖用户。
本领域的技术人员熟知,本说明书提供的随机对象选取方法并不限定随机对象选取所依据的具体的计算规则或选取规则;而且,执行图2所示的抽奖过程的三个阶段所对应的智能合约既可以为同一个智能合约,也可以为不同的智能合约,在本说明书中也不作限定。
图2所示的基于本说明书所提供的随机对象选取方法的抽奖过程,依赖于参选用户提供随机数和在提供随机数阶段结束后发生的、不可被预测的指定区块的区块哈希值进行计算,利用区块链的防篡改机制保证了上述抽奖过程免于人为操纵而产生不公平的结果;而且,图2所示的抽奖过程,依赖于智能合约自主完成上述对用户提供随机数的验证、及基于指定事件的特征值和上述随机数的计算和选取过程,全程避免了人为参与,且抽奖全过程在区块链上透明可见、可被验证,更加自主、准确、公平地执行了上述的抽奖过程。
与上述流程实现对应,本说明书的实施例还提供了一种基于区块链的随机对象选取装置。该装置可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为逻辑意义上的装置,是通过所在设备的CPU(Central Process Unit,中央处理器)将对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,除了图4所示的CPU、内存以及存储器之外,网络风险业务的实现装置所在的设备通常还包括用于进行无线信号收发的芯片等其他硬件,和/或用于实现网络通信功能的板卡等其他硬件。
图3所示为一种基于区块链的随机对象选取装置30,应用于包含多个参选对象节点的区块链,所述装置30包括:
接收单元302,接收多个参选对象节点在第一时段内向所述区块链的分布式数据库发布的参选交易,所述参选交易基于所述参选对象节点确定的对象参考数生成;
计算单元304,根据预设的计算规则,基于指定事件的特征值和参选交易对应的对 象参考数分别计算多个参选对象节点对应的值,其中,所述指定事件的特征值为根据预设的映射算法,对发生在所述第一时段之后的指定事件计算所得的特征值,所述指定事件的特征值在所述指定事件发生之前不可被预知;
选取单元306,根据预设的选取规则,基于所述多个参选对象节点对应的值选取参选对象节点。
在本说明书示出的又一实施例中,所述计算单元304:
调用发布在所述区块链上的智能合约,执行所述智能合约中声明的与所述计算规则和所述选取规则对应的执行程序,基于指定事件的特征值和参选交易对应的对象参考数分别计算多个参选对象节点对应的值,并基于所述多个参选对象节点对应的值选取参选对象节点。
在本说明书示出的又一实施例中,所述接收单元302:
接收多个参选对象节点在所述第一时段的第一分时段内向所述区块链的分布式数据库发布的第一参选交易,所述第一参选交易包含加密后的对象参考数;
接收多个参选对象节点在所述第一时段的第二分时段内向所述区块链的分布式数据库内发布的第二参选交易,所述第二参选交易包含解密后的对象参考数;
其中,所述第二分时段为所述第一分时段结束后的时段,所述加密后的对象参考数可被所述解密后的对象参考数证明。
在本说明书示出的又一实施例中,所述计算单元304:
调用发布在所述区块链上的智能合约,执行所述智能合约中声明的与所述计算规则和所述选取规则对应的执行程序,基于指定事件的特征值和所述第二参选交易对应的对象参考数,分别计算多个参选对象节点对应的值,并基于所述多个参选对象节点对应的值选取参选对象节点。
在本说明书示出的又一实施例中,所述智能合约设置有白名单;
所述计算单元304:
基于指定事件的特征值和所述白名单所包括的参选对象节点发布的第二参选交易所对应的对象参考数,分别计算所述白名单内包含的参选对象节点对应的值。
在本说明书示出的又一实施例中,所述接收单元302在接收多个参选对象节点在所述第一时段的第一分时段内向所述区块链的分布式数据库发布的第一参选交易之后,还 用于:
调用所述智能合约,执行所述智能合约中声明的交易验证程序,验证所述第一参选交易是否合法,并将合法的第一参选交易对应的参选对象加入到所述智能合约的白名单。
在本说明书示出的又一实施例中,所述接收单元302在接收多个参选对象节点在所述第一时段的第二分时段内向所述区块链的分布式数据库内发布的第二参选交易之后,还用于:
调用所述智能合约,执行所述智能合约中声明的对象参考数验证程序,验证所述白名单内的参选对象所发布的第二参选交易所包含的对象参考数是否可验证所述第一参选交易所包含的对象参考数密文,并将不可验证的第二参选交易对应的参选对象从所述智能合约的白名单中去除。
在本说明书示出的又一实施例中,所述指定事件的特征值为所述区块链在所述第一时段之后产生的指定区块的哈希值。
在本说明书示出的又一实施例中,所述第一时段为与所述区块链的区块高度相关的逻辑时段。
在本说明书示出的又一实施例中,所述对象参考数为随机数,所述加密后的对象参考数为基于所述随机数的Pedersen承诺。
上述装置中各个单元的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,相关之处参见方法实施例的部分说明即可,在此不再赘述。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部单元或模块来实现本说明书方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
上述实施例阐明的装置、单元、模块,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
与上述方法实施例相对应,本说明书的实施例还提供了一种计算机设备,该计算机设备包括存储器和处理器。其中,存储器上存储有能够由处理器运行的计算机程序;处理器在运行存储的计算机程序时,执行本说明书实施例中基于区块链的随机对象选取方法的各个步骤。对基于区块链的随机对象选取方法的各个步骤的详细描述请参见之前的内容,不再重复。
与上述方法实施例相对应,本说明书的实施例还提供了一种计算机可读存储介质,该存储介质上存储有计算机程序,这些计算机程序在被处理器运行时,执行本说明书实施例中基于区块链的随机对象选取方法的各个步骤。对基于区块链的随机对象选取方法的各个步骤的详细描述请参见之前的内容,不再重复。
以上所述仅为本说明书的较佳实施例而已,并不用以限制本说明书,凡在本说明书的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书保护的范围之内。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。
计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备 所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本领域技术人员应明白,本说明书的实施例可提供为方法、系统或计算机程序产品。因此,本说明书的实施例可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本说明书的实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。

Claims (22)

  1. 一种基于区块链的随机对象选取方法,应用于包含多个参选对象节点的区块链,所述方法包括:
    接收多个参选对象节点在第一时段内向所述区块链的分布式数据库发布的参选交易,所述参选交易基于所述参选对象节点确定的对象参考数生成;
    根据预设的计算规则,基于指定事件的特征值和参选交易对应的对象参考数分别计算多个参选对象节点对应的值,其中,所述指定事件的特征值为根据预设的映射算法,对发生在所述第一时段之后的指定事件计算所得的特征值,所述指定事件的特征值在所述指定事件发生之前不可被预知;
    根据预设的选取规则,基于所述多个参选对象节点对应的值选取参选对象节点。
  2. 根据权利要求1所述的方法,所述根据预设的计算规则,基于指定事件的特征值和参选交易对应的对象参考数分别计算多个参选对象节点对应的值,根据预设的选取规则,基于所述多个参选对象节点对应的值选取参选对象节点,包括:
    调用发布在所述区块链上的智能合约,执行所述智能合约中声明的与所述计算规则和所述选取规则对应的执行程序,基于指定事件的特征值和参选交易对应的对象参考数分别计算多个参选对象节点对应的值,并基于所述多个参选对象节点对应的值选取参选对象节点。
  3. 根据权利要求1所述的方法,所述接收多个参选对象节点在第一时段内向所述区块链的分布式数据库发布的参选交易,包括:
    接收多个参选对象节点在所述第一时段的第一分时段内向所述区块链的分布式数据库发布的第一参选交易,所述第一参选交易包含加密后的对象参考数;
    接收多个参选对象节点在所述第一时段的第二分时段内向所述区块链的分布式数据库内发布的第二参选交易,所述第二参选交易包含解密后的对象参考数;
    其中,所述第二分时段为所述第一分时段结束后的时段,所述加密后的对象参考数可被所述解密后的对象参考数证明。
  4. 根据权利要求3所述的方法,所述根据预设的计算规则,基于指定事件的特征值和参选交易对应的对象参考数分别计算多个参选对象节点对应的值,根据预设的选取规则,基于所述多个参选对象节点对应的值选取参选对象节点,包括:
    调用发布在所述区块链上的智能合约,执行所述智能合约中声明的与所述计算规则和所述选取规则对应的执行程序,基于指定事件的特征值和所述第二参选交易对应的对象参考数,分别计算多个参选对象节点对应的值,并基于所述多个参选对象节点对应的 值选取参选对象节点。
  5. 根据权利要求4所述的方法,所述智能合约设置有白名单;
    所述基于指定事件的特征值和所述第二参选交易对应的对象参考数,分别计算多个参选对象节点对应的值,包括:
    基于指定事件的特征值和所述白名单所包括的参选对象节点发布的第二参选交易所对应的对象参考数,分别计算所述白名单内包含的参选对象节点对应的值。
  6. 根据权利要求5所述的方法,在接收多个参选对象节点在所述第一时段的第一分时段内向所述区块链的分布式数据库发布的第一参选交易之后,还包括:
    调用所述智能合约,执行所述智能合约中声明的交易验证程序,验证所述第一参选交易是否合法,并将合法的第一参选交易对应的参选对象加入到所述智能合约的白名单。
  7. 根据权利要求5或6所述的方法,在接收多个参选对象节点在所述第一时段的第二分时段内向所述区块链的分布式数据库内发布的第二参选交易之后,还包括:
    调用所述智能合约,执行所述智能合约中声明的对象参考数验证程序,验证所述白名单内的参选对象所发布的第二参选交易所包含的对象参考数是否可验证所述第一参选交易所包含的对象参考数密文,并将不可验证的第二参选交易对应的参选对象从所述智能合约的白名单中去除。
  8. 根据权利要求1至6中任一权利要求所述的方法,所述指定事件的特征值为所述区块链在所述第一时段之后产生的指定区块的哈希值。
  9. 根据权利要求1至6中任一权利要求所述的方法,所述第一时段为与所述区块链的区块高度相关的逻辑时段。
  10. 根据权利要求3至6中任一权利要求所述的方法,所述对象参考数为随机数,所述加密后的对象参考数为基于所述随机数的Pedersen承诺。
  11. 一种基于区块链的随机对象选取装置,应用于包含多个参选对象节点的区块链,所述装置包括:
    接收单元,接收多个参选对象节点在第一时段内向所述区块链的分布式数据库发布的参选交易,所述参选交易基于所述参选对象节点确定的对象参考数生成;
    计算单元,根据预设的计算规则,基于指定事件的特征值和参选交易对应的对象参考数分别计算多个参选对象节点对应的值,其中,所述指定事件的特征值为根据预设的映射算法,对发生在所述第一时段之后的指定事件计算所得的特征值,所述指定事件的特征值在所述指定事件发生之前不可被预知;
    选取单元,根据预设的选取规则,基于所述多个参选对象节点对应的值选取参选对 象节点。
  12. 根据权利要求11所述的装置,所述计算单元:
    调用发布在所述区块链上的智能合约,执行所述智能合约中声明的与所述计算规则和所述选取规则对应的执行程序,基于指定事件的特征值和参选交易对应的对象参考数分别计算多个参选对象节点对应的值,并基于所述多个参选对象节点对应的值选取参选对象节点。
  13. 根据权利要求11所述的装置,所述接收单元:
    接收多个参选对象节点在所述第一时段的第一分时段内向所述区块链的分布式数据库发布的第一参选交易,所述第一参选交易包含加密后的对象参考数;
    接收多个参选对象节点在所述第一时段的第二分时段内向所述区块链的分布式数据库内发布的第二参选交易,所述第二参选交易包含解密后的对象参考数;
    其中,所述第二分时段为所述第一分时段结束后的时段,所述加密后的对象参考数可被所述解密后的对象参考数证明。
  14. 根据权利要求13所述的装置,所述计算单元:
    调用发布在所述区块链上的智能合约,执行所述智能合约中声明的与所述计算规则和所述选取规则对应的执行程序,基于指定事件的特征值和所述第二参选交易对应的对象参考数,分别计算多个参选对象节点对应的值,并基于所述多个参选对象节点对应的值选取参选对象节点。
  15. 根据权利要求14所述的装置,所述智能合约设置有白名单;
    所述计算单元:
    基于指定事件的特征值和所述白名单所包括的参选对象节点发布的第二参选交易所对应的对象参考数,分别计算所述白名单内包含的参选对象节点对应的值。
  16. 根据权利要求15所述的装置,所述接收单元在接收多个参选对象节点在所述第一时段的第一分时段内向所述区块链的分布式数据库发布的第一参选交易之后,还用于:
    调用所述智能合约,执行所述智能合约中声明的交易验证程序,验证所述第一参选交易是否合法,并将合法的第一参选交易对应的参选对象加入到所述智能合约的白名单。
  17. 根据权利要求15或16所述的装置,所述接收单元在接收多个参选对象节点在所述第一时段的第二分时段内向所述区块链的分布式数据库内发布的第二参选交易之后,还用于:
    调用所述智能合约,执行所述智能合约中声明的对象参考数验证程序,验证所述白 名单内的参选对象所发布的第二参选交易所包含的对象参考数是否可验证所述第一参选交易所包含的对象参考数密文,并将不可验证的第二参选交易对应的参选对象从所述智能合约的白名单中去除。
  18. 根据权利要求11至16中任一权利要求所述的装置,所述指定事件的特征值为所述区块链在所述第一时段之后产生的指定区块的哈希值。
  19. 根据权利要求11至16中任一权利要求所述的装置,所述第一时段为与所述区块链的区块高度相关的逻辑时段。
  20. 根据权利要求13至16中任一权利要求所述的装置,所述对象参考数为随机数,所述加密后的对象参考数为基于所述随机数的Pedersen承诺。
  21. 一种计算机设备,包括:存储器和处理器;所述存储器上存储有可由处理器运行的计算机程序;所述处理器运行所述计算机程序时,执行如权利要求1到10任意一项所述的方法。
  22. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器运行时,执行如权利要求1到10任意一项所述的方法。
PCT/CN2019/095540 2018-08-30 2019-07-11 一种基于区块链的随机对象选取方法和装置 WO2020042775A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811003752.8A CN109360091B (zh) 2018-08-30 2018-08-30 一种基于区块链的随机对象选取方法和装置
CN201811003752.8 2018-08-30

Publications (1)

Publication Number Publication Date
WO2020042775A1 true WO2020042775A1 (zh) 2020-03-05

Family

ID=65350302

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/095540 WO2020042775A1 (zh) 2018-08-30 2019-07-11 一种基于区块链的随机对象选取方法和装置

Country Status (3)

Country Link
CN (1) CN109360091B (zh)
TW (1) TWI695331B (zh)
WO (1) WO2020042775A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024065217A1 (en) * 2022-09-27 2024-04-04 Wormholes Lab Pte. Ltd. Random number generation in a blockchain system

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109360091B (zh) * 2018-08-30 2020-09-01 阿里巴巴集团控股有限公司 一种基于区块链的随机对象选取方法和装置
CN109886750A (zh) * 2019-02-25 2019-06-14 浪潮软件集团有限公司 一种基于区块链的透明的随机抽奖实现方法
CN111666582B (zh) * 2019-03-08 2024-05-03 深圳市网安计算机安全检测技术有限公司 基于区块链的数据清理方法、装置、设备及存储介质
CN113438068B (zh) * 2019-05-31 2024-01-09 创新先进技术有限公司 基于区块高度实现动态加密的方法及装置
CN110189465B (zh) * 2019-06-13 2020-12-25 北京瑞策科技有限公司 一种借助于区块链的随机抽奖方法及其设备
CN110223440B (zh) * 2019-06-13 2020-10-02 北京瑞策科技有限公司 一种应用区块链的随机摇号方法及设备
CN110223439B (zh) * 2019-06-13 2020-10-02 北京瑞策科技有限公司 一种应用区块链的随机摇号方法及装置
CN110365479A (zh) * 2019-07-11 2019-10-22 湖南天河国云科技有限公司 基于区块链的随机数生成方法及装置
CN110648447B (zh) * 2019-08-08 2021-08-06 杭州复杂美科技有限公司 一种游戏随机数生成方法、应用及装置、设备和存储介质
US11520904B2 (en) * 2019-08-27 2022-12-06 Accenture Global Solutions Limited AI-based blockchain hybrid consensus
CN110572477A (zh) * 2019-09-26 2019-12-13 腾讯科技(深圳)有限公司 一种优先级评判方法及其相关设备
CN110855777B (zh) * 2019-11-12 2022-09-13 腾讯科技(深圳)有限公司 一种基于区块链的节点管理方法及装置
CN116739660A (zh) * 2019-11-28 2023-09-12 湖南天河国云科技有限公司 一种基于区块链的抽奖方法及系统
CN111311386A (zh) * 2020-01-19 2020-06-19 深圳壹账通智能科技有限公司 基于区块链的摇珠方法、系统、电子设备及存储介质
CN111599079A (zh) * 2020-04-21 2020-08-28 深圳市芯链科技有限公司 一种区块链摇号方法、装置、设备和存储介质
CN113191895B (zh) * 2020-09-04 2022-04-26 支付宝(杭州)信息技术有限公司 一种交易执行方法、系统及装置
CN113128850B (zh) * 2021-04-02 2024-04-19 深圳市易讯天空网络技术有限公司 一种彩票流程管理方法、系统、终端设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105976248A (zh) * 2016-04-29 2016-09-28 邓迪 一种众筹抽签方法及系统
WO2017190175A1 (en) * 2016-05-06 2017-11-09 Othera Pty Ltd Methods and systems for blockchain based "segmented risk based securities"
CN107566124A (zh) * 2017-08-24 2018-01-09 深圳市易成自动驾驶技术有限公司 基于抽签机制的共识建立方法、区块链系统及存储介质
CN109360091A (zh) * 2018-08-30 2019-02-19 阿里巴巴集团控股有限公司 一种基于区块链的随机对象选取方法和装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8219608B2 (en) * 2002-06-20 2012-07-10 Koninklijke Philips Electronics N.V. Scalable architecture for web services
US11062303B2 (en) * 2015-06-08 2021-07-13 Blockstream Corporation Cryptographically concealing amounts transacted on a ledger while preserving a network's ability to verify the transaction
CN105913174A (zh) * 2016-04-07 2016-08-31 彭军红 一种基于区块链的彩票发行方法
CN106504174A (zh) * 2016-09-27 2017-03-15 布比(北京)网络技术有限公司 基于区块链的博彩发行系统及装置
CN107103097A (zh) * 2017-05-22 2017-08-29 中链科技有限公司 基于区块链技术的抽签方法和终端设备
CN108038954A (zh) * 2017-12-01 2018-05-15 中国联合网络通信集团有限公司 基于区块链的交易运行方法及挖矿节点
CN108447014A (zh) * 2018-03-19 2018-08-24 成都零光量子科技有限公司 一种区块链博彩方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105976248A (zh) * 2016-04-29 2016-09-28 邓迪 一种众筹抽签方法及系统
WO2017190175A1 (en) * 2016-05-06 2017-11-09 Othera Pty Ltd Methods and systems for blockchain based "segmented risk based securities"
CN107566124A (zh) * 2017-08-24 2018-01-09 深圳市易成自动驾驶技术有限公司 基于抽签机制的共识建立方法、区块链系统及存储介质
CN109360091A (zh) * 2018-08-30 2019-02-19 阿里巴巴集团控股有限公司 一种基于区块链的随机对象选取方法和装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024065217A1 (en) * 2022-09-27 2024-04-04 Wormholes Lab Pte. Ltd. Random number generation in a blockchain system

Also Published As

Publication number Publication date
CN109360091A (zh) 2019-02-19
TW202009810A (zh) 2020-03-01
TWI695331B (zh) 2020-06-01
CN109360091B (zh) 2020-09-01

Similar Documents

Publication Publication Date Title
WO2020042775A1 (zh) 一种基于区块链的随机对象选取方法和装置
TWI735820B (zh) 資產管理方法及裝置、電子設備
US11328358B2 (en) Systems and methods for controlling an automated electronic networked central clearinghouse for non-fungible digital assets
WO2020199744A1 (zh) 基于区块链的作品版权分配方法和装置
US11138580B1 (en) Systems and methods for peer-to-peer exchanges of non-fungible digital assets
US20220032200A1 (en) Systems and methods for controlling distributions by an automated electronic networked central clearinghouse related to digital assets
TW202036328A (zh) 基於區塊鏈的資源分配方法和裝置
CN108805569A (zh) 基于区块链的交易处理方法及装置、电子设备
CN108764870A (zh) 基于区块链的交易处理方法及装置、电子设备
WO2020207093A1 (zh) 基于区块链的租赁方法和装置
TW201935383A (zh) 資產管理方法及裝置、電子設備
CN108492180A (zh) 资产管理方法及装置、电子设备
TW202016818A (zh) 區塊鏈的交易方法和裝置
JP2020108044A (ja) トークン管理システムおよびトークン管理方法
TW202016853A (zh) 基於區塊鏈的資料存證、取證方法和裝置
TW201935377A (zh) 資產管理方法及裝置、電子設備
CN109615370A (zh) 对象选取方法及装置、电子设备
CN111818185B (zh) 启动智能合约的方法及装置、电子设备、存储介质
CN110597916B (zh) 基于区块链的数据处理方法、装置、存储介质及终端
US11748724B2 (en) Systems and methods for operating a bridge server to support multiple shards of a blockchain
CN115632854A (zh) 一种基于区块链的数据处理方法和装置
CN110580411B (zh) 基于智能合约的权限查询配置方法及装置
CN108199842A (zh) 延迟公布信息的方法和系统
CN110264351B (zh) 基于区块链的著作权分配方法和装置
CN110458708A (zh) 区块链网络中基于竞争的资产分配方法及装置

Legal Events

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

Ref document number: 19856005

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19856005

Country of ref document: EP

Kind code of ref document: A1