CN112767221B - Block chain lottery drawing method, terminal device and computer readable storage medium - Google Patents
Block chain lottery drawing method, terminal device and computer readable storage medium Download PDFInfo
- Publication number
- CN112767221B CN112767221B CN202110142400.6A CN202110142400A CN112767221B CN 112767221 B CN112767221 B CN 112767221B CN 202110142400 A CN202110142400 A CN 202110142400A CN 112767221 B CN112767221 B CN 112767221B
- Authority
- CN
- China
- Prior art keywords
- lottery
- information
- node
- blockchain
- random number
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 58
- 238000003860 storage Methods 0.000 title claims abstract description 13
- 230000007246 mechanism Effects 0.000 claims abstract description 20
- 238000012550 audit Methods 0.000 claims description 47
- 238000007726 management method Methods 0.000 claims description 30
- 230000006870 function Effects 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 17
- 238000012795 verification Methods 0.000 claims description 6
- 238000004422 calculation algorithm Methods 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 claims description 2
- 230000008569 process Effects 0.000 abstract description 22
- 238000009826 distribution Methods 0.000 abstract description 3
- 230000002349 favourable effect Effects 0.000 abstract description 2
- 238000012545 processing Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000008520 organization Effects 0.000 description 3
- XKRFYHLGVUSROY-UHFFFAOYSA-N Argon Chemical compound [Ar] XKRFYHLGVUSROY-UHFFFAOYSA-N 0.000 description 2
- 239000008186 active pharmaceutical agent Substances 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 229910052786 argon Inorganic materials 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000009795 derivation Methods 0.000 description 1
- 230000003090 exacerbative effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008450 motivation Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001105 regulatory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 239000013585 weight reducing agent Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/34—Betting or bookmaking, e.g. Internet betting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C15/00—Generating random numbers; Lottery apparatus
- G07C15/006—Generating random numbers; Lottery apparatus electronically
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Computer Security & Cryptography (AREA)
- General Health & Medical Sciences (AREA)
- Business, Economics & Management (AREA)
- General Business, Economics & Management (AREA)
- Tourism & Hospitality (AREA)
- Strategic Management (AREA)
- Primary Health Care (AREA)
- Marketing (AREA)
- Human Resources & Organizations (AREA)
- Economics (AREA)
- Bioethics (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention provides a block chain lottery drawing method, terminal equipment and a computer readable storage medium, wherein the method comprises the following steps: constructing a blockchain for lottery drawing; a random number consensus protocol is constructed on the blockchain, and the betting information and the prize drawing information of each lottery are recorded, audited and disclosed by utilizing the blockchain with the random number consensus protocol. The invention simplifies the whole lottery process by introducing the accounting mechanism of the block chain, and the random numbers required by the lottery are generated by the transaction information of the whole chain, thereby greatly increasing the cost of an attacker trying to attack the pseudo-random number generator and ensuring the security of the lottery process. Moreover, since the random number used for the lottery drawing is completely generated before the end of the lottery drawing, even if the distribution of the bets is uneven, an attacker cannot control the final lottery drawing result by reselecting the random seed so as to bias the final lottery drawing result to the favorable direction, and the fairness, openness and fairness of the lottery drawing process are ensured.
Description
Technical Field
The invention belongs to the technical field of lottery drawing, and particularly relates to a block chain lottery drawing method, terminal equipment and a computer readable storage medium for constructing a consensus random number by using a random number consensus protocol.
Background
For the drawing of lottery tickets, the number of the winning or the result of the drawing is generated in a specific way after the end of the wager in each period for public fairness. The existing lottery drawing modes mainly include two types: the first is to use custom or special physical lottery device to conduct lottery drawing under the appointed environment under the supervision of third party audit and to show the process of lottery drawing. The second is to use a customized pseudorandom number generation device to generate the prize outcome, and to audit and monitor the code and status of the pseudorandom number generation device by a third party authority.
The two types of the prize drawing methods have the defects that: for customized physical lottery devices, some candidate units inevitably occur due to unavoidable errors in the manufacturing process, and have a higher or lower probability of being selected than a theoretical value; moreover, in the use of the apparatus, wear is inevitably generated, further exacerbating the deviation of the actual probability and the theoretical probability; moreover, because the equipment has very strict requirements on the use environment, the equipment needs to be in a closed and stable environment when in use and is difficult to carry out in the disclosed occasion, and therefore, the fairness of the whole process is often questioned by individuals or organizations. When the pseudo-random number generating device is used, a third party audit mechanism cannot always perform perfect audit on codes of the pseudo-random number generating device, so that the prize drawing result cannot be completely guaranteed to be absolutely fair; on the other hand, pseudo-random number generators often rely on their associated input sources to obtain information entropy, and when the information entropy is insufficient, then the result of a prize drawing may be predicted, and even more so, if the input source is subject to an external attack, an attacker may have complete control over it.
In addition, since the prior art process of drawing a prize occurs after the wager is cut off, and all the wager distribution conditions are determined, the prize drawing mechanism has a motivation to manipulate the result of drawing a prize to achieve the maximum profit in theory. Thus, it is common for individuals or organizations to challenge the prize mechanism to manipulate the prize outcome; on the other hand, even if the result of the lottery is fair, the lottery mechanism is hard to make self-certification.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide a blockchain lottery drawing method, a terminal device and a computer-readable storage medium, so as to solve the technical problems set forth in the background art.
A first aspect of an embodiment of the present invention provides a blockchain lottery drawing method, including:
constructing a blockchain for lottery drawing;
and constructing a random number consensus protocol on the blockchain, and recording, auditing and disclosing the betting information and the drawing information of each lottery by using the blockchain with the random number consensus protocol.
Further, three types of trusted nodes are included in the blockchain: accounting node, management node and audit node;
the management node is used for announcing the lottery ticket sale information, the lottery ticket sale information and the lottery ticket sale random seed of each period;
the accounting node is used for recording the betting information and the drawing information of each lottery;
further, constructing a consensus random number by using a consensus protocol through the information;
and the audit node is used for auditing the content in the accounting node, calculating and publishing the lottery drawing information.
Further, the block chain with the random number consensus protocol is used for recording, auditing and disclosing the betting information and the drawing information of each lottery, specifically:
the management node announces the lottery sales information in the current period, selects a random seed, signs the random seed by using a digital certificate or encrypts the random seed by using an authentication encryption technology, and discloses the obtained digital signature;
the accounting node records the betting information of each block in the current lottery;
when the lottery ticket selling period is over, the management node issues new block announce and sell-off information and discloses the random seed;
and after any one node of the accounting node, the management node and the audit node receives the sales stopping information, calculating the lottery drawing information by combining the random seeds, and publishing the lottery drawing information by the audit node.
Further, after any one node of the accounting node, the management node and the audit node receives the sales stopping information, calculating the prize drawing information by combining the random seed, and publishing the prize drawing information by the audit node specifically comprises:
after any one node of the accounting node, the management node and the auditing node receives the sales stopping information, calculating and generating a consensus random number according to a random seed and past accounting block information through a random number consensus protocol;
calculating a hash value by using a preset lottery function and a consensus random number;
converting the hash value into prize information by using a conversion function;
the result of the prize is published on the blockchain by the audit node.
Further, after the audit node publishes the prize information, the method further includes:
and the management node gathers the betting information of all blocks in the current period, calculates the rewards of all the rewards and the winning lists by combining the winning information published by the auditing node, and publishes the rewards.
Further, the blockchain is a coalition chain.
Further, the consensus mechanism of the blockchain employs a equity proof mechanism.
Further, the blockchain also comprises a secondary audit node, and the secondary audit node is a third party organization.
Further, the audit node serves the primary role of sharing part of the management responsibilities.
Further, the audit node and the secondary audit node can solve the branches by rapidly releasing new blocks when the block chain branches, so as to ensure the stability of the whole alliance chain.
Further, the secondary audit node also provides facilities for real-time audit for third party authorities.
A second aspect of the embodiments of the present invention provides a terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method described above when executing the computer program.
A third aspect of the embodiments of the present invention provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method as described above.
Compared with the prior art, the embodiment of the invention has the beneficial effects that:
recording and auditing the whole betting and lottery drawing process by using a block chain technology, so as to protect betting data and lottery drawing data, and ensure that all betting information and lottery drawing information are publicly and searchable;
the disclosed protocol is used to automate the drawing process and can be used as a drawing device for various lottery tickets. Because of the wide adaptability of the technology, the public protocol can be in various forms, namely, a form of adopting public technical document convention and then using different modes according to specific scenes; the form of blockchain intelligence contracts may also be employed; forms of exposing generic APIs and self-developing by third parties, etc. may also be employed. The method ensures the fairness of the lottery drawing mechanism and reduces the auditing difficulty of the lottery drawing process. The information for drawing the prize has two parts, namely, one part, the random seed for drawing the prize is published when the prize is sold (the fashion is unreadable); secondly, all betting data are uploaded to a blockchain before lottery drawing, and the information is public and can be checked; the two pieces of information disclosed can ensure the openness of the prize drawing.
The present application builds a random number consensus protocol on the blockchain, uses digital signature or authenticated encryption techniques to protect the initial random seed, and uses the random seed and subsequent accounting blocks to generate the final (consensus) random number. The method ensures the fairness of rights by utilizing that all nodes do not possess all information for generating a final (consensus) random number before random seed disclosure; after the random seed is disclosed, all nodes can calculate and verify the final (consensus) random number to ensure the fairness of the process; on the basis of ensuring fairness and fairness, the random number consensus among all nodes is achieved.
The method and the system increase the security of various aspects by introducing a plurality of institutions with different identities as secondary audit nodes, such as banks and insurance companies as secondary audit nodes to endorse funds; introducing a network security mechanism to endorse data security; introduction of an arbitration mechanism provides a dispute resolution channel for legal disputes, and the like.
The blockchain is preferably a alliance chain, accounting nodes are controlled in an access mode of the alliance chain, and third party notarization, audit, judicial and supervision authorities are introduced to strengthen the security of the alliance chain.
The information entropy for drawing the prize is jointly generated by a prize drawing mechanism (management node), a billing mechanism (billing node) and a wagering condition (namely, a wagering record is generated by a wagerer), so that the result of drawing the prize is jointly generated by all participating individuals and mechanisms, and the fairness of drawing the prize is ensured.
The data in the blockchain of the present application eliminates the need for special drawing equipment and environments for lottery drawings by opening the lottery drawings to all individuals and organizations through a fully disclosed UI and API.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a block chain lottery drawing method according to an embodiment of the present invention;
fig. 2 is a detailed flowchart of a block chain lottery drawing method according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to illustrate the technical scheme of the invention, the following description is made by specific examples.
Fig. 1 is a schematic flow chart of a block chain lottery drawing method according to the present invention, and fig. 2 is a detailed flow chart of the block chain lottery drawing method according to the present invention. Referring to fig. 1 and 2, the block chain lottery drawing method provided in this embodiment is specifically described as follows:
step 1, constructing a blockchain for lottery drawing, wherein the blockchain comprises three types of trusted nodes: accounting node, management node and audit node;
the management node is used for announcing the sales information, the sales stopping information of each lottery ticket and publishing random seeds of each lottery ticket; if no audit node exists, the management node is also responsible for acting on the responsibilities of the audit node.
The accounting node is used for recording the betting information and the drawing information of each period of lottery;
and the audit node is used for auditing the content in the accounting node, calculating and publishing the lottery drawing information.
The trusted node needs to be authenticated with an additional digital certificate and the important information needs to be signed with the certificate in the block it generates, the signature being written to the block header for verification by all nodes. The signature information is part of a consensus protocol. The digital certificate is managed and issued by the audit node, and if no audit node exists, the digital certificate is proxied by the management node. The first root certificate is introduced by the creation block.
In this embodiment, the blockchain is preferably in the form of an organization of the federated chain, with information on the chain being accessible to any person or organization, but only allowing trusted related authorities and regulatory agency nodes to bill.
In addition, the consensus mechanism of the blockchain adopts a Proof-of-possession (PoS) mode. The manner of Proof-of-work (PoW) is not applicable, given that the rights and computational power of trusted nodes need to be limited. In addition, as different nodes take different roles, the adoption of the rights and interests proving mode has more convenience in branch resolution and supervision.
The audit node of the embodiment can also perform the weight reduction and even the name removal (the certificate of the relevant node is withdrawn) on the nodes which maliciously violate the protocols such as the consensus mechanism and the like.
According to actual needs, more secondary audit nodes can be introduced, wherein the secondary audit nodes are third party institutions, such as banks and insurance companies, as secondary audit nodes to endorse funds safely; the network security mechanism is used for endorsing data security; introduction of arbitration mechanisms provides dispute resolution channels for legal disputes, etc., where the nodes do not manage the rights of other nodes, but introduction of these secondary audit nodes can improve the security of the entire blockchain.
Each block on the chain is generated by a single trusted node at a time, and when a bifurcation occurs, a management node rapidly issues a new block for arbitration.
Step 2, constructing a random number consensus protocol on the blockchain, and recording, auditing and disclosing betting information and lottery drawing information of each lottery by utilizing the blockchain with the random number consensus protocol, wherein the betting information and the lottery drawing information specifically comprise:
step 2.1, the management node announces the information of the current lottery ticket sale, which is specifically:
step 2.1.1, the management node selects a pseudo random number as a random seed S and keeps the pseudo random number properly, and the pseudo random number cannot be disclosed before the current period expires.
Step 2.1.2, the management node signs the random seed using a digital certificate.
And 2.1.3, the management node issues sales information and the digital signature of the random seed in the period obtained in the step 2.1.2.
Step 2.2, the billing node records the betting information of each block in the current lottery, and the information of the related block is recorded as D, D= { D 1 ,d 2 ,d 3 ,…d n },d i Corresponding to the betting information in the ith block (other random information in the blocks can be added, such as time stamp, etc.), the purpose of the accounting node recording the betting information of each block in the current lottery is: all betting information must be influenced on the final calculation to prevent opening at the endPortions of the transaction are selectively removed during the prize to manipulate the outcome of the prize. The betting information can be input in various ways, and preferably, the block betting record Merkle tree root node hash value is used.
During the current period of sales, new blocks are issued by the audit node to indicate approval of wagering information in past blocks.
And 2.3, when the lottery ticket selling in the current period is stopped, the management node issues new block announce and stop information and discloses random seeds for lottery ticket selling in the current period.
And 2.4, after any one node of the accounting node, the management node and the audit node receives the sales stopping information, calculating the lottery drawing information by combining the random seeds, and publishing the lottery drawing information by the audit node. After the random seed is released, the calculation process of the consensus random number specifically comprises the following steps:
step 2.4.1, verifying the random seed according to a digital certificate signature verification algorithm v, namely s=v (S), if the random seed cannot pass, the consensus requirement of the blockchain itself cannot be met, and the block is rejected by all nodes;
step 2.4.2, after verification is completed, calculating a consensus random number by using a preset random number generation function; recording a preset random number generation function as R, acting the function on the S in 2.1 and the D in 2.2 to obtain a result of R=r (S, D), wherein the obtained R is a consensus random number;
step 2.4.3, calculating the final prize t (R) according to a previously published prize drawing function t (which is given in the corresponding lottery technical specification document). The winning function t should be a hash function of high complexity. This function may be constructed by repeatedly using one or more standard cryptographic hash functions (e.g., sha1, md 5) N times (N > > 0), in addition to the fact that another better option is to directly use an official encryption authority-authenticated key derivation function (e.g., argon 2).
Step 2.4.4, all nodes can complete the calculation and verification process.
And 2.4.5, the audit node is responsible for issuing the lottery result.
The above-described lottery process may also be implemented using smart contracts.
And 2.5, the management node gathers the betting information of all blocks in the current period, calculates the rewards of all the reward levels and the winning lists by combining the winning information published by the auditing node, and publishes the rewards.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
The invention mainly automates the random number generation process by introducing a billing mechanism of the blockchain. Under the design, the random number required by the prize drawing is generated by full-chain consensus, the information entropy of the random number comprises transaction information from random seed generation to full-chain before the prize drawing, the random number is ensured to have all effective information before the random seed drawing, and each node has more or less influence capability on the random number due to the promotion with time; on the other hand, after the random seed is published, all people have all effective information, all people can calculate the consensus random number by themselves, any additional hardware or software equipment is not required to be cut off, the generation fairness and fairness of the random number are ensured, meanwhile, the cost of an attacker trying to attack is greatly increased, and the safety of the random number generation process is ensured.
Further, when there are enough participating nodes, the consensus random number possesses enough information entropy and should be considered as a true random number rather than a pseudo random number.
In addition, in the process of drawing the lottery, because the random number used for drawing the lottery is completely generated before the expiration of the wager (the random number cannot be read before the expiration of the current period), even if the wager is unevenly distributed in the process of drawing the lottery, an attacker cannot control the final result of drawing the lottery by reselecting the random seed so as to bias the result to the favorable direction, and the fairness, openness and fairness of the process of drawing the lottery are ensured.
In the embodiment of the present invention, the execution body of the method is a terminal device, and the terminal device includes, but is not limited to, a terminal device with a software development function, such as a notebook computer, a server, a tablet computer, a smart phone, and the like. The terminal device comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to realize the steps of the method.
The processor may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may be an internal storage unit of the terminal device, such as a hard disk or a memory of the terminal device. The memory may also be an external storage device of the terminal device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal device. Further, the memory may also include both an internal storage unit and an external storage device of the terminal device. The memory is used for storing the computer program and other programs and data required by the terminal device. The memory may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other manners. For example, the apparatus/terminal device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.
Claims (7)
1. A method of drawing a blockchain lottery, comprising:
constructing a blockchain for lottery drawing;
constructing a random number consensus protocol on the blockchain, and recording, auditing and disclosing betting information and lottery drawing information of each lottery by using the blockchain with the random number consensus protocol;
three types of trusted nodes are included in the blockchain: accounting node, management node and audit node;
the management node is used for announcing the lottery ticket sale information, the lottery ticket sale information and the lottery ticket sale random seed of each period;
the accounting node is used for recording the betting information and the drawing information of each lottery;
the audit node is used for auditing the content in the accounting node, calculating and publishing lottery drawing information;
recording, auditing and disclosing betting information and drawing information of each lottery by using the blockchain with a random number consensus protocol, wherein the betting information and the drawing information are specifically as follows:
the management node announces the lottery sales information in the current period, selects a random seed, signs the lottery sales information by using a digital certificate, and discloses the obtained digital signature;
the accounting node records the betting information of each block in the current lottery;
when the lottery ticket selling period is over, the management node issues new block announce and sell-off information and discloses the random seed;
after any one node of the accounting node, the management node and the audit node receives the sales stopping information, calculating the lottery drawing information by combining the random seeds, and publishing the lottery drawing information by the audit node;
after any one node of the accounting node, the management node and the audit node receives the sales stopping information, calculating the lottery drawing information by combining the random seeds, and publishing the lottery drawing information by the audit node, wherein the method specifically comprises the following steps:
after any one node of the accounting node, the management node and the auditing node receives the sales stopping information, calculating and generating a consensus random number by using the random seed and the betting information of each block in the current lottery recorded by the accounting node through a random number consensus protocol;
calculating a hash value by using a preset lottery function and a consensus random number;
converting the hash value into prize information by using a conversion function;
the audit node publishes the lottery drawing information;
the step of calculating and generating a consensus random number by using the random seed and the betting information of each block in the current lottery recorded by the accounting node is as follows:
step 1, verifying a random seed according to a digital certificate signature verification algorithm, if the random seed cannot pass, the consensus requirement of a block chain cannot be met, and the block is rejected by all nodes;
and step 2, after verification is completed, calculating a consensus random number by using a preset random number generation function.
2. The blockchain lottery drawing method of claim 1, further comprising, after the audit node publishes drawing information:
and the management node gathers the betting information of all blocks in the current period, calculates the rewards of all the rewards and the winning lists by combining the winning information published by the auditing node, and publishes the rewards.
3. The blockchain lottery drawing method of any of claims 1-2, wherein the blockchain is a coalition chain.
4. The blockchain lottery drawing method of any of claims 1-2, wherein the blockchain consensus mechanism employs a equity proof mechanism.
5. The blockchain lottery drawing method of any of claims 1-2, further comprising a secondary audit node in the blockchain, the secondary audit node being a third party authority.
6. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 5 when the computer program is executed.
7. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110142400.6A CN112767221B (en) | 2021-02-02 | 2021-02-02 | Block chain lottery drawing method, terminal device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110142400.6A CN112767221B (en) | 2021-02-02 | 2021-02-02 | Block chain lottery drawing method, terminal device and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112767221A CN112767221A (en) | 2021-05-07 |
CN112767221B true CN112767221B (en) | 2023-12-19 |
Family
ID=75704634
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110142400.6A Active CN112767221B (en) | 2021-02-02 | 2021-02-02 | Block chain lottery drawing method, terminal device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112767221B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FR3138553A1 (en) * | 2022-07-27 | 2024-02-02 | La Française Des Jeux | Method, device and computer program for electronic printing |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101028778A (en) * | 2007-04-30 | 2007-09-05 | 四川亚元防伪科技有限公司 | Anti-fogery lottery receipt, evidence, lottery-ticket and its production, long-distance cashing method and system |
CN106504174A (en) * | 2016-09-27 | 2017-03-15 | 布比(北京)网络技术有限公司 | Lottery industry publishing system and device based on block chain |
CN106682950A (en) * | 2017-01-11 | 2017-05-17 | 英泰伟业科技(北京)有限公司 | Lottery cashing method, system and dedicated interactive device, cashing management server |
CN106980488A (en) * | 2017-03-14 | 2017-07-25 | 腾讯科技(深圳)有限公司 | Random digit generation method and device |
CN107124403A (en) * | 2017-04-14 | 2017-09-01 | 朱清明 | The generation method and computing device of common recognition block in block chain |
CN107301546A (en) * | 2017-05-03 | 2017-10-27 | 北京众享比特科技有限公司 | Generating random number and methods for using them and device |
CN109672693A (en) * | 2019-02-02 | 2019-04-23 | 江苏通付盾科技有限公司 | Lottery rewarding method and device based on block chain |
CN109741513A (en) * | 2018-12-20 | 2019-05-10 | 太原理工大学 | A kind of winners' announcement in lottery method based on block chain technology |
CN110647311A (en) * | 2018-06-27 | 2020-01-03 | 厦门本能管家科技有限公司 | Uncontrollable random number generation method and system |
CN110990882A (en) * | 2019-11-21 | 2020-04-10 | 山东爱城市网信息技术有限公司 | Lottery issuing method, equipment and medium based on block chain |
CN111429186A (en) * | 2020-04-08 | 2020-07-17 | 杭州左链科技有限公司 | Fancy carp lottery incentive method, equipment and storage medium |
-
2021
- 2021-02-02 CN CN202110142400.6A patent/CN112767221B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101028778A (en) * | 2007-04-30 | 2007-09-05 | 四川亚元防伪科技有限公司 | Anti-fogery lottery receipt, evidence, lottery-ticket and its production, long-distance cashing method and system |
CN106504174A (en) * | 2016-09-27 | 2017-03-15 | 布比(北京)网络技术有限公司 | Lottery industry publishing system and device based on block chain |
CN106682950A (en) * | 2017-01-11 | 2017-05-17 | 英泰伟业科技(北京)有限公司 | Lottery cashing method, system and dedicated interactive device, cashing management server |
CN106980488A (en) * | 2017-03-14 | 2017-07-25 | 腾讯科技(深圳)有限公司 | Random digit generation method and device |
CN107124403A (en) * | 2017-04-14 | 2017-09-01 | 朱清明 | The generation method and computing device of common recognition block in block chain |
CN107301546A (en) * | 2017-05-03 | 2017-10-27 | 北京众享比特科技有限公司 | Generating random number and methods for using them and device |
CN110647311A (en) * | 2018-06-27 | 2020-01-03 | 厦门本能管家科技有限公司 | Uncontrollable random number generation method and system |
CN109741513A (en) * | 2018-12-20 | 2019-05-10 | 太原理工大学 | A kind of winners' announcement in lottery method based on block chain technology |
CN109672693A (en) * | 2019-02-02 | 2019-04-23 | 江苏通付盾科技有限公司 | Lottery rewarding method and device based on block chain |
CN110990882A (en) * | 2019-11-21 | 2020-04-10 | 山东爱城市网信息技术有限公司 | Lottery issuing method, equipment and medium based on block chain |
CN111429186A (en) * | 2020-04-08 | 2020-07-17 | 杭州左链科技有限公司 | Fancy carp lottery incentive method, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112767221A (en) | 2021-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230214792A1 (en) | Computer implemented systems and methods | |
Dimitriou | Efficient, coercion-free and universally verifiable blockchain-based voting | |
US11978313B2 (en) | Distributed ledger based gaming system | |
US10931457B2 (en) | Systems and methods for blockchain-based digital lottery ticket generation and distribution | |
US20200193764A1 (en) | Instant games based on distributed ledger | |
Miers et al. | Zerocoin: Anonymous distributed e-cash from bitcoin | |
FI109278B (en) | Method and arrangement for organizing electronic instant lottery | |
CN109614438A (en) | A kind of Claims Resolution method and apparatus based on block chain | |
TWI772067B (en) | Method for submitting tax submission on behalf of a player of a game | |
Hölbl et al. | EduCTX: an ecosystem for managing digital micro-credentials | |
WO2018104728A1 (en) | Random number generation | |
CN110912705B (en) | Distributed electronic voting method and system based on block chain | |
CN111260485A (en) | Mutual-aid insurance method, equipment and medium based on block chain | |
Madise et al. | Constitutionality of remote internet voting: The Estonian perspective | |
CN112767221B (en) | Block chain lottery drawing method, terminal device and computer readable storage medium | |
Alvi et al. | A blockchain based cost effective digital voting system using SideChain and smart contracts | |
RU2144695C1 (en) | Method for claiming liability for card-related action by client and for accepting the claim by issuer | |
Neloy et al. | A remote and cost‐optimized voting system using blockchain and smart contract | |
US20140187303A1 (en) | Methods for Enhancing Payouts and Play in Games of Chance | |
CN113128850B (en) | Lottery flow management method, system, terminal equipment and storage medium | |
US20040167792A1 (en) | Method and management system for gaming management between a gaming management center and at least one gaming terminal, gaming management center and gaming terminal | |
Stancel | Economic Consequences of Cryptocurrencies and Associated Decentralized Systems | |
Chen et al. | A traceable online insurance claims system based on blockchain and smart contract technology. Sustainability 2021, 13, 9386 | |
CN117879860B (en) | Trusted data verification processing method, device and equipment based on blockchain | |
Khalifa et al. | Designing a framework for blockchain-based e-voting system for Libya |
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 |