Method and apparatus for processing lottery data, electronic device, and medium
By dividing the event period into multiple time windows and dynamically adjusting the lottery information and winning criteria based on the window status, the problem of lottery delays and resource waste caused by a sharp increase in the number of participants was solved, achieving uniform and efficient prize distribution.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2023-08-30
- Publication Date
- 2026-06-12
AI Technical Summary
In scenarios with regular lottery draws, when the number of participants increases dramatically, the processing time of the scheduling system will be extended, which may lead to a delay in the draw time. In addition, additional scheduling resources or capacity expansion are required, which is costly. At the same time, it is difficult to guarantee the even distribution of lottery results.
The event period is divided into multiple time windows. The lottery information and winning benchmark information are dynamically adjusted according to the lottery status of the target time window. By adjusting the factors, the lottery probability and benchmark value are optimized to achieve uniform and efficient prize distribution.
It achieves a stable and continuous prize distribution rate even with a surge in the number of users, reduces the need for additional resources, and improves the efficiency and timeliness of prize draw processing.
Smart Images

Figure CN117079381B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of Internet technology, and in particular to a method, apparatus, electronic device, and medium for processing lottery data. Background Technology
[0002] In order to promote business development, some internet applications often set up prize draws to attract users to participate or to reward users.
[0003] In realizing the present invention, the inventors discovered the following technical problems in the related technologies: In the related technologies, in a periodic lottery scenario, the server assigns a lottery number to each user participating in the lottery and stores it in a number pool; the scheduling system periodically executes a lottery algorithm on the number pool, for example, waiting for the amount of data in the number pool to reach a certain threshold (e.g., 1000 or other values) before drawing a preset number of numbers from the number pool as winning numbers, thereby generating winning information; however, when faced with a scenario where the number of participants increases dramatically, the processing time of the scheduling system needs to be extended, which may cause a delay in the lottery draw time; in this case, in order to ensure that the lottery results are obtained on time, it is necessary to add more scheduling resources or expand the server capacity, which is costly. Summary of the Invention
[0004] To solve the above-mentioned technical problems, or at least partially solve them, embodiments of this disclosure provide a method, apparatus, electronic device, and medium for processing lottery data.
[0005] In a first aspect, embodiments of this disclosure provide a method for processing lottery data. The method includes: receiving a lottery participation request within an activity period; generating lottery information corresponding to the lottery participation request; determining a target time window where the participation time of the lottery participation request is located based on a pre-divided time window of the activity period; determining lottery adjustment information based on the lottery status of the target time window; the lottery adjustment information being used to indicate adjustments to at least one of the lottery information and winning criteria information and including the adjustment content, or to indicate that the lottery information and the winning criteria information are not adjusted; determining target lottery information and target winning criteria information for the participation time based on the lottery adjustment information; and generating participation result information for the lottery participation request based on the target lottery information and the target winning criteria information.
[0006] According to an embodiment of this disclosure, determining lottery adjustment information based on the lottery status of the target time window includes: determining lottery adjustment information based on the time progress of the target time window, the window prize inventory information at the participation time, and the lottery participation result of the previous time.
[0007] According to embodiments of this disclosure, the lottery information includes a lottery random number, and the winning benchmark information includes a winning benchmark value. Based on the time progress of the target time window, the window prize inventory information at the time of participation, and the lottery participation result at the previous time, lottery adjustment information is determined, including: when the time progress is within the target time window, the window prize inventory information indicates that the window prize inventory is zero, and the lottery participation result at the previous time is a winning result, the lottery adjustment information is determined as the first adjustment information. The aforementioned first adjustment information is used to instruct the execution of the following first adjustments: adjusting the aforementioned random number of the lottery based on a first adjustment factor to make it smaller, such that the lottery information in the remaining period of the aforementioned target time window is less than the winning benchmark value at the corresponding time; or, adjusting the winning benchmark value based on a second adjustment factor to make it larger, such that the lottery random number in the remaining period of the aforementioned target time window is less than the winning benchmark value at the corresponding time; or, adjusting the aforementioned random number of the lottery based on the first adjustment factor to make it smaller, and adjusting the winning benchmark value based on the second adjustment factor to make it larger; such that the aforementioned first adjustment factor and the aforementioned second adjustment factor make the lottery random number in the remaining period of the aforementioned target time window less than the winning benchmark value at the corresponding time.
[0008] According to embodiments of this disclosure, the aforementioned lottery information includes a lottery random number, and the aforementioned winning benchmark information includes a winning benchmark value. Lottery adjustment information is determined based on the time progress of the aforementioned target time window, the window prize inventory information at the aforementioned participation time, and the lottery participation result of the previous time. This includes: determining the lottery adjustment information as second adjustment information when the aforementioned time progress exceeds a first set progress threshold, the aforementioned window prize inventory information indicates that the window prize inventory is greater than a set value or a set proportion, and the lottery participation result of the previous time is no winning. The aforementioned second adjustment information is used to instruct the execution of the following second adjustment: adjusting the lottery random number at the participation time to be larger based on a third adjustment factor; or adjusting the winning benchmark value at the participation time to be smaller based on a fourth adjustment factor; or adjusting the lottery random number at the participation time to be larger based on a third adjustment factor, and adjusting the winning benchmark value at the participation time to be smaller based on a fourth adjustment factor.
[0009] According to embodiments of this disclosure, the lottery information includes a lottery random number, and the winning benchmark information includes a winning benchmark value. Lottery adjustment information is determined based on the time progress of the target time window, the window prize inventory information at the participation time, and the lottery participation result of the previous time. This includes: determining the lottery adjustment information as third adjustment information when the time progress is less than a second set progress threshold, the window prize inventory information indicates that the window prize inventory is higher than a set value or a set proportion, and the lottery participation result of the previous time is no winning. The third adjustment information is used to indicate that the lottery random number and the winning benchmark value are not adjusted; or, when the time progress is greater than the second set progress threshold... If the time progress is less than the first set progress threshold, the window prize inventory information indicates that the window prize inventory is less than the set value or set proportion, and the previous lottery participation result is no winning, then the lottery adjustment information is determined to be the third adjustment information. The third adjustment information is used to indicate that the lottery random number and the winning benchmark value are not adjusted. If the first set progress threshold is greater than the second set progress threshold; or, if the time progress is less than the second set progress threshold, the window prize inventory information indicates that the window prize inventory is non-zero, the window prize inventory is less than the set value or set proportion, and the previous lottery participation result is a winning, then the lottery adjustment information is determined to be the fourth adjustment information. The fourth adjustment information is used to indicate the execution of the following fourth adjustment: adjusting the lottery random number at the participation time to be smaller based on the fifth adjustment factor; or, adjusting the winning benchmark value at the participation time to be larger based on the sixth adjustment factor; or, adjusting the lottery random number at the participation time to be smaller based on the fifth adjustment factor, and adjusting the winning benchmark value at the participation time to be larger based on the sixth adjustment factor.
[0010] According to embodiments of this disclosure, determining lottery adjustment information based on the lottery status of the target time window includes: determining adjustment direction information based on the user identifier, wherein the adjustment direction information indicates an adjustment direction for adjusting at least one of the lottery random number and winning benchmark value corresponding to the user identifier, such that the winning probability corresponding to the user identifier increases, decreases, or remains unchanged; determining lottery adjustment information based on the time progress of the target time window, the window prize inventory information at the participation time, and the lottery participation result of the previous time; and determining the lottery adjustment information based on whether the lottery adjustment information is consistent with the adjustment direction indicated by the adjustment direction information. The validity of the above-mentioned lottery adjustment information is as follows: if the adjustment direction indicated by the above-mentioned adjustment direction information is consistent with the adjustment direction information, the above-mentioned lottery adjustment information is considered valid and will be used in the event that there is no adjustment in the next moment; if the basic lottery adjustment information is inconsistent with the adjustment direction indicated by the above-mentioned adjustment direction information, the above-mentioned lottery adjustment information is considered invalid, and the target lottery adjustment information corresponding to the above-mentioned lottery participation request is determined according to the adjustment direction information; the above-mentioned target lottery adjustment information is only applicable to this lottery participation request, and the lottery adjustment information corresponding to the previous moment of the above-mentioned participation time will be used in the event that there is no adjustment in the next moment.
[0011] According to embodiments of this disclosure, the method further includes: obtaining the resource usage status at the time of participation; and, if the resource usage status indicates that the utilization rate of the target resource is less than a set threshold, performing the following steps: determining lottery adjustment information based on the window lottery status of the target time window; generating a predicted winning result based on the lottery information and winning benchmark information at the time of participation if the resource usage status indicates that the utilization rate of the target resource exceeds the set threshold; determining whether the window prize inventory information within the target time window meets the award conditions if the window prize inventory information meets the award conditions; and determining that the participation result information of the lottery participation request is a winning result if the predicted winning result is a winning result.
[0012] According to embodiments of this disclosure, the method further includes: when the window prize inventory information does not meet the award conditions, determining that the participation result information of the lottery participation request is "not won" and marking the user of the lottery participation request as "to be compensated"; when another lottery participation request of a user marked with the "to be compensated" tag appears in another time window of the above-mentioned activity period and the corresponding time window has window prize inventory, adjusting at least one of the lottery information and winning benchmark information of the other lottery participation request, so that the participation result information of the user marked with the "to be compensated" tag is "won".
[0013] According to an embodiment of this disclosure, if the window prize inventory information does not meet the award conditions, it is determined whether to borrow the window prize inventory of the next adjacent time window of the target time window; if the window prize inventory of the next adjacent time window is borrowed, the participation result information of the lottery participation request is determined to be a successful draw, and the window prize inventory of the next adjacent time window is updated.
[0014] According to embodiments of this disclosure, the method further includes: for the first lottery participation request within each time window, initializing the winning benchmark information and the corresponding random number generation interval within the current time window. Generating lottery information corresponding to the lottery participation request includes: randomly assigning a corresponding lottery random number to the lottery participation request within the random number generation interval; the lottery information includes the lottery random number.
[0015] According to embodiments of this disclosure, the winning criteria information includes a winning criteria value; the initialization of the winning criteria information within the current time window includes: determining the relative size of the window prize inventory information and the average window amount within the current time window; the average window amount represents the average distribution of all prizes across all time windows during the activity period; when the window prize inventory information is equal to the average window amount, determining the median value of the random number generation interval as the winning criteria value; when the window prize inventory information is greater than the average window amount, adjusting the median value to be smaller and using it as the winning criteria value; when the window prize inventory information is less than the average window amount, adjusting the median value to be larger and using it as the winning criteria value.
[0016] Secondly, embodiments of this disclosure provide an apparatus for processing lottery data. The apparatus includes: a request receiving module, an information generation module, a window determination module, an adjustment information determination module, a lottery information determination module, and a result generation module. The request receiving module receives lottery participation requests within an activity period. The information generation module generates lottery information corresponding to the lottery participation requests. The window determination module determines the target time window of the participation time of the lottery participation request based on a pre-divided time window within the activity period. The adjustment information determination module determines lottery adjustment information based on the lottery status of the window; the lottery adjustment information indicates that at least one of the lottery information and winning criteria information should be adjusted and includes the adjustment content, or indicates that neither the lottery information nor the winning criteria information should be adjusted. The lottery information determination module determines the target lottery information and target winning criteria information for the participation time based on the lottery adjustment information. The result generation module generates participation result information for the lottery participation request based on the target lottery information and the target winning criteria information.
[0017] Thirdly, embodiments of this disclosure provide an electronic device. The electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, communication interface, and memory communicate with each other via the communication bus; the memory stores computer programs; and the processor, when executing the program stored in the memory, implements the lottery data processing method described above.
[0018] Fourthly, embodiments of this disclosure provide a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the lottery data processing method described above.
[0019] The technical solutions provided in the embodiments of this disclosure have at least some or all of the following advantages:
[0020] During the lottery data processing, the activity period is pre-divided into multiple time windows. Upon receiving a lottery participation request, corresponding lottery information is generated. Based on the lottery status within the target time window where the lottery participation request falls, it is determined whether to adjust at least one of the lottery information and the winning benchmark information, or not to adjust either of them. That is, the adjustment factors of the lottery information and the winning benchmark information are used as parameters that change dynamically over time. The aforementioned window lottery status represents the prize distribution and remaining status at the participation time within the target time window, the lottery participation result of the lottery participation request at the previous time, etc. On the one hand, by dynamically adjusting at least one of the lottery information and the winning benchmark information, or not adjusting them, based on the window lottery status, the probability of winning at the current participation time is dynamically adjusted, thereby adjusting the prize distribution rate and number of prizes in each window. This helps to make the number of prizes in each time window more even, and from the perspective of the overall activity period, the prize distribution rate in each time window is stable and continuous. On the other hand, the overall lottery processing logic does not require an additional scheduling system. Instead, it calculates the participation results at each participation moment in real time with high efficiency. The processing time is controllable and it can cope with a surge in the number of users. Attached Figure Description
[0021] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0022] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.
[0023] Figure 1 The system architecture of the lottery data processing method and apparatus applicable to embodiments of this disclosure is schematically illustrated;
[0024] Figure 2 A flowchart illustrating a method for processing lottery data according to an embodiment of the present disclosure is shown schematically.
[0025] Figure 3 The illustration shows a schematic diagram of an implementation scenario of a lottery data processing method according to an embodiment of the present disclosure, wherein (a) is a schematic diagram of receiving various lottery participation requests during an activity period, and (b) is an example of lottery adjustment information corresponding to each lottery participation request.
[0026] Figure 4 A flowchart illustrating a method for processing lottery data according to another embodiment of this disclosure is shown schematically;
[0027] Figure 5 Two implementation flowcharts of step S240 according to an embodiment of the present disclosure are illustrated schematically;
[0028] Figure 6 A flowchart illustrating a method for processing lottery data according to yet another embodiment of this disclosure is shown schematically;
[0029] Figure 7 A structural block diagram of an apparatus for processing lottery data according to an embodiment of the present disclosure is shown schematically.
[0030] Figure 8 A schematic block diagram of an electronic device provided in an embodiment of the present disclosure is shown. Detailed Implementation
[0031] In related technologies, when faced with a sharp increase in the number of participants in a lottery, the processing time of the scheduling system needs to be extended, which may lead to delays in the lottery draw. In this case, to ensure timely lottery results, additional scheduling resources or server expansion are required, resulting in high costs. Furthermore, during development, it was found that whether a user wins a prize depends entirely on the algorithm's calculation results, which cannot meet the requirement for a stable prize distribution rate in some scenarios. For example, most lottery algorithms in related technologies calculate the winning results in a certain way. Since the lottery calculation results are random, in some cases, the winning results are concentrated in a certain time interval, while most other time intervals show no winnings. This makes it impossible to meet the requirement of evenly distributing prizes over time during the activity period.
[0032] In view of the above, embodiments of this disclosure provide a method, apparatus, electronic device, and medium for processing lottery data. The method includes: receiving a lottery participation request within an activity period; generating lottery information corresponding to the lottery participation request; determining a target time window in which the participation time of the lottery participation request is located based on a pre-divided time window of the activity period; determining lottery adjustment information based on the lottery status of the target time window; the lottery adjustment information being used to indicate and include adjustment content for at least one of the lottery information and the winning criteria information, or to indicate that the lottery information and the winning criteria information are not adjusted; determining target lottery information and target winning criteria information for the participation time based on the lottery adjustment information; and generating participation result information for the lottery participation request based on the target lottery information and the target winning criteria information.
[0033] On the one hand, by dynamically adjusting at least one of the lottery information and winning criteria based on the lottery window status, or leaving it unchanged, the probability of winning at the current participation time can be dynamically adjusted. This, in turn, allows for adjustments to the prize distribution rate and number of prizes within each window. This helps to even out the number of prizes across different time windows, ensuring a stable and consistent prize distribution rate throughout the entire activity period. On the other hand, the overall lottery processing logic does not require an additional scheduling system. Instead, it calculates the participation results at each participation time in real time with high efficiency, making the processing time controllable and capable of handling surges in user numbers.
[0034] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this disclosure. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0035] Figure 1 The system architecture of the method and apparatus for lottery data processing applicable to embodiments of this disclosure is illustrated schematically.
[0036] Reference Figure 1 As shown, the system architecture 100 of the lottery data processing method and apparatus applicable to embodiments of this disclosure includes: terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 is a medium providing a communication link between the terminal devices 101, 102, and 103 and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0037] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, video playback applications, short video applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0038] Terminal devices 101, 102, and 103 can be various electronic devices with displays, such as smartphones, tablets, laptops, desktop computers, smartwatches, smart bracelets, self-driving cars, etc.
[0039] Server 105 can be a server that provides various services, such as a backend management server that provides data processing support for users participating in a lottery using terminal devices 101, 102, and 103 (this is just an example). The backend management server can analyze and process the received lottery participation requests and other data, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0040] It should be noted that the lottery data processing method provided in this embodiment can generally be executed by a server 105 or a terminal device with a certain computing power. The server can be an application server or a service cluster, etc. Accordingly, the lottery data processing apparatus provided in this embodiment can generally be set in the server 105 or the aforementioned terminal device with a certain computing power.
[0041] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0042] The first exemplary embodiment of this disclosure provides a method for processing lottery data.
[0043] Figure 2 A flowchart illustrating a method for processing lottery data according to an embodiment of the present disclosure is shown schematically.
[0044] Reference Figure 2 As shown in the embodiment of this disclosure, the method for processing lottery data includes the following steps: S210, S220, S230, S240, S250, and S260. Steps S210 to S260 can be executed by a server.
[0045] In step S210, a lottery participation request for the activity period is received.
[0046] As an example, the duration of the activity period is 1 minute (i.e., 60 seconds), for example, from 1 PM to 1:01 PM, and the total number of prizes is 4. It is understood that the example here is a simple illustration to explain the specific implementation process of the embodiments of this disclosure. In reality, the duration of the activity period is the duration of the actual activity, and can be set in specific numerical values according to time units such as seconds, minutes, hours, days, months, etc.
[0047] In some embodiments, the activity period is pre-divided into multiple time windows according to the activity settings, and the prize amount within each time window is evenly distributed. For example, a 1-minute activity period is divided into 4 time windows, each lasting 15 seconds, sequentially labeled as time window T1, time window T2, time window T3, and time window T4, with each time window containing 1 prize. In other embodiments, the prize amount within a divided time window can be less than 1 or greater than 1. A prize amount less than 1 within a divided time window indicates that only one winning user will actually occur within multiple consecutive time windows; a prize amount greater than 1 within a divided time window indicates that multiple winning users will occur within a single time window. By dividing the total number of prizes by the total number of time windows, the prize amount within each time window can be obtained, which can also be described as the winning probability within a window.
[0048] In the embodiments of this disclosure, during the award distribution process, the probability of winning in most time windows is evenly distributed. However, there may be individual cases where quotas are borrowed between adjacent windows, some windows generate over-distribution, or some windows have remaining distribution quotas.
[0049] Figure 3 The illustration shows a schematic diagram of an implementation scenario of a lottery data processing method according to an embodiment of the present disclosure, wherein (a) is a schematic diagram of receiving various lottery participation requests during an activity period, and (b) is an example of lottery adjustment information corresponding to each lottery participation request. Figure 3 In example (b), the random number and the base value for winning the lottery are both initialized values. The result after adjustment by the lottery adjustment information is explained in the lottery adjustment information column.
[0050] During the ongoing event, the server will sequentially receive lottery participation requests from users, for example, refer to... Figure 3 As shown in (a), this example illustrates the lottery participation requests R1 to R2 received sequentially along the timeline within the activity period. 12 Taking the initial moment of the event period as time zero, each lottery participation request R1~R 12The participation times relative to time zero are 1s, 3s, 6s, 10s, 18s, 20s, 26s, 28s, 32s, 35s, 38s, and 41s, respectively.
[0051] In step S220, lottery information corresponding to the above lottery participation request is generated.
[0052] The aforementioned lottery information may include: a user identifier and a lottery random number corresponding to the user identifier. This lottery information is used in subsequent lottery calculations; for example, the lottery random number in the lottery information can be compared with the winning benchmark value in the winning benchmark information to determine whether the lottery has been won.
[0053] In some embodiments, the winning criteria information includes a winning criteria value, which is the median of a random number generation interval; the lottery information includes a lottery random number corresponding to the user identifier of the lottery participation request, the lottery random number being a value randomly generated within the aforementioned random number generation interval. For example, the winning criteria value is 0.5, the corresponding random number generation interval is [0, 1], and the lottery random number is a value randomly generated within the random number generation interval [0, 1]. If the lottery random number is greater than the winning criteria value, the lottery is considered won; if the lottery random number is less than or equal to the winning criteria value, the lottery is considered not won.
[0054] For example, refer to Figure 3 As shown in (b), the user corresponding to lottery participation request R1 is P1, and the lottery information generated for lottery participation request R1 is: random number 0.3; the user corresponding to lottery participation request R2 is P2, and the lottery information generated for lottery participation request R2 is: random number 0.6; the user corresponding to lottery participation request R3 is P3, and the lottery information generated for lottery participation request R3 is: random number 0.8; the user corresponding to lottery participation request R4 is P4, and the lottery information generated for lottery participation request R4 is: random number 0.3; the user corresponding to lottery participation request R5 is P5, and the lottery information generated for lottery participation request R5 is: random number 0.3; the user corresponding to lottery participation request R5 is P5, and the lottery information generated for lottery participation request R1 is: random number 0.6; the user corresponding to lottery participation request R3 is P3, and the lottery information generated for lottery participation request R3 is: random number 0.8; the user corresponding to lottery participation request R4 is P4, and the lottery information generated for lottery participation request R4 is: random number 0.3; the user corresponding to lottery participation request R5 is P5, and the lottery information generated for lottery participation request R5 is: random number 0.6; the user corresponding to lottery participation request R3 is P3, and the lottery information generated for lottery participation request R4 is: random number 0.8; the user corresponding to lottery participation request R4 is P4, and the lottery information generated for lottery participation request R5 is: random number 0.3; the user corresponding to lottery participation request R5 is P5, and the lottery information generated for lottery participation request R3 is: random number 0.6; the user corresponding to lottery participation request R3 is P4, and the lottery information generated for lottery participation request R4 is: random number 0.3; the user corresponding to lottery participation request R5 is P5, and the lottery information generated for lottery participation request R3 is: random number 0.8; the user corresponding to lottery participation request R4 is P4, and the lottery information generated for lottery participation request R5 is: random number 0.3; the user corresponding to lottery participation request R5 is The lottery information generated for request R5 is: random number 0.2; the user corresponding to lottery participation request R6 is P6, and the lottery information generated for lottery participation request R6 is: random number 0.4; the user corresponding to lottery participation request R7 is P7, and the lottery information generated for lottery participation request R7 is: random number 0.3; the user corresponding to lottery participation request R8 is P8, and the lottery information generated for lottery participation request R8 is: random number 0.1; the user corresponding to lottery participation request R9 is P9, and the lottery information generated for lottery participation request R9 is: random number 0.6; 10 The corresponding user is P 10 Regarding the lottery participation request R 10 The generated lottery information is: lottery random number 0.1; lottery participation request R.11 The corresponding user is P 11 Regarding the lottery participation request R 11 The generated lottery information is: lottery random number 0.6; lottery participation request R. 12 The corresponding user is P 12 Regarding the lottery participation request R 12 The generated lottery information is: lottery random number 0.7.
[0055] In step S230, the target time window in which the participation time of the lottery participation request is located is determined according to the time window pre-divided in the above-mentioned activity period.
[0056] Reference Figure 3 As shown in (b), the target time windows for lottery participation requests R1 to R4 are all T1, the target time windows for lottery participation requests R5 to R8 are all T2, and the target time windows for lottery participation requests R9 to R... 12 The target time window is T3.
[0057] In step S240, lottery adjustment information is determined based on the lottery status of the target time window.
[0058] The aforementioned lottery adjustment information is used to indicate, and includes the adjustment content, at least one of the aforementioned lottery information and the aforementioned winning benchmark information, or to indicate that the aforementioned lottery information and the aforementioned winning benchmark information are not adjusted. Specifically, the lottery adjustment information is used to indicate that at least one of the lottery random number and the winning benchmark value is adjusted or not adjusted, so that the probability of winning increases, decreases, or remains unchanged.
[0059] The above window lottery status indicates the prize distribution and remaining status at the time of participation within the target time window, as well as the lottery participation result of the lottery participation request at the previous time.
[0060] The purpose of determining lottery adjustment information based on the lottery window status is to regulate the rate of prize distribution between time windows to make it more uniform and continuous.
[0061] The way to adjust the lottery information and the winning benchmark information can be based on an adjustment factor, which can be added (+) or multiplied (×) with the object being adjusted (such as the lottery random number or the winning benchmark value), thereby increasing or decreasing the lottery random number, the winning benchmark value, etc.
[0062] In the embodiments of this disclosure, the adjustment factors for lottery information and winning benchmark information are parameters that change dynamically over time.
[0063] In step S250, based on the above-mentioned lottery adjustment information, the target lottery information and target winning benchmark information for the participation time are determined.
[0064] For example, if the lottery information is adjusted, the target lottery information is the adjusted lottery information. Specifically, this could be obtaining the target lottery random number by adjusting the lottery random number. Similarly, if the winning benchmark information is adjusted, the target winning benchmark information is the adjusted winning benchmark information. Specifically, this could be obtaining the target winning benchmark value by adjusting the winning benchmark value. When the lottery information is not adjusted, the target lottery information is the lottery information itself; when the winning benchmark information is not adjusted, the target winning benchmark information is the winning benchmark information.
[0065] In step S260, based on the above-mentioned target lottery information and the above-mentioned target winning criteria information, the participation result information of the above-mentioned lottery participation request is generated.
[0066] By comparing the relative size of the target lottery random number in the target lottery information and the target winning benchmark value in the target winning benchmark information, if the target lottery random number is greater than the target winning benchmark value, the participation result information of the lottery participation request is: won; if the target lottery random number is less than or equal to the target winning benchmark value, the participation result information of the lottery participation request is: not won.
[0067] In embodiments including steps S210 to S260, during the lottery data processing, the activity period is pre-divided into multiple time windows. After receiving a lottery participation request, corresponding lottery information is generated. Based on the lottery status within the target time window into which the lottery participation request falls, it is determined whether to adjust at least one of the lottery information and the winning benchmark information or not to adjust them. That is, the adjustment factors of the lottery information and the winning benchmark information are used as parameters that change dynamically over time. The aforementioned window lottery status represents the prize distribution and remaining status at the participation time within the target time window, the lottery participation result of the lottery participation request at the previous time, etc. On the one hand, by dynamically adjusting at least one of the lottery information and the winning benchmark information or not adjusting them based on the window lottery status, the probability of winning at the current participation time is dynamically adjusted, thereby adjusting the prize distribution rate and number of prizes in each window. This helps to make the number of prizes in each time window more uniform. From the perspective of the overall activity period, the prize distribution rate in each time window is stable and continuous. On the other hand, the overall lottery processing logic does not require an additional scheduling system. Instead, it calculates the participation results at each participation moment in real time with high efficiency. The processing time is controllable and it can cope with a surge in the number of users.
[0068] Figure 4 A flowchart illustrating a method for processing lottery data according to another embodiment of this disclosure is shown schematically.
[0069] Reference Figure 4As shown, in addition to the steps S210 to S260 mentioned above, the method for processing lottery data also includes the following step: S410.
[0070] In step S410, for the first lottery participation request within each time window, the winning benchmark information and the corresponding random number generation interval within the current time window are initialized.
[0071] According to embodiments of this disclosure, the winning criteria information includes a winning criteria value. Step S410 above, initializing the winning criteria information within the current time window, includes: determining the relative size of the window prize inventory information and the average window amount within the current time window; the average window amount represents the average distribution of all prizes across all time windows during the activity period; when the window prize inventory information equals the average window amount, determining the median value of the random number generation interval as the winning criteria value; when the window prize inventory information is greater than the average window amount, adjusting the median value to a smaller value to obtain the winning criteria value; when the window prize inventory information is less than the average window amount, adjusting the median value to a larger value to obtain the winning criteria value.
[0072] Adjusting the median value to be smaller can be done by adding a negative adjustment value to the median value (e.g., 0.5), or by multiplying the median value by a value between 0 and 1. The relative magnitude of the adjustment depends on the size of the inventory increase. Adjusting the median value to be larger can be done by adding a positive adjustment value to the median value, or by multiplying the median value by a value greater than 1.
[0073] In step S220 above, generating lottery information corresponding to the lottery participation request includes the following step S220a: randomly assigning a corresponding lottery random number to the lottery participation request within the random number generation interval; the lottery information includes the lottery random number.
[0074] In the embodiment including step S410, by initializing the winning benchmark information based on the window prize inventory information of the current time window, it helps to adapt to changes in the probability of winning a prize within the current time window (i.e., the probability of winning) when the inventory of the current time window increases or decreases, thereby promoting the full distribution of prizes within the current time window.
[0075] For example, refer to Figure 3As shown in (a) and (b), for target time windows T1 and T2, the prize inventory (e.g., 1) within these target time windows T1 and T2 is equal to the average window amount (e.g., 1, with the four prizes distributed evenly across four time windows T1 to T4). The initial winning benchmark information is the midpoint of the random number generation interval [0, 1], which is 0.5. For target time window T3, the prize inventory (e.g., 2) within this target time window T3 is greater than the average window amount (e.g., 1). Therefore, the midpoint of 0.5 is adjusted to a smaller value and used as the winning benchmark information. Figure 3 The initial winning baseline information for example (b) is 0.3.
[0076] The following is combined with Figure 3 The following sections (a) and (b) will detail the various adjustment scenarios corresponding to step S240.
[0077] Figure 5 Two implementation flowcharts of step S240 according to an embodiment of the present disclosure are illustrated schematically.
[0078] According to one embodiment of this disclosure, referring to Figure 5 As shown in one of the execution paths, in step S240 above, the lottery adjustment information is determined according to the window lottery status of the target time window, including step S510: the lottery adjustment information is determined according to the time progress of the target time window, the window prize inventory information at the participation time, and the lottery participation result of the previous time.
[0079] In some embodiments, in step S240 above, determining lottery adjustment information based on the time progress of the target time window, the window prize inventory information at the participation time, and the lottery participation results of the previous time includes the following case A:
[0080] If the above time progress is within the above target time window, the above window prize inventory information indicates that the window prize inventory is zero, and the previous lottery participation result is a successful draw, then the lottery adjustment information is determined to be the first adjustment information.
[0081] The aforementioned first adjustment information is used to instruct the implementation of the following first adjustment:
[0082] The above-mentioned random numbers for the lottery are adjusted to be smaller based on the first adjustment factor, which ensures that the random numbers for the lottery in the remaining time period of the target time window are all less than the winning benchmark value at the corresponding time; or,
[0083] Based on the second adjustment factor, the winning benchmark value is increased, and the second adjustment factor ensures that the random numbers drawn during the remaining time period of the target time window are all less than the winning benchmark value at the corresponding time; or,
[0084] The lottery random number is adjusted to be smaller based on the first adjustment factor, and the winning benchmark value is adjusted to be larger based on the second adjustment factor; the first adjustment factor and the second adjustment factor make the lottery random number in the remaining time period of the target time window less than the winning benchmark value at the corresponding time.
[0085] In this embodiment, if a winning user is generated within the current time window and the prize quota for the current window is exhausted, the lottery information or the winning benchmark information is adjusted by adjusting the lottery adjustment information. This reduces the probability of winning in the remaining time period of the current time window to the point that no corresponding winning situation will occur. This logic ensures that the average prize amount allocated to each time window is distributed as much as possible.
[0086] For example, refer to Figure 3 As shown in (a) and (b), for lottery participation request R3, since the window prize amount in the target time window T1 is 1, and the lottery participation request R2 in the previous time has already won a spot, the window prize inventory at the time of participation of lottery participation request R3 is 0. Therefore, at least one of the lottery information and the winning benchmark information needs to be adjusted so that the lottery random number in the remaining time period of the target time window T1 is less than the winning benchmark value at the corresponding time.
[0087] The adjustment methods for the aforementioned first adjustment factor, second adjustment factor, and subsequent adjustment factors (such as the third, fourth, fifth, and sixth adjustment factors) can be multiplicative or summative; or adjusted using other mathematical functions. For example, in... Figure 3 In example (b), the random number 0.8 corresponding to R3 is adjusted based on the first adjustment factor. The example of the adjusted result is -0.8. The first adjustment factor is -1, and the adjustment method is a product. The first adjustment factor can further include two components: a base value and an adjustment value. The base value is 1, and the adjustment value can be 0, a positive number, or a negative number. When no adjustment is performed, the adjustment value is 0. When adjusting, the corresponding adjustment value is set according to the situation.
[0088] In some embodiments, the probability of winning in a window / the number of user requests in each time window ( / represents division) can be used as a reference value for the adjustment factor of the corresponding window, and the adjustment factor can be increased or decreased based on this reference value.
[0089] Without adjustment, the random number for the lottery is directly compared with the winning baseline value; after adjustment, the adjusted random number for the lottery (e.g., -0.8) is compared with the winning baseline value (e.g., 0.5) to determine the participation result information corresponding to the lottery participation request R3 as "not won the lottery".
[0090] Within each time window, the adjustment factors for the lottery information and the winning benchmark information (which can be the adjustment factor for the lottery random number, the adjustment factor for the winning benchmark value, or the adjustment factor that adjusts both the lottery random number and the winning benchmark value) are parameters that change dynamically over time. For example, within the time period (6s to 15s) that needs adjustment in the target time window T1, for example, for the lottery participation request R4, the first adjustment factor (-1) is used as before, and the adjusted lottery random number is -0.3. Then, the participation result information corresponding to the lottery participation request R4 is that the lottery was not won.
[0091] In addition, the adjustment factor can be adjusted over time, and the specific adjustment range can be a value corresponding to the number of window award slots / the estimated total flow of the window, or a multiple of that value.
[0092] In some embodiments, in step S240 above, determining lottery adjustment information based on the time progress of the target time window, the window prize inventory information at the participation time, and the lottery participation results of the previous time includes the following case B:
[0093] If the above-mentioned time progress exceeds the first set progress threshold, the above-mentioned window prize inventory information indicates that the window prize inventory is greater than the set value or set ratio, and the lottery participation result at the previous moment is that no one was drawn, then the lottery adjustment information is determined to be the second adjustment information.
[0094] The aforementioned second adjustment information is used to instruct the implementation of the following second adjustment:
[0095] The random number for the lottery at the time of participation is increased based on the third adjustment factor; or...
[0096] The winning base value at the time of participation is reduced based on the fourth adjustment factor; or...
[0097] The random number for the lottery is increased when the participation time is adjusted based on the third adjustment factor, and the winning base value is decreased when the participation time is adjusted based on the fourth adjustment factor.
[0098] For example, refer to Figure 3As shown in (a) and (b), for lottery participation request R7 within the target time window T2, if the time progress exceeds halfway (e.g., 22.5s), the window prize inventory is full (here, 1), and the lottery participation result of the previous lottery participation request R6 was not won, then at least one of the lottery information and lottery benchmark information needs to be adjusted to increase the probability that lottery participation requests received in the remaining time period within the target time window T2 can win the remaining inventory. For example, based on the fourth adjustment factor, the initial winning benchmark value of 0.5 (initialization corresponds to the participation time of lottery participation request R5) in the target time window T2 is reduced, and the adjusted winning benchmark value is 0.3, with the fourth adjustment factor being -0.2. The adjustment method used is an additive form.
[0099] Adjusting the winning baseline only increases the probability of winning within the remaining time period of the target time window T2; it doesn't guarantee a win. For example... Figure 3 As shown in example (b), the adjusted winning base value is 0.3, and the random number in the lottery information is 0.3. The result of comparing the two is that the lottery was not won.
[0100] Since R7 has not yet been selected in the lottery, the adjustment factor can be changed to further increase the probability of winning; for example, referring to... Figure 3 As shown in example (b), lottery participation request R8 also meets the conditions for executing the second adjustment. In this case, since the previous lottery participation request R7 did not win after adjustment, the fourth adjustment factor of lottery participation request R8 is increased to -0.3 to further increase the probability of winning, using an additive adjustment method. Therefore, the adjusted winning base value of lottery participation request R8 is 0.2 (the specific calculation process is: 0.5 - 0.3 = 0.2). Since the lottery random number for lottery participation request R8 is 0.1, the result after comparison is that the lottery was not won. In this example, there are unused slots within the target time window T2.
[0101] In this embodiment, if a significant proportion of prize slots remain unclaimed after reaching a preset progress point within the current time window, at least one of the lottery information or winning criteria information will be adjusted through lottery adjustment information. This increases the probability of winning in the remaining time period of the current time window. Furthermore, based on the actual number of unclaimed prizes, the adjustment range of the lottery random number or winning criteria value will be further strengthened in subsequent time periods to further increase the probability of winning in subsequent time periods. This logic ensures that the average prize amount allocated to each time window is distributed as much as possible. In this embodiment, if there are remaining slots within the current time window, these remaining slots will be carried over to the next adjacent time window for distribution.
[0102] In other embodiments, the actual user traffic is particularly large, and in most cases, all prizes within the target time window T2 will be distributed by adjusting at least one of the lottery information and the winning criteria information.
[0103] The example of lottery participation request R8 here is to illustrate the situation where prize slots are misappropriated between some adjacent windows. This misappropriation includes two scenarios: one is that there are remaining prize slots in the previous time window, and these remaining slots are carried over to the next adjacent time window. For example, regarding time window T2, the actual prizes awarded to lottery participation requests R5 to R8 are 0, and the remaining prize slot is carried over to the next adjacent time window T3. Therefore, the prize inventory in time window T3 is the original evenly distributed inventory plus 1. (See reference...) Figure 3 Example (b) shows the lottery participation requests R9 to R9 within the time window T3. 12 As shown, when the target time window is T3, during the initialization of the winning baseline information for the first lottery participation request R9, since the prize inventory in the current time window is higher than the average window amount, the winning baseline value is reduced to 0.3, thereby increasing the probability of winning within the current time window and promoting the distribution of the two prize slots. The lottery information and winning baseline information corresponding to lottery participation request R9 are both in an unadjusted state, with a lottery random number of 0.6 and a winning baseline value of 0.3. The result for this lottery participation request R9 is a successful draw. Subsequently, for lottery participation request R... 10 Although the previous result indicated a win, since a significant proportion (half) of the prize slots remain, a strategy of not adjusting the lottery information or winning criteria will be adopted; this lottery participation request R 10 The random number for the lottery is 0.1, the winning threshold is 0.3, and the corresponding result is no winning. Regarding the lottery participation request R... 11 There was no adjustment to the lottery information or winning criteria. The corresponding lottery random number was 0.6, and the winning criteria value was 0.3. The result was a draw, and all prizes within the time window T3 were awarded. Therefore, at least one of the lottery information or winning criteria needs to be adjusted in the next moment to prevent any further draws within the subsequent time window T3. For example, regarding the lottery participation request R... 12 By adjusting the winning baseline information based on the second adjustment factor, the adjustment method is shown in the example as an addition. If the second adjustment factor is 0.7, then the adjusted winning baseline value is 1. No matter how many random numbers are generated for the lottery, the value cannot be greater than 1. This ensures that no winning occurs in the subsequent periods of the time window T3. For example, the example lottery participation request R... 12The random number for the lottery was 0.7. When compared with the adjusted winning baseline value of 1, the result was that no one was drawn.
[0104] In some other embodiments, if the current time window produces some winning results but the quota for the current time window is used up, the current time window can borrow quotas from the next adjacent time window to distribute the rewards.
[0105] In some embodiments, in step S240 above, lottery adjustment information is determined based on the time progress of the target time window, the window prize inventory information at the participation time, and the lottery participation results of the previous time, including one of the following situations C, D, or E.
[0106] Scenario C: If the aforementioned time progress is less than the second set progress threshold, the aforementioned window prize inventory information indicates that the window prize inventory is higher than a set value or a set proportion, and the previous lottery participation result was no winning, then the lottery adjustment information is determined to be the third adjustment information. The aforementioned third adjustment information is used to indicate that the lottery random number in the aforementioned lottery information and the lottery benchmark value in the aforementioned winning benchmark information will not be adjusted. The aforementioned second set progress threshold is less than or equal to the aforementioned first set progress threshold.
[0107] For example, refer to Figure 3 As shown in (a) and (b), for lottery participation request R2, the participation time is 3 seconds, which is in the initial period of the target time window T1. Therefore, if the time progress is less than 1 / 3 (this is an example of the second set progress threshold, and the value can be changed), the window prize inventory is still at full capacity, and the lottery participation result of the previous lottery participation request R1 was not a winner, the lottery information and winning benchmark information for lottery participation request R2 will not be adjusted. Therefore, the adjustment strategy adopted includes: in the early stage of the time window and when the window prize inventory is relatively large, no intervention is made in the lottery information or winning benchmark information. In this embodiment, for example, if the lottery random number generated at the participation time of 3 seconds is 0.8 and the winning benchmark value is 0.5, no intervention is made in the lottery random number and winning benchmark value; the result obtained by comparing the lottery random number and the winning benchmark value is considered a winner.
[0108] Scenario D: If the aforementioned time progress is greater than the second set progress threshold but less than the first set progress threshold, the aforementioned window prize inventory information indicates that the window prize inventory is less than a set value or a set proportion, and the previous lottery participation result was no winning, then the lottery adjustment information is determined to be the third adjustment information. This third adjustment information is used to indicate that the lottery random number in the aforementioned lottery information and the winning benchmark value in the aforementioned winning benchmark information will not be adjusted. The second set progress threshold is less than the first set progress threshold.
[0109] For example, in some embodiments, there are multiple prize slots within a time window. If a significant number of slots have already been drawn in the early or middle stages of the process, and the previous draw result did not result in a winning entry for a current entry request, then no adjustment to the draw information or winning criteria is necessary. That is, the adjustment strategy employed includes: if a large number of prize slots are distributed in the early or middle stages of the window, since this situation is acceptable and facilitates the distribution of prizes within that time window, no intervention is required.
[0110] Scenario E: If the above-mentioned time progress is less than the second set progress threshold, the above-mentioned window prize inventory information indicates that the window prize inventory is non-zero, the window prize inventory is less than the set value or set ratio, and the lottery participation result of the previous moment is a winning lottery, then the lottery adjustment information is determined to be the fourth adjustment information.
[0111] The aforementioned fourth adjustment information is used to instruct the implementation of the following fourth adjustment:
[0112] The random number for the lottery at the time of participation is reduced based on the fifth adjustment factor; or...
[0113] The winning base value at the time of participation is increased based on the sixth adjustment factor; or...
[0114] The random number for the lottery at the time of participation is reduced based on the fifth adjustment factor, and the winning base value at the time of participation is increased based on the sixth adjustment factor.
[0115] In this embodiment, at the beginning of the time window, the proportion of users who won prizes is relatively large and they won in the previous draw. In order to delay the concentrated winning situation and ensure that users can also win in the later periods of the time window, thus mitigating the concentrated winning situation in the early stage, the winning situation within a time window is relatively evenly distributed or the concentrated winning situation is avoided; therefore, the adjustment logic corresponding to the fourth adjustment information is set. By adjusting the lottery random number or winning benchmark value of the nearest time period based on the adjustment factor, the winning probability of the nearest time period is reduced.
[0116] In subsequent periods of the adjacent time period, adjustment strategies can be implemented according to the situations corresponding to scenario D, scenario B, or scenario A mentioned above.
[0117] In other embodiments, the fourth adjustment may not be set, and no intervention may be made for the concentrated sampling situation that may exist within the time window.
[0118] According to another embodiment of this disclosure, referring to Figure 5 As shown in another execution path, in step S240 above, the lottery adjustment information is determined according to the window lottery status of the target time window, including the following steps: S521, S522, S523, S524a and S524b.
[0119] In step S521, the adjustment direction information is determined based on the aforementioned user identifier.
[0120] The aforementioned adjustment direction information is used to indicate the adjustment direction for adjusting at least one of the lottery random number and winning benchmark value corresponding to the aforementioned user identifier, so that the winning probability corresponding to the aforementioned user identifier increases, decreases, or remains unchanged.
[0121] The lottery participation request includes a user identifier. This user identifier is used to represent the user's identity. For example, users on the blacklist will be marked with a corresponding blacklist user identifier; users who participate in illegal or irregular activities or lottery activities as defined by the platform will be marked with a corresponding risk user identifier; users with default records or low credit scores will be marked with a corresponding low-credit user identifier; and users with high participation rates will be marked with a corresponding active user identifier.
[0122] For user identifiers with positive connotations (such as active user identifiers), the corresponding adjustment direction information is to increase the probability of being selected for that user identifier.
[0123] In step S522, lottery adjustment information is determined based on the time progress of the target time window, the window prize inventory information at the participation time, and the lottery participation results of the previous time.
[0124] The specific implementation process of step S522 can be referred to the previous description of step S240, and will not be repeated here.
[0125] In step S523, the validity of the lottery adjustment information is determined based on whether the adjustment direction indicated by the lottery adjustment information is consistent with that indicated by the adjustment direction information.
[0126] For example, if the lottery adjustment information indicates an adjustment in the direction of increasing the probability of winning, and the adjustment direction information also indicates an adjustment in the direction of increasing the probability of winning, then the adjustment directions indicated by the lottery adjustment information and the adjustment direction information are consistent. The lottery adjustment information or adjustment direction information can specifically include the following: increasing the lottery random number or decreasing the winning base value; or simultaneously increasing the lottery random number and decreasing the winning base value, etc. For example, if the lottery adjustment information indicates a decrease in the winning base value, and the adjustment direction information indicates an increase in the lottery random number, this is considered that the adjustment directions indicated by the lottery adjustment information and the adjustment direction information are consistent.
[0127] If the adjustment direction indicated by the lottery adjustment information and the adjustment direction information is consistent, the lottery adjustment information is considered valid. If the adjustment direction indicated by the lottery adjustment information and the adjustment direction information is inconsistent, the lottery adjustment information is considered invalid.
[0128] In step S524a, if the above lottery adjustment information is consistent with the adjustment direction indicated by the above adjustment direction information, the above lottery adjustment information is considered valid, and the above lottery adjustment information will be used if there is no adjustment in the next moment.
[0129] If the lottery adjustment information is valid, since the adjustment factor is also time-series data, if the adjustment factor is not changed in the next time step (corresponding to the lottery participation request in the next time step) (corresponding to the case of no adjustment), the lottery adjustment information valid in the previous time step will be used. This can be combined with the previous... Figure 3 Example (b) shows the scenarios corresponding to lottery participation requests R3 and R4.
[0130] In step S524b, if the basic lottery adjustment information is inconsistent with the adjustment direction information, the lottery adjustment information is deemed invalid, and the target lottery adjustment information corresponding to the lottery participation request is determined according to the adjustment direction corresponding to the adjustment direction information. The target lottery adjustment information is only applicable to this lottery participation request; if there is no adjustment at the next time moment, the lottery adjustment information corresponding to the previous time moment will be used.
[0131] Regarding the current lottery participation request, if step S522 determines that the lottery adjustment information is inconsistent with the adjustment direction indicated by the adjustment direction information corresponding to the user identifier, then the lottery adjustment information is considered invalid. The target lottery adjustment information to be used in this instance needs to be determined according to the adjustment direction corresponding to the user identifier. Since the target lottery adjustment information is associated with a specific user, it is set to be applicable only to this instance. If there is no adjustment in the next instance, the lottery adjustment information to be used will skip this special case and use the lottery adjustment information corresponding to the previous instance of the participation time.
[0132] In this embodiment, the lottery adjustment is made by combining user identification and window lottery status. This not only enables real-time and efficient calculation of participation results at each participation time with controllable processing time and the ability to cope with surges in the number of users, but also ensures that the award distribution rate is relatively uniform, stable and continuous between different time windows. Furthermore, it can provide corresponding auxiliary control for award distribution for different user types or different tag groups, thereby enhancing the auxiliary role of the business.
[0133] In some embodiments, different levels of prizes can be awarded based on the relative value of the lottery information. For example, for users with a higher lottery information value, such as a winning baseline value of 0.5, the prize won by users with a lottery random number of 0.8 or higher is, for example, the first prize; for users with a lottery random number of 0.7 to 0.8 (left-closed right-open interval), the prize won is, for example, the second prize; and for users with a lottery information value of 0.51 to 0.7 (left-closed right-open interval), the prize won is, for example, the third prize.
[0134] Considering that in embodiments including the above steps S240 or S522, computational resources are required to process and calculate the lottery adjustment information (which is also time-series data, with the time axis consistent with the time axis of the lottery participation request) received in real time, in order to improve the server's operating performance, embodiments of this disclosure also set a strategy of dynamically intervening in the lottery or randomly generating results without intervention based on the resource usage status.
[0135] Figure 6 A flowchart illustrating a method for processing lottery data according to yet another embodiment of this disclosure is shown.
[0136] Based on the above embodiments, the method for processing lottery data, in addition to including the steps S210 to S260, or in addition to the steps S210, S410, S220a, and S230 to S260, also includes the following steps: S610, S620, S630, and S641. For simplicity, in... Figure 6 The execution path shown in the example solid arrows illustrates S610 to S641 and S240.
[0137] In step S610, the resource usage status at the aforementioned participation time is obtained.
[0138] If the above resource usage status indicates that the utilization rate of the target resource is less than the set threshold, execute the above step S240: determine the lottery adjustment information based on the window lottery status of the target time window.
[0139] In step S620, if the resource usage status indicates that the utilization rate of the target resource exceeds a set threshold, a predicted winning result is generated based on the lottery information and winning benchmark information at the time of participation.
[0140] In step S630, if the predicted winning result is a draw, determine whether the window prize inventory information in the target time window meets the prize issuance conditions.
[0141] In step S641, if the above-mentioned window prize inventory information meets the prize awarding conditions, the participation result information of the above-mentioned lottery participation request is determined to be a successful draw.
[0142] Reference Figure 6 As shown by the single-dotted and double-dotted arrows, the above method also includes the following two execution branches corresponding to the following step combinations: {S642a, S652a} or {S642b, S652b}.
[0143] In step S642a, if the above-mentioned window prize inventory information does not meet the award conditions, the participation result information of the above-mentioned lottery participation request is determined to be "not won", and the user of the above-mentioned lottery participation request is marked as "to be compensated".
[0144] For example, one situation where the award conditions are not met is when the window award inventory is zero.
[0145] In step S652a, compensation processing is performed on another lottery participation request from a user marked with the "compensation pending" tag. Specifically, this includes: if the user marked with the "compensation pending" tag appears in another time window of the aforementioned activity period and there is a window prize inventory in the corresponding time window, at least one of the lottery information and winning criteria information of the other lottery participation request is adjusted so that the participation result information of the user marked with the "compensation pending" tag is a successful draw.
[0146] In embodiments including steps S642a and S652a, when a lottery is drawn based on a random lottery value, if a user's actual lottery result is a winning result but the prize quota in the window is exhausted and the conditions for awarding the prize are not met, the user is labeled with a compensation tag and compensation is processed for users with the compensation tag in subsequent time windows. By increasing the probability of the user winning in subsequent time windows or even setting the user's participation result information as a winning result, compensation is achieved for this type of user, reflecting relative fairness.
[0147] In step S642b, if the above-mentioned window prize inventory information does not meet the award conditions, it is determined whether to borrow the window prize inventory of the next adjacent time window of the target time window.
[0148] For example, in some embodiments, the decision to borrow the window reward inventory of the next adjacent time window is determined based on the time difference between the participation time and the end time of the target time window. If the time difference is less than a set progress ratio or a set progress value (e.g., less than 1 / 10 or less than 5 seconds), the window reward inventory of the next adjacent time window is borrowed.
[0149] In other embodiments, it is determined whether to borrow the window reward inventory of the next adjacent time window of the target time window based on the average window amount. If the average window amount is less than a set value (e.g., 5), the window reward inventory of the next adjacent time window is not borrowed.
[0150] In step S652b, if the window prize inventory of the next adjacent time window is borrowed, the participation result information of the above lottery participation request is determined to be a successful draw, and the window prize inventory of the next adjacent time window is updated.
[0151] In the embodiment including steps S642b and S652b, when the lottery is based on a random lottery value, if a user's actual lottery result is a winning result but the prize quota in the window is exhausted and the prize conditions are not met, the window prize inventory in the adjacent time window is borrowed so that the winning result in the target time window can meet the prize conditions.
[0152] In some embodiments, the core parameters are broken down into X-axis and Y-axis. X-axis parameters include: prize inventory, total number of participants, time window, activity start time, and current time (i.e., the participation time corresponding to each lottery participation request). Y-axis parameters include: winning baseline information, current CPU utilization, lottery information, adjustment factors, etc. The Y-axis parameters will naturally change over time; the X-axis parameters will dynamically change within the time window as requests are processed; after sliding to the next time window, they will be reset and dynamically change as requests are processed.
[0153] A second exemplary embodiment of this disclosure provides an apparatus for processing lottery data.
[0154] Figure 7 A structural block diagram of an apparatus for processing lottery data according to an embodiment of the present disclosure is shown schematically.
[0155] Reference Figure 7 As shown, the lottery data processing apparatus 700 provided in this embodiment includes: a request receiving module 701, an information generation module 702, a window determination module 703, an adjustment information determination module 704, a lottery information determination module 705, and a result generation module 706.
[0156] The aforementioned request receiving module 701 is used to receive lottery participation requests during the activity period.
[0157] The aforementioned information generation module 702 is used to generate lottery information corresponding to the aforementioned lottery participation request.
[0158] The aforementioned window determination module 703 is used to determine the target time window in which the participation time of the aforementioned lottery participation request is located, based on the time window pre-divided into the aforementioned activity period.
[0159] The aforementioned adjustment information determination module 704 is used to determine lottery adjustment information based on the lottery status of the window; the aforementioned lottery adjustment information is used to indicate that at least one of the aforementioned lottery information and the winning basis information should be adjusted and includes the adjustment content, or to indicate that the aforementioned lottery information and the aforementioned winning basis information should not be adjusted.
[0160] The lottery information determination module 705 is used to determine the target lottery information and target winning benchmark information at the time of participation based on the lottery adjustment information.
[0161] The result generation module 706 is used to generate the participation result information of the lottery participation request based on the target lottery information and the target winning criteria information.
[0162] According to embodiments of this disclosure, the above-described apparatus 700 further includes a resource usage status acquisition module.
[0163] The resource usage status acquisition module mentioned above is used to acquire the resource usage status at the time of participation.
[0164] If the above resource usage status indicates that the utilization rate of the target resource is less than the set threshold, the following steps are performed: Determine the lottery adjustment information based on the lottery status of the above target time window.
[0165] The result generation module 706 is further configured to: generate a predicted winning result based on the lottery information and winning benchmark information at the time of participation when the resource usage status indicates that the utilization rate of the target resource exceeds a set threshold; determine whether the window prize inventory information within the target time window meets the award conditions when the window prize inventory information meets the award conditions; and determine that the participation result information of the lottery participation request is a winning result when the lottery participation request meets the award conditions.
[0166] According to an embodiment of this disclosure, the result generation module 706 is further configured to: determine that the participation result information of the lottery participation request is "not won" when the window prize inventory information does not meet the award conditions, and mark the user of the lottery participation request as "to be compensated".
[0167] The aforementioned adjustment information determination module 704 is further configured to: adjust at least one of the lottery information and winning criteria information of the other lottery participation request when another lottery participation request of a user marked with the compensation tag appears in another time window of the aforementioned activity period and there is a window prize inventory in the corresponding time window, so that the participation result information of the user marked with the compensation tag is a winning result.
[0168] According to an embodiment of this disclosure, the result generation module 706 is further configured to: determine whether to borrow the window prize inventory of the next adjacent time window of the target time window if the window prize inventory information does not meet the award conditions; if the window prize inventory of the next adjacent time window is borrowed, determine that the participation result information of the lottery participation request is a successful draw, and update the window prize inventory of the next adjacent time window.
[0169] According to embodiments of this disclosure, the above-described apparatus 700 further includes an initialization module.
[0170] The initialization module described above is used to: initialize the winning criteria information and the corresponding random number generation interval for the first lottery participation request within each time window. Specifically, generating lottery information corresponding to the lottery participation request includes: randomly assigning a corresponding lottery random number to the lottery participation request within the aforementioned random number generation interval; the lottery information includes the aforementioned lottery random number.
[0171] It is understood that other details or beneficial effects of this embodiment can be referred to in the detailed description of the first embodiment, and will not be repeated here.
[0172] Any plurality of the functional modules included in the aforementioned device 700 may be combined into one module, or any one of the modules may be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules may be combined with at least a portion of the functionality of other modules and implemented in one module. At least one of the functional modules included in the aforementioned device 700 may be at least partially implemented as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a System-on-Chip, a System-on-Substrate, a System-on-Package, an Application-Specific Integrated Circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any appropriate combination of any of these three implementation methods. Alternatively, at least one of the functional modules included in the aforementioned device 700 may be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.
[0173] A third exemplary embodiment of this disclosure provides an electronic device.
[0174] Figure 8 A schematic block diagram of an electronic device provided in an embodiment of the present disclosure is shown.
[0175] Reference Figure 8As shown, the electronic device 800 provided in this embodiment includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804. The processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804. The memory 803 is used to store computer programs. When the processor 801 executes the program stored in the memory, it implements the lottery data processing method described above.
[0176] A fourth exemplary embodiment of this disclosure also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method for processing lottery data as described above.
[0177] The computer-readable storage medium may be included in the device or apparatus described in the above embodiments; or it may exist independently and not assembled into the device or apparatus. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0178] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0179] It should be noted that the collection, gathering, updating, analysis, processing, use, transmission, and storage of user personal information involved in the technical solutions provided in this disclosure comply with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken to prevent unauthorized access to user personal information data and to safeguard user personal information security, network security, and national security.
[0180] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0181] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method of lottery data processing, characterized by, include: Receive lottery participation requests during the event period; Generate lottery information corresponding to the lottery participation request; Based on the pre-divided time window of the activity period, the target time window in which the participation time of the lottery participation request is located is determined; Based on the lottery status of the target time window, determine the lottery adjustment information; The lottery adjustment information is used to indicate that at least one of the lottery information and the winning criteria information should be adjusted and includes the adjustment content, or it is used to indicate that the lottery information and the winning criteria information should not be adjusted. Based on the lottery adjustment information, determine the target lottery information and target winning benchmark information for the participation time. Based on the target lottery information and the target winning criteria information, generate the participation result information of the lottery participation request; Based on the lottery status of the target time window, determine the lottery adjustment information, including: Based on the time progress of the target time window, the window prize inventory information at the time of participation, and the lottery participation results of the previous time, the lottery adjustment information is determined.
2. The method according to claim 1, characterized in that, The lottery information includes a lottery random number, and the winning benchmark information includes a winning benchmark value; Based on the time progress of the target time window, the window prize inventory information at the participation time, and the lottery participation results of the previous time, lottery adjustment information is determined, including: If the time progress is within the target time window, the window prize inventory information indicates that the window prize inventory is zero, and the previous lottery participation result was a successful draw, then the lottery adjustment information is determined to be the first adjustment information; the first adjustment information is used to instruct the execution of the following first adjustment content: The lottery random numbers are adjusted to be smaller based on a first adjustment factor, which ensures that the lottery random numbers for the remaining time period of the target time window are all less than the winning benchmark value at the corresponding time; or... The winning baseline value is increased based on a second adjustment factor, which ensures that the random numbers drawn during the remaining time period of the target time window are all less than the winning baseline value at the corresponding time; or, The lottery random number is adjusted to be smaller based on a first adjustment factor, and the winning benchmark value is adjusted to be larger based on a second adjustment factor; the first adjustment factor and the second adjustment factor ensure that the lottery random number in the remaining time period of the target time window is less than the winning benchmark value at the corresponding time.
3. The method according to claim 1, characterized in that, The lottery information includes a lottery random number, and the winning benchmark information includes a winning benchmark value; Based on the time progress of the target time window, the window prize inventory information at the participation time, and the lottery participation results of the previous time, lottery adjustment information is determined, including: If the time progress exceeds the first set progress threshold, the window prize inventory information indicates that the window prize inventory is greater than the set value or set ratio, and the lottery participation result at the previous moment is that no one was drawn, the lottery adjustment information is determined to be the second adjustment information. The second adjustment information is used to instruct the execution of the following second adjustment: The random number for the lottery at the time of participation is increased based on the third adjustment factor; or... The winning base value at the time of participation is reduced based on the fourth adjustment factor; or... The random number for the lottery is increased when the participation time is adjusted based on the third adjustment factor, and the winning base value is decreased when the participation time is adjusted based on the fourth adjustment factor.
4. The method according to claim 1, characterized in that, The lottery information includes a lottery random number, and the winning benchmark information includes a winning benchmark value; Based on the time progress of the target time window, the window prize inventory information at the participation time, and the lottery participation results of the previous time, lottery adjustment information is determined, including: If the time progress is less than the second set progress threshold, the window prize inventory information indicates that the window prize inventory is higher than a set value or a set proportion, and the previous lottery participation result was no winning, then the lottery adjustment information is determined to be the third adjustment information. This third adjustment information is used to indicate that the lottery random number and the winning benchmark value will not be adjusted; or... If the time progress is greater than a second set progress threshold and less than a first set progress threshold, the window prize inventory information indicates that the window prize inventory is less than a set value or a set proportion, and the previous draw result was no winning, then the draw adjustment information is determined to be third adjustment information. This third adjustment information indicates that the draw random number and the winning benchmark value will not be adjusted; the first set progress threshold is greater than the second set progress threshold; or... If the time progress is less than the second set progress threshold, the window prize inventory information indicates that the window prize inventory is non-zero, the window prize inventory is less than the set value or the set ratio, and the lottery participation result at the previous moment is a winning result, then the lottery adjustment information is determined to be the fourth adjustment information. The fourth adjustment information is used to instruct the execution of the following fourth adjustment: The random number for the lottery at the time of participation is reduced based on the fifth adjustment factor; or... The winning base value at the time of participation is increased based on the sixth adjustment factor; or... The random number for the lottery at the time of participation is reduced based on the fifth adjustment factor, and the winning base value at the time of participation is increased based on the sixth adjustment factor.
5. The method according to claim 1, characterized in that, The lottery participation request carries a user identifier; Based on the lottery status of the target time window, determine the lottery adjustment information, including: Based on the user identifier, adjustment direction information is determined. The adjustment direction information is used to indicate the adjustment direction of at least one of the lottery random number and the winning benchmark value corresponding to the user identifier, so that the winning probability corresponding to the user identifier increases, decreases or remains unchanged. Based on the time progress of the target time window, the window prize inventory information at the time of participation, and the lottery participation results of the previous time, the lottery adjustment information is determined; The validity of the lottery adjustment information is determined based on whether the adjustment direction indicated by the lottery adjustment information is consistent with that indicated by the adjustment direction information. If the adjustment information for the lottery is consistent with the adjustment direction indicated by the adjustment direction information, the adjustment information for the lottery is considered valid, and the adjustment information for the lottery will continue to be used if there is no adjustment in the next moment. If the adjustment information for the lottery is inconsistent with the adjustment direction indicated by the adjustment direction information, the adjustment information for the lottery is considered invalid, and the target adjustment information for the lottery participation request is determined according to the adjustment direction corresponding to the adjustment direction information. The target adjustment information for the lottery is only applicable to this lottery participation request, and if there is no adjustment at the next moment, the lottery adjustment information corresponding to the previous moment of the participation time is used.
6. The method according to claim 1, characterized in that, Also includes: Obtain the resource usage status at the time of participation; If the resource usage status indicates that the utilization rate of the target resource is less than a set threshold, the following steps are performed: determine lottery adjustment information based on the window lottery status of the target time window; When the resource usage status indicates that the utilization rate of the target resource exceeds a set threshold, a predicted winning result is generated based on the lottery information and winning benchmark information at the time of participation. If the predicted winning result is a draw, determine whether the window prize inventory information within the target time window meets the prize issuance conditions; If the prize inventory information in the window meets the prize-giving conditions, the participation result information of the lottery participation request is determined to be a successful draw.
7. The method according to claim 6, characterized in that, Also includes: If the prize inventory information in the window does not meet the conditions for awarding prizes, the participation result information of the lottery participation request is determined to be "not won", and the user of the lottery participation request is marked as "awaiting compensation". If another lottery participation request from a user marked with the "compensation pending" tag appears in another time window of the activity period and there is a window prize inventory in the corresponding time window, at least one of the lottery information and winning benchmark information of the other lottery participation request shall be adjusted so that the participation result information of the user marked with the "compensation pending" tag is a successful draw.
8. The method according to claim 6, characterized in that, If the window prize inventory information does not meet the prize award conditions, determine whether to borrow the window prize inventory of the next adjacent time window of the target time window; If the window prize inventory of the next adjacent time window is used, the participation result information of the lottery participation request is determined to be a successful draw, and the window prize inventory of the next adjacent time window is updated.
9. The method according to claim 1, characterized in that, Also includes: For the first lottery participation request within each time window, initialize the winning baseline information and the corresponding random number generation interval for the current time window; The process of generating lottery information corresponding to the lottery participation request includes: Within the random number generation interval, a corresponding random number is randomly assigned to the lottery participation request; the lottery information includes the random number.
10. The method according to claim 9, characterized in that, The winning criteria information includes a winning criteria value; The initialization of the winning benchmark information within the current time window includes: Determine the relative size of the window prize inventory information and the average window amount within the current time window; the average window amount represents the average distribution of all prizes across all time windows during the activity period. If the window prize inventory information is equal to the average window amount, the median value of the random number generation interval is determined to be the winning benchmark value; If the window prize inventory information is greater than the average window amount, the intermediate value is adjusted to be smaller and then used as the winning benchmark value; If the prize inventory information in the window is less than the average window amount, the intermediate value is adjusted to be larger and used as the winning benchmark value.
11. An apparatus for processing lottery data, characterized in that, include: The request receiving module is used to receive lottery participation requests during the event period. The information generation module is used to generate lottery information corresponding to the lottery participation request; The window determination module is used to determine the target time window in which the participation time of the lottery participation request is located based on the pre-divided time window of the activity period. The adjustment information determination module is used to determine lottery adjustment information based on the window lottery status of the target time window; The lottery adjustment information is used to indicate that at least one of the lottery information and the winning criteria information should be adjusted and includes the adjustment content, or it is used to indicate that the lottery information and the winning criteria information should not be adjusted. The lottery information determination module is used to determine the target lottery information and target winning benchmark information at the time of participation based on the lottery adjustment information; The result generation module is used to generate participation result information for the lottery participation request based on the target lottery information and the target winning benchmark information. Based on the lottery status of the target time window, determine the lottery adjustment information, including: Based on the time progress of the target time window, the window prize inventory information at the time of participation, and the lottery participation results of the previous time, the lottery adjustment information is determined.
12. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 1-10.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1-10.