CN113034207A - Lottery information processing method, device, server and readable storage medium - Google Patents

Lottery information processing method, device, server and readable storage medium Download PDF

Info

Publication number
CN113034207A
CN113034207A CN202110425734.4A CN202110425734A CN113034207A CN 113034207 A CN113034207 A CN 113034207A CN 202110425734 A CN202110425734 A CN 202110425734A CN 113034207 A CN113034207 A CN 113034207A
Authority
CN
China
Prior art keywords
lottery
information
cache
user
activity
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
CN202110425734.4A
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.)
Qingdao Guancheng Software Co ltd
Original Assignee
Qingdao Guancheng 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 Qingdao Guancheng Software Co ltd filed Critical Qingdao Guancheng Software Co ltd
Priority to CN202110425734.4A priority Critical patent/CN113034207A/en
Publication of CN113034207A publication Critical patent/CN113034207A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Computational Linguistics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to the technical field of computers, and discloses a lottery drawing information processing method, a lottery drawing information processing device, a server and a readable storage medium, wherein the lottery drawing information processing method comprises the following steps: respectively adding the time-consuming work tasks in the lottery drawing process into different work queues; respectively writing lottery activity information in a database and a cache, reading the lottery activity information from the cache and issuing the lottery activity information; receiving user lottery drawing information sent by terminal equipment, calling the lottery drawing activity rule in the cache to judge the user lottery drawing information, and adding a work task for processing the user lottery drawing information into a corresponding work queue when the user lottery drawing information is judged to be in accordance with the lottery drawing activity rule; settling the received lottery drawing information of the user to obtain winning information, and storing the winning information into a cache and a database; and reading the winning information in the cache and returning a winning result to the terminal equipment. The invention can effectively avoid the problem of logic confusion when lottery drawing information is processed at high concurrency.

Description

Lottery information processing method, device, server and readable storage medium
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a lottery drawing information processing method, a lottery drawing information processing device, a server and a readable storage medium.
Background
The conventional lottery event is generally drawn manually by lottery personnel, and as network technology develops, the lottery event starts to be networked and automated. In an existing lottery system, a display interface of a lottery activity has a lottery background configuration end, which is used to configure basic information of the lottery activity, lottery rule configuration information, and prize configuration information, for example, the basic information may be a name, a start time, an end time, and an activity description of the lottery activity, the lottery rule configuration information may include a daily lottery number and a total number of wins, and the prize configuration information may include information such as prize items, prize names, prize numbers, and inventory.
Because the existing lottery system developed independently is slow in lottery calculation, under the condition of overlarge data volume, the bottleneck of an I/O port (input/output port) is easily caused, the disaster tolerance capability of the system needs to be considered, and when a server is started, more loading time needs to be consumed, so that the processing speed is slow; a large number of read/write requests cause all the following requests to queue and wait, and the next request can be processed only after the previous update completes releasing the line lock, so that a large number of requests wait and occupy the connection of the database. Once the number of connections in the same time slice of the database is filled, all other subsequent requests in the time slice are overtime due to the fact that the connections cannot be taken, and other links for accessing the database are also problematic, so that the access volume is extremely high.
Disclosure of Invention
An object of the present invention is to provide a lottery information processing method, apparatus, server and readable storage medium for solving at least one of the problems in the prior art described above.
In order to achieve the purpose, the invention adopts the following technical scheme:
in a first aspect, the present invention provides a lottery information processing method, the method comprising:
respectively adding a plurality of work tasks in the lottery drawing process into different work queues;
respectively writing lottery activity information in a database and a cache, reading the lottery activity information from the cache and issuing the lottery activity information; wherein, lottery activity rules are embedded in the lottery activity information;
receiving user lottery drawing information sent by terminal equipment, calling the lottery drawing activity rule in the cache to judge the user lottery drawing information, adding a work task for processing the user lottery drawing information into a corresponding work queue when the user lottery drawing information is judged to be in accordance with the lottery drawing activity rule, and returning prompt information that a user successfully participates in lottery drawing to the terminal equipment;
settling the received user lottery information to obtain winning information, and storing the winning information into the cache and the database;
and reading the winning information in the cache and returning a winning result to the terminal equipment.
Further, the work queue comprises a participation queue, a lottery drawing queue and a statistic queue;
the participation queue is used for processing the work tasks of the users participating in the lottery;
the lottery drawing queue is used for processing the work task of drawing the lottery of the lottery drawing activity;
the statistic queue is used for processing the work task of distributing statistic data of the prizes.
Further, the lottery activity rule includes: the number of participants is limited, the lottery drawing time, the drawing time and the lottery drawing activity identification.
Further, calling the lottery activity rule in the cache to judge the lottery information of the user, including:
calling the lottery activity rule in the cache, and judging whether the lottery activity corresponding to the received lottery information of the user exists or not based on the lottery activity mark;
if yes, judging whether the receiving time stamp of the lottery drawing information of the user is in the lottery drawing time range;
if the current lottery activity is in the lottery time range, judging whether the number of the remaining lottery participants in the cache is zero;
and if the number of the remaining lottery drawing persons capable of participating in the cache is not zero, adding the users corresponding to the user lottery drawing information into the participation queue and updating the number of the remaining lottery drawing persons capable of participating in the cache.
Further, before settling the received lottery information of the user to obtain winning information and storing the winning information in the cache and the database, the method further includes:
and calling the participation queue to add the users corresponding to the user lottery drawing information into a participation record and process tasks, and writing the participation record into the database and updating the participation record into the cache.
Further, the settling the received user lottery information to obtain winning information, and storing the winning information in the cache and the database includes:
calling the lottery drawing queue to acquire lottery drawing activities to be drawn from the cache, generating a random number and a lottery pool, and acquiring winning information based on preset winning logic;
writing the winning information into the database and updating the winning information into the cache;
and calling the statistic queue to carry out statistics on the award dispensing data.
Further, reading the winning information in the cache and returning a winning result to the terminal device, including:
receiving a request for inquiring whether a prize is won or not sent by a user through the terminal equipment;
reading the winning information in the cache and judging whether the user wins;
and returning the winning result to the terminal equipment.
In a second aspect, the present invention provides a lottery information processing apparatus, the apparatus comprising:
the work task distribution module is used for respectively adding a plurality of work tasks in the lottery drawing process into different work queues;
the lottery activity publishing module is used for writing lottery activity information in a database and a cache respectively, reading the lottery activity information from the cache and publishing the lottery activity information; wherein, lottery activity rules are embedded in the lottery activity information;
the lottery drawing information receiving module is used for receiving the user lottery drawing information sent by the terminal equipment, calling the lottery drawing activity rule in the cache to judge the user lottery drawing information, adding a work task for processing the user lottery drawing information into a corresponding work queue when the user lottery drawing information is judged to be in accordance with the lottery drawing activity rule, and returning prompt information that the user successfully participates in lottery drawing to the terminal equipment;
the winning information acquisition module is used for settling the received lottery information of the user to obtain winning information and storing the winning information into the cache and the database;
and the winning result returning module is used for reading the winning information in the cache and returning the winning result to the terminal equipment.
In a third aspect, the present invention further provides a server, including: a processor, a memory and a computer program stored on the memory and operable on the processor, characterized in that the processor implements the steps of the lottery information processing method according to the first aspect when executing the computer program.
In a fourth aspect, the present invention also provides a readable storage medium having stored thereon instructions which, when run on a computer, perform the steps of the lottery information processing method according to the first aspect.
Has the advantages that:
the lottery drawing information processing method of the invention respectively adds the time-consuming work tasks in the lottery drawing process into different work queues in advance; then writing lottery activity information in the database and the cache respectively and issuing the lottery activity information; then calling the lottery activity rule in the cache to judge the received lottery information of the user, and adding the lottery information of the user into a corresponding work queue if the judgment is yes; and settling the received user lottery information to obtain winning information, and returning a winning result to the terminal equipment. The invention can effectively avoid the problem of logic confusion when lottery drawing information is processed at high concurrency; the number of users participating in lottery drawing can be set through the lottery drawing activity rule, so that the problem of server blockage is further avoided; the problem of overlarge database pressure when the database is read can be avoided by writing the data information generated in the lottery activity into the buffer; the work tasks are processed through the work queue, so that the activities of the users participating in the lottery can be run through other processors, and the data processing pressure of the server is further relieved; by generating the random number and the prize pool and acquiring the prize drawing information based on the preset prize drawing logic, the fairness and the justice of the prize drawing activities can be ensured.
Drawings
Fig. 1 is a schematic flow chart of a lottery information processing method in an embodiment of the present invention;
FIG. 2 is an interaction diagram of step 2 in an embodiment of the present invention;
FIG. 3 is an interaction diagram of step 3 in the embodiment of the present invention;
FIG. 4 is an interaction diagram of step 4 in the embodiment of the present invention;
FIG. 5 is an interaction diagram of step 5 in an embodiment of the present invention;
fig. 6 is a block diagram of a lottery information processing apparatus in the embodiment of the present invention.
Detailed Description
The invention is further described with reference to the following figures and specific embodiments. It should be noted that the description of the embodiments is provided to help understanding of the present invention, but the present invention is not limited thereto. Specific structural and functional details disclosed herein are merely illustrative of example embodiments of the invention. This invention may, however, be embodied in many alternate forms and should not be construed as limited to the embodiments set forth herein.
Example one
As shown in fig. 1 to 5, the lottery information processing method provided in the first aspect of this embodiment may be, but is not limited to, used for customer incentive of an evaluation mechanism in an industry internet platform, for example, customer incentive of an evaluation mechanism in an e-commerce platform, and then the evaluation mechanism includes, but is not limited to: after-sale evaluation, additional evaluation, refund evaluation, good evaluation with present, default good evaluation, bidirectional evaluation, directional question asking and the like. Then certain customer incentives, such as lottery activity, may be set based on the rating mechanism to increase the customer's motivation.
The lottery drawing information processing method includes but is not limited to being executed by a processor, and may but is not limited to including the following steps 1-5:
step 1: respectively adding a plurality of work tasks in the lottery drawing process into different work queues;
it should be noted that, in the step 1, the plurality of work tasks are work tasks which are relatively time-consuming in the lottery activity, and include, but are not limited to, work tasks for processing a user to participate in the lottery, work tasks for processing a lottery drawing of the lottery activity, and work tasks for processing statistical data of issuing a prize, and it is understood that the work tasks may be further classified according to the settings of different lottery activity rules, and are not particularly limited; in addition, the embodiment is further provided with a work queue corresponding to the work task, including but not limited to a participation queue, a lottery drawing queue and a statistic queue; the participation queue is used for processing the work tasks of the users participating in the lottery; the lottery drawing queue is used for processing the work task of drawing the lottery of the lottery drawing activity; the statistic queue is used for processing the work task of distributing statistic data of the prizes.
Step 2: respectively writing lottery activity information in a database and a cache, reading the lottery activity information from the cache and issuing the lottery activity information; wherein, lottery activity rules are embedded in the lottery activity information;
in step 2, the database is preferably a Mysql/MongoDB storage database, and the cache is preferably a Redis cache; by respectively writing the lottery activity information into the database and the cache, the processor can directly read the lottery activity information from the cache and issue the lottery activity information without reading the lottery activity information from the database, and the data processing pressure of the database can be effectively reduced. The lottery activity rule comprises a participant number limit, lottery time, drawing time and a lottery activity mark.
And step 3: receiving user lottery drawing information sent by terminal equipment, calling the lottery drawing activity rule in the cache to judge the user lottery drawing information, adding a work task for processing the user lottery drawing information into a corresponding work queue when the user lottery drawing information is judged to be in accordance with the lottery drawing activity rule, and returning prompt information that the user successfully participates in lottery drawing to the terminal equipment;
it should be noted that, in step 3, the terminal device may be an intelligent terminal used by a user, such as a smart phone and a tablet computer, and may also be a desktop computer and a notebook computer, which is not limited specifically. The lottery drawing information of the user is sent by the terminal equipment, and interaction between the terminal equipment and the server can be realized. Illustratively, when a user clicks a login button in a display interface of the intelligent terminal, the intelligent terminal sends corresponding login information to the server according to login function logic triggered after the button is clicked so as to perform data interaction to complete a login function.
In a possible design, the step 3 of calling the lottery activity rule in the cache to determine the lottery information of the user specifically includes:
step 3.1: calling the lottery activity rule in the cache, and judging whether the lottery activity corresponding to the received lottery information of the user exists or not based on the lottery activity mark;
step 3.2: if yes, judging whether the receiving time stamp of the lottery drawing information of the user is in the lottery drawing time range;
step 3.3: if the current lottery activity is in the lottery time range, judging whether the number of the remaining lottery participants in the cache is zero;
step 3.4: and if the number of the remaining lottery drawing persons capable of participating in the cache is not zero, adding the users corresponding to the user lottery drawing information into the participation queue and updating the number of the remaining lottery drawing persons capable of participating in the cache.
It should be noted that, the cache processes the remaining inventory of the number of persons who can participate in the lottery in a Redis lock mode, and when the inventory is zero, the user is not added to the participation record any more, so that the pressure of data processing can be effectively reduced.
In this embodiment, a user sends lottery drawing information through a terminal device to request for participation in a lottery drawing, a processor first determines whether a lottery drawing activity corresponding to the lottery drawing information sent by the user exists, if so, further determines whether the current lottery drawing activity is within a preset lottery drawing time range, and if not, returns, although it can be understood that prompt information that the current lottery drawing activity does not exist may also be fed back to the user here; if the current lottery activity is in the preset lottery time range, further judging whether the remaining names capable of participating in the lottery remain in the cache, if the current lottery activity is not in the preset lottery time range, not executing the process and returning the process, and naturally, the user can also be fed back that the time of the current lottery request is not in the preset lottery time range; if the remaining lottery-drawing titles exist in the cache, adding the user into the participation queue, updating the stock number in the cache, and then returning prompt information of successful lottery-drawing participation to the user.
In a possible design, further, before receiving user lottery drawing information sent by a terminal device, calling the lottery drawing activity rule in the cache to determine the user lottery drawing information, and adding the user lottery drawing information into a corresponding work queue if the result is yes, and returning a prompt message that the user successfully participates in lottery drawing to the terminal device, the method further includes:
and calling the participation queue to add the user corresponding to the user information into a participation record and process a task, and writing the participation record into the database and updating the participation record into the cache.
And 4, step 4: settling the received user lottery information to obtain winning information, and storing the winning information into the cache and the database;
it should be noted that, in step 4, the received lottery drawing information of the user may be settled through the processor to obtain winning information; of course, in a possible design, if the lottery task is too heavy or the number of participants is large, the task to be settled can be obtained by setting a timing task and added to the corresponding work queue, which is specifically as follows:
step 4.1: calling the lottery drawing queue to acquire lottery drawing activities to be drawn from the cache, generating a random number and a lottery pool, and acquiring winning information based on preset winning logic;
step 4.2: writing the winning information into the database and updating the winning information into the cache;
step 4.3: and calling the statistic queue to carry out statistics on the award dispensing data.
And 5: and reading the winning information in the cache and returning a winning result to the terminal equipment.
In one possible design, the step 5 may include:
step 5.1: receiving a request for inquiring whether a prize is won or not sent by a user through the terminal equipment;
step 5.2: reading the winning information in the cache and judging whether the user wins;
step 5.3: and returning the winning result to the terminal equipment.
In the lottery drawing information processing method in the embodiment, the time-consuming work tasks in the lottery drawing process are respectively added into different work queues in advance; then writing lottery activity information in the database and the cache respectively and issuing the lottery activity information; then calling the lottery activity rule in the cache to judge the received lottery information of the user, and adding the lottery information of the user into a corresponding work queue if the judgment is yes; and settling the received user lottery information to obtain winning information, and returning a winning result to the terminal equipment. The invention can effectively avoid the problem of logic confusion when lottery drawing information is processed at high concurrency; the number of users participating in lottery drawing can be set through the lottery drawing activity rule, so that the problem of server blockage is further avoided; the problem of overlarge database pressure when the database is read can be avoided by writing the data information generated in the lottery activity into the buffer; the work tasks are processed through the work queue, so that the activities of the users participating in the lottery can be run through other processors, and the data processing pressure of the server is further relieved; by generating the random number and the prize pool and acquiring the prize drawing information based on the preset prize drawing logic, the fairness and the justice of the prize drawing activities can be ensured.
Example two
As shown in fig. 6, in addition to the first embodiment, the present embodiment also provides a lottery information processing apparatus, including:
the work task distribution module is used for respectively adding the work tasks which are relatively time-consuming in the lottery drawing process into different work queues;
the lottery activity publishing module is used for writing lottery activity information in a database and a cache respectively, reading the lottery activity information from the cache and publishing the lottery activity information; wherein, lottery activity rules are embedded in the lottery activity information;
the lottery drawing information receiving module is used for receiving the user lottery drawing information sent by the terminal equipment, calling the lottery drawing activity rule in the cache to judge the user lottery drawing information, adding the user lottery drawing information into a corresponding work queue when the user lottery drawing information is judged to be yes, and returning prompt information that the user successfully participates in lottery drawing to the terminal equipment;
the winning information acquisition module is used for settling the received lottery information of all users to obtain winning information and storing the winning information into the cache and the database;
and the winning result returning module is used for reading the winning information in the cache and returning the winning result to the terminal equipment.
In one possible design, the work queues include a participation queue, a prize draw queue, and a statistics queue;
the participation queue is used for processing the work tasks of the users participating in the lottery;
the lottery drawing queue is used for processing the work task of drawing the lottery of the lottery drawing activity;
the statistic queue is used for processing the work task of distributing statistic data of the prizes.
In one possible design, the lottery activity rule includes: the number of participants, the drawing time and the drawing time.
In one possible design, the lottery information receiving module includes:
the first judging unit is used for calling the lottery activity rule in the cache and judging whether the lottery activity corresponding to the received lottery information of the user exists or not based on the lottery activity rule;
the second judgment unit is used for judging whether the current lottery activity is in the lottery time range or not if the current lottery activity exists;
the third judgment unit is used for judging whether the number of remaining lottery drawing persons capable of participating in the cache is zero or not if the current lottery drawing activity is in the lottery drawing time range;
and the user joining unit is used for not executing and returning if the number of the remaining lotable lottery drawing persons in the cache is zero, and otherwise, joining the user into the participation queue and updating the number of the remaining lotable lottery drawing persons in the cache.
In one possible design, the apparatus further includes:
and the participation record writing module is used for calling the participation queue to add the user into the participation record and process the task, and writing the participation record into the database and updating the participation record into the cache.
In one possible design, the winning information obtaining module includes:
the winning information acquisition unit is used for calling the lottery drawing queue to acquire the lottery drawing activities to be drawn from the cache, generating a random number and a prize pool, and acquiring winning information based on preset winning logic;
the winning information writing unit is used for writing the winning information into the database and updating the winning information into the cache;
and the prize counting unit is used for calling the counting queue to count the prize issuing data.
In one possible design, the winning result return module includes:
a request receiving unit for receiving a request for inquiring whether a prize is won or not transmitted from a user through the terminal device;
the fourth judging unit is used for reading the winning information in the cache and judging whether the user wins;
and the result returning unit is used for returning the winning result to the terminal equipment.
For the working process, the working details and the technical effects of the foregoing device provided in the second aspect of this embodiment, reference may be made to the lottery information processing method possibly designed in any one of the first aspect or the first aspect, and details are not described herein again.
EXAMPLE III
On the basis of the second embodiment, the present embodiment further provides a server, including: the lottery information processing method comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the computer program, the steps of the lottery information processing method according to the first embodiment are realized, and the details are not repeated herein.
For the working process, the working details, and the technical effects of the foregoing server provided in the third aspect of this embodiment, reference may be made to the first aspect or any one of the possible lottery information processing methods that are designed in the first aspect, and details are not described herein again.
Example four
On the basis of the third embodiment, the present embodiment further provides a readable storage medium, which stores instructions that, when executed on a computer, perform the steps of the lottery information processing method according to the first embodiment. The readable storage medium refers to a carrier for storing data, and may include, but is not limited to, a floppy disk, an optical disk, a hard disk, a flash Memory, a flash disk and/or a Memory Stick (Memory Stick), etc., and the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. For the working process, the working details and the technical effects of the readable storage medium, reference may be made to the lottery information processing method in any embodiment, which is not described herein again.
For the working process, the working details, and the technical effects of the foregoing readable storage medium provided in the fourth aspect of this embodiment, reference may be made to the first aspect or any one of the possible designs of the lottery information processing method in the first aspect, and details are not described herein again.
Finally, it should be noted that: the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A lottery information processing method, characterized in that the method comprises:
respectively adding a plurality of work tasks in the lottery drawing process into different work queues;
respectively writing lottery activity information in a database and a cache, reading the lottery activity information from the cache and issuing the lottery activity information; wherein, lottery activity rules are embedded in the lottery activity information;
receiving user lottery drawing information sent by terminal equipment, calling the lottery drawing activity rule in the cache to judge the user lottery drawing information, adding a work task for processing the user lottery drawing information into a corresponding work queue when the user lottery drawing information is judged to be in accordance with the lottery drawing activity rule, and returning prompt information that a user successfully participates in lottery drawing to the terminal equipment;
settling the received user lottery information to obtain winning information, and storing the winning information into the cache and the database;
and reading the winning information in the cache and returning a winning result to the terminal equipment.
2. The lottery information processing method of claim 1, wherein the work queue includes a participation queue, a drawing queue, and a statistics queue;
the participation queue is used for processing the work tasks of the users participating in the lottery;
the lottery drawing queue is used for processing the work task of drawing the lottery of the lottery drawing activity;
the statistic queue is used for processing the work task of distributing statistic data of the prizes.
3. The lottery information processing method of claim 2, wherein the lottery activity rule comprises: the number of participants is limited, the lottery drawing time, the drawing time and the lottery drawing activity identification.
4. The lottery information processing method of claim 3, wherein the step of calling the lottery activity rule in the cache to determine the lottery information of the user comprises:
calling the lottery activity rule in the cache, and judging whether the lottery activity corresponding to the received lottery information of the user exists or not based on the lottery activity mark;
if yes, judging whether the receiving time stamp of the lottery drawing information of the user is in the lottery drawing time range;
if the current lottery activity is in the lottery time range, judging whether the number of the remaining lottery participants in the cache is zero;
and if the number of the remaining lottery drawing persons capable of participating in the cache is not zero, adding the users corresponding to the user lottery drawing information into the participation queue and updating the number of the remaining lottery drawing persons capable of participating in the cache.
5. The lottery information processing method of claim 2, before settling the received user lottery information to obtain winning information and storing the winning information in the cache and the database, further comprising:
and calling the participation queue to add the users corresponding to the user lottery drawing information into a participation record and process tasks, and writing the participation record into the database and updating the participation record into the cache.
6. The lottery information processing method according to claim 2, wherein the settling the received user lottery information to obtain winning information and storing the winning information in the cache and the database includes:
calling the lottery drawing queue to acquire lottery drawing activities to be drawn from the cache, generating a random number and a lottery pool, and acquiring winning information based on preset winning logic;
writing the winning information into the database and updating the winning information into the cache;
and calling the statistic queue to carry out statistics on the award dispensing data.
7. The lottery information processing method according to claim 2, wherein reading the winning information in the buffer and returning a winning result to the terminal device, comprises:
receiving a request for inquiring whether a prize is won or not sent by a user through the terminal equipment;
reading the winning information in the cache and judging whether the user wins;
and returning the winning result to the terminal equipment.
8. A lottery information processing apparatus, characterized in that the apparatus comprises:
the work task distribution module is used for respectively adding a plurality of work tasks in the lottery drawing process into different work queues;
the lottery activity publishing module is used for writing lottery activity information in a database and a cache respectively, reading the lottery activity information from the cache and publishing the lottery activity information; wherein, lottery activity rules are embedded in the lottery activity information;
the lottery drawing information receiving module is used for receiving the user lottery drawing information sent by the terminal equipment, calling the lottery drawing activity rule in the cache to judge the user lottery drawing information, adding a work task for processing the user lottery drawing information into a corresponding work queue when the user lottery drawing information is judged to be in accordance with the lottery drawing activity rule, and returning prompt information that the user successfully participates in lottery drawing to the terminal equipment;
the winning information acquisition module is used for settling the received lottery information of the user to obtain winning information and storing the winning information into the cache and the database;
and the winning result returning module is used for reading the winning information in the cache and returning the winning result to the terminal equipment.
9. A server, comprising: a processor, a memory, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the lottery information processing method according to any one of claims 1-7 when executing the computer program.
10. A readable storage medium, characterized in that the readable storage medium has stored thereon instructions which, when executed on a computer, perform the steps of the lottery information processing method according to any one of claims 1 to 7.
CN202110425734.4A 2021-04-20 2021-04-20 Lottery information processing method, device, server and readable storage medium Pending CN113034207A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110425734.4A CN113034207A (en) 2021-04-20 2021-04-20 Lottery information processing method, device, server and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110425734.4A CN113034207A (en) 2021-04-20 2021-04-20 Lottery information processing method, device, server and readable storage medium

Publications (1)

Publication Number Publication Date
CN113034207A true CN113034207A (en) 2021-06-25

Family

ID=76457043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110425734.4A Pending CN113034207A (en) 2021-04-20 2021-04-20 Lottery information processing method, device, server and readable storage medium

Country Status (1)

Country Link
CN (1) CN113034207A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103825835A (en) * 2013-11-29 2014-05-28 中邮科通信技术股份有限公司 Internet high concurrency seckilling system
CN107220853A (en) * 2017-05-27 2017-09-29 北京奇虎科技有限公司 Prize drawing data processing method, device, server and computer-readable storage medium
US20180047042A1 (en) * 2015-04-17 2018-02-15 Sosun Corporation System and method for lucky draw
CN109598551A (en) * 2018-11-30 2019-04-09 网易(杭州)网络有限公司 A kind of the game lottery drawing method and device of distributed server structure
CN110309670A (en) * 2019-06-18 2019-10-08 阿里巴巴集团控股有限公司 A kind of prize drawing background service method, system and equipment
CN111258768A (en) * 2018-11-30 2020-06-09 中国移动通信集团湖南有限公司 Concurrent processing method and device for preferential lottery activity
CN111861566A (en) * 2020-07-22 2020-10-30 南京欣网互联网络科技有限公司 Distributed cache-based prize pool dynamic control method and system
CN112131496A (en) * 2020-09-15 2020-12-25 北京值得买科技股份有限公司 Webpage voting data processing method, device and equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103825835A (en) * 2013-11-29 2014-05-28 中邮科通信技术股份有限公司 Internet high concurrency seckilling system
US20180047042A1 (en) * 2015-04-17 2018-02-15 Sosun Corporation System and method for lucky draw
CN107220853A (en) * 2017-05-27 2017-09-29 北京奇虎科技有限公司 Prize drawing data processing method, device, server and computer-readable storage medium
CN109598551A (en) * 2018-11-30 2019-04-09 网易(杭州)网络有限公司 A kind of the game lottery drawing method and device of distributed server structure
CN111258768A (en) * 2018-11-30 2020-06-09 中国移动通信集团湖南有限公司 Concurrent processing method and device for preferential lottery activity
CN110309670A (en) * 2019-06-18 2019-10-08 阿里巴巴集团控股有限公司 A kind of prize drawing background service method, system and equipment
CN111861566A (en) * 2020-07-22 2020-10-30 南京欣网互联网络科技有限公司 Distributed cache-based prize pool dynamic control method and system
CN112131496A (en) * 2020-09-15 2020-12-25 北京值得买科技股份有限公司 Webpage voting data processing method, device and equipment

Similar Documents

Publication Publication Date Title
CN106157071A (en) A kind of method and system of public's account prize drawing
US9529651B2 (en) Apparatus and method for executing agent
CN107172182A (en) A kind of information push method, message push server and terminal
CN109948882B (en) Task processing method based on block data structure and related equipment
CN111667348A (en) Order splicing method and device
CN111026758B (en) Electronic ticket issuing method and device
CN111768174A (en) Activity management method, apparatus, device and medium
CN111352753A (en) Accounting processing method and device
CN110322612B (en) Business data processing method and device, computing equipment and storage medium
US20160042476A1 (en) Methods and systems for remunerating crowdworkers
CN112950294A (en) Information sharing method and device, electronic equipment and storage medium
CN113034207A (en) Lottery information processing method, device, server and readable storage medium
KR20020043463A (en) Evaluating method of tender price, and online tender system and tender service method using the same for electronic tender
CN111210256A (en) Resource allocation method and device, server and storage medium
JP2021033691A (en) Electronic currency exchange device, electronic currency exchange method, and electronic currency exchange system
CN109300055A (en) Investment-linked insurance profit and loss querying method, device, equipment and readable storage medium storing program for executing
CN111050001A (en) Telephone traffic distribution method and related device
CN113018863B (en) Resource processing method, device, client and storage medium
CN110852806A (en) Data processing method and device, storage medium and electronic equipment
CN113407337A (en) Resource allocation method, device, server and medium
CN114912880A (en) False duty processing method and device, computer equipment and storage medium
JP7419215B2 (en) Electronic money exchange device, electronic money exchange method and electronic money exchange system
JP2020137921A (en) Information processing device, information processing method, and information processing program
CN112200961B (en) Page generation method, device, system, electronic equipment and computer readable medium
CN114037469A (en) Lottery drawing method, device, 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210625