CN103854351A - Lottery drawing method - Google Patents

Lottery drawing method Download PDF

Info

Publication number
CN103854351A
CN103854351A CN201210506560.5A CN201210506560A CN103854351A CN 103854351 A CN103854351 A CN 103854351A CN 201210506560 A CN201210506560 A CN 201210506560A CN 103854351 A CN103854351 A CN 103854351A
Authority
CN
China
Prior art keywords
prize
winning
variable
lottery
winning number
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
CN201210506560.5A
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.)
Mitac International Corp
Original Assignee
Mitac International Corp
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 Mitac International Corp filed Critical Mitac International Corp
Priority to CN201210506560.5A priority Critical patent/CN103854351A/en
Publication of CN103854351A publication Critical patent/CN103854351A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A provided lottery drawing method comprises the following steps: providing an initial lottery drawing scope, a prizewinning number and a candidate number; according to the initial lottery drawing scope, generating a to-be drawn variate for recording the drawing information in a largest scope; creating a prizewinning variate, a randomized number variate and a prizewinning number variate; generating a randomized number for the randomized number variate, fetching corresponding prizewinning information from the to-be drawn variate according to the randomized number variate; storing the prizewinning information in the prizewinning variate according to time sequence; adding 1 to the prizewinning number variate, and deleting the prizewinning information from the to-be drawn variate; and cycling the lottery drawing process until the prizewinning number variate is equal to the sum of the prizewinning number and the candidate number. By arranging the prizewinning number and the candidate number and storing the prizewinning information according to time sequence, if the drawn prizewinning information is cancelled, lottery can be drawn from the candidate number, and another-time lottery drawing is not needed, so that the lottery drawing flow is simplified.

Description

Lottery drawing method
 
[technical field]
The present invention relates to a kind of lottery drawing method, particularly a kind of lottery drawing method of simplifying prize drawing process.
[background technology]
In the time realizing prize drawing algorithm, start to adopt: according to prize drawing scope with need prize-winning number, recycle random device and obtain random number, each random number is all recorded, and the random number of record relatively, the random number obtaining before must being different from, could continue, until need the number of prize-winning number to be acquired.The shortcoming of this method is: when need prize-winning number with when prize drawing scope is very approaching or prize drawing scope is very little, random number is obtained in circulation can obtain the random number before being different from circulation always, such circulation, likely can spend long time, even there is no terminal, this cycle index can be far longer than needs prize-winning number.
China's Mainland patented claim discloses a kind of enterprise lucky drawing method No. 200810023685.6, comprises the following steps: initialization lot personnel and prize scale database; Judge whether database meets the demands; The record of database is produced random number and presses in line ordering; A random sequence number of each generation is also found corresponding record; The record that output is chosen is also deleted this record in database; Judging whether needs to continue to extract; Finishing this extracts and Output rusults.Further, complete after above-mentioned steps, also can comprise following steps: participated in producing random number by above-mentioned by the personnel of drawing; By prize scale sequence number comparison in the number of obtaining and prize scale database, and export the prize scale that random number is hit.
Although the enterprise lucky drawing method circulation in No. 200810023685.6th, China's Mainland patented claim needs the number of times of prize-winning number can extract prize-winning information out, but, enterprise lucky drawing method in No. 200810023685.6th, China's Mainland patented claim is the prize drawing for database direct control, if gone wrong in prize drawing process, the prize of extracting out is above cancelled, and need again draw a lottery.
[summary of the invention]
Fundamental purpose of the present invention is to provide a kind of lottery drawing method of simplifying prize drawing process.
The invention provides a kind of lottery drawing method, it comprises the following steps:
(10) provide initial prize drawing scope, prize-winning number and alternative number;
(20) generate variable to be drawn a lottery according to initial prize drawing scope, for recording the prize drawing information of maximum magnitude;
(30) create prize-winning variable, random number variable and the number variable of having got the winning number in a bond, wherein, prize-winning variable is for recording the information of having got the winning number in a bond; Random number variable is used for recording random number; Got the winning number in a bond number variable for recording the number of having got the winning number in a bond, and under original state, prize-winning number is 0;
(40) whether the judgement number of having got the winning number in a bond is less than prize-winning number and alternative number sum;
(50) in the time that prize-winning number is less than prize-winning number and alternative number sum, produce random number to random number variable, and in variable to be drawn a lottery, take out corresponding prize-winning information according to random number variable, the information of getting the winning number in a bond is saved in prize-winning variable in chronological order, the number variable of getting the winning number in a bond is added up to 1, and delete the information of having got the winning number in a bond from variable to be drawn a lottery; And be back to step (40);
(60) in the time that prize-winning number is not less than prize-winning number and alternative number sum, from prize-winning variable output prize-winning result.
Especially, between step (30) and step (40), comprise the following steps, whether the prize-winning number of (35) verification setting is greater than 0, and whether alternative number is more than or equal to 0, and whether prize-winning number and alternative number sum are less than or equal to the number of initial prize drawing scope.
Especially, while being verified, circulation execution step (40) and step (50).
Especially, it is obstructed out-of-date to verify, points out and reset prize-winning number and alternative number.
Especially, provide initial prize drawing scope according to querying condition.
Especially, described querying condition comprises movable valid period, movable details, and whether activity can repeat prize drawing, and whether activity can draw a lottery.
Especially, described querying condition comprises territorial scope, product scope or the time range of prize drawing.
Especially, in step (60), the mode of output prize-winning result comprises that preservation prize-winning result is in database, and shows prize-winning result.
Especially, described database is Excel file.
Compared with prior art, the present invention is provided with prize-winning number and alternative number, and the information of getting the winning number in a bond is preserved in chronological order, if the prize-winning information of extracting out is above cancelled, can from alternative number, take out according to the order of sequence, not need again to draw a lottery, thereby simplify prize drawing flow process.
[brief description of the drawings]
Fig. 1 is the process flow diagram of lottery drawing method of the present invention.
[embodiment]
Refer to shown in Fig. 1, the invention provides a kind of lottery drawing method, it comprises the following steps:
Step 10: initial prize drawing scope is provided;
In the present embodiment, provide initial prize drawing scope according to querying condition, wherein, described querying condition comprises movable valid period, movable details, whether activity can repeat prize drawing, and whether activity can draw a lottery, and described querying condition also can comprise territorial scope, product scope or the time range of prize drawing;
Step 20: generate variable to be drawn a lottery according to initial prize drawing scope, create prize-winning variable, random number variable and the number variable of having got the winning number in a bond, wherein, variable to be drawn a lottery is for recording the prize drawing information of maximum magnitude; Prize-winning variable is for recording the information of having got the winning number in a bond; Random number variable is used for recording random number; Got the winning number in a bond number variable for recording the number of having got the winning number in a bond, and under original state, prize-winning number is 0;
Step 30: prize-winning number and alternative number are set;
Step 35: whether prize-winning number and the alternative number of verification setting satisfy condition; That is, whether the prize-winning number of verification setting is greater than 0, and whether alternative number is more than or equal to 0, and whether prize-winning number and alternative number sum are less than or equal to the number of initial prize drawing scope; While being verified, execution step 40; It is obstructed out-of-date to verify, execution step 70;
For example, initially prize drawing scope is 1000 people, and prize-winning number can be set to 50 people, when alternative number can be set to 10 people, is verified; And initially prize drawing scope is 50 people, prize-winning number can be set to 50 people, and when alternative number can be set to 10 people, checking is not passed through;
Step 40: whether the judgement number of having got the winning number in a bond is less than prize-winning number and alternative number sum; In the time that prize-winning number is less than prize-winning number and alternative number sum, execution step 50; In the time that prize-winning number is not less than prize-winning number and alternative number sum, execution step 60;
Step 50: produce at random a prize-winning information,, produce random number to random number variable, and in variable to be drawn a lottery, take out corresponding prize-winning information according to random number variable, the information of getting the winning number in a bond is saved in prize-winning variable in chronological order, the number variable of getting the winning number in a bond is added up to 1, and delete the information of having got the winning number in a bond from variable to be drawn a lottery; And be back to step 40;
Step 60: from prize-winning variable output prize-winning result;
In the present embodiment, the mode of output prize-winning result comprises preserves prize-winning result in database, and shows prize-winning result; Wherein, described database is Excel file;
Step 70: prompting resets, and returns to step 30.
The present invention is provided with prize-winning number and alternative number, and the information of getting the winning number in a bond is preserved in chronological order, for example, prize-winning number is 50 people, when alternative number is 10 people, if the prize-winning information of extracting out above calcellation, for example, in prize-winning number, there are 5 people invalid, can from alternative number, take out according to the order of sequence, that is, take out 5 people of forward arrangement in alternative number, do not need again to draw a lottery, thereby simplify prize drawing flow process.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited to this, any be familiar with those skilled in the art the present invention disclose technical scope in; can expect easily changing or replacing, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.

Claims (9)

1. a lottery drawing method, is characterized in that comprising the following steps:
(10) provide initial prize drawing scope;
(20) generate variable to be drawn a lottery according to initial prize drawing scope, create prize-winning variable, random number variable and the number variable of having got the winning number in a bond, wherein, variable to be drawn a lottery is for recording the prize drawing information of maximum magnitude; Prize-winning variable is for recording the information of having got the winning number in a bond; Random number variable is used for recording random number; Got the winning number in a bond number variable for recording the number of having got the winning number in a bond, and under original state, prize-winning number is 0;
(30) prize-winning number and alternative number are set;
(40) whether the judgement number of having got the winning number in a bond is less than prize-winning number and alternative number sum;
(50) in the time that prize-winning number is less than prize-winning number and alternative number sum, produce random number to random number variable, and in variable to be drawn a lottery, take out corresponding prize-winning information according to random number variable, the information of getting the winning number in a bond is saved in prize-winning variable in chronological order, the number variable of getting the winning number in a bond is added up to 1, and delete the information of having got the winning number in a bond from variable to be drawn a lottery; And be back to step (40);
(60) in the time that prize-winning number is not less than prize-winning number and alternative number sum, from prize-winning variable output prize-winning result.
2. lottery drawing method according to claim 1, it is characterized in that: between step (30) and step (40), comprise the following steps, (35) whether the prize-winning number of verification setting is greater than 0, whether alternative number is more than or equal to 0, and whether prize-winning number and alternative number sum are less than or equal to the number of initial prize drawing scope.
3. lottery drawing method according to claim 2, is characterized in that: while being verified, and circulation execution step (40) and step (50).
4. lottery drawing method according to claim 2, is characterized in that: it is obstructed out-of-date to verify, prompting resets, and returns to step (30).
5. lottery drawing method according to claim 1, is characterized in that: provide initial prize drawing scope according to querying condition.
6. lottery drawing method according to claim 5, is characterized in that: described querying condition comprises movable valid period, movable details, and whether activity can repeat prize drawing, and whether activity can draw a lottery.
7. lottery drawing method according to claim 5, is characterized in that: described querying condition comprises territorial scope, product scope or the time range of prize drawing.
8. lottery drawing method according to claim 1, is characterized in that: in step (60), the mode of output prize-winning result comprises that preservation prize-winning result is in database, and shows prize-winning result.
9. lottery drawing method according to claim 8, is characterized in that: described database is Excel file.
CN201210506560.5A 2012-11-30 2012-11-30 Lottery drawing method Pending CN103854351A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210506560.5A CN103854351A (en) 2012-11-30 2012-11-30 Lottery drawing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210506560.5A CN103854351A (en) 2012-11-30 2012-11-30 Lottery drawing method

Publications (1)

Publication Number Publication Date
CN103854351A true CN103854351A (en) 2014-06-11

Family

ID=50861957

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210506560.5A Pending CN103854351A (en) 2012-11-30 2012-11-30 Lottery drawing method

Country Status (1)

Country Link
CN (1) CN103854351A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760136A (en) * 2016-02-03 2016-07-13 江苏熟店宝科技有限公司 Multi-dimensional controllable algorithm based on pseudo random numbers
TWI570667B (en) * 2014-12-27 2017-02-11 崑山科技大學 Lottery method, computer program products, lottery systems
CN106997633A (en) * 2016-01-26 2017-08-01 西安诺瓦电子科技有限公司 A kind of lottery drawing method based on display screen terminal
CN107038788A (en) * 2017-04-06 2017-08-11 福建新大陆软件工程有限公司 A kind of sequences match prize drawing control method and system
CN107481387A (en) * 2017-08-11 2017-12-15 众彩世纪广告传媒(北京)有限公司 A kind of lottery drawing method of the instant lottery ticket of probabilistic type
CN107563798A (en) * 2017-08-22 2018-01-09 北京潘达互娱科技有限公司 Prize-winning data processing method and device
CN107729713A (en) * 2017-10-24 2018-02-23 广州视睿电子科技有限公司 Sample processing method, device and equipment, readable storage medium storing program for executing
CN110796778A (en) * 2018-08-01 2020-02-14 广州市森锐科技股份有限公司 Lottery drawing method, device, terminal and computer readable storage medium

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI570667B (en) * 2014-12-27 2017-02-11 崑山科技大學 Lottery method, computer program products, lottery systems
CN106997633A (en) * 2016-01-26 2017-08-01 西安诺瓦电子科技有限公司 A kind of lottery drawing method based on display screen terminal
CN105760136A (en) * 2016-02-03 2016-07-13 江苏熟店宝科技有限公司 Multi-dimensional controllable algorithm based on pseudo random numbers
CN105760136B (en) * 2016-02-03 2019-04-09 江苏易润信息技术有限公司 Various dimensions controllable method based on pseudo random number
CN107038788A (en) * 2017-04-06 2017-08-11 福建新大陆软件工程有限公司 A kind of sequences match prize drawing control method and system
CN107038788B (en) * 2017-04-06 2019-05-14 福建新大陆软件工程有限公司 A kind of sequences match prize drawing control method and system
CN107481387A (en) * 2017-08-11 2017-12-15 众彩世纪广告传媒(北京)有限公司 A kind of lottery drawing method of the instant lottery ticket of probabilistic type
CN107563798A (en) * 2017-08-22 2018-01-09 北京潘达互娱科技有限公司 Prize-winning data processing method and device
CN107729713A (en) * 2017-10-24 2018-02-23 广州视睿电子科技有限公司 Sample processing method, device and equipment, readable storage medium storing program for executing
CN110796778A (en) * 2018-08-01 2020-02-14 广州市森锐科技股份有限公司 Lottery drawing method, device, terminal and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN103854351A (en) Lottery drawing method
CN109345388A (en) Block chain intelligence contract verification method, device and storage medium
CN105279405B (en) Touchscreen user button behavior pattern is built and analysis system and its personal identification method
CN109598598A (en) Transaction processing method and device, electronic equipment based on block chain
CN102521467B (en) Bit-by-bit upset fault injection method specifically for SRAM (static random access memory) type FPGA (field programmable gate array)
CN102663618B (en) A kind of with no paper lottery ticket electronic certificate implementation method
CN104408341A (en) Smart phone user identity authentication method based on gyroscope behavior characteristics
CN104217494B (en) A kind of card number method of calibration and device
CN204390373U (en) The self-service cash device in Internet bar
PH12016501377A1 (en) Method of and system for gaming
CN110084604A (en) Transaction processing method and device, electronic equipment based on block chain
CN102567534A (en) Interactive product user generated content intercepting system and intercepting method for the same
CN105389716A (en) Method and system for consumer to carry out lottery drawing repeatedly by scanning two-dimension code on product
CN102682044A (en) Method for splitting tables for PHP MYSQL database
CN106572074A (en) Method and device for verifying identifying code
CN107957871A (en) A kind of front and back end synchronization canonical method of calibration based on JSR303
CN111162918B (en) Service fulfillment management method and device
WO2010048046A3 (en) Modeling party identities in computer storage systems
WO2015070593A1 (en) Method, device and system for on-line payment information transmission
CN105446752B (en) Triggering method and device of control in application program and mobile terminal
CN105653932B (en) The method and apparatus of software upgrading verification
CN105138887B (en) A kind of input method of log-on message, device and terminal device
CN202067348U (en) Electrical invoice management system
CN106411844A (en) Authority management method and system for network community
CN102833621B (en) User system management method based on smart television terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140611