Detailed Description
The principles and spirit of the present invention will be described with reference to a number of exemplary embodiments. It is understood that these embodiments are given solely for the purpose of enabling those skilled in the art to better understand and to practice the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
According to the embodiment of the invention, a lottery game lottery-counting method and a lottery game lottery-counting system are provided, wherein the method and the system are used for carrying out brand-new design on the betting content and the lottery drawing result of a lotto type game such as a super-big lotto game and the like in a storage mode in a database. In the lottery drawing link, the storage mode is combined with the binary digit calculation of the computer, so that the lottery counting efficiency can be improved, the lottery drawing time can be shortened, the risk in the lottery drawing process can be reduced, and the positive effect on improving the credibility of the sports lottery can be realized.
In the embodiments of the present invention, the terms referred to are:
super large lotto: a new large deck lottery play was launched in month 5 of 2007. The super large lotto belongs to a double-area number-selecting large lotto, the betting method is that 35-5 plus 12-2, 5 numbers are selected from 35 numbers of 01-35 as front area numbers, 2 numbers are selected from 12 numbers of 01-12 as rear area numbers, and the combination is a single betting.
And (3) lottery counting: and comparing each betting number of the lottery with the lottery drawing number to determine whether the betting number wins, and calculating the winning grade and the winning number of the betting number.
ASCII: the American standard code for information exchange is a set of computer coding system based on Latin letters, and is mainly used for displaying modern English and other Western European languages. It is the most common standard for information exchange and is equivalent to the international standard ISO/IEC 646, which has been defined to date for a total of 128 characters.
Binary system: binary (binary) indicates a radix-2 notation system in mathematical and digital circuits, with radix-2 representing the system is binary. In this system, two different symbols 0 (representing zero) and 1 (representing one) are usually used. In digital electronic circuits, the implementation of logic gates directly applies binary, so that binary is used in modern computers and devices relying on computers. Each digit is called a Bit (abbreviation for Binary digit).
Binary and operation: in the logical multiplication operation, only when the binary bits participating in the operation all take on the value of 1 at the same time, the result is 1, and the other results are 0.
The binary and operation rule is: 0 ^ 0, 0 ^ 1 ^ 0, 1 ^ 0, 1 ^ 1.
SQL: structured Query Language (SQL), which is a special purpose programming Language, is a database Query and programming Language for accessing data and querying, updating, and managing relational database systems. Structured query languages are high-level, non-procedural programming languages that allow users to work on high-level data structures. The method does not require a user to specify a data storage method and does not require the user to know a specific data storage mode, so that different database systems with completely different underlying structures can use the same structured query language as an interface for data input and management. The structured query language statements can be nested, which allows for great flexibility and powerful functionality.
Single-type betting: the single-type betting is the most basic betting form, namely, a specified number of numbers are directly selected to form a bet; typically a 2-membered one-note.
Compound betting: the compound betting is a betting mode in the lottery selling process, and compared with the single betting, the compound betting is a betting mode of selecting the number of numbers exceeding the conventional lottery drawing number and forming a multi-bet single betting number when lottery tickets are purchased.
And (3) carrying out gallbladder dragging and injection: one or more numbers are selected as the gallbladder codes when the lottery is purchased, the one or more numbers and other numbers are fixedly combined into single or multiple numbers respectively for betting, the fixed number is the gallbladder code, and the other changed numbers are the dragging codes.
The principles and spirit of the present invention are explained in detail below with reference to several representative embodiments of the invention.
Fig. 1 is a flow chart illustrating a lottery game prize-counting method according to an embodiment of the present invention. As shown in fig. 1, the method includes:
step S101, a number marking sequence of a lottery game is set, wherein each marking position in the number marking sequence corresponds to one number of the lottery game.
Specifically, the number marking sequence is a binary number sequence, wherein each marking bit of the binary number sequence corresponds to each number of the lottery game, the number recorded in each marking bit is 1 or 0, the number of the betting number or winning number marking bit is 1, and the numbers of other marking bits are 0.
Step S102, in the betting stage, the betting numbers of the lottery games are obtained, the corresponding marking positions are modified according to the betting numbers, and betting number marking sequences are generated.
Specifically, according to the betting number, the number of the corresponding marking bit is set to 1, and the numbers of other marking bits are set to 0, so that the binary digit sequence of the betting number is generated.
Step S103, in the stage of drawing the prizes, obtaining the drawing numbers of the lottery games, modifying the corresponding marking positions according to the drawing numbers, and generating a drawing number marking sequence.
Specifically, the number of the corresponding marker bit is set to 1 and the numbers of the other marker bits are set to 0 according to the lottery number, and a binary number sequence of the lottery number is generated.
And step S104, setting a winning mark sequence corresponding to each prize grade according to the winning number mark sequence.
Specifically, according to the preset prize levels, the corresponding digits in the binary digit sequence of the prize drawing numbers are modified, and the prize drawing binary digit sequence of each prize level is generated.
And step S105, performing logic multiplication operation on the betting number mark sequence and the lottery number mark sequence during the lottery counting to obtain a betting number operation result.
The specific process is as follows:
performing one-time logical multiplication operation on the binary digit sequence of the betting number and the binary digit sequence of the lottery number to obtain an operation result of the betting number; the logical multiplication is performed by bit, and 0 ^ 0, 0 ^ 1 ^ 0, 1 ^ 0, and 1 ^ 1 are 0. "Λ" is the sign of a binary and operation (logical multiplication).
For example, X ═ 1001, Y ═ 0101, then X ^ Y ═ 0001; the logic operation is carried out according to bits, and no relation exists between the bits, namely, no carry or borrow relation exists in the process of arithmetic operation.
And step S106, comparing and searching in the winning mark sequence according to the betting number operation result, and determining a corresponding prize calculation result.
Wherein, in the winning binary digit sequence, whether a binary digit sequence with the same operation result as the betting number exists is searched by comparison; if yes, determining a prize-counting result according to the prize level corresponding to the winning binary digit sequence; if not, the result of the tally is a loser.
In the field of lottery, a lottery drawing link is extremely important, the lottery drawing process involves two places, namely a lottery drawing center and a lottery shaking center, data are mutually transmitted between the two places, each step of operation depends on the operation result of the last place, and the time is very compact. The lottery counting stage in the super-big lotto lottery drawing process is the most time-consuming, the lottery drawing time of the super-big lotto game can be shortened by adopting the lottery counting method provided by the invention, the time from the recording of the lottery drawing result to the completion of the lottery drawing is predicted to be shortened from the original 5-10 minutes to 1-2 minutes, the risk of the lottery drawing process in the lottery game is greatly reduced, and the credibility of the lottery is effectively improved. Because of the simplification of the lottery-counting algorithm, the lottery counting can be completed only by using SQL sentences instead of process languages, so that the dependence on programming code languages is eliminated, and the independence of the lottery-counting logic on the implementation languages is realized.
For a clearer explanation of the lottery game prize-counting method, a specific embodiment is described below, but it should be noted that the embodiment is only for better illustration of the present invention and should not be construed as an undue limitation of the present invention.
The super big lotto is taken as an example, and the lottery game lottery-counting method provided by the invention is utilized. A brand-new storage format is designed for the betting content and the lottery drawing result of the super large lotto, and a new lottery drawing mode is realized based on the storage format.
Specifically, a large lotto pre-bet and post-bet are considered to be a 35-bit and 12-bit binary digit sequence, respectively, the binary digit sequence comprising 47 flag bits:
the 1 st marking bit corresponds to the number 01 of the front area, the 2 nd marking bit corresponds to the number 02 of the front area, and so on, the 35 th marking bit corresponds to the number 35 of the front area;
starting from the 36 th mark bit, the number of the rear area is the 36 th mark bit, the 36 th mark bit corresponds to the number 01 of the rear area, and so on, the 47 th mark bit corresponds to the number 12 of the rear area; each marker bit corresponds to a number.
The bit corresponding to the bet number or winning number is set to 1, and the other bits are set to 0.
For example, the number of the lottery is: pre-region number 11+12+21+22+35, post-region number: 01+12, the binary digit sequence of the winning number is shown in fig. 2.
Since the bet number is also composed of 5 front area numbers and 2 rear area numbers, the bet number may be converted into a binary digit sequence during the betting phase. The bet number and the prize number are thus each associated with a sequence of binary digits.
Furthermore, each winning condition can be stored in binary digit sequence according to the prize-grade table, and when the prize is calculated, the bet number and the prize-drawing number are subjected to binary AND operation once, and then the operation result is compared with the binary digit sequence of each prize grade in the predicted and prepared prize-grade table, so that whether the bet number wins or not and the prize grade can be determined. Because the binary operation efficiency in the computer is extremely high, and the method can utilize SQL sentences of the database to carry out batch processing, the prize-counting can be efficiently finished.
The description is made with reference to the exemplary embodiment shown in fig. 3 and 4 as follows:
the number of the lottery drawing is as follows: front zone number: 11+12+21+22+35, last region number: 01+12.
The betting numbers are: front zone number: 11+12+21+22+30, last region number: 01+12.
The prize level is:
first-class prize, 5 in front zone, 2 in back zone;
the first two prizes are 5 in the front area and 1 in the back area;
three equal prizes, 5 in the front zone and 0 in the back zone;
four prizes, 4 in the front zone and 2 in the back zone;
other prize levels can be set in sequence according to the number of the prize numbers, and the application is only an exemplary description and is not repeated.
Through comparing the betting number and the lottery number, the winning condition is as follows: 4 in the front zone and 2 in the back zone, and the prize grades are four equal prizes.
The process of processing by the prize-counting method of the invention is as follows:
the binary values corresponding to the prize levels are set according to the number of the prizes, and taking four equal prizes as an example, the binary digit sequences corresponding to 4 prize levels in the front zone and 2 prize levels in the rear zone have 5 groups in total, as shown in fig. 3, which is a schematic diagram of the binary digit sequences of 5 winning cases of the four equal prizes.
The binary and operation is performed once on the binary digit sequence of the bet number and the award number to obtain the logical operation result as shown in fig. 4.
According to the operation result, the binary digit sequences corresponding to the prize levels are compared and searched, specifically, the binary digit sequences in the winning condition of fig. 3 can be searched to match the winning condition 1, and then the four equal prizes with the winning condition of 4+2 (4 in the front area and 2 in the rear area) can be determined.
When the lottery game lottery-counting method is used, the table structure of the lottery betting table in the database increases the binary values corresponding to the betting numbers, including the front zone value and the rear zone value, and the database increases a corresponding relation table of each prize stage and the binary values.
For the program code, the relevant program code for selling lottery tickets is modified, and when the lottery ticket betting information is put in storage, the binary number value corresponding to the betting number is also stored in the database; and the lottery-counting code is also modified, the data of the corresponding relation table of each prize-winning grade and binary value is obtained by using the result of lottery drawing, and the bet number and the winning number are used for carrying out AND operation, the operation result is found in the corresponding relation table of each prize-winning grade and binary value, and if the operation result can be found, the prize is won.
The method can be used for single-type betting and lottery-counting of super-large lotto, and can also be used for storage and lottery-counting of compound betting and Dandan-to-bet of super-large lotto. When the prize is calculated, the hit condition of each part is obtained by binary AND operation, and the prize grade and number of each bet can be obtained according to the related formula.
The invention combines the lottery betting number and the binary digit by using the characteristics of the binary digit data of the computer and the betting characteristics of the lottery lotto digital games, and completes the rapid lottery drawing by using the characteristics of the high-efficiency binary operation of the computer during the lottery drawing. The present two-color ball game and the present seven-color lottery game of the welfare lottery can use the binary digit sequence mode proposed by the present invention to store the betting number and the result of drawing a prize, and can also use the binary AND operation to realize the high-efficiency prize-counting.
It should be noted that although the operations of the method of the present invention have been described in the above embodiments and the accompanying drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the operations shown must be performed, to achieve the desired results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
Having described the method of an exemplary embodiment of the present invention, a lottery game lottery system of an exemplary embodiment of the present invention will now be described with reference to fig. 5.
The implementation of the lottery game lottery system can be referred to the implementation of the above method, and repeated details are omitted. The term "module" or "unit" used hereinafter may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Based on the same inventive concept, the present invention also provides a lottery game prize-counting system, as shown in fig. 5, the system includes:
a setting module 510, configured to set a number marking sequence of a lottery game, where each marking bit in the number marking sequence corresponds to a number of a lottery game;
a betting sequence generating module 520, configured to, in a betting stage, obtain betting numbers of the lottery game, modify corresponding marking positions according to the betting numbers, and generate betting number marking sequences;
a lottery drawing sequence generating module 530, configured to, in a lottery drawing stage, obtain a lottery drawing number of a lottery game, modify a corresponding mark position according to the lottery drawing number, and generate a lottery drawing number mark sequence;
a winning sequence setting module 540, configured to set a winning flag sequence corresponding to each prize level according to the winning number flag sequence;
a logic operation module 550, configured to perform a logic multiplication operation on the bet number mark sequence and the award drawing number mark sequence during award counting to obtain a bet number operation result;
and the prize-counting module 560 is used for comparing and searching in the prize-winning mark sequence according to the operation result of the bet number to determine a corresponding prize-counting result.
In one embodiment, the number mark sequence is a binary number sequence, wherein each mark bit of the binary number sequence corresponds to each number of the lottery game, the number recorded in each mark bit is 1 or 0, the number of the bet number or winning number mark bit is 1, and the numbers of the other mark bits are 0.
In one embodiment, the betting sequence generation module 520 is specifically configured to:
in the betting stage, acquiring betting numbers of the lottery games;
and setting the digit of the corresponding mark bit to be 1 and the digits of other mark bits to be 0 according to the betting number, and generating a binary digit sequence of the betting number.
In an embodiment, the lottery sequence generating module 530 is specifically configured to:
in the lottery drawing stage, obtaining the drawing number of the lottery game;
and setting the number of the corresponding mark bit to be 1 and the numbers of other mark bits to be 0 according to the lottery number, and generating a binary digit sequence of the lottery number.
In one embodiment, the winning sequence setting module 540 is specifically configured to:
according to the preset prize-winning grades, the corresponding digits in the binary digit sequence of the prize-winning numbers are modified to generate the prize-winning binary digit sequence of each prize-winning grade.
In one embodiment, the logic operation module 550 is specifically configured to:
performing one-time logical multiplication operation on the binary digit sequence of the betting number and the binary digit sequence of the lottery number to obtain an operation result of the betting number; the logical multiplication is performed by bit, and 0 ^ 0, 0 ^ 1 ^ 0, 1 ^ 0, and 1 ^ 1 are 0.
In one embodiment, the scoring module 560 is specifically configured to:
in the winning binary digit sequence, comparing and searching whether a binary digit sequence with the same operation result as the betting number exists or not; if yes, determining a prize-counting result according to the prize level corresponding to the winning binary digit sequence; if not, the result of the tally is a loser.
It should be noted that although several modules of the lottery game's lottery system are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the modules described above may be embodied in one module according to embodiments of the invention. Conversely, the features and functions of one module described above may be further divided into embodiments by a plurality of modules.
Based on the aforementioned inventive concept, as shown in fig. 6, the present invention further provides a computer device 600, which comprises a memory 610, a processor 620 and a computer program 630 stored on the memory 610 and operable on the processor 620, wherein the processor 620 executes the computer program 630 to implement the aforementioned lottery game prize-drawing method.
Based on the foregoing inventive concept, the present invention proposes a computer-readable storage medium storing a computer program which, when executed by a processor, implements the aforementioned lottery game's lottery method.
The lottery game lottery-counting method and the lottery game lottery-counting system adopt a completely new storage mode aiming at the storage of betting contents and lottery-drawing results and combine the binary digit calculation function of a computer to realize the high-efficiency lottery counting; when the lottery is calculated, the database statement can be directly utilized to compare all the betting numbers with the winning numbers in batches, the efficiency of calculating the lottery can be greatly improved, and the time consumed from inputting the result of winning to finishing the winning is shortened, so that the risk of the lottery game in the process of winning is reduced, and the public confidence of the lottery is effectively improved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.