CN112381576A - Method for efficiently acquiring lottery random prizes - Google Patents

Method for efficiently acquiring lottery random prizes Download PDF

Info

Publication number
CN112381576A
CN112381576A CN202011275043.2A CN202011275043A CN112381576A CN 112381576 A CN112381576 A CN 112381576A CN 202011275043 A CN202011275043 A CN 202011275043A CN 112381576 A CN112381576 A CN 112381576A
Authority
CN
China
Prior art keywords
prize
user
list
prizes
limit
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
CN202011275043.2A
Other languages
Chinese (zh)
Inventor
孙保权
段凌云
吴奇
王振兴
陈正超
王金刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guiyang Yuwan Technology Co ltd
Original Assignee
Guiyang Yuwan 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 Guiyang Yuwan Technology Co ltd filed Critical Guiyang Yuwan Technology Co ltd
Priority to CN202011275043.2A priority Critical patent/CN112381576A/en
Publication of CN112381576A publication Critical patent/CN112381576A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0212Chance discounts or incentives

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method for efficiently acquiring a lottery random prize, which comprises the following steps: s1, configuring a plurality of groups of prize lists which can be respectively drawn by classified users by adding configuration files; s2, automatically loading different prize configurations according to the grade of the user; s3, updating the limit of the number of the remaining prizes, judging whether the limit is reached, if the limit is reached, removing the prizes from the prize list, and if the limit is not reached, increasing the number of the prizes to be released, and generating a prize list to be released; s4, generating random numbers by using probability according to the prize list to be released, circularly matching the random numbers with the prize probability setting in the prize list, and adding the matched items to the prize list in each circulation; and S5, the activity page prompts the winning information to the user according to the transmitted data. The invention not only simplifies the coding design work of different projects each time, saves more real and labor, but also has higher correctness, and avoids high concurrent operation to cause the excess amount of the awards.

Description

Method for efficiently acquiring lottery random prizes
Technical Field
The invention relates to a method, in particular to a method for efficiently acquiring a lottery random prize.
Background
At present, a plurality of activity pages related to lottery draw calculate the occurrence probability of prizes each time according to specific activity item requirements, and whether various conditions such as the distribution limit of single prizes or the acquisition limit of individual lottery draw prizes are met, so that the conditions are limited more, the codes are complicated, coding design needs to be carried out again each time, time and labor are wasted, and errors are easy to occur.
Disclosure of Invention
In order to solve the defects of the prior art, the invention provides a method for efficiently acquiring a lottery random prize.
In order to solve the technical problems, the invention adopts the technical scheme that: a method for efficiently acquiring a lottery random prize, comprising the steps of:
s1, adding configuration files, and configuring a plurality of groups of prize lists which can be respectively drawn by classified users;
s2, automatically loading prize configuration from the configuration file according to the grade of the user;
s3, updating the remaining number of the prizes, judging whether the number exceeds the configured limit number, and generating a prize list to be released for the prizes which do not reach the limit;
s4, generating a qualified prize list according to the generated prize list to be released and a probability algorithm;
and S5, the activity page prompts the winning information to the user according to the transmitted data.
Further, in S1, the prize list supports the configuration of the current remaining number and probability of prizes, the limit of the number of times of day of issuance, the limit of the total number of times of issuance, and the limit of the number of times of single-user pickup.
Further, in S2, according to the user id, the program determines the level range to which the current user belongs, and automatically loads the prize list participating in the distribution and the total number of prizes to be distributed at a time from the configuration file according to the level of the user.
Further, in S2, if the user is a normal user, it is not necessary to perform quantity control, and it is not necessary to perform a code lock, and the result is returned to the caller; if the user is a high-grade user, locking operation is firstly carried out to avoid high concurrent operation to ensure that the prize is issued in excess quantity, and then the prize is returned to the caller.
Further, in S3, the number of prizes that have been released on the same day, the total number of prizes that have been released on the same day, and the number that each person has picked up are determined; if the limit has been reached, it is removed from the prize list, and if the limit has not been reached, the number of awards to be issued increases in the prize list, and finally, a list of prizes to be issued is generated.
Further, in S4, a random number is generated using the probability, and a round matching is performed with the prize probability settings in the prize list, and the matching items are added to the prize list for each round.
Further, in S4, circulating the list of prizes to be distributed, generating a random number of 0-1 each time, and determining whether the random number is smaller than the prize probability of the prize; if the value is less than the preset value, the prize needing to be issued is circulated currently, and the prize needing to be issued is returned to the caller; if yes, the next prize item is repeated until the probability that the generated random number is smaller than the prize appears, and the final prize is obtained and returned to the caller.
Further, in S5, inserting the obtained data of the prize to be distributed and the user identity into the database to generate an ownership relationship; meanwhile, the prize list data is transmitted to the activity page through the network, and the activity page prompts the user for winning information according to the transmitted data.
The invention discloses a method for efficiently acquiring lottery random prizes, which sets probability and condition limits in a configuration file mode, a user does not need to care about implementation, and logic judgment is automatically carried out in a program, so that the coding design work of different projects at each time is simplified, the method is more practical and labor-saving, the correctness is higher, and high concurrency operation is avoided, so that the prize issuing exceeds the number.
Drawings
FIG. 1 is a schematic overall flow chart of the present invention.
FIG. 2 is a schematic flow chart of an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
The invention discloses a method for efficiently acquiring a lottery random prize, which comprises the following steps as shown in figure 1:
s1, adding configuration files, and configuring a plurality of groups of prize lists which can be respectively drawn by classified users;
s2, judging the level range of the current user, and automatically loading prize configuration from the configuration file according to the level of the user;
s3, updating the remaining number of prizes, judging whether the number exceeds the limit number, and generating the prize not reaching the limit into a prize list to be released
S4, generating a qualified prize list according to the generated prize list to be released and a probability algorithm;
and S5, the activity page prompts the winning information to the user according to the transmitted data.
For the method for efficiently acquiring the lottery random prize, disclosed by the invention, the probability and condition limits are set in a file configuration mode, and the logic judgment is automatically carried out in the program, so that the coding design work of different projects at each time is simplified, and the correctness is higher; various lottery configuration rules which can adapt to different group roles are summarized in advance according to a large number of practices, for example, according to the amount of recently consumed money, the higher the consumption is, the higher the grade of the user grade is, so that the user group can be simply divided into two grades of a common user and a high grade, different lottery rules are loaded aiming at different grades, and a program can conveniently and automatically set distribution probability and limiting conditions for dividing each grade and single prizes thereof. Firstly, the grade range of the user is obtained according to the user identity, a prize list participating in the distribution and the total number configuration of the prizes needing to be distributed at a time are obtained from the configuration file according to the grade of the user, and then a code lock is set, so that the condition that the prizes exceed the distribution caused by the concurrency problem is avoided. Then, the number of the prizes which are issued on the same day of the users of the same level, the total number of the awards which are issued on the same day and the number which is acquired by each person are compared to judge, if the limit is reached, the prizes are removed from the prize list, if the limit is not reached, the number which is issued on the prize list is increased, and a prize list to be issued is generated. And according to the generated prize list to be released, generating random numbers by using the probability, circularly matching with the probability setting in the prize list, and adding the matched items into the prize list in each circulation.
The method for efficiently acquiring a lottery random prize disclosed in the present invention will be described in further detail with reference to fig. 2.
A method for efficiently acquiring a lottery random prize, as shown in fig. 2, comprises the following steps:
s1, configuring a plurality of groups of prize lists which can be respectively drawn by classified users by adding configuration files, wherein the prize lists support the configuration of the current remaining number and probability of prizes, the limitation of the number of times of distribution every day, the limitation of the total number of times of distribution and the limitation of the number of times of getting by a single user; through these, various demands at present are substantially satisfied.
S2, according to the user ID, the program will judge the grade scope of the current user, according to the grade of the user, the program will load different prize configuration automatically, namely: automatically loading a prize list participating in the distribution and the total number configuration of the prizes needing to be distributed at a single time from the configuration file; then, corresponding operation is carried out according to different user grades, if the user is a common user, the number control is not needed, the code lock is not needed, the resource consumption is reduced, and the operation is returned to the caller; if the user is a high-grade user, locking operation is firstly carried out to avoid high concurrent operation to ensure that the prize is issued in excess quantity, and then the prize is returned to the caller.
S3, updating the remaining prize number limit, calling a time number limit method, a total number limit method and a personal sending number limit method in sequence, comparing the number of the prizes sent out by the level user on the same day through the time number limit method, comparing the total number of the prizes sent out on the same day through the total number limit method, and comparing the number of each person who has received the prizes through the personal sending number limit method; in the above method, the number of incoming configuration limits is compared for a determination; if the program memory amount is found to exceed the configured limit amount, the item is removed from the prize list if the limit is reached; if the limit of the configuration number is not reached, the prize issuing number is increased by the corresponding number, and a remaining prize list to be issued is generated.
S4, according to the generated prize list to be released, random numbers are generated by using probability, the random numbers are circularly matched with the prize probability setting in the prize list, and the matched items are added into the prize winning list in each circulation; the method comprises the following steps: circulating the list of the prizes to be released, generating a random number of 0-1 each time in a circulating way, and judging whether the random number is smaller than the prize probability of the prize; if the value is less than the preset value, the prize needing to be issued is circulated currently, and the prize needing to be issued is returned to the caller; if yes, the next prize item is repeated until the probability that the generated random number is smaller than the prize appears, and the final prize is obtained and returned to the caller.
S5, finally, inserting the obtained prize data to be released and the user identity into a database to generate an ownership relationship; meanwhile, the prize list data is transmitted to the activity page through the network, and the activity page prompts the user for winning information according to the transmitted data.
The method for efficiently acquiring the lottery random prizes simplifies complex work by packaging a set of unified lottery types, aims at solving the problems that a plurality of existing activity pages related to lottery need to calculate the probability of occurrence of prizes each time and the codes are complex, sets the probability and condition limit in a file configuration mode, ensures that a user does not need to care implementation, automatically performs logic judgment in a program, simplifies coding design work of different projects each time, and has higher correctness.
The above embodiments are not intended to limit the present invention, and the present invention is not limited to the above examples, and those skilled in the art may make variations, modifications, additions or substitutions within the technical scope of the present invention.

Claims (8)

1. A method for efficiently acquiring a lottery random prize is characterized by comprising the following steps: the method comprises the following steps:
s1, adding configuration files, and configuring a plurality of groups of prize lists which can be respectively drawn by classified users;
s2, automatically loading prize configuration from the configuration file according to the grade of the user;
s3, updating the remaining number of the prizes, judging whether the number exceeds the configured limit number, and generating a prize list to be released for the prizes which do not reach the limit;
s4, generating a qualified prize list according to the generated prize list to be released and a probability algorithm;
and S5, the activity page prompts the winning information to the user according to the transmitted data.
2. A method for efficiently acquiring a lottery random prize according to claim 1, wherein: in S1, the prize list supports the configuration of the current remaining number and probability of prizes, the daily number of awards, the total number of awards, and the single-user number of picks.
3. A method for efficiently acquiring a lottery random prize according to claim 1, wherein: in S2, according to the user id, the program will determine the level range to which the current user belongs, and according to the level of the user, automatically load the prize list participating in distribution and the total number of prizes that need to be distributed at a time from the configuration file.
4. A method for efficiently acquiring a lottery random prize according to claim 1, wherein: in the step S2, if the user is a normal user, the number control is not required, and the user does not need to perform a code lock and returns the code lock to the caller; if the user is a high-grade user, locking operation is firstly carried out to avoid high concurrent operation to ensure that the prize is issued in excess quantity, and then the prize is returned to the caller.
5. A method for efficiently acquiring a lottery random prize according to claim 1, wherein: in S3, the number of the prizes which are issued on the same day, the total number of the prizes which are issued on the same day and the number which is picked up by each person are judged; if the limit has been reached, it is removed from the prize list, and if the limit has not been reached, the number of awards to be issued increases in the prize list, and finally, a list of prizes to be issued is generated.
6. A method for efficiently acquiring a lottery random prize according to claim 1, wherein: in S4, a random number is generated by using probability, and the random number is cyclically matched with the prize probability settings in the prize list, and the matching items are added to the prize list in each cycle.
7. A method for efficiently acquiring a lottery random prize according to claim 6, wherein: in S4, circulating the list of the prizes to be released, generating a random number of 0-1 each time, and judging whether the random number is smaller than the prize probability of the prize; if the value is less than the preset value, the prize needing to be issued is circulated currently, and the prize needing to be issued is returned to the caller; if yes, the next prize item is repeated until the probability that the generated random number is smaller than the prize appears, and the final prize is obtained and returned to the caller.
8. A method for efficiently acquiring a lottery random prize according to claim 7, wherein: in S5, inserting the obtained prize data to be released and the user identity into a database to generate an ownership relationship; meanwhile, the prize list data is transmitted to the activity page through the network, and the activity page prompts the user for winning information according to the transmitted data.
CN202011275043.2A 2020-11-16 2020-11-16 Method for efficiently acquiring lottery random prizes Pending CN112381576A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011275043.2A CN112381576A (en) 2020-11-16 2020-11-16 Method for efficiently acquiring lottery random prizes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011275043.2A CN112381576A (en) 2020-11-16 2020-11-16 Method for efficiently acquiring lottery random prizes

Publications (1)

Publication Number Publication Date
CN112381576A true CN112381576A (en) 2021-02-19

Family

ID=74583993

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011275043.2A Pending CN112381576A (en) 2020-11-16 2020-11-16 Method for efficiently acquiring lottery random prizes

Country Status (1)

Country Link
CN (1) CN112381576A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113112304A (en) * 2021-04-28 2021-07-13 厦门信息集团大数据运营有限公司 Intelligent prize distribution method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113112304A (en) * 2021-04-28 2021-07-13 厦门信息集团大数据运营有限公司 Intelligent prize distribution method and system

Similar Documents

Publication Publication Date Title
CN103701934B (en) Resource optimal scheduling method and virtual machine host machine optimal selection method
CN111932186A (en) Order processing method, device, equipment, system and storage medium
CN103019649B (en) Information providing method and equipment
CN105321249A (en) Prize drawing method and device
CN102608916A (en) Cell-machine based dynamic scheduling method for large part flexible job shop
CN110046761A (en) A kind of ethyl alcohol inventory's Replenishment Policy based on multi-objective particle
CN105303410B (en) Virtual article sharing method and device
CN107622102A (en) Entity card number generation method and terminal device
CN112381576A (en) Method for efficiently acquiring lottery random prizes
CN109872049B (en) Resource allocation optimization method and device
CN110414863A (en) A kind of intelligence manufacture workshop resource regulating method
CN110135967A (en) The processing method and system of collection data
CN111738709A (en) Transaction processing method and device
CN106384161A (en) Optimization algorithm for regional division of spaceflight tour-inspection plan
CN103995749B (en) The calculation task allocating method and system of cell cloud system
CN108803519A (en) A kind of method that empire's Competitive Algorithms of improvement solve Flexible Job-shop Scheduling Problems
CN105760136A (en) Multi-dimensional controllable algorithm based on pseudo random numbers
CN107609781B (en) A kind of flexible job shop scheduling method based on improvement empire's Competitive Algorithms
CN113791595B (en) Measuring point data importing method, system, equipment and medium for distributed control system
CN107908555A (en) A kind of method for detecting abnormality and its terminal of SQL scripts
CN108764980A (en) The load value data processing method and processing device of gaming platform
CN113657794B (en) Planning method and planning device for production manpower resource allocation
CN102929967B (en) The system and method for magnanimity generating random number, storage and search
CN113112304A (en) Intelligent prize distribution method and system
CN110442619B (en) Search result ordering method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination