CN102629397B - Three-axis gyroscope-based mobile phone lottery number random selection method - Google Patents

Three-axis gyroscope-based mobile phone lottery number random selection method Download PDF

Info

Publication number
CN102629397B
CN102629397B CN201210070284.2A CN201210070284A CN102629397B CN 102629397 B CN102629397 B CN 102629397B CN 201210070284 A CN201210070284 A CN 201210070284A CN 102629397 B CN102629397 B CN 102629397B
Authority
CN
China
Prior art keywords
random number
random
mobile phone
axis gyroscope
seed
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
CN201210070284.2A
Other languages
Chinese (zh)
Other versions
CN102629397A (en
Inventor
耿喆
刘洪马
刘峰
王学奎
黄海波
吴仲喜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JIANGSU XINCAI SOFTWARE CO Ltd
Original Assignee
JIANGSU XINCAI SOFTWARE CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by JIANGSU XINCAI SOFTWARE CO Ltd filed Critical JIANGSU XINCAI SOFTWARE CO Ltd
Priority to CN201210070284.2A priority Critical patent/CN102629397B/en
Publication of CN102629397A publication Critical patent/CN102629397A/en
Application granted granted Critical
Publication of CN102629397B publication Critical patent/CN102629397B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Time Recorders, Dirve Recorders, Access Control (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a three-axis gyroscope-based mobile phone lottery number random selection method and relates to the technical field of mobile phone lottery number random selection. The three-axis gyroscope-based mobile phone lottery number random selection method comprises the following steps of 1, generating a random number seed based on a three-axis gyroscope by detecting a motion state of a mobile phone by the three-axis gyroscope of the mobile phone and recording the time from still to motion and from motion to still, wherein the time is utilized as the random number seed, and 2, generating a random bet number by utilizing the random number seed obtained by the step 1 as an input, calculating a random number according to the random number seed by a random number generation algorithm, and calculating a remainder according to the random number so that the random bet number is obtained. The three-axis gyroscope-based mobile phone lottery number random selection method has the advantages that a three-axis gyroscope of a smartphone is utilized for generation of a random bet number so that a novel experience way is provided for mobile phone lotteries.

Description

A kind of mobile phone lottery ticket random selecting numbers method based on three-axis gyroscope
Technical field
The present invention relates to mobile phone lottery ticket random selecting numbers method and technology field, specifically a kind of based on three-axis gyroscope
Mobile phone lottery ticket random selecting numbers method; Can be applicable to the smart mobile phone of any built-in three-axis gyroscope.
Background technology
At present, along with the development of technology, smart mobile phone is day by day universal, and mobile phone lottery ticket is also accepted by increasing people as a kind of emerging lottery ticket buying pattern.Smart mobile phone carries abundant sensor, how to utilize these for mobile phone lottery ticket provides abundanter lottery, to experience, and attracting more people to carry out mobile phone stake just becomes an important direction; And utilize three-axis gyroscope to generate at random stake number, not yet have and see at present.
Summary of the invention
The invention provides a kind of mobile phone lottery ticket random selecting numbers method based on three-axis gyroscope, utilize three-axis gyroscope to generate at random stake number, realize mobile phone lottery ticket random selecting numbers.
The present invention realizes with following technical scheme: a kind of mobile phone lottery ticket random selecting numbers method based on three-axis gyroscope, comprises random number seed generation and the generation of random note code based on three-axis gyroscope; Concrete steps are as follows:
(1) random number seed based on three-axis gyroscope generates: the three-axis gyroscope carrying by smart mobile phone carrys out the motion state of detection of handset, records mobile phone and to motion, returns static duration from static; Using duration as random number seed;
(2) generation of random note code: using the seed generating in step (1) as input, this seed application Generating Random Number is obtained to random number, take this random number to obtain random note code as basic remainder number.
The invention has the beneficial effects as follows: utilized the three-axis gyroscope of smart mobile phone to generate random stake number, for mobile phone lottery ticket provides new experience mode.
Accompanying drawing explanation
Below in conjunction with drawings and Examples, the present invention is described in further detail:
Fig. 1 is that note code produces process flow diagram;
Fig. 2 is a kind of embodiment process flow diagram;
Fig. 3 is another kind of embodiment process flow diagram.
Embodiment
As shown in Figure 1, a kind of mobile phone lottery ticket random selecting numbers method based on three-axis gyroscope, comprises random number seed generation and the generation of random note code based on three-axis gyroscope; Concrete steps are as follows:
(1) random number seed based on three-axis gyroscope generates: the three-axis gyroscope carrying by smart mobile phone carrys out the motion state of detection of handset, records mobile phone and to motion, returns static duration from static; Using duration as random number seed;
(2) generation of random note code: using the seed generating in step (1) as input, this seed application Generating Random Number is obtained to random number, take this random number to obtain random note code as basic remainder number.
Embodiment 1 is as shown in Figure 2: using the millisecond number of duration as random number seed, now lottery ticket rule does not allow a code repetition, specific as follows:
1) random number seed based on three-axis gyroscope generates
If the start time of jitter time is
Figure 425887DEST_PATH_IMAGE001
, the end time is
Figure 266936DEST_PATH_IMAGE002
, seed number is exactly the millisecond number of their difference so:
Figure 875947DEST_PATH_IMAGE003
(1)
2) generation of random note code
If random number is
Figure 691719DEST_PATH_IMAGE004
,
Figure 778493DEST_PATH_IMAGE005
represent respectively the random number generating for the 1st to N time;
If the note code obtaining is
Figure 970702DEST_PATH_IMAGE006
,
Figure 960786DEST_PATH_IMAGE005
represent respectively the note code generating for the 1st to N time; be Generating Random Number, the mould that obtains note code is ;
Figure 15963DEST_PATH_IMAGE009
(2)
Figure 532658DEST_PATH_IMAGE010
Figure 454346DEST_PATH_IMAGE011
(3)
Figure 689281DEST_PATH_IMAGE012
(4)。
Random number is obtained first injection code and is recorded by the method for remainder number; Then using first random number as seed, then apply random number algorithm one time, obtain second random number, remainder number obtains second note code; The second note code and the note code that recorded are compared, if do not had and the note code that recorded repeats, directly record; If the some note codes that recorded have repeated, abandon this note code, using second random number as seed, apply again a random number algorithm and obtain the 3rd random number, then remainder number obtains new note code and records again and note code and compare, until and recorded note code and do not repeated to record; Follow-up note code also generates like this, until meet stake, requires to finish.
Embodiment 2 is as shown in Figure 3: using the millisecond number of duration as random number seed, now lottery ticket rule allows code repetition, specific as follows:
1) random number seed based on three-axis gyroscope generates
If the start time of jitter time is
Figure 987407DEST_PATH_IMAGE001
, the end time is , seed number is exactly the millisecond number of their difference so:
(1)
2) generation of random note code
If random number is
Figure 388409DEST_PATH_IMAGE004
,
Figure 224647DEST_PATH_IMAGE005
represent respectively the random number generating for the 1st to N time;
If the note code obtaining is
Figure 715933DEST_PATH_IMAGE006
,
Figure 979424DEST_PATH_IMAGE005
represent respectively the note code generating for the 1st to N time;
Figure 188951DEST_PATH_IMAGE007
be Generating Random Number, the mould that obtains note code is
Figure 500984DEST_PATH_IMAGE008
;
Figure 610891DEST_PATH_IMAGE009
(2)
Figure 546748DEST_PATH_IMAGE010
Figure 742106DEST_PATH_IMAGE011
(3)
Figure 421612DEST_PATH_IMAGE012
(4)。
Random number obtains first injection code by the method for remainder number; Then using first random number as seed, then apply random number algorithm one time, obtain second random number, remainder number obtains the second note code; According to said method, obtain other note code, until meet stake, require to finish.

