CN109389399A - Lottery industry method, apparatus, computer equipment and storage medium based on block chain - Google Patents

Lottery industry method, apparatus, computer equipment and storage medium based on block chain Download PDF

Info

Publication number
CN109389399A
CN109389399A CN201811214671.2A CN201811214671A CN109389399A CN 109389399 A CN109389399 A CN 109389399A CN 201811214671 A CN201811214671 A CN 201811214671A CN 109389399 A CN109389399 A CN 109389399A
Authority
CN
China
Prior art keywords
prize
lottery
winning
block
share
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
Application number
CN201811214671.2A
Other languages
Chinese (zh)
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.)
Shenzhen Qianhai Lexunfang Block Chain Technology Co Ltd
Original Assignee
Shenzhen Qianhai Lexunfang Block Chain 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 Shenzhen Qianhai Lexunfang Block Chain Technology Co Ltd filed Critical Shenzhen Qianhai Lexunfang Block Chain Technology Co Ltd
Priority to CN201811214671.2A priority Critical patent/CN109389399A/en
Publication of CN109389399A publication Critical patent/CN109389399A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • 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
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/34Betting or bookmaking, e.g. Internet betting

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Finance (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Tourism & Hospitality (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention relates to lottery industry method, apparatus, computer equipment and storage medium based on block chain, this method includes obtaining user using the trading situation of logical card redemption lottery share;User is recorded in block using the trading situation of logical card redemption lottery share;Screen effective trading situation cochain;Judge whether the time of redemption lottery share is less than preset time;If it is not, then obtaining the last transaction of cochain;Prize-winning number is calculated according to last transaction;Prize-winning account and non-prize-winning account are filtered out according to prize-winning number;Distribution is logical to be demonstrate,proved to non-prize-winning account;Distribute prize to account of getting the winning number in a bond.The present invention carries out cochain to effective trading situation, avoid black-box operation and substandard transaction, the processing of block height cryptographic Hash is carried out to the last transaction situation of cochain, to obtain prize-winning number, cryptographic Hash has randomness, the randomness and fairness that lottery industry can be improved send out non-prize-winning account the logical card sum of exchange, improve the interest of lottery industry.

Description

Lottery industry method, apparatus, computer equipment and storage medium based on block chain
Technical field
The present invention relates to lottery industry methods, more specifically refer to lottery industry method, apparatus, computer equipment based on block chain And storage medium.
Background technique
It is not good enough generally, based on the randomness for the lottery industry method shaken/drawn a lottery, it is easy by human interference.The namely lottery industry Prize drawing or lot cast platform can select to one's own side advantageously and controllable project as featured project;Lacking stringent effectively prison In the case where pipe, it is easy to generate corrupt practice;Even if reinforcing supervision, since the lottery industry method mode of operation shaken/drawn a lottery is impermeable Bright property and randomness are undesirable, still cannot fundamentally solve fair, just and efficiency, opaque game rule and The prize drawing process of camera bellows, can not obtain the trust of player.And so lottery industry method can only allow limited player to get the winning number in a bond, other Most of participation players cannot obtain any income, substantially be a kind of " zero-sum game ", lead when the number for participating in getting the winning number in a bond When causing prize-winning probability lower, the participation heat of participation players also can be reduced accordingly.
Therefore, it is necessary to design a kind of new method, realize fair, just and disclosed lottery industry and increase lottery draw Interest.
Summary of the invention
It is an object of the invention to overcome the deficiencies of existing technologies, the lottery industry method, apparatus based on block chain is provided, is calculated Machine equipment and storage medium.
To achieve the above object, the invention adopts the following technical scheme: the lottery industry method based on block chain, comprising:
User is obtained using the trading situation of logical card redemption lottery share;
User is recorded in block using the trading situation of logical card redemption lottery share;
Screen effective trading situation cochain;
Judge whether the time of redemption lottery share is less than preset time;
If it is not, then obtaining the last transaction of cochain;
Prize-winning number is calculated according to last transaction;
Prize-winning account and non-prize-winning account are filtered out according to prize-winning number;
Distribution is logical to be demonstrate,proved to non-prize-winning account;
Distribute prize to account of getting the winning number in a bond.
Its further technical solution are as follows: described that prize-winning number is calculated according to last transaction, comprising:
The block height of block where obtaining last transaction;
Conversion processing is carried out according to Hash value corresponding to block height, to obtain prize-winning number.
Its further technical solution are as follows: the Hash value according to corresponding to block height carries out conversion processing, with To prize-winning number, comprising:
Obtain the rear eight-digit number value of Hash value corresponding to block height;
Ten's digit is converted by rear eight-digit number value, to obtain numerical value to be processed;
User is obtained using the Headquarters of the General Staff and number of logical card redemption lottery share;
By numerical value to be processed to Headquarters of the General Staff and number remainder, to obtain intermediate value;
Intermediate data is added one, to obtain prize-winning number.
Its further technical solution are as follows: the logical card of distribution to non-prize-winning account, comprising:
Obtain the logical card sum of redemption lottery share;
Logical card sum is divided equally into non-prize-winning account.
Its further technical solution are as follows: the effective trading situation cochain of screening, comprising:
Whether effective verify trading situation;
If so, carrying out cochain to effective trading situation;
Judge whether the trading situation of all records all carries out validation verification;
If so, whether being less than preset time into the time for judging redemption lottery share;
If it is not, then return the verifying trading situation whether validity.
Its further technical solution are as follows: before the trading situation for obtaining user using logical card redemption lottery share, also Include:
Establish block platform chain;
Distribute logical card on block platform chain;
On the logical card total amount of record, issuing mechanism and trading situation to the public account book of block platform chain.
The present invention also provides the apparatus for winning prize based on block chain, comprising:
First acquisition unit, for obtaining user using the trading situation of logical card redemption lottery share;
Recording unit, for recording user in block using the trading situation of logical card redemption lottery share;
Upper chain element, for screening effective trading situation cochain;
Judging unit, for judging whether the time of redemption lottery share is less than preset time;
Second acquisition unit, for if it is not, then obtaining the last transaction of cochain;
Number computing unit, for calculating prize-winning number according to last transaction;
Screening unit, for filtering out prize-winning account and non-prize-winning account according to prize-winning number;
First Dispatching Unit, for distributing logical card to non-prize-winning account;
Second Dispatching Unit, for distributing prize to account of getting the winning number in a bond.
Its further technical solution are as follows: the number computing unit includes:
Block height obtains subelement, the block height for block where obtaining last transaction;
Subelement is handled, conversion processing is carried out for the Hash value according to corresponding to block height, to obtain winning numbers Code.
The present invention also provides a kind of computer equipment, the computer equipment includes memory and processor, described to deposit Computer program is stored on reservoir, the processor realizes above-mentioned method when executing the computer program.
The present invention also provides a kind of storage medium, the storage medium is stored with computer program, the computer journey Sequence can realize above-mentioned method when being executed by processor.
Compared with the prior art, the invention has the advantages that: the present invention is by using the logical mode for demonstrate,proving redemption lottery share It trades, and trading situation is recorded, cochain is carried out to effective trading situation, avoids black-box operation and substandard Transaction, carry out the processing of block height cryptographic Hash, to the last transaction situation of cochain to obtain prize-winning number, cryptographic Hash With randomness, the randomness and fairness of lottery industry can be improved, send out non-prize-winning account the logical card sum of exchange, improve lottery industry Interest, to realize fair, just and disclosed lottery industry and increase the interest of lottery draw.
The invention will be further described in the following with reference to the drawings and specific embodiments.
Detailed description of the invention
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, general for this field For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the application scenarios schematic diagram of the lottery industry method provided in an embodiment of the present invention based on block chain;
Fig. 2 is the flow diagram of the lottery industry method provided in an embodiment of the present invention based on block chain;
Fig. 3 is the sub-process schematic diagram of the lottery industry method provided in an embodiment of the present invention based on block chain;
Fig. 4 is the sub-process schematic diagram of the lottery industry method provided in an embodiment of the present invention based on block chain;
Fig. 5 is the sub-process schematic diagram of the lottery industry method provided in an embodiment of the present invention based on block chain;
Fig. 6 is the sub-process schematic diagram of the lottery industry method provided in an embodiment of the present invention based on block chain;
Fig. 7 be another embodiment of the present invention provides the lottery industry method based on block chain flow diagram;
Fig. 8 is the schematic block diagram of the apparatus for winning prize provided in an embodiment of the present invention based on block chain;
Fig. 9 is the schematic frame of the number computing unit of the apparatus for winning prize provided in an embodiment of the present invention based on block chain Figure;
Figure 10 is the schematic block diagram of the processing subelement of the apparatus for winning prize provided in an embodiment of the present invention based on block chain;
Figure 11 is the schematic frame of the second Dispatching Unit of the apparatus for winning prize provided in an embodiment of the present invention based on block chain Figure;
Figure 12 is the schematic block diagram of the screening unit of the apparatus for winning prize provided in an embodiment of the present invention based on block chain;
Figure 13 be another embodiment of the present invention provides the apparatus for winning prize based on block chain schematic block diagram;
Figure 14 is the schematic block diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instruction Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded Body, step, operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
Fig. 1 and Fig. 2 are please referred to, Fig. 1 is the application scenarios of the lottery industry method provided in an embodiment of the present invention based on block chain Schematic diagram.Fig. 2 is the schematic flow chart of the lottery industry method provided in an embodiment of the present invention based on block chain.It should be based on block chain Lottery industry method be applied to server in.The server can be a server in Distributed Services platform, the server In be deployed with lottery industry platform, which carries out user by the lottery industry APP of user terminal the transaction feelings of redemption lottery share Condition is sent in server, to carry out disclosing just and fair prize drawing lottery industry.
It should be noted that only illustrating a server in Fig. 2, in the actual operation process, server can be right The trading situation of multiple user terminal inputs is sampled lottery industry processing.
Fig. 2 is the flow diagram of the lottery industry method provided in an embodiment of the present invention based on block chain.As shown in Fig. 2, should Method includes the following steps S110 to S190.
S110, user is obtained using the trading situation of logical card redemption lottery share.
In the present embodiment, logical card refers to the equity voucher existing in digital form issued on block platform chain, It represents a kind of right, while embodying its intrinsic and intrinsic value, leads to the energy such as the authenticity, tamper-resistance properties, protection privacy of card Power is ensured that each logical card, is exactly a right protected by cryptography by cryptography.
User demonstrate,proves redemption lottery share by PayPal, and share accounting is higher, and winning probability is bigger;Exchange 1 part of prize drawing share 1 logical card need to be spent;User confirms that exchanging i.e. default deducts logical card, can not actively cancel, activity end is not returned;Single is exchanged 1 logical card is at least spent, redemption amounts and number are unlimited;Every part of prize drawing share corresponds to unique share number, share number according to Exchange successively providing by 1,2,3... sequence for time.
S120, user is recorded in block using the trading situation of logical card redemption lottery share.
In the present embodiment, in block platform chain, each block has intelligent contract, i.e. the whole network verifying node can all connect Receive part intelligence contract.Intelligent contract can periodically check whether that there are dependent events and trigger condition, that is, first check for sweepstake It is whether still underway, as underway, record every user and exchange the transaction that share participates in prize drawing, reexamine the event Whether trigger condition meets, i.e. whether the prize drawing deadline of the sweepstake terminates;The event for meeting condition will be pushed to In queue to be verified.Verifying node on block chain first carries out signature verification to the event, to ensure its validity;Deng mostly After number verifying node reaches common understanding to the event, intelligent contract starts successful execution, i.e. system to execute calculating by rule of getting the winning number in a bond Prize winner and executing sends prize rule that logical card is distributed to other users out, and all winning results are notified user.
S130, the effective trading situation cochain of screening.
In the present embodiment, cochain, which refers to, is recorded in block.Cochain is carried out to effective trading situation, that is, is recorded In block, it is ensured that each transaction of cochain is effectively, to avoid the black-box operation result unfairness that causes to announce the winners in a lottery just.
In one embodiment, as shown in figure 3, above-mentioned step S130 may include step S131~S133.
Whether S131, verifying trading situation are effective.
In the present embodiment, specifically check that block node that whether the trading situation actually occurs and one of passes through Signature authentication, if so, first pushing to the trading situation in queue to be verified, to carry out testing for other block nodes Card, in the case where meeting the certification of block node of setting quantity, just effective trading situation at last, can be 2/3 block node and recognizes Card passes through, and the block entity authentication for being also possible to other quantity passes through, according to depending on actual conditions;If checking the trading situation not Block node actually occur and one of is by signature authentication, then the trading situation is not effective, or when certification By block node number be unsatisfactory for sets requirement (such as accounting be 2/3) when, which is also not effective.
If it is not, then entering step S133.
S132, if so, to effective trading situation carry out cochain.
Based on the advantage of block chain decentralization, prize drawing rule is programmed by cochain by intelligent contract, prize drawing rule is transparent And credible result, lottery information will record to disclose on block chain and can inquire and can not modify.Ensure that all users are at one Under a just, fair and open, just prize drawing environment
S133, judge whether the trading situation of all records all carries out validation verification.
In the present embodiment, it needs to carry out validity to the All Activity situation recorded all in accordance with the verification process of S131 Verifying has filtered out all effective transaction cleanings.
If so, whether being less than preset time into the time for judging redemption lottery share;
If it is not, then return step S131.
S140, judge whether the time of redemption lottery share is less than preset time.
Each sweepstake is designed with deadline, and user is automatically stopped after expiring and exchanges share, according to block chain algorithm Calculate prize-winning number.Reach preset time when the time of redemption lottery share, system is automatically into the stage of announcing the winners in a lottery, that is, calculates The stage of prize-winning number.
If so, returning to the step S110.
S150, if it is not, then obtaining the last transaction of cochain;
S160, prize-winning number is calculated according to last transaction.
In one embodiment, as shown in figure 4, above-mentioned step S160 may include step S161~S162.
S161, the block height for obtaining last transaction place block.
S162, the Hash value according to corresponding to block height carry out conversion processing, to obtain prize-winning number.
In one embodiment, as shown in figure 5, above-mentioned step S162 may include step S1621~S1625.
S1621, the rear eight-digit number value for obtaining Hash value corresponding to block height;
S1622, ten's digit is converted by rear eight-digit number value, to obtain numerical value to be processed;
S1623, user is obtained using the Headquarters of the General Staff and number of logical card redemption lottery share;
S1624, by numerical value to be processed to Headquarters of the General Staff and number remainder, to obtain intermediate value;
S1625, intermediate data is added one, to obtain prize-winning number.
Prize-winning number=(the 8 conversion decimal system after last transaction hash value) % commodity Headquarters of the General Staff and number+1;It gets the winning number in a bond Number is that system calculates automatically, and when the draw times of particular commodity terminate, system will record institute after its last transaction cochain In the block height of block, while 8 are taken after the hash value of the block height, 10 binary digits is converted into, based on the commodity Headquarters of the General Staff and number carry out remainder, and obtained numerical value is prize-winning number plus 1, since the hash value of block chain is random number, nothing Method human intervention ensure that the randomness and fairness of prize-winning number.
S170, prize-winning account and non-prize-winning account are filtered out according to prize-winning number.
Prize-winning number only one, therefore the corresponding account of the prize-winning number be prize-winning account, other are non-prize-winning account Family.
S180, the logical card of distribution to non-prize-winning account.
In one embodiment, as shown in fig. 6, above-mentioned step S200 may include step S181~S182.
S181, the logical card sum for obtaining redemption lottery share;
S182, logical card sum is divided equally into non-prize-winning account.
S190, distribution prize to account of getting the winning number in a bond.
The user for possessing prize-winning number takes prize away, other all participation users (except prize winner) divide equally this prize drawing All shares that activity receives exchange logical card.
Logical card divides equally mode: after single game activity is announced the winners in a lottery, the user that Headquarters of the General Staff and logical card number are not got the winning number in a bond by this is by participation number It is distributed equally.Example: if Headquarters of the General Staff and logical card number are 1000, this prize is a mobile phone, and participations number is 201 people, then in Prize user gains an award a mobile phone, and each non-prize winner can get logical card=(1000)/(201-1)=5.
More users are attracted to participate in by the prize drawing rule of innovation, user needs the game between risk and return relationship between, also wants root Determine that the quantity of PayPal card increases the entertaining of prize drawing to meet itself expectation to drawing outcomes according to whole prize drawing situation Property.
The above-mentioned lottery industry method based on block chain is traded by using the mode of logical card redemption lottery share, and Trading situation is recorded, cochain is carried out to effective trading situation, black-box operation and substandard transaction are avoided, to upper The last transaction situation of chain carries out the processing of block height cryptographic Hash, and to obtain prize-winning number, cryptographic Hash has randomness, The randomness and fairness that lottery industry can be improved send out non-prize-winning account the logical card sum of exchange, improve the interest of lottery industry, with It realizes fair, just and disclosed lottery industry and increases the interest of lottery draw.
Fig. 7 be another embodiment of the present invention provides a kind of lottery industry method based on block chain flow diagram.Such as Fig. 7 Shown, the lottery industry method based on block chain of the present embodiment includes step S210-S320.Wherein step S240-S320 with it is above-mentioned Step S110-S190 in embodiment is similar, and details are not described herein.The following detailed description of it is increased in the present embodiment the step of S210-S230。
S210, block platform chain is established;
S220, distribute logical card on block platform chain;
On the logical card total amount of S230, record, issuing mechanism and trading situation to the public account book of block platform chain.
Block chain has distribution, can not distort, non-repudiation characteristic, participates in each side and safeguards the public account of consistency jointly This, establishes the trusting relationship based on data.Lottery industry is integrated on block platform chain and is executed, non-repudiation of trading can be made, Using the form of logical card, the enjoyment of lottery industry can be improved.
Fig. 8 is a kind of schematic block diagram of apparatus for winning prize 300 based on block chain provided in an embodiment of the present invention.Such as Fig. 8 It is shown, corresponding to based on the lottery industry method of block chain, the present invention also provides a kind of apparatus for winning prize 300 based on block chain above. The apparatus for winning prize 300 based on block chain includes the unit for executing the above-mentioned lottery industry method based on block chain, which can To be configured in server.
Specifically, referring to Fig. 8, the apparatus for winning prize 300 based on block chain includes:
First acquisition unit 304, for obtaining user using the trading situation of logical card redemption lottery share;
Recording unit 305, for recording user in block using the trading situation of logical card redemption lottery share;
Upper chain element 306, for screening effective trading situation cochain;
Judging unit 307, for judging whether the time of redemption lottery share is less than preset time;
Second acquisition unit 308, for if it is not, then obtaining the last transaction of cochain;
Number computing unit 309, for calculating prize-winning number according to last transaction;
Screening unit 310, for filtering out prize-winning account and non-prize-winning account according to prize-winning number;
First Dispatching Unit 311, for distributing logical card to non-prize-winning account;
Second Dispatching Unit 312, for distributing prize to account of getting the winning number in a bond.
In one embodiment, as shown in figure 9, the number computing unit 309 includes:
Block height obtains subelement 3091, the block height for block where obtaining last transaction;
Subelement 3092 is handled, conversion processing is carried out for the Hash value according to corresponding to block height, in obtaining Encourage number.
In one embodiment, as shown in Figure 10, the processing subelement 3092 includes:
Numerical value obtains module 30921, for obtaining the rear eight-digit number value of Hash value corresponding to block height;
Conversion module 30922, for converting ten's digit for rear eight-digit number value, to obtain numerical value to be processed;
Sum acquisition module 30923, for obtaining user using the Headquarters of the General Staff and number of logical card redemption lottery share;
Remainder module 30924 is used for numerical value to be processed to Headquarters of the General Staff and number remainder, to obtain intermediate value;
Laminating module 30925, for intermediate data to be added one, to obtain prize-winning number.
In one embodiment, as shown in figure 11, first Dispatching Unit 311 includes:
Logical card sum obtains subelement 3111, for obtaining the logical card sum of redemption lottery share;
Equal molecular cell 3112, for dividing equally logical card sum into non-prize-winning account.
In one embodiment, as shown in figure 12, the screening unit 310 includes:
Subelement 3101 is verified, it is whether effective for verifying trading situation;
Cochain subelement 3102 is used for if so, carrying out cochain to effective trading situation;
Effective judgment sub-unit 3103, for judging whether the trading situation of all records all carries out validation verification;If It is then whether to be less than preset time into the time for judging redemption lottery share;If it is not, then returning to the verifying transaction feelings Condition whether validity.
Figure 13 be another embodiment of the present invention provides a kind of apparatus for winning prize 300 based on block chain schematic block diagram. As shown in figure 13, the apparatus for winning prize 300 based on block chain of the present embodiment is to increase platform on the basis of above-described embodiment to build Vertical unit 301, logical card Dispatching Unit 302 and account book recording unit 303.
Platform establishes unit 301, for establishing block platform chain;
Logical card Dispatching Unit 302, for distributing logical card on block platform chain;
Account book recording unit 303, for recording the public affairs of logical card total amount, issuing mechanism and trading situation to block platform chain Altogether on account book.
It should be noted that it is apparent to those skilled in the art that, the above-mentioned lottery industry based on block chain The specific implementation process of device 300 and each unit, can be with reference to the corresponding description in preceding method embodiment, for the side of description Just and succinctly, details are not described herein.
A kind of above-mentioned form that can be implemented as computer program based on the apparatus for winning prize 300 of block chain, the computer journey Sequence can be run in computer equipment as shown in figure 14.
Figure 14 is please referred to, Figure 14 is a kind of schematic block diagram of computer equipment provided by the embodiments of the present application.The calculating Machine equipment 500 can be server, wherein server can be independent server, be also possible to multiple server compositions Server cluster.
Refering to fig. 14, which includes processor 502, memory and the net connected by system bus 501 Network interface 505, wherein memory may include non-volatile memory medium 503 and built-in storage 504.
The non-volatile memory medium 503 can storage program area 5031 and computer program 5032.The computer program 5032 include program instruction, which is performed, and processor 502 may make to execute a kind of lottery industry side based on block chain Method.
The processor 502 is for providing calculating and control ability, to support the operation of entire computer equipment 500.
The built-in storage 504 provides environment for the operation of the computer program 5032 in non-volatile memory medium 503, should When computer program 5032 is executed by processor 502, processor 502 may make to execute a kind of lottery industry method based on block chain.
The network interface 505 is used to carry out network communication with other equipment.It will be understood by those skilled in the art that in Figure 14 The structure shown, only the block diagram of part-structure relevant to application scheme, does not constitute and is applied to application scheme The restriction of computer equipment 500 thereon, specific computer equipment 500 may include more more or fewer than as shown in the figure Component perhaps combines certain components or with different component layouts.
Wherein, the processor 502 is for running computer program 5032 stored in memory, to realize following step It is rapid:
User is obtained using the trading situation of logical card redemption lottery share;
User is recorded in block using the trading situation of logical card redemption lottery share;
Screen effective trading situation cochain;
Judge whether the time of redemption lottery share is less than preset time;
If it is not, then obtaining the last transaction of cochain;
Prize-winning number is calculated according to last transaction;
Prize-winning account and non-prize-winning account are filtered out according to prize-winning number;
Distribution is logical to be demonstrate,proved to non-prize-winning account;
Distribute prize to account of getting the winning number in a bond.
In one embodiment, processor 502 is when realizing the calculating prize-winning number step according to last transaction, tool Body realizes following steps:
The block height of block where obtaining last transaction;
Conversion processing is carried out according to Hash value corresponding to block height, to obtain prize-winning number.
In one embodiment, processor 502 is realizing that the Hash value according to corresponding to block height is converted Processing, when obtaining prize-winning number step, is implemented as follows step:
Obtain the rear eight-digit number value of Hash value corresponding to block height;
Ten's digit is converted by rear eight-digit number value, to obtain numerical value to be processed;
User is obtained using the Headquarters of the General Staff and number of logical card redemption lottery share;
By numerical value to be processed to Headquarters of the General Staff and number remainder, to obtain intermediate value;
Intermediate data is added one, to obtain prize-winning number.
In one embodiment, for processor 502 when realizing the logical card of the distribution to non-prize-winning account step, specific implementation is such as Lower step:
Obtain the logical card sum of redemption lottery share;
Logical card sum is divided equally into non-prize-winning account.
In one embodiment, processor 502 is when realizing the effective trading situation cochain step of the screening, specific implementation Following steps:
Whether effective verify trading situation;
If so, carrying out cochain to effective trading situation;
Judge whether the trading situation of all records all carries out validation verification;
If so, whether being less than preset time into the time for judging redemption lottery share;
If it is not, then return the verifying trading situation whether validity.
In one embodiment, processor 502 is realizing the transaction feelings for obtaining user and using logical card redemption lottery share Before condition step, following steps are also realized:
Establish block platform chain;
Distribute logical card on block platform chain;
On the logical card total amount of record, issuing mechanism and trading situation to the public account book of block platform chain.
It should be appreciated that in the embodiment of the present application, processor 502 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..Wherein, general processor can be microprocessor or Person's processor is also possible to any conventional processor etc..
Those of ordinary skill in the art will appreciate that be realize above-described embodiment method in all or part of the process, It is that relevant hardware can be instructed to complete by computer program.The computer program includes program instruction, computer journey Sequence can be stored in a storage medium, which is computer readable storage medium.The program instruction is by the department of computer science At least one processor in system executes, to realize the process step of the embodiment of the above method.
Therefore, the present invention also provides a kind of storage mediums.The storage medium can be computer readable storage medium.This is deposited Storage media is stored with computer program, and processor is made to execute following steps when wherein the computer program is executed by processor:
User is obtained using the trading situation of logical card redemption lottery share;
User is recorded in block using the trading situation of logical card redemption lottery share;
Screen effective trading situation cochain;
Judge whether the time of redemption lottery share is less than preset time;
If it is not, then obtaining the last transaction of cochain;
Prize-winning number is calculated according to last transaction;
Prize-winning account and non-prize-winning account are filtered out according to prize-winning number;
Distribution is logical to be demonstrate,proved to non-prize-winning account;
Distribute prize to account of getting the winning number in a bond.
In one embodiment, the processor is realized described according to last transaction in the execution computer program When calculating prize-winning number step, it is implemented as follows step:
The block height of block where obtaining last transaction;
Conversion processing is carried out according to Hash value corresponding to block height, to obtain prize-winning number.
In one embodiment, the processor is realized described right according to block height institute in the execution computer program The Hash value answered carries out conversion processing and is implemented as follows step when obtaining prize-winning number step:
Obtain the rear eight-digit number value of Hash value corresponding to block height;
Ten's digit is converted by rear eight-digit number value, to obtain numerical value to be processed;
User is obtained using the Headquarters of the General Staff and number of logical card redemption lottery share;
By numerical value to be processed to Headquarters of the General Staff and number remainder, to obtain intermediate value;
Intermediate data is added one, to obtain prize-winning number.
In one embodiment, the processor realizes the logical card of the distribution to non-prize-winning executing the computer program When account step, it is implemented as follows step:
Obtain the logical card sum of redemption lottery share;
Logical card sum is divided equally into non-prize-winning account.
In one embodiment, the processor realizes the effective transaction feelings of the screening executing the computer program When condition cochain step, it is implemented as follows step:
Whether effective verify trading situation;
If so, carrying out cochain to effective trading situation;
Judge whether the trading situation of all records all carries out validation verification;
If so, whether being less than preset time into the time for judging redemption lottery share;
If it is not, then return the verifying trading situation whether validity.
In one embodiment, the processor realizes the acquisition user using logical card executing the computer program Before the trading situation step of redemption lottery share, following steps are also realized:
Establish block platform chain;
Distribute logical card on block platform chain;
On the logical card total amount of record, issuing mechanism and trading situation to the public account book of block platform chain.
The storage medium can be USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), magnetic disk Or the various computer readable storage mediums that can store program code such as CD.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not It is considered as beyond the scope of this invention.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary.For example, the division of each unit, only Only a kind of logical function partition, there may be another division manner in actual implementation.Such as multiple units or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.
The steps in the embodiment of the present invention can be sequentially adjusted, merged and deleted according to actual needs.This hair Unit in bright embodiment device can be combined, divided and deleted according to actual needs.In addition, in each implementation of the present invention Each functional unit in example can integrate in one processing unit, is also possible to each unit and physically exists alone, can also be with It is that two or more units are integrated in one unit.
If the integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product, It can store in one storage medium.Based on this understanding, technical solution of the present invention is substantially in other words to existing skill The all or part of part or the technical solution that art contributes can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, terminal or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right It is required that protection scope subject to.

Claims (10)

1. the lottery industry method based on block chain characterized by comprising
User is obtained using the trading situation of logical card redemption lottery share;
User is recorded in block using the trading situation of logical card redemption lottery share;
Screen effective trading situation cochain;
Judge whether the time of redemption lottery share is less than preset time;
If it is not, then obtaining the last transaction of cochain;
Prize-winning number is calculated according to last transaction;
Prize-winning account and non-prize-winning account are filtered out according to prize-winning number;
Distribution is logical to be demonstrate,proved to non-prize-winning account;
Distribute prize to account of getting the winning number in a bond.
2. the lottery industry method according to claim 1 based on block chain, which is characterized in that described according to last transaction Calculate prize-winning number, comprising:
The block height of block where obtaining last transaction;
Conversion processing is carried out according to Hash value corresponding to block height, to obtain prize-winning number.
3. the lottery industry method according to claim 2 based on block chain, which is characterized in that described right according to block height institute The Hash value answered carries out conversion processing, to obtain prize-winning number, comprising:
Obtain the rear eight-digit number value of Hash value corresponding to block height;
Ten's digit is converted by rear eight-digit number value, to obtain numerical value to be processed;
User is obtained using the Headquarters of the General Staff and number of logical card redemption lottery share;
By numerical value to be processed to Headquarters of the General Staff and number remainder, to obtain intermediate value;
Intermediate data is added one, to obtain prize-winning number.
4. the lottery industry method according to claim 3 based on block chain, which is characterized in that the logical card of distribution to non-prize-winning Account, comprising:
Obtain the logical card sum of redemption lottery share;
Logical card sum is divided equally into non-prize-winning account.
5. the lottery industry method according to claim 1 based on block chain, which is characterized in that the effective transaction feelings of screening Condition cochain, comprising:
Whether effective verify trading situation;
If so, carrying out cochain to effective trading situation;
Judge whether the trading situation of all records all carries out validation verification;
If so, whether being less than preset time into the time for judging redemption lottery share;
If it is not, then return the verifying trading situation whether validity.
6. the lottery industry method according to any one of claims 1 to 5 based on block chain, which is characterized in that the acquisition is used Before trading situation of the family using logical card redemption lottery share, further includes:
Establish block platform chain;
Distribute logical card on block platform chain;
On the logical card total amount of record, issuing mechanism and trading situation to the public account book of block platform chain.
7. the apparatus for winning prize based on block chain characterized by comprising
First acquisition unit, for obtaining user using the trading situation of logical card redemption lottery share;
Recording unit, for recording user in block using the trading situation of logical card redemption lottery share;
Upper chain element, for screening effective trading situation cochain;
Judging unit, for judging whether the time of redemption lottery share is less than preset time;
Second acquisition unit, for if it is not, then obtaining the last transaction of cochain;
Number computing unit, for calculating prize-winning number according to last transaction;
Screening unit, for filtering out prize-winning account and non-prize-winning account according to prize-winning number;
First Dispatching Unit, for distributing logical card to non-prize-winning account;
Second Dispatching Unit, for distributing prize to account of getting the winning number in a bond.
8. the lottery industry method according to claim 7 based on block chain, which is characterized in that the number computing unit packet It includes:
Block height obtains subelement, the block height for block where obtaining last transaction;
Subelement is handled, conversion processing is carried out for the Hash value according to corresponding to block height, to obtain prize-winning number.
9. a kind of computer equipment, which is characterized in that the computer equipment includes memory and processor, on the memory It is stored with computer program, the processor is realized as described in any one of claims 1 to 6 when executing the computer program Method.
10. a kind of storage medium, which is characterized in that the storage medium is stored with computer program, the computer program quilt Processor can be realized when executing such as method described in any one of claims 1 to 6.
CN201811214671.2A 2018-10-18 2018-10-18 Lottery industry method, apparatus, computer equipment and storage medium based on block chain Pending CN109389399A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811214671.2A CN109389399A (en) 2018-10-18 2018-10-18 Lottery industry method, apparatus, computer equipment and storage medium based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811214671.2A CN109389399A (en) 2018-10-18 2018-10-18 Lottery industry method, apparatus, computer equipment and storage medium based on block chain

Publications (1)

Publication Number Publication Date
CN109389399A true CN109389399A (en) 2019-02-26

Family

ID=65426956

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811214671.2A Pending CN109389399A (en) 2018-10-18 2018-10-18 Lottery industry method, apparatus, computer equipment and storage medium based on block chain

Country Status (1)

Country Link
CN (1) CN109389399A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110084651A (en) * 2019-05-07 2019-08-02 百度在线网络技术(北京)有限公司 A kind of lottery drawing method based on block chain, device and terminal
CN110223439A (en) * 2019-06-13 2019-09-10 北京艾摩瑞策科技有限公司 A kind of random number of shaking method and device of application block chain
CN110223437A (en) * 2019-06-13 2019-09-10 北京艾摩瑞策科技有限公司 A kind of lottery ticket based on block chain is extra-large method and apparatus
CN110633983A (en) * 2019-09-05 2019-12-31 腾讯科技(深圳)有限公司 Target event execution method and device based on block chain
CN110648472A (en) * 2019-08-08 2020-01-03 杭州复杂美科技有限公司 Method, apparatus and storage medium for ensuring game fairness
CN110958317A (en) * 2019-11-29 2020-04-03 腾讯科技(深圳)有限公司 Data processing method and equipment
CN110968442A (en) * 2019-11-29 2020-04-07 腾讯科技(深圳)有限公司 Data processing method and equipment
CN111008863A (en) * 2019-11-28 2020-04-14 湖南天河国云科技有限公司 Lottery drawing method and system based on block chain
CN111009068A (en) * 2019-12-18 2020-04-14 中体彩科技发展有限公司 Lottery drawing number generation method and system based on block chain
CN111353778A (en) * 2020-01-09 2020-06-30 广东南方新媒体股份有限公司 Block chain television lottery system
CN111429186A (en) * 2020-04-08 2020-07-17 杭州左链科技有限公司 Fancy carp lottery incentive method, equipment and storage medium
CN112734455A (en) * 2019-10-29 2021-04-30 腾讯科技(深圳)有限公司 Prize exchanging result generating method, device and equipment and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105913174A (en) * 2016-04-07 2016-08-31 彭军红 Lottery issuing method based on block chains
CN106504174A (en) * 2016-09-27 2017-03-15 布比(北京)网络技术有限公司 Lottery industry publishing system and device based on block chain
CN107679149A (en) * 2017-09-26 2018-02-09 武汉斗鱼网络科技有限公司 A kind of data processing method and server
CN107742352A (en) * 2017-09-20 2018-02-27 黄玉宇 Decentralization lot/queuing strategy and system based on block chain and intelligent contract
CN108038954A (en) * 2017-12-01 2018-05-15 中国联合网络通信集团有限公司 Transaction operation method and digging ore deposit node based on block chain
CN108269090A (en) * 2018-01-19 2018-07-10 中国科学院软件研究所 Based on the common recognition method and apparatus for block catenary system drawn lots at random without negotiation
CN108447014A (en) * 2018-03-19 2018-08-24 成都零光量子科技有限公司 A kind of block chain lottery industry method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105913174A (en) * 2016-04-07 2016-08-31 彭军红 Lottery issuing method based on block chains
CN106504174A (en) * 2016-09-27 2017-03-15 布比(北京)网络技术有限公司 Lottery industry publishing system and device based on block chain
CN107742352A (en) * 2017-09-20 2018-02-27 黄玉宇 Decentralization lot/queuing strategy and system based on block chain and intelligent contract
CN107679149A (en) * 2017-09-26 2018-02-09 武汉斗鱼网络科技有限公司 A kind of data processing method and server
CN108038954A (en) * 2017-12-01 2018-05-15 中国联合网络通信集团有限公司 Transaction operation method and digging ore deposit node based on block chain
CN108269090A (en) * 2018-01-19 2018-07-10 中国科学院软件研究所 Based on the common recognition method and apparatus for block catenary system drawn lots at random without negotiation
CN108447014A (en) * 2018-03-19 2018-08-24 成都零光量子科技有限公司 A kind of block chain lottery industry method and system

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110084651A (en) * 2019-05-07 2019-08-02 百度在线网络技术(北京)有限公司 A kind of lottery drawing method based on block chain, device and terminal
CN110223437B (en) * 2019-06-13 2020-09-25 北京瑞策科技有限公司 Lottery number issuing method and device based on block chain
CN110223439A (en) * 2019-06-13 2019-09-10 北京艾摩瑞策科技有限公司 A kind of random number of shaking method and device of application block chain
CN110223437A (en) * 2019-06-13 2019-09-10 北京艾摩瑞策科技有限公司 A kind of lottery ticket based on block chain is extra-large method and apparatus
CN110223439B (en) * 2019-06-13 2020-10-02 北京瑞策科技有限公司 Random number shaking method and device for application block chain
CN110648472A (en) * 2019-08-08 2020-01-03 杭州复杂美科技有限公司 Method, apparatus and storage medium for ensuring game fairness
CN110633983A (en) * 2019-09-05 2019-12-31 腾讯科技(深圳)有限公司 Target event execution method and device based on block chain
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
CN111008863A (en) * 2019-11-28 2020-04-14 湖南天河国云科技有限公司 Lottery drawing method and system based on block chain
CN111008863B (en) * 2019-11-28 2023-09-05 湖南天河国云科技有限公司 Lottery drawing method and system based on block chain
CN110968442A (en) * 2019-11-29 2020-04-07 腾讯科技(深圳)有限公司 Data processing method and equipment
CN110958317A (en) * 2019-11-29 2020-04-03 腾讯科技(深圳)有限公司 Data processing method and equipment
CN111009068A (en) * 2019-12-18 2020-04-14 中体彩科技发展有限公司 Lottery drawing number generation method and system based on block chain
CN111353778A (en) * 2020-01-09 2020-06-30 广东南方新媒体股份有限公司 Block chain television lottery system
CN111429186A (en) * 2020-04-08 2020-07-17 杭州左链科技有限公司 Fancy carp lottery incentive method, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109389399A (en) Lottery industry method, apparatus, computer equipment and storage medium based on block chain
CN109360091B (en) Random object selection method and device based on block chain
US20190287100A1 (en) Method for managing token based on heterogeneous blockchain networks, and token management server using the same
KR102250810B1 (en) Blockchain system with consensus algorithm based on proof-of -transaction and method there of
CN107742352A (en) Decentralization lot/queuing strategy and system based on block chain and intelligent contract
TW202013272A (en) A method and apparatus for allocating virtual resources
KR20190110377A (en) Method for managing token based on heterogeneous blockchains, and token management server using the same
JP6923835B1 (en) Information processing equipment, information processing methods and programs
CN110458612A (en) A kind of information processing method and Related product
George et al. A smart contract oracle for approximating real-world, real number values
US20190370925A1 (en) Decentralized Esports Gaming Token and Wallet
CN113362067B (en) Asynchronous consensus-based electric power transaction matching method and system
KR102051372B1 (en) Block Chain based Event Drawing Method
CN110490590A (en) Activation record querying method, device, equipment and storage medium based on block chain
CN109587244A (en) Cloud data in mobile phone processing method, device, computer readable storage medium and electronic equipment
Clark et al. Research perspectives and challenges for bitcoin and cryptocurrencies
JP2023115165A (en) Information processing device and program
JP2004530479A (en) Computer game method and system
CN109947693A (en) Publish in instalments exchange method, device, server and the storage medium of works
CN112308563B (en) Guest-obtaining data processing method and node
CN109767250A (en) It is a kind of to determine the method, apparatus hit target and electronic equipment in probability event
KR20190113162A (en) Method for managing token based on heterogeneous blockchains, and token management server using the same
CN110992021A (en) Intelligent contract-based fund management method, device and equipment
CN112764714B (en) Self-excitation random number generation method based on intelligent contract and terminal equipment
CN112801292A (en) Neural network training method and system based on block chain intelligent contract

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: 20190226

RJ01 Rejection of invention patent application after publication