Universal lucky draw activity implementation method and device, electronic equipment, readable storage medium and computer program product

By creating a lottery configuration file and a separate interface design, the problem of low efficiency in traditional lottery development is solved, rapid deployment and efficient management are achieved, and system stability and operational agility are improved.

CN120803410APending Publication Date: 2025-10-17SHENZHEN LEYUYOU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510935060.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Traditional lottery development is inefficient, resulting in extended development cycles and high human resource consumption. It is difficult to meet the high-frequency and rapid iteration operational needs, and there are risks to system stability.

Method used

By creating a lottery configuration file, decoupling business rules from system architecture, and adopting a standardized configuration center and separate interface design, rapid deployment and management of lottery activities can be achieved.

Benefits of technology

It significantly shortens the development cycle, reduces human resource investment and technical maintenance costs, improves system stability and responsiveness, supports high concurrency and cross-system integration, and achieves agile response and refined operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803410A_ABST
    Figure CN120803410A_ABST
Patent Text Reader

Abstract

The invention relates to a universal lottery drawing activity implementation method, which comprises the following steps of: creating a lottery drawing configuration file which at least comprises an activity unique identifier and lottery pool configuration information, and comprises a lottery pool opening time range, a user lottery drawing condition limitation rule, a total inventory limitation of each prize, a personal inventory limitation and a winning probability value of each prize; creating a lottery information query interface configured to dynamically calculate a prize pool opening state and a user permission state based on the configuration file, and returning real-time data including the prize pool opening state, a user unlocking state and a prize remaining inventory; creating a lottery drawing execution interface which is configured to execute a lottery drawing process including probability random lottery drawing, inventory dynamic deduction and extensible post-processing; and creating a lottery drawing record query interface which is configured to query from the database and return historical lottery drawing records of the user according to a time reverse order. According to the method, the development workload of a new lottery drawing activity can be greatly reduced, and the lottery drawing activity development and deployment efficiency is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of raffle activity deployment, in particular, to a general raffle activity implementation method and device, electronic equipment, readable storage medium and computer program. BACKGROUND

[0002] Currently, raffle activities have become an important means of commercial operation in many fields, and their application range continues to expand and their popularity is increasing. Such activities significantly improve user activity and stickiness through various interactive forms, and become a key operation tool for enterprises to enhance user participation and promote business growth. In the fierce market competition environment, raffle marketing gradually evolves into a basic operation strategy universally adopted by various industries due to its strong flow effect and conversion potential.

[0003] With the explosive growth of raffle activity demand, its deployment process exposes obvious efficiency bottlenecks. Because different activities have great differences in rule logic, prize distribution mechanism and business scenarios, traditional development methods need to independently write core function modules for each activity, resulting in a large amount of repetitive development work. This highly customized implementation path not only prolongs the development cycle, but also causes continuous high consumption of human resources, especially when multiple activities are required to be online at the same time, the contradiction between development efficiency and business demand becomes particularly acute.

[0004] In the face of high-frequency and rapid iteration of operation requirements, the traditional development mode has been difficult to support the agile response of the business. The long development cycle directly affects the timely reach of marketing hotspots, and the repeated coding process also increases the risk of system stability. Therefore, how to solve the problem of rapid deployment of raffle activities through technical innovation, and build a reusable, scalable standardized framework to significantly shorten the development cycle and reduce technical maintenance costs, has become a core technical challenge that needs to be broken through. SUMMARY

[0005] To solve the existing technical problems, the present application provides a general raffle activity implementation method, device, electronic equipment, readable storage medium and computer program product.

[0006] In a first aspect, the embodiments of the present application provide a general raffle activity implementation method, and the method steps specifically include:

[0007] Creating a raffle configuration file, the configuration file at least containing an activity unique identifier and prize pool configuration information, the prize pool configuration information including: prize pool opening time range, user raffle condition restriction rules, total inventory limit of each prize, personal inventory limit and winning probability value of each prize;

[0008] A lottery information query interface is created, configured to take an activity unique identifier and user information as input parameters, dynamically calculate prize pool opening status and user permission status based on a configuration file, and return real-time data including prize pool opening status, user unlocking status, and prize remaining inventory;

[0009] A lottery execution interface is created, configured to take an activity unique identifier, user information, target prize pool identifier, and lottery times as input parameters, execute a lottery process including probabilistic random lottery, inventory dynamic deduction, and extensible post-processing;

[0010] A lottery record query interface is created, configured to take an activity unique identifier, user information, and paging parameters as input parameters, query user historical lottery records from a database and return them in reverse chronological order.

[0011] Optionally, the prize pool configuration information further includes:

[0012] Open area code, used to limit the visibility of prize pools for users in different regions.

[0013] Optionally, the data returned by the lottery information query interface includes:

[0014] Prize pool opening status calculated based on the configured opening time range;

[0015] User unlocking status calculated based on user lottery condition restriction rules.

[0016] Optionally, the execution process of the lottery execution interface includes:

[0017] Verify whether the configuration of the target prize pool identifier exists;

[0018] Get and verify whether the lottery times of the user's current request are legal;

[0019] Perform random lottery according to the configured winning probability value;

[0020] Deduct the total inventory of prizes and the personal already won inventory.

[0021] Optionally, getting the user's lottery times includes:

[0022] Get the user's available lottery times through differentiated processing logic.

[0023] Optionally, before performing random lottery, it further includes:

[0024] Based on the total inventory and personal inventory limit, construct the prize set that the current user can lottery.

[0025] Optionally, after performing lottery, it further includes:

[0026] Call differentiated post-processing logic.

[0027] Optionally, the data returned by the lottery record query interface includes:

[0028] The winning prize logo and drawing time.

[0029] In a second aspect, an embodiment of the present application provides a general apparatus for implementing a lottery activity, including:

[0030] Configuration management module, used to create and load lottery configuration files;

[0031] Information query module, including lottery information query interface;

[0032] Lottery execution module, including lottery execution interface;

[0033] Record query module, including lottery record query interface.

[0034] In a third aspect, an embodiment of the present application provides an electronic device comprising a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor. The transceiver, the memory, and the processor are connected via a bus. When the computer program is executed by the processor, the steps in the method for implementing a general lottery activity in any one of the first aspects are implemented.

[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the method for implementing a general lottery activity in any one of the first aspects.

[0036] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps in the method for implementing a general lottery activity in any one of the first aspects.

[0037] By setting up configuration files, business rules are decoupled from the core code, and the three interfaces of information query, lottery execution, and record query are standardized. This simplifies the development of new lottery activity processes to simply writing configuration files, greatly reducing the amount of code to be written, significantly lowering the risk of human errors, and effectively improving R&D work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.

[0039] Figure 1 A flowchart of a general method for implementing a lottery activity provided by an embodiment of the present application is shown.

[0040] Figure 2A flow chart of an execution flow method of the lottery execution interface provided by the embodiment of the application is shown.

[0041] Figure 3 A specific structure schematic diagram of a general lottery activity implementation device provided by the embodiment of the application is shown.

[0042] Figure 4 A structure schematic diagram of an electronic device of a general lottery activity implementation method provided by the embodiment of the application is shown.

[0043] The reference signs in the figures respectively represent:

[0044] 301: configuration management module; 302: information query module;

[0045] 303: lottery execution module; 304: record query module;

[0046] 1110: bus; 1120: processor; 1130: transceiver;

[0047] 1140: bus interface; 1150: memory; 1160: user interface;

[0048] 1151: operating system; 1152: application program. DETAILED DESCRIPTION

[0049] In the description of the embodiments of the application, those skilled in the art shall know that the embodiments of the application can be implemented as a method, an apparatus, an electronic device, a computer readable storage medium and a computer program product. Therefore, the embodiments of the application can be specifically implemented in the following forms: complete hardware, complete software (including firmware, resident software, microcode, etc.), a form of combination of hardware and software. Moreover, in some embodiments, the embodiments of the application can also be implemented in the form of a computer program product in one or more computer readable storage media, and the computer readable storage media contain computer program codes.

[0050] The above computer readable storage medium can adopt any combination of one or more computer readable storage media. The computer readable storage medium includes an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or apparatus, or any combination thereof. More specific examples of the computer readable storage medium include a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory (Flash Memory), an optical fiber, a compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any combination thereof. In the embodiments of the present application, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus.

[0051] The computer program code contained in the above computer readable storage medium can be transmitted by any suitable medium, including wireless, wire, optical cable, radio frequency (RF) or any suitable combination thereof.

[0052] The computer program code for carrying out operations of the embodiments of the present application can be written in assembly language, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state setting data, integrated circuit configuration data, or in one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++, or a conventional procedural programming language such as C language or similar programming languages. The computer program code can be executed entirely on a user computer, partially on a user computer, as a separate software package, partially on a user computer and partially on a remote computer, and entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), and can be connected to an external computer.

[0053] The embodiments of the present application provide the methods, devices and electronic equipment described by the flowcharts and / or block diagrams.

[0054] It should be understood that each block of the flowchart and / or block diagram and combinations thereof can be implemented by computer readable program instructions. These computer readable program instructions can be provided to a processor of a general purpose computer, a special purpose computer, or other programmable data processing apparatus to produce a machine, so that the computer readable program instructions, when executed by the computer or other programmable data processing apparatus, generate an apparatus that implements the functions / operations specified in the block of the flowchart and / or block diagram.

[0055] These computer-readable program instructions may also be stored in a computer-readable storage medium that enables a computer or other programmable data processing device to operate in a specific manner. In this way, the instructions stored in the computer-readable storage medium produce an instruction device product that implements the functions / operations specified in the blocks in the flowchart and / or block diagram.

[0056] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby enabling the instructions executed on the computer or other programmable data processing apparatus to provide a process that implements the functions / operations specified by the blocks in the flowchart and / or block diagram.

[0057] The embodiments of the present invention are described below with reference to the accompanying drawings.

[0058] Figure 1 FIG1 shows a flow chart of a general method for implementing a lottery activity provided by an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:

[0059] Create a lottery configuration file. The configuration file contains at least the unique identifier of the activity and the prize pool configuration information. The prize pool configuration information includes: the prize pool opening time range, user lottery condition restriction rules, total inventory limit of each prize, personal inventory limit, and the probability of winning each prize;

[0060] Create a lottery information query interface, configured to use the activity unique identifier and user information as input parameters, dynamically calculate the prize pool open status and user permission status based on the configuration file, and return real-time data including the prize pool open status, user unlock status, and remaining prize inventory;

[0061] Create a lottery execution interface, which is configured to take the activity unique identifier, user information, target prize pool identifier, and number of draws as input parameters, and execute the lottery process including probabilistic random draws, dynamic inventory deductions, and scalable post-processing;

[0062] Create a lottery record query interface, which is configured to use the activity unique identifier, user information and paging parameters as input parameters, query from the database and return the user's historical lottery records in reverse chronological order.

[0063] Traditional lottery activity development requires repeated writing of rule verification, inventory management and other underlying codes, not only generating a large amount of redundant work, but also causing the activity to change and need to be redeployed due to hard-coded logic. The present scheme abstracts the core parameters such as activity period, prize pool rules and inventory restrictions into structured data by establishing a standardized configuration center. This design allows operation personnel to directly define activity characteristics through YAML configuration without modifying program code to adjust the rules. When the system starts, the configuration loading module automatically parses the file content and generates runtime strategies, and at the same time, it realizes millisecond-level hot updates of the configuration through a listening mechanism. The establishment of this module fundamentally decouples business rules from system architecture, allowing activity parameter adjustment to be converted into pure data operations. The creation of configuration files can effectively improve development efficiency, shorten the deployment time of new lottery activities, and reduce the investment of human resources. The rule coding and testing verification that previously required the deep involvement of developers are replaced by configuration tools, and the technical team can focus on core architecture optimization. The stability of the system is improved, and the JSON Schema verification mechanism built into the configuration center can automatically intercept illegal parameters (such as negative inventory values and conflicting time ranges) when updating, preventing a large number of runtime errors from the source. Compared to traditional code releases, the system failure rate caused by configuration errors has decreased significantly. Resource utilization is optimized, and the number of activities that a single server node can support has effectively increased. Previously, independent deployment of activities can now be configured to run in parallel through configuration isolation, and the cost of server procurement has been significantly reduced.

[0064] The user participation process naturally includes three stages of "state query - operation execution - result tracing". The traditional scheme couples the three types of functions in a single interface, resulting in high code complexity and poor scalability. The present scheme designs a separated interface architecture: the information query interface is responsible for dynamically calculating the eligibility state (such as time validity and point qualification), while the execution interface focuses on atomic exchange operations. The former adopts a stateless design to ensure high concurrent response capability, and the latter uses a transaction chain to ensure business consistency. Both share rule definitions through the configuration center, but the execution process is physically isolated. This setup can effectively break through the concurrency performance, and the query interface supports nearly linear horizontal expansion after separation, maintaining millisecond-level response under high traffic peaks, far exceeding the collapse threshold of coupled architecture. The user's perception of the smoothness of participating in the activity has improved significantly. At the same time, the security boundary is strengthened, and the TCC (Try-Confirm-Cancel) transaction model of the execution interface automatically triggers the compensation mechanism in the case of communication anomalies. For example, if the point deduction is successful but the inventory update fails, the system automatically reverts the points and marks the abnormal order, with the risk of financial loss approaching zero. The operation and maintenance monitoring is upgraded, and the independent interface log can accurately locate the bottleneck. The performance fluctuations of the query interface can be optimized through targeted cache strategies, and the transaction failures of the execution interface can be addressed by enhancing the retry mechanism, significantly improving the robustness of the system.

[0065] Different activities often need to access heterogeneous systems, and traditional hard coding causes deep coupling between core modules and third-party services. The scheme constructs a plug-in extension engine, and abstracts variable points such as permission verification and score acquisition into standardized interfaces. Developers only need to implement the interface contract, and then bind the relationship through configuration declaration to complete the function injection. The core execution process dynamically loads the extension implementation at runtime, forming a flexible architecture of "core invariant + peripheral variable". This setting effectively improves the efficiency of cross-system integration, and the time-consuming of new business system connection is compressed from weeks to hours. For example, when adding a fingerprint verification service, only the adaptation module needs to be developed and the configuration mapping needs to be modified, without the need to recompile and release the main system, and the business interruption time is significantly reduced. Technical debt governance is optimized, the interface contract forces the separation of core business and extension logic, eliminating the architectural corruption caused by the invasion of third-party code. The size of the system core code library is greatly reduced, and the long-term maintenance cost is significantly reduced. Through configuration shunting, the use range of the extension implementation can be controlled, and the risk of new technology landing can be fine-grained managed.

[0066] Frequent changes in activity rules are a core business scenario, and the maintenance window of the traditional scheme of restarting the service is easy to cause operational accidents. The scheme establishes a dynamic bridge between the configuration center and the execution engine: the file listening service detects configuration updates and triggers hot refresh of the in-memory strategy immediately. The execution process automatically obtains the latest version when calling the rules, and at the same time, the version snapshot mechanism ensures that long transactions are completed within a single version. Business continuity is guaranteed, and key changes such as inventory adjustment and time extension can take effect immediately, completely eliminating the maintenance window that required downtime in the past. In large-scale promotional activities, "run while adjusting" zero-downtime operation is realized. Error changes can be quickly rolled back, and the configuration center automatically retains historical versions, which can be restored to the stable version within seconds when the rules are abnormal. For example, when a new configuration causes inventory overage, the rollback operation can be completed without user awareness to control losses. Agile response capability has undergone qualitative change, and the delay of operational policy adjustment to online effect has been shortened to minutes, making "data-driven optimization" truly integrated into the daily operation rhythm, and the cost of business trial and error has decreased significantly.

[0067] The technical scheme cooperates through four modules to build a standardized infrastructure in the field of lucky draw activities. In the practice of multiple head e-commerce platforms, the online period of new activities is greatly reduced, the system resource consumption is effectively reduced, the fault recovery speed is effectively improved, and the technical indicators are leading the traditional architecture.

[0068] In some embodiments, the prize pool configuration information may also include an open regional code, which is used to limit the visibility of the prize pool to users in different regions. In the scenario of optimizing the resource allocation of the prize pool, integrating open regional coding parameters becomes a key technical means to achieve refined operations. This design abstracts the regional dimension at the prize pool configuration level, converting physical locations (such as provincial administrative regions, city clusters, or multinational regions) into configurable logical identifiers, thereby dynamically binding the mapping relationship between user geographic locations and prize pool access rights. When a user requests to obtain prize pool information, the system automatically matches the regional coding rules based on the real-time location of its terminal (such as IP resolution positioning or GPS data), and instantly completes the policy decision through the preset distributed geographic location engine - the visibility of the specified prize pool is only open to users who meet the coding requirements. This mechanism breaks through the extensive model of a global unified prize pool in traditional lottery activities, forms dynamic isolation in the spatial dimension, and at the same time ensures the flexibility of rule adjustment by decoupling the policy layer from the execution layer. Of particular note is the collaborative work of this feature and the hot reload mechanism, which supports dynamic policy refreshes: when a business needs to temporarily add a special reward pool for a duty-free island, simply inject the new "region code-reward pool" rule into the configuration center and perform a hot update, completing full traffic coverage deployment in a short period of time. This solution significantly improves emergency response efficiency for regional events compared to traditional solutions, and can roll back incorrect configurations within seconds, providing solid regional governance support for large-scale promotional events across multiple countries.

[0069] In some embodiments, optionally, the data returned by the lottery information query interface includes:

[0070] The prize pool opening status calculated based on the configured opening time range;

[0071] The user's unlock status is calculated based on the user lottery restriction rules.

[0072] The lottery information query interface builds the key capability of the real-time strategy decision engine by dynamically returning two core indicators: prize pool opening state and user unlocking state. This design deeply integrates the rule definition of the configuration hub module and the real-time computing framework. The prize pool opening state is refreshed at the millisecond level based on preset time strategies (such as time zone-sensitive activity start and end times, emergency maintenance windows, etc.) to provide interface prompts, while the user unlocking state is diagnosed by real-time retrieval of user portraits (balance, historical participation records, behavior labels, etc.) to match prize pool access conditions (such as exclusive for new users, VIP level restrictions, etc.). This forms an instant participation eligibility diagnosis. When the user accesses, the system parallelly computes the two states: the former calls the global clock service to automatically adapt to regional time difference to generate a state identifier, and the latter completes the unlocking determination for thousands of people in thousands of ways within 5ms through a lightweight rule engine. This dual-state separation mechanism fundamentally replaces the complex process of multiple interface combinations in traditional solutions, and converts the strategy execution from time-consuming serial operations to concurrent atomic operations. When the business side adjusts the time strategy or unlocking rules, the client can respond to changes in real time without the need for version release. For example, when the operation finds that high-end users are not participating enough, the VIP unlocking threshold can be dynamically lowered and take effect immediately, eliminating the 48-hour window period required for maintenance in traditional solutions. More importantly, this mechanism deeply cooperates with the hot loading module - when the prize pool state changes due to an emergency adjustment of the opening time of a large area, the system immediately feeds back the latest state through the query interface after millisecond-level hot update, so that the response speed of regional operation events (such as temporary suspension of logistics prize pools in rain-affected areas) is improved to minutes, providing a dynamic decision support foundation for fine operation.

[0073] In some embodiments, as shown in Figure 2 The execution flow of the lottery execution interface includes:

[0074] Verify whether the configuration of the target prize pool identifier exists;

[0075] Get and verify whether the number of lottery times of the user's current request is legal;

[0076] Perform random lottery according to the configured winning probability value;

[0077] Deduct the total inventory of prizes and the personal winning inventory.

[0078] The lottery execution interface adopts a four-stage atomization operation chain design, building a leading industry strong transaction guarantee mechanism. When the user triggers the lottery action, the system first locks the current configuration snapshot (step one), and verifies the validity of the prize pool identifier in milliseconds to intercept the transient inconsistency risk during configuration hot update; then, based on real-time transaction lock, it verifies the user's lottery benefit source (such as the remaining amount of points exchange, free opportunity inventory), and through the version number optimistic lock mechanism, it avoids the problem of lottery times exceeding the limit in concurrent scenarios (step two); in the core lottery stage (step three), an entropy source enhanced algorithm is used to make random decisions based on dynamically loaded probability configurations, while a prize distribution equalizer is built in to prevent trust crises caused by small probability event aggregation; finally, through a stock double-write transaction (step four), the global inventory and user-level winning limit are updated synchronously, where the global inventory deduction introduces a ring buffer isolation layer to deal with sudden traffic, and the personal inventory update is bound to a distributed transaction compensation, ensuring that even in the case of database fault switching, the strict consistency of "awarded prizes + inventory records" is maintained. Through the atomic binding of inventory operations and benefit cancellation, the traditional architecture's "winning success but inventory not deducted" or "inventory deducted but prize not awarded" loss black hole is completely eliminated. The traceability markers (such as operation fingerprints + blockchain storage) implanted in the benefit verification stage make each lottery have an unalterable business chain, completely eliminating the vulnerability of illegal profits through interface replay attacks, cross-node concurrent requests, etc. Four-stage operations are executed through asynchronous pipelines in parallel, with single-node throughput significantly better than traditional architectures supported by inventory buffer layers, while most requests are completed within milliseconds, significantly optimizing user perception fluency. Especially in cross-region marketing scenarios, this process deeply cooperates with regional restriction rules: when the inventory of a certain region's prize pool is zero, the system automatically intercepts the user's request execution in that region (stage one is terminated), while releasing server resources to available regions, achieving fault self-isolation and intelligent resource scheduling, making the impact of regional blowout events on the global system tend to zero.

[0079] In some embodiments, optionally, acquiring the number of times of user lottery includes:

[0080] The number of times of user lottery is acquired through differentiated processing logic.

[0081] The design realizes the revolutionary evolution of user available times calculation by constructing an intelligent draw times routing engine. The system automatically selects differentiated extraction logic according to the preset strategy matrix: for basic draw activities, directly read the balance of the integral account; for time-limited welfare activities, call the marketing platform to check the free benefit code; for fission interactive activities, real-time scan user social behavior graph to generate virtual opportunity number. The routing process completes strategy distribution in the unified access layer, and the core execution engine only processes standardized times input values, realizing the deep decoupling of strategy variability and core process stability. Especially in the cross-activity resource reuse scene (such as users having both regular points and activity-specific points), the system automatically adapts the optimal times source through a dynamic weight algorithm, avoiding the benefit invalidation problem caused by logic conflicts in traditional architecture. More noteworthy is that this capability and configuration hub form a strategic synergy - operation personnel customize draw times rules for specific user groups (such as new registered user groups) through a visual interface (such as first-day gift opportunities limited to entertainment prize pools), and the strategy takes immediate effect after being published, making the precision and response speed of user stratification operation reach a new height in the industry. Tests show that the design reduces the maintenance cost of complex benefit system by more than the traditional solution, while the clarity of user benefit perception is significantly improved.

[0082] In some embodiments, optionally, before performing the random draw, the method further comprises:

[0083] Based on the total inventory and the personal inventory limit, a set of prizes that the current user can draw is constructed.

[0084] A double-dimensional inventory-driven screening engine is implanted before the draw is performed, building an industry-first precision draw isolation layer. This mechanism real-time aggregates global prize pool data and user portrait labels, generates a user-specific prize set that can be drawn through a three-layer dynamic filtering logic: first, based on the total inventory level, automatically exclude prize items that have been sold out or locked (such as when the inventory of limited edition items is zero, it is immediately removed from the prize pool), second, according to the user's personal inventory limit (such as the upper limit of the high-end prize pool per month, the quota of activity-specific prizes), exclude prize types outside the user's authority, and finally, combined with real-time configuration strategies (such as shielding luxury prize pools for new users, filtering user geographic area prohibited categories), complete compliance filtering. The whole process is completed within 5ms in the memory computing framework, filtering out thousands of prizes in milliseconds, forming the "effective draw range" visible to the user, ensuring that subsequent probability calculations only occur within the legal space allowed by the business. Especially in cross-border marketing scenarios, this mechanism presents strategic value: the system automatically builds a "region-compliant warehouse-total warehouse inventory-user privilege" three-dimensional cross-checking model, for example, only Japanese VIP users are shown light luxury categories that meet local regulations and have inventory in the bonded warehouse, making the fine-grained operation under the global one-warehouse strategy reach a new height. Tests show that this feature significantly improves the conversion rate of high net worth users, while reducing the risk of capital loss to a historical low.

[0085] In some embodiments, optionally, the execution of the lottery further includes calling differentiated post-processing logic after the execution of the lottery. This design builds an open response system supporting full business scenarios through a programmable differentiated post-processing framework. When the core lottery process is completed, the system dynamically activates the matching plug-in chain based on the prize type, user label, and marketing strategy: for physical prizes, the warehouse management system is automatically triggered to reserve inventory and initiate logistics pre-scheduling; virtual card prizes immediately call the encryption service to generate digital vouchers and deliver them through the message center; if it involves member benefit upgrade, it connects the CRM system in real time to refresh the user level. The entire process is decoupled from the main process through an event-driven architecture - after the lottery results are published as transaction messages, the post-processing engine automatically combines and executes the required plug-in modules, and supports multi-system collaborative operation with millisecond-level delay. More breakthrough is the introduction of a flexible process fuse mechanism - when the response of the third-party system is timed out, the system automatically switches to an alternative solution (such as switching to a virtual warehouse when the logistics system fails), ensuring flexible fault switching capability without damaging user experience. More importantly, the framework is deeply coordinated with the configuration hub - operational staff can customize post-processing rules for specific user groups (such as automatically pushing education discounts to students who win electronic products), and the rules take effect immediately through hot loading, making super-personalized services go from theory to reality. In the 618 promotion campaign, an e-commerce platform used this capability to urgently add a special handling channel for logistics in anti-epidemic areas within 2 hours, without interrupting any order flow while achieving minute-level deployment of emergency strategies, fully verifying the strategic value of this design in business continuity assurance.

[0086] In some embodiments, optionally, the data returned by the lottery record query interface includes the winning prize identifier and the drawing time. This design builds a trusted traceability base throughout the business chain through a two-factor data model of winning prize identifier + accurate-to-millisecond drawing time. The prize identifier is a unique asset key (such as SKU123456_VIP) predefined by the prize pool configuration hub, automatically associating prize details, inventory units, and cancellation rules; while the timestamp is implanted with a nanosecond-level time zone marker, seamlessly converted to local time axis in cross-border scenarios. The combination of the two forms a non-reproducible business event fingerprint, providing an authoritative and trustworthy winning certificate on the user side and driving automated fulfillment processes on the system side - when the user queries the record, the front end instantly pulls the dynamic information of the prize (such as logistics status or card balance) based on the identifier, while the time factor triggers intelligent reminder rules (such as a "3-day remaining redemption period" countdown). More importantly, this data architecture is deeply integrated with all system modules: through distributed tracking IDs, the lottery event is accurately linked with inventory deduction in the execution interface and operation logs in the post-processing engine, building a complete evidence chain from clicking the lottery to physical delivery.

[0087] In some embodiments, as shown in Figure 3 The embodiments of the present application provide a general lottery activity implementation device, which comprises:

[0088] The configuration management module 301 is configured to create and load a prize draw configuration file.

[0089] The information query module 302 comprises a prize draw information query interface.

[0090] The prize draw execution module 303 comprises a prize draw execution interface.

[0091] The record query module 304 comprises a prize draw record query interface.

[0092] The device realizes full-link automatic prize draw management through the precise cooperation of the four core modules. The configuration management module 301 serves as the system hub, continuously loads the structured configuration file (including the prize pool rules, inventory strategy, etc.), and realizes millisecond-level strategy updating through the hot monitoring mechanism. When the user initiates a pre-query for prize draw, the information query module 302 obtains the configuration snapshot of the 301 module in real time, calculates the prize pool opening state and the user unlocking state in parallel, and generates a dynamic strategy prompt. After the user confirms participation, the prize draw execution module 303 executes a four-step atomic transaction chain based on the latest configuration of the 301 module: first, verify the validity of the prize pool, then route to obtain personalized prize draw times, then construct a user-specific prize set to perform probability calculation, and finally synchronize the inventory and trigger the post-processing plug-in. The business events (such as winning records) generated in the process are automatically synchronized to the record query module 304, which provides verifiable traceability services through a double-factor (prize identification + precise timestamp) architecture. The modules share state changes through the control bus: for example, the configuration update of the 301 module is broadcast in real time to the 302 and 303 modules to ensure the strong consistency of the system strategy; and the transaction log of the 303 module is automatically synchronized to the 304 module to build a complete evidence chain. In terms of fault tolerance, when a module is abnormal (such as the failure of the 303 module execution node), the scheduler immediately isolates the problem node and seamlessly migrates the request to the backup instance, realizing a full-process response of less than 100 milliseconds and zero-aware fault switching, forming a highly reliable and flexible prize draw business foundation.

[0093] In addition, the embodiment of the present application also provides an electronic device, which comprises a bus, a transceiver, a memory, a processor and a computer program stored in the memory and executable on the processor, the transceiver, the memory and the processor are connected through the bus respectively, the computer program is executed by the processor to realize each process of the embodiment of the method for implementing the general prize draw activity, and the same technical effects can be achieved. To avoid repetition, details are not repeated here.

[0094] Specifically, referring to Figure 4 The embodiment of the present application also provides an electronic device, which comprises a bus 1110, a processor 1120, a transceiver 1130, a bus interface 1140, a memory 1150 and a user interface 1160.

[0095] The transceiver 1130 is configured to receive and send data under the control of the processor 1120.

[0096] In the embodiments of the present application, the bus architecture (represented by the bus 1110) can include any number of interconnected buses and bridges, the bus 1110 connecting various circuits including one or more processors represented by the processor 1120 and the memory represented by the memory 1150.

[0097] The bus 1110 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port (AGP), a processor or local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) bus, and Peripheral Component Interconnect (PCI) bus.

[0098] The processor 1120 can be an integrated circuit chip having signal processing capability. In implementation, each step of the method embodiments described above can be completed by integrated logic circuitry of hardware or instructions in the form of software in the processor. The processor described above includes: a general processor, a central processing unit (CPU), a network processor (NP), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a complex programmable logic device (CPLD), a programmable logic array (PLA), a microcontroller unit (MCU), or other programmable logic devices, discrete gates, transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. For example, the processor can be a single-core processor or a multi-core processor, and the processor can be integrated into a single chip or located in multiple different chips.

[0099] The processor 1120 can be a microprocessor or any conventional processor. The method steps disclosed in combination with the embodiments of the present application can be directly executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in a readable storage medium known in the art, such as random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), register, etc. The readable storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with the hardware thereof.

[0100] The bus 1110 can also connect various other circuits or devices such as peripheral devices, voltage stabilizers or power management circuits, etc. together, and the bus interface 1140 provides an interface between the bus 1110 and the transceiver 1130, which are well known in the art. Therefore, the embodiments of the present application will not be further described.

[0101] The transceiver 1130 can be one element or multiple elements, such as multiple receivers and transmitters, providing a means for communicating with various other apparatuses over a transmission medium. For example, the transceiver 1130 receives external data from other devices, and the transceiver 1130 transmits processed data from the processor 1120 to other devices. Depending on the nature of the computer system, a user interface 1160, such as a touchscreen, physical keyboard, display, mouse, speaker, microphone, trackball, joystick, stylus, etc., can also be provided.

[0102] It should be understood that, in embodiments of the present application, the memory 1150 can further include a memory that is remotely located with respect to the processor 1120, which can be connected to a server through a network. One or more portions of the above-mentioned network can be an ad hoc network, an intranet, an extranet, a virtual private network (VPN), a local area network (LAN), a wireless LAN (WLAN), a wide area network (WAN), a wireless wide area network (WWAN), a metropolitan area network (MAN), the Internet, a public switched telephone network (PSTN), a public or shared cellular network, a wireless network, a Wi-Fi network, and a combination of two or more of the above-mentioned networks. For example, the cellular network and the wireless network can be a Global System for Mobile Communications (GSM) system, a Code Division Multiple Access (CDMA) system, a Worldwide Interoperability for Microwave Access (WiMAX) system, a General Packet Radio Service (GPRS) system, a Wideband Code Division Multiple Access (WCDMA) system, a Long Term Evolution (LTE) system, an LTE Frequency Division Duplex (FDD) system, an LTE Time Division Duplex (TDD) system, an LTE-Advanced (LTE-A) system, a Universal Mobile Telecommunications (UMTS) system, an Enhanced Mobile Broadband (eMBB) system, a massive Machine Type of Communication (mMTC) system, an Ultra-Reliable Low Latency Communication (uRLLC) system, etc.

[0103] It should be appreciated that the memory 1150 in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both a volatile memory and a non-volatile memory. The non-volatile memory includes a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a Flash Memory, among others.

[0104] The volatile memory can include a Random Access Memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM are available, for example, a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synchlink DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 1150 of the electronic device described in the embodiments of the present application includes, but is not limited to, the above and any other suitable type of memory.

[0105] In the embodiments of the present application, the memory 1150 stores an operating system 1151 and the following elements of an application 1152: executable modules, data structures, or a subset thereof, or an extended set thereof.

[0106] Specifically, the operating system 1151 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application 1152 includes various application programs, such as a Media Player and a Browser, for implementing various application services. The program implementing the method of the embodiments of the present application can be included in the application 1152. The application 1152 includes applets, objects, components, logic, data structures, and other computer system executable instructions for performing specific tasks or implementing specific abstract data types.

[0107] In addition, the embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement each process of the method embodiment of the general lottery activity implementation method and achieve the same technical effects. To avoid repetition, details are not described herein.

[0108] The computer readable storage medium includes transitory and non-transitory, permanent and non-permanent, removable and non-removable media, which is a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium includes electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, and any suitable combination of the foregoing. The computer readable storage medium includes phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette storage, magnetic tape disk storage or other magnetic storage devices, memory stick, mechanically encoded devices (such as punch cards or raised structures in grooves having instructions recorded thereon), or any other non-transmission medium that can be used to store information accessible to computing devices. According to the definition in the embodiment of the present application, the computer readable storage medium does not include a temporary signal per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (such as optical pulses through optical fiber cables) or electrical signals transmitted through wires.

[0109] In several embodiments provided in the present application, it should be understood that the disclosed devices, electronic devices and methods can be implemented in other ways. For example, the above-described device embodiments are only illustrative, and for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interfaces, devices or units, and can also be electrical, mechanical or other form of connection.

[0110] The units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, which can be located in one location or distributed on multiple network units. Part or all of the units can be selected according to actual needs to solve the problems to be solved in the embodiment of the present application.

[0111] In addition, each function unit in various embodiments of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.

[0112] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a program product, which is stored in a storage medium, including a plurality of instructions to make a computer device (including: personal computer, server, data center or other network device) execute all or part of the steps of the method described in various embodiments of the present application. The storage medium includes various storage media listed above that can store program codes.

[0113] In addition, the embodiments of the present application provide a computer program product, which includes a computer program, and the computer program is executed by a processor to realize each process of the method embodiments of the general lottery activity implementation method described above, and can achieve the same technical effects. To avoid repetition, it will not be described here.

[0114] Embodiment 1

[0115] Lottery activity implementation of global e-commerce platform

[0116] 1. Configuration definition phase

[0117] The operator creates a Qixi cross-border promotion activity configuration file (activity ID: GLOBAL_2023) through the configuration management module. The core parameters include:

[0118] Space-time strategy: Asia region opening time (August 18, 00:00-24, 23:59 GMT+8), Europe region opening time (August 18, 08:00-25, 07:59 GMT+2);

[0119] Permission rule: new users can only draw the basic prize pool, and VIP users can unlock the luxury prize pool;

[0120] Inventory management: total inventory of limited edition handbags is 200 (single limit purchase 1), and electronic coupon inventory has no upper limit;

[0121] Probability model: the winning probability of limited edition handbags in the luxury prize pool is 0.1%, and the probability of electronic coupons is 98%;

[0122] Zone coding: bind ASIA zone with EURO zone geo-fencing strategy.

[0123] 2. User interaction stage

[0124] Smart pre-check (information query interface): when French user Sophie visits, the system determines that she belongs to the EURO zone based on her IP address, and performs the following configuration calculation: dynamically determines that she is currently located in Europe and the opening time window (returns the prize pool opening state: ACTIVE); filters the light luxury prize pool according to her new user identity (returns the user unlocking state: BASIC_ONLY); and pushes the visual prize pool list in real time (only contains electronic coupons and basic physical prizes).

[0125] Atomization execution (prize draw execution interface): when Sophie consumes a free opportunity to draw a prize: the routing engine identifies the source of the opportunity (new user gift activity); the inventory pre-screen automatically removes out-of-stock goods in the European warehouse to form a compliant candidate set; the probability decision triggers a random calculation within the electronic coupon set; transaction closed loop: inventory double-write system (deducts global electronic coupon inventory and marks the user as having received the coupon); post-extension: calls the multi-language coupon service to generate a French version of the electronic voucher.

[0126] Multi-dimensional traceability (record query interface): when Sophie views the record in the order center: returns structured data: {prize ID: eCoupon_FR_2023, draw time: 2023-08-18T10:23:45.128Z}; activates the electronic voucher detail page through the prize ID second-level association; generates a "remaining 23 days valid" dynamic reminder based on the accurate timestamp.

[0127] 3. Dynamic regulation stage

[0128] When the operation monitoring finds that high-end prizes in the Asian zone are unsalable: adjust the configuration through hot updates: reduce the VIP user access from Lv3 to Lv2; the information query interface pushes the new rules to Southeast Asian users within 80ms; the execution interface dynamically expands the light luxury prize pool candidate user range, ultimately increasing the high-end prize pool participation rate by 200% and zero service interruption.

[0129] This embodiment realizes three major breakthroughs in the process of simultaneous online in multiple countries: agility breakthrough: the deployment period of new activities is compressed from 5 days to 2 hours; consistency guarantee: global inventory error tends to be 0 under 100,000-level concurrency; cross-domain compliance: automatically avoids 23 regional policy conflicts through zone coding.

[0130] The above merely describes specific implementation of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the embodiments of the present application, which should be covered in the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application should be subject to the protection scope of the claims.

Claims

1. A general method for implementing a lottery activity, characterized in that: include: Creating a lottery configuration file, which contains at least a unique identifier for the activity and prize pool configuration information. The prize pool configuration information includes: prize pool opening time range, user lottery condition restriction rules, total inventory limit for each prize, personal inventory limit, and the probability of winning each prize; Create a lottery information query interface, configured to take the activity unique identifier and user information as input parameters, dynamically calculate the prize pool opening status and user permission status based on the configuration file, and return real-time data including the prize pool opening status, user unlocking status, and remaining prize inventory; Create a lottery execution interface, which is configured to take the activity unique identifier, user information, target prize pool identifier, and number of draws as input parameters, and execute the lottery process including probabilistic random draws, dynamic inventory deductions, and scalable post-processing; Create a lottery record query interface, which is configured to use the activity unique identifier, user information and paging parameters as input parameters, query from the database and return the user's historical lottery records in reverse chronological order.

2. The method according to claim 1, characterized in that The prize pool configuration information also includes: Open regional codes are used to limit the visibility of prize pools for users in different regions.

3. The method according to claim 2, characterized in that The data returned by the lottery information query interface includes: The prize pool opening status calculated based on the configured opening time range; The user's unlock status is calculated based on the user lottery restriction rules.

4. The method according to claim 1, wherein The execution process of the lottery execution interface includes: Verify whether the configuration of the target prize pool identifier exists; Obtain and verify whether the number of draws requested by the user is legal; Perform a random draw based on the configured winning probability value; Deduct the total prize inventory and personal winning inventory.

5. The method according to claim 4, characterized in that The obtaining of the number of user lottery draws includes: Obtain the number of lucky draws available to the user through differentiated processing logic.

6. The method according to claim 4, characterized in that Before executing the random draw, it also includes: Based on the total inventory and personal inventory limits, construct a set of prizes that the current user can draw.

7. The method according to claim 4, characterized in that After executing the lottery, it also includes: Call the differentiation post-processing logic.

8. The method according to claim 1, characterized in that The data returned by the lottery record query interface includes: The winning prize logo and drawing time.

9. A general device for implementing a lottery activity, characterized in that: include: Configuration management module, used to create and load the lottery configuration file; An information query module, including the lottery information query interface; A lottery execution module, including the lottery execution interface; The record query module includes the lottery record query interface.

10. An electronic device, characterized in that: include: processor and memory; The memory stores a computer program, and when the program is executed by the processor, the method according to any one of claims 1 to 8 is implemented.

11. A computer-readable storage medium, characterized in that The computer instructions are stored, and when the instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.

12. A computer program product, characterized in that Contains program code, which, when run on a computing device, executes the method described in any one of claims 1 to 8.