A method and device for updating task status of a virtual game
By using a data storage structure that combines key and value information in virtual games, along with data types and index information, the problem of low storage efficiency in virtual games is solved, achieving efficient storage and space-saving task status updates.
Patent Information
- Application Number
- CN202211231518.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-09
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2042-10-09
AI Technical Summary
In virtual games, existing technologies require a large amount of storage space to store game task states, especially when indexes are scattered, existing storage solutions are inefficient and not suitable for negative indexes.
A data storage structure consisting of key and value information is adopted. Each key information represents a set of consecutive index information, and each value information stores a set of task states. The task state is updated by data type and target index information. Combining the advantages of consecutive storage and run-length code storage, efficient storage is achieved.
It achieves efficient storage of virtual game task states, saves storage space, and the stored data is highly readable, easy to understand and maintain, and is suitable for positive and negative indexes.
Smart Images

Figure CN115445208B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of game technology, and in particular to a method and device for updating task status of a virtual game. Background Art
[0002] In virtual games, a large number of game tasks are involved. An index can be set for each game task. The index can usually be divided into intervals according to function, personnel, etc. When the index is used, it will be used continuously from the beginning of the interval. Therefore, the index value can be located in multiple scattered continuous intervals.
[0003] During the operation of a virtual game, there is a need to store the game task status. When storing the task status, the game status is usually represented by 0 or 1. Usually, only some indexes with a game status of 1 need to be stored (those not stored are 0). These indexes are saved one by one in a collection. However, as the game content becomes richer, this solution requires a lot of storage space. Summary of the invention
[0004] In view of the above problems, a method and device for updating the task status of a virtual game is proposed to overcome the above problems or at least partially solve the above problems, including:
[0005] A method for updating task status of a virtual game, wherein the virtual game includes a plurality of game tasks, each game task is configured with corresponding index information, and the method includes:
[0006] In response to an event of completing a target game task during the running of the virtual game, determining target index information corresponding to the target game task;
[0007] Obtain a preset data storage structure consisting of key information and value information; wherein each key information is used to represent continuous index information corresponding to a set of game tasks, and each value information is used to store a set of task states corresponding to a set of game tasks;
[0008] Determine the data type of the data storage structure according to the target index information;
[0009] The task status of the target game task is updated in the data storage structure according to the data type and the target index information.
[0010] Optionally, updating the task status of the target game task in the data storage structure according to the data type and the target index information includes:
[0011] Determine, according to the data type, target key information corresponding to the target index information;
[0012] In the data storage structure, determining target value information corresponding to the target key information;
[0013] The task status of the target game task is updated in the target value information.
[0014] Optionally, updating the task status of the target game task in the target value information includes:
[0015] Determine storage location information of the task state of the target game task in the target value information according to the data type and the target index information;
[0016] The task status corresponding to the storage location information is updated according to the current status of the target game task.
[0017] Optionally, the index information is integer information, and determining, according to the data type, target key information corresponding to the target index information includes:
[0018] Dividing the target index information by an integer according to the data type to obtain an integer divisibility information;
[0019] According to the divisibility information, target key information corresponding to the target index information is determined.
[0020] Optionally, determining storage location information of the task status of the target game task in the target value information according to the data type and the target index information includes:
[0021] Performing a modulo operation on the target index information according to the data type to obtain remainder information;
[0022] According to the remainder information, the storage location information of the task status of the target game task in the target value information is determined.
[0023] Optionally, determining, in the data storage structure, target value information corresponding to the target key information includes:
[0024] In the data storage structure, querying value information according to the target key information;
[0025] When the value information corresponding to the target key information is found, the found value information is determined as the target value information;
[0026] When the value information corresponding to the target key information is not found, the target value information corresponding to the target key information is configured.
[0027] Optionally, before responding to an event of completing a target game task during the running of the virtual game, the method further includes:
[0028] In response to a start operation for the target game task, determining a preceding game task of the target game task from a preset task index table, and determining preceding index information of the preceding game task;
[0029] In a preset data storage structure, determining the task status of the preceding game task according to the preceding index information;
[0030] When the task status of the preceding game task is a completed state, the target game task is started.
[0031] A method and device for updating task status of a virtual game, wherein the virtual game includes a plurality of game tasks, each game task is configured with corresponding index information, and the device includes:
[0032] A target index information determination module, configured to determine target index information corresponding to the target game task in response to an event of completing a target game task during the running of the virtual game;
[0033] A data storage structure acquisition module is used to acquire a preset data storage structure consisting of key information and value information; wherein each key information is used to represent continuous index information corresponding to a group of game tasks, and each value information is used to store a group of task states corresponding to a group of game tasks;
[0034] A data type determination module, used to determine the data type of the data storage structure according to the target index information;
[0035] A task status update module is used to update the task status of the target game task in the data storage structure according to the data type and the target index information.
[0036] A server comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the task status update method of the virtual game as described above when executed by the processor.
[0037] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the task status update method of the virtual game as described above is implemented.
[0038] The embodiments of the present invention have the following advantages:
[0039] The embodiment of the present invention determines the target index information corresponding to the target game task in response to the event of completing the target game task during the operation of the virtual game; obtains a preset data storage structure composed of key information and value information; wherein each key information is used to represent continuous index information corresponding to a group of game tasks, and each value information is used to store a group of task states corresponding to a group of game tasks; determines the data type of the data storage structure according to the target index information; updates the task state of the target game task in the data storage structure according to the data type and the target index information, thereby realizing efficient storage of the task state, and the stored data has good readability, is easy to understand and maintain, and saves storage space for a large number of task states that need to be stored. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0041] Figure 1 It is a flowchart of the steps of a method for updating the task status of a virtual game provided by one embodiment of the present invention;
[0042] Figure 2 is a flowchart of another method for updating task status of a virtual game provided by an embodiment of the present invention;
[0043] Figure 3a is a flowchart of another method for updating task status of a virtual game provided by an embodiment of the present invention;
[0044] Figure 3b This is a schematic diagram of a data storage structure provided by an embodiment of the present invention;
[0045] Figure 4 It is a structural diagram of a task status updating device for a virtual game provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] During the running of the virtual game, the task status needs to be stored in real time. The task status can be represented by 0 or 1, where 0 can represent that the task status is not stored, that is, the task status is incomplete, and 1 can represent that the task status is stored, that is, the task status is completed.
[0048] When a game task is completed, the index of the game task can be stored to achieve the storage of the game task. As the virtual game runs, more and more indexes need to be stored, so the stored indexes need to occupy more storage space.
[0049] For example, if the index data type is int64, one int64 is needed to store one index. When the state of index 0, 3, 7, 63 is 1, only the set {0, 3, 7, 63} needs to be stored, which requires 4 int64.
[0050] In practical applications, continuous storage or run-length code storage can be used to save storage space.
[0051] The continuous storage method is as follows: assuming that the maximum index to be stored is n, a continuous space of length n is applied for storage, and its i-th bit is the value corresponding to the index i (ie, the task status).
[0052] For example, if the game status corresponding to the 2nd and 5th indexes is 1 and the others are 0, then 01001 needs to be stored.
[0053] For continuous storage, when the index starts from 0 and is continuous, the compression efficiency is the highest and the reading and writing are also fast. However, when the index is more scattered, the space occupied will be larger. At the same time, when the index is a negative value, additional storage space needs to be set, which is not suitable for the case where the index is a negative value.
[0054] For example, when the game state corresponding to the 0th index and the 1000th index is 1, 1001 consecutive task states need to be stored.
[0055] The run-length code is stored as follows: continuous indexes with a value of 1 are stored in intervals. For example, the values from index 3 to index 10 are 1, the values from index 50 to index 1000 are 1, and the others are 0. Then, it is only necessary to store the array [[3,10], [50,1000]].
[0056] For run-length code storage, the compression efficiency is highest when there are a large number of consecutive identical values. Although it is applicable to the case where the index is a negative value, reading and updating are very slow, and the effect is poor when there are fewer consecutive identical values.
[0057] In an embodiment of the present invention, a data storage structure corresponding to key information and value information is constructed, each key information is for a set of continuous index information of game tasks, and each value information corresponds to a task status of a set of game tasks. After the target game task is completed, the task status of the target game task in the data storage structure can be updated according to the data type of the index.
[0058] For example, assuming that the index data type is int64, that is, storing an index requires one int64. In the data storage structure composed of key and value, one key information and one value information can be set to correspond to one int64 respectively, so that 64 consecutive index information are taken as a group, corresponding to one key information, and its corresponding value information consists of 64 task states.
[0059] Therefore, when the status of index 0, 3, 7, and 63 is 1, index 0 to index 63 all correspond to the same key information. Therefore, only one key information and one value information are required to store 64 task states, a total of 2 int64.
[0060] The embodiment of the present invention combines the advantages of continuous storage, can realize efficient storage of task status, and the stored data has good readability, is easy to understand and maintain, and can save storage space for a large number of task statuses that need to be stored. It is applicable not only to positive indexes, but also to negative indexes.
[0061] Reference Figure 1 , shows a flowchart of a method for updating a task status of a virtual game provided by an embodiment of the present invention, wherein the virtual game includes a plurality of game tasks, each of which is configured with corresponding index information, and specifically includes the following steps:
[0062] Step 101, in response to an event of completing a target game task during the running of a virtual game, determining target index information corresponding to the target game task;
[0063] A virtual game may include multiple game tasks, which may include game tasks assigned to players, or achievement tasks determined based on the player's game data. To facilitate game task management, corresponding index information may be set for each game task.
[0064] Game tasks are completed one by one as the player operates in the virtual game, and the task status of the game tasks completed by the player can be stored in real time.
[0065] During the running of the virtual game, when an event of completion of a target game task is detected, the event can be responded to to determine the target index information corresponding to the target game task.
[0066] Among them, the target index information corresponding to the target game task can be determined from the preset task index table.
[0067] Step 102, obtaining a preset data storage structure consisting of key information and value information; wherein each key information is used to represent continuous index information corresponding to a set of game tasks, and each value information is used to store a set of task states corresponding to a set of game tasks;
[0068] Among them, the task status may include whether the task has been completed, whether the achievement has been obtained, etc.
[0069] In a virtual game, a data storage structure consisting of key information and value information may be preset, and the index information and task status of the game tasks may be stored through the data storage structure.
[0070] In the data storage structure, it is divided into two parts: key information and value information. The key information and the value information can correspond one to one, wherein each key information can correspond to a set of index information of a game task, and the index information of this set of game tasks can be continuous index information; each value information can correspond to a set of task states of a set of game tasks; thus, each pair of key values can store the task states of multiple game tasks corresponding to a set of continuous indexes.
[0071] When the target game task is completed, the data storage structure can be obtained, and then the game state of the target game task can be stored in the data storage structure.
[0072] Step 103, determining the data type of the data storage structure according to the target index information;
[0073] After determining the target index information, determine the data type of the data storage structure according to the characteristics of the target index information. Specifically, you can choose a data type that is close to the length of the index continuous interval. For example, if the length of most continuous intervals is about 30, int32 can be used to store task status.
[0074] For example, when the index information is of integer type, the data type of the data storage structure may be int8, int16, int32, or int64.
[0075] Step 104, updating the task status of the target game task in the data storage structure according to the data type and the target index information.
[0076] After determining the data type and target index information, the game tasks can be grouped according to the data type, so that the group corresponding to the target index information can be determined, and then the task status of the target game task can be updated in the data storage structure.
[0077] In one embodiment of the present invention, before step 101, the method further includes:
[0078] Step S11, in response to a start operation for a target game task, determining a preceding game task of the target game task from a preset task index table, and determining preceding index information of the preceding game task;
[0079] In actual applications, multiple game tasks can be related to each other. For example, a certain game task can be started only when another game task is completed.
[0080] When a start operation is performed on a target game task, the start operation can be responded to to obtain a preset task index table, and then the predecessor game task of the target game task can be queried in the task index table, wherein the predecessor game task is a game task associated with the target game task, and the target game task can only be started when the predecessor game task is completed.
[0081] After the preceding game task is determined, preceding index information of the preceding game task may be determined, and the preceding index information is used to determine the task status of the preceding game task.
[0082] Step S12, determining the task status of the preceding game task according to the preceding index information in the preset data storage structure;
[0083] The task status of all game tasks may be stored in a preset data storage structure, so that after the pre-index information is determined, the task status of the pre-game task may be determined according to the pre-index information.
[0084] Step S13, when the task status of the preceding game task is completed, start the target game task.
[0085] In an embodiment of the present invention, by responding to an event of completing a target game task during the operation of a virtual game, target index information corresponding to the target game task is determined; a preset data storage structure consisting of key information and value information is obtained; wherein each key information is used to represent continuous index information corresponding to a group of game tasks, and each value information is used to store a group of task states corresponding to a group of game tasks; the data type of the data storage structure is determined according to the target index information; and the task state of the target game task is updated in the data storage structure according to the data type and the target index information, thereby achieving efficient storage of task states, and the stored data has good readability, is easy to understand and maintain, and saves storage space for a large number of task states that need to be stored.
[0086] Reference Figure 2 , shows a flowchart of another method for updating the task status of a virtual game provided by an embodiment of the present invention, wherein the virtual game includes a plurality of game tasks, each of which is configured with corresponding index information, and specifically includes the following steps:
[0087] Step 201, in response to an event of completing a target game task during the running of a virtual game, determining target index information corresponding to the target game task;
[0088] Step 202, obtaining a preset data storage structure consisting of key information and value information; wherein each key information is used to represent continuous index information corresponding to a set of game tasks, and each value information is used to store a set of task states corresponding to a set of game tasks;
[0089] Step 203, determining the data type of the data storage structure according to the target index information;
[0090] Step 204, determining target key information corresponding to the target index information according to the data type;
[0091] After determining the data type, the game task group where the target index information is located can be determined according to the data type, that is, the target key information can be determined.
[0092] Step 205, determining the target value information corresponding to the target key information in the data storage structure;
[0093] After the target key information is determined, the value information corresponding to the target key information may be queried in the data storage structure according to the target key information to determine the target value information corresponding to the target key information.
[0094] In one embodiment of the present invention, step 205 may include:
[0095] Sub-step 2051, in the data storage structure, query value information according to the target key information;
[0096] In actual applications, when a game task of a virtual game is completed, the task status of the game task is stored in a data storage structure. When determining the data storage structure, a query can be performed according to the target key information to determine whether the value information corresponding to the target key information is stored.
[0097] Sub-step 2052, when the value information corresponding to the target key information is found, the found value information is determined as the target value information;
[0098] Sub-step 2053, when the value information corresponding to the target key information is not found, configure the target value information corresponding to the target key information.
[0099] If the value information corresponding to the target key information is not found, it can be determined that the task status of the target game task is not stored in the data storage structure. Therefore, the target value information corresponding to the target key information can be configured, and an initial value can be set for the target value information.
[0100] For example, the task status can be represented by 1 or 0. A task status of 1 indicates that the task has been completed, and a task status of 0 indicates that the task has not been completed. When configuring the target value information corresponding to the target key information, a group of task statuses stored in the target value information can be set in advance to an initial value of 0, that is, the group of game tasks are all in an unfinished state.
[0101] Step 206, updating the task status of the target game task in the target value information.
[0102] After the target value information is determined, the considered status of the target game task in the target value information may be updated.
[0103] For example, when the target game task is not completed, the value of the task status corresponding to the target game task in the target value information is 0. When the target game task is completed, the value of the task status representing the target game task in the target value information can be modified from 0 to 1 to complete the task status update storage of the target game task.
[0104] In an embodiment of the present invention, by responding to an event of completing a target game task during the operation of a virtual game, target index information corresponding to the target game task is determined; a preset data storage structure consisting of key information and value information is obtained; wherein each key information is used to represent continuous index information corresponding to a group of game tasks, and each value information is used to store a group of task states corresponding to a group of game tasks; the data type of the data storage structure is determined according to the target index information; according to the data type, the target key information corresponding to the target index information is determined; in the data storage structure, the target value information corresponding to the target key information is determined; and the task state of the target game task is updated in the target value information, thereby realizing efficient storage of task states, and the stored data has good readability, is easy to understand and maintain, and saves storage space for a large number of task states that need to be stored.
[0105] Reference Figure 3a , shows a flowchart of another method for updating the task status of a virtual game provided by an embodiment of the present invention, wherein the virtual game includes a plurality of game tasks, each of which is configured with corresponding index information, and specifically includes the following steps:
[0106] Step 301, in response to an event of completing a target game task during the running of a virtual game, determining target index information corresponding to the target game task;
[0107] Step 302, obtaining a preset data storage structure consisting of key information and value information; wherein each key information is used to represent continuous index information corresponding to a group of game tasks, and each value information is used to store a group of task states corresponding to a group of game tasks;
[0108] Step 303, determining the data type of the data storage structure according to the target index information;
[0109] Step 304, determining target key information corresponding to the target index information according to the data type;
[0110] In one embodiment of the present invention, the index information is integer information, and step 304 may include the following sub-steps:
[0111] Sub-step 3041, dividing the target index information according to the data type to obtain divisibility information;
[0112] In actual applications, the index information of the game tasks can be integer information. After determining the data type, the target index information can be divided according to the number of tasks in each group of game tasks corresponding to the data type to group the game tasks and determine the divisibility information.
[0113] Sub-step 3042, determining the target key information corresponding to the target index information according to the divisibility information.
[0114] After the divisibility information is determined, the divisibility information may be used to determine the game task group corresponding to the target game task, that is, to determine the target key information corresponding to the target index information.
[0115] Step 305, determining the target value information corresponding to the target key information in the data storage structure;
[0116] Step 306, determining the storage location information of the task status of the target game task in the target value information according to the data type and the target index information;
[0117] In the data storage structure, each value information stores a set of task states, which is equivalent to a dictionary, and each dictionary value in the dictionary corresponds to a task state.
[0118] After determining the data type and target index information, the storage location information of the task status of the target game task in the dictionary can be determined.
[0119] In one embodiment of the present invention, step 306 may include the following sub-steps:
[0120] Sub-step 3061, performing a modulo operation on the target index information according to the data type to obtain remainder information;
[0121] In actual applications, the number of tasks in each group of game tasks is determined based on the data type. By performing a modulo operation on the target index information, the remainder information after integer division can be determined. Since the index information of each group of game tasks is continuous, the remainder information can be used to determine the position of the target game task in the corresponding game task group.
[0122] Sub-step 3062, determining the storage location information of the task status of the target game task in the target value information based on the remainder information.
[0123] After determining the remainder information, the remainder information can represent the order of the index information, and the task status corresponds to the index information one by one, so that the remainder information can be used to represent the storage location information of the task status of the target game task in the target value information, and the storage location information is used to store the task status of the target game task.
[0124] Step 307: Update the task status corresponding to the storage location information according to the current status of the target game task.
[0125] After the storage location information is determined, the task status stored in the storage location information in the data storage structure may be determined, and then the task status may be updated according to the current status of the target game task.
[0126] In an embodiment of the present invention, by responding to an event of completing a target game task during the operation of a virtual game, target index information corresponding to the target game task is determined; a preset data storage structure consisting of key information and value information is obtained; wherein each key information is used to represent continuous index information corresponding to a group of game tasks, and each value information is used to store a group of task states corresponding to a group of game tasks; the data type of the data storage structure is determined according to the target index information; according to the data type, the target key information corresponding to the target index information is determined; in the data storage structure, the target value information corresponding to the target key information is determined; according to the data type and the target index information, the storage location information of the task state of the target game task in the target value information is determined; according to the current state of the target game task, the task state corresponding to the storage location information is updated, thereby realizing efficient storage of the task state, and the stored data has good readability, is easy to understand and maintain, and saves storage space for a large number of task states that need to be stored.
[0127] The following is an exemplary description of the embodiment of the present invention in conjunction with the task execution process of the virtual game:
[0128] Data storage structure:
[0129] Assume that the index type to be stored is int64, such as Figure 3b The data structure GameplayStates inherits from the dictionary, and the storage space occupied by the key and value is int64.
[0130] When accessing index index, the key of the index in GameplayStates is key=index / / 64, that is, integer division; the bit_pos=index%64 (that is, modulus) of the corresponding value is its task state.
[0131] In the GameplayStates data structure, the value with the key key stores the states of all 64 indexes in the interval [key*64, key*64+63], using only 2 int64 (key-value) to store the contents of 64 int64.
[0132] Taking a game task as an example, when a player starts a game task, he needs to check whether the previous task has been completed. After the task is completed, he needs to mark the task as completed. TaskStates is an attribute on the player object that saves whether the task has been completed (initially empty), and its type is GameplayStates.
[0133] Let the predecessor task index be indexP and the current task index be index.
[0134] When starting a game task, find the corresponding value of key=indexP / / 64 in taskStates. If not found, set value to 0; take the indexP%64th bit of value. If it is 0, it means that the predecessor task has not been completed and the game task cannot be started; if it is 1, it means that the predecessor task has been completed and the game task can be started normally.
[0135] When the game task is ended, find the corresponding value of key=index / / 64 in taskStates. If not found, set value to 0; set the task state of value at index%64 to 1.
[0136] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0137] Reference Figure 4 , shows a schematic diagram of the structure of a task status updating device for a virtual game provided by an embodiment of the present invention, wherein the virtual game includes a plurality of game tasks, each of which is configured with corresponding index information, and specifically may include the following modules:
[0138] A target index information determination module 401 is used to determine the target index information corresponding to the target game task in response to an event of completing the target game task during the running of the virtual game;
[0139] The data storage structure acquisition module 402 is used to acquire a preset data storage structure consisting of key information and value information; wherein each key information is used to represent continuous index information corresponding to a group of game tasks, and each value information is used to store a group of task states corresponding to a group of game tasks;
[0140] A data type determination module 403, configured to determine a data type of the data storage structure according to the target index information;
[0141] The task status updating module 404 is used to update the task status of the target game task in the data storage structure according to the data type and the target index information.
[0142] In one embodiment of the present invention, the task status updating module 404 includes:
[0143] A target key information determination submodule, used to determine the target key information corresponding to the target index information according to the data type;
[0144] A target value information determination submodule, used to determine the target value information corresponding to the target key information in the data storage structure;
[0145] The status update submodule is used to update the task status of the target game task in the target value information.
[0146] In one embodiment of the present invention, the status update submodule includes:
[0147] A storage location information determining unit, used to determine the storage location information of the task state of the target game task in the target value information according to the data type and the target index information;
[0148] A state updating unit is used to update the task state corresponding to the storage location information according to the current state of the target game task.
[0149] In one embodiment of the present invention, the index information is integer information, and the target key information determination submodule includes:
[0150] a divisibility information determining unit, configured to divide the target index information by an integer according to the data type to obtain divisibility information;
[0151] A target key information determination unit is used to determine the target key information corresponding to the target index information according to the divisibility information.
[0152] In one embodiment of the present invention, the storage location information determining unit includes:
[0153] A remainder information determination subunit performs a modulo operation on the target index information according to the data type to obtain remainder information;
[0154] The storage location information determining subunit is used to determine the storage location information of the task status of the target game task in the target value information according to the remainder information.
[0155] In one embodiment of the present invention, the target value information determination submodule may include:
[0156] A query unit, configured to query value information in the data storage structure according to the target key information;
[0157] A first target value determination unit, configured to determine the queried value information as the target value information when the value information corresponding to the target key information is queried;
[0158] The second target value determination unit is used to configure the target value information corresponding to the target key information when the value information corresponding to the target key information is not found.
[0159] In one embodiment of the present invention, the device further comprises:
[0160] A predecessor task determination module, for determining, in response to a start operation for the target game task, a predecessor game task of the target game task from a preset task index table, and determining predecessor index information of the predecessor game task;
[0161] A pre-task status confirmation module is used to determine the task status of the pre-game task according to the pre-index information in a preset data storage structure;
[0162] The target game task starting module is used to start the target game task when the task status of the preceding game task is a completed status.
[0163] An embodiment of the present invention further provides a server, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the task status update method of the virtual game as described above is implemented.
[0164] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the task status updating method of the virtual game as described above is implemented.
[0165] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0166] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0167] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of 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 embodiments of 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 codes.
[0168] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the 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 the 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 terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal 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.
[0169] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product 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.
[0170] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement 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.
[0171] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0172] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0173] The above is a detailed introduction to a method and device for updating the task status of a virtual game. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for updating task status of a virtual game, characterized in that: The virtual game includes a plurality of game tasks, each game task is configured with corresponding index information, and the method includes: In response to an event of completing a target game task during the running of the virtual game, determining target index information corresponding to the target game task; Obtain a preset data storage structure consisting of key information and value information; wherein each key information is used to represent continuous index information corresponding to a set of game tasks, and each value information is used to store a set of task states corresponding to a set of game tasks; Determine the data type of the data storage structure according to the target index information; The task status of the target game task is updated in the data storage structure according to the data type and the target index information.
2. The method according to claim 1, characterized in that The updating of the task status of the target game task in the data storage structure according to the data type and the target index information comprises: Determine, according to the data type, target key information corresponding to the target index information; In the data storage structure, determining target value information corresponding to the target key information; The task status of the target game task is updated in the target value information.
3. The method according to claim 2, characterized in that The updating of the task status of the target game task in the target value information includes: Determine storage location information of the task state of the target game task in the target value information according to the data type and the target index information; The task status corresponding to the storage location information is updated according to the current status of the target game task.
4. The method according to claim 2 or 3, characterized in that: The index information is integer information, and determining the target key information corresponding to the target index information according to the data type includes: Dividing the target index information by an integer according to the data type to obtain an integer divisibility information; According to the divisibility information, target key information corresponding to the target index information is determined.
5. The method according to claim 4, characterized in that Determining storage location information of the task state of the target game task in the target value information according to the data type and the target index information includes: Performing a modulo operation on the target index information according to the data type to obtain remainder information; According to the remainder information, the storage location information of the task status of the target game task in the target value information is determined.
6. The method according to claim 2, characterized in that Determining the target value information corresponding to the target key information in the data storage structure includes: In the data storage structure, querying value information according to the target key information; When the value information corresponding to the target key information is found, the found value information is determined as the target value information; When the value information corresponding to the target key information is not found, the target value information corresponding to the target key information is configured.
7. The method according to claim 1, 2 or 3, characterized in that: Before responding to an event of completing a target game task during the running of the virtual game, the method further includes: In response to a start operation for the target game task, determining a preceding game task of the target game task from a preset task index table, and determining preceding index information of the preceding game task; In a preset data storage structure, determining the task status of the preceding game task according to the preceding index information; When the task status of the preceding game task is a completed state, the target game task is started.
8. A method and device for updating task status of a virtual game, characterized in that: The virtual game includes a plurality of game tasks, each game task is configured with corresponding index information, and the device includes: A target index information determination module, configured to determine target index information corresponding to the target game task in response to an event of completing a target game task during the running of the virtual game; A data storage structure acquisition module is used to acquire a preset data storage structure consisting of key information and value information; wherein each key information is used to represent continuous index information corresponding to a group of game tasks, and each value information is used to store a group of task states corresponding to a group of game tasks; A data type determination module, used to determine the data type of the data storage structure according to the target index information; A task status update module is used to update the task status of the target game task in the data storage structure according to the data type and the target index information.
9. A server, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method for updating the task status of a virtual game as claimed in any one of claims 1 to 7 is implemented.
10. 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 for updating the task status of a virtual game as claimed in any one of claims 1 to 7 is implemented.
