CN109905379A - Lottery rewarding method and device based on block chain - Google Patents
Lottery rewarding method and device based on block chain Download PDFInfo
- Publication number
- CN109905379A CN109905379A CN201910106715.8A CN201910106715A CN109905379A CN 109905379 A CN109905379 A CN 109905379A CN 201910106715 A CN201910106715 A CN 201910106715A CN 109905379 A CN109905379 A CN 109905379A
- Authority
- CN
- China
- Prior art keywords
- lottery ticket
- lottery
- private key
- ciphertext
- block chain
- 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
Abstract
The invention discloses a kind of lottery rewarding method and devices based on block chain.Each lottery ticket buyer possesses a pair of public and private key during each winners' announcement in lottery, and method includes: to obtain the lottery ticket purchase request for carrying lottery ticket ciphertext;According to lottery ticket purchase request, default intelligent contract is called to store lottery ticket ciphertext into block chain;The private key that there is provided after winners' announcement in lottery of lottery ticket buyer is provided, and using in public and private key private key and lottery ticket ciphertext carry out prize-winning veritification.What welfare lottery ticket center was got is lottery ticket ciphertext, it can not know the lottery ticket of lottery ticket buyer purchase in plain text, also lottery ticket can not be just counted by way of big data in plain text, to ensure that the fairness of prize, lottery ticket ciphertext is stored using block chain, so that data can not distort, the authenticity and safety of data ensure that;Using private key as the identity documents of lottery ticket buyer, the fairness of prize ensure that, finally, no longer needing to participate in many ways by just side, publisher just, save a large amount of manpower and material resources.
Description
Technical field
The present invention relates to lottery ticket technical fields, and in particular to a kind of lottery rewarding method and device based on block chain.
Background technique
It is as inconvenient in bought lottery ticket that traditional lottery industry exists, and bonuses distributed according to strict calculations is opaque, and (there may be generated according to statistical result
The case where specific draft bank) the problems such as, and not can avoid the problem of data are by internal staff or hacker's altered data.
Block chain has the characteristics that publicity, the anti-property usurped, and with flourishing for block chain technology, these of block chain are special
Property and Encryption Algorithm can be applied to lottery industry well, to realize the just, fair of lottery ticket, the simplicity of purchase,
Save a large amount of manpower and material resources.
Application publication number provides a kind of lottery industry hair based on block chain for the Chinese patent application of 106504174 A of CN
Row system and device, in this scenario, lottery information are stored on block chain with open form, anyone can check institute
The lottery information of someone's purchase, these information can be queried utilization, to affect the fairness of prize, and lottery ticket is bought
Person can not prove that it is award-winner, cause prize to be lost just and sound.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind
State the lottery rewarding method and device based on block chain of problem.
According to an aspect of the invention, there is provided a kind of lottery rewarding method based on block chain, each lottery ticket purchase
Person possesses a pair of public and private key during each winners' announcement in lottery, and method includes:
Obtain the lottery ticket purchase request for carrying lottery ticket ciphertext, wherein lottery ticket ciphertext is that lottery ticket buyer utilizes public and private key
In public key lottery ticket is encrypted in plain text;
According to lottery ticket purchase request, default intelligent contract is called to store lottery ticket ciphertext into block chain;
The private key that there is provided after winners' announcement in lottery of lottery ticket buyer is provided, and using in public and private key private key and lottery ticket ciphertext into
Row, which is got the winning number in a bond, to be veritified.
According to another aspect of the present invention, a kind of lottery rewarding device based on block chain, each lottery ticket purchase are provided
Person possesses a pair of public and private key during each winners' announcement in lottery, and device includes:
Module is obtained, suitable for obtaining the lottery ticket purchase request for carrying lottery ticket ciphertext, wherein lottery ticket ciphertext is lottery ticket purchase
Person encrypts lottery ticket using the public key in public and private key in plain text;
Processing module is suitable for calling default intelligent contract to store lottery ticket ciphertext to block chain according to lottery ticket purchase request
In;
It gets the winning number in a bond and veritifies module, the private key provided after winners' announcement in lottery suitable for obtaining lottery ticket buyer, and using in public and private key
Private key and lottery ticket ciphertext carry out prize-winning veritification.
According to another aspect of the invention, provide a kind of calculating equipment, comprising: processor, memory, communication interface and
Communication bus, processor, memory and communication interface complete mutual communication by communication bus;
For memory for storing an at least executable instruction, it is above-mentioned based on block chain that executable instruction executes processor
The corresponding operation of lottery rewarding method.
In accordance with a further aspect of the present invention, a kind of computer storage medium is provided, at least one is stored in storage medium
Executable instruction, executable instruction make processor execute such as the above-mentioned corresponding operation of lottery rewarding method based on block chain.
In accordance with a further aspect of the present invention, a kind of lottery rewarding method based on block chain, each lottery ticket purchase are provided
Person generates a pair of public and private key during each winners' announcement in lottery, and method includes:
The lottery ticket that lottery ticket buyer buys is encrypted in plain text using the public key in public and private key, obtains lottery ticket ciphertext;
The lottery ticket purchase request for carrying lottery ticket ciphertext is sent, to welfare lottery ticket center so that welfare lottery ticket center is asked according to lottery ticket purchase
It asks, default intelligent contract is called to store lottery ticket ciphertext into block chain;
After determining lottery, the center Xiang Fucai provides private key, for welfare lottery ticket center using private key and lottery ticket ciphertext into
Row, which is got the winning number in a bond, to be veritified.
In accordance with a further aspect of the present invention, a kind of lottery rewarding device based on block chain, each lottery ticket purchase are provided
Person generates a pair of public and private key during each winners' announcement in lottery, and device includes:
Encrypting module is obtained suitable for being encrypted in plain text using the public key in public and private key to the lottery ticket that lottery ticket buyer buys
To lottery ticket ciphertext;
Sending module, suitable for sending the lottery ticket purchase request for carrying lottery ticket ciphertext to welfare lottery ticket center, for welfare lottery ticket center
According to lottery ticket purchase request, default intelligent contract is called to store lottery ticket ciphertext into block chain;
Module is provided, suitable for after determining lottery, the center Xiang Fucai provides private key, so that welfare lottery ticket center utilizes private key
And lottery ticket ciphertext carries out prize-winning veritification.
In accordance with a further aspect of the present invention, provide a kind of calculating equipment, comprising: processor, memory, communication interface and
Communication bus, processor, memory and communication interface complete mutual communication by communication bus;
For memory for storing an at least executable instruction, it is above-mentioned based on block chain that executable instruction executes processor
The corresponding operation of lottery rewarding method.
In accordance with a further aspect of the present invention, a kind of computer storage medium is provided, at least one is stored in storage medium
Executable instruction, executable instruction make processor execute such as the above-mentioned corresponding operation of lottery rewarding method based on block chain.
The scheme provided according to the present invention, what welfare lottery ticket center was got is lottery ticket ciphertext, can not know that lottery ticket buyer purchases
The lottery ticket bought in plain text, also can not just count lottery ticket in plain text, to ensure that the fairness of prize, welfare lottery ticket by way of big data
Center is by calling default intelligent contract to store lottery ticket ciphertext into block chain, due to being to store lottery ticket ciphertext to block chain
In, so that data can not distort, it ensure that the authenticity and safety of data;Using private key as the identity of lottery ticket buyer with
Card, ensure that the fairness of prize, finally, no longer needing to participate in many ways by just side, publisher just, save a large amount of manpower objects
Power.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention,
And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can
It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field
Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention
Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows the flow diagram of the lottery rewarding method according to an embodiment of the invention based on block chain;
Fig. 2 shows the flow diagrams of the lottery rewarding method according to an embodiment of the invention based on block chain;
Fig. 3 shows the flow diagram of the lottery rewarding method according to an embodiment of the invention based on block chain;
Fig. 4 shows the structural schematic diagram of the lottery rewarding device according to an embodiment of the invention based on block chain;
Fig. 5 shows the structural schematic diagram of the lottery rewarding device according to an embodiment of the invention based on block chain;
Fig. 6 shows the structural schematic diagram according to an embodiment of the invention for calculating equipment.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
It is fully disclosed to those skilled in the art.
Fig. 1 shows the flow diagram of the lottery rewarding method according to an embodiment of the invention based on block chain.
As shown in Figure 1, method includes the following steps:
Step S100, lottery ticket buyer are encrypted in plain text using lottery ticket of the public key in public and private key to purchase, obtain coloured silk
Ticket ciphertext.
In the present embodiment, each lottery ticket buyer generates a pair of public and private key during each announce the winners in a lottery, and announces the winners in a lottery at this
During, lottery ticket buyer repeatedly buys lottery ticket and this pair of public and private key is used to need giving birth to again during next announce the winners in a lottery
The public and private key of Cheng Xin.Wherein, refer to the period between the moment of announcing the winners in a lottery twice during announcing the winners in a lottery, for example, the last time announces the winners in a lottery is constantly
On January 25th, 2019 20:00, this is announced the winners in a lottery constantly as 20:00 on January 30th, 2019, then this refers to 2019 1 during announcing the winners in a lottery
This period 20:01-2019 19:59 on January 30 of the moon 25.
Lottery ticket is not encrypted lottery ticket number or lottery ticket character etc. in plain text, can know particular content by vision, obtain
Know concrete meaning, for lottery ticket buyer when buying lottery ticket, institute is it is seen that lottery ticket plaintext.
By taking lottery ticket is lottery ticket number in plain text as an example, lottery ticket buyer A can choose 6 number combinations at random among 1-10
Sequence is arranged, and generates lottery ticket in plain text, for example, the lottery ticket of lottery ticket buyer purchase is in plain text 1,7,6,3,5,2, then lottery ticket
Buyer A is using the public key in its public and private key to the lottery ticket plaintext of purchase: 1, it 7,6,3,5,2 encrypts, obtains lottery ticket ciphertext,
Wherein, lottery ticket ciphertext is the text not directly understood.
The lottery ticket that lottery ticket buyer buys is encrypted in plain text using the public key in public and private key, so that lottery ticket buyer institute
The lottery ticket of purchase is invisible in plain text, and in addition to lottery ticket buyer, other people are can not to know that lottery ticket is bright according to corresponding lottery ticket ciphertext
Text, so as to guarantee the fairness of welfare lottery ticket center prize.
Step S101, lottery ticket buyer send the lottery ticket purchase request for carrying lottery ticket ciphertext to welfare lottery ticket center.
Lottery ticket buyer buys lottery ticket by lottery purchase system, while sending to welfare lottery ticket center and carrying lottery ticket ciphertext
Lottery ticket purchase request.
Step S102, welfare lottery ticket center obtain the lottery ticket purchase request for carrying lottery ticket ciphertext.
Step S103, welfare lottery ticket center call default intelligent contract to store lottery ticket ciphertext to area according to lottery ticket purchase request
In block chain.
After welfare lottery ticket center receives the lottery ticket purchase request for carrying lottery ticket ciphertext of lottery ticket buyer transmission, according to lottery ticket
Default intelligent contract is called in purchase request, is stored lottery ticket ciphertext into block chain using default intelligent contract, and will transaction
Hash returns to lottery ticket buyer, and lottery ticket buyer can check it using transaction Hash by tools such as block chain browsers
The case where lottery ticket ciphertext cochain, to confirm whether purchase lottery ticket succeeds.In practical applications, block packing is block chain to operate
, it is to store the first lottery ticket ciphertext into block chain that default intelligent contract is called at welfare lottery ticket center, and block chain is packaged according to block
Demand carries out block packing processing to the first lottery ticket ciphertext, and stores the block of packing, and the first lottery ticket ciphertext storage at this time is just raw
Effect.
Wherein, presetting intelligent contract is the intelligent contract that welfare lottery ticket center is pre-created, and only welfare lottery ticket center possesses calling
Permission.As a result, when carrying out prize, can also verifying storage lottery ticket ciphertext called side by way of, Lai Tisheng prize
Safety can determine that this calls default intelligence if determining that the called side of storage lottery ticket ciphertext is not welfare lottery ticket center by verifying
Can contract storage lottery ticket ciphertext be not that welfare lottery ticket center is done, the lottery ticket ciphertext stored be it is invalid, so as to avoid hacker
The default intelligent contract of attack stores some its on block chain and does not also know the lottery ticket ciphertext whether got the winning number in a bond, influences prize.
It is to store lottery ticket ciphertext into block chain in the present embodiment, welfare lottery ticket center is not aware that lottery ticket buyer bets
Lottery ticket what is in plain text, therefore, can not just be counted by way of big data lottery ticket in plain text, to ensure that prize result
Fairness ensure that data in addition, realizing data on chain can not distort by storing lottery ticket ciphertext into block chain
Authenticity prevents lottery ticket buyer from denying.
Step S104, for lottery ticket buyer after determining lottery, the center Xiang Fucai provides private key.
Welfare lottery ticket center is announced the winners in a lottery according to lottery ticket regulation, when announcing the winners in a lottery using traditional mode of announcing the winners in a lottery, determines this prize-winning
Announce the winners in a lottery lottery ticket in plain text, lottery ticket of announcing the winners in a lottery in plain text can be by publicity, and each lottery ticket buyer can be by checking the lottery ticket of announcing the winners in a lottery of publicity
Determine whether oneself gets the winning number in a bond in plain text, if lottery ticket buyer determines oneself lottery, can be after determining lottery, Xiang Fu
Color center provides the private key of oneself.
Step S105, welfare lottery ticket center obtain the private key that lottery ticket buyer provides after winners' announcement in lottery, and using in public and private key
Private key and lottery ticket ciphertext carry out prize-winning veritification.
Welfare lottery ticket center obtains the private key that lottery ticket buyer provides after winners' announcement in lottery, and then, welfare lottery ticket center is purchased using lottery ticket
The private key and lottery ticket ciphertext that buyer provides verify whether lottery ticket buyer gets the winning number in a bond, and carry out prize-winning veritification.
In the present embodiment, welfare lottery ticket center specifically can verify whether lottery ticket buyer gets the winning number in a bond using following methods: benefit
Lottery ticket ciphertext is decrypted with the private key in public and private key, obtains the corresponding ticket of lottery in plain text;Judgement lottery ticket in plain text with
Whether lottery ticket of announcing the winners in a lottery is identical in plain text;It is veritified if so, determining by getting the winning number in a bond;If not, it is determined that get the winning number in a bond and veritify failure.
Specifically, welfare lottery ticket center carries out the corresponding lottery ticket ciphertext of lottery ticket buyer using the private key that lottery ticket buyer provides
Decryption obtains the corresponding ticket of lottery in plain text, for example, obtained when lottery ticket buyer is to provide purchase lottery ticket to welfare lottery ticket center
Trade Hash, and welfare lottery ticket center obtains the corresponding lottery ticket ciphertext of transaction Hash, welfare lottery ticket center benefit according to transaction Hash lookup block chain
Lottery ticket ciphertext is decrypted with private key, obtains the corresponding ticket of lottery in plain text, later, welfare lottery ticket center needs to verify decryption and obtains
The lottery ticket of announcing the winners in a lottery announced the winners in a lottery in plain text with this of lottery ticket it is whether identical in plain text, if by compare discovery lottery ticket in plain text and this
The secondary lottery ticket of announcing the winners in a lottery announced the winners in a lottery is identical in plain text, it is determined that it is veritified by getting the winning number in a bond, it is possible thereby to determine that lottery ticket buyer gets the winning number in a bond, it can be with
Lottery ticket buyer is given to reward accordingly;If by comparing discovery, lottery ticket announces the winners in a lottery lottery ticket in plain text with what this was announced the winners in a lottery in plain text
It is not identical, it determines to get the winning number in a bond and veritifies failure, it is possible thereby to determine lottery ticket buyer there is no getting the winning number in a bond, lottery ticket buyer deceives prize
Behavior can give the certain punishment of lottery ticket buyer.
It is illustrated below with reference to example, the lottery ticket of lottery ticket buyer A purchase is in plain text 1,7,6,3,5,2, and private key is
Private key R is sent to welfare lottery ticket center by R, lottery ticket buyer A, and welfare lottery ticket center is close to the corresponding lottery ticket of lottery ticket buyer A using private key R
Text is decrypted, and obtains lottery ticket in plain text: 1,7,6,3,5,2, this lottery ticket of announcing the winners in a lottery is in plain text 1,7,6,3,5,2, lottery ticket buyer A
The lottery ticket of purchase is identical as lottery ticket plaintext of announcing the winners in a lottery in plain text, it is determined that is veritified by getting the winning number in a bond, it is possible thereby to determine lottery ticket buyer
It gets the winning number in a bond, lottery ticket buyer can be given and rewarded accordingly.
In a kind of optional embodiment of the present invention, it is likely that occur announcing the winners in a lottery there are multiple groups lottery ticket plaintext the case where, if color
Ticket buyer determines the group that oneself is got the winning number in a bond, and can provide prize-winning group to welfare lottery ticket center, welfare lottery ticket center can be according to prize-winning group
The lottery ticket that Que Ding not announce the winners in a lottery accordingly in plain text, carries out prize-winning veritification, to improve veritification efficiency.
In a kind of optional embodiment of the present invention, default intelligent contract is being called to store the first lottery ticket ciphertext to block
After in chain, method further include: determine the block of this winners' announcement in lottery in block chain, and label of announcing the winners in a lottery is carried out to block.
It is that the first lottery ticket ciphertext is stored in block chain in the present embodiment, welfare lottery ticket center is needed when announcing the winners in a lottery every time
The block of this winners' announcement in lottery in block chain is first determined, for example, the generation of every 100 blocks is once announced the winners in a lottery as a result, number of blocks can
Arbitrarily to set, be merely illustrative of here, for example, this lottery ticket generated in block 12000-12100 announce the winners in a lottery as a result,
After determining the block of this winners' announcement in lottery, label of announcing the winners in a lottery is carried out to block, to avoid repeating to announce the winners in a lottery.
The method provided according to that above embodiment of the present invention, lottery ticket buyer using its public key to the lottery ticket of purchase in plain text into
Row encryption, and provide lottery ticket ciphertext to welfare lottery ticket center, welfare lottery ticket center by call default intelligence contract by lottery ticket ciphertext store to
In block chain, be supplied to welfare lottery ticket center due to lottery ticket buyer is lottery ticket ciphertext, and welfare lottery ticket center can not simultaneously know that lottery ticket is bought
The lottery ticket of person's purchase in plain text, also can not just count lottery ticket in plain text by way of big data, thus ensure that the fairness of prize,
In addition, so that data can not distort, ensure that the authenticity and safety of data due to being to store lottery ticket ciphertext into block chain
Property;Using private key as the identity documents of lottery ticket buyer, ensure that the fairness of prize, finally, no longer need to by just side,
Publisher participates in just in many ways, saves a large amount of manpower and material resources.
Fig. 2 shows the flow diagrams of the lottery rewarding method according to an embodiment of the invention based on block chain.
Wherein, each lottery ticket buyer possesses a pair of public and private key during each winners' announcement in lottery, as shown in Fig. 2, this method includes following
Step:
Step S200 obtains the lottery ticket purchase request for carrying lottery ticket ciphertext.
Wherein, lottery ticket ciphertext is that lottery ticket buyer is encrypted to obtain using the public key in public and private key to the plaintext of lottery ticket
's.
Step S201 calls default intelligent contract to store lottery ticket ciphertext into block chain according to lottery ticket purchase request.
Step S202, obtains the private key that provides after winners' announcement in lottery of lottery ticket buyer, and using in public and private key private key and
Lottery ticket ciphertext carries out prize-winning veritification.
Optionally, using in public and private key private key and lottery ticket ciphertext carry out get the winning number in a bond veritify further comprise:
Lottery ticket ciphertext is decrypted using the private key in public and private key, obtains the corresponding ticket of lottery in plain text;
Whether lottery ticket is identical in plain text as lottery ticket of announcing the winners in a lottery in plain text for judgement;
It is veritified if so, determining by getting the winning number in a bond;
If not, it is determined that get the winning number in a bond and veritify failure.
Optionally, after calling default intelligent contract to store lottery ticket ciphertext into block chain, method further include:
It determines the block of this winners' announcement in lottery in block chain, and label of announcing the winners in a lottery is carried out to block.
The method provided according to that above embodiment of the present invention, what welfare lottery ticket center was got is lottery ticket ciphertext, can not know coloured silk
The lottery ticket of ticket buyer purchase in plain text, also can not just count lottery ticket in plain text, to ensure that prize by way of big data
Fairness, welfare lottery ticket center is by calling default intelligent contract to store lottery ticket ciphertext into block chain, due to being by lottery ticket ciphertext
It stores into block chain, so that data can not distort, ensure that the authenticity and safety of data;It is purchased using private key as lottery ticket
The identity documents of buyer, ensure that the fairness of prize, finally, no longer needing to participate in just, section in many ways by just side, publisher
Save a large amount of manpower and material resources.
Fig. 3 shows the flow diagram of the lottery rewarding method according to an embodiment of the invention based on block chain.
Wherein, each lottery ticket buyer generates a pair of public and private key during each winners' announcement in lottery, as shown in figure 3, this method includes following
Step:
Step S300 encrypts the lottery ticket that lottery ticket buyer buys in plain text using the public key in public and private key, obtains coloured silk
Ticket ciphertext.
The step center S301, Xiang Fucai, which is sent, carries the lottery ticket purchase request of lottery ticket ciphertext, for welfare lottery ticket center according to
Lottery ticket purchase request calls default intelligent contract to store lottery ticket ciphertext into block chain.
Step S302, after determining lottery, the center Xiang Fucai provides private key, so that welfare lottery ticket center utilizes private key and coloured silk
Ticket ciphertext carries out prize-winning veritification.
The method provided according to that above embodiment of the present invention, lottery ticket buyer using its public key to the lottery ticket of purchase in plain text into
Row encryption, and to welfare lottery ticket center provide lottery ticket ciphertext so that welfare lottery ticket center and can not know lottery ticket buyer buy lottery ticket it is bright
Text also can not just count lottery ticket in plain text by way of big data, to ensure that the fairness of prize, using private key as coloured silk
The identity documents of ticket buyer, ensure that the fairness of prize, finally, no longer needing to participate in public affairs in many ways by just side, publisher
Just, a large amount of manpower and material resources are saved.
Fig. 4 shows the structural schematic diagram of the lottery rewarding device according to an embodiment of the invention based on block chain.
Wherein, each lottery ticket buyer possesses a pair of public and private key during each winners' announcement in lottery, which includes: to obtain module 400, place
Module 410 is managed, gets the winning number in a bond and veritifies module 420.
Module 400 is obtained, suitable for obtaining the lottery ticket purchase request for carrying lottery ticket ciphertext, wherein lottery ticket ciphertext is lottery ticket
Buyer encrypts lottery ticket using the public key in public and private key in plain text;
Processing module 410 is suitable for calling default intelligent contract to store lottery ticket ciphertext to block according to lottery ticket purchase request
In chain;
It gets the winning number in a bond and veritifies module 420, the private key provided after winners' announcement in lottery suitable for obtaining lottery ticket buyer, and utilize public and private key
In private key and lottery ticket ciphertext carry out prize-winning veritification.
Optionally, veritification module of getting the winning number in a bond is further adapted for:
Lottery ticket ciphertext is decrypted using the private key in public and private key, obtains the corresponding ticket of lottery in plain text;
Whether lottery ticket is identical in plain text as lottery ticket of announcing the winners in a lottery in plain text for judgement;
It is veritified if so, determining by getting the winning number in a bond;
If not, it is determined that get the winning number in a bond and veritify failure.
Optionally, device further include: determining module is adapted to determine that the block of this winners' announcement in lottery in block chain;
It announces the winners in a lottery mark module, suitable for carrying out label of announcing the winners in a lottery to block.
The device provided according to that above embodiment of the present invention, what welfare lottery ticket center was got is lottery ticket ciphertext, can not know coloured silk
The lottery ticket of ticket buyer purchase in plain text, also can not just count lottery ticket in plain text, to ensure that prize by way of big data
Fairness, welfare lottery ticket center is by calling default intelligent contract to store lottery ticket ciphertext into block chain, due to being by lottery ticket ciphertext
It stores into block chain, so that data can not distort, ensure that the authenticity and safety of data;It is purchased using private key as lottery ticket
The identity documents of buyer, ensure that the fairness of prize, finally, no longer needing to participate in just, section in many ways by just side, publisher
Save a large amount of manpower and material resources.
Fig. 5 shows the structural schematic diagram of the lottery rewarding device according to an embodiment of the invention based on block chain.
Wherein, each lottery ticket buyer generates a pair of public and private key during each winners' announcement in lottery, which includes: encrypting module 500, hair
It send module 510, module 520 is provided.
Encrypting module 500, suitable for being encrypted in plain text using the public key in public and private key to the lottery ticket that lottery ticket buyer buys,
Obtain lottery ticket ciphertext;
Sending module 510, suitable for sending the lottery ticket purchase request for carrying lottery ticket ciphertext to welfare lottery ticket center, in welfare lottery ticket
The heart calls default intelligent contract to store lottery ticket ciphertext into block chain according to lottery ticket purchase request;
Module 520 is provided, suitable for after determining lottery, the center Xiang Fucai provides private key, for the utilization of welfare lottery ticket center
Private key and lottery ticket ciphertext carry out prize-winning veritification.
The device provided according to that above embodiment of the present invention, lottery ticket buyer using its public key to the lottery ticket of purchase in plain text into
Row encryption, and to welfare lottery ticket center provide lottery ticket ciphertext so that welfare lottery ticket center and can not know lottery ticket buyer buy lottery ticket it is bright
Text also can not just count lottery ticket in plain text by way of big data, to ensure that the fairness of prize, using private key as coloured silk
The identity documents of ticket buyer, ensure that the fairness of prize, finally, no longer needing to participate in public affairs in many ways by just side, publisher
Just, a large amount of manpower and material resources are saved.
The embodiment of the present application also provides a kind of nonvolatile computer storage media, the computer storage medium storage
Have an at least executable instruction, the computer executable instructions can be performed in above-mentioned any means embodiment based on block chain
Lottery rewarding method.
Fig. 6 shows the structural schematic diagram according to an embodiment of the invention for calculating equipment, the specific embodiment of the invention
The specific implementation for calculating equipment is not limited.
As shown in fig. 6, the calculating equipment may include: processor (processor) 602, communication interface
(Communications Interface) 604, memory (memory) 606 and communication bus 608.
Wherein:
Processor 602, communication interface 604 and memory 606 complete mutual communication by communication bus 608.
Communication interface 604, for being communicated with the network element of other equipment such as client or other servers etc..
It is real can specifically to execute the above-mentioned lottery rewarding method based on block chain for executing program 610 for processor 602
Apply the correlation step in example.
Specifically, program 610 may include program code, which includes computer operation instruction.
Processor 602 may be central processor CPU or specific integrated circuit ASIC (Application
Specific Integrated Circuit), or be arranged to implement the integrated electricity of one or more of the embodiment of the present invention
Road.The one or more processors that equipment includes are calculated, can be same type of processor, such as one or more CPU;It can also
To be different types of processor, such as one or more CPU and one or more ASIC.
Memory 606, for storing program 610.Memory 606 may include high speed RAM memory, it is also possible to further include
Nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.
Program 610 specifically can be used for so that processor 602 execute in above-mentioned any means embodiment based on block chain
Lottery rewarding method.The specific implementation of each step may refer to the above-mentioned lottery rewarding implementation based on block chain in program 610
Corresponding description in corresponding steps and unit in example, this will not be repeated here.Those skilled in the art can be understood that
It arrives, for convenience and simplicity of description, the equipment of foregoing description and the specific work process of module, can implement with reference to preceding method
Corresponding process description in example, details are not described herein.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein.
Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system
Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various
Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair
Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention
Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects,
Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect
Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following
Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself
All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment
Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or
Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any
Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed
All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power
Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose
It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
Meaning one of can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors
Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice
Microprocessor or digital signal processor (DSP) realize that the lottery rewarding according to an embodiment of the present invention based on block chain is set
The some or all functions of some or all components in standby.The present invention is also implemented as described here for executing
Method some or all device or device programs (for example, computer program and computer program product).This
The program that the realization of sample is of the invention can store on a computer-readable medium, or can have one or more signal
Form.Such signal can be downloaded from an internet website to obtain, and perhaps be provided on the carrier signal or with any other
Form provides.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability
Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real
It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch
To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame
Claim.
The invention discloses:
A1. a kind of lottery rewarding method based on block chain, which is characterized in that each lottery ticket buyer opens in each lottery ticket
Possess a pair of public and private key between recompense-time, which comprises
Obtain the lottery ticket purchase request for carrying lottery ticket ciphertext, wherein the lottery ticket ciphertext is that lottery ticket buyer utilizes public affairs
What the public key in private key encrypted lottery ticket in plain text;
According to the lottery ticket purchase request, default intelligent contract is called to store the lottery ticket ciphertext into block chain;
The private key that there is provided after winners' announcement in lottery of lottery ticket buyer is provided, and using in public and private key private key and lottery ticket ciphertext into
Row, which is got the winning number in a bond, to be veritified.
A2. method according to a1, which is characterized in that during the private key and lottery ticket ciphertext using in public and private key carries out
Prize is veritified:
Lottery ticket ciphertext is decrypted using the private key in public and private key, obtains the corresponding ticket of lottery in plain text;
Whether the judgement lottery ticket is identical in plain text as lottery ticket of announcing the winners in a lottery in plain text;
It is veritified if so, determining by getting the winning number in a bond;
If not, it is determined that get the winning number in a bond and veritify failure.
A3. method according to a1 or a2, which is characterized in that default intelligent contract is being called to deposit the lottery ticket ciphertext
After storage is into block chain, the method also includes:
It determines the block of this winners' announcement in lottery in block chain, and label of announcing the winners in a lottery is carried out to the block.
B4. a kind of lottery rewarding method based on block chain, which is characterized in that each lottery ticket buyer opens in each lottery ticket
A pair of public and private key is generated between recompense-time, which comprises
The lottery ticket that lottery ticket buyer buys is encrypted in plain text using the public key in public and private key, obtains lottery ticket ciphertext;
The lottery ticket purchase request for carrying lottery ticket ciphertext is sent, to welfare lottery ticket center so that welfare lottery ticket center is purchased according to the lottery ticket
Request is bought, default intelligent contract is called to store the lottery ticket ciphertext into block chain;
After determining lottery, the center Xiang Fucai provides private key, for welfare lottery ticket center using private key and lottery ticket ciphertext into
Row, which is got the winning number in a bond, to be veritified.
C5. a kind of lottery rewarding device based on block chain, which is characterized in that each lottery ticket buyer opens in each lottery ticket
Possess a pair of public and private key between recompense-time, described device includes:
Module is obtained, suitable for obtaining the lottery ticket purchase request for carrying lottery ticket ciphertext, wherein the lottery ticket ciphertext is lottery ticket
Buyer encrypts lottery ticket using the public key in public and private key in plain text;
Processing module is suitable for calling default intelligent contract to store the lottery ticket ciphertext according to the lottery ticket purchase request
Into block chain;
It gets the winning number in a bond and veritifies module, the private key provided after winners' announcement in lottery suitable for obtaining lottery ticket buyer, and using in public and private key
Private key and lottery ticket ciphertext carry out prize-winning veritification.
C6. the device according to C5, which is characterized in that the prize-winning is veritified module and is further adapted for:
Lottery ticket ciphertext is decrypted using the private key in public and private key, obtains the corresponding ticket of lottery in plain text;
Whether the judgement lottery ticket is identical in plain text as lottery ticket of announcing the winners in a lottery in plain text;
It is veritified if so, determining by getting the winning number in a bond;
If not, it is determined that get the winning number in a bond and veritify failure.
C7. the device according to C5 or C6, which is characterized in that described device further include:
Determining module is adapted to determine that the block of this winners' announcement in lottery in block chain;
It announces the winners in a lottery mark module, suitable for carrying out label of announcing the winners in a lottery to the block.
D8. a kind of lottery rewarding device based on block chain, which is characterized in that each lottery ticket buyer opens in each lottery ticket
A pair of public and private key is generated between recompense-time, described device includes:
Encrypting module is obtained suitable for being encrypted in plain text using the public key in public and private key to the lottery ticket that lottery ticket buyer buys
To lottery ticket ciphertext;
Sending module, suitable for sending the lottery ticket purchase request for carrying lottery ticket ciphertext to welfare lottery ticket center, for welfare lottery ticket center
According to the lottery ticket purchase request, default intelligent contract is called to store the lottery ticket ciphertext into block chain;
Module is provided, suitable for after determining lottery, the center Xiang Fucai provides private key, so that welfare lottery ticket center utilizes private key
And lottery ticket ciphertext carries out prize-winning veritification.
E9. a kind of calculating equipment, comprising: processor, memory, communication interface and communication bus, it is the processor, described
Memory and the communication interface complete mutual communication by the communication bus;
The memory executes the processor such as storing an at least executable instruction, the executable instruction
The corresponding operation of lottery rewarding method described in any one of A1-A3 based on block chain.
F10. a kind of computer storage medium is stored with an at least executable instruction in the storage medium, described to hold
Row instruction makes processor execute the corresponding operation of lottery rewarding method based on block chain as described in any one of A1-A3.
G11. a kind of calculating equipment, comprising: processor, memory, communication interface and communication bus, the processor, institute
It states memory and the communication interface completes mutual communication by the communication bus;
The memory makes the processor execute such as B4 for storing an at least executable instruction, the executable instruction
The corresponding operation of lottery rewarding method based on block chain.
H12. a kind of computer storage medium is stored with an at least executable instruction in the storage medium, described to hold
Row instruction makes processor execute the corresponding operation of lottery rewarding method based on block chain as described in B4.
Claims (10)
1. a kind of lottery rewarding method based on block chain, which is characterized in that each lottery ticket buyer is in each winners' announcement in lottery phase
Between possess a pair of public and private key, which comprises
Obtain the lottery ticket purchase request for carrying lottery ticket ciphertext, wherein the lottery ticket ciphertext is that lottery ticket buyer utilizes public and private key
In public key lottery ticket is encrypted in plain text;
According to the lottery ticket purchase request, default intelligent contract is called to store the lottery ticket ciphertext into block chain;
The private key that there is provided after winners' announcement in lottery of lottery ticket buyer is provided, and using in public and private key private key and the progress of lottery ticket ciphertext in
Prize is veritified.
2. the method according to claim 1, wherein the private key and lottery ticket ciphertext using in public and private key carries out
It gets the winning number in a bond to veritify and further comprises:
Lottery ticket ciphertext is decrypted using the private key in public and private key, obtains the corresponding ticket of lottery in plain text;
Whether the judgement lottery ticket is identical in plain text as lottery ticket of announcing the winners in a lottery in plain text;
It is veritified if so, determining by getting the winning number in a bond;
If not, it is determined that get the winning number in a bond and veritify failure.
3. method according to claim 1 or 2, which is characterized in that preset intelligent contract for the lottery ticket ciphertext calling
After storing into block chain, the method also includes:
It determines the block of this winners' announcement in lottery in block chain, and label of announcing the winners in a lottery is carried out to the block.
4. a kind of lottery rewarding method based on block chain, which is characterized in that each lottery ticket buyer is in each winners' announcement in lottery phase
Between generate a pair of public and private key, which comprises
The lottery ticket that lottery ticket buyer buys is encrypted in plain text using the public key in public and private key, obtains lottery ticket ciphertext;
The lottery ticket purchase request for carrying lottery ticket ciphertext is sent, to welfare lottery ticket center so that welfare lottery ticket center is asked according to lottery ticket purchase
It asks, default intelligent contract is called to store the lottery ticket ciphertext into block chain;
After determining lottery, the center Xiang Fucai provides private key, so that welfare lottery ticket center is using in private key and the progress of lottery ticket ciphertext
Prize is veritified.
5. a kind of lottery rewarding device based on block chain, which is characterized in that each lottery ticket buyer is in each winners' announcement in lottery phase
Between possess a pair of public and private key, described device includes:
Module is obtained, suitable for obtaining the lottery ticket purchase request for carrying lottery ticket ciphertext, wherein the lottery ticket ciphertext is lottery ticket purchase
Person encrypts lottery ticket using the public key in public and private key in plain text;
Processing module is suitable for calling default intelligent contract to store the lottery ticket ciphertext to area according to the lottery ticket purchase request
In block chain;
It gets the winning number in a bond and veritifies module, the private key provided after winners' announcement in lottery suitable for obtaining lottery ticket buyer, and utilize the private in public and private key
Key and lottery ticket ciphertext carry out prize-winning veritification.
6. a kind of lottery rewarding device based on block chain, which is characterized in that each lottery ticket buyer is in each winners' announcement in lottery phase
Between generate a pair of public and private key, described device includes:
Encrypting module obtains coloured silk suitable for encrypting in plain text using the public key in public and private key to the lottery ticket that lottery ticket buyer buys
Ticket ciphertext;
Sending module carries the lottery ticket purchase request of lottery ticket ciphertext suitable for sending to welfare lottery ticket center, for welfare lottery ticket center according to
The lottery ticket purchase request calls default intelligent contract to store the lottery ticket ciphertext into block chain;
Module is provided, suitable for after determining lottery, the center Xiang Fucai provides private key, so that welfare lottery ticket center utilizes private key and coloured silk
Ticket ciphertext carries out prize-winning veritification.
7. a kind of calculating equipment, comprising: processor, memory, communication interface and communication bus, the processor, the storage
Device and the communication interface complete mutual communication by the communication bus;
The memory executes the processor as right is wanted for storing an at least executable instruction, the executable instruction
Ask the corresponding operation of lottery rewarding method described in any one of 1-3 based on block chain.
8. a kind of computer storage medium, an at least executable instruction, the executable instruction are stored in the storage medium
Processor is set to execute the lottery rewarding method corresponding operation as claimed in any one of claims 1-3 based on block chain.
9. a kind of calculating equipment, comprising: processor, memory, communication interface and communication bus, the processor, the storage
Device and the communication interface complete mutual communication by the communication bus;
The memory executes the processor as right is wanted for storing an at least executable instruction, the executable instruction
The corresponding operation of lottery rewarding method described in asking 4 based on block chain.
10. a kind of computer storage medium, an at least executable instruction, the executable instruction are stored in the storage medium
Processor is set to execute the corresponding operation of lottery rewarding method based on block chain as claimed in claim 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910106715.8A CN109905379A (en) | 2019-02-02 | 2019-02-02 | Lottery rewarding method and device based on block chain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910106715.8A CN109905379A (en) | 2019-02-02 | 2019-02-02 | Lottery rewarding method and device based on block chain |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109905379A true CN109905379A (en) | 2019-06-18 |
Family
ID=66944583
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910106715.8A Pending CN109905379A (en) | 2019-02-02 | 2019-02-02 | Lottery rewarding method and device based on block chain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109905379A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110570576A (en) * | 2019-09-06 | 2019-12-13 | 杭州复杂美科技有限公司 | Lottery system, construction method, operation method, equipment and storage medium thereof |
CN110795749A (en) * | 2019-10-25 | 2020-02-14 | 腾讯科技(深圳)有限公司 | Data processing method, device and storage medium |
CN111127159A (en) * | 2019-12-24 | 2020-05-08 | 北京海益同展信息科技有限公司 | Lottery management method, lottery management system, computing device, and medium |
CN112231330A (en) * | 2020-10-15 | 2021-01-15 | 中体彩科技发展有限公司 | Control method and system for preventing lottery game from being repeated and rewarded |
WO2021057995A1 (en) * | 2019-09-29 | 2021-04-01 | 比亚迪股份有限公司 | Fare collection system and control method therefor |
CN113128849A (en) * | 2021-04-02 | 2021-07-16 | 深圳市易讯天空网络技术有限公司 | Lottery process management method, system, terminal device and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108038954A (en) * | 2017-12-01 | 2018-05-15 | 中国联合网络通信集团有限公司 | Transaction operation method and digging ore deposit node based on block chain |
US20190036681A1 (en) * | 2016-07-29 | 2019-01-31 | Trusted Key Solutions Inc. | System and method for blockchain-based device authentication based on a cryptographic challenge |
-
2019
- 2019-02-02 CN CN201910106715.8A patent/CN109905379A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190036681A1 (en) * | 2016-07-29 | 2019-01-31 | Trusted Key Solutions Inc. | System and method for blockchain-based device authentication based on a cryptographic challenge |
CN108038954A (en) * | 2017-12-01 | 2018-05-15 | 中国联合网络通信集团有限公司 | Transaction operation method and digging ore deposit node based on block chain |
Non-Patent Citations (1)
Title |
---|
李聪: "一种基于区块链的数字彩票发行系统", 《信息安全研究》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110570576A (en) * | 2019-09-06 | 2019-12-13 | 杭州复杂美科技有限公司 | Lottery system, construction method, operation method, equipment and storage medium thereof |
WO2021057995A1 (en) * | 2019-09-29 | 2021-04-01 | 比亚迪股份有限公司 | Fare collection system and control method therefor |
CN110795749A (en) * | 2019-10-25 | 2020-02-14 | 腾讯科技(深圳)有限公司 | Data processing method, device and storage medium |
CN110795749B (en) * | 2019-10-25 | 2024-04-05 | 腾讯科技(深圳)有限公司 | Data processing method, device and storage medium |
CN111127159A (en) * | 2019-12-24 | 2020-05-08 | 北京海益同展信息科技有限公司 | Lottery management method, lottery management system, computing device, and medium |
CN112231330A (en) * | 2020-10-15 | 2021-01-15 | 中体彩科技发展有限公司 | Control method and system for preventing lottery game from being repeated and rewarded |
CN113128849A (en) * | 2021-04-02 | 2021-07-16 | 深圳市易讯天空网络技术有限公司 | Lottery process management method, system, terminal device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109905379A (en) | Lottery rewarding method and device based on block chain | |
CN109672693A (en) | Lottery rewarding method and device based on block chain | |
JP6986519B2 (en) | Distributed transaction propagation and validation system | |
Shackelford et al. | Block-by-block: leveraging the power of blockchain technology to build trust and promote cyber peace | |
CN109523302A (en) | Advertisement sending method, device and calculating equipment based on block chain | |
CA2983163C (en) | Generating cryptographic function parameters from compact source code | |
KR20190019004A (en) | The trading system and the method based on a blockchain | |
CN110290102A (en) | Service security system and method based on application | |
CN108647965A (en) | Across chain method of commerce, device, storage medium and electronic equipment | |
CN109615370A (en) | Object select method and device, electronic equipment | |
Elrom | The blockchain developer | |
US20190279459A1 (en) | Method and system for lottery application | |
CN108234134A (en) | Block synchronous method and system | |
CN109377338A (en) | Financial product processing method and processing device based on block chain | |
CN110210207A (en) | Authorization method and equipment | |
CN111416709B (en) | Voting method, device, equipment and storage medium based on block chain system | |
CN112001713B (en) | Block chain system and request processing method and device | |
CN109493019A (en) | A kind of account method of commerce and device based on block chain | |
CN109086596A (en) | The authentication method of application program, apparatus and system | |
EP3286748A1 (en) | Generating cryptographic function parameters based on an observed astronomical event | |
CN109272418A (en) | Product manufacturing data sharing method and device based on block chain | |
CN112700314A (en) | Auction method and system based on mixed block chain | |
Christodoulou et al. | A decentralized voting mechanism: engaging ERC-20 token holders in decision-making | |
CN111291122A (en) | Competitive bidding method and device based on block chain | |
CN110197398A (en) | The information processing method and device of electronic ticket |
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: 20190618 |
|
RJ01 | Rejection of invention patent application after publication |