CN108038954A - Transaction operation method and digging ore deposit node based on block chain - Google Patents
Transaction operation method and digging ore deposit node based on block chain Download PDFInfo
- Publication number
- CN108038954A CN108038954A CN201711249563.4A CN201711249563A CN108038954A CN 108038954 A CN108038954 A CN 108038954A CN 201711249563 A CN201711249563 A CN 201711249563A CN 108038954 A CN108038954 A CN 108038954A
- Authority
- CN
- China
- Prior art keywords
- node
- lottery ticket
- random number
- participates
- ore deposit
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 230000008901 benefit Effects 0.000 claims abstract description 84
- 230000005540 biological transmission Effects 0.000 claims abstract description 23
- 238000012546 transfer Methods 0.000 claims description 29
- 230000009286 beneficial effect Effects 0.000 claims 1
- 230000007246 mechanism Effects 0.000 abstract description 11
- 238000005516 engineering process Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 6
- 230000008859 change Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 244000097202 Rathbunia alamosensis Species 0.000 description 2
- 235000009776 Rathbunia alamosensis Nutrition 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- PCHJSUWPFVWCPO-UHFFFAOYSA-N gold Chemical compound [Au] PCHJSUWPFVWCPO-UHFFFAOYSA-N 0.000 description 2
- 239000010931 gold Substances 0.000 description 2
- 229910052737 gold Inorganic materials 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000006467 substitution reaction Methods 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
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/08—Payment architectures
- G06Q20/10—Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
-
- 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/005—Generating random numbers; Lottery apparatus with dispensing of lottery tickets
Abstract
The embodiment of the present invention provides a kind of transaction operation method based on block chain and digs ore deposit node.The embodiment of the present invention digs ore deposit node by first and receives the random number and bid amount that each lottery ticket participation node is sent in block chain network, calculate the cryptographic Hash that each lottery ticket participates in the random number that node is sent, the random number of node transmission is participated according to cryptographic Hash and each lottery ticket, determine that each lottery ticket participates in the benefit node in node, and the identification information of the benefit node and other nodes need to be broadcast in block chain network to the amount of money that the benefit node is transferred accounts, the operation of lottery ticket includes stake, all links such as announce the winners in a lottery no longer are runed by the third-party institution, solve the problems, such as due to the third-party institution run lottery ticket and caused by operating mechanism lack security.
Description
Technical field
The present embodiments relate to field of communication technology, more particularly to it is a kind of based on the transaction operation method of block chain and digging
Ore deposit node.
Background technology
Block chain (Blockchain) is a key concept of bit coin, fiery five road junction finance of coin joint Tsinghua University
Institute's internet financial laboratory, Sina's science and technology are issued《2014-2016 global bit coin developmental researches are reported》Mention block chain
It is the Floor layer Technology and architecture of bit coin.Substantially it is the database of a decentralization, while as the bottom of bit coin
Layer technology.Block chain is a string of data blocks for being associated generation using cryptography method, is contained once in each data block
The information of bit coin network trading, for verifying the validity (false proof) and the next block of generation of its information.
In the prior art, the operation of lottery ticket all links such as includes betting, announces the winners in a lottery and all being runed by the third-party institution,
Once the proprietary stake information for causing stake is destroyed, or usurped by hacker by the third-party institution by hacker attack
Change, cause the operating mechanism of lottery ticket to lack security.
The content of the invention
The embodiment of the present invention provides a kind of transaction operation method based on block chain and digs ore deposit node, to improve the fortune of lottery ticket
The security of battalion's mechanism.
The one side of the embodiment of the present invention is to provide a kind of transaction operation method based on block chain, including:
First, which digs ore deposit node, receives random number and bid amount that each lottery ticket in block chain network participates in node transmission, and will
Each lottery ticket participates in the random number of node transmission and bid amount is recorded in the first block;
Described first, which digs ore deposit node, calculates the cryptographic Hash that each lottery ticket participates in the random number that node is sent;
Described first digs the random number that ore deposit node participates in node transmission according to the cryptographic Hash and each lottery ticket, determines
Each lottery ticket participates in the benefit node in node;
Described first digs ore deposit node sends broadcast message to the block chain network, so that the second digging ore deposit node will be described wide
Message Record is broadcast in the second block, the broadcast message includes:Benefit the identification information of node, each lottery ticket participates in node
In the non-node that benefits need to be to the amount of money that transfer accounts of benefit node.
The other side of the embodiment of the present invention is to provide a kind of digging ore deposit node, including:
Receiving module, random number and the bid amount that node is sent are participated in for receiving each lottery ticket in block chain network, and
Each lottery ticket is participated in into the random number of node transmission and bid amount is recorded in the first block;
Computing module, the cryptographic Hash for the random number that node is sent is participated in for calculating each lottery ticket;
Determining module, for participating in the random number of node transmission according to the cryptographic Hash and each lottery ticket, determines institute
State the benefit node in each lottery ticket participation node;
Sending module, broadcasts the message for being sent to the block chain network, so that other dig ore deposit node by the broadcast
In the second block, the broadcast message includes Message Record:Benefit the identification information of node, each lottery ticket is participated in node
The non-amount of money that benefits node and need to transfer accounts to the benefit node.
Transaction operation method and digging ore deposit node provided in an embodiment of the present invention based on block chain, pass through first and dig ore deposit node
Receive each lottery ticket in block chain network and participate in random number and the bid amount that node is sent, calculate each lottery ticket and participate in what node was sent
The cryptographic Hash of random number, the random number of node transmission is participated according to cryptographic Hash and each lottery ticket, determines that each lottery ticket is participated in node
Benefit node, and the identification information of the benefit node and other nodes need to be broadcast to area to the amount of money that the benefit node is transferred accounts
In block chain network, all links such as the operation of lottery ticket includes betting, announce the winners in a lottery no longer are runed by the third-party institution, solve due to
The third-party institution run lottery ticket and caused by operating mechanism lack security the problem of.
Brief description of the drawings
Attached drawing herein is merged in specification and forms the part of this specification, shows the implementation for meeting the disclosure
Example, and be used to together with specification to explain the principle of the disclosure.
Fig. 1 is the transaction operation method flow chart provided in an embodiment of the present invention based on block chain.;
Fig. 2 is the schematic diagram of communication system provided in an embodiment of the present invention;
Fig. 3 is the transaction operation method flow chart based on block chain that another embodiment of the present invention provides;
Fig. 4 is the transaction operation method flow chart based on block chain that another embodiment of the present invention provides;
Fig. 5 is the structure chart of digging ore deposit node provided in an embodiment of the present invention.
Pass through above-mentioned attached drawing, it has been shown that the clear and definite embodiment of the disclosure, will hereinafter be described in more detail.These attached drawings
It is not intended to limit the scope of disclosure design by any mode with word description, but is by reference to specific embodiment
Those skilled in the art illustrate the concept of the disclosure.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to
During attached drawing, unless otherwise indicated, the same numbers in different attached drawings represent the same or similar key element.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they be only with it is such as appended
The example of the consistent apparatus and method of some aspects be described in detail in claims, the disclosure.
Block chain (Blockchain) is a key concept of bit coin, fiery five road junction finance of coin joint Tsinghua University
Institute's internet financial laboratory, Sina's science and technology are issued《2014-2016 global bit coin developmental researches are reported》Mention block chain
It is the Floor layer Technology and architecture of bit coin.Substantially it is the database of a decentralization, while as the bottom of bit coin
Layer technology.Block chain is a string of data blocks for being associated generation using cryptography method, is contained once in each data block
The information of bit coin network trading, for verifying the validity (false proof) and the next block of generation of its information.
For narrow sense, block chain be it is a kind of sequentially in time by data block by sequentially be connected in a manner of be combined into one
Kind linked data structure, and the distributed account book that can not be distorted He can not forge ensured in a manner of cryptography.Broadly, area
Block chain technology is to be generated and more using block linked data structure to verify and store data, algorithm is known together using distributed node
New data, the safety for ensureing using the mode of cryptography data transfer and access, utilize the intelligence being made of automatized script code
Can contract program a kind of brand-new distributed basis framework and calculation paradigm with operation data.
In bit coin network, data are recorded permanently in the form of a file, and we term it block.One block is
Or the record set of all latest bit coin transaction, and do not recorded by other previous blocks.Block can be envisioned as a city
Total account book of independent one-page (to the change record of real estate property) or stock exchange on the minute book of keeper.
In most cases, it is last (entitled in bit coin to be added into record for new block:Block chain), once write, just
Again it cannot change or delete.Each block have recorded it and be created all events occurred before.
Each block includes some or all of Recent Activities, the reference of previous block and other data.It is further included
Answer-answer of one digging mine disaster degree is unique to each block.If new block is without correct option, it is impossible to is sent
Into network-process nature of " digging ore deposit " on be " solution " current block in competition.Each area mathematical problem in the block is difficult to
Solve, but be once found that an effectively solution, other network nodes are it is easily verified that the correctness of this solution, for given
Block may have multiple effectively solutions-but a solution is only needed for the block to be solved.
In the prior art, the operation of lottery ticket all links such as includes betting, announces the winners in a lottery and all being runed by the third-party institution,
Once the proprietary stake information for causing stake is destroyed, or usurped by hacker by the third-party institution by hacker attack
Change, cause the operating mechanism of lottery ticket to lack security.In order to solve this problem, present embodiments provide a kind of based on block chain
Transaction operation method, is below in conjunction with specific embodiments introduced the transaction operation method based on block chain.
How the technical solution of technical scheme and the application is solved with specifically embodiment below above-mentioned
Technical problem is described in detail.These specific embodiments can be combined with each other below, for the same or similar concept
Or process may repeat no more in certain embodiments.Below in conjunction with attached drawing, the embodiment of the present invention is described.
Fig. 1 is the transaction operation method flow chart provided in an embodiment of the present invention based on block chain.Pin of the embodiment of the present invention
To the as above technical problem of the prior art, there is provided the transaction operation method based on block chain, this method comprise the following steps that:
Step 101, first dig ore deposit node and receive random number and bid that each lottery ticket in block chain network participates in node transmission
The amount of money, and random number and bid amount that each lottery ticket participation node is sent are recorded in the first block.
Transaction operation method provided in an embodiment of the present invention based on block chain is suitable for communication system as shown in Figure 2,
As shown in Fig. 2, the communication system includes block chain network, node 1, node 2, node 3, node 5, node M, node M+1, herein
Simply schematically illustrate, do not limit the structure of specific communication system, also do not limit for the node that block chain network includes
Number.
In the present embodiment, node 1, node 2, node 3, node 5, node M, node M+1 can be joined by block chain network
With lottery activity, specifically, node 1, node 2, node 3, node 5 generate a random number respectively, for example, node 1 produce with
Machine number is Random1, and the random number that node 2 produces is Random2, and the random number that node 3 produces is Random3, and node 5 produces
Random number be Random5, in addition, while node 1, node 2, node 3, node 5 generate a random number respectively, node 1,
Node 2, node 3, node 5 can also determine that it participates in the bid amount of lottery activity respectively, and optionally, node 1 participates in lottery ticket
The bid amount of activity is the bit coin for belonging to node 1, and the bid amount that node 2 participates in lottery activity is the ratio for belonging to node 2
Special coin, the bid amount that node 3 participates in lottery activity are the bit coin for belonging to node 3, and node 5 participates in the bid gold of lottery activity
Volume is the bit coin for belonging to node 5.
Specifically, the bid amount of its random number R andom1 and participation lottery activity are broadcast to block chain network by node 1
In, node 2 by its random number R andom2 and participate in lottery activity bid amount be broadcast in block chain network, node 3 by its
Random number R andom3 and participate in the bid amount of lottery activity and be broadcast in block chain network, node 5 is by its random number
The bid amount of Random5 and participation lottery activity is broadcast in block chain network.All nodes in block chain network will connect
The message that node 1, node 2, node 3, node 5 are broadcasted respectively is received, and node 1, node 2, node 3, node 5 are broadcasted respectively
Message recorded, it is assumed that node M got such as the Y block of current block book keeping operation power, node M for first dig ore deposit section
Point, then node M by the Message Record that node 1, node 2, node 3, node 5 are broadcasted respectively in the Y block.
For example, the random number that node 1 produces is R1, bid amount is 5 yuan, the random number that node 2 produces is R2, bid gold
Volume is 7 yuan, and the random number that node 3 produces is R3, bid amount is 4 yuan, and the random number that node 1 produces is R5, bid amount is
100 yuan.After node 1, node 2, node 3, node 5 broadcast respective random number and bid amount respectively, node M, which has been got, to be worked as
Preceding such as the Y block of block book keeping operation power, then node M by node 1, node 2, node 3, node 5 broadcast respectively it is respective with
Machine number and bid amount are recorded in the Y block.
Step 102, described first dig ore deposit node and calculate the cryptographic Hash that each lottery ticket participates in the random number that node is sent.
Node M in the Y block period the random number R 1 of calculate node 1, the random number R 2 of node 2, node 3 it is random
Number R3, node 5 random number R 5 cryptographic Hash, which is denoted as HASH N, HASH N=HASH (R1, R2, R3, R5).
Step 103, described first dig ore deposit node and participate in the random of node transmission according to the cryptographic Hash and each lottery ticket
Number, determines that each lottery ticket participates in the benefit node in node.
Node M according to cryptographic Hash HASH N, and node 1, node 2, node 3, node 5 broadcast respectively random number R 1,
R2, R3, R5, judge whether HASH N are equal in R1, R2, R3, R5 one of them, if HASH N are equal to R1, R2, R3, R5
In one of them, for example, HASH N are equal to R1, then the corresponding node, that is, node 1 of random number R 1 is benefits node.At this time, save
Point 2 need to transfer accounts to node 17 yuan, node 3 need to transfer accounts to node 14 yuan, node 5 need to transfer accounts 100 yuan to node 1.
If node M judges that HASH N and the either of which in R1, R2, R3, R5 are unequal, from R1, R2, R3, R5
In determine the nearest at least one random numbers of distance HASH N, and by least one random number pair nearest distance HASH N
The node answered is as benefit node.For example, R1 and R5 are approached with HASH N respectively, for example, the difference of R1 and HASH N is absolute
Value is less than default value, and the absolute value of the difference of R5 and HASH N is again smaller than default value, then by the corresponding nodes 1 of R1 and R5 pairs
The node 5 answered is as benefit node.Node M according to node 1, node 2, node 3,5 bid amount of node ratio by 2 and of node
The bid amount of node 3 distributes to node 1 and node 5, and optionally, node 2 is transferred accounts 0.5 yuan to node 1, and node 2 is to 5 turns of node
6.5 yuan of account, node 3 are transferred accounts 4 yuan to node 5.
Step 104, described first dig ore deposit node and send broadcast message to the block chain network, so that second digs ore deposit node
The broadcast message is recorded in the second block, the broadcast message includes:Benefit identification information, each lottery ticket of node
Participate in the non-amount of money that benefits node and need to transfer accounts to the benefit node in node.
If HASH N are equal to one of them in R1, R2, R3, R5, for example, HASH N are equal to R1, then random number R 1 is right
The node answered i.e. node 1 is benefit node.At this time, node M sends to block chain network and broadcasts the message, which includes:
Benefit node, that is, node 1 identification information, node 2 need to transfer accounts to node 17 yuan, node 3 need to transfer accounts to node 14 yuan, node 5 need
Transfer accounts 100 yuan to node 1.In block chain network, it is assumed that node M+1 grabs the book keeping operation power to the Y+1 block, then node
The broadcast message that M+1 sends node M to block chain network is recorded in the Y+1 block.For example, in the Y+1 block
Including:Benefit node, that is, node 1 identification information, node 2 need to transfer accounts to node 17 yuan, node 3 need to transfer accounts to node 14 yuan, section
Point 5 need to transfer accounts 100 yuan to node 1.
If node M judges that HASH N and the either of which in R1, R2, R3, R5 are unequal, from R1, R2, R3, R5
In determine the nearest at least one random numbers of distance HASH N, and by least one random number pair nearest distance HASH N
The node answered is as benefit node.For example, node 1 and node 5 are benefit node.At this time, node M is sent wide to block chain network
Message is broadcast, which includes:Benefit the identification information of node, that is, node 1 and the identification information of node 5, node 2 is to node 1
Transfer accounts 0.5 yuan, node 2 is transferred accounts 6.5 yuan to node 5, and node 3 is transferred accounts 4 yuan to node 5.In block chain network, it is assumed that node M+
1 grabs the book keeping operation power to the Y+1 block, then the broadcast message that node M+1 sends node M to block chain network is recorded in
In the Y+1 block.For example, include in the Y+1 block:Benefit the identification information of node, that is, node 1 and the mark of node 5
Information, node 2 are transferred accounts 0.5 yuan to node 1, and node 2 is transferred accounts 6.5 yuan to node 5, and node 3 is transferred accounts 4 yuan to node 5.
In the present embodiment, the Y block can be since in first block period having the block of lottery transactions,
The information such as the bid of the lottery ticket including the block chain historical first round in this block period and random number.
Optionally, second block further includes:Each lottery ticket participates in the bid amount of node in the first block period
Summation, described second digs amount of money award of the ore deposit node as the book keeping operation power node of second block.
For example, the Y+1 block is not only included in the Y block period, benefit the identification information of node, and other
The amount of money that node is transferred accounts to the benefit node, in addition, further including:In the Y block period, each lottery ticket participates in the bid of node
5 yuan of the bid amount of the summation of the amount of money such as node 1,7 yuan of the bid amount of node 2,4 yuan of bid amount, the node 5 of node 3
100 yuan of bid amount summation i.e. 116 yuan.Optionally, in the block chain network, advance according to whole block chain network
Agreement, the certain percentage that each lottery ticket participates in the summation of the bid amount of node can be used as to book keeping operation power node such as node M+1
Reward.Further, the Y+1 block further includes:The amount of money award that the Y+1 block obtains.
Optionally, second block further includes:Each lottery ticket participates in the random number that node is sent in the second block period
And bid amount.
For example, the Y+1 block is additionally included in the Y+1 block period, each lottery ticket participates in the random number that node is sent
And bid amount, i.e. when the lottery activity of a new round starts, each lottery ticket participates in random number and the bid amount that node is sent.
The embodiment of the present invention digs each lottery ticket in ore deposit node reception block chain network by first and participates in the random of node transmission
Number and bid amount, calculate the cryptographic Hash that each lottery ticket participates in the random number that node is sent, and section is participated according to cryptographic Hash and each lottery ticket
The random number that point is sent, determines that each lottery ticket participates in the benefit node in node, and by the identification information of the benefit node and its
He need to be broadcast in block chain network node to the amount of money that the benefit node is transferred accounts, and the operation of lottery ticket includes betting, announce the winners in a lottery etc. one
Link is cut no longer to be runed by the third-party institution, solve due to the third-party institution run lottery ticket and caused by operating mechanism lack
The problem of security.
Fig. 3 is the transaction operation method flow chart based on block chain that another embodiment of the present invention provides.In above-mentioned implementation
On the basis of example, the transaction operation method provided in this embodiment based on block chain specifically comprises the following steps:
Step 301, first dig ore deposit node and receive random number and bid that each lottery ticket in block chain network participates in node transmission
The amount of money, and random number and bid amount that each lottery ticket participation node is sent are recorded in the first block.
Step 301 is consistent with concrete principle with the implementation of step 101, and details are not described herein again.
Step 302, described first dig ore deposit node and calculate the cryptographic Hash that each lottery ticket participates in the random number that node is sent.
Step 302 is consistent with concrete principle with the implementation of step 102, and details are not described herein again.
If one in the random number that step 303, the cryptographic Hash are sent equal to each lottery ticket participation node is random
Number, the then lottery ticket that the random number that the first digging ore deposit node determines the benefit node to send is equal to the cryptographic Hash participate in section
Point.
Node M according to cryptographic Hash HASH N, and node 1, node 2, node 3, node 5 broadcast respectively random number R 1,
R2, R3, R5, judge whether HASH N are equal in R1, R2, R3, R5 one of them, if HASH N are equal to R1, R2, R3, R5
In one of them, for example, HASH N are equal to R1, then the corresponding node, that is, node 1 of random number R 1 is benefits node.At this time, save
Point 2 need to transfer accounts to node 17 yuan, node 3 need to transfer accounts to node 14 yuan, node 5 need to transfer accounts 100 yuan to node 1.
Step 304, described first dig ore deposit node and send broadcast message to the block chain network, so that second digs ore deposit node
The broadcast message is recorded in the second block, the broadcast message includes:Benefit identification information, each lottery ticket of node
Participate in the non-amount of money that benefits node and need to transfer accounts to the benefit node in node.
If HASH N are equal to one of them in R1, R2, R3, R5, for example, HASH N are equal to R1, then random number R 1 is right
The node answered i.e. node 1 is benefit node.At this time, node M sends to block chain network and broadcasts the message, which includes:
Benefit node, that is, node 1 identification information, node 2 need to transfer accounts to node 17 yuan, node 3 need to transfer accounts to node 14 yuan, node 5 need
Transfer accounts 100 yuan to node 1.In block chain network, it is assumed that node M+1 grabs the book keeping operation power to the Y+1 block, then node
The broadcast message that M+1 sends node M to block chain network is recorded in the Y+1 block.For example, in the Y+1 block
Including:Benefit node, that is, node 1 identification information, node 2 need to transfer accounts to node 17 yuan, node 3 need to transfer accounts to node 14 yuan, section
Point 5 need to transfer accounts 100 yuan to node 1.
The embodiment of the present invention digs each lottery ticket in ore deposit node reception block chain network by first and participates in the random of node transmission
Number and bid amount, calculate the cryptographic Hash that each lottery ticket participates in the random number that node is sent, and section is participated according to cryptographic Hash and each lottery ticket
The random number that point is sent, determines that each lottery ticket participates in the benefit node in node, and by the identification information of the benefit node and its
He need to be broadcast in block chain network node to the amount of money that the benefit node is transferred accounts, and the operation of lottery ticket includes betting, announce the winners in a lottery etc. one
Link is cut no longer to be runed by the third-party institution, solve due to the third-party institution run lottery ticket and caused by operating mechanism lack
The problem of security.
Fig. 4 is the transaction operation method flow chart based on block chain that another embodiment of the present invention provides.In above-mentioned implementation
On the basis of example, the transaction operation method provided in this embodiment based on block chain comprises the following steps that:
Step 401, first dig ore deposit node and receive random number and bid that each lottery ticket in block chain network participates in node transmission
The amount of money, and random number and bid amount that each lottery ticket participation node is sent are recorded in the first block.
Step 401 is consistent with concrete principle with the implementation of step 101, and details are not described herein again.
Step 402, described first dig ore deposit node and calculate the cryptographic Hash that each lottery ticket participates in the random number that node is sent.
Step 402 is consistent with concrete principle with the implementation of step 102, and details are not described herein again.
If step 403, the cryptographic Hash participate in the random number that node sends not equal to each lottery ticket, described first
Dig ore deposit node and participate in determining the difference of the random number and cryptographic Hash sent in node in preset range from each lottery ticket
Interior lottery ticket participates in node to benefit node.
Node M according to cryptographic Hash HASH N, and node 1, node 2, node 3, node 5 broadcast respectively random number R 1,
R2, R3, R5, judge whether HASH N are equal in R1, R2, R3, R5 one of them, if node M judge HASH N and R1,
Either of which in R2, R3, R5 is unequal, then nearest at least one of distance HASH N is determined from R1, R2, R3, R5
Random number, and using the corresponding node of at least one random number nearest distance HASH N as benefit node.For example, R1 and R5
Approached respectively with HASH N, for example, the absolute value of the difference of R1 and HASH N is less than default value, the difference of R5 and HASH N
Absolute value is again smaller than default value, then using the corresponding nodes 1 of R1 node 5 corresponding with R5 as benefit node.Node M is according to section
The bid amount of node 2 and node 3 is distributed to node 1 and node by point 1, node 2, node 3, the ratio of 5 bid amount of node
5, optionally, node 2 is transferred accounts 0.5 yuan to node 1, and node 2 is transferred accounts 6.5 yuan to node 5, and node 3 is transferred accounts 4 yuan to node 5.
Step 404, described first dig ore deposit node and send broadcast message to the block chain network, so that second digs ore deposit node
The broadcast message is recorded in the second block, the broadcast message includes:Benefit identification information, each lottery ticket of node
Participate in the non-amount of money that benefits node and need to transfer accounts to the benefit node in node.
If node M judges that HASH N and the either of which in R1, R2, R3, R5 are unequal, from R1, R2, R3, R5
In determine the nearest at least one random numbers of distance HASH N, and by least one random number pair nearest distance HASH N
The node answered is as benefit node.For example, node 1 and node 5 are benefit node.At this time, node M is sent wide to block chain network
Message is broadcast, which includes:Benefit the identification information of node, that is, node 1 and the identification information of node 5, node 2 is to node 1
Transfer accounts 0.5 yuan, node 2 is transferred accounts 6.5 yuan to node 5, and node 3 is transferred accounts 4 yuan to node 5.In block chain network, it is assumed that node M+
1 grabs the book keeping operation power to the Y+1 block, then the broadcast message that node M+1 sends node M to block chain network is recorded in
In the Y+1 block.For example, include in the Y+1 block:Benefit the identification information of node, that is, node 1 and the mark of node 5
Information, node 2 are transferred accounts 0.5 yuan to node 1, and node 2 is transferred accounts 6.5 yuan to node 5, and node 3 is transferred accounts 4 yuan to node 5.
The embodiment of the present invention digs each lottery ticket in ore deposit node reception block chain network by first and participates in the random of node transmission
Number and bid amount, calculate the cryptographic Hash that each lottery ticket participates in the random number that node is sent, and section is participated according to cryptographic Hash and each lottery ticket
The random number that point is sent, determines that each lottery ticket participates in the benefit node in node, and by the identification information of the benefit node and its
He need to be broadcast in block chain network node to the amount of money that the benefit node is transferred accounts, and the operation of lottery ticket includes betting, announce the winners in a lottery etc. one
Link is cut no longer to be runed by the third-party institution, solve due to the third-party institution run lottery ticket and caused by operating mechanism lack
The problem of security.
Fig. 5 is the structure chart of digging ore deposit node provided in an embodiment of the present invention.Digging ore deposit node provided in an embodiment of the present invention can
To perform the process flow that the transaction operation method embodiment based on block chain provides, as shown in figure 5, digging ore deposit node 50 includes:
Receiving module 51, computing module 52, determining module 53, sending module 54, wherein, receiving module 51 is used to receive block chain network
In each lottery ticket participate in random number and the bid amount that node is sent, and each lottery ticket is participated in into the random number and go out that node sends
Valency amount record is in the first block;Computing module 52 is used to calculate the cryptographic Hash that each lottery ticket participates in the random number that node is sent;
Determining module 53 is used for the random number for participating in node according to the cryptographic Hash and each lottery ticket and sending, and determines each lottery ticket
Participate in the benefit node in node;Sending module 54, which is used to send to the block chain network, to broadcast the message, so that other dig ore deposit
The broadcast message is recorded in the second block by node, and the broadcast message includes:Benefit the identification information, described each of node
Lottery ticket participates in the non-amount of money that benefits node and need to transfer accounts to the benefit node in node.
The ore deposit node provided in an embodiment of the present invention that digs can be specifically used for performing the embodiment of the method that above-mentioned Fig. 1 is provided,
Details are not described herein again for concrete function.
The embodiment of the present invention digs each lottery ticket in ore deposit node reception block chain network by first and participates in the random of node transmission
Number and bid amount, calculate the cryptographic Hash that each lottery ticket participates in the random number that node is sent, and section is participated according to cryptographic Hash and each lottery ticket
The random number that point is sent, determines that each lottery ticket participates in the benefit node in node, and by the identification information of the benefit node and its
He need to be broadcast in block chain network node to the amount of money that the benefit node is transferred accounts, and the operation of lottery ticket includes betting, announce the winners in a lottery etc. one
Link is cut no longer to be runed by the third-party institution, solve due to the third-party institution run lottery ticket and caused by operating mechanism lack
The problem of security.
On the basis of above-described embodiment, determining module 53 is specifically used for:If the cryptographic Hash is equal to each lottery ticket
Participate in a random number in the random number that node is sent, it is determined that the node that benefits is equal to the Kazakhstan for the random number sent
The lottery ticket of uncommon value participates in node.
Alternatively, determining module 53 is specifically used for:If the cryptographic Hash participates in what node was sent not equal to each lottery ticket
Random number, then participate in determining the difference of the random number and cryptographic Hash sent in node in preset range from each lottery ticket
Interior lottery ticket participates in node to benefit node.
Optionally, second block further includes:Each lottery ticket participates in the bid amount of node in the first block period
Summation, described other dig amount of money award of the ore deposit node as the book keeping operation power node of second block.
Optionally, second block further includes:Each lottery ticket participates in the random number that node is sent in the second block period
And bid amount.
The ore deposit node provided in an embodiment of the present invention that digs can be specifically used for performing the method reality that above-mentioned Fig. 3 or Fig. 4 is provided
Example is applied, details are not described herein again for concrete function.
The embodiment of the present invention digs each lottery ticket in ore deposit node reception block chain network by first and participates in the random of node transmission
Number and bid amount, calculate the cryptographic Hash that each lottery ticket participates in the random number that node is sent, and section is participated according to cryptographic Hash and each lottery ticket
The random number that point is sent, determines that each lottery ticket participates in the benefit node in node, and by the identification information of the benefit node and its
He need to be broadcast in block chain network node to the amount of money that the benefit node is transferred accounts, and the operation of lottery ticket includes betting, announce the winners in a lottery etc. one
Link is cut no longer to be runed by the third-party institution, solve due to the third-party institution run lottery ticket and caused by operating mechanism lack
The problem of security.
In conclusion the embodiment of the present invention digs ore deposit node by first receives each lottery ticket participation node hair in block chain network
The random number and bid amount sent, calculate the cryptographic Hash that each lottery ticket participates in the random number that node is sent, according to cryptographic Hash and each coloured silk
Ticket participates in the random number that node is sent, and determines that each lottery ticket participates in the benefit node in node, and by the mark of the benefit node
Information and other nodes need to be broadcast in block chain network to the amount of money that the benefit node is transferred accounts, the operation of lottery ticket include stake,
All links such as announce the winners in a lottery no longer are runed by the third-party institution, solve due to the third-party institution runs lottery ticket and caused by operation
Mechanism lacks the problem of security.
In several embodiments provided by the present invention, it should be understood that disclosed apparatus and method, can pass through it
Its mode is realized.For example, device embodiment described above is only schematical, for example, the division of the unit, only
Only a kind of division of logic function, can there is other dividing mode when actually realizing, such as multiple units or component can be tied
Another system is closed or is desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or discussed
Mutual coupling, direct-coupling or communication connection can be the INDIRECT COUPLING or logical by some interfaces, device or unit
Letter connection, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit
The component shown may or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
In network unit.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also
That unit is individually physically present, can also two or more units integrate in a unit.Above-mentioned integrated list
Member can both be realized in the form of hardware, can also be realized in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit realized in the form of SFU software functional unit, can be stored in one and computer-readable deposit
In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer
It is each that equipment (can be personal computer, server, or network equipment etc.) or processor (processor) perform the present invention
The part steps of embodiment the method.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (Read-
Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. it is various
Can be with the medium of store program codes.
Those skilled in the art can be understood that, for convenience and simplicity of description, only with above-mentioned each function module
Division progress for example, in practical application, can be complete by different function modules by above-mentioned function distribution as needed
Into the internal structure of device being divided into different function modules, to complete all or part of function described above.On
The specific work process of the device of description is stated, may be referred to the corresponding process in preceding method embodiment, details are not described herein.
Finally it should be noted that:The above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent
Pipe is described in detail the present invention with reference to foregoing embodiments, it will be understood by those of ordinary skill in the art that:Its according to
Can so modify to the technical solution described in foregoing embodiments, either to which part or all technical characteristic into
Row equivalent substitution;And these modifications or replacement, the essence of appropriate technical solution is departed from various embodiments of the present invention technology
The scope of scheme.
Claims (10)
- A kind of 1. transaction operation method based on block chain, it is characterised in that including:First, which digs ore deposit node, receives random number and bid amount that each lottery ticket in block chain network participates in node transmission, and by described in Each lottery ticket participates in the random number of node transmission and bid amount is recorded in the first block;Described first, which digs ore deposit node, calculates the cryptographic Hash that each lottery ticket participates in the random number that node is sent;Described first digs the random number that ore deposit node participates in node transmission according to the cryptographic Hash and each lottery ticket, determines described Each lottery ticket participates in the benefit node in node;Described first digs ore deposit node sends broadcast message to the block chain network, so that the second digging ore deposit node disappears the broadcast Breath is recorded in the second block, and the broadcast message includes:The identification information of benefit node, each lottery ticket participate in non-in node Benefit the amount of money that node need to transfer accounts to the benefit node.
- 2. according to the method described in claim 1, it is characterized in that, described first digs ore deposit node according to the cryptographic Hash and described Each lottery ticket participates in the random number that node is sent, and determines that each lottery ticket participates in the benefit node in node, including:If a random number in the random number that the cryptographic Hash is sent equal to each lottery ticket participation node, described first Dig the random number that ore deposit node determines the benefit node to send and participate in node equal to the lottery ticket of the cryptographic Hash.
- 3. according to the method described in claim 1, it is characterized in that, described first digs ore deposit node according to the cryptographic Hash and described Each lottery ticket participates in the random number that node is sent, and determines that each lottery ticket participates in the benefit node in node, including:If the cryptographic Hash participates in the random number of node transmission not equal to each lottery ticket, described first digs ore deposit node from institute State and determine that the lottery ticket of the difference of the random number and cryptographic Hash sent within a preset range participates in each lottery ticket participation node Node is benefit node.
- 4. according to claim 1-3 any one of them methods, it is characterised in that second block further includes:In the firstth area Each lottery ticket participates in the summation of the bid amount of node in block period, and described second digs book keeping operation of the ore deposit node as second block Weigh the amount of money award of node.
- 5. according to the method described in claim 4, it is characterized in that, second block further includes:In the second block period Each lottery ticket participates in random number and the bid amount that node is sent.
- 6. one kind digs ore deposit node, it is characterised in that including:Receiving module, random number and the bid amount that node is sent are participated in for receiving each lottery ticket in block chain network, and by institute The random number and bid amount for stating each lottery ticket participation node transmission are recorded in the first block;Computing module, the cryptographic Hash for the random number that node is sent is participated in for calculating each lottery ticket;Determining module, for participating in the random number of node transmission according to the cryptographic Hash and each lottery ticket, is determined described each Lottery ticket participates in the benefit node in node;Sending module, broadcasts the message for being sent to the block chain network, so that other dig ore deposit node by the broadcast message It is recorded in the second block, the broadcast message includes:Benefit the identification information of node, each lottery ticket participates in non-in node obtain The amount of money that beneficial node need to transfer accounts to the benefit node.
- 7. digging ore deposit node according to claim 6, it is characterised in that the determining module is specifically used for:If the cryptographic Hash is equal to a random number in the random number that each lottery ticket participation node is sent, it is determined that described The lottery ticket that the random number for benefiting node to send is equal to the cryptographic Hash participates in node.
- 8. digging ore deposit node according to claim 6, it is characterised in that the determining module is specifically used for:If the cryptographic Hash participates in the random number of node transmission not equal to each lottery ticket, node is participated in from each lottery ticket In the lottery ticket of the difference of random number and the cryptographic Hash determining to send within a preset range participate in node to benefit node.
- 9. ore deposit node is dug according to claim 6-8 any one of them, it is characterised in that second block further includes: Each lottery ticket participates in the summation of the bid amount of node in one block period, and described other dig ore deposit node as second block The amount of money award of book keeping operation power node.
- 10. digging ore deposit node according to claim 9, it is characterised in that second block further includes:In the second block week Each lottery ticket participates in random number and the bid amount that node is sent in phase.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711249563.4A CN108038954A (en) | 2017-12-01 | 2017-12-01 | Transaction operation method and digging ore deposit node based on block chain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711249563.4A CN108038954A (en) | 2017-12-01 | 2017-12-01 | Transaction operation method and digging ore deposit node based on block chain |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108038954A true CN108038954A (en) | 2018-05-15 |
Family
ID=62095114
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711249563.4A Pending CN108038954A (en) | 2017-12-01 | 2017-12-01 | Transaction operation method and digging ore deposit node based on block chain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108038954A (en) |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108768630A (en) * | 2018-05-25 | 2018-11-06 | 全链通有限公司 | The encryption communication method and system of block chain node |
CN108805664A (en) * | 2018-05-28 | 2018-11-13 | 安徽磐众信息科技有限公司 | A kind of responsibility lottery information published method based on block chain |
CN108831001A (en) * | 2018-06-25 | 2018-11-16 | 北京奇虎科技有限公司 | Node based on block chain randomly selects method, system, node, electronic equipment |
CN109087100A (en) * | 2018-08-02 | 2018-12-25 | 中国联合网络通信集团有限公司 | Cryptographic key distribution method, device, equipment and storage medium |
CN109242299A (en) * | 2018-08-31 | 2019-01-18 | 深圳付贝科技有限公司 | Distribution digs mine method, digs mine machine and block catenary system |
CN109389399A (en) * | 2018-10-18 | 2019-02-26 | 深圳前海乐寻坊区块链科技有限公司 | Lottery industry method, apparatus, computer equipment and storage medium based on block chain |
CN109447631A (en) * | 2018-09-19 | 2019-03-08 | 平安科技(深圳)有限公司 | Client, server, method of commerce and storage medium based on block chain |
CN109905379A (en) * | 2019-02-02 | 2019-06-18 | 江苏通付盾科技有限公司 | Lottery rewarding method and device based on block chain |
CN110570576A (en) * | 2019-09-06 | 2019-12-13 | 杭州复杂美科技有限公司 | Lottery system, construction method, operation method, equipment and storage medium thereof |
WO2020019791A1 (en) * | 2018-07-27 | 2020-01-30 | 阿里巴巴集团控股有限公司 | Event prediction method and apparatus and electronic device |
WO2020019780A1 (en) * | 2018-07-27 | 2020-01-30 | 阿里巴巴集团控股有限公司 | Event prediction method and apparatus, and electronic device |
TWI684100B (en) * | 2018-06-12 | 2020-02-01 | 中華電信股份有限公司 | Consensus system and method for public distributed ledgers |
WO2020082869A1 (en) * | 2018-10-25 | 2020-04-30 | 阿里巴巴集团控股有限公司 | Event prediction method and apparatus and electronic device |
TWI695331B (en) * | 2018-08-30 | 2020-06-01 | 香港商阿里巴巴集團服務有限公司 | Random object selection method and device based on blockchain |
CN111223227A (en) * | 2018-11-26 | 2020-06-02 | 腾讯科技(深圳)有限公司 | Target user screening method and device |
CN115189972A (en) * | 2022-09-13 | 2022-10-14 | 四块科技(深圳)有限公司 | Method and device for guaranteeing safe excavation of nodes and storage medium |
-
2017
- 2017-12-01 CN CN201711249563.4A patent/CN108038954A/en active Pending
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108768630A (en) * | 2018-05-25 | 2018-11-06 | 全链通有限公司 | The encryption communication method and system of block chain node |
CN108805664A (en) * | 2018-05-28 | 2018-11-13 | 安徽磐众信息科技有限公司 | A kind of responsibility lottery information published method based on block chain |
TWI684100B (en) * | 2018-06-12 | 2020-02-01 | 中華電信股份有限公司 | Consensus system and method for public distributed ledgers |
CN108831001A (en) * | 2018-06-25 | 2018-11-16 | 北京奇虎科技有限公司 | Node based on block chain randomly selects method, system, node, electronic equipment |
CN108831001B (en) * | 2018-06-25 | 2021-06-18 | 北京奇虎科技有限公司 | Block chain-based node random selection method, system, node and electronic equipment |
WO2020019791A1 (en) * | 2018-07-27 | 2020-01-30 | 阿里巴巴集团控股有限公司 | Event prediction method and apparatus and electronic device |
WO2020019780A1 (en) * | 2018-07-27 | 2020-01-30 | 阿里巴巴集团控股有限公司 | Event prediction method and apparatus, and electronic device |
CN109087100B (en) * | 2018-08-02 | 2021-01-26 | 中国联合网络通信集团有限公司 | Key distribution method, device, equipment and storage medium |
CN109087100A (en) * | 2018-08-02 | 2018-12-25 | 中国联合网络通信集团有限公司 | Cryptographic key distribution method, device, equipment and storage medium |
TWI695331B (en) * | 2018-08-30 | 2020-06-01 | 香港商阿里巴巴集團服務有限公司 | Random object selection method and device based on blockchain |
CN109242299A (en) * | 2018-08-31 | 2019-01-18 | 深圳付贝科技有限公司 | Distribution digs mine method, digs mine machine and block catenary system |
CN109447631B (en) * | 2018-09-19 | 2024-02-09 | 平安科技(深圳)有限公司 | Client, server, blockchain-based transaction method and storage medium |
CN109447631A (en) * | 2018-09-19 | 2019-03-08 | 平安科技(深圳)有限公司 | Client, server, method of commerce and storage medium based on block chain |
CN109389399A (en) * | 2018-10-18 | 2019-02-26 | 深圳前海乐寻坊区块链科技有限公司 | Lottery industry method, apparatus, computer equipment and storage medium based on block chain |
WO2020082869A1 (en) * | 2018-10-25 | 2020-04-30 | 阿里巴巴集团控股有限公司 | Event prediction method and apparatus and electronic device |
CN111223227A (en) * | 2018-11-26 | 2020-06-02 | 腾讯科技(深圳)有限公司 | Target user screening method and device |
CN111223227B (en) * | 2018-11-26 | 2022-03-22 | 腾讯科技(深圳)有限公司 | Target user screening method and device |
CN109905379A (en) * | 2019-02-02 | 2019-06-18 | 江苏通付盾科技有限公司 | Lottery rewarding method and device based on block chain |
CN110570576B (en) * | 2019-09-06 | 2021-05-11 | 杭州复杂美科技有限公司 | Lottery system, construction method, operation method, equipment and storage medium thereof |
CN110570576A (en) * | 2019-09-06 | 2019-12-13 | 杭州复杂美科技有限公司 | Lottery system, construction method, operation method, equipment and storage medium thereof |
CN115189972A (en) * | 2022-09-13 | 2022-10-14 | 四块科技(深圳)有限公司 | Method and device for guaranteeing safe excavation of nodes and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108038954A (en) | Transaction operation method and digging ore deposit node based on block chain | |
Zhang et al. | Double-spending with a sybil attack in the bitcoin decentralized network | |
Jesus et al. | A survey of how to use blockchain to secure internet of things and the stalker attack | |
CN107846278A (en) | Intelligent contract processing method and processing device | |
EP3449452B1 (en) | Implementing logic gate functionality using a blockchain | |
Bhaskar et al. | Bitcoin mining technology | |
CN109564663A (en) | Dynamic password currency alias uses | |
Trautman et al. | A primer for blockchain | |
CN105488675A (en) | Distributed shared general ledger construction method of block chain | |
CN105488722B (en) | Asset data processing method and processing device based on derivative chain | |
CN107623686A (en) | Block chain common recognition reaches method, apparatus, equipment and storage medium | |
CN110300985A (en) | Transaction is executed parallel in block chain network based on intelligent contract white list | |
EP4184410A1 (en) | Operating system for blockchain iot devices | |
CN106452785A (en) | Block chain network, branch node and block chain network application method | |
CN107341660A (en) | A kind of block chain bottom common recognition mechanism and the block catenary system based on the common recognition mechanism | |
CN109964446A (en) | A kind of common recognition method based on ballot | |
CN107464106A (en) | The method and system merchandised between block chain main chain and side chain | |
CN109242299A (en) | Distribution digs mine method, digs mine machine and block catenary system | |
CN107294729A (en) | Communication means and device in block chain between different nodes | |
CN108282539A (en) | Decentralization storage system based on double-layer network | |
CN107464112A (en) | Exchange management method and system based on block chain | |
CN107330787A (en) | High frequency transaction payment method, system under a kind of block chain chain of highly effective and safe | |
CN107408174A (en) | The system and method that networking for managing secure entity is promised to undertake | |
CN107067243A (en) | Shareable value token is designed at circulation method in a kind of block chain | |
Goffard | Fraud risk assessment within blockchain transactions |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180515 |
|
RJ01 | Rejection of invention patent application after publication |