Data caching processing method and device based on lottery game prize period state

By implementing the secondary cache processing method based on the lottery game prize period state in memory and middleware, the problem of long cache change time in the existing technology is solved, and the data replacement frequency and response speed are achieved, meeting the high real-time requirements of lottery trading services.

CN119576985APending Publication Date: 2025-03-07CHINA SPORTS LOTTERY TECH GROUP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311118135.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The existing secondary caching mechanism cannot meet the high real-time requirements in lottery trading business scenarios with higher real-time requirements, and the cache change time is long, which cannot effectively improve the system response speed.

Method used

By implementing secondary cache in memory and middleware, and regularly checking the current prize period status based on the lottery game prize period status, triggering the corresponding prize period data warm-up thread, loading or unloading the business data of the specified prize period, and completing the warm-up or cache cleaning process, thereby improving the frequency and speed of hot spot data replacement.

Benefits of technology

This method does not need to rely on a large number of business requests to trigger cache refresh, which significantly improves the hit rate of the secondary cache data, improves the system's response speed, and reduces the system's response time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576985A_ABST
    Figure CN119576985A_ABST
Patent Text Reader

Abstract

The invention provides a data caching processing method and device based on a lottery game award period state, and relates to the technical field of computers, the method comprises the following steps: regularly checking the current award period state of a lottery game; triggering a corresponding award period data pre-heating process according to the current award period state; and according to the prize period data pre-heating process, loading the business data needing to be cached in the specified prize period, completing the pre-heating process, or unloading the cached business data in the specified prize period, and completing the cache cleaning process. According to the method, the hit rate of the second-level cache data can be more effectively improved, the response speed of the system is improved, and the response time of the system is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data cache processing method and device based on lottery game award period status. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.

[0003] The lottery industry has high requirements for the real-time and accuracy of data. Traditional lottery systems often use databases as the first-level cache, but the read and write operations of the database are time-consuming, resulting in a slow system response speed. To solve this problem, the second-level cache technology came into being. However, the existing second-level cache mechanism is usually a "passive" second-level cache. Compared with the needs of the lottery industry, in business scenarios with higher real-time requirements, this type of cache system can only passively release the cache space gradually as the cache expires after the hot spot offset occurs in the system data. The time required for its cache iteration is generally long, which cannot meet the high real-time requirements in the lottery transaction business.

[0004] In summary, there is an urgent need for a secondary cache technology solution that can overcome the above-mentioned defects and be applicable to lottery game scenarios. Summary of the invention

[0005] In order to solve the problems existing in the prior art, the present invention proposes a data cache processing method and device based on the lottery game prize period status. The present invention implements a secondary cache based on memory and middleware, and can configure and predefine cache recommendation strategies and cache preloading strategies. In the high real-time transaction process, through preset processing logic, in conjunction with the business characteristics of the lottery industry, there is no need to rely on a large number of business requests to trigger cache refresh during the prize period change process. The overall data cache processing process can effectively improve the frequency and speed of hot data replacement.

[0006] In a first aspect of an embodiment of the present invention, a data cache processing method based on a lottery game prize period status is proposed, the method comprising:

[0007] Regularly check the current prize status of lottery games;

[0008] Triggering a corresponding bonus period data preheating thread according to the current bonus period status;

[0009] According to the bonus period data preheating thread, the business data that needs to be cached for the specified bonus period is loaded to complete the preheating process, or the business data that has been cached for the specified bonus period is unloaded to complete the cache cleaning process.

[0010] In a second aspect of an embodiment of the present invention, a data cache processing device based on a lottery game award period state is proposed, the device comprising:

[0011] The current prize period status checking module is used to regularly check the current prize period status of the lottery game;

[0012] A preheating thread triggering module, used to trigger a corresponding bonus period data preheating thread according to the current bonus period status;

[0013] The business data processing module is used to load the business data that needs to be cached for the specified bonus period according to the bonus period data preheating thread to complete the preheating process, or to unload the business data that has been cached for the specified bonus period to complete the cache cleaning process.

[0014] In a third aspect of an embodiment of the present invention, a computer device is proposed, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a data cache processing method based on the lottery game award period status when executing the computer program.

[0015] In a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is proposed, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, a data cache processing method based on a lottery game award period status is implemented.

[0016] In a fifth aspect of an embodiment of the present invention, a computer program product is proposed. The computer program product includes a computer program. When the computer program is executed by a processor, a data cache processing method based on the lottery game award period status is implemented.

[0017] The data cache processing method and device based on the lottery game award period status of the present invention realizes secondary cache through memory and middleware, and can configure and predefine cache recommendation strategy and cache preloading strategy. In the high real-time transaction process, through preset processing logic, in conjunction with the business characteristics of the lottery industry, there is no need to rely on a large number of business requests to trigger cache refresh during the award period change process. The overall data cache processing process can increase the frequency and speed of hot data replacement. In actual application scenarios, it can more effectively improve the hit rate of secondary cache data, improve the response speed of the system, and reduce the system response time. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 It is a flow chart of a data cache processing method based on lottery game prize period status according to an embodiment of the present invention.

[0020] Figure 2 It is a flowchart of triggering a bonus period data preheating thread according to a specific embodiment of the present invention.

[0021] Figure 3 It is a flowchart of triggering a bonus period data preheating thread according to a specific embodiment of the present invention.

[0022] Figure 4 It is a schematic diagram of the architecture of a data cache processing device based on the lottery game prize period status according to an embodiment of the present invention.

[0023] Figure 5 It is a schematic diagram of the structure of a computer device according to an embodiment of the present invention.

[0024] Figure 6 It is a schematic diagram of a secondary cache mechanism according to a specific embodiment of the present invention. DETAILED DESCRIPTION

[0025] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0026] Those skilled in the art will appreciate that the embodiments of the present invention may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0027] According to an embodiment of the present invention, a data cache processing method and device based on lottery game award period status are proposed, which relate to the field of computer technology.

[0028] The principle and spirit of the present invention are explained in detail below with reference to several representative embodiments of the present invention.

[0029] Figure 1 FIG. 1 is a flow chart of a data cache processing method based on lottery game award period status according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0030] S101, regularly checking the current prize period status of the lottery game;

[0031] S102, triggering a corresponding bonus period data preheating thread according to the current bonus period status;

[0032] S103, according to the bonus period data preheating thread, load the business data that needs to be cached for the specified bonus period to complete the preheating process, or unload the business data that has been cached for the specified bonus period to complete the cache cleaning process.

[0033] In order to explain the above-mentioned data cache processing method based on the lottery game prize period status more clearly, each step is described in detail below.

[0034] In S101, the current prize period status of the lottery game is periodically checked.

[0035] The current bonus period status includes at least: from not on sale to on sale, on sale and cache not loaded yet, on sale to off sale.

[0036] In S102, a corresponding bonus period data preheating thread is triggered according to the current bonus period status.

[0037] In S103, according to the bonus period data preheating thread, the business data that needs to be cached for the specified bonus period is loaded to complete the preheating process, or the business data that has been cached for the specified bonus period is unloaded to complete the cache cleaning process.

[0038] refer to Figure 2 , is a flow chart of triggering the bonus period data preheating thread according to a specific embodiment of the present invention. Figure 2 As shown, the specific process is:

[0039] S201, if the current bonus period status is from not on sale to on sale, trigger the bonus period data preheating thread to load business rules and complete the bonus period business data preheating work.

[0040] S202: If the current bonus period status is on sale and the relevant business rule data has not been loaded into the cache, the bonus period data preheating thread is triggered to load the business data.

[0041] S203, if the current bonus period status is from the on-sale status to the off-sale status, trigger the bonus period data preheating thread to clean up the cache content of the expired bonus period.

[0042] refer to Figure 3 ,exist Figure 2 Based on the process shown, the method further includes:

[0043] S301, in a scenario of multiple lottery game prize periods, regularly check the changes in the current prize period status of the lottery game, trigger the business data loading or unloading process, and preheat the loading of business data for multiple prize periods that have not yet been sold in sequence.

[0044] It should be noted that, although the operations of the method of the present invention are described in a specific order in the above embodiments and the accompanying drawings, this does not require or imply that the operations must be performed in the specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0045] After introducing the method of the exemplary embodiment of the present invention, next, refer to Figure 4 A data cache processing device based on a lottery game award period status according to an exemplary embodiment of the present invention is introduced.

[0046] The implementation of the data cache processing device based on the lottery game award period state can refer to the implementation of the above method, and the repetitions will not be repeated. The terms "module" or "unit" used below can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.

[0047] Based on the same inventive concept, the present invention also proposes a data cache processing device based on the lottery game award period status, such as Figure 4 As shown, the device comprises:

[0048] The current prize period status checking module 410 is used to regularly check the current prize period status of the lottery game;

[0049] A preheating thread triggering module 420, configured to trigger a corresponding bonus period data preheating thread according to the current bonus period status;

[0050] The business data processing module 430 is used to load the business data that needs to be cached for the specified bonus period according to the bonus period data preheating thread to complete the preheating process, or to unload the business data that has been cached for the specified bonus period to complete the cache cleaning process.

[0051] It should be noted that, although several modules of the data cache processing device based on the lottery game award period state are mentioned in the above detailed description, this division is only exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules described above can be concretized in one module. On the contrary, the features and functions of one module described above can be further divided into multiple modules to be concretized.

[0052] Based on the above invention concept, Figure 5As shown, the present invention also proposes a computer device 500, including a memory 510, a processor 520, and a computer program 530 stored in the memory 510 and executable on the processor 520, wherein the processor 520 implements the aforementioned data cache processing method based on the lottery game award period status when executing the computer program 530.

[0053] Based on the aforementioned inventive concept, the present invention proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data cache processing method based on the lottery game award period status is implemented.

[0054] Based on the aforementioned inventive concept, the present invention proposes a computer program product, which includes a computer program. When the computer program is executed by a processor, a data cache processing method based on the lottery game award period status is implemented.

[0055] The data cache processing method and device based on the lottery game prize period status of the present invention are described below in conjunction with a specific embodiment.

[0056] refer to Figure 6 , is a schematic diagram of a secondary cache mechanism according to a specific embodiment of the present invention. Figure 6 As shown, the present invention uses the local memory of the application server and the middleware to form a secondary cache mechanism, caches hot data locally, and caches secondary hot data in the middleware, achieving the basic goal of the secondary cache to improve system access efficiency and reduce system response time.

[0057] Cooperating with the business status change detection thread, after discovering possible scenarios of business status changes and hot data drift, the detection thread notifies the business data change thread, triggers the hot data loading process in advance before a large number of new business data requests arrive, and adopts a certain cache elimination algorithm to eliminate the necessary cache data in the past period of time, thereby reducing the hot data offset. It is necessary to trigger the cache loading process through business requests to improve the hit rate of the secondary cache.

[0058] In the bonus period information caching scenario, as the bonus period changes, the bonus period query application service needs to cache various business rule data such as game configuration data, betting rule data, purchase method rule data, etc. for each bonus period.

[0059] Based on the secondary cache technology, a bonus period detection thread and a bonus period data preheating thread are provided.

[0060] Award period detection thread:

[0061] Regularly check the status of the current bonus period. When the bonus period changes from unsold to on-sale, trigger the bonus period data preheating thread to load business rules and complete the bonus period business data preheating work;

[0062] Regularly check the status of the current bonus period. When the bonus period is on sale and the relevant business rule data has not been loaded into the cache, trigger the bonus period data preheating thread to load the business data.

[0063] Regularly check the status of the current bonus period. When the bonus period status changes from on sale to off sale, trigger the bonus period data warm-up thread to clean up the cache content of the expired bonus period.

[0064] In the scenario of supporting multiple game bonus periods, in addition to checking the current state changes and triggering the business rule loading / unloading actions, sequential business data loading and preheating are performed for subsequent multiple bonus periods.

[0065] Award period data warm-up thread:

[0066] According to the triggering of the bonus period detection thread, the business data that needs to be cached during the specified bonus period is loaded on demand to complete the warm-up process;

[0067] According to the triggering situation of the bonus period data preheating thread, the cached business data of the specified bonus period is unloaded as needed to complete the cache cleanup process.

[0068] The data cache processing method and device based on the lottery game award period status of the present invention realizes secondary cache through memory and middleware, and can configure and predefine cache recommendation strategy and cache preloading strategy. In the high real-time transaction process, through preset processing logic, in conjunction with the business characteristics of the lottery industry, there is no need to rely on a large number of business requests to trigger cache refresh during the award period change process. The overall data cache processing process can increase the frequency and speed of hot data replacement. In actual application scenarios, it can more effectively improve the hit rate of secondary cache data, improve the response speed of the system, and reduce the system response time.

[0069] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of laws and regulations.

[0070] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0071] The present invention is described with reference to flowcharts and / or block diagrams of methods and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0072] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0073] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0074] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A data cache processing method based on lottery game prize period status, characterized in that: The method includes: Regularly check the current prize status of lottery games; Triggering a corresponding bonus period data preheating thread according to the current bonus period status; According to the bonus period data preheating thread, the business data that needs to be cached for the specified bonus period is loaded to complete the preheating process, or the business data that has been cached for the specified bonus period is unloaded to complete the cache cleaning process.

2. The data cache processing method based on the lottery game award period status according to claim 1, characterized in that: The current bonus period status includes at least: from not on sale to on sale, on sale and no cache loaded, on sale to off sale.

3. The data cache processing method based on the lottery game award period status according to claim 2, characterized in that: Triggering a corresponding bonus period data preheating thread according to the current bonus period status includes: If the current bonus period status changes from not on sale to on sale, the bonus period data preheating thread is triggered to load business rules and complete the bonus period business data preheating work.

4. The data cache processing method based on the lottery game award period status according to claim 2, characterized in that: Triggering a corresponding bonus period data preheating thread according to the current bonus period status includes: If the current bonus period status is on sale and the relevant business rule data has not been loaded into the cache, the bonus period data preheating thread is triggered to load the business data.

5. The data cache processing method based on the lottery game award period status according to claim 2, characterized in that: Triggering a corresponding bonus period data preheating thread according to the current bonus period status includes: If the current bonus period status is from on sale to off sale, the bonus period data preheating thread is triggered to clean up the cache content of the expired bonus period.

6. The data cache processing method based on the lottery game award period status according to claim 1, characterized in that: The method further includes: In the scenario of multiple lottery game prize periods, the changes in the current prize period status of the lottery game are checked regularly to trigger the business data loading or unloading process, and the business data loading and preheating are performed in sequence for multiple prize periods that have not yet been sold.

7. A data cache processing device based on lottery game prize period status, characterized in that: The device includes: The current prize period status checking module is used to regularly check the current prize period status of the lottery game; A preheating thread triggering module, used to trigger a corresponding bonus period data preheating thread according to the current bonus period status; The business data processing module is used to load the business data that needs to be cached for the specified bonus period according to the bonus period data preheating thread to complete the preheating process, or to unload the business data that has been cached for the specified bonus period to complete the cache cleaning process.

8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.