Claims (3)

1. the mobile phone lottery ticket random selecting numbers method based on three-axis gyroscope, is characterized in that: comprise random number seed generation and the generation of random note code based on three-axis gyroscope; Concrete steps are as follows:
(1) random number seed based on three-axis gyroscope generates: the three-axis gyroscope carrying by smart mobile phone carrys out the motion state of detection of handset, records mobile phone and to motion, returns static duration from static; Using the millisecond number of duration as random number seed;
(2) generation of random note code: using the seed generating in step (1) as input, this seed application Generating Random Number is obtained to random number, take this random number to obtain random note code as basic remainder number.
2. a kind of mobile phone lottery ticket random selecting numbers method based on three-axis gyroscope according to claim 1, is characterized in that: when lottery ticket rule does not allow code to repeat, random number is obtained first injection code and recorded by the method for remainder number; Then using first random number as seed, then apply random number algorithm one time, obtain second random number, remainder number obtains second note code; The second note code and the note code that recorded are compared, if do not had and the note code that recorded repeats, directly record; If the some note codes that recorded have repeated, abandon this note code, using second random number as seed, apply again a random number algorithm and obtain the 3rd random number, then remainder number obtains new note code and records again and note code and compare, until and recorded note code and do not repeated to record; Follow-up note code also generates like this, until meet stake, requires to finish.
3. a kind of mobile phone lottery ticket random selecting numbers method based on three-axis gyroscope according to claim 1, is characterized in that: when lottery ticket rule allows code to repeat, random number is obtained first injection code and recorded by the method for remainder number; Then using first random number as seed, then apply random number algorithm one time, obtain second random number, remainder number obtains the second note code and records; According to said method, obtain other note code, until meet stake, require to finish.
CN201210070284.2A 2012-03-16 2012-03-16 Three-axis gyroscope-based mobile phone lottery number random selection method Active CN102629397B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210070284.2A CN102629397B (en) 2012-03-16 2012-03-16 Three-axis gyroscope-based mobile phone lottery number random selection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210070284.2A CN102629397B (en) 2012-03-16 2012-03-16 Three-axis gyroscope-based mobile phone lottery number random selection method

Publications (2)

Publication Number Publication Date
CN102629397A CN102629397A (en) 2012-08-08
CN102629397B true CN102629397B (en) 2014-04-02

Family

ID=46587654

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210070284.2A Active CN102629397B (en) 2012-03-16 2012-03-16 Three-axis gyroscope-based mobile phone lottery number random selection method

Country Status (1)

Country Link
CN (1) CN102629397B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530928B (en) * 2013-10-09 2016-06-29 新彩软件无锡有限公司 A kind of cell phone lottery random selecting numbers method based on sound
CN103617020B (en) * 2013-12-23 2018-03-23 网易乐得科技有限公司 A kind of method and apparatus that random number is generated in application program
US9811870B2 (en) 2013-12-24 2017-11-07 Tencent Technology (Shenzhen) Company Limited Information processing method, apparatus and payment system
CN104598099B (en) * 2013-12-24 2018-11-06 腾讯科技(深圳)有限公司 A kind of information processing method, device and payment system
CN103763375B (en) * 2014-01-24 2019-04-30 北京壹平台科技有限公司 A kind of random lottery numerical selection method for mobile terminal
CN103824372A (en) * 2014-03-10 2014-05-28 北京壹平台科技有限公司 Hand-shaking number selection method adopting MT (mobile terminal)
CN104317551A (en) * 2014-10-17 2015-01-28 北京德加才科技有限公司 Ultrahigh-safety true random number generation method and ultrahigh-safety true random number generation system
CN106406506B (en) * 2015-07-29 2021-05-25 腾讯科技(深圳)有限公司 Method and device for generating random data by mobile terminal
CN106952210A (en) * 2017-03-13 2017-07-14 网易乐得科技有限公司 Competing color lottery ticket choosing and selling method, device and readable storage medium storing program for executing based on mobile terminal
CN111028409B (en) * 2019-12-04 2021-12-24 中体彩科技发展有限公司 Random lottery number selection system and method
CN112416299B (en) * 2020-10-10 2022-06-10 石家庄科林电气股份有限公司 Method for acquiring random number by utilizing null shift data

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5330185A (en) * 1993-03-30 1994-07-19 Interlott, Inc. Method and apparatus for random play of lottery games
EP0855685A2 (en) * 1997-01-27 1998-07-29 Nec Corporation An electronic lottery system and its operating method and computer-readable recording medium in which the electronic lottery program code is stored
JP2003331333A (en) * 2002-05-09 2003-11-21 Nec Corp Lottery device and program
CN1655166A (en) * 2005-02-10 2005-08-17 高中明 Method for realizing lottery sale and purchase utilizing mobile phone
CN101471959A (en) * 2008-04-09 2009-07-01 深圳市星华晨科技有限公司 Method for purchasing lottery by mobile phone
CN102194271A (en) * 2010-03-16 2011-09-21 李代甫 Method, device and application for computer numerical selection
CN102368337A (en) * 2011-10-12 2012-03-07 袁子淇 Random number selector of lottery

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5330185A (en) * 1993-03-30 1994-07-19 Interlott, Inc. Method and apparatus for random play of lottery games
EP0855685A2 (en) * 1997-01-27 1998-07-29 Nec Corporation An electronic lottery system and its operating method and computer-readable recording medium in which the electronic lottery program code is stored
JP2003331333A (en) * 2002-05-09 2003-11-21 Nec Corp Lottery device and program
CN1655166A (en) * 2005-02-10 2005-08-17 高中明 Method for realizing lottery sale and purchase utilizing mobile phone
CN101471959A (en) * 2008-04-09 2009-07-01 深圳市星华晨科技有限公司 Method for purchasing lottery by mobile phone
CN102194271A (en) * 2010-03-16 2011-09-21 李代甫 Method, device and application for computer numerical selection
CN102368337A (en) * 2011-10-12 2012-03-07 袁子淇 Random number selector of lottery

Also Published As

Publication number Publication date
CN102629397A (en) 2012-08-08

Similar Documents

Publication Publication Date Title
CN102629397B (en) Three-axis gyroscope-based mobile phone lottery number random selection method
CN110147231B (en) Combined special effect generation method and device and storage medium
WO2020125839A1 (en) Electronic element and electrically controlled display element
Diez et al. The fab and the smart city: the use of machines and technology for the city production by its citizens
CN104732574B (en) The compression method and device of a kind of role play
CN103675834B (en) A kind of indoor satellite signal simulation system
CN102833412A (en) Mobile terminal and unlocking system and unlocking method for same
CN107735765A (en) Method and apparatus for the software upgrading of embedded vehicle system
WO2015025282A3 (en) Methods and systems for transferring electronic money
CN104317551A (en) Ultrahigh-safety true random number generation method and ultrahigh-safety true random number generation system
CN102624975A (en) Method for unlocking mobile terminal
CN105159463A (en) Non-contact wearable intelligent ring system and gesture identification method thereof
CN108541300A (en) Adaptive depth sense system
CN103617020B (en) A kind of method and apparatus that random number is generated in application program
CN106537371A (en) Visualization suggestions
CN103942823A (en) Game engine rendering method and device
CN105488040A (en) Personal track path drafting method, device and system
CN109948087A (en) Acquisition methods, device and the terminal of web page resources
CN103167143A (en) Gravity ball unlocking system and method of mobile phone
CN103034471A (en) Random number generation method and random number generation system
CN106233674A (en) The battery-efficient using the communication of token bucket synchronizes
CN103824372A (en) Hand-shaking number selection method adopting MT (mobile terminal)
Townsend Locative-media artists in the contested-aware city
CN103118175A (en) Method for achieving application rapid exit, off screen and standby mode of smartphone
CN104516650A (en) Information processing method and electronic device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant