CN109672693A - Lottery rewarding method and device based on block chain - Google Patents

Lottery rewarding method and device based on block chain Download PDF

Info

Publication number
CN109672693A
CN109672693A CN201910106736.XA CN201910106736A CN109672693A CN 109672693 A CN109672693 A CN 109672693A CN 201910106736 A CN201910106736 A CN 201910106736A CN 109672693 A CN109672693 A CN 109672693A
Authority
CN
China
Prior art keywords
lottery ticket
lottery
ciphertext
public
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.)
Granted
Application number
CN201910106736.XA
Other languages
Chinese (zh)
Other versions
CN109672693B (en
Inventor
汪德嘉
许绪满
鲍林芳
吴琦琦
张焕明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JIANGSU PAY EGIS TECHNOLOGY Co.,Ltd.
Jiangsu tongfudun blockchain Technology Co., Ltd
Original Assignee
Jiangsu Payegis Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Payegis Technology Co Ltd filed Critical Jiangsu Payegis Technology Co Ltd
Priority to CN201910106736.XA priority Critical patent/CN109672693B/en
Publication of CN109672693A publication Critical patent/CN109672693A/en
Application granted granted Critical
Publication of CN109672693B publication Critical patent/CN109672693B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0208Trade or exchange of goods or services in exchange for incentives or rewards
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0225Avoiding frauds
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME 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/00Generating random numbers; Lottery apparatus
    • G07C15/006Generating random numbers; Lottery apparatus electronically

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a kind of lottery rewarding method and devices based on block chain.Wherein, method includes: to obtain the lottery ticket purchase request for carrying the first lottery ticket ciphertext;According to lottery ticket purchase request, default intelligent contract is called to store the first lottery ticket ciphertext into block chain;The public key that there is provided after winners' announcement in lottery of lottery ticket buyer is obtained, and in plain text and the first lottery ticket ciphertext carries out prize-winning veritification using public key, lottery ticket of announcing the winners in a lottery.What welfare lottery ticket center was got is the first lottery ticket ciphertext, in this case it is not apparent that the lottery ticket that lottery ticket buyer specifically buys in plain text, also can not just count lottery ticket in plain text, to ensure that the fairness of prize by way of big data;Storing the first lottery ticket ciphertext using block chain ensure that the authenticity and safety of data so that data can not distort;Lottery ticket buyer only provides public key to welfare lottery ticket center and, it is therefore not necessary to generate public and private key every time, avoids public and private key without providing private key again and obscure the defect for leading to authentication failed.

Description

Lottery rewarding method and device based on block chain
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, and method includes:
Obtain the lottery ticket purchase request for carrying the first lottery ticket ciphertext, wherein the first lottery ticket ciphertext is lottery ticket buyer's benefit Lottery ticket is encrypted in plain text with the public key in public and private key;
According to lottery ticket purchase request, default intelligent contract is called to store the first lottery ticket ciphertext into block chain;
The public key that lottery ticket buyer provides after winners' announcement in lottery is obtained, and utilizes public key, announce the winners in a lottery lottery ticket plaintext and the first coloured silk Ticket ciphertext carries out prize-winning veritification.
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, and device includes:
Module is obtained, carries the lottery ticket purchase request of the first lottery ticket ciphertext suitable for obtaining, wherein the first 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 first lottery ticket ciphertext to area according to lottery ticket purchase request In block chain;
Get the winning number in a bond and veritify module, suitable for obtaining the public key that provides after winners' announcement in lottery of lottery ticket buyer, and using public key, announce the winners in a lottery Lottery ticket is in plain text and the first lottery ticket ciphertext carries 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, 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, it is close to obtain the first lottery ticket Text;
The lottery ticket purchase request for carrying the first lottery ticket ciphertext is sent, to welfare lottery ticket center so that welfare lottery ticket center is purchased according to lottery ticket Request is bought, default intelligent contract is called to store the first lottery ticket ciphertext into block chain;
After determining lottery, the center Xiang Fucai provides public key, so that welfare lottery ticket center utilizes public key, lottery ticket plaintext of announcing the winners in a lottery And first lottery ticket ciphertext carry out prize-winning veritification.
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, 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 the first lottery ticket ciphertext;
Sending module, suitable for sending the lottery ticket purchase request for carrying the first lottery ticket ciphertext to welfare lottery ticket center, for welfare lottery ticket Default intelligent contract is called to store the first lottery ticket ciphertext into block chain according to lottery ticket purchase request in center;
Module is provided, suitable for after determining lottery, the center Xiang Fucai provides public key, so that welfare lottery ticket center is using public Key, lottery ticket of announcing the winners in a lottery are in plain text and the first 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 the first lottery ticket ciphertext, in this case it is not apparent that lottery ticket purchase The lottery ticket that person specifically buys in plain text, also can not just count lottery ticket in plain text, to ensure that the public affairs of prize by way of big data Positivity, welfare lottery ticket center is by calling default intelligent contract to store the first lottery ticket ciphertext into block chain, due to being by the first coloured silk Ticket ciphertext is stored into block chain, so that data can not distort, ensure that the authenticity and safety of data;Since lottery ticket is bought Person no longer needs to provide private key oneself i.e. provable prize-winning to welfare lottery ticket center, it is therefore not necessary to public and private key is generated every time, a lottery ticket purchase The lottery ticket that buyer buys at any time is bound with this pair of public and private key of lottery ticket buyer in plain text, is protected without lottery ticket buyer The more public and private keys of set of pipe, avoid public and private key and obscure the defect for leading to authentication failed, finally, no longer needing to through just side, publisher In many ways it participates in just, saves a large amount of manpower and material resources.
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 encrypt the lottery ticket of purchase using the public key in public and private key in plain text, obtain the One lottery ticket ciphertext.
In the present embodiment, each lottery ticket buyer generates a pair of public and private key, and lottery ticket buyer buys coloured silk at any time Ticket uses this pair of public and private key, generates public and private key without being repeated as many times.
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,7,6,3,5,2 encrypting, obtain the first lottery ticket Ciphertext, wherein the first 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 the first 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 the first lottery ticket The lottery ticket purchase request of ciphertext.
Step S102, welfare lottery ticket center obtain the lottery ticket purchase request for carrying the first lottery ticket ciphertext.
Step S103, welfare lottery ticket center call default intelligent contract to store the first lottery ticket ciphertext according to lottery ticket purchase request Into block chain.
After welfare lottery ticket center receives the lottery ticket purchase request for carrying the first lottery ticket ciphertext of lottery ticket buyer transmission, according to Lottery ticket purchase request calls default intelligent contract, is stored the first lottery ticket ciphertext into block chain using default intelligent contract, and Transaction Hash is returned into lottery ticket buyer, lottery ticket buyer can utilize transaction Hash by tools such as block chain browsers The case where checking its lottery ticket ciphertext cochain, to confirm whether purchase lottery ticket succeeds.In practical applications, block packing is block chain Come what is operated, 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 according to area Block is packaged demand and carries out block packing processing to the first lottery ticket ciphertext, and stores the block of packing, and the first lottery ticket ciphertext is deposited at this time Storage just comes into force.
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., can also be by way of the called side of verifying the first lottery ticket ciphertext of storage as a result, when carrying out prize, Lai Tisheng is converted The safety of prize can determine this tune if determining that the called side of the first lottery ticket ciphertext of storage is not welfare lottery ticket center by verifying Storing the first lottery ticket ciphertext with default intelligent contract is not that welfare lottery ticket center is done, and the first lottery ticket ciphertext stored is invalid , so as to avoid the default intelligent contract of hacker attack, stored on block chain it is some its do not know whether to get the winning number in a bond yet the One lottery ticket ciphertext, influences prize.
It is to store the first lottery ticket ciphertext into block chain in the present embodiment, welfare lottery ticket center is not aware that lottery ticket buyer What the lottery ticket of stake is in plain text, therefore, lottery ticket can not be just counted by way of big data in plain text, to ensure that prize knot The fairness of fruit guarantees in addition, realizing data on chain can not distort by storing the first lottery ticket ciphertext into block chain The authenticity of data prevents lottery ticket buyer from denying.
Step S104, for lottery ticket buyer after determining lottery, the center Xiang Fucai provides public 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 public key of oneself.
Step S105, welfare lottery ticket center obtain the public key that provides after winners' announcement in lottery of lottery ticket buyer, and using public key, announce the winners in a lottery Lottery ticket is in plain text and the first lottery ticket ciphertext carries out prize-winning veritification.
Welfare lottery ticket center obtains the public key that lottery ticket buyer provides after winners' announcement in lottery, and then, welfare lottery ticket center is purchased using lottery ticket Public key that buyer provides, lottery of announcing the winners in a lottery ticket are in plain text and the first lottery ticket ciphertext verifies whether lottery ticket buyer gets the winning number in a bond, and get the winning number in a bond It veritifies.
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:
Lottery ticket of announcing the winners in a lottery is encrypted in plain text using public key, obtains the second lottery ticket ciphertext;Judge whether store in block chain There is the first lottery ticket ciphertext to match with the second lottery ticket ciphertext;If in block chain it is not stored have match with the second lottery ticket ciphertext First lottery ticket ciphertext, it is determined that get the winning number in a bond and veritify failure;If being stored with the first coloured silk to match with the second lottery ticket ciphertext in block chain Ticket ciphertext then encrypts the first random data using public key, and encrypted result is returned to lottery ticket buyer, for lottery ticket Buyer is decrypted using the private key pair encryption result in public and private key;Lottery ticket buyer is obtained using the private key pair in public and private key The second random data that encrypted result returns after being decrypted;Judge whether the first random data is identical as the second random data, It is veritified if so, determining by getting the winning number in a bond.
Specifically, the public key that welfare lottery ticket center is provided using lottery ticket buyer encrypts lottery ticket of announcing the winners in a lottery in plain text, obtains the Two lottery ticket ciphertexts, later, welfare lottery ticket center need to verify whether the second lottery ticket ciphertext is stored on block chain, for example, judging block Whether the first lottery ticket ciphertext that with second lottery ticket ciphertext matches is stored in chain, if not stored in block chain have and the second lottery ticket The first lottery ticket ciphertext that ciphertext matches, it is determined that get the winning number in a bond and veritify failure, it is possible thereby to determine lottery ticket buyer there is no in Prize, lottery ticket buyer deceive prize behavior, can give the certain punishment of lottery ticket buyer;
If being stored with the first lottery ticket ciphertext to match with the second lottery ticket ciphertext in block chain, continue to execute in next step Suddenly, to the first random data, (wherein, the first random data can be raw using random number the public key provided using lottery ticket buyer Generated at algorithm, the first random data here is only known at welfare lottery ticket center, and not to public) it is encrypted, and will add Close result returns to lottery ticket buyer, and lottery ticket buyer utilizes public and private key after the encrypted result for receiving the return of welfare lottery ticket center In private key pair encryption result be decrypted, obtain the second random data, the second random number that lottery ticket buyer obtains decryption According to being sent to welfare lottery ticket center, welfare lottery ticket center is obtained after lottery ticket buyer is decrypted using the private key pair encryption result in public and private key The second random data returned;Judge whether the first random data is identical as the second random data, if the first random data and Two random data are identical, it is determined that are 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, can give the lottery ticket Buyer rewards accordingly;If the first random data and the second random data be not identical, it is determined that get the winning number in a bond and veritify failure, thus may be used To determine lottery ticket buyer there is no getting the winning number in a bond, lottery ticket buyer deceives prize behavior, it is certain can to give lottery ticket buyer Punishment.
It is illustrated below with reference to example, the public key of lottery ticket buyer A is P, and public key P is sent to good fortune by lottery ticket buyer A Color center, this lottery ticket of announcing the winners in a lottery is in plain text 1,7,6,3,5,2, and welfare lottery ticket center is using public key P to announcing the winners in a lottery lottery ticket in plain text: 1,7,6,3, 5, it 2 being encrypted, obtains the second lottery ticket ciphertext C, welfare lottery ticket center will verify whether the second lottery ticket ciphertext C is stored on block chain, Specifically, block chain is inquired according to the second lottery ticket ciphertext C, determines whether be stored on block chain and the second lottery ticket ciphertext C phase The the first lottery ticket ciphertext matched, if it does not exist, it is determined that get the winning number in a bond and veritify failure, and if it exists, then perform the next step rapid, welfare lottery ticket center benefit The first random data Rand (secrecy underground) is encrypted with public key P, obtains encrypted result Cnew, and by encrypted result Cnew returns to lottery ticket buyer, and lottery ticket buyer is decrypted Cnew to obtain the second random data using the private key of oneself RandNew, and the second random data RandNew is sent to welfare lottery ticket center, welfare lottery ticket center compare Rand and RandNew whether one It causes, if unanimously, it is determined that veritified by getting the winning number in a bond;If inconsistent, it is determined that get the winning number in a bond and veritify failure.
The method whether above-mentioned verifying lottery ticket buyer gets the winning number in a bond provides the private of oneself to welfare lottery ticket center without lottery ticket buyer Key, that is, oneself provable prize-winning, without generating public and private key, the lottery ticket that a lottery ticket buyer buys at any time every time It binds with this pair of public and private key of lottery ticket buyer, without the more public and private keys of set of lottery ticket buyer keeping, avoids public and private in plain text The defect that key is obscured.
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, when going out Now in this case, using lottery ticket buyer provide public key respectively to multiple groups announce the winners in a lottery lottery ticket in plain text encrypt, obtain multiple groups Second lottery ticket ciphertext matches the first lottery ticket ciphertext with multiple groups the second lottery ticket ciphertext respectively;First lottery ticket ciphertext if it exists It is matched with any one group of the second lottery ticket ciphertext in multiple groups the second lottery ticket ciphertext, it is determined that veritified by getting the winning number in a bond, it is possible thereby to really Fixed lottery ticket buyer gets the winning number in a bond, and can give lottery ticket buyer and reward accordingly;First lottery ticket ciphertext and multiple groups the if it exists Two lottery ticket ciphertexts mismatch, it is determined that and it gets the winning number in a bond and veritifies failure, it is possible thereby to determine that lottery ticket buyer does not get the winning number in a bond, the coloured silk Ticket buyer deceives prize behavior, can give the certain punishment of lottery ticket buyer.
In addition, if lottery ticket buyer determines the group that oneself is got the winning number in a bond prize-winning group can be provided to welfare lottery ticket center, in welfare lottery ticket The heart can be determined according to prize-winning group announces the winners in a lottery lottery ticket in plain text accordingly, prize-winning veritification is carried out, 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 the first lottery ticket ciphertext is provided to welfare lottery ticket center, welfare lottery ticket center is close by the first lottery ticket by calling default intelligent contract Text is stored into block chain, and be supplied to welfare lottery ticket center due to lottery ticket buyer is the first lottery ticket ciphertext, and welfare lottery ticket center simultaneously can not The lottery ticket for knowing lottery ticket buyer purchase in plain text, also can not just count lottery ticket in plain text, to ensure that by way of big data The fairness of prize, in addition, so that data can not distort, ensure that due to being to store the first lottery ticket ciphertext into block chain The authenticity and safety of data;Since lottery ticket buyer no longer needs to provide private key oneself i.e. provable prize-winning to welfare lottery ticket center, It is therefore not necessary to generate public and private key every time, lottery ticket that a lottery ticket buyer buys at any time in plain text with lottery ticket buyer This pair of public and private key binding, without the more public and private keys of set of lottery ticket buyer keeping, avoiding public and private key and obscuring leads to authentication failed Defect ensure that the fairness of prize using public key as the identity documents of lottery ticket buyer, finally, no longer needing to pass through public affairs Square, 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, as shown in Fig. 2, method includes the following steps:
Step S200 obtains the lottery ticket purchase request for carrying the first lottery ticket ciphertext.
Wherein, the first lottery ticket ciphertext is that lottery ticket buyer encrypts lottery ticket using the public key in public and private key in plain text It obtains.
Step S201 calls default intelligent contract to store the first lottery ticket ciphertext to block chain according to lottery ticket purchase request In.
Step S202 obtains the public key that lottery ticket buyer provides after winners' announcement in lottery, and in plain text using public key, lottery ticket of announcing the winners in a lottery And first lottery ticket ciphertext carry out prize-winning veritification.
Optionally, using public key, announce the winners in a lottery lottery ticket in plain text and the first lottery ticket ciphertext carry out get the winning number in a bond veritify further comprise:
Lottery ticket of announcing the winners in a lottery is encrypted in plain text using public key, obtains the second lottery ticket ciphertext;
Judge the first lottery ticket ciphertext to match with the second lottery ticket ciphertext whether is stored in block chain;
If so, encrypting using public key to the first random data, and encrypted result is returned into lottery ticket buyer, with It is decrypted for lottery ticket buyer using the private key pair encryption result in public and private key;
Obtain the second random number returned after lottery ticket buyer is decrypted using the private key pair encryption result in public and private key According to;
Judge whether the first random data is identical as the second random data, is veritified if so, determining by getting the winning number in a bond.
Optionally, method further include: if not stored in block chain have the first lottery ticket to match with the second lottery ticket ciphertext close Text, it is determined that get the winning number in a bond and veritify failure.
Optionally, after calling default intelligent contract to store the first 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 the first lottery ticket ciphertext, and is not known The lottery ticket that road lottery ticket buyer specifically buys in plain text, also can not just count lottery ticket in plain text, to guarantee by way of big data The fairness of prize, welfare lottery ticket center by calling default intelligent contract to store the first lottery ticket ciphertext into block chain, due to It is to store the first lottery ticket ciphertext into block chain, so that data can not distort, ensure that the authenticity and safety of data;By It no longer needs to provide private key oneself i.e. provable prize-winning to welfare lottery ticket center in lottery ticket buyer, it is therefore not necessary to public and private key is generated every time, The lottery ticket that one lottery ticket buyer buys at any time is bound with this pair of public and private key of lottery ticket buyer in plain text, without coloured silk The more public and private keys of set of ticket buyer keeping, are avoided public and private key and obscure the defect for leading to authentication failed, purchased using public 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, as shown in figure 3, method includes the following steps:
Step S300, the lottery ticket bought using the public key in public and private key to lottery ticket buyer are encrypted in plain text, obtain the One lottery ticket ciphertext.
The step center S301, Xiang Fucai sends the lottery ticket purchase request for carrying the first lottery ticket ciphertext, for welfare lottery ticket center According to lottery ticket purchase request, default intelligent contract is called to store the first lottery ticket ciphertext into block chain.
Step S302, after determining lottery, the center Xiang Fucai provide public key, for welfare lottery ticket center using public key, open Prize lottery ticket is in plain text and the first lottery 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 the first lottery ticket ciphertext so that welfare lottery ticket center and can not know lottery ticket buyer buy coloured silk Ticket in plain text, also can not just count lottery ticket in plain text by way of big data, to ensure that the fairness of prize, since lottery ticket is purchased Buyer no longer needs to provide private key oneself i.e. provable prize-winning to welfare lottery ticket center, it is therefore not necessary to public and private key is generated every time, a lottery ticket The lottery ticket that buyer buys at any time is bound with this pair of public and private key of lottery ticket buyer in plain text, is not necessarily to lottery ticket buyer The more public and private keys of set of keeping, avoid public and private key and obscure the defect for leading to authentication failed, using public key as the body of lottery ticket buyer Part voucher, 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 people Power material resources.
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, if Fig. 4 shows, the device include: obtain module 400, processing module 410, It 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 the first lottery ticket ciphertext, wherein the first lottery ticket is close Text is that lottery ticket buyer encrypts lottery ticket using the public key in public and private key in plain text;
Processing module 410, is suitable for according to lottery ticket purchase request, call default intelligent contract by the first lottery ticket ciphertext store to In block chain;
It gets the winning number in a bond and veritifies module 420, the public key provided after winners' announcement in lottery suitable for obtaining lottery ticket buyer, and utilization public key, Lottery ticket of announcing the winners in a lottery is in plain text and the first lottery ticket ciphertext carries out prize-winning veritification.
Optionally, veritification module of getting the winning number in a bond is further adapted for: being encrypted using public key to lottery ticket of announcing the winners in a lottery in plain text, is obtained second Lottery ticket ciphertext;
Judge the first lottery ticket ciphertext to match with the second lottery ticket ciphertext whether is stored in block chain;
If so, encrypting using public key to the first random data, and encrypted result is returned into lottery ticket buyer, with It is decrypted for lottery ticket buyer using the private key pair encryption result in public and private key;
Obtain the second random number returned after lottery ticket buyer is decrypted using the private key pair encryption result in public and private key According to;
Judge whether the first random data is identical as the second random data, is veritified if so, determining by getting the winning number in a bond.
Optionally, it gets the winning number in a bond and veritifies module and be further adapted for: if not stored in block chain have the to match with the second lottery ticket ciphertext One lottery ticket ciphertext, 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 the first lottery ticket ciphertext, and is not known The lottery ticket that road lottery ticket buyer specifically buys in plain text, also can not just count lottery ticket in plain text, to guarantee by way of big data The fairness of prize, welfare lottery ticket center by calling default intelligent contract to store the first lottery ticket ciphertext into block chain, due to It is to store the first lottery ticket ciphertext into block chain, so that data can not distort, ensure that the authenticity and safety of data;By It no longer needs to provide private key oneself i.e. provable prize-winning to welfare lottery ticket center in lottery ticket buyer, it is therefore not necessary to public and private key is generated every time, The lottery ticket that one lottery ticket buyer buys at any time is bound with this pair of public and private key of lottery ticket buyer in plain text, without coloured silk The more public and private keys of set of ticket buyer keeping, are avoided public and private key and obscure the defect for leading to authentication failed, purchased using public 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, if Fig. 5 shows, the device include: encrypting module 500, sending 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 the first lottery ticket ciphertext;
Sending module 510, suitable for sending the lottery ticket purchase request for carrying the first lottery ticket ciphertext to welfare lottery ticket center, for good fortune Default intelligent contract is called to store the first lottery ticket ciphertext into block chain according to lottery ticket purchase request in color center;
Module 520 is provided, suitable for after determining lottery, the center Xiang Fucai provides public key, for the utilization of welfare lottery ticket center Public key, lottery ticket of announcing the winners in a lottery are in plain text and the first lottery ticket ciphertext carries 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 the first lottery ticket ciphertext so that welfare lottery ticket center and can not know lottery ticket buyer buy coloured silk Ticket in plain text, also can not just count lottery ticket in plain text by way of big data, to ensure that the fairness of prize, since lottery ticket is purchased Buyer no longer needs to provide private key oneself i.e. provable prize-winning to welfare lottery ticket center, it is therefore not necessary to public and private key is generated every time, a lottery ticket The lottery ticket that buyer buys at any time is bound with this pair of public and private key of lottery ticket buyer in plain text, is not necessarily to lottery ticket buyer The more public and private keys of set of keeping, avoid public and private key and obscure the defect for leading to authentication failed, using public key as the body of lottery ticket buyer Part voucher, 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 people Power material resources.
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 possesses a pair of public and private Key, which comprises
Obtain the lottery ticket purchase request for carrying the first lottery ticket ciphertext, wherein the first lottery ticket ciphertext is lottery ticket purchase Person encrypts lottery ticket using the public key in public and private key in plain text;
According to the lottery ticket purchase request, default intelligent contract is called to store the first lottery ticket ciphertext to block chain In;
The public key that lottery ticket buyer provides after winners' announcement in lottery is obtained, and utilizes public key, announce the winners in a lottery lottery ticket plaintext and the first coloured silk Ticket ciphertext carries out prize-winning veritification.
A2. method according to a1, which is characterized in that the utilization public key, lottery ticket of announcing the winners in a lottery are in plain text and the first lottery ticket is close Text get the winning number in a bond veritifying:
Lottery ticket of announcing the winners in a lottery is encrypted in plain text using the public key, obtains the second lottery ticket ciphertext;
Judge the first lottery ticket ciphertext to match with the second lottery ticket ciphertext whether is stored in block chain;
If so, encrypting using the public key to the first random data, and encrypted result is returned into lottery ticket purchase Person, so that lottery ticket buyer is decrypted using the private key pair encryption result in public and private key;
Obtain the second random number returned after lottery ticket buyer is decrypted using the private key pair encryption result in public and private key According to;
Judge whether first random data and second random data are identical, passes through prize-winning core if so, determining It tests.
A3. the method according to A2, which is characterized in that the method also includes:
If not stored in block chain have the first lottery ticket ciphertext to match with the second lottery ticket ciphertext, it is determined that prize-winning core Test failure.
A4. the method according to any one of A1-A3, which is characterized in that call default intelligent contract by described the After one lottery ticket ciphertext is stored 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 block.
B5. a kind of lottery rewarding method based on block chain, which is characterized in that each lottery ticket buyer generates 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, it is close to obtain the first lottery ticket Text;
The lottery ticket purchase request for carrying the first lottery ticket ciphertext is sent, to welfare lottery ticket center so that welfare lottery ticket center is according to the coloured silk Ticket purchase request calls default intelligent contract to store the first lottery ticket ciphertext into block chain;
After determining lottery, the center Xiang Fucai provides public key, so that welfare lottery ticket center utilizes public key, lottery ticket plaintext of announcing the winners in a lottery And first lottery ticket ciphertext carry out prize-winning veritification.
C6. a kind of lottery rewarding device based on block chain, which is characterized in that each lottery ticket buyer possesses a pair of public and private Key, described device include:
Module is obtained, suitable for obtaining the lottery ticket purchase request for carrying the first lottery ticket ciphertext, wherein first lottery ticket is close Text is that 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 by the first lottery ticket ciphertext according to the lottery ticket purchase request It stores into block chain;
Get the winning number in a bond and veritify module, suitable for obtaining the public key that provides after winners' announcement in lottery of lottery ticket buyer, and using public key, announce the winners in a lottery Lottery ticket is in plain text and the first lottery ticket ciphertext carries out prize-winning veritification.
C7. the device according to C6, which is characterized in that the prize-winning is veritified module and is further adapted for:
Lottery ticket of announcing the winners in a lottery is encrypted in plain text using the public key, obtains the second lottery ticket ciphertext;
Judge the first lottery ticket ciphertext to match with the second lottery ticket ciphertext whether is stored in block chain;
If so, encrypting using the public key to the first random data, and encrypted result is returned into lottery ticket purchase Person, so that lottery ticket buyer is decrypted using the private key pair encryption result in public and private key;
Obtain the second random number returned after lottery ticket buyer is decrypted using the private key pair encryption result in public and private key According to;
Judge whether first random data and second random data are identical, passes through prize-winning core if so, determining It tests.
C8. the device according to C7, which is characterized in that the prize-winning is veritified module and is further adapted for:
If not stored in block chain have the first lottery ticket ciphertext to match with the second lottery ticket ciphertext, it is determined that prize-winning core Test failure.
C9. the device according to any one of C6-C8, 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.
D10. a kind of lottery rewarding device based on block chain, which is characterized in that each lottery ticket buyer generates a pair of public Private key, described device include:
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 the first lottery ticket ciphertext;
Sending module, suitable for sending the lottery ticket purchase request for carrying the first lottery ticket ciphertext to welfare lottery ticket center, for welfare lottery ticket Default intelligent contract is called to store the first lottery ticket ciphertext into block chain according to the lottery ticket purchase request in center;
Module is provided, suitable for after determining lottery, the center Xiang Fucai provides public key, so that welfare lottery ticket center is using public Key, lottery ticket of announcing the winners in a lottery are in plain text and the first lottery ticket ciphertext carries out prize-winning veritification.
E11. 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 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-A4 based on block chain.
F12. 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-A4.
G13. 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 B5 for storing an at least executable instruction, the executable instruction The corresponding operation of lottery rewarding method based on block chain.
H14. 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 B5.

Claims (10)

1. a kind of lottery rewarding method based on block chain, which is characterized in that each lottery ticket buyer possesses a pair of public and private key, institute The method of stating includes:
Obtain the lottery ticket purchase request for carrying the first lottery ticket ciphertext, wherein the first lottery ticket ciphertext is lottery ticket buyer's benefit Lottery ticket is encrypted in plain text with the public key in public and private key;
According to the lottery ticket purchase request, default intelligent contract is called to store the first lottery ticket ciphertext into block chain;
The public key that there is provided after winners' announcement in lottery of lottery ticket buyer is obtained, and in plain text and the first lottery ticket is close using public key, lottery ticket of announcing the winners in a lottery Text carries out prize-winning veritification.
2. the method according to claim 1, wherein described utilize public key, announce the winners in a lottery lottery ticket plaintext and the first lottery ticket Ciphertext get the winning number in a bond veritifying:
Lottery ticket of announcing the winners in a lottery is encrypted in plain text using the public key, obtains the second lottery ticket ciphertext;
Judge the first lottery ticket ciphertext to match with the second lottery ticket ciphertext whether is stored in block chain;
If so, encrypting using the public key to the first random data, and encrypted result is returned into lottery ticket buyer, with It is decrypted for lottery ticket buyer using the private key pair encryption result in public and private key;
Obtain the second random data returned after lottery ticket buyer is decrypted using the private key pair encryption result in public and private key;
Judge whether first random data and second random data are identical, is veritified if so, determining by getting the winning number in a bond.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
If not stored in block chain have the first lottery ticket ciphertext to match with the second lottery ticket ciphertext, it is determined that get the winning number in a bond to veritify and lose It loses.
4. a kind of lottery rewarding method based on block chain, which is characterized in that each lottery ticket buyer generates a pair of public and private key, institute The method of stating includes:
The lottery ticket that lottery ticket buyer buys is encrypted in plain text using the public key in public and private key, obtains the first lottery ticket ciphertext;
The lottery ticket purchase request for carrying the first 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 first lottery ticket ciphertext into block chain;
After determining lottery, the center Xiang Fucai provides public key, for welfare lottery ticket center using public key, lottery ticket of announcing the winners in a lottery in plain text and the One lottery ticket ciphertext carries out prize-winning veritification.
5. a kind of lottery rewarding device based on block chain, which is characterized in that each lottery ticket buyer possesses a pair of public and private key, institute Stating device includes:
Module is obtained, carries the lottery ticket purchase request of the first lottery ticket ciphertext suitable for obtaining, wherein the first 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 first 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 public key provided after winners' announcement in lottery suitable for obtaining lottery ticket buyer, and utilize public key, lottery ticket of announcing the winners in a lottery In plain text and the first lottery ticket ciphertext carries out prize-winning veritification.
6. a kind of lottery rewarding device based on block chain, which is characterized in that each lottery ticket buyer generates a pair of public and private key, institute Stating device includes:
Encrypting module, the lottery ticket suitable for being bought using the public key in public and private key to lottery ticket buyer are encrypted in plain text, obtain the One lottery ticket ciphertext;
Sending module, suitable for sending the lottery ticket purchase request for carrying the first 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 first lottery ticket ciphertext into block chain;
Module is provided, suitable for after determining lottery, the center Xiang Fucai provides public key, for welfare lottery ticket center using public key, open Prize lottery ticket is in plain text and the first lottery 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.
CN201910106736.XA 2019-02-02 2019-02-02 Lottery ticket prize exchanging method and device based on block chain Active CN109672693B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910106736.XA CN109672693B (en) 2019-02-02 2019-02-02 Lottery ticket prize exchanging method and device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910106736.XA CN109672693B (en) 2019-02-02 2019-02-02 Lottery ticket prize exchanging method and device based on block chain

Publications (2)

Publication Number Publication Date
CN109672693A true CN109672693A (en) 2019-04-23
CN109672693B CN109672693B (en) 2021-06-04

Family

ID=66151186

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910106736.XA Active CN109672693B (en) 2019-02-02 2019-02-02 Lottery ticket prize exchanging method and device based on block chain

Country Status (1)

Country Link
CN (1) CN109672693B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110245943A (en) * 2019-05-20 2019-09-17 阿里巴巴集团控股有限公司 Receipt storage method and node based on Rule of judgment
CN110474918A (en) * 2019-08-22 2019-11-19 腾讯科技(深圳)有限公司 A kind of verification method and relevant apparatus of resource distribution
CN110598462A (en) * 2019-09-29 2019-12-20 腾讯科技(深圳)有限公司 Data presentation method, device and system, electronic equipment and storage medium
CN112734455A (en) * 2019-10-29 2021-04-30 腾讯科技(深圳)有限公司 Prize exchanging result generating method, device and equipment and readable storage medium
CN112767221A (en) * 2021-02-02 2021-05-07 深圳市易讯天空网络技术有限公司 Block chain lottery drawing method, terminal device and computer readable storage medium
CN112862477A (en) * 2021-02-07 2021-05-28 中国人民大学 Block chain-based digital commodity atomic transaction method and system
CN113128849A (en) * 2021-04-02 2021-07-16 深圳市易讯天空网络技术有限公司 Lottery process management method, system, terminal device and storage medium
CN113128850A (en) * 2021-04-02 2021-07-16 深圳市易讯天空网络技术有限公司 Lottery process management method, system, terminal equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447699A (en) * 2011-11-29 2012-05-09 中福在线投资有限公司 Safe transaction method for mobile Internet lottery based on hardware information
CN103078731A (en) * 2013-01-05 2013-05-01 深圳市思乐数据技术有限公司 Lottery data encryption method and system
CN106504174A (en) * 2016-09-27 2017-03-15 布比(北京)网络技术有限公司 Lottery industry publishing system and device based on block chain
US20170228975A1 (en) * 2014-08-06 2017-08-10 Mido Play Inc. Systems for multiple legal game providers and multiple jurisdictions that provide notifications of lottery ticket status
CN107169764A (en) * 2017-05-10 2017-09-15 山东大学 Fair data trade method based on block chain
CN108447014A (en) * 2018-03-19 2018-08-24 成都零光量子科技有限公司 A kind of block chain lottery industry method and system
CN108734584A (en) * 2018-05-27 2018-11-02 王刚 A kind of public welfare fund welfare lottery ticket distributing method based on block chain
CN108805664A (en) * 2018-05-28 2018-11-13 安徽磐众信息科技有限公司 A kind of responsibility lottery information published method based on block chain

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447699A (en) * 2011-11-29 2012-05-09 中福在线投资有限公司 Safe transaction method for mobile Internet lottery based on hardware information
CN103078731A (en) * 2013-01-05 2013-05-01 深圳市思乐数据技术有限公司 Lottery data encryption method and system
US20170228975A1 (en) * 2014-08-06 2017-08-10 Mido Play Inc. Systems for multiple legal game providers and multiple jurisdictions that provide notifications of lottery ticket status
CN106504174A (en) * 2016-09-27 2017-03-15 布比(北京)网络技术有限公司 Lottery industry publishing system and device based on block chain
CN107169764A (en) * 2017-05-10 2017-09-15 山东大学 Fair data trade method based on block chain
CN108447014A (en) * 2018-03-19 2018-08-24 成都零光量子科技有限公司 A kind of block chain lottery industry method and system
CN108734584A (en) * 2018-05-27 2018-11-02 王刚 A kind of public welfare fund welfare lottery ticket distributing method based on block chain
CN108805664A (en) * 2018-05-28 2018-11-13 安徽磐众信息科技有限公司 A kind of responsibility lottery information published method based on block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李聪: "一种基于区块链的数字彩票发行系统", 《信息安全研究》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110245943B (en) * 2019-05-20 2021-04-23 创新先进技术有限公司 Receipt storage method and node based on judgment condition
CN110245943A (en) * 2019-05-20 2019-09-17 阿里巴巴集团控股有限公司 Receipt storage method and node based on Rule of judgment
CN110474918A (en) * 2019-08-22 2019-11-19 腾讯科技(深圳)有限公司 A kind of verification method and relevant apparatus of resource distribution
CN110598462B (en) * 2019-09-29 2023-06-23 腾讯科技(深圳)有限公司 Data presentation method, device, system, electronic equipment and storage medium
CN110598462A (en) * 2019-09-29 2019-12-20 腾讯科技(深圳)有限公司 Data presentation method, device and system, electronic equipment and storage medium
CN112734455A (en) * 2019-10-29 2021-04-30 腾讯科技(深圳)有限公司 Prize exchanging result generating method, device and equipment and readable storage medium
CN112734455B (en) * 2019-10-29 2023-09-05 腾讯科技(深圳)有限公司 Method, device and equipment for generating prize exchanging result and readable storage medium
CN112767221A (en) * 2021-02-02 2021-05-07 深圳市易讯天空网络技术有限公司 Block chain lottery drawing method, terminal device and computer readable storage medium
CN112767221B (en) * 2021-02-02 2023-12-19 深圳市易讯天空网络技术有限公司 Block chain lottery drawing method, terminal device and computer readable storage medium
CN112862477A (en) * 2021-02-07 2021-05-28 中国人民大学 Block chain-based digital commodity atomic transaction method and system
CN112862477B (en) * 2021-02-07 2024-05-07 中国人民大学 Digital commodity atomic transaction method and system based on blockchain
CN113128849A (en) * 2021-04-02 2021-07-16 深圳市易讯天空网络技术有限公司 Lottery process management method, system, terminal device and storage medium
CN113128850A (en) * 2021-04-02 2021-07-16 深圳市易讯天空网络技术有限公司 Lottery process management method, system, terminal equipment and storage medium
CN113128850B (en) * 2021-04-02 2024-04-19 深圳市易讯天空网络技术有限公司 Lottery flow management method, system, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN109672693B (en) 2021-06-04

Similar Documents

Publication Publication Date Title
CN109672693A (en) Lottery rewarding method and device based on block chain
Homoliak et al. The security reference architecture for blockchains: Toward a standardized model for studying vulnerabilities, threats, and defenses
CN109905379A (en) Lottery rewarding method and device based on block chain
CN106384236B (en) Based on the ca authentication management method of block chain, apparatus and system
CN110162992B (en) Data processing method, data processing device and computer system
CN105207775B (en) The read method and device of verification information
JP6759468B2 (en) Product promotion using smart contracts within the blockchain network
EP4092956A1 (en) Implementing logic gate functionality using a blockchain
CN106549940B (en) Vehicle data transmission method and system
CN108650077B (en) Block chain based information transmission method, terminal, equipment and readable storage medium
CN110290102A (en) Service security system and method based on application
CN109075976A (en) Certificate depending on key authentication is issued
US20060085359A1 (en) Method and apparatus for electronic commerce using digital ticket to provide anonymity
CN113268715A (en) Software encryption method, device, equipment and storage medium
CN108769057A (en) Personal identification method based on block chain and device
Dreier et al. Formal verification of e-auction protocols
CN110519309A (en) Data transmission method, device, terminal, server and storage medium
CN109618341A (en) A kind of digital signature authentication method, system, device and storage medium
CN109583215A (en) It is a kind of to handle the method and device of collage-credit data, block chain data-sharing systems
CN109858911A (en) Qualification verification method, device, system, equipment and readable storage medium storing program for executing
CN111416709B (en) Voting method, device, equipment and storage medium based on block chain system
CN112700314A (en) Auction method and system based on mixed block chain
KR20190078668A (en) Apparatus and Methods for Verifiable Lottery
CN110708162A (en) Resource acquisition method and device, computer readable medium and electronic equipment
Smid Development of the advanced encryption standard

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210427

Address after: 210000 23 / F, Tower B, Tengfei building, No. 88, Jiangmiao Road, Jiangbei new district, Nanjing City, Jiangsu Province

Applicant after: Jiangsu tongfudun blockchain Technology Co., Ltd

Applicant after: JIANGSU PAY EGIS TECHNOLOGY Co.,Ltd.

Address before: Suzhou City, Jiangsu province 215021 East Road, Suzhou Industrial Park, No. 88 Suzhou 2.5 Industrial Park C2 building room 3F-301

Applicant before: JIANGSU PAY EGIS TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant