Movatterモバイル変換


[0]ホーム

URL:


CN110223436B - Lottery random number issuing method and device applying block chain - Google Patents

Lottery random number issuing method and device applying block chain
Download PDF

Info

Publication number
CN110223436B
CN110223436BCN201910509048.8ACN201910509048ACN110223436BCN 110223436 BCN110223436 BCN 110223436BCN 201910509048 ACN201910509048 ACN 201910509048ACN 110223436 BCN110223436 BCN 110223436B
Authority
CN
China
Prior art keywords
lottery
hash value
transfer
remainder
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910509048.8A
Other languages
Chinese (zh)
Other versions
CN110223436A (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.)
Beijing Ruice Technology Co Ltd
Original Assignee
Beijing Ruice 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 Beijing Ruice Technology Co LtdfiledCriticalBeijing Ruice Technology Co Ltd
Priority to CN201910509048.8ApriorityCriticalpatent/CN110223436B/en
Publication of CN110223436ApublicationCriticalpatent/CN110223436A/en
Application grantedgrantedCritical
Publication of CN110223436BpublicationCriticalpatent/CN110223436B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The invention discloses a lottery random number-giving method and equipment applying a block chain, which comprises the following steps: the lottery client initiates a transfer request on the block chain, wherein the transfer request comprises: an initiator address, a receiver address, and a transfer amount; the transfer request is used as a lottery number; the lottery client performs Hash operation on the transfer request to obtain a first Hash value; the lottery client acquires the number n of transfer strokes in a block corresponding to the lottery client currently; the lottery client divides the first hash value by the number n of the transfer strokes to obtain a corresponding first remainder m; the lottery client side obtains the mth transfer account in the block corresponding to the lottery client side currently, and carries out Hash operation on the mth transfer account to obtain a second Hash value; the lottery client divides the second hash value by a preset integer to obtain a corresponding second remainder; the second remainder is the number of the lottery; the preset integer determines the numerical value change interval of the lottery number. The invention ensures the randomness, the openness, the credibility and the verifiability of the lottery number issuing process.

Description

Lottery random number issuing method and device applying block chain
Technical Field
The invention relates to the technical field of combination of a block chain and lottery ticket number issuing, in particular to a lottery ticket random number issuing method and equipment applying the block chain.
Background
Lottery numbers may be provided in lottery markets around the world with mechanical shake or random number generators to draw the lottery. The mechanical shaking needs manpower and a mechanical device, and the working condition and the manpower of the mechanical device can influence the randomness of lottery number issuing. The random number generator is opaque in the process of recording the prize, so that the situation that a specific ticket number is generated according to a statistical result may exist, the possibility that data is tampered by insiders or hackers cannot be avoided, and the problems of no disclosure and no credibility exist.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. The consensus mechanism is a mathematical algorithm for establishing trust and obtaining rights and interests among different nodes in a blockchain system. The blockchain is the underlying technology of bitcoin, like a database ledger, which records all transaction records. The system is characterized in that a plurality of nodes are arranged at different parts of the world, and each node maintains a set of same databases. The data is maliciously tampered and difficult to tamper, and the data loss is extremely rare, so that a platform which is fair and transparent and solves the trust crisis is realized.
Disclosure of Invention
Aiming at the defects of the prior art, the invention aims to solve the technical problems that the number output result of the prior lottery ticket is possibly not random, and the number output process is not transparent, so that the lottery ticket is not public and is not credible.
In order to achieve the above object, in a first aspect, the present invention provides a lottery random number issuing method using a block chain, including the following steps:
the lottery client initiates a transfer request on the block chain, wherein the transfer request comprises: an initiator address, a receiver address, and a transfer amount; the transfer request is used as a lottery number;
the lottery client performs hash operation on the transfer request to obtain a first hash value;
the lottery client side obtains the number n of transfer strokes in a block corresponding to the lottery client side currently; n is a positive integer;
the lottery client divides the first hash value by the number n of the transfer strokes to obtain a corresponding first remainder m; m is a positive integer less than n;
the lottery client side obtains the mth transfer account in the block corresponding to the lottery client side currently, and carries out Hash operation on the mth transfer account to obtain a second Hash value;
the lottery client divides the second hash value by a preset integer to obtain a corresponding second remainder; the second remainder is the number of the lottery; the preset integer determines the numerical value change interval of the lottery number.
Specifically, the transfer request is sent to the lottery client, and the receiver may be other nodes in the blockchain or the lottery client itself.
Optionally, the first hash value is hexadecimal data;
the lottery client divides the first hash value by the number n of the transfer strokes to obtain a corresponding first remainder m, and the method specifically comprises the following steps:
the lottery client converts the first hash value into corresponding decimal data;
and the lottery client divides the first hash value converted into decimal data by the number n of the transfer strokes to obtain a corresponding first remainder m.
Optionally, the second hash value is hexadecimal data;
the lottery client divides the second hash value by a preset integer to obtain a corresponding second remainder, and the method specifically comprises the following steps:
the lottery client converts the second hash value into corresponding decimal data;
and the lottery client divides the second hash value converted into decimal data by a preset integer to obtain a corresponding second remainder.
Optionally, when the preset integer is 10, the lottery number is changed within a range of 0-9.
Optionally, when the preset integer is 100, the lottery number is changed within a range of 00-99, and if the second remainder is less than 10, the tens of the lottery number is output after being zero-padded.
In a second aspect, the present invention provides a lottery random number issuing apparatus using a block chain, comprising:
the lottery number issuing initiating unit is used for initiating a transfer request on the block chain, and the transfer request comprises: an initiator address, a receiver address, and a transfer amount; the transfer request is used as a lottery number;
the first hash operation unit is used for carrying out hash operation on the transfer request to obtain a first hash value;
the transfer information acquisition unit is used for acquiring the number n of transfer notes in the current corresponding block; n is a positive integer;
a first remainder determining unit, configured to divide the first hash value by the number n of transfer strokes to obtain a corresponding first remainder m; m is a positive integer less than n;
the transfer information acquisition unit is used for acquiring the mth transfer in the current corresponding block;
the second hash operation unit is used for carrying out hash operation on the mth transfer to obtain a second hash value;
the lottery number output unit is used for dividing the second hash value by a preset integer to obtain a corresponding second remainder; the second remainder is the number of the lottery; the preset integer determines the numerical value change interval of the lottery number.
It is understood that the lottery random number issuing device to which the blockchain is applied may be a lottery client or other lottery devices.
Optionally, the first hash value is hexadecimal data; the first remainder determining unit converts the first hash value into corresponding decimal data; and dividing the first hash value converted into decimal data by the transfer stroke number n to obtain a corresponding first remainder m.
Optionally, the second hash value is hexadecimal data; the lottery number issuing unit converts the second hash value into corresponding decimal data; and dividing the second hash value converted into the decimal data by a preset integer to obtain a corresponding second remainder.
Optionally, when the preset integer is 10, the lottery number is changed within a range of 0-9.
Optionally, when the preset integer is 100, the lottery number is changed within a range of 00-99, and if the second remainder is less than 10, the tens of the lottery number is output after being zero-padded.
Generally, compared with the prior art, the above technical solution conceived by the present invention has the following beneficial effects:
the invention provides a lottery random number issuing method and equipment applying a block chain. And finally, the remainder is obtained by dividing the result of the two random hash operations into a whole number to obtain the final lottery number, so that the randomness of the lottery number issuing process is ensured.
The invention provides a lottery random number issuing method and equipment applying a block chain. In addition, data in the block chain can be found, so that the lottery number issuing process can be supervised by the public, the lottery number issuing process based on the block chain is guaranteed to be open, reliable and searchable, and the block chain lottery number issuing method has a good application prospect.
Drawings
Fig. 1 is a flow chart of a lottery random number issuing method using a block chain according to the present invention;
fig. 2 is a lottery random number issuing equipment architecture diagram of the application block chain provided by the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Fig. 1 is a flow chart of a lottery random number issuing method using a block chain according to the present invention; as shown in fig. 1, the method comprises the following steps:
s101, the lottery client initiates a transfer request on the block chain, wherein the transfer request comprises: an initiator address, a receiver address, and a transfer amount; the transfer request is used as a lottery number;
s102, the lottery client performs hash operation on the transfer request to obtain a first hash value;
s103, the lottery client acquires the number n of transfer strokes in the block corresponding to the lottery client at present; n is a positive integer;
s104, dividing the first hash value by the number n of the transfer strokes by the lottery client to obtain a corresponding first remainder m; m is a positive integer less than n;
s105, the lottery client side obtains the mth transfer account in the block corresponding to the lottery client side at present, and carries out Hash operation on the mth transfer account to obtain a second Hash value;
s106, the lottery client divides the second hash value by a preset integer to obtain a corresponding second remainder; the second remainder is the number of the lottery; the preset integer determines the numerical value change interval of the lottery number.
Optionally, the first hash value is hexadecimal data;
the lottery client divides the first hash value by the number n of the transfer strokes to obtain a corresponding first remainder m, and the method specifically comprises the following steps:
the lottery client converts the first hash value into corresponding decimal data;
and the lottery client divides the first hash value converted into decimal data by the number n of the transfer strokes to obtain a corresponding first remainder m.
Optionally, the second hash value is hexadecimal data;
the lottery client divides the second hash value by a preset integer to obtain a corresponding second remainder, and the method specifically comprises the following steps:
the lottery client converts the second hash value into corresponding decimal data;
and the lottery client divides the second hash value converted into decimal data by a preset integer to obtain a corresponding second remainder.
Optionally, when the preset integer is 10, the lottery number is changed within a range of 0-9.
Optionally, when the preset integer is 100, the lottery number is changed within a range of 00-99, and if the second remainder is less than 10, the tens of the lottery number is output after being zero-padded.
Specifically, when the preset integer is 10, a lottery number issuing operation is performed once, and a number which changes within the range of 0-9 is output. When the preset integer is 100, carrying out lottery number output operation once, and outputting numbers with two digits changing in the range of 00-99. It should be noted that, in the lottery number issuing scheme provided by the present invention, the preset integer may be set according to actual needs. Not limited to only 10 or 100. For example, if the predetermined integer is 8, the output random lottery number will vary from 0 to 7. The preset integer can be 50, and the output random lottery number can be changed within the range of 00-49, and the like. The preset integer can be selected by those skilled in the art according to actual needs to meet the requirement of the variation range interval of the corresponding lottery number. The invention is not limited in any way.
It is understood that if a lottery number of 8 is required, the preset integer may be set to 10, and a lottery number of one digit is issued each time, and 8 lottery issuing operations are performed, so as to finally obtain an 8-digit lottery number. Or setting the preset integer as 100, and issuing a lottery number with two digits each time, and issuing the lottery number 4 times to finally obtain a lottery number with 8 digits.
If a 7-digit lottery number needs to be issued, the preset integer is set to 10, a one-digit lottery number is issued each time, 7 times of lottery issuing are carried out, and finally a 7-digit lottery number is obtained. Or the preset integer is set as 100, a two-digit lottery number is played each time, 3 times of lottery number playing is carried out, then the preset integer is set as 10, one time of lottery number playing is carried out, and finally a 7-digit lottery number is obtained through accumulation.
Fig. 2 is a lottery random number issuing equipment architecture diagram applying a block chain provided by the present invention, as shown in fig. 2, including the following units:
a lottery number issuing initiatingunit 201, configured to initiate a transfer request on the blockchain, where the transfer request includes: an initiator address, a receiver address, and a transfer amount; the transfer request is used as a lottery number;
a firsthash operation unit 201, configured to perform a hash operation on the transfer request to obtain a first hash value;
the transferinformation acquisition unit 203 is used for acquiring the number n of transfer notes in the current corresponding block; n is a positive integer;
a firstremainder determining unit 204, configured to divide the first hash value by the number n of transfer strokes to obtain a corresponding first remainder m; m is a positive integer less than n;
the transferinformation acquisition unit 203 is used for acquiring the mth transfer in the current corresponding block;
a secondhash operation unit 205, configured to perform a hash operation on the mth transfer to obtain a second hash value;
a lotterynumber issuing unit 206, configured to divide the second hash value by a preset integer to obtain a corresponding second remainder; the second remainder is the number of the lottery; the preset integer determines the numerical value change interval of the lottery number.
Optionally, the first hash value is hexadecimal data; the firstremainder determination unit 204 converts the first hash value into corresponding decimal data; and dividing the first hash value converted into decimal data by the transfer stroke number n to obtain a corresponding first remainder m.
Optionally, the second hash value is hexadecimal data; thelottery drawing unit 206 converts the second hash value into corresponding decimal data; and dividing the second hash value converted into the decimal data by a preset integer to obtain a corresponding second remainder.
Optionally, when the preset integer is 10, the lottery number is changed within a range of 0-9.
Optionally, when the preset integer is 100, the lottery number is changed within a range of 00-99, and if the second remainder is less than 10, the tens of the lottery number is output after being zero-padded.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (8)

CN201910509048.8A2019-06-132019-06-13Lottery random number issuing method and device applying block chainActiveCN110223436B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910509048.8ACN110223436B (en)2019-06-132019-06-13Lottery random number issuing method and device applying block chain

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910509048.8ACN110223436B (en)2019-06-132019-06-13Lottery random number issuing method and device applying block chain

Publications (2)

Publication NumberPublication Date
CN110223436A CN110223436A (en)2019-09-10
CN110223436Btrue CN110223436B (en)2020-12-25

Family

ID=67816824

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910509048.8AActiveCN110223436B (en)2019-06-132019-06-13Lottery random number issuing method and device applying block chain

Country Status (1)

CountryLink
CN (1)CN110223436B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110601819B (en)*2019-09-262023-02-14腾讯科技(深圳)有限公司Processing method for random number, block chain link point device and storage medium
CN111009068B (en)*2019-12-182021-09-17中体彩科技发展有限公司Lottery drawing number generation method and system based on block chain

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105913174A (en)*2016-04-072016-08-31彭军红Lottery issuing method based on block chains
CN106980488A (en)*2017-03-142017-07-25腾讯科技(深圳)有限公司Random digit generation method and device
CN107103097A (en)*2017-05-222017-08-29中链科技有限公司Drawing method and terminal device based on block chain technology
CN107566124A (en)*2017-08-242018-01-09深圳市易成自动驾驶技术有限公司Common recognition method for building up, block catenary system and storage medium based on lottery mechanism
CN109377225A (en)*2018-10-302019-02-22杭州复杂美科技有限公司Transaction allocation method, common recognition method, equipment and storage medium
WO2019075234A1 (en)*2017-10-122019-04-18Rivetz Corp.Attestation with embedded encryption keys

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US10795658B2 (en)*2017-03-202020-10-06Fujitsu LimitedUpdatable random functions
GB2563221A (en)*2017-06-052018-12-12Sigmacorp OueRandom number generator
CN108831002B (en)*2018-07-062021-06-01电子科技大学 A blockchain-based welfare lottery fair draw method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105913174A (en)*2016-04-072016-08-31彭军红Lottery issuing method based on block chains
CN106980488A (en)*2017-03-142017-07-25腾讯科技(深圳)有限公司Random digit generation method and device
CN107103097A (en)*2017-05-222017-08-29中链科技有限公司Drawing method and terminal device based on block chain technology
CN107566124A (en)*2017-08-242018-01-09深圳市易成自动驾驶技术有限公司Common recognition method for building up, block catenary system and storage medium based on lottery mechanism
WO2019075234A1 (en)*2017-10-122019-04-18Rivetz Corp.Attestation with embedded encryption keys
CN109377225A (en)*2018-10-302019-02-22杭州复杂美科技有限公司Transaction allocation method, common recognition method, equipment and storage medium

Also Published As

Publication numberPublication date
CN110223436A (en)2019-09-10

Similar Documents

PublicationPublication DateTitle
CN110868440B (en) Blockchain public chain
CN110164022B (en)Random number shaking method on block chain and equipment thereof
CN111901327B (en)Cloud network vulnerability mining method and device, electronic equipment and medium
CN105162760B (en)Randomly select method, apparatus and system
CN110223440B (en)Random number shaking method and equipment for application block chain
CN107103097A (en)Drawing method and terminal device based on block chain technology
CN110968644B (en) A data processing method and device
TW202016813A (en)Object selection method and device, and electronic equipment
CN110223436B (en)Lottery random number issuing method and device applying block chain
CN105976248A (en)Crowd funding lotting method and system
CN110164021B (en)A kind of random lottery drawing method and equipment of application block chain
CN112487253A (en)User invitation code generation method, verification method, device, equipment and storage medium
CN111612458A (en) Method, device and readable storage medium for blockchain data processing
CN114697132A (en)Method, device, equipment and storage medium for intercepting repeated access request attack
CN110223437B (en)Lottery number issuing method and device based on block chain
CN112215424A (en)Medical index prediction method, device, electronic equipment and storage medium
CN110223438B (en)Lottery random number issuing method and device applying block chain
CN110189465B (en)Random lottery method and equipment by means of block chain
CN113378224B (en)Medical image storage method, device, equipment and storage medium
WO2023023959A1 (en)Digital certificate revocation
CN110784315B (en)Block chain-based number shaking method and device, computer equipment and storage medium
CN113918517A (en)Multi-type file centralized management method, device, equipment and storage medium
CN118500378A (en)Vehicle-cloud combined map updating system
CN112446781A (en)Wind control data generation method, device, equipment and computer readable storage medium
CN110223439B (en)Random number shaking method and device for application block chain

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
CB02Change of applicant information
CB02Change of applicant information

Address after:100085 No. 108, 1st Floor, No. 9, Shangdi Jiujie, Haidian District, Beijing

Applicant after:Beijing ruice Technology Co.,Ltd.

Address before:100085 No. 108, 1st Floor, No. 9, Shangdi Jiujie, Haidian District, Beijing

Applicant before:BEIJING AIMORECE TECHNOLOGY Co.,Ltd.

SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp