Game server task storage and synchronization methods and systems
By prohibiting the storage of tasks involving ancillary functions in the game server and merging tasks with the same conditions, the problem of large storage space occupied by game task data was solved, and more efficient task storage and synchronization were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU ELECTRONICS SOUL NETWORK TECH
- Filing Date
- 2023-04-03
- Publication Date
- 2026-05-26
Smart Images

Figure CN116492670B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to methods, systems, electronic devices and storage media for storing and synchronizing game server tasks. Background Technology
[0002] With the rapid development of computer technology, online games are increasingly permeating people's lives. As the number of players and the scale of games continue to grow, the amount of data that servers need to process is also constantly increasing.
[0003] In related technologies, each task in a game task system needs to be stored separately, which takes up a lot of storage space, and the task system needs to send out a large amount of task data every time a player logs in.
[0004] Currently, no effective solution has been proposed to address the issue of large storage requirements for game task data in related technologies. Summary of the Invention
[0005] This application provides a method, apparatus, system, computer device, and computer-readable storage medium for storing and synchronizing game server tasks, in order to at least solve the problem of large storage requirements for game task data in related technologies.
[0006] In a first aspect, embodiments of this application provide a method for storing and synchronizing game server tasks, the method comprising:
[0007] When the task progress is updated: confirm that the task is not completed.
[0008] Based on the associated information of the unfinished tasks, a first unfinished task and a second unfinished task are determined, wherein the first unfinished task is set to be prohibited from being stored in the task database.
[0009] Determine whether there are any tasks with the same conditions among the second unfinished tasks. If so, write the tasks with the same conditions into the same task group and store the task group in the task database.
[0010] After receiving a user's request to claim a task: retrieve the unfinished tasks from each of the auxiliary function databases and the task database respectively.
[0011] In some embodiments, the method further includes, during the process of writing tasks with the same conditions into the same task group:
[0012] Define a claim marker as a preset field, and write the claim marker into the task group, wherein each bit of the preset field represents the reward claim status of a task.
[0013] In some embodiments, before receiving a user's request to claim a task, the method further includes:
[0014] Upon receiving a notification that a user has logged in, the task system calculates the number of red dots for the unfinished tasks and pushes it to the red dot system, which then instructs the game interface to display the number of red dots.
[0015] In some embodiments, retrieving the unfinished tasks from the respective auxiliary function databases and the task database includes:
[0016] All first unfinished tasks are retrieved from the respective auxiliary function databases, and all second unfinished tasks are retrieved from the task database to obtain the unfinished tasks. The details of the unfinished tasks are then sent to the user's game task interface.
[0017] In some embodiments, the task group includes:
[0018] The task group ID, task completion progress, and reward claim status for each task in the task group, wherein the task completion progress is the shared progress of the task group.
[0019] Secondly, embodiments of this application provide a game server task storage and synchronization system, the system comprising: a task acquisition module, a judgment module, a merging module, and a task distribution module.
[0020] The task acquisition module is used to identify incomplete tasks when the task progress is updated.
[0021] The judgment module is used to determine a first unfinished task and a second unfinished task based on the associated function information of the unfinished task, wherein the first unfinished task is set to be prohibited from being stored in the task database.
[0022] The merging module is used to determine whether there are tasks with the same conditions among the second unfinished tasks. If so, the tasks with the same conditions are written into the same task group and the task group is stored in the task database.
[0023] The task distribution module is used to, after receiving a user's request to claim a task, retrieve the unfinished tasks from each of the auxiliary function databases and the task database respectively.
[0024] In some embodiments, the merging module is further configured to define a claim marker as a preset field and write the claim marker into a task group, wherein each bit of the preset field represents the reward claim status of a task.
[0025] In some embodiments, the task distribution module is further configured to, upon receiving a user's online notification, calculate the number of red dots for the unfinished tasks and push them to the red dot system, which instructs the game interface to display the number of red dots.
[0026] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the game server task storage and synchronization method as described in the first aspect above.
[0027] Fourthly, embodiments of this application provide a storage medium on which a computer program is stored, which, when executed by a processor, implements the game server task storage and synchronization method as described in the first aspect above.
[0028] Compared to related technologies, the game server task storage and synchronization provided in this application embodiment, by setting unfinished tasks involving auxiliary functions to be prohibited from being stored in the task database, and merging unfinished tasks with the same conditions into the task database, allows the server to only count the number of red dots for unfinished tasks when a user logs in, sending this number to the user terminal for display on the red dot interface, without temporarily sending the specific task type and task details. When the user accepts a task, the details of the unfinished tasks are then retrieved from the task database and the databases of various auxiliary functions. This solves the problem of each task in the game task system being stored separately, which occupies a large amount of storage space, and the need for the task system to send a large amount of task data every time a user logs in. It reduces the storage space occupied by game task data and the amount of data required to send to indicate unfinished tasks during the user's login phase. Attached Figure Description
[0029] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0030] Figure 1 This is a schematic diagram of the application environment of the game server task storage and synchronization method according to an embodiment of this application;
[0031] Figure 2 This is a flowchart of a game server task storage and synchronization method according to an embodiment of this application;
[0032] Figure 3 This is a structural block diagram of a game server task storage and synchronization system according to an embodiment of this application;
[0033] Figure 4This is a schematic diagram of the internal structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0035] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.
[0036] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0037] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.
[0038] The game server task storage and synchronization method provided in this application can be applied to, for example... Figure 1 The diagram shows the application environment. Figure 1 As shown, the game server 10 and the user terminal 11 communicate via a network. When updating the task progress, the game server 10 retrieves incomplete tasks and, based on the associated information of the incomplete tasks' auxiliary functions, determines a first incomplete task and a second incomplete task. The first incomplete task is set to be prohibited from being stored in the task database. The game server 10 then checks if there are any tasks with matching conditions among the second incomplete tasks. If so, it writes the tasks with matching conditions into the same task group and stores the task group in the task database. After receiving a task request from the user terminal 11, the game server 10 retrieves all incomplete tasks from the task database and various auxiliary function databases and distributes them to the user terminal 11. The game server 10 can be implemented using a standalone server or a server cluster consisting of multiple servers. The user terminal 11 can be, but is not limited to, various personal computers, laptops, smartphones, and tablets.
[0039] This embodiment provides a method for storing and synchronizing game server tasks. Figure 2 This is a flowchart of a game server task storage and synchronization method according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:
[0040] Step S201, during task progress update: Identify incomplete tasks. The game server retrieves incomplete tasks from the local cache.
[0041] Step S202: Based on the associated information of the ancillary functions of the incomplete tasks, determine the first incomplete task and the second incomplete task, wherein the first incomplete task is set to be prohibited from being stored in the task database. In this embodiment, based on the associated information of the ancillary functions of the incomplete tasks, tasks involving ancillary functions are determined as the first incomplete task, and tasks not involving ancillary functions are determined as the second incomplete task. The associated information of ancillary functions refers to whether the incomplete task involves ancillary functions such as backpacks, maps, or pets.
[0042] For example, when an incomplete task is collecting mushroom items, this task involves the backpack function and is therefore the first incomplete task, which cannot be stored in the task database; when an incomplete task is acquiring coins, this task does not involve any additional functions and is therefore the second incomplete task, which will be stored in the task database.
[0043] It should be noted that in traditional methods, unfinished tasks involving auxiliary functions are stored in both the task database and its corresponding auxiliary function database. In this embodiment, it is prohibited to store unfinished tasks involving auxiliary functions in the task database. After receiving a user's request to claim a task, these unfinished tasks involving auxiliary functions are retrieved from the respective auxiliary function databases, thereby reducing the storage space occupied by task data.
[0044] Step S203: Determine if there are any tasks with the same conditions among the second incomplete tasks. If so, write the tasks with the same conditions into the same task group and store the task group in the task database. In this embodiment, by merging tasks with the same conditions into task groups and storing them in the database, the storage space occupied by task data is further reduced.
[0045] For example, if there are 10 unfinished tasks, all of which require acquiring gold coins, but each task requires a different number of gold coins, in the current technology, these 10 tasks are stored separately, and each task must be written with the task conditions and the number of gold coins currently collected. If these 10 tasks are merged into a task group, it is only necessary to write a common task condition and a common number of gold coins collected into the task group.
[0046] Step S204: After receiving the user's request to claim a task: retrieve all unfinished tasks from the respective auxiliary function databases and the task database. It should be noted that, considering the connection with steps S201 to S203 above, in this step, after receiving the user's request to claim a task, the game server retrieves all currently unfinished tasks from the task database and the respective auxiliary function databases, and sends the details of these tasks to the user's game task interface.
[0047] Through steps S201 to S204 above, this embodiment sets unfinished tasks involving auxiliary functions to be prohibited from being stored in the task database, and merges unfinished tasks with the same conditions into the task database. When a user logs in, the server only calculates the number of red dots for unfinished tasks and sends this number to the user terminal for display on the red dot interface, without temporarily sending the specific task type and task details. When the user accepts a task, the details of the unfinished tasks are then retrieved from the task database and the databases of various auxiliary functions. This solves the problem that each task in the game task system is stored separately, which occupies a large amount of storage space, and that the task system needs to send a large amount of task data every time a user logs in. It reduces the storage space occupied by game task data and the amount of data that needs to be sent to indicate unfinished tasks during the user's login phase.
[0048] In some embodiments, the process of writing tasks with consistent conditions into the same task group further includes:
[0049] Define the claim marker as a preset field and write the claim marker into the task group. Each bit of the preset field represents the reward claim status of a task.
[0050] For example, tasks that have completed reward collection are marked as 1, and tasks that have not completed reward collection are marked as 0. When five tasks with the same conditions need to be written into the same task group, and tasks 1 and 2 have completed reward collection, while tasks 3, 4 and 5 have not completed reward collection, the collection mark is defined as 11000.
[0051] In this embodiment, the reward claim status of the task is represented by a preset field, which further reduces the storage space occupied by task data.
[0052] In some embodiments, before receiving a user's request to claim a task, the method further includes:
[0053] Upon receiving a user's online notification, the task system calculates the number of red dots for incomplete tasks and pushes this number to the red dot system, which then instructs the game interface to display the number of red dots. It's worth noting that in traditional methods, upon receiving a user's online notification, the task system sends a preset number of task details to the client, which then calculates the number of incomplete tasks and displays red dots on the interface based on this number. In this embodiment, the number of incomplete tasks is calculated by the task system. If the user hasn't claimed any tasks from online to offline, the task system only sends the red dot count, reducing the amount of data sent to indicate incomplete tasks during the user's online phase.
[0054] In some embodiments, retrieving unfinished tasks from various auxiliary function databases and task databases includes:
[0055] Retrieve all first-incomplete tasks from the various auxiliary function databases, retrieve all second-incomplete tasks from the task database, obtain detailed information on all incomplete tasks, and send the detailed information of all incomplete tasks to the user's game task interface for task details display.
[0056] For example, tasks to collect coins can be retrieved from the task database, tasks to collect mushroom items can be retrieved from the backpack database, and tasks for map levels can be retrieved from the map database.
[0057] In some embodiments, the task group includes:
[0058] The task group ID, task completion progress, and reward claim status for each task within the task group are displayed. The task completion progress is shared across the entire task group. It should be noted that the task group also includes the completion requirements for each individual task.
[0059] For example, a task group contains five tasks to earn coins. Task 1 requires earning 10 coins, Task 2 requires earning 20 coins, Task 3 requires earning 30 coins, Task 4 requires earning 50 coins, and Task 5 requires earning 100 coins. The current number of coins earned is 40. Tasks 1 and 2 have been completed and rewards have been claimed. Therefore, the task group ID can be "Earn Coins", the task completion progress is 40 / 100, the task reward claim status can be 11000, and the completion requirements for each task are: Task 1: 10 coins, Task 2: 20 coins, Task 3: 30 coins, Task 4: 50 coins, and Task 5: 100 coins.
[0060] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0061] This embodiment also provides a game server task storage and synchronization system, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the terms "module," "unit," "subunit," etc., can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0062] Figure 3 This is a structural block diagram of a game server task storage and synchronization system according to an embodiment of this application, such as... Figure 3 As shown, the system includes a task acquisition module 31, a judgment module 32, a merging module 33, and a task distribution module 34.
[0063] Task acquisition module 31 is used to identify incomplete tasks when the task progress is updated.
[0064] The judgment module 32 is used to determine the first unfinished task and the second unfinished task based on the associated information of the unfinished tasks, wherein the first unfinished task is set to be prohibited from being stored in the task database.
[0065] The merging module 33 is used to determine whether there are tasks with the same conditions among the second unfinished tasks. If so, the tasks with the same conditions are written into the same task group and the task group is stored in the task database.
[0066] The task assignment module 34 is used to retrieve unfinished tasks from the various auxiliary function databases and the task database after receiving a user's request to claim a task.
[0067] Through the above system, the task acquisition module 31 identifies incomplete tasks when the task progress is updated; the judgment module 32 sets incomplete tasks involving auxiliary functions to be prohibited from being stored in the task database; the merging module 33 merges incomplete tasks with the same conditions and stores them in the task database; and the task distribution module 34 only retrieves incomplete tasks from the task database and the various auxiliary function databases after receiving a user's request to claim a task. This solves the problem of storing each task separately in a game task system, which consumes a large amount of storage space, and reduces the storage space occupied by game task data, as well as the amount of data required to distribute to notify users of incomplete tasks when they log in.
[0068] In some embodiments, the merging module is further configured to define a claim marker as a preset field and write the claim marker into the task group, wherein each bit of the preset field represents the reward claim status of a task. This embodiment further reduces the storage space occupied by task data by representing the reward claim status of a task with a preset field.
[0069] In some embodiments, the task distribution module is further configured to, upon receiving a user's online notification, calculate the number of red dots for incomplete tasks and push this number to the red dot system, which then instructs the game interface to display the number of red dots. In this embodiment, the number of incomplete tasks is calculated by the task system; if the user has not claimed any tasks from online to offline, only the number of red dots is sent, significantly reducing the amount of data transmitted.
[0070] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0071] This embodiment also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0072] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0073] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0074] S1, when updating task progress: confirm that the task is not completed.
[0075] S2, based on the associated information of the unfinished tasks, determine the first unfinished task and the second unfinished task, wherein the first unfinished task is set to be prohibited from being stored in the task database.
[0076] S3, determine whether there are tasks with the same conditions among the second unfinished tasks. If so, write the tasks with the same conditions into the same task group and store the task group in the task database.
[0077] S4, after receiving a user's request to claim a task: retrieves incomplete tasks from the respective auxiliary function database and task database.
[0078] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0079] In one embodiment, Figure 4 This is a schematic diagram of the internal structure of an electronic device according to an embodiment of this application, such as... Figure 4As shown, an electronic device is provided, which can be a server, and its internal structure diagram can be as follows. Figure 4 As shown, this electronic device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The database stores data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a game server task storage and synchronization method.
[0080] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0081] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0082] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0083] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for storing and synchronizing game server tasks, characterized in that, The method includes: When the task progress is updated: confirm that the task is not completed. Based on the associated information of the unfinished tasks, a first unfinished task and a second unfinished task are determined. The task involving the associated function is the first unfinished task, and the task not involving the associated function is the second unfinished task. The first unfinished task is set to be prohibited from being stored in the task database. Determine whether there are any tasks with the same conditions among the second unfinished tasks. If so, write the tasks with the same conditions into the same task group, define the claim mark as a preset field, write the claim mark into the task group, wherein each bit of the preset field represents the reward claim status of a task, and store the task group into the task database. When a user is notified to log in, the task system calculates the number of red dots for the unfinished tasks and pushes it to the red dot system, which instructs the game interface to display the number of red dots. After receiving a user's request to claim a task: The unfinished tasks are retrieved from each of the auxiliary function databases and the task database, including: All first unfinished tasks are retrieved from the respective auxiliary function databases, and all second unfinished tasks are retrieved from the task database to obtain the unfinished tasks. The details of the unfinished tasks are then sent to the user's game task interface.
2. The method according to claim 1, characterized in that, The task group includes: The task group ID, task completion progress, and reward claim status for each task in the task group, wherein the task completion progress is the shared progress of the task group.
3. A game server task storage and synchronization system, characterized in that, The system includes: a task acquisition module, a judgment module, a merging module, and a task distribution module. The task acquisition module is used to identify incomplete tasks when the task progress is updated. The judgment module is used to determine a first unfinished task and a second unfinished task based on the associated information of the ancillary functions of the unfinished tasks. The task involving ancillary functions is the first unfinished task, and the task not involving ancillary functions is the second unfinished task. The first unfinished task is set to be prohibited from being stored in the task database. The merging module is used to determine whether there are tasks with the same conditions among the second unfinished tasks. If so, the tasks with the same conditions are written into the same task group. The claim mark is defined as a preset field, and the claim mark is written into the task group. Each bit of the preset field represents the reward claim status of a task. The task group is stored in the task database. The task distribution module is used to, upon receiving a user's online notification, calculate the number of red dots for the unfinished tasks and push them to the red dot system, which instructs the game interface to display the number of red dots; after receiving a user's request to claim a task: retrieve the unfinished tasks from each auxiliary function database and the task database, including: All first unfinished tasks are retrieved from the respective auxiliary function databases, and all second unfinished tasks are retrieved from the task database to obtain the unfinished tasks. The details of the unfinished tasks are then sent to the user's game task interface.
4. An electronic 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, it implements the game server task storage and synchronization method as described in any one of claims 1 to 2.
5. A storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the game server task storage and synchronization method as described in any one of claims 1 to 2